Forráskód Böngészése

添加日志和修复bug

DESKTOP-0GD05B0\Administrator 2 éve
szülő
commit
141fd11360

+ 3 - 3
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/YiZhuLuRuDao.java

@@ -441,9 +441,9 @@ public interface YiZhuLuRuDao {
 
     @Select("select count(*) " +
             "from zy_detail_charge with (NOLOCK) " +
-            "where inpatient_no = '' " +
-            "  and admiss_times = 1 " +
-            "  and order_no = ''" +
+            "where inpatient_no = #{patNo} " +
+            "  and admiss_times = #{times} " +
+            "  and order_no = #{orderNo} " +
             "  and ori_detail_sn is null" +
             "  and charge_fee > 0 ")
     Integer getDetailChargeFee(String patNo,

+ 4 - 1
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -660,11 +660,13 @@ public class YiZhuLuRuServer {
         }
 
         if (dao.getADoctorSOrderWithADefiniteFee(yz.getInpatientNo(), yz.getAdmissTimes(), orderNo) > 0) {
-            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该医嘱已经产生了医技费用,请对应的医技科室进行退费处理。");
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该医嘱已经执行,请对应的医技科室拒绝医嘱。");
         }
+
         if (dao.getDetailChargeFee(yz.getInstruction(), yz.getAdmissTimes(), orderNo) > 0) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "该医嘱已经产生了医技费用,请对应的医技科室进行退费处理。");
         }
+
         // 患者最大的 detail_sn
         int maxDetailSn = publicServer.getMaxDetailSn(yz.getInpatientNo(), yz.getAdmissTimes());
         dao.cancelMedicalTechnologyAssuranceFee(TokenUtil.getTokenUserId(), orderNo, yz.getInpatientNo(), yz.getAdmissTimes());
@@ -695,6 +697,7 @@ public class YiZhuLuRuServer {
         }
         dao.updateVoidedOrders(orderNo, userInfo.getCode(), reasonForCancellation);
         dao.updateChildOrders(orderNo, userInfo.getCode(), reasonForCancellation);
+        log.info("作废医嘱==》操作人:{},医嘱号:{}", userInfo.getCode(), orderNo);
         return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "撤销成功。");
     }