lighter 4 kuukautta sitten
vanhempi
commit
e99d32e84d

+ 8 - 1
src/main/java/thyyxxk/simzfeeoprnsystm/service/SiMzFeeService.java

@@ -201,7 +201,7 @@ public class SiMzFeeService {
         Integer infcode = result.getInteger(RESULT_CODE);
         logDao.insert(new SiLog(input, result, request.getPatNo(), request.getTimes(), infcode, request.getPsnNo()));
         String errMsg = result.getString(ERROR_MESSAGE);
-        if (infcode == 0 || (null != errMsg && errMsg.contains("不存在该就诊信息"))) {
+        if (infcode == 0 || noMdtrtData(errMsg)) {
             mzDao.clearMdtrtIdForMz(request.getPatNo(), request.getTimes(), null);
             setlinfoDao.deletePreSettleInfo(request.getPatNo(), request.getTimes());
             return ResultVoUtil.success("取消门诊挂号成功。");
@@ -209,6 +209,13 @@ public class SiMzFeeService {
         return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, errMsg);
     }
 
+    private boolean noMdtrtData(String msg) {
+        if (null == msg) {
+            return false;
+        }
+        return msg.contains("未查询到任何就诊登记信息") || msg.contains("不存在该就诊信息");
+    }
+
     public ResultVo<String> uploadOutpatientInfo(MzPatientInfo mzptnt, SpcChrDiseAcct spcChrDiseAcct, SiPatInfo siPatInfo) {
         JSONObject input = exec.makeTradeHeaderWithInsureArea(SiFunction.UPLOAD_OUTPATIENT_INFO,
                 siPatInfo.getInsuplcAdmdvs(), spcChrDiseAcct.getStaffId());