Ver Fonte

判断特门缴费接口调整

hurugang há 3 anos atrás
pai
commit
e6a0d13961

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

@@ -56,8 +56,8 @@ public class MzChargeDetailController {
     private ZyZdAuditItemService zyZdAuditItemService;
     @Autowired
     private ZdChargeItemService zdChargeItemService;
-    @Autowired
-    private MzChargeDetailYbService mzChargeDetailYbService;
+//    @Autowired
+//    private MzChargeDetailYbService mzChargeDetailYbService;
     @Autowired
     private TsmzService tsmzService;
     @Autowired
@@ -1319,7 +1319,7 @@ public class MzChargeDetailController {
                 resultMap.put("message", "缴费次数不能为空");
                 return resultMap;
             }
-            int count = mzChargeDetailYbService.queryTmCount(mzChargeDetailYb);
+            int count = mzPatientMiService.queryCountYbZf(mzChargeDetailYb.getPatientId(),mzChargeDetailYb.getTimes());
             if (count > 0) {
                 String token = TokenUtil.getToken(httpServletRequest);
                 if (StringUtils.isBlank(token)) {
@@ -1356,70 +1356,70 @@ public class MzChargeDetailController {
     }
 
 
-    /**
-     * 取消病人特门费用上传   不使用了
-     *
-     * @return
-     */
-    @UserLoginToken
-    @RequestMapping(value = "/cancelTmFee", method = {RequestMethod.POST})
-    public Map<String, Object> cancelTmFee(@RequestBody MzChargeDetailYb mzChargeDetailYb, HttpServletRequest httpServletRequest) {
-        Map<String, Object> resultMap = new HashMap<>();
-        try {
-            if (mzChargeDetailYb == null) {
-                resultMap.put("code", -1);
-                resultMap.put("message", "取消病人特门费用上传参数不能为空");
-                return resultMap;
-            }
-            if (StringUtils.isBlank(mzChargeDetailYb.getPatientId())) {
-                resultMap.put("code", -1);
-                resultMap.put("message", "病人编码不能为空");
-                return resultMap;
-            }
-            if (mzChargeDetailYb.getTimes() == null) {
-                resultMap.put("code", -1);
-                resultMap.put("message", "病人就诊次数不能为空");
-                return resultMap;
-            }
-            if (mzChargeDetailYb.getReceiptNo() == null) {
-                resultMap.put("code", -1);
-                resultMap.put("message", "缴费次数不能为空");
-                return resultMap;
-            }
-            int count = mzChargeDetailYbService.queryTmCount(mzChargeDetailYb);
-            if (count > 0) {
-                String token = TokenUtil.getToken(httpServletRequest);
-                if (StringUtils.isBlank(token)) {
-                    resultMap.put("code", -1);
-                    resultMap.put("message", "取消病人特门费用上传失败,用户Token不存在");
-                    return resultMap;
-                }
-                DecodedJWT decodedJWT = TokenUtil.parseJWT(token);
-                User tokenUser = (User) JsonUtil.jsontoObject(decodedJWT.getSubject(), User.class);
-                PayInfo result = tsmzService.retractFees(tokenUser.getUserIdCode(), mzChargeDetailYb.getPatientId(), mzChargeDetailYb.getTimes(), mzChargeDetailYb.getReceiptNo());
-                if (result == null) {
-                    resultMap.put("code", -1);
-                    resultMap.put("message", "获取特门费用失败");
-                    return resultMap;
-                }
-                if (result.getCode() != 0) {
-                    resultMap.put("code", -1);
-                    resultMap.put("message", result.getErrorMessage());
-                    return resultMap;
-                }
-                resultMap.put("data", result);
-            }
-            resultMap.put("code", 0);
-            resultMap.put("message", "取消病人特门费用上传成功");
-            return resultMap;
-        } catch (Exception e) {
-            e.printStackTrace();
-            resultMap.put("code", -1);
-            resultMap.put("message", "取消病人特门费用上传失败,系统出错,请联系管理员");
-            log.error("取消病人特门费用上传失败,系统异常,错误信息{}", e);
-            return resultMap;
-        }
-    }
+//    /**
+//     * 取消病人特门费用上传   不使用了
+//     *
+//     * @return
+//     */
+//    @UserLoginToken
+//    @RequestMapping(value = "/cancelTmFee", method = {RequestMethod.POST})
+//    public Map<String, Object> cancelTmFee(@RequestBody MzChargeDetailYb mzChargeDetailYb, HttpServletRequest httpServletRequest) {
+//        Map<String, Object> resultMap = new HashMap<>();
+//        try {
+//            if (mzChargeDetailYb == null) {
+//                resultMap.put("code", -1);
+//                resultMap.put("message", "取消病人特门费用上传参数不能为空");
+//                return resultMap;
+//            }
+//            if (StringUtils.isBlank(mzChargeDetailYb.getPatientId())) {
+//                resultMap.put("code", -1);
+//                resultMap.put("message", "病人编码不能为空");
+//                return resultMap;
+//            }
+//            if (mzChargeDetailYb.getTimes() == null) {
+//                resultMap.put("code", -1);
+//                resultMap.put("message", "病人就诊次数不能为空");
+//                return resultMap;
+//            }
+//            if (mzChargeDetailYb.getReceiptNo() == null) {
+//                resultMap.put("code", -1);
+//                resultMap.put("message", "缴费次数不能为空");
+//                return resultMap;
+//            }
+//            int count = mzChargeDetailYbService.queryTmCount(mzChargeDetailYb);
+//            if (count > 0) {
+//                String token = TokenUtil.getToken(httpServletRequest);
+//                if (StringUtils.isBlank(token)) {
+//                    resultMap.put("code", -1);
+//                    resultMap.put("message", "取消病人特门费用上传失败,用户Token不存在");
+//                    return resultMap;
+//                }
+//                DecodedJWT decodedJWT = TokenUtil.parseJWT(token);
+//                User tokenUser = (User) JsonUtil.jsontoObject(decodedJWT.getSubject(), User.class);
+//                PayInfo result = tsmzService.retractFees(tokenUser.getUserIdCode(), mzChargeDetailYb.getPatientId(), mzChargeDetailYb.getTimes(), mzChargeDetailYb.getReceiptNo());
+//                if (result == null) {
+//                    resultMap.put("code", -1);
+//                    resultMap.put("message", "获取特门费用失败");
+//                    return resultMap;
+//                }
+//                if (result.getCode() != 0) {
+//                    resultMap.put("code", -1);
+//                    resultMap.put("message", result.getErrorMessage());
+//                    return resultMap;
+//                }
+//                resultMap.put("data", result);
+//            }
+//            resultMap.put("code", 0);
+//            resultMap.put("message", "取消病人特门费用上传成功");
+//            return resultMap;
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            resultMap.put("code", -1);
+//            resultMap.put("message", "取消病人特门费用上传失败,系统出错,请联系管理员");
+//            log.error("取消病人特门费用上传失败,系统异常,错误信息{}", e);
+//            return resultMap;
+//        }
+//    }
 
 
     /**

+ 21 - 21
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzChargeDetailYbMapper.java

@@ -1,24 +1,24 @@
-package cn.hnthyy.thmz.mapper.his.mz;
-
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Select;
-
-public interface MzChargeDetailYbMapper {
+//package cn.hnthyy.thmz.mapper.his.mz;
+//
+//import org.apache.ibatis.annotations.Param;
+//import org.apache.ibatis.annotations.Select;
+//
+//public interface MzChargeDetailYbMapper {
+////    /**
+////     * 查询特门处方单张数
+////     *
+////     * @param mzChargeDetailYb
+////     * @return
+////     */
+////    @Select("select count(1) count from mt_part_info where patient_id=#{patientId} and  times = #{times} ")
+////    int selectTmCount(MzChargeDetailYb mzChargeDetailYb);
+//
 //    /**
-//     * 查询特门处方单张数
-//     *
-//     * @param mzChargeDetailYb
+//     * 查询医保就诊ID
+//     * @param patientId
+//     * @param times
 //     * @return
 //     */
-//    @Select("select count(1) count from mt_part_info where patient_id=#{patientId} and  times = #{times} ")
-//    int selectTmCount(MzChargeDetailYb mzChargeDetailYb);
-
-    /**
-     * 查询医保就诊ID
-     * @param patientId
-     * @param times
-     * @return
-     */
-    @Select("select mdtrt_id from t_si_pat_info WITH(NOLOCK) where pat_no=#{patientId} and times=#{times}")
-    String selectMdtrtId(@Param("patientId") String patientId, @Param("times") Integer times);
-}
+//    @Select("select mdtrt_id from t_si_pat_info WITH(NOLOCK) where pat_no=#{patientId} and times=#{times}")
+//    String selectMdtrtId(@Param("patientId") String patientId, @Param("times") Integer times);
+//}

+ 12 - 12
src/main/java/cn/hnthyy/thmz/service/his/mz/MzChargeDetailYbService.java

@@ -1,12 +1,12 @@
-package cn.hnthyy.thmz.service.his.mz;
-
-import cn.hnthyy.thmz.entity.his.mz.MzChargeDetailYb;
-
-public interface MzChargeDetailYbService {
-    /**
-     * 查询特门处方单张数
-     * @param mzChargeDetailYb
-     * @return
-     */
-    int queryTmCount(MzChargeDetailYb mzChargeDetailYb);
-}
+//package cn.hnthyy.thmz.service.his.mz;
+//
+//import cn.hnthyy.thmz.entity.his.mz.MzChargeDetailYb;
+//
+//public interface MzChargeDetailYbService {
+//    /**
+//     * 查询特门处方单张数
+//     * @param mzChargeDetailYb
+//     * @return
+//     */
+//    int queryTmCount(MzChargeDetailYb mzChargeDetailYb);
+//}

+ 8 - 0
src/main/java/cn/hnthyy/thmz/service/his/mz/MzPatientMiService.java

@@ -87,4 +87,12 @@ public interface MzPatientMiService {
      * @return
      */
     List<MzPatientMi> queryByCommonParams(String commonParams);
+
+    /**
+     * 查询患者的处方是否有医保报销支付(门诊统筹)
+     * @param patientId
+     * @param times
+     * @return
+     */
+    int queryCountYbZf(String patientId, Integer times);
 }

+ 23 - 23
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailYbServiceImpl.java

@@ -1,23 +1,23 @@
-package cn.hnthyy.thmz.service.impl.his.mz;
-
-import cn.hnthyy.thmz.entity.his.mz.MzChargeDetailYb;
-import cn.hnthyy.thmz.mapper.his.mz.MzChargeDetailYbMapper;
-import cn.hnthyy.thmz.service.his.mz.MzChargeDetailYbService;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-@Service
-public class MzChargeDetailYbServiceImpl implements MzChargeDetailYbService {
-    @SuppressWarnings("all")
-    @Autowired
-    private MzChargeDetailYbMapper mzChargeDetailYbMapper;
-    @Override
-    public int queryTmCount(MzChargeDetailYb mzChargeDetailYb) {
-        String mdtrtId = mzChargeDetailYbMapper.selectMdtrtId(mzChargeDetailYb.getPatientId(),mzChargeDetailYb.getTimes());
-        if (StringUtils.isNotBlank(mdtrtId)) {
-           return 1;
-        }
-        return 0;
-    }
-}
+//package cn.hnthyy.thmz.service.impl.his.mz;
+//
+//import cn.hnthyy.thmz.entity.his.mz.MzChargeDetailYb;
+//import cn.hnthyy.thmz.mapper.his.mz.MzChargeDetailYbMapper;
+//import cn.hnthyy.thmz.service.his.mz.MzChargeDetailYbService;
+//import org.apache.commons.lang3.StringUtils;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.stereotype.Service;
+//
+//@Service
+//public class MzChargeDetailYbServiceImpl implements MzChargeDetailYbService {
+//    @SuppressWarnings("all")
+//    @Autowired
+//    private MzChargeDetailYbMapper mzChargeDetailYbMapper;
+//    @Override
+//    public int queryTmCount(MzChargeDetailYb mzChargeDetailYb) {
+//        String mdtrtId = mzChargeDetailYbMapper.selectMdtrtId(mzChargeDetailYb.getPatientId(),mzChargeDetailYb.getTimes());
+//        if (StringUtils.isNotBlank(mdtrtId)) {
+//           return 1;
+//        }
+//        return 0;
+//    }
+//}

+ 5 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzPatientMiServiceImpl.java

@@ -206,5 +206,10 @@ public class MzPatientMiServiceImpl implements MzPatientMiService {
         return mzPatientMiMapper.selectByCommonParams(commonParams);
     }
 
+    @Override
+    public int queryCountYbZf(String patientId, Integer times) {
+        return mzPatientMiMapper.countYbZf(patientId,times);
+    }
+
 
 }