浏览代码

门诊结算由医保科做。

lighter 3 年之前
父节点
当前提交
961c3f5580

+ 8 - 4
src/main/java/thyyxxk/webserver/controller/medicalinsurance/MarkMtFeesController.java

@@ -40,7 +40,7 @@ public class MarkMtFeesController {
         mz.setTimes(param.getTimes());
         mz.setStaffId(param.getStaffId());
         ResultVo<FundDetail> result = mzService.outpatientPreSettlement(mz);
-        return getStringObjectMap(param, result, "收费窗口获取门特报销");
+        return getStringObjectMap(param, result, "收费窗口获取门特报销", false);
     }
 
     /**
@@ -54,7 +54,7 @@ public class MarkMtFeesController {
         mz.setTimes(param.getTimes());
         mz.setStaffId(param.getStaffId());
         ResultVo<FundDetail> result = mzService.outpatientSettlement(mz);
-        return getStringObjectMap(param, result, "收费窗口门特结算");
+        return getStringObjectMap(param, result, "收费窗口门特结算", true);
     }
 
     /**
@@ -72,6 +72,7 @@ public class MarkMtFeesController {
         if (result.getCode() == ExceptionEnum.SUCCESS.getCode()) {
             map.put("code", 0);
             map.put("msg", result.getData());
+            mzService.updateMzSaved(param.getPatientId(), param.getTimes(), 0);
         } else {
             map.put("code", -1);
             map.put("msg", result.getMessage());
@@ -82,14 +83,13 @@ public class MarkMtFeesController {
 
     private Map<String, Object> getStringObjectMap(@RequestBody UploadMtFeeParam param,
                                                    ResultVo<FundDetail> result,
-                                                   String logText) {
+                                                   String logText, boolean settlement) {
         Map<String, Object> map = new HashMap<>();
         if (result.getCode() != ExceptionEnum.SUCCESS.getCode()) {
             map.put("code", -1);
             map.put("msg", result.getMessage());
             return map;
         }
-        map.put("code", 0);
         FundDetail fund = result.getData();
         Map<String, String> payInfo = new HashMap<>();
         payInfo.put("totalCost", fund.getTotalCost());
@@ -97,7 +97,11 @@ public class MarkMtFeesController {
         payInfo.put("cashPay", fund.getCashPay());
         payInfo.put("acctPay", fund.getAcctPay());
         payInfo.put("selfPay", fund.getSelfPay());
+        map.put("code", 0);
         map.put("payInfo", payInfo);
+        if (settlement) {
+            mzService.updateMzSaved(param.getPatientId(), param.getTimes(), 1);
+        }
         log.info("{}:参数:{},结果:{}", logText, param, map);
         return map;
     }

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

@@ -56,12 +56,6 @@ public interface SiMzDao {
     @Select("select rtrim(name) from yp_zd_unit where code=#{code}")
     String selectDrugUnit(@Param("code") String code);
 
-    @Insert("insert into mt_part_info (patient_id, times, icd, balance, serial_apply, responce_type, " +
-            "hic_no, icd_code, icd_name, second_icd_code, third_icd_code, mz_serial_no, create_datetime) values "+
-            "(#{patientId},#{times},null,null,#{bizType},'03',#{hicNo},#{icdCode},#{icdName}," +
-            "#{secondIcdCode},#{thirdIcdCode},#{mzSerialNo},getdate())")
-    void insertMtPartInfo(CssybApplyInfo info);
-
     @Insert("insert into t_mt_receipt (patient_id, times, receipt_no, order_no, item_no, his_item_name, " +
             "his_item_code, fee_date, input_date, medi_item_type, charge_fee, price, quantity, drug_win, " +
             "input_staff, input_man, serial_no, yb_trans_flag, charge_type, bill_item_code) values (" +
@@ -119,4 +113,7 @@ public interface SiMzDao {
             "values (#{patNo}, #{times}, #{diagSrtNo}, #{diagType}, #{diagCode}, #{diagName}, #{diagDept}, " +
             "#{diseDorNo}, #{diseDorName}, #{diagTime}, #{valiFlag}, #{realOpter})")
     void insertNewMzDiag(SiMzDiag diag);
+
+    @Update("update t_si_setlinfo set mz_saved=#{val} where pat_no=#{patNo} and times=#{times}")
+    void updateMzSaved(@Param("patNo") String patNo, @Param("times") int times, @Param("val") int val);
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiMzService.java

@@ -283,4 +283,8 @@ public class SiMzService {
         }
         return ResultVoUtil.success("门诊诊断保存成功。");
     }
+
+    public void updateMzSaved(String patientId, int times, int val) {
+        dao.updateMzSaved(patientId, times, val);
+    }
 }