Pārlūkot izejas kodu

提交药品单增加大输液和带参查询

梁欢 1 nedēļu atpakaļ
vecāks
revīzija
d9b304ad32

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyiji/MedicineManagementDao.java

@@ -19,7 +19,7 @@ public interface MedicineManagementDao {
     @Select("select b.code as chargeCode,sum(a.amount) as amount,sum(a.charge_fee) as chargeFee, " +
             "max(b.pack_retprice) as price,max(a.exec_unit) as execUnit,b.serial as serialNo, " +
             "max(a.group_no) as groupNo,max(a.page_no) as pageNo,max(b.name) as drugName, " +
-            "max(b.specification) as spec,max(a.confirm_flag) as confirmFlag,max(b.drug_flag) as drugFlag " +
+            "max(b.specification) as spec,max(a.confirm_flag) as confirmFlag,max(b.drug_flag) as drugFlag,max(b.infusion_flag) as infusionFlag " +
             "from zy_drug a with(nolock),yp_zd_dict b with(nolock) ${ew.customSqlSegment}")
     List<MedicinePage> selectMedicinePages(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
 

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/medicaltechnology/MedicinePage.java

@@ -25,5 +25,6 @@ public class MedicinePage {
     private String patNo;
     private String patName;
     private String tjFlag = "1";
+    private String infusionFlag;//大输液标志 不是:null or 0  是:1
     private boolean checked = true;
 }

+ 9 - 0
src/main/java/thyyxxk/webserver/service/zhuyuanyiji/MedicineManagementService.java

@@ -83,6 +83,15 @@ public class MedicineManagementService {
 
     private QueryWrapper<?> buildFetchPageNoQw(FetchMedicines params) {
         QueryWrapper<?> qw = new QueryWrapper<>();
+        if(params.getChargeCodes().equals("2")){
+            qw.gt("b.drug_flag ","0");
+        }
+        if(params.getChargeCodes().equals("3")){
+            qw.apply("b.drug_flag = '' or b.drug_flag is null and b.infusion_flag is null or b.infusion_flag = 0");
+        }
+        if(params.getChargeCodes().equals("4")){
+            qw.gt("b.infusion_flag ","0");
+        }
         qw.ge("charge_date", params.getStart())
                 .le("charge_date", params.getEnd())
                 .eq("isnull(a.page_no,0)", "0")