|
@@ -57,9 +57,8 @@ public class PlanController {
|
|
|
@SaCheckPermission("szzs:planManage:list")
|
|
|
@PostMapping("/list")
|
|
|
public R planList(@RequestBody PlanBo bo){
|
|
|
- if (bo.getStartTime() != null && bo.getEndTime() != null)
|
|
|
- if (bo.getStartTime().compareTo(bo.getEndTime()) > 0)
|
|
|
- return R.fail("起始时间不能大于结束时间");
|
|
|
+ if (bo.getStartTime() != null && bo.getEndTime() != null && bo.getStartTime().compareTo(bo.getEndTime()) > 0)
|
|
|
+ return R.fail("起始时间不能大于结束时间");
|
|
|
return R.ok(planService.getPlanList(bo));
|
|
|
}
|
|
|
/**
|
|
@@ -135,9 +134,8 @@ public class PlanController {
|
|
|
@SaCheckPermission("szzs:planAudit:list")
|
|
|
@PostMapping("/audit/list")
|
|
|
public R auditList(@RequestBody PlanBo bo){
|
|
|
- if (bo.getStartTime() != null && bo.getEndTime() != null)
|
|
|
- if (bo.getStartTime().compareTo(bo.getEndTime()) > 0)
|
|
|
- return R.fail("起始时间不能大于结束时间");
|
|
|
+ if (bo.getStartTime() != null && bo.getEndTime() != null && bo.getStartTime().compareTo(bo.getEndTime()) > 0)
|
|
|
+ return R.fail("起始时间不能大于结束时间");
|
|
|
return R.ok(planService.getPlanManageList(bo));
|
|
|
}
|
|
|
/**
|
|
@@ -177,10 +175,8 @@ public class PlanController {
|
|
|
@SaIgnore
|
|
|
@PostMapping()
|
|
|
public R addPlan(@RequestBody @Validated(value = {AddGroup.class}) PlanAddBo bo){
|
|
|
- if (bo.getPlanStartTime() != null && bo.getPlanEndTime() != null) {
|
|
|
- if (bo.getPlanStartTime().compareTo(bo.getPlanEndTime()) > 0) {
|
|
|
- return R.fail("起始时间不能大于结束时间");
|
|
|
- }
|
|
|
+ if (bo.getPlanStartTime() != null && bo.getPlanEndTime() != null && bo.getPlanStartTime().compareTo(bo.getPlanEndTime()) > 0) {
|
|
|
+ return R.fail("起始时间不能大于结束时间");
|
|
|
}
|
|
|
return planService.addPlan(bo);
|
|
|
}
|
|
@@ -207,9 +203,8 @@ public class PlanController {
|
|
|
@SaIgnore
|
|
|
@PostMapping("/push/list")
|
|
|
public R pushList(@RequestBody PlanBo bo){
|
|
|
- if (bo.getStartTime() != null && bo.getEndTime() != null)
|
|
|
- if (bo.getStartTime().compareTo(bo.getEndTime()) > 0)
|
|
|
- return R.fail("起始时间不能大于结束时间");
|
|
|
+ if (bo.getStartTime() != null && bo.getEndTime() != null && bo.getStartTime().compareTo(bo.getEndTime()) > 0)
|
|
|
+ return R.fail("起始时间不能大于结束时间");
|
|
|
return R.ok(planService.getPlanPushList(bo));
|
|
|
}
|
|
|
/**
|