Bladeren bron

修改/删除处方后的门诊医保统筹

lighter 1 jaar geleden
bovenliggende
commit
d85f6e2f3f

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>11.8.9</version>
+    <version>11.9.1</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

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

@@ -127,6 +127,14 @@ public class MarkMtFeesController {
         return getStringObjectMap(param, result, "医生保存处方试算");
     }
 
+    @PassToken
+    @PostMapping("/mzgjAfterModifyReceipt")
+    public Map<String, Object> mzgjAfterModifyReceipt(@RequestBody SiMzBusinessParams param) {
+        log.info("修改/删除处方后再次门诊共济:{}", param);
+        ResultVo<FundDetail> result = mzService.mzgjAfterModifyReceipt(param);
+        return getStringObjectMap(param, result, "医生保存处方试算");
+    }
+
     @PassToken
     @GetMapping("/isPatientDuringSiSettle")
     public Map<String, Object> isPatientDuringSiSettle(@RequestParam("patientId") String patientId) {

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

@@ -135,6 +135,9 @@ public interface SiMzDao {
                              @Param("insutype") String insutype,
                              @Param("balc") String balc);
 
+    @Select("select top 1 * from t_si_pat_info where pat_no=#{patNo} order by times desc")
+    PsnBaseInfo selectLatestPsnInfo(@Param("patNo") String patNo);
+
     @Insert("insert into t_si_pat_info (pat_no, times, ledger_sn, psn_no, psn_cert_type, insutype, insuplc_admdvs, " +
             "certno, psn_name, gend, naty, brdy, age, med_type, psn_idet_type,psn_type,emp_name, create_datetime, balc) " +
             "values (#{patNo},#{times},#{ledgerSn},#{psnNo},#{psnCertType},#{insutype},#{insuplc},#{certno}," +

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

@@ -479,6 +479,21 @@ public class SiMzService {
         return mzSrvc.directRegistration(siMzFeeUrl, param);
     }
 
+    public ResultVo<FundDetail> mzgjAfterModifyReceipt(SiMzBusinessParams param) {
+        PsnBaseInfo psnBaseInfo = dao.selectLatestPsnInfo(param.getPatientId());
+        if (null == psnBaseInfo) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "无法办理,没有找到参保信息。");
+        }
+        if (!Objects.equals(psnBaseInfo.getTimes(), param.getTimes())) {
+            int count = dao.selectSiMzInfoCount(param.getPatientId(), param.getTimes());
+            if (count == 0) {
+                psnBaseInfo.setTimes(param.getTimes());
+                dao.insertSiMzInfoPsnNo(psnBaseInfo);
+            }
+        }
+        return mzSrvc.directRegistration(siMzFeeUrl, param);
+    }
+
     public ResultVo<Integer> isPatientDuringSiSettle(String patientId) {
         return mzSrvc.isPatientDuringSiSettle(siMzFeeUrl, patientId);
     }