Browse Source

删除一些不必要的文件。

xiaochan 4 years ago
parent
commit
c13580ee83

+ 2 - 7
src/main/java/thyyxxk/webserver/dao/his/querydata/ConsumablesStatisticsMapper.java

@@ -1,20 +1,15 @@
 package thyyxxk.webserver.dao.his.querydata;
 
-import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.Constants;
 import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
 import thyyxxk.webserver.entity.querydata.ConsumablesStatistics;
-import thyyxxk.webserver.entity.querydata.CovidVaccinateAppointment;
 
 import java.util.List;
 
 /**
  * <p>
- * 描述
+ * 描述 查询耗材统计
  * </p>
  *
  * @author xc
@@ -25,7 +20,7 @@ public interface ConsumablesStatisticsMapper {
     /**
      * 查询耗材使用统计  这个sql太复杂无法分页
      * 使用了 UNION ALL 就需要用 select * from (里面放sql) temp
-     * @param param
+     * @param param 时间区间 费用类型 项目编码 查询的条件
      * @return 指定数据
      * */
     @Select("<script>" +

+ 6 - 7
src/main/java/thyyxxk/webserver/dao/his/querydata/CovidVaccinateAppointmentMapper.java

@@ -31,26 +31,25 @@ public interface CovidVaccinateAppointmentMapper {
     /**
      * 查询出指定范围的数据 用来设置 新冠疫苗的预约阈值
      * @param startDate 开始的日期
-     * @param endDate 世界的日期
+     * @param endDate 结束的日期
      * @return 返回满足条件的list集合
      * */
     @Select("select date,value from t_covid_vaccinate_threshold " +
             "where date>= #{startDate} and date <= #{endDate}")
-    List<CovidVaccinateThreshold> queryList(@Param("startDate")String startDate, @Param("endDate")String endDate);
+    List<CovidVaccinateThreshold> queryList(@Param("startDate")String startDate,
+                                            @Param("endDate")String endDate);
 
     /**
      * 查询新冠疫苗的预约阈值如果没有的就会插入一条数据
-     * @param date 要插入的日期
-     * @return 返回插入成功还是失败了
-     * */
+     * @param date 要插入的日期 */
     @Insert("insert into t_covid_vaccinate_threshold (date, value) values (#{date},'300')")
-    Boolean insertDate(@Param("date") String date);
+    void insertDate(@Param("date") String date);
 
     /**
      * 设置新冠疫苗每日预约的人数限制
      * @param date 设置限制的日期
      * @param value 设置预约的具体人数
-     * @return
+     * @return 返回
      * */
     @Update("update t_covid_vaccinate_threshold set value = #{value} where date=#{date}")
     Boolean update(@Param("value")int value, @Param("date")String date);

+ 1 - 2
src/main/java/thyyxxk/webserver/dao/his/querydata/InquiryOfConsultationFeeMapper.java

@@ -16,8 +16,7 @@ public interface InquiryOfConsultationFeeMapper {
 
     /**
      * 查询会诊费用 根据日期区间 进行查询
-     * @param page
-     * page分页的条件
+     * @param page 分页的条件
      * @param endDate 开始时间
      * @param startDate 结束时间
      * @return 返回一个 IPage对象里包含了 总条数 以及符合条件的数据

+ 30 - 25
src/main/java/thyyxxk/webserver/dao/his/querydata/QueryDrugsAndProjectsMapper.java

@@ -38,10 +38,10 @@ public interface QueryDrugsAndProjectsMapper {
      * @return 返回
      * */
     @Select("<script>" +
-            "select a.charge_code_mx chargeCode,b.name name,sum(a.charge_amount) number,sum(charge_fee) amountOfMoney,classCode=c.name,source='住院'\n" +
-            "from zy_detail_charge a\n" +
-            "left join zd_charge_item b on a.charge_code_mx=b.code\n" +
-            "left join zd_charge_class c on b.class_code=c.code\n" +
+            "select a.charge_code_mx chargeCode,b.name name,sum(a.charge_amount) number,sum(charge_fee) amountOfMoney,classCode=c.name,source='住院' " +
+            "from zy_detail_charge a " +
+            "left join zd_charge_item b on a.charge_code_mx=b.code " +
+            "left join zd_charge_class c on b.class_code=c.code " +
             "where " +
             "1=1 " +
             "<if test=\"startTime!=null and startTime!=''\">" +
@@ -56,12 +56,12 @@ public interface QueryDrugsAndProjectsMapper {
             "<if test=\"chargeCode!=null and chargeCode!=''\">" +
             "and charge_code_mx=#{chargeCode} " +
             "</if>" +
-            "GROUP BY a.charge_code_mx,b.name,c.name\n" +
-            "union all\n" +
-            "select a.charge_item_code chargeCode,b.name name,sum(a.quantity*drug_win) amountOfMoney,sum(a.quantity*drug_win*unit_price) amountOfMoney,\n" +
-            "classCode=c.name,source='住院'\n" +
-            "from mz_charge_detail_b a left join zd_charge_item b on a.charge_item_code=b.code\n" +
-            "left join zd_charge_class c on b.class_code=c.code\n" +
+            "GROUP BY a.charge_code_mx,b.name,c.name " +
+            "union all " +
+            "select a.charge_item_code chargeCode,b.name name,sum(a.quantity*drug_win) amountOfMoney,sum(a.quantity*drug_win*unit_price) amountOfMoney, " +
+            "classCode=c.name,source='住院' " +
+            "from mz_charge_detail_b a left join zd_charge_item b on a.charge_item_code=b.code " +
+            "left join zd_charge_class c on b.class_code=c.code " +
             "where " +
             "1=1 " +
             "<if test=\"startTime!=null and startTime!=''\">" +
@@ -76,26 +76,31 @@ public interface QueryDrugsAndProjectsMapper {
             "<if test=\"chargeCode!=null and chargeCode!=''\">" +
             "and a.charge_item_code=#{chargeCode} " +
             "</if>" +
-            "and a.pay_mark='0'\n" +
+            "and a.pay_mark='0' " +
             "group by a.charge_item_code,a.serial,b.name,c.name" +
             "</script>")
     List<QueryDrugsAndProjects> queryProjects(QueryDrugsAndProjects param);
 
 
+    /**
+     * 查询药品
+     * @param param 搜索条件 日期范围 是否为抗生素 药品大类 药品编码
+     * @return 返回符合条件的数据
+     * */
     @Select("<script>" +
             "select a.charge_code_mx chargeCode," +
             "case a.serial when '01' then '药品(小)' when '99' then '药品(大)' end packageSpecification," +
-            "b.name name,sum(a.charge_amount) number,sum(charge_fee) amountOfMoney,source='住院',classCode=c.name\n" +
-            "from zy_detail_charge a,yp_zd_dict b,yp_zd_drug_kind c\n" +
+            "b.name name,sum(a.charge_amount) number,sum(charge_fee) amountOfMoney,source='住院',classCode=c.name " +
+            "from zy_detail_charge a,yp_zd_dict b,yp_zd_drug_kind c " +
             "where " +
             "1=1 " +
             "<if test=\"startTime!=null and startTime!=''\">" +
             "and charge_date&gt;=#{startTime} and charge_date&lt;#{endTime} " +
             "</if>" +
-            "<if test=\"kssFlag!=null\">" +
+            "<if test=\"kssFlag!=null and kssFlag!=''\">" +
             "and b.kss_flag=#{kssFlag} " +
             "</if>" +
-            "<if test=\"categoriesFlag!=null\">" +
+            "<if test=\"categoriesFlag!=null and categoriesFlag!=''\">" +
             "and b.categories_flag=#{categoriesFlag} " +
             "</if>" +
             " and a.charge_code_mx=b.code and a.serial=b.serial " +
@@ -103,27 +108,27 @@ public interface QueryDrugsAndProjectsMapper {
             "<if test=\"drugCode!=null and drugCode!=''\">" +
             "and b.code=#{drugCode}  " +
             "</if>" +
-            "GROUP BY a.charge_code_mx,a.serial,b.name,c.name\n" +
-            "union all\n" +
+            "GROUP BY a.charge_code_mx,a.serial,b.name,c.name " +
+            "union all " +
             "select a.charge_item_code chargeCode," +
             "case a.serial when '01' then '药品(小)' when '99' then '药品(大)' end packageSpecification," +
-            "b.name name,sum(a.quantity*drug_win) number,sum(a.quantity*drug_win*unit_price) amountOfMoney,source='门诊',classCode=c.name\n" +
-            "from mz_charge_detail_b a,yp_zd_dict b,yp_zd_drug_kind c\n" +
+            "b.name name,sum(a.quantity*drug_win) number,sum(a.quantity*drug_win*unit_price) amountOfMoney,source='门诊',classCode=c.name " +
+            "from mz_charge_detail_b a,yp_zd_dict b,yp_zd_drug_kind c " +
             "where " +
             "1=1 " +
             "<if test=\"startTime!='' and startTime!=null\">" +
             "and a.charge_date&gt;=#{startTime} and a.charge_date&lt;#{endTime} " +
             "</if>" +
-            "<if test=\"kssFlag!=null\">" +
+            "<if test=\"kssFlag!=null and kssFlag!=''\">" +
             "and b.kss_flag=#{kssFlag}  " +
             "</if>" +
-            "<if test=\"categoriesFlag!=null\">" +
+            "<if test=\"categoriesFlag!=null and categoriesFlag!=''\">" +
             "and b.categories_flag=#{categoriesFlag} " +
             "</if>" +
-            "and a.charge_item_code=b.code\n" +
-            "and a.serial=b.serial\n" +
-            "and a.pay_mark='0'\n" +
-            "and b.drug_kind=c.code\n" +
+            "and a.charge_item_code=b.code " +
+            "and a.serial=b.serial " +
+            "and a.pay_mark='0' " +
+            "and b.drug_kind=c.code " +
             "<if test=\"drugCode!=null and drugCode!='' \">" +
             "and b.code=#{drugCode} " +
             "</if>" +

+ 6 - 1
src/main/java/thyyxxk/webserver/service/querydata/QueryDrugsAndProjectsService.java

@@ -65,8 +65,13 @@ public class QueryDrugsAndProjectsService {
         return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
     }
 
+    /**
+     * 查询药品
+     * @param param 查询条件 日期区间 是否为抗生素 药品大类 药品编码
+     * @return 返回符合的数据
+     * */
     public ResultVo<List<QueryDrugsAndProjects>> queryDrugs(QueryDrugsAndProjects param){
-
+        log.info("查询药品:{}",JSON.toJSONString(param));
         List<QueryDrugsAndProjects> list = dao.queryDrugs(param);
         if (list.size()>0){
             return ResultVoUtil.success(list);