-
懒羊羊
2024-03-26 f17d8cf70b53d33a0b5ff49ba1cf4b4cf842c10a
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));
    }