|
@@ -159,11 +159,9 @@ public class PlanController {
|
|
@RequestMapping("/deletePlan")
|
|
@RequestMapping("/deletePlan")
|
|
public HttpRespMsg deletePlan(Integer id){
|
|
public HttpRespMsg deletePlan(Integer id){
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
HttpRespMsg msg=new HttpRespMsg();
|
|
- Plan plan = planService.getById(id);
|
|
|
|
- Report one = reportService.getOne(new LambdaQueryWrapper<Report>().eq(Report::getPlanId, id));
|
|
|
|
|
|
+ Report one = reportService.getOne(new LambdaQueryWrapper<Report>().eq(id!=null,Report::getPlanId, id));
|
|
if(one==null){
|
|
if(one==null){
|
|
- plan.setIsDelete(1);
|
|
|
|
- planService.updateById(plan);
|
|
|
|
|
|
+ planService.removeById(id);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
msg.setError("‘已有员工报工,删除失败");
|
|
msg.setError("‘已有员工报工,删除失败");
|