浏览代码

结算单上传中添加上传限制。

DESKTOP-0GD05B0\Administrator 2 年之前
父节点
当前提交
c5bb328abf

+ 0 - 1
src/main/java/thyyxxk/webserver/scheduled/UploadBillingList.java

@@ -4,7 +4,6 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
-import thyyxxk.webserver.dao.his.medicalinsurance.TransHospRcdDao;
 import thyyxxk.webserver.dao.his.medicalinsurance.UpIdCollectionDao;
 import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.querydata.SiSetlinfoTemp;

+ 23 - 4
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -104,22 +104,41 @@ public class SetlListUpldService {
         if (upldCollection.getCode() != 200) {
             throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, upldCollection.getMessage());
         }
+        StringBuilder errorMessage = new StringBuilder();
+
         if (!patNo.startsWith("JT") && patNo.indexOf("-") == 0) {
             if (StringUtil.isBlank(upldCollection.getData().getSetlinfo().getConerName())) {
-                throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, "患者联系人姓名不能为空。");
+                errorMessage.append("患者联系人姓名不能为空。");
             }
-
+        }
+        SetlinfoUpld temp = upldCollection.getData().getSetlinfo();
+        if (StringUtil.isBlank(temp.getChfpdrCode())) {
+            errorMessage.append("主诊医师编码为空。");
+        }
+        if (StringUtil.isBlank(temp.getRespNursCode())) {
+            errorMessage.append("责任护士编码为空。");
         }
         if (ListUtil.notBlank(upldCollection.getData().getOprninfo())) {
             for (OprninfoUpld item : upldCollection.getData().getOprninfo()) {
                 if (StringUtil.isBlank(item.getOperDrCode())) {
-                    throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getOperDrName() ? "没有填写医生" : item.getOperDrName()));
+                    errorMessage.append(String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getOperDrName() ? "没有填写医生" : item.getOperDrName()));
                 }
                 if (StringUtil.notBlank(item.getAnstDrName()) && StringUtil.isBlank(item.getAnstDrCode())) {
-                    throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getAnstDrName() ? "没有填写医生" : item.getAnstDrName()));
+                    errorMessage.append(String.format("医生:【%s】,没有医保编码请去职工字典数据维护中添加", null == item.getAnstDrName() ? "没有填写医生" : item.getAnstDrName()));
+                }
+                if (StringUtil.notBlank(item.getAnstDrName()) && (StringUtil.isBlank(item.getAnstBegntime()) || StringUtil.isBlank(item.getAnstEndtime()))) {
+                    errorMessage.append(String.format("手术:【%s】,有麻醉医生,没有麻时间请填写", item.getOprnOprtName()));
+                }
+                if (StringUtil.notBlank(item.getOprnOprtEndtime())) {
+                    errorMessage.append(String.format("手术:【%s】,手术结束时间为空。", item.getOprnOprtName()));
                 }
             }
         }
+
+        String tempError = errorMessage.toString();
+        if (StringUtil.notBlank(tempError)) {
+            throw new BizException(ExceptionEnum.INTERNAL_SERVER_ERROR, tempError);
+        }
         JSONObject input = new JSONObject();
         input.put("setlinfo", JSONObject.parseObject(JSONObject.toJSONStringWithDateFormat(upldCollection.getData().getSetlinfo(), "yyyy-MM-dd HH:mm:ss")));
         input.put("payinfo", JSONArray.parseArray(JSONArray.toJSONString(upldCollection.getData().getPayinfo())));