Browse Source

修改报销数据接口【暂用】

lighter 2 years ago
parent
commit
b29ef8d01e

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

@@ -6,6 +6,7 @@ import org.springframework.web.bind.annotation.*;
 import thyyxxk.webserver.config.auth.PassToken;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
 import thyyxxk.webserver.entity.ResultVo;
+import thyyxxk.webserver.entity.markmtfees.ModifyFundAmt;
 import thyyxxk.webserver.entity.markmtfees.SiMzBusinessParams;
 import thyyxxk.webserver.entity.medicalinsurance.onlinepayment.EcToken;
 import thyyxxk.webserver.entity.medicalinsurance.outpatient.MzPatientInfo;
@@ -140,6 +141,12 @@ public class MarkMtFeesController {
         return map;
     }
 
+    @PassToken
+    @PostMapping("/modifyFundPayAmount")
+    public Map<String, Object> modifyFundPayAmount(@RequestBody ModifyFundAmt modifyFundAmt) {
+        return mzService.modifyFundPayAmount(modifyFundAmt);
+    }
+
     @PassToken
     @PostMapping("/payOnline")
     public ResultVo<String> payOnline(@RequestBody EcToken token) {

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

@@ -140,4 +140,8 @@ public interface SiMzDao {
             "values (#{patNo},#{times},#{ledgerSn},#{psnNo},#{psnCertType},#{insutype},#{insuplc},#{certno}," +
             "#{psnName},#{gend},#{naty},#{brdy},#{age},#{medType},#{psnIdetType},#{psnType},#{empName},getdate(),#{balc})")
     void insertSiMzInfoPsnNo(PsnBaseInfo psnBaseinfo);
+
+    @Update("update t_si_setlinfo set fund_pay_sumamt=#{fundPay},acct_pay=#{acctPay} " +
+            "where pat_no=#{patientId} and times=#{times} and revoked=0")
+    Integer modifyFundAmt(ModifyFundAmt amt);
 }

+ 11 - 0
src/main/java/thyyxxk/webserver/entity/markmtfees/ModifyFundAmt.java

@@ -0,0 +1,11 @@
+package thyyxxk.webserver.entity.markmtfees;
+
+import lombok.Data;
+
+@Data
+public class ModifyFundAmt {
+    private String patientId;
+    private Integer times;
+    private String fundPay;
+    private String acctPay;
+}

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

@@ -43,7 +43,6 @@ public class SiMzService {
     private final SiMzSrvc mzSrvc;
     private final SiQueryService qryService;
     private static final String RESULT_CODE = "infcode";
-    private static final String ERROR_MESSAGE = "err_msg";
     private static final String OUTPUT = "output";
     @Value("${si-mz-fee-url}")
     private String siMzFeeUrl;
@@ -474,4 +473,18 @@ public class SiMzService {
     public ResultVo<Integer> isPatientDuringSiSettle(String patientId) {
         return mzSrvc.isPatientDuringSiSettle(siMzFeeUrl, patientId);
     }
+
+    public Map<String, Object> modifyFundPayAmount(ModifyFundAmt amt) {
+        Integer res = dao.modifyFundAmt(amt);
+        Map<String, Object> resultMap = new HashMap<>();
+        if (null != res && res > 0) {
+            resultMap.put("code", 0);
+            resultMap.put("msg", "更新成功,有" + res + "条数据受影响。");
+        } else {
+            resultMap.put("code", -1);
+            resultMap.put("msg", "更新失败,有0条数据受影响。");
+        }
+        log.info("THMZ修改报销数据:\n参数:{}\n结果:{}", amt, resultMap);
+        return resultMap;
+    }
 }