瀏覽代碼

处方修改删除先撤销医保结算

lihong 1 年之前
父節點
當前提交
0fc7f015de

+ 2 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -2872,6 +2872,8 @@ public class MzChargeDetailController {
     public R queryPrescriptionModifyPermission(@RequestBody Map<String,Object> query){
         String patientId = Convert.toStr(query.get("patientId"));
         Integer times = Convert.toInt(query.get("times"));
+        //修改处方时撤销医保费用
+        tsmzService.retractFees(TokenUtil.getUser().getUserCode(),patientId, times , 1);
         boolean flag =tsmzService.queryModifyPermission(patientId,times,TokenUtil.getUser().getUserCode());
         if(!flag){
             return R.error("不可以修改处方");

+ 6 - 9
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -1355,15 +1355,12 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
             throw new MzException("删除处方失败,禁止删除非本人开立处方!");
         }
         //撤销医保结算
-        int count = mzPatientMiMapper.countYbZf(clinic.getPatientId(), clinic.getTimes());
-        if( count > 0){
-            PayInfo retractInfo = tsmzService.retractFees(clinic.getOpId(), clinic.getPatientId(), clinic.getTimes(), 1);
-            if (retractInfo == null) {
-                log.info("删除处方失败,医保撤销失败门诊号:{}就诊次数:{}", clinic.getPatientId(),clinic.getTimes());
-            }
-            if (retractInfo.getCode() != 0) {
-                log.info("删除处方失败,医保撤销失败门诊号:{}就诊次数:{}[错误信息:{}]", clinic.getPatientId(),clinic.getTimes(),retractInfo.getErrorMessage());
-            }
+        PayInfo retractInfo = tsmzService.retractFees(clinic.getOpId(), clinic.getPatientId(), clinic.getTimes(), 1);
+        if (retractInfo == null) {
+            log.info("删除处方失败,医保撤销失败门诊号:{}就诊次数:{}", clinic.getPatientId(), clinic.getTimes());
+        }
+        if (retractInfo.getCode() != 0) {
+            log.info("删除处方失败,医保撤销失败门诊号:{}就诊次数:{}[错误信息:{}]", clinic.getPatientId(), clinic.getTimes(), retractInfo.getErrorMessage());
         }
         int num = clinicMapper.deleteById(clnicId);
         mzVisitTableMapper.deleteByPatientIdAndTimes(clinic.getPatientId(), clinic.getTimes());