|
@@ -163,6 +163,7 @@ public class PlanServiceImpl implements PlanService {
|
|
return -1;
|
|
return -1;
|
|
QueryWrapper<App> appQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<App> appQueryWrapper = new QueryWrapper<>();
|
|
appQueryWrapper.eq("appkey",plan.getAppkey());
|
|
appQueryWrapper.eq("appkey",plan.getAppkey());
|
|
|
|
+ appQueryWrapper.eq("deleted","0");
|
|
App app = appMapper.selectOne(appQueryWrapper);
|
|
App app = appMapper.selectOne(appQueryWrapper);
|
|
plan.setState(bo.getState());
|
|
plan.setState(bo.getState());
|
|
int i = planMapper.updateById(plan);
|
|
int i = planMapper.updateById(plan);
|
|
@@ -174,7 +175,9 @@ public class PlanServiceImpl implements PlanService {
|
|
if (insert == 1){
|
|
if (insert == 1){
|
|
CallBackBean callBackBean = new CallBackBean();
|
|
CallBackBean callBackBean = new CallBackBean();
|
|
callBackBean.setAuditPerson(userName);
|
|
callBackBean.setAuditPerson(userName);
|
|
- callBackBean.setAuditComment(bo.getAuditComment());
|
|
|
|
|
|
+ if (bo.getState() == 1)
|
|
|
|
+ callBackBean.setAuditComment("审核通过");
|
|
|
|
+ else callBackBean.setAuditComment("审核不通过");
|
|
callBackBean.setAuditTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
|
|
callBackBean.setAuditTime(LocalDateTime.now(ZoneId.of("Asia/Shanghai")));
|
|
SendCallBackUtil.sendCallBack(app.getCallBack(),callBackBean);
|
|
SendCallBackUtil.sendCallBack(app.getCallBack(),callBackBean);
|
|
}
|
|
}
|
|
@@ -185,11 +188,16 @@ public class PlanServiceImpl implements PlanService {
|
|
public PageInfo<List<PlanListVo>> getPlanList(PlanBo bo) {
|
|
public PageInfo<List<PlanListVo>> getPlanList(PlanBo bo) {
|
|
PageHelper.startPage(bo.getPageNum(), bo.getPageSize(),true);
|
|
PageHelper.startPage(bo.getPageNum(), bo.getPageSize(),true);
|
|
QueryWrapper<Plan> planQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<Plan> planQueryWrapper = new QueryWrapper<>();
|
|
- if (bo.getText() != null){
|
|
|
|
- planQueryWrapper.like("plan_id",bo.getText())
|
|
|
|
- .or()
|
|
|
|
- .like("goods_name",bo.getText());
|
|
|
|
- }
|
|
|
|
|
|
+ if (bo.getText() != null)
|
|
|
|
+ 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());
|
|
|
|
+ });
|
|
planQueryWrapper.eq("state", StateUtil.APPROVED);
|
|
planQueryWrapper.eq("state", StateUtil.APPROVED);
|
|
planQueryWrapper.eq("deleted","0");
|
|
planQueryWrapper.eq("deleted","0");
|
|
List<Plan> plans = planMapper.selectList(planQueryWrapper);
|
|
List<Plan> plans = planMapper.selectList(planQueryWrapper);
|
|
@@ -293,9 +301,17 @@ public class PlanServiceImpl implements PlanService {
|
|
.like("commercial_name",bo.getText());
|
|
.like("commercial_name",bo.getText());
|
|
});
|
|
});
|
|
if (bo.getStartTime() != null)
|
|
if (bo.getStartTime() != null)
|
|
- planQueryWrapper.apply("plan_start_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
|
|
|
|
|
|
+ planQueryWrapper.and(planQueryWrapper1 -> {
|
|
|
|
+ planQueryWrapper1.apply("plan_start_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime())
|
|
|
|
+ .or()
|
|
|
|
+ .apply("plan_create_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
|
|
|
|
+ });
|
|
if (bo.getEndTime() != null)
|
|
if (bo.getEndTime() != null)
|
|
- planQueryWrapper.apply("plan_end_time <= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getEndTime());
|
|
|
|
|
|
+ planQueryWrapper.and(planQueryWrapper1 -> {
|
|
|
|
+ planQueryWrapper1.apply("plan_end_time <= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getEndTime())
|
|
|
|
+ .or()
|
|
|
|
+ .like("plan_create_time <= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getEndTime());
|
|
|
|
+ });
|
|
planQueryWrapper.eq("deleted","0");
|
|
planQueryWrapper.eq("deleted","0");
|
|
List<Plan> plans = planMapper.selectList(planQueryWrapper);
|
|
List<Plan> plans = planMapper.selectList(planQueryWrapper);
|
|
List<PlanManageListVo> vos = new ArrayList<>();
|
|
List<PlanManageListVo> vos = new ArrayList<>();
|
|
@@ -351,9 +367,17 @@ public class PlanServiceImpl implements PlanService {
|
|
.like("principal_telephone",bo.getText());
|
|
.like("principal_telephone",bo.getText());
|
|
});
|
|
});
|
|
if (bo.getStartTime() != null)
|
|
if (bo.getStartTime() != null)
|
|
- planQueryWrapper.apply("plan_start_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
|
|
|
|
|
|
+ planQueryWrapper.and(planQueryWrapper1 -> {
|
|
|
|
+ planQueryWrapper1.apply("plan_start_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime())
|
|
|
|
+ .or()
|
|
|
|
+ .apply("plan_create_time >= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getStartTime());
|
|
|
|
+ });
|
|
if (bo.getEndTime() != null)
|
|
if (bo.getEndTime() != null)
|
|
- planQueryWrapper.apply("plan_end_time <= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getEndTime());
|
|
|
|
|
|
+ planQueryWrapper.and(planQueryWrapper1 -> {
|
|
|
|
+ planQueryWrapper1.apply("plan_end_time <= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getEndTime())
|
|
|
|
+ .or()
|
|
|
|
+ .like("plan_create_time <= STR_TO_DATE({0},'%Y-%m-%d %H:%i:%s')",bo.getEndTime());
|
|
|
|
+ });
|
|
planQueryWrapper.eq("deleted","0");
|
|
planQueryWrapper.eq("deleted","0");
|
|
List<Plan> plans = planMapper.selectList(planQueryWrapper);
|
|
List<Plan> plans = planMapper.selectList(planQueryWrapper);
|
|
List<PlanPushListVo> vos = new ArrayList<>();
|
|
List<PlanPushListVo> vos = new ArrayList<>();
|