|
@@ -23,15 +23,24 @@ public interface MedicineManagementDao {
|
|
|
"from zy_drug a with(nolock),yp_zd_dict b with(nolock) ${ew.customSqlSegment}")
|
|
|
List<MedicinePage> selectMedicinePages(@Param(Constants.WRAPPER) QueryWrapper<?> queryWrapper);
|
|
|
|
|
|
- @Select("select b.code as chargeCode,rtrim(c.name) as patName,rtrim(c.inpatient_no) as patNo,sum(a.amount) as amount, " +
|
|
|
- "sum(a.charge_fee) as chargeFee,max(b.pack_retprice) as price,max(a.exec_unit) as execUnit,a.charge_date, " +
|
|
|
- "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 " +
|
|
|
- "from zy_drug a with(nolock),yp_zd_dict b with(nolock),zy_actpatient c with(nolock) " +
|
|
|
- "where charge_date>=#{start} and charge_date<=#{end} and a.group_no='73' and a.exec_unit in (${dept}) " +
|
|
|
- "and a.charge_code=b.code and a.inpatient_no=c.inpatient_no and isnull(a.serial,'01')=b.serial " +
|
|
|
- "group by b.code,b.serial,c.inpatient_no,c.name,a.charge_date having sum(a.amount)!=0")
|
|
|
- List<MedicinePage> selectUsedMedicines(FetchMedicines params);
|
|
|
+ @Select("<script>" +
|
|
|
+ "select b.code as chargeCode, rtrim(c.name) as patName, rtrim(c.inpatient_no) as patNo, sum(a.amount) as amount, " +
|
|
|
+ "sum(a.charge_fee) as chargeFee, max(b.pack_retprice) as price, max(a.exec_unit) as execUnit, a.charge_date, " +
|
|
|
+ "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 " +
|
|
|
+ "from zy_drug a with(nolock), yp_zd_dict b with(nolock), zy_actpatient c with(nolock) " +
|
|
|
+ "where charge_date >= #{start} and charge_date <= #{end} " +
|
|
|
+ "and a.group_no = '73' and a.exec_unit in (${dept}) " +
|
|
|
+ "and a.charge_code = b.code and a.inpatient_no = c.inpatient_no and isnull(a.serial, '01') = b.serial " +
|
|
|
+ "<if test=\"chargeCodes != null and chargeCodes != ''\">" +
|
|
|
+ "and b.code = #{chargeCodes} " +
|
|
|
+ "</if>" +
|
|
|
+ "group by b.code, b.serial, c.inpatient_no, c.name, a.charge_date having sum(a.amount) != 0 " +
|
|
|
+ "</script>")
|
|
|
+ List<MedicinePage> selectUsedMedicines(@Param("start") String start,
|
|
|
+ @Param("end") String end,
|
|
|
+ @Param("dept") String dept,
|
|
|
+ @Param("chargeCodes") String chargeCodes);
|
|
|
|
|
|
@Delete("delete yz_yp_page_no where page_no=#{pageNo}")
|
|
|
void deleteExistTargetPageNo(int pageNo);
|