lihong há 1 ano atrás
pai
commit
68e7cf117d

+ 3 - 22
src/main/java/cn/hnthyy/thmz/Utils/AssertUtil.java

@@ -2,6 +2,7 @@ package cn.hnthyy.thmz.Utils;
 
 import cn.hnthyy.thmz.common.exception.BizException;
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 
 import java.util.Arrays;
@@ -21,7 +22,7 @@ public class AssertUtil {
      * @param: message
      **/
     public static void isNotBlank(Object object,String message){
-        if(!isNotBlank(object)){
+        if(ObjectUtil.isEmpty(object)){
             throw new BizException(message,R.ERR_CODE);
         }
     }
@@ -36,28 +37,8 @@ public class AssertUtil {
         if(o == null){
             throw new BizException(message,R.ERR_CODE);
         }
-        if(Arrays.stream(o).allMatch(o1 -> !isNotBlank(o1))){
+        if(Arrays.stream(o).allMatch(o1 -> ObjectUtil.isEmpty(o1))){
             throw new BizException(message,R.ERR_CODE);
         }
     }
-    private static boolean isNotBlank(Object object){
-        if (object == null) {
-           return false;
-        }
-        else if (object instanceof Collection) {
-            if(CollUtil.isEmpty((Collection)object)){
-                return false;
-            }
-        }
-        else if (object instanceof Map) {
-            if(CollUtil.isEmpty((Map)object)){
-                return false;
-            }
-        }else {
-            if (StrUtil.isBlank(object.toString())) {
-                return false;
-            }
-        }
-        return true;
-    }
 }

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

@@ -515,6 +515,7 @@ public class MedicalViewApiController {
             return results;
         }
     }
+
     /**
      * @description: 获取token 直接登录
      * @author: lihong
@@ -524,19 +525,19 @@ public class MedicalViewApiController {
      * @return: cn.hnthyy.thmz.Utils.R
      **/
     @GetMapping("/getToken")
-    public R getToken(String userCode, HttpServletRequest httpServletRequest){
+    public R getToken(String userCode, HttpServletRequest httpServletRequest) {
         String ip = HttpUtil.getIPAddress(httpServletRequest);
         WhiteList whiteList = whiteListService.queryByIpAddress(ip);
-        AssertUtil.isNotBlank(whiteList,"当前请求来源未在白名单中【" + ip + "】");
+        AssertUtil.isNotBlank(whiteList, "当前请求来源未在白名单中【" + ip + "】");
         AssertUtil.isNotBlank(userCode, "用户编码不能为空");
         User user = userService.queryUserByCode(userCode);
         AssertUtil.isNotBlank(userCode, "没有该用户");
         Employee employee = employeeService.queryByCodeRs(userCode);
-       if(employee != null && StrUtil.isNotBlank(employee.getYbCode())){
-           user.setYbCode(employee.getYbCode());
-       }
-        Date deadTime = DateUtil.getDate(Constants.JWT_TTL*30);
-        String token =TokenUtil.createJWT(JsonUtil.object2Json(user),deadTime);
+        if (employee != null && StrUtil.isNotBlank(employee.getYbCode())) {
+            user.setYbCode(employee.getYbCode());
+        }
+        Date deadTime = DateUtil.getDate(Constants.JWT_TTL * 30);
+        String token = TokenUtil.createJWT(JsonUtil.object2Json(user), deadTime);
         return R.ok().put("data", token);
     }
 
@@ -667,7 +668,7 @@ public class MedicalViewApiController {
             return results;
         }
         try {
-            log.info("微信查询待缴费记录传参====>{}",JsonUtil.object2Json(haiciCharge));
+            log.info("微信查询待缴费记录传参====>{}", JsonUtil.object2Json(haiciCharge));
             String[] arr = haiciCharge.getHisOrdNum().split("_");
             MzChargeDetail mzChargeDetail = new MzChargeDetail(arr[0], Integer.valueOf(arr[1]));
             mzChargeDetail.setBillItemCode("100");
@@ -717,7 +718,7 @@ public class MedicalViewApiController {
                 returnList.add(map);
             }
             log.info("微信查询待缴费门诊号===>{},就诊次数====>{}", arr[0], arr[1]);
-            log.info("微信查询待缴费记录明细===>{}",JsonUtil.object2Json(returnList));
+            log.info("微信查询待缴费记录明细===>{}", JsonUtil.object2Json(returnList));
             results.put("resultCode", 0);
             results.put("resultMessage", "待缴费记录明细查询成功");
             results.put("data", returnList);
@@ -869,10 +870,7 @@ public class MedicalViewApiController {
     }
 
     @PostMapping("/mzChargeFee")
-    public R mzChargeFee(@RequestBody Map<String,Object> query, HttpServletRequest httpServletRequest){
-        String ip = HttpUtil.getIPAddress(httpServletRequest);
-        WhiteList whiteList = whiteListService.queryByIpAddress(ip);
-        AssertUtil.isNotBlank(whiteList, "当前请求来源未在白名单中【" + ip + "】");
+    public R mzChargeFee(@RequestBody Map<String, Object> query, HttpServletRequest httpServletRequest) {
         String patientId = Convert.toStr(query.get("patientId"));
         AssertUtil.isNotBlank(patientId, "门诊号不能为空");
         BigDecimal totalFee = Convert.toBigDecimal(query.get("totalFee"));
@@ -893,24 +891,24 @@ public class MedicalViewApiController {
         }
         try {
             MzChargeDetail mzChargeDetail = mzChargeDetailService.unPaidToFullChargeDetail(new MzChargeDetail(patientId, times));
-            if(mzChargeDetail == null){
+            if (mzChargeDetail == null) {
                 return R.error("没有待收费记录");
             }
-            PayInfo payInfo = tsmzService.calculateCost(whiteList.getOpId(), patientId, times, 1);
-            if(payInfo !=null  && payInfo.getCode() == 0){
+            PayInfo payInfo = tsmzService.calculateCost(Constants.BRZZJF_CODE, patientId, times, 1);
+            if (payInfo != null && payInfo.getCode() == 0) {
                 List<MzDepositFile> mzDepositFiles = new ArrayList<>();
                 BigDecimal tempTotal = BigDecimal.ZERO;
-                if(payInfo.getAcctPay().compareTo(BigDecimal.ZERO) == 1){
+                if (payInfo.getAcctPay().compareTo(BigDecimal.ZERO) == 1) {
                     tempTotal = tempTotal.add(payInfo.getAcctPay());
                 }
-                if(payInfo.getFundPay().compareTo(BigDecimal.ZERO) == 1){
+                if (payInfo.getFundPay().compareTo(BigDecimal.ZERO) == 1) {
                     tempTotal = tempTotal.add(payInfo.getFundPay());
                 }
-                if(totalFee.compareTo(tempTotal) == 1){
+                if (totalFee.compareTo(tempTotal) == 1) {
                     MzDepositFile mzDepositFile = new MzDepositFile();
-                    if(totalFee.compareTo(BigDecimal.ZERO) == 0){
+                    if (totalFee.compareTo(BigDecimal.ZERO) == 0) {
                         mzDepositFile.setChequeType(Constants.CASH);
-                    }else {
+                    } else {
                         mzDepositFile.setChequeType(Constants.ZZWX);
                     }
                     mzDepositFile.setAmount(totalFee.subtract(tempTotal));
@@ -918,7 +916,7 @@ public class MedicalViewApiController {
                 }
                 //如果门诊统筹支付有值,添加收费方式
                 if (payInfo.getFundPay().compareTo(BigDecimal.ZERO) == 1) {
-                    MzDepositFile ybjzmzDepositFile =new MzDepositFile();
+                    MzDepositFile ybjzmzDepositFile = new MzDepositFile();
                     ybjzmzDepositFile.setAmount(payInfo.getFundPay());
                     ybjzmzDepositFile.setChequeType(Constants.YBJZ);
                     ybjzmzDepositFile.setPsordnum(null);
@@ -927,20 +925,20 @@ public class MedicalViewApiController {
                 }
                 //如果个人账户支付有值,添加收费方式
                 if (payInfo.getAcctPay().compareTo(BigDecimal.ZERO) == 1) {
-                    MzDepositFile grzhmzDepositFile =new MzDepositFile();
+                    MzDepositFile grzhmzDepositFile = new MzDepositFile();
                     grzhmzDepositFile.setAmount(payInfo.getAcctPay());
                     grzhmzDepositFile.setChequeType(Integer.valueOf(2).equals(payInfo.getCardType()) ? Constants.SHENYGZ : Constants.SSHIYBGZ);
                     grzhmzDepositFile.setPsordnum(null);
                     grzhmzDepositFile.setAgtordnum(null);
                     mzDepositFiles.add(grzhmzDepositFile);
                 }
-                if(CollUtil.isNotEmpty(mzDepositFiles)){
+                if (CollUtil.isNotEmpty(mzDepositFiles)) {
                     mzDepositFileVo.setMzDepositFiles(mzDepositFiles);
-                    mzChargeDetailService.chargeFee(whiteList.getOpId(), mzDepositFileVo, whiteList.getOpId());
-                }else {
+                    mzChargeDetailService.chargeFee(Constants.BRZZJF_CODE, mzDepositFileVo, Constants.BRZZJF_CODE);
+                } else {
                     throw new BizException("获取医保费用失败");
                 }
-            }else {
+            } else {
                 throw new BizException("获取医保费用失败");
             }
         } catch (MzException e) {
@@ -1090,6 +1088,7 @@ public class MedicalViewApiController {
             return results;
         }
     }
+
     /**
      * @description: 套餐退费
      * @author: lihong
@@ -1099,7 +1098,7 @@ public class MedicalViewApiController {
      * @return: cn.hnthyy.thmz.Utils.R
      **/
     @PostMapping("/tcRefundFee")
-    public R tcRefundFee(@RequestBody List<TcRefundFeeVo> params ,HttpServletRequest httpServletRequest){
+    public R tcRefundFee(@RequestBody List<TcRefundFeeVo> params, HttpServletRequest httpServletRequest) {
         String ip = HttpUtil.getIPAddress(httpServletRequest);
         WhiteList whiteList = whiteListService.queryByIpAddress(ip);
         AssertUtil.isNotBlank(whiteList, "当前请求来源未在白名单中【" + ip + "】");
@@ -1108,7 +1107,6 @@ public class MedicalViewApiController {
     }
 
 
-
     /**
      * 门诊已缴费记录查询
      *
@@ -1281,7 +1279,7 @@ public class MedicalViewApiController {
                 mzPrescriptionVo.setVisitDeptCode(Constants.ZZBM);
             }
             mzPrescriptionVo.setOpId(whiteList.getOpId());
-            Clinic clinic = mzChargeDetailService.savePrescription(mzPrescriptionVo, null,true);
+            Clinic clinic = mzChargeDetailService.savePrescription(mzPrescriptionVo, null, true);
             if (clinic != null && clinic.getId() != null) {
                 results.put("resultCode", 0);
                 results.put("resultMessage", "门诊处方保存成功");
@@ -1449,6 +1447,7 @@ public class MedicalViewApiController {
             return results;
         }
     }
+
     @PostMapping("/saveTcPrescription")
     public R saveTcPrescription(@RequestBody DiscountVo param, HttpServletRequest httpServletRequest) {
         String ip = HttpUtil.getIPAddress(httpServletRequest);
@@ -1457,14 +1456,13 @@ public class MedicalViewApiController {
         param.setOpId(whiteList.getOpId());
         try {
             mzChargeDetailService.saveTcPrescription(param);
-        }catch (MzException e){
+        } catch (MzException e) {
             return R.error(e.getMessage());
         }
         return R.ok("保存套餐处方成功");
     }
 
 
-
     /**
      * 根据病人住院号查询住院病人信息
      *
@@ -1862,20 +1860,20 @@ public class MedicalViewApiController {
 //                        if (mzyZdChargeType.getOthFee() == null) {
 //                            mzyZdChargeType.setOthFee(BigDecimal.ZERO);
 //                        }
-                     //   fee = fee.add(mzyZdChargeType.getReqFee()).add(mzyZdChargeType.getClinicFee()).add(mzyZdChargeType.getOthFee());
+                        //   fee = fee.add(mzyZdChargeType.getReqFee()).add(mzyZdChargeType.getClinicFee()).add(mzyZdChargeType.getOthFee());
                     }
                 }
 //                BigDecimal checkFee = (BigDecimal) map.get("checkFee");
 //                if (checkFee == null) {
 //                    checkFee = BigDecimal.ZERO;
 //                }
-            //    fee = fee.add(checkFee);
+                //    fee = fee.add(checkFee);
 //                //周末挂号费为0,不收挂号费
 //                if(DateUtil.isWeekend(requestDayD)){
 //                    fee=BigDecimal.ZERO;
 //                }
- //               map.put("fee", fee);
- //               map.remove("checkFee");
+                //               map.put("fee", fee);
+                //               map.remove("checkFee");
                 String doctorCode = (String) map.get("doctorCode");
                 //核酸需要简易门诊
                 if (StringUtils.isBlank(doctorCode) && !Constants.JY_EXEC_CODE.equals(unitCode)) {
@@ -1885,7 +1883,7 @@ public class MedicalViewApiController {
                 //核酸需要简易门诊开始
                 if (Constants.JY_EXEC_CODE.equals(unitCode)) {
                     List<Map<String, Object>> tempList = mzyRequestService.queryRequestByDateAndDeptAndDoctor(requestDayD, ampms, unitCode, doctorCode);
-                    if(tempList!=null && tempList.size()>0){
+                    if (tempList != null && tempList.size() > 0) {
                         map.put("mzyRequestId", tempList.get(0).get("mzyRequestId"));
                     }
                 }
@@ -2011,7 +2009,7 @@ public class MedicalViewApiController {
                         }
                     }
                 }
-                if(Constants.AM.equals(ampm)){
+                if (Constants.AM.equals(ampm)) {
                     map.remove("p1");
                     map.remove("p2");
                     map.remove("p3");
@@ -2019,7 +2017,7 @@ public class MedicalViewApiController {
                     map.remove("p5");
                     map.remove("p6");
                     map.remove("p7");
-                }else  if(Constants.PM.equals(ampm)){
+                } else if (Constants.PM.equals(ampm)) {
                     map.remove("a1");
                     map.remove("a2");
                     map.remove("a3");
@@ -2028,7 +2026,7 @@ public class MedicalViewApiController {
                     map.remove("a6");
                     map.remove("a7");
                     map.remove("a8");
-                }else {
+                } else {
                     map.remove("a1");
                     map.remove("a2");
                     map.remove("a3");
@@ -2070,18 +2068,13 @@ public class MedicalViewApiController {
     }
 
 
-
-
-
-
-
     /**
      * 根据时间范围和科室分类码查询号标数据
      *
      * @return
      */
     @RequestMapping(value = "/getP4UnitCode", method = {RequestMethod.POST})
-    public Map<String, Object> getP4UnitCode(@RequestBody Map<String,String> requestParamsVo) {
+    public Map<String, Object> getP4UnitCode(@RequestBody Map<String, String> requestParamsVo) {
         Map<String, Object> resultMap = new HashMap<>();
         try {
             if (requestParamsVo == null) {
@@ -2089,9 +2082,9 @@ public class MedicalViewApiController {
                 resultMap.put("resultMessage", "根据时间范围查询号标数据失败,参数为空");
                 return resultMap;
             }
-            String beginTime=requestParamsVo.get("beginTime");
-            String endTime=requestParamsVo.get("endTime");
-            String mzClass=requestParamsVo.get("mzClass");
+            String beginTime = requestParamsVo.get("beginTime");
+            String endTime = requestParamsVo.get("endTime");
+            String mzClass = requestParamsVo.get("mzClass");
             if (StringUtils.isBlank(beginTime)) {
                 resultMap.put("resultCode", -1);
                 resultMap.put("resultMessage", "根据时间范围查询号标数据失败,开始时间为空");
@@ -2107,14 +2100,14 @@ public class MedicalViewApiController {
                 resultMap.put("resultMessage", "根据时间范围查询号标数据失败,科室分类码为空");
                 return resultMap;
             }
-            Date beginTimeD = DateUtil.pase(beginTime,"yyyy-MM-dd HH:mm:ss");
-            if(beginTimeD==null){
+            Date beginTimeD = DateUtil.pase(beginTime, "yyyy-MM-dd HH:mm:ss");
+            if (beginTimeD == null) {
                 resultMap.put("resultCode", -1);
                 resultMap.put("resultMessage", "根据时间范围查询号标数据失败,开始时间为空");
                 return resultMap;
             }
-            Date endTimeD = DateUtil.pase(endTime,"yyyy-MM-dd HH:mm:ss");
-            if(endTimeD==null){
+            Date endTimeD = DateUtil.pase(endTime, "yyyy-MM-dd HH:mm:ss");
+            if (endTimeD == null) {
                 resultMap.put("resultCode", -1);
                 resultMap.put("resultMessage", "根据时间范围查询号标数据失败,结束时间为空");
                 return resultMap;
@@ -2124,19 +2117,19 @@ public class MedicalViewApiController {
             List<MzyRequest> mzyRequests = mzyRequestService.queryByTimes(beginTimeD, endTimeD, null, Constants.NIGHT);
             List<ZdUnitCode> zdUnitCodeList = new ArrayList<>();
             Set<String> codeSet = new HashSet<>();
-            if(mzyRequests!=null && mzyRequests.size()>0){
-                for(MzyRequest mzyRequest:mzyRequests){
-                    if(mzyRequest==null || StringUtils.isBlank(mzyRequest.getUnitCode())){
+            if (mzyRequests != null && mzyRequests.size() > 0) {
+                for (MzyRequest mzyRequest : mzyRequests) {
+                    if (mzyRequest == null || StringUtils.isBlank(mzyRequest.getUnitCode())) {
                         continue;
                     }
-                    if(codeSet.contains(mzyRequest.getUnitCode())){
+                    if (codeSet.contains(mzyRequest.getUnitCode())) {
                         continue;
                     }
                     ZdUnitCode zdUnitCode = zdUnitCodeService.queryByCode(mzyRequest.getUnitCode());
-                    if(zdUnitCode==null){
+                    if (zdUnitCode == null) {
                         continue;
                     }
-                    if(mzClass.equals(zdUnitCode.getMzClass())){
+                    if (mzClass.equals(zdUnitCode.getMzClass())) {
                         zdUnitCodeList.add(zdUnitCode);
                         codeSet.add(mzyRequest.getUnitCode());
                     }
@@ -2154,12 +2147,6 @@ public class MedicalViewApiController {
     }
 
 
-
-
-
-
-
-
     /**
      * 根据排班主键和生日查询挂号费用  (费用确认低于7岁儿童增加挂号费 上调50%)
      *
@@ -2277,11 +2264,11 @@ public class MedicalViewApiController {
                 resultMap.put("message", "挂号信息对应的号表不存在");
                 return resultMap;
             }
-            if(Constants.AM.equals(mzyRequest.getAmpm())){
-                if(StringUtils.isBlank(mzyReqrec.getApTime())){
+            if (Constants.AM.equals(mzyRequest.getAmpm())) {
+                if (StringUtils.isBlank(mzyReqrec.getApTime())) {
 
                 }
-            }else if (Constants.PM.equals(mzyRequest.getAmpm())){
+            } else if (Constants.PM.equals(mzyRequest.getAmpm())) {
 
             }
             mzyReqrec.setAmpm(mzyRequest.getAmpm());
@@ -2761,12 +2748,12 @@ public class MedicalViewApiController {
                     return resultMap;
                 }
                 List<MzReceiptSerial> mzReceiptSerials = mzReceiptSerialService.queryAllSerialForThisTime(patientId, times, receiptNo);
-                if(mzReceiptSerials==null || mzReceiptSerials.size()==0){
+                if (mzReceiptSerials == null || mzReceiptSerials.size() == 0) {
                     resultMap.put("code", -1);
                     resultMap.put("message", "没有查询到对应的发票!");
                     return resultMap;
                 }
-                MzReceiptSerial mzReceiptSerial=mzReceiptSerials.get(0);
+                MzReceiptSerial mzReceiptSerial = mzReceiptSerials.get(0);
 //                if (mzReceiptSerial == null) {
 //                    mzReceiptSerialService.repairDataFromBack(patientId, times, receiptNo);
 //                    mzReceiptSerial = mzReceiptSerialService.queryAllSerialForThisTime(patientId, times, receiptNo);
@@ -2849,7 +2836,7 @@ public class MedicalViewApiController {
             resultMap.put("data", mzyReqrec);
             resultMap.put("message", "发票详情查询成功");
             return resultMap;
-        }catch (MzException e) {
+        } catch (MzException e) {
             resultMap.put("code", -1);
             resultMap.put("message", e.getMessage());
             log.error("打印发票失败,系统异常,错误信息{}", e);

+ 4 - 16
src/main/java/cn/hnthyy/thmz/controller/mz/ClinicController.java

@@ -136,22 +136,10 @@ public class ClinicController {
                 resultMap.put("message", "病人不存在");
                 return resultMap;
             }
-            if(StringUtils.isNotBlank(mzPatientMi.getSocialNo())){
-                if(IdcardUtil.isValidCard(mzPatientMi.getSocialNo())){
-                    List<APatientMi> aPatientMis= aPatientMiService.queryAPatientBySocialNo(mzPatientMi.getSocialNo());
-                    if(aPatientMis!=null && aPatientMis.size()>0){
-                        for (APatientMi aPatientMi:aPatientMis){
-                            if(aPatientMi!=null && StringUtils.isNotBlank(aPatientMi.getInpatientNo())){
-                                int num= zyActpatientService.queryCountByInpatientNo(aPatientMi.getInpatientNo());
-                                if(num>0){
-                                    resultMap.put("code", -1);
-                                    resultMap.put("message", "当前患者正在我院住院治疗,无法继续在门诊就诊!");
-                                    return resultMap;
-                                }
-                            }
-                        }
-                    }
-                }
+            if(zyActpatientService.checkZaiYuan(patientId)){
+                resultMap.put("code", -1);
+                resultMap.put("message", "当前患者正在我院住院治疗,无法继续在门诊就诊!");
+                return resultMap;
             }
             User tokenUser = TokenUtil.getUser(httpServletRequest);
             if ("null".equals(serialNo)) {

+ 1 - 22
src/main/java/cn/hnthyy/thmz/controller/mz/MzPatientMiController.java

@@ -48,10 +48,6 @@ public class MzPatientMiController {
     @Autowired
     private HybirdTestService hybirdTestService;
     @Autowired
-    private ZyActpatientService zyActpatientService;
-    @Autowired
-    private APatientMiService aPatientMiService;
-    @Autowired
     private MzSerialNoService mzSerialNoService;
 
     /**
@@ -70,24 +66,7 @@ public class MzPatientMiController {
                 resultMap.put("message", "就诊卡号不能为空");
                 return resultMap;
             }
-            int num = zyActpatientService.queryCountByInpatientNo(icCardNo);
-            MzPatientMi mzPatientMi = null;
-            if(num > 0){
-             //住院号
-                APatientMi aPatientMi = aPatientMiService.queryPatientMiByInPatientNo(icCardNo);
-                if(StrUtil.isNotBlank(aPatientMi.getMzNo())){
-                    mzPatientMi = mzPatientMiService.queryByIcCardNo(aPatientMi.getMzNo());
-                    if(mzPatientMi == null && StrUtil.isNotBlank(aPatientMi.getSocialNo())){
-                        mzPatientMi = mzPatientMiService.queryByIcCardNo(aPatientMi.getSocialNo());
-                    }
-                }else  {
-                    if (StrUtil.isNotBlank(aPatientMi.getSocialNo())) {
-                        mzPatientMi = mzPatientMiService.queryByIcCardNo(aPatientMi.getSocialNo());
-                    }
-                }
-            }else {
-                mzPatientMi = mzPatientMiService.queryByIcCardNo(icCardNo);
-            }
+            MzPatientMi mzPatientMi = mzPatientMiService.queryByIcCardNo(icCardNo);
             resultMap.put("code", 0);
             resultMap.put("message", "查询病人信息成功");
             resultMap.put("data", mzPatientMi);

+ 1 - 0
src/main/java/cn/hnthyy/thmz/interceptor/GlobalExceptionHandler.java

@@ -50,6 +50,7 @@ public class GlobalExceptionHandler {
     @ExceptionHandler(BizException.class)
     @ResponseBody
     public R handleBizException(BizException e){
+        log.error("业务报错信息:"+e.getMessage(), e);
        return R.error(e.getCode(),e.getMessage());
     }
 

+ 12 - 20
src/main/java/cn/hnthyy/thmz/service/impl/thmz/TsmzServiceImpl.java

@@ -81,8 +81,7 @@ public class TsmzServiceImpl implements TsmzService {
                 return payInfo;
             }
         } catch (Exception e) {
-            log.error("特殊门诊病人费用试算失败,病人id={},就诊次数times={},缴费次数receiptNo={}", patientId, times, receiptNo);
-            e.printStackTrace();
+            log.error(StrUtil.format("特殊门诊病人费用试算失败,病人id={},就诊次数times={},缴费次数receiptNo={}:异常信息", patientId, times, receiptNo),e);
         }
         return null;
     }
@@ -141,8 +140,7 @@ public class TsmzServiceImpl implements TsmzService {
                 return payInfo;
             }
         } catch (Exception e) {
-            log.error("特殊门诊病人取消费用上传失败,病人id={},就诊次数times={},缴费次数receiptNo={}", patientId, times, receiptNo);
-            e.printStackTrace();
+            log.error(StrUtil.format("特殊门诊病人取消费用上传失败,病人id={},就诊次数times={},缴费次数receiptNo={}:异常信息:", patientId, times, receiptNo),e);
         }
         return null;
     }
@@ -177,8 +175,7 @@ public class TsmzServiceImpl implements TsmzService {
                 return payInfo;
             }
         } catch (Exception e) {
-            log.error("特殊门诊病人费用上传失败,病人id={},就诊次数times={},缴费次数receiptNo={}", patientId, times, receiptNo);
-            e.printStackTrace();
+            log.error(StrUtil.format("特殊门诊病人费用上传失败,病人id={},就诊次数times={},缴费次数receiptNo={}:异常信息:", patientId, times, receiptNo),e);
         }
         return null;
     }
@@ -216,9 +213,8 @@ public class TsmzServiceImpl implements TsmzService {
                 return fetchSpcSlwinfos;
             }
             log.info("查询特门病人信息成功");
-        } catch (IOException e) {
-            e.printStackTrace();
-            log.error("查询特门病人信息失败");
+        } catch (Exception e) {
+            log.error("查询特门病人信息失败,参数idCard="+idCard,e);
         }
         return null;
     }
@@ -274,8 +270,7 @@ public class TsmzServiceImpl implements TsmzService {
                 return resultMap;
             }
         } catch (Exception e) {
-            log.error("调用查询患者是否有职工参保信息接口,病人id={}", patientId);
-            e.printStackTrace();
+            log.error(StrUtil.format("调用查询患者是否有职工参保信息接口,病人id={}", patientId),e);
             resultMap.put("code", -2);
             resultMap.put("message", "获取医保身份信息失败,如需继续使用医保就诊,请咨询医保科,自费可忽略!");
             return resultMap;
@@ -284,7 +279,7 @@ public class TsmzServiceImpl implements TsmzService {
 
     @Override
     public PayInfo directRegistration(String staffId, String patientId, Integer times, String readCardResult, Integer acctUsedFlag, String readCardType, String expContent) {
-        log.info("调用职工门诊统筹试算接口,操作人={},病人={},就诊次数={}", staffId, patientId, times);
+        log.info("调用职工门诊统筹试算接口,操作人={},病人={},就诊次数={},读卡类型={},读卡返回参数={}", staffId, patientId, times,readCardType,readCardResult);
         String realUrl = tsmzServiceUrl + "/directRegistration";
         Map<String, Object> map = new HashMap<>();
         //Map 对象存入
@@ -322,8 +317,7 @@ public class TsmzServiceImpl implements TsmzService {
                 return payInfo;
             }
         } catch (Exception e) {
-            log.error("调用职工门诊统筹试算接口,病人id={},就诊次数times={}", patientId, times);
-            e.printStackTrace();
+            log.error(StrUtil.format("调用职工门诊统筹试算接口,病人id={},就诊次数times={}报错信息:", patientId, times),e);
         }
         return null;
     }
@@ -332,7 +326,7 @@ public class TsmzServiceImpl implements TsmzService {
     @Override
     @Async("asyncServiceExecutor")
     public void directRegistrationAsync(String staffId, String patientId, Integer times, String readCardResult, Integer acctUsedFlag, String readCardType, String expContent) {
-        log.info("调用职工门诊统筹试算接口,操作人={},病人={},就诊次数={}", staffId, patientId, times);
+        log.info("调用职工门诊统筹试算接口,操作人={},病人={},就诊次数={},读卡类型={},读卡返回参数={}", staffId, patientId, times,readCardType,readCardResult);
         String realUrl = tsmzServiceUrl + "/directRegistration";
         Map<String, Object> map = new HashMap<>();
         //Map 对象存入
@@ -350,8 +344,7 @@ public class TsmzServiceImpl implements TsmzService {
         try {
             HttpUtil.sendHttpPost(realUrl, jsonObj.toString(), 20000);
         } catch (Exception e) {
-            log.error("调用职工门诊统筹试算接口,病人id={},就诊次数times={}", patientId, times);
-            e.printStackTrace();
+            log.error(StrUtil.format("调用职工门诊统筹试算接口,病人id={},就诊次数times={}报错信息:", patientId, times),e);
         }
     }
 
@@ -373,9 +366,8 @@ public class TsmzServiceImpl implements TsmzService {
             }
             log.info("查询门诊结算状态成功");
             return  (Integer) resultJSONO.get("code");
-        } catch (IOException e) {
-            e.printStackTrace();
-            log.error("查询门诊结算状态失败");
+        } catch (Exception e) {
+            log.error("查询门诊结算状态失败门诊号="+patientId,e);
         }
         return 0;
     }