|
@@ -285,11 +285,13 @@ public class PlanServiceImpl implements PlanService {
|
|
|
QueryWrapper<Plan> planQueryWrapper = new QueryWrapper<>();
|
|
|
planQueryWrapper.eq("state",bo.getState());
|
|
|
if (bo.getText() != null)
|
|
|
- planQueryWrapper.like("plan_id",bo.getText())
|
|
|
- .or()
|
|
|
- .like("app_name",bo.getText())
|
|
|
- .or()
|
|
|
- .like("commercial_name",bo.getText());
|
|
|
+ planQueryWrapper.and(planQueryWrapper1 -> {
|
|
|
+ planQueryWrapper1.like("plan_id",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("app_name",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("commercial_name",bo.getText());
|
|
|
+ });
|
|
|
if (bo.getStartTime() != null)
|
|
|
planQueryWrapper.apply("plan_start_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
|
|
|
if (bo.getEndTime() != null)
|
|
@@ -336,13 +338,15 @@ public class PlanServiceImpl implements PlanService {
|
|
|
planQueryWrapper.eq("appkey",bo.getAppkey());
|
|
|
// planQueryWrapper.eq("commercial_id",bo.getCommercialId());
|
|
|
if (bo.getText() != null)
|
|
|
- planQueryWrapper.like("plan_id",bo.getText())
|
|
|
- .or()
|
|
|
- .like("plan_name",bo.getText())
|
|
|
- .or()
|
|
|
- .like("principal_name",bo.getText())
|
|
|
- .or()
|
|
|
- .like("principal_telephone",bo.getText());
|
|
|
+ planQueryWrapper.and(planQueryWrapper1 -> {
|
|
|
+ planQueryWrapper1.like("plan_id",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("plan_name",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("principal_name",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("principal_telephone",bo.getText());
|
|
|
+ });
|
|
|
if (bo.getStartTime() != null)
|
|
|
planQueryWrapper.apply("plan_start_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
|
|
|
if (bo.getEndTime() != null)
|
|
@@ -364,13 +368,15 @@ public class PlanServiceImpl implements PlanService {
|
|
|
PageHelper.startPage(bo.getPageNum(),bo.getPageSize(),true);
|
|
|
QueryWrapper<PlanPushStatistics> statisticsQueryWrapper = new QueryWrapper<>();
|
|
|
if (bo.getText() != null)
|
|
|
- statisticsQueryWrapper.like("plan_id",bo.getText())
|
|
|
- .or()
|
|
|
- .like("equipment_id",bo.getText())
|
|
|
- .or()
|
|
|
- .like("equipment_code",bo.getText())
|
|
|
- .or()
|
|
|
- .like("equipment_name",bo.getText());
|
|
|
+ statisticsQueryWrapper.and(planPushStatisticsQueryWrapper -> {
|
|
|
+ planPushStatisticsQueryWrapper.like("plan_id",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("equipment_id",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("equipment_code",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("equipment_name",bo.getText());
|
|
|
+ });
|
|
|
if (bo.getStartTime() != null)
|
|
|
statisticsQueryWrapper.apply("laster_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
|
|
|
if (bo.getEndTime() != null)
|
|
@@ -463,11 +469,13 @@ public class PlanServiceImpl implements PlanService {
|
|
|
PageHelper.startPage(bo.getPageNum(),bo.getPageSize(),true);
|
|
|
QueryWrapper<Equipment> equipmentQueryWrapper = new QueryWrapper<>();
|
|
|
if (bo.getText() != null)
|
|
|
- equipmentQueryWrapper.like("equipment_id",bo.getText())
|
|
|
- .or()
|
|
|
- .like("equipment_code",bo.getText())
|
|
|
- .or()
|
|
|
- .like("equipment_name",bo.getText());
|
|
|
+ equipmentQueryWrapper.and(equipmentQueryWrapper1 -> {
|
|
|
+ equipmentQueryWrapper1.like("equipment_id",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("equipment_code",bo.getText())
|
|
|
+ .or()
|
|
|
+ .like("equipment_name",bo.getText());
|
|
|
+ });
|
|
|
if (bo.getAddrCodes() != null){
|
|
|
for (String addrCode : bo.getAddrCodes()){
|
|
|
String province = String.valueOf(addrCode.charAt(0))+String.valueOf(addrCode.charAt(1));
|