|
@@ -1,13 +1,12 @@
|
|
package com.management.platform.controller;
|
|
package com.management.platform.controller;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
-import com.management.platform.entity.Plan;
|
|
|
|
-import com.management.platform.entity.PlanProcedureTotal;
|
|
|
|
-import com.management.platform.entity.PlanSteelStampNumber;
|
|
|
|
-import com.management.platform.entity.ProdProcedureTeam;
|
|
|
|
|
|
+import com.management.platform.entity.*;
|
|
import com.management.platform.service.PlanService;
|
|
import com.management.platform.service.PlanService;
|
|
import com.management.platform.service.PlanSteelStampNumberService;
|
|
import com.management.platform.service.PlanSteelStampNumberService;
|
|
|
|
+import com.management.platform.service.ReportService;
|
|
import com.management.platform.util.HttpRespMsg;
|
|
import com.management.platform.util.HttpRespMsg;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.apache.ibatis.annotations.Param;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -38,6 +37,8 @@ public class PlanController {
|
|
private PlanService planService;
|
|
private PlanService planService;
|
|
@Resource
|
|
@Resource
|
|
private PlanSteelStampNumberService planSteelStampNumberService;
|
|
private PlanSteelStampNumberService planSteelStampNumberService;
|
|
|
|
+ @Resource
|
|
|
|
+ private ReportService reportService;
|
|
|
|
|
|
@RequestMapping("/list")
|
|
@RequestMapping("/list")
|
|
public HttpRespMsg list(String date,String steelStampNumber,@RequestParam(defaultValue = "3") Integer planType,Integer deptId,Integer pageIndex,Integer pageSize,Integer isMob){
|
|
public HttpRespMsg list(String date,String steelStampNumber,@RequestParam(defaultValue = "3") Integer planType,Integer deptId,Integer pageIndex,Integer pageSize,Integer isMob){
|
|
@@ -154,5 +155,19 @@ public class PlanController {
|
|
public HttpRespMsg allPlanList(HttpServletRequest request){
|
|
public HttpRespMsg allPlanList(HttpServletRequest request){
|
|
return planService.allPlanList(request);
|
|
return planService.allPlanList(request);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @RequestMapping("/deletePlan")
|
|
|
|
+ public HttpRespMsg deletePlan(Integer id){
|
|
|
|
+ HttpRespMsg msg=new HttpRespMsg();
|
|
|
|
+ Plan plan = planService.getById(id);
|
|
|
|
+ Report one = reportService.getOne(new LambdaQueryWrapper<Report>().eq(Report::getPlanId, id));
|
|
|
|
+ if(one==null){
|
|
|
|
+ plan.setIsDelete(1);
|
|
|
|
+ planService.updateById(plan);
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+ msg.setError("‘已有员工报工,删除失败");
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|