|
@@ -142,7 +142,7 @@ public class RepairConsumablesController implements RepairConsumablesControllerA
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- public CommonResult queryRepairConsumablePageList(int currentPage, int pageCount, String keyWord, String startTime, String endTime) {
|
|
|
|
|
|
|
+ public CommonResult queryRepairConsumablePageList(int currentPage, int pageCount,String schoolId, String keyWord, String startTime, String endTime) {
|
|
|
|
|
|
|
|
if (startTime != null && endTime != null) {
|
|
if (startTime != null && endTime != null) {
|
|
|
try {
|
|
try {
|
|
@@ -152,7 +152,7 @@ public class RepairConsumablesController implements RepairConsumablesControllerA
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- PageUtils<ConsumablePageVo> result = repairConsumablesService.queryConsumablePageList(currentPage, pageCount, keyWord, startTime, endTime);
|
|
|
|
|
|
|
+ PageUtils<ConsumablePageVo> result = repairConsumablesService.queryConsumablePageList(currentPage, pageCount,schoolId, keyWord, startTime, endTime);
|
|
|
|
|
|
|
|
for (ConsumablePageVo data : result.getList()) {
|
|
for (ConsumablePageVo data : result.getList()) {
|
|
|
//校区名称
|
|
//校区名称
|
|
@@ -169,7 +169,14 @@ public class RepairConsumablesController implements RepairConsumablesControllerA
|
|
|
}
|
|
}
|
|
|
if (StringUtils.hasText(keyWord)) {
|
|
if (StringUtils.hasText(keyWord)) {
|
|
|
String str ="record_id in (select id from repair_record rr where rr.deleted = 0 and rr.record_no like '%" + keyWord + "%')";
|
|
String str ="record_id in (select id from repair_record rr where rr.deleted = 0 and rr.record_no like '%" + keyWord + "%')";
|
|
|
- ew.and(w -> w.like("consume_name", keyWord).or().apply(str));
|
|
|
|
|
|
|
+ if(StringUtils.hasText(schoolId)&&StringUtils.hasText(schoolId)){
|
|
|
|
|
+ str="record_id in (select id from repair_record rr where rr.deleted = 0 and rr.school_id = "+schoolId+" and rr.record_no like '%" + keyWord + "%')";
|
|
|
|
|
+ }
|
|
|
|
|
+ String finalStr = str;
|
|
|
|
|
+ ew.and(w -> w.like("consume_name", keyWord).or().apply(finalStr));
|
|
|
|
|
+ }else if(StringUtils.hasText(schoolId)&&StringUtils.hasText(schoolId)){
|
|
|
|
|
+ String str2="record_id in (select id from repair_record rr where rr.deleted = 0 and rr.school_id = "+schoolId+")";
|
|
|
|
|
+ ew.apply(str2);
|
|
|
}
|
|
}
|
|
|
ew.select("IFNULL(sum(number),0) tcont,IFNULL(sum(total_price),0) tprice");
|
|
ew.select("IFNULL(sum(number),0) tcont,IFNULL(sum(total_price),0) tprice");
|
|
|
Map<String,Object> map=repairConsumablesService.getMap(ew);
|
|
Map<String,Object> map=repairConsumablesService.getMap(ew);
|