Bladeren bron

添加工伤已结算标识

lighter 3 maanden geleden
bovenliggende
commit
b225c6dc45

+ 3 - 0
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiMzDao.java

@@ -49,6 +49,9 @@ public interface SiMzDao {
     @Select("select count(1) from powersi_mip_setlinfo where med_org_ord=#{hisOrdNum} and ord_state='SETTLED'")
     int selectMipayCount(String hisOrdNum);
 
+    @Select("select count(1) from t_injury_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=0")
+    int selectInjuryCount(String patNo, int times);
+
     @Select("select count(1) from t_mt_receipt where patient_id=#{patientId} and times=#{times} and " +
             "receipt_no=#{receiptNo} and order_no=#{orderNo}")
     int selectFeeCount(String patientId, int times, int receiptNo, int orderNo);

+ 5 - 1
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -241,7 +241,11 @@ public class SiMzService {
         }
         String hisOrdNum = f.getPatientId() + "_" + f.getTimes() + "_" + f.getReceiptNo();
         int mipay = dao.selectMipayCount(hisOrdNum);
-        return mipay == 0 ? 0 : 2;
+        if (mipay > 0) {
+            return 2;
+        }
+        int injury = dao.selectInjuryCount(f.getPatientId(), f.getTimes());
+        return injury == 0 ? 0 : 3;
     }
 
     private MzReceipt fillMzReceipt(Map<String, Object> detail) {