Prechádzať zdrojové kódy

匹配添加有效日期范围

lighter 3 rokov pred
rodič
commit
fb4b6fe5f3

+ 11 - 4
src/main/java/thyyxxk/webserver/dao/his/nationalmatch/NationalMatchDao.java

@@ -19,6 +19,8 @@ public interface NationalMatchDao {
 
     @Select("select a.code,a.serial,a.new_name as name,type=#{type}," +
             "a.national_code,a.national_name,a.uploaded_flag, " +
+            "startTime=(select start_time from t_si_dl_ptnt_wstn_mdcn where code=a.national_code)," +
+            "endTime=(select end_time from t_si_dl_ptnt_wstn_mdcn where code=a.national_code)," +
             "unit=(select name from yp_zd_unit where yp_zd_unit.code=a.dosage_unit), " +
             "dosage=(select name from yp_zd_dosage where yp_zd_dosage.code=a.dosage), " +
             "ltrim(a.specification) as specification,rtrim(a.pzwh) as approvalNumber, " +
@@ -37,6 +39,8 @@ public interface NationalMatchDao {
 
     @Select("select a.code,a.serial,a.new_name as name,type=#{type}," +
             "a.national_code,a.national_name,a.uploaded_flag, " +
+            "startTime=(select start_time from t_si_dl_chns_hbl where code=a.national_code)," +
+            "endTime=(select end_time from t_si_dl_chns_hbl where code=a.national_code)," +
             "unit=(select name from yp_zd_unit where yp_zd_unit.code=a.dosage_unit), " +
             "dosage=(select name from yp_zd_dosage where yp_zd_dosage.code=a.dosage), " +
             "ltrim(a.specification) as specification,rtrim(a.pzwh) as approvalNumber, " +
@@ -54,6 +58,8 @@ public interface NationalMatchDao {
                                                   @Param("status") int status);
 
     @Select("select code,new_name as name,charge_unit as unit,type=#{type},discription,specification," +
+            "startTime=(select start_time from t_si_dl_mdcn_sply where code=national_code)," +
+            "endTime=(select end_time from t_si_dl_mdcn_sply where code=national_code)," +
             "national_code,uploaded_flag,national_name,yb_comment as factory from zd_charge_item " +
             "where isnull(national_status,0)=#{status} and isnull(del_flag,0)=#{delFlag} and " +
             "class_code='J' and code like #{code} and name like #{name}")
@@ -66,6 +72,8 @@ public interface NationalMatchDao {
 
     @Select("select code,new_name as name,charge_unit as unit,type=#{type}, discription,specification,uploaded_flag," +
             "national_code,national_name,s_code as standardCode, charge_amount as price, " +
+            "startTime=(select start_date from t_si_dl_mdcn_srvc where code=a.national_code)," +
+            "endTime=(select end_date from t_si_dl_mdcn_srvc where code=a.national_code)," +
             "localName=(select b.local_medical_service_name from si_central_services b where b.national_code=a.national_code) " +
             "from zd_charge_item a " +
             "where isnull(national_status,0)=#{status} and isnull(del_flag,0)=#{delFlag} and " +
@@ -83,10 +91,9 @@ public interface NationalMatchDao {
     @Select("select code as nationalCode,drug_trade_name as nationalName,drug_dosage_forms as actualDosage, " +
             "specifications=(drug_specifications+' x'+minimum_packing_quantity+minimum_preparation_unit+'/'+minimum_packing_unit), " +
             "packaging_material as packingMaterial,production_name as factory,license_number as approvalNumber, " +
-            "drug_supervision_local_code as drugStandardCode from t_si_dl_ptnt_wstn_mdcn " +
+            "drug_supervision_local_code as drugStandardCode,start_time,end_time from t_si_dl_ptnt_wstn_mdcn " +
             "where drug_trade_name like #{name} and license_number like #{approve}")
-    List<SiCentralMedicine> selectNationalMedicines(@Param("name") String name,
-                                                    @Param("approve") String approve);
+    List<SiCentralMedicine> selectNationalMedicines(@Param("name") String name, @Param("approve") String approve);
 
     @Select("select code as nationalCode,monoo_name as nationalName,start_time,end_time " +
             "from t_si_dl_chns_hbl where monoo_name like #{name}")
@@ -94,7 +101,7 @@ public interface NationalMatchDao {
 
     @Select("select code as nationalCode,service_name as nationalName,isnull(connotation,'') as projectConnotation, " +
             "exclude_content as exclusions,charge_unit as valuationUnit,entry_specification as projectDescription, " +
-            "start_date,end_date from t_si_dl_mdcn_srvc where service_name like #{name}")
+            "start_date as start_time,end_date as end_time from t_si_dl_mdcn_srvc where service_name like #{name}")
     List<SiCentralServices> selectNationalServices(@Param("name") String name);
 
     @Select("select code as nationalCode,supplies_name as nationalName,si_universal_name as siName, " +

+ 6 - 0
src/main/java/thyyxxk/webserver/entity/nationalmatch/QueryParam.java

@@ -17,4 +17,10 @@ public class QueryParam {
 
     private Integer pageSize;
     private Integer currentPage;
+
+    private Boolean isExport;
+
+    public Boolean getExport() {
+        return null != isExport && isExport;
+    }
 }

+ 4 - 0
src/main/java/thyyxxk/webserver/entity/nationalmatch/SiCentralMedicine.java

@@ -20,4 +20,8 @@ public class SiCentralMedicine {
     private String approvalNumber;
 
     private Double drugStandardCode;
+
+    private String startTime;
+
+    private String endTime;
 }

+ 2 - 2
src/main/java/thyyxxk/webserver/entity/nationalmatch/SiCentralServices.java

@@ -17,8 +17,8 @@ public class SiCentralServices {
 
 	private String projectDescription;
 
-	private String startDate;
+	private String startTime;
 
-	private String endDate;
+	private String endTime;
 
 }

+ 2 - 0
src/main/java/thyyxxk/webserver/entity/nationalmatch/StandardLocalItem.java

@@ -23,6 +23,8 @@ public class StandardLocalItem {
     private String price;
     private String nationalCode;
     private String nationalName;
+    private String startTime;
+    private String endTime;
     private String localName;
     private Integer uploadedFlag;
 

+ 4 - 2
src/main/java/thyyxxk/webserver/service/nationalmatch/NationalMatchService.java

@@ -35,7 +35,9 @@ public class NationalMatchService {
     }
 
     public ResultVo<Map<String, Object>> selectLocalItems(QueryParam param) {
-        IPage<StandardLocalItem> iPage = new Page<>(param.getCurrentPage(), param.getPageSize());
+        log.info("是否导出:{}", param.getExport());
+        IPage<StandardLocalItem> iPage = param.getExport() ? new Page<>(1, -1) :
+                new Page<>(param.getCurrentPage(), param.getPageSize());
         String code = param.getCode();
         code = StringUtil.isBlank(code) ? "%%" : code.trim().toUpperCase();
         String name = param.getName();
@@ -49,7 +51,7 @@ public class NationalMatchService {
         } else {
             iPage = dao.selectLocalSupplies(iPage, code, name, param.getType(), param.getDelFlag(), param.getStatus());
         }
-        if (iPage.getTotal() == 0) {
+        if (iPage.getRecords().size() == 0) {
             return ResultVoUtil.fail(ExceptionEnum.NULL_POINTER, "没有符合条件的数据。");
         }
         Map<String, Object> map = new HashMap<>(Capacity.TWO);