lighter пре 4 месеци
родитељ
комит
689b75fa87

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>hnthyyxxk</groupId>
     <artifactId>SiZyFeeOprnSystm</artifactId>
-    <version>1.0</version>
+    <version>1.3</version>
     <name>SiZyFeeOprnSystm</name>
     <description>SiZyFeeOprnSystm</description>
 

+ 4 - 0
src/main/java/thyyxxk/sizyfeeoprnsystm/pojo/ZyPatientInfo.java

@@ -57,4 +57,8 @@ public class ZyPatientInfo {
     public Boolean getDbg() {
         return null != isDbg && isDbg;
     }
+
+    public String getPsnInfo() {
+        return name + "-" + inpatientNo + "_" + admissTimes + "_" + ledgerSn;
+    }
 }

+ 24 - 23
src/main/java/thyyxxk/sizyfeeoprnsystm/service/SiZyFeeService.java

@@ -118,7 +118,8 @@ public class SiZyFeeService {
 
     public ResultVo<String> uploadSinglePatientFees(Overview overview) {
         if (uploadingMap.containsKey(overview.getInpatientNo())) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该患者正在其他机器上传,操作人是" +
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR,
+                    "该患者正在其他机器上传,操作人是" +
                     uploadingMap.get(overview.getInpatientNo()).getStaff());
         }
         if (!staffMap.containsKey(overview.getStaffId())) {
@@ -357,30 +358,30 @@ public class SiZyFeeService {
         String ref = JSONArray.toJSONString(fees);
         input.getJSONObject("input").put("feedetail", JSONArray.parse(ref));
         JSONObject result = exec.executeTrade(input, SiFunction.UPLOAD_HOSPITALIZATION_FEE_DETAILS);
-        log.info("【操作员:{}】,医保费用上传:\n参数:{},\n结果:{}", p.getStaffId(), input, result);
-        if (null != result) {
-            if (result.getIntValue(RESULT_CODE) == 0) {
-                JSONArray array = result.getJSONObject(OUTPUT).getJSONArray("result");
-                List<SiChargeTemp> tempList = new ArrayList<>();
-                for (int i = 0; i < array.size(); i++) {
-                    JSONObject upldretrn = array.getJSONObject(i);
-                    SiChargeTemp chrgtemp = JSONObject.parseObject(upldretrn.toJSONString(), SiChargeTemp.class);
-                    chrgtemp.setPatNo(p.getInpatientNo());
-                    chrgtemp.setTimes(p.getAdmissTimes());
-                    chrgtemp.setLedgerSn(p.getLedgerSn());
-                    tempList.add(chrgtemp);
-                }
-                zyDao.updateTransFlag(p.getInpatientNo(), p.getAdmissTimes(), tempList);
-                zyDao.insertSiChargeTempFeeBatch(tempList);
-                return new int[] {tempList.size(), fees.size() - tempList.size()};
-            } else {
-                RestTemplate template = new RestTemplate();
-                String message = result.getString(ERROR_MESSAGE);
-                sendUploadResponse(p, template, message);
-                return new int[] {fees.size(), 0};
+        int infcode = result.getIntValue(RESULT_CODE);
+        String logMsg = infcode + "," + result.getString("inf_refmsgid");
+        log.info("【操作员:{}】,医保费用上传:\n患者:{},\n结果:{}", p.getStaffId(),
+                p.getPsnInfo(), logMsg);
+        if (infcode == 0) {
+            JSONArray array = result.getJSONObject(OUTPUT).getJSONArray("result");
+            List<SiChargeTemp> tempList = new ArrayList<>();
+            for (int i = 0; i < array.size(); i++) {
+                JSONObject upldretrn = array.getJSONObject(i);
+                SiChargeTemp chrgtemp = JSONObject.parseObject(upldretrn.toJSONString(), SiChargeTemp.class);
+                chrgtemp.setPatNo(p.getInpatientNo());
+                chrgtemp.setTimes(p.getAdmissTimes());
+                chrgtemp.setLedgerSn(p.getLedgerSn());
+                tempList.add(chrgtemp);
             }
+            zyDao.updateTransFlag(p.getInpatientNo(), p.getAdmissTimes(), tempList);
+            zyDao.insertSiChargeTempFeeBatch(tempList);
+            return new int[]{tempList.size(), fees.size() - tempList.size()};
+        } else {
+            RestTemplate template = new RestTemplate();
+            String message = result.getString(ERROR_MESSAGE);
+            sendUploadResponse(p, template, message);
+            return new int[]{fees.size(), 0};
         }
-        return new int[]{0, 0};
     }
 
     public ResultVo<String> hospitalizationPreSettlement(ZyPatientInfo p, Overview o) {

+ 1 - 1
src/main/resources/application-prod.yml

@@ -30,6 +30,6 @@ mybatis:
 si-api-url: http://dms.hun.hsip.gov.cn/isp-api/powercsb/1101
 si-access-key: 04eMGRg7beAO6vqwrZiLacV8Uy3jNn7QGDUcBO
 si-secret-key: SK3Oip3a2R3NLz2xm58Mpmi69oFu96KrdKNRKglN
-upld-notify-url: http://172.16.32.160:8077/socketMessage
+upld-notify-url: http://172.16.32.167:8077/socketMessage
 
 execute-scheduled: true

+ 1 - 1
src/main/resources/application.yml

@@ -12,7 +12,7 @@ spring:
   thymeleaf:
     cache: false
   datasource:
-    url: jdbc:jtds:sqlserver://172.16.32.168:1433/thxyhisdb
+    url: jdbc:jtds:sqlserver://172.16.32.179:1433/thxyhisdb
     hikari:
       username: sa
       password: