lihong 1 рік тому
батько
коміт
23515f69ed

+ 2 - 2
src/main/java/cn/hnthyy/thmz/controller/api/MedicalViewApiController.java

@@ -607,7 +607,7 @@ public class MedicalViewApiController {
                 map.put("priceTime", DateUtil.fomart(mzChargeDetail.getPriceTime(), "yyyy-MM-dd HH:mm:ss"));
                 //不是医保查询的时候调用,需要查询是否有医保报销信息
                 if (haicipat.getYbRequest() == null || !YesNoEnum.YES.code.equals(haicipat.getYbRequest())) {
-                    PayInfo payInfo = tsmzService.uploadFees(whiteList.getOpId(), mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo());
+                    PayInfo payInfo = tsmzService.uploadFees(whiteList.getOpId(), mzChargeDetail.getPatientId(), mzChargeDetail.getTimes(), mzChargeDetail.getReceiptNo(),null);
                     if (payInfo != null && payInfo.getCode() == 0) {
                         if (payInfo.getAcctPay() == null) {
                             payInfo.setAcctPay(BigDecimal.ZERO);
@@ -846,7 +846,7 @@ public class MedicalViewApiController {
     }
 
     private void setYbDepositFile(WhiteList whiteList, MzDepositFileVo mzDepositFileVo, MzDepositFile mzDepositFile, List<MzDepositFile> mzDepositFiles) {
-        PayInfo payInfo = tsmzService.uploadFees(whiteList.getOpId(), mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), mzDepositFileVo.getReceiptNo());
+        PayInfo payInfo = tsmzService.uploadFees(whiteList.getOpId(), mzDepositFileVo.getPatientId(), mzDepositFileVo.getTimes(), mzDepositFileVo.getReceiptNo(),null);
         if (payInfo != null && payInfo.getCode() == 0) {
             //如果门诊统筹支付有值,添加收费方式
             if (payInfo.getFundPay().compareTo(BigDecimal.ZERO) == 1) {

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

@@ -1512,7 +1512,7 @@ public class MzChargeDetailController {
                 }
                 DecodedJWT decodedJWT = TokenUtil.parseJWT(token);
                 User tokenUser = (User) JsonUtil.jsontoObject(decodedJWT.getSubject(), User.class);
-                PayInfo payInfo = tsmzService.uploadFees(tokenUser.getUserIdCode(), mzChargeDetailYb.getPatientId(), mzChargeDetailYb.getTimes(), mzChargeDetailYb.getReceiptNo());
+                PayInfo payInfo = tsmzService.uploadFees(tokenUser.getUserIdCode(), mzChargeDetailYb.getPatientId(), mzChargeDetailYb.getTimes(), mzChargeDetailYb.getReceiptNo(),mzChargeDetailYb.getAcctUsedFlag());
                 if (payInfo == null) {
                     resultMap.put("code", -1);
                     resultMap.put("message", "获取门诊统筹/特门费用失败");
@@ -2147,7 +2147,7 @@ public class MzChargeDetailController {
                 totalAmount = totalAmount.setScale(2, BigDecimal.ROUND_HALF_UP);
                 BigDecimal selfAmount = totalAmount;
                 User tokenUser = TokenUtil.getUser(httpServletRequest);
-                PayInfo payInfo = tsmzService.uploadFees(tokenUser.getUserIdCode(), patientId, times, receiptNo);
+                PayInfo payInfo = tsmzService.uploadFees(tokenUser.getUserIdCode(), patientId, times, receiptNo,null);
                 if (payInfo != null && payInfo.getCode() == 0) {
                     //个人医保账户支付
                     results.put("acctPay", payInfo.getAcctPay());

+ 1 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzChargeDetailYb.java

@@ -25,6 +25,7 @@ public class MzChargeDetailYb implements Serializable,Comparable<MzChargeDetailY
     private String responseType;
     //医保类型 12-单病种  13-特门
     private String ybType;
+    private Integer acctUsedFlag;
 
 
    //根据处方号升序排列,降序修改相减顺序即可

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

@@ -2811,7 +2811,7 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         if (mzDepositFileMapper.selectMzTcZfInfo(patientId, times, receiptNo) > 0) {
             throw new MzException("该患者本次门诊处方已经进行了门诊统筹补录,请勿重复操作!");
         }
-        PayInfo payInfo = tsmzService.uploadFees(user.getUserIdCode(), patientId, times, receiptNo);
+        PayInfo payInfo = tsmzService.uploadFees(user.getUserIdCode(), patientId, times, receiptNo,null);
         if (payInfo == null) {
             throw new MzException("获取门诊统筹/特门费用失败!");
         }

+ 3 - 6
src/main/java/cn/hnthyy/thmz/service/impl/thmz/TsmzServiceImpl.java

@@ -44,12 +44,8 @@ public class TsmzServiceImpl implements TsmzService {
     }
 
     @Override
-    public PayInfo uploadFees(String staffId, String patientId, Integer times, Integer receiptNo) {
-        String balc = mzPatientMiMapper.selectMztczfsf(patientId, times, null);
-        if (balc == null) {
-            return null;
-        }
-        log.info("调用医保试算接口,操作人={},病人={},就诊次数={},缴费次数={}", staffId, patientId, times, receiptNo);
+    public PayInfo uploadFees(String staffId, String patientId, Integer times, Integer receiptNo,Integer acctUsedFlag) {
+        log.info("调用医保试算接口,操作人={},病人={},就诊次数={},缴费次数={},是否用个账={}", staffId, patientId, times, receiptNo,acctUsedFlag == null ? 0 : acctUsedFlag);
         String realUrl = tsmzServiceUrl + "/uploadFees";
         Map<String, Object> map = new HashMap<>();
         //Map 对象存入 用户名,密码,电话号码
@@ -57,6 +53,7 @@ public class TsmzServiceImpl implements TsmzService {
         map.put("patientId", patientId);
         map.put("times", times);
         map.put("receiptNo", receiptNo);
+        map.put("acctUsedFlag", acctUsedFlag == null ? 0 : acctUsedFlag);
         //Map 转成  JSONObject 字符串
         JSONObject jsonObj = new JSONObject(map);
         try {

+ 2 - 1
src/main/java/cn/hnthyy/thmz/service/thmz/TsmzService.java

@@ -28,9 +28,10 @@ public interface TsmzService {
      * @param patientId 病人id
      * @param times
      * @param receiptNo
+     * @param acctUsedFlag 是否使用个人账户余额结算 1使用,0不使用 2.使用共济账户
      * @return
      */
-    PayInfo uploadFees(String staffId, String patientId, Integer times, Integer receiptNo);
+    PayInfo uploadFees(String staffId, String patientId, Integer times, Integer receiptNo,Integer acctUsedFlag);
 
     /**
      * 费用撤销

+ 1 - 1
src/main/resources/static/js/mz/toll_administration.js

@@ -1419,7 +1419,7 @@ function tipHaveTally(data, patientId, times, name, receiptNo) {
         url: '/thmz/getTmFee',
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
-        data: JSON.stringify({"patientId": patientId, "times": times, "receiptNo": receiptNo}),
+        data: JSON.stringify({"patientId": patientId, "times": times, "receiptNo": receiptNo,  "acctUsedFlag": $("#grzhzf").val()}),
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
         async: false,
         success: function (res) {