wujian
2024-03-28 1e39c55183c1f54d1587bf3a86b4c2210bcd592e
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlan/controller/EmInspectionPlanController.java
@@ -2,6 +2,11 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.common.exception.job.TaskException;
import com.jcdm.quartz.domain.SysJob;
import com.jcdm.quartz.service.ISysJobService;
import org.quartz.SchedulerException;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -33,6 +38,9 @@
{
    @Autowired
    private IEmInspectionPlanService emInspectionPlanService;
    @Autowired
    private ISysJobService iSysJobService;
    /**
     * 查询点检保养计划列表
@@ -77,6 +85,16 @@
    @PostMapping
    public AjaxResult add(@RequestBody EmInspectionPlan emInspectionPlan)
    {
//        Long l = 4L;
//        SysJob sysJob = iSysJobService.selectJobById(l);
//        String invoke = "('"+emInspectionPlan.getPlanCode()+"')";
//        sysJob.setInvokeTarget("ryTask.inspectionPlanInfoHour"+invoke);
//        sysJob.setStatus("0");
//        try {
//            iSysJobService.updateJob(sysJob);
//        } catch (Exception e) {
//            throw new RuntimeException(e);
//        }
        return toAjax(emInspectionPlanService.insertEmInspectionPlan(emInspectionPlan));
    }