Browse Source

优化取消出院结算的反馈

lighter 2 years ago
parent
commit
012c7565ad

+ 9 - 3
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiZyService.java

@@ -576,14 +576,20 @@ public class SiZyService {
         Integer infcode = result.getInteger(RESULT_CODE);
         logDao.insert(new SiLog(input, result, p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), infcode, siPatInfo.getPsnNo()));
         if (null == infcode) {
-            return revokeDischarge(p);
+            return ResultVoUtil.fail(ExceptionEnum.NETWORK_ERROR);
         }
-        if (infcode == 0) {
+        String errMsg = null;
+        if (infcode != 0) {
+            errMsg = result.getString("err_msg");
+        }
+        ResultVo<String> rvkDischrgRslt = revokeDischarge(p);
+        if (rvkDischrgRslt.getCode() == ExceptionEnum.SUCCESS.getCode()) {
             dao.updateRvkSetlMsgid(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), input.getString("msgid"));
             setlinfodao.updateApplySettled(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn(), YesOrNo.NO.getCode());
             transbackTables(p);
+            return rvkDischrgRslt;
         }
-        return revokeDischarge(p);
+        return null == errMsg ? rvkDischrgRslt : ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, errMsg);
     }
 
     private void transbackTables(ZyPatientInfo p) {