Browse Source

优化护士退药单的提示

xiaochan 2 years ago
parent
commit
8c282e8478

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/inpatient/DismissDao.java

@@ -79,7 +79,7 @@ public interface DismissDao {
             "(case when a.amount>0 then a.page_no else a.page_no_ty end>0) and a.group_no=b.group_no and a.status_flag='1'")
     List<IllegalFee> hasUntreatedDrugOrder(@Param("patNo") String patNo, @Param("times") Integer times);
 
-    @Select("select page_no_ty from yz_yp_zy_order where inpatient_no=#{patNo} " +
+    @Select("select page_no_ty,charge_date as yp_charge_date from yz_yp_zy_order where inpatient_no=#{patNo} " +
             "and admiss_times=#{times} and page_class='HT' and status_flag='1'")
     List<IllegalFee> selectPageNoTys(@Param("patNo") String patNo, @Param("times") Integer times);
 

+ 7 - 0
src/main/java/thyyxxk/webserver/entity/inpatient/dismiss/IllegalFee.java

@@ -2,6 +2,8 @@ package thyyxxk.webserver.entity.inpatient.dismiss;
 
 import lombok.Data;
 
+import java.util.Date;
+
 /**
  * @description: 负数的费用清单
  * @author: DingJie
@@ -19,4 +21,9 @@ public class IllegalFee {
     private String pageNo;
     private String pageNoTy;
     private String remark;
+
+    /**
+     * 药品的时间
+     */
+    private Date ypChargeDate;
 }

+ 5 - 3
src/main/java/thyyxxk/webserver/service/inpatient/DismissService.java

@@ -1,5 +1,6 @@
 package thyyxxk.webserver.service.inpatient;
 
+import cn.hutool.core.util.StrUtil;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import lombok.extern.slf4j.Slf4j;
@@ -253,9 +254,10 @@ public class DismissService {
             for (IllegalFee drug : refundDrugs) {
                 if (drug.getPageNoTy().equals("-1")) {
                     drug.setPageNoTy("未提交");
-                    drug.setRemark("请护士提交退药单。");
+                    drug.setRemark(StrUtil.format("有【{}】,退药单未生成,请去入院登记的【生成退药单】中生成退药单。",
+                            DateUtil.formatDatetime(drug.getYpChargeDate(), "yyyy-MM-dd HH:mm")));
                 } else {
-                    drug.setRemark("请联系药房处理。");
+                    drug.setRemark("请联系药房处理,如果需要退费请药房点击同意,不需要退费请点击拒绝。");
                 }
             }
             return ResultVoUtil.fail(ExceptionEnum.EXIST_UNHANDLED_REFUND_DRUG, refundDrugs);
@@ -279,7 +281,7 @@ public class DismissService {
             exception.setMessage("此患者有未结账的费用。");
             throw new BizException(exception);
         }
-        Date begntime = getBegntime(patNo, times, ledgerSn,"zy_actpatient");
+        Date begntime = getBegntime(patNo, times, ledgerSn, "zy_actpatient");
         dismissFeeAnalyse(patNo, times, ledgerSn, begntime, tmpendtime);
 
         BigDecimal feeOffset = dao.getFeeOffset(patNo, times, ledgerSn);