懒羊羊
2024-03-23 5239031423deb80a31ac328838240adc51594804
点检任务
已重命名1个文件
已修改1个文件
已添加17个文件
2121 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/domain/EmInspectionPlanItemsProject.java 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/mapper/EmInspectionPlanItemsProjectMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/service/IEmInspectionPlanItemsProjectService.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/service/impl/EmInspectionPlanItemsProjectServiceImpl.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/controller/EmInspectionPlanTaskController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/domain/EmInspectionPlanTask.java 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/mapper/EmInspectionPlanTaskMapper.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/service/IEmInspectionPlanTaskService.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/service/impl/EmInspectionPlanTaskServiceImpl.java 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/controller/testClass.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/restful/service/RestfulService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/em/inspectionPlanItemsProject/EmInspectionPlanItemsProjectMapper.xml 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/em/inspectionPlanTask/EmInspectionPlanTaskMapper.xml 113 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/em/inspectionPlanItemsProject/inspectionPlanItemsProject.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/em/inspectionPlanTask/inspectionPlanTask.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/em/inspectionPlanItemsProject/index.vue 357 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/em/inspectionPlanTask/index.vue 392 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.em.inspectionPlanItemsProject.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jcdm.common.annotation.Log;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.main.em.inspectionPlanItemsProject.domain.EmInspectionPlanItemsProject;
import com.jcdm.main.em.inspectionPlanItemsProject.service.IEmInspectionPlanItemsProjectService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * ç‚¹æ£€ä»»åŠ¡-项目Controller
 *
 * @author Yi
 * @date 2024-03-23
 */
@RestController
@RequestMapping("/em/inspectionPlanItemsProject")
public class EmInspectionPlanItemsProjectController extends BaseController
{
    @Autowired
    private IEmInspectionPlanItemsProjectService emInspectionPlanItemsProjectService;
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目列表
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:list')")
    @GetMapping("/list")
    public TableDataInfo list(EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        startPage();
        List<EmInspectionPlanItemsProject> list = emInspectionPlanItemsProjectService.selectEmInspectionPlanItemsProjectList(emInspectionPlanItemsProject);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºç‚¹æ£€ä»»åŠ¡-项目列表
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:export')")
    @Log(title = "点检任务-项目", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        List<EmInspectionPlanItemsProject> list = emInspectionPlanItemsProjectService.selectEmInspectionPlanItemsProjectList(emInspectionPlanItemsProject);
        ExcelUtil<EmInspectionPlanItemsProject> util = new ExcelUtil<EmInspectionPlanItemsProject>(EmInspectionPlanItemsProject.class);
        util.exportExcel(response, list, "点检任务-项目数据");
    }
    /**
     * èŽ·å–点检任务-项目详细信息
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(emInspectionPlanItemsProjectService.selectEmInspectionPlanItemsProjectById(id));
    }
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡-项目
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:add')")
    @Log(title = "点检任务-项目", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        return toAjax(emInspectionPlanItemsProjectService.insertEmInspectionPlanItemsProject(emInspectionPlanItemsProject));
    }
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡-项目
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:edit')")
    @Log(title = "点检任务-项目", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        return toAjax(emInspectionPlanItemsProjectService.updateEmInspectionPlanItemsProject(emInspectionPlanItemsProject));
    }
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanItemsProject:remove')")
    @Log(title = "点检任务-项目", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(emInspectionPlanItemsProjectService.deleteEmInspectionPlanItemsProjectByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/domain/EmInspectionPlanItemsProject.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,165 @@
package com.jcdm.main.em.inspectionPlanItemsProject.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.BaseEntity;
/**
 * ç‚¹æ£€ä»»åŠ¡-项目对象 em_inspection_plan_items_project
 *
 * @author Yi
 * @date 2024-03-23
 */
public class EmInspectionPlanItemsProject extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ID */
    private Long id;
    /** é¡¹ç›®ç¼–号 */
    @Excel(name = "项目编号")
    private String itemsCode;
    /** é¡¹ç›®åç§° */
    @Excel(name = "项目名称")
    private String itemsName;
    /** é¡¹ç›®ç±»åž‹ */
    @Excel(name = "项目类型")
    private String itemsType;
    /** æ ‡å‡† */
    @Excel(name = "标准")
    private String standard;
    /** é¡¹ç›®å†…容 */
    @Excel(name = "项目内容")
    private String itemsContent;
    /** åˆ›å»ºäºº */
    @Excel(name = "创建人")
    private String createUser;
    /** æ›´æ–°äºº */
    @Excel(name = "更新人")
    private String updateUser;
    /** ç»“æžœ */
    @Excel(name = "结果")
    private String results;
    /** ä»»åŠ¡ID */
    private String planTaskId;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setItemsCode(String itemsCode)
    {
        this.itemsCode = itemsCode;
    }
    public String getItemsCode()
    {
        return itemsCode;
    }
    public void setItemsName(String itemsName)
    {
        this.itemsName = itemsName;
    }
    public String getItemsName()
    {
        return itemsName;
    }
    public void setItemsType(String itemsType)
    {
        this.itemsType = itemsType;
    }
    public String getItemsType()
    {
        return itemsType;
    }
    public void setStandard(String standard)
    {
        this.standard = standard;
    }
    public String getStandard()
    {
        return standard;
    }
    public void setItemsContent(String itemsContent)
    {
        this.itemsContent = itemsContent;
    }
    public String getItemsContent()
    {
        return itemsContent;
    }
    public void setCreateUser(String createUser)
    {
        this.createUser = createUser;
    }
    public String getCreateUser()
    {
        return createUser;
    }
    public void setUpdateUser(String updateUser)
    {
        this.updateUser = updateUser;
    }
    public String getUpdateUser()
    {
        return updateUser;
    }
    public void setResults(String results)
    {
        this.results = results;
    }
    public String getResults()
    {
        return results;
    }
    public void setPlanTaskId(String planTaskId)
    {
        this.planTaskId = planTaskId;
    }
    public String getPlanTaskId()
    {
        return planTaskId;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("itemsCode", getItemsCode())
            .append("itemsName", getItemsName())
            .append("itemsType", getItemsType())
            .append("standard", getStandard())
            .append("itemsContent", getItemsContent())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("results", getResults())
            .append("planTaskId", getPlanTaskId())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/mapper/EmInspectionPlanItemsProjectMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.jcdm.main.em.inspectionPlanItemsProject.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jcdm.main.em.inspectionPlanItemsProject.domain.EmInspectionPlanItemsProject;
/**
 * ç‚¹æ£€ä»»åŠ¡-项目Mapper接口
 *
 * @author Yi
 * @date 2024-03-23
 */
public interface EmInspectionPlanItemsProjectMapper extends BaseMapper<EmInspectionPlanItemsProject>
{
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param id ç‚¹æ£€ä»»åŠ¡-项目主键
     * @return ç‚¹æ£€ä»»åŠ¡-项目
     */
    public EmInspectionPlanItemsProject selectEmInspectionPlanItemsProjectById(Long id);
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目列表
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç‚¹æ£€ä»»åŠ¡-项目集合
     */
    public List<EmInspectionPlanItemsProject> selectEmInspectionPlanItemsProjectList(EmInspectionPlanItemsProject emInspectionPlanItemsProject);
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç»“æžœ
     */
    public int insertEmInspectionPlanItemsProject(EmInspectionPlanItemsProject emInspectionPlanItemsProject);
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç»“æžœ
     */
    public int updateEmInspectionPlanItemsProject(EmInspectionPlanItemsProject emInspectionPlanItemsProject);
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param id ç‚¹æ£€ä»»åŠ¡-项目主键
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanItemsProjectById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanItemsProjectByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/service/IEmInspectionPlanItemsProjectService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.jcdm.main.em.inspectionPlanItemsProject.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jcdm.main.em.inspectionPlanItemsProject.domain.EmInspectionPlanItemsProject;
/**
 * ç‚¹æ£€ä»»åŠ¡-项目Service接口
 *
 * @author Yi
 * @date 2024-03-23
 */
public interface IEmInspectionPlanItemsProjectService extends IService<EmInspectionPlanItemsProject>
{
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param id ç‚¹æ£€ä»»åŠ¡-项目主键
     * @return ç‚¹æ£€ä»»åŠ¡-项目
     */
    public EmInspectionPlanItemsProject selectEmInspectionPlanItemsProjectById(Long id);
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目列表
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç‚¹æ£€ä»»åŠ¡-项目集合
     */
    public List<EmInspectionPlanItemsProject> selectEmInspectionPlanItemsProjectList(EmInspectionPlanItemsProject emInspectionPlanItemsProject);
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç»“æžœ
     */
    public int insertEmInspectionPlanItemsProject(EmInspectionPlanItemsProject emInspectionPlanItemsProject);
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç»“æžœ
     */
    public int updateEmInspectionPlanItemsProject(EmInspectionPlanItemsProject emInspectionPlanItemsProject);
    /**
     * æ‰¹é‡åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param ids éœ€è¦åˆ é™¤çš„点检任务-项目主键集合
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanItemsProjectByIds(Long[] ids);
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目信息
     *
     * @param id ç‚¹æ£€ä»»åŠ¡-项目主键
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanItemsProjectById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/service/impl/EmInspectionPlanItemsProjectServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
package com.jcdm.main.em.inspectionPlanItemsProject.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.em.inspectionPlanItemsProject.mapper.EmInspectionPlanItemsProjectMapper;
import com.jcdm.main.em.inspectionPlanItemsProject.domain.EmInspectionPlanItemsProject;
import com.jcdm.main.em.inspectionPlanItemsProject.service.IEmInspectionPlanItemsProjectService;
/**
 * ç‚¹æ£€ä»»åŠ¡-项目Service业务层处理
 *
 * @author Yi
 * @date 2024-03-23
 */
@Service
public class EmInspectionPlanItemsProjectServiceImpl extends ServiceImpl<EmInspectionPlanItemsProjectMapper,EmInspectionPlanItemsProject> implements IEmInspectionPlanItemsProjectService
{
    @Autowired
    private EmInspectionPlanItemsProjectMapper emInspectionPlanItemsProjectMapper;
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param id ç‚¹æ£€ä»»åŠ¡-项目主键
     * @return ç‚¹æ£€ä»»åŠ¡-项目
     */
    @Override
    public EmInspectionPlanItemsProject selectEmInspectionPlanItemsProjectById(Long id)
    {
        return emInspectionPlanItemsProjectMapper.selectEmInspectionPlanItemsProjectById(id);
    }
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目列表
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç‚¹æ£€ä»»åŠ¡-项目
     */
    @Override
    public List<EmInspectionPlanItemsProject> selectEmInspectionPlanItemsProjectList(EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        return emInspectionPlanItemsProjectMapper.selectEmInspectionPlanItemsProjectList(emInspectionPlanItemsProject);
    }
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç»“æžœ
     */
    @Override
    public int insertEmInspectionPlanItemsProject(EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        emInspectionPlanItemsProject.setCreateTime(DateUtils.getNowDate());
        return emInspectionPlanItemsProjectMapper.insertEmInspectionPlanItemsProject(emInspectionPlanItemsProject);
    }
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param emInspectionPlanItemsProject ç‚¹æ£€ä»»åŠ¡-项目
     * @return ç»“æžœ
     */
    @Override
    public int updateEmInspectionPlanItemsProject(EmInspectionPlanItemsProject emInspectionPlanItemsProject)
    {
        emInspectionPlanItemsProject.setUpdateTime(DateUtils.getNowDate());
        return emInspectionPlanItemsProjectMapper.updateEmInspectionPlanItemsProject(emInspectionPlanItemsProject);
    }
    /**
     * æ‰¹é‡åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目
     *
     * @param ids éœ€è¦åˆ é™¤çš„点检任务-项目主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteEmInspectionPlanItemsProjectByIds(Long[] ids)
    {
        return emInspectionPlanItemsProjectMapper.deleteEmInspectionPlanItemsProjectByIds(ids);
    }
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目信息
     *
     * @param id ç‚¹æ£€ä»»åŠ¡-项目主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteEmInspectionPlanItemsProjectById(Long id)
    {
        return emInspectionPlanItemsProjectMapper.deleteEmInspectionPlanItemsProjectById(id);
    }
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/controller/EmInspectionPlanTaskController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.em.inspectionPlanTask.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.jcdm.common.annotation.Log;
import com.jcdm.common.core.controller.BaseController;
import com.jcdm.common.core.domain.AjaxResult;
import com.jcdm.common.enums.BusinessType;
import com.jcdm.main.em.inspectionPlanTask.domain.EmInspectionPlanTask;
import com.jcdm.main.em.inspectionPlanTask.service.IEmInspectionPlanTaskService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * ç‚¹æ£€ä»»åŠ¡Controller
 *
 * @author Yi
 * @date 2024-03-23
 */
@RestController
@RequestMapping("/em/inspectionPlanTask")
public class EmInspectionPlanTaskController extends BaseController
{
    @Autowired
    private IEmInspectionPlanTaskService emInspectionPlanTaskService;
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanTask:list')")
    @GetMapping("/list")
    public TableDataInfo list(EmInspectionPlanTask emInspectionPlanTask)
    {
        startPage();
        List<EmInspectionPlanTask> list = emInspectionPlanTaskService.selectEmInspectionPlanTaskList(emInspectionPlanTask);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºç‚¹æ£€ä»»åŠ¡åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanTask:export')")
    @Log(title = "点检任务", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, EmInspectionPlanTask emInspectionPlanTask)
    {
        List<EmInspectionPlanTask> list = emInspectionPlanTaskService.selectEmInspectionPlanTaskList(emInspectionPlanTask);
        ExcelUtil<EmInspectionPlanTask> util = new ExcelUtil<EmInspectionPlanTask>(EmInspectionPlanTask.class);
        util.exportExcel(response, list, "点检任务数据");
    }
    /**
     * èŽ·å–点检任务详细信息
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanTask:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(emInspectionPlanTaskService.selectEmInspectionPlanTaskById(id));
    }
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanTask:add')")
    @Log(title = "点检任务", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody EmInspectionPlanTask emInspectionPlanTask)
    {
        return toAjax(emInspectionPlanTaskService.insertEmInspectionPlanTask(emInspectionPlanTask));
    }
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanTask:edit')")
    @Log(title = "点检任务", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody EmInspectionPlanTask emInspectionPlanTask)
    {
        return toAjax(emInspectionPlanTaskService.updateEmInspectionPlanTask(emInspectionPlanTask));
    }
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡
     */
    @PreAuthorize("@ss.hasPermi('em:inspectionPlanTask:remove')")
    @Log(title = "点检任务", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(emInspectionPlanTaskService.deleteEmInspectionPlanTaskByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/domain/EmInspectionPlanTask.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,208 @@
package com.jcdm.main.em.inspectionPlanTask.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.jcdm.common.annotation.Excel;
import com.jcdm.common.core.domain.BaseEntity;
/**
 * ç‚¹æ£€ä»»åŠ¡å¯¹è±¡ em_inspection_plan_task
 *
 * @author Yi
 * @date 2024-03-23
 */
public class EmInspectionPlanTask extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ID */
    private Long id;
    /** è®¡åˆ’编号 */
    @Excel(name = "计划编号")
    private String planCode;
    /** è®¡åˆ’名称 */
    @Excel(name = "计划名称")
    private String planName;
    /** è®¡åˆ’类型 */
    @Excel(name = "计划类型")
    private String planType;
    /** çŠ¶æ€ */
    @Excel(name = "状态")
    private String state;
    /** è®¾å¤‡ç¼–码 */
    @Excel(name = "设备编码")
    private String devicesCode;
    /** è®¾å¤‡åç§° */
    @Excel(name = "设备名称")
    private String devicesName;
    /** å“ç‰Œ */
    @Excel(name = "品牌")
    private String brand;
    /** è§„æ ¼ */
    @Excel(name = "规格")
    private String specs;
    /** ç»“æžœ */
    @Excel(name = "结果")
    private String results;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    /** åˆ›å»ºäºº */
    @Excel(name = "创建人")
    private String createUser;
    /** ä¿®æ”¹äºº */
    @Excel(name = "修改人")
    private String updateUser;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setPlanCode(String planCode)
    {
        this.planCode = planCode;
    }
    public String getPlanCode()
    {
        return planCode;
    }
    public void setPlanName(String planName)
    {
        this.planName = planName;
    }
    public String getPlanName()
    {
        return planName;
    }
    public void setPlanType(String planType)
    {
        this.planType = planType;
    }
    public String getPlanType()
    {
        return planType;
    }
    public void setState(String state)
    {
        this.state = state;
    }
    public String getState()
    {
        return state;
    }
    public void setDevicesCode(String devicesCode)
    {
        this.devicesCode = devicesCode;
    }
    public String getDevicesCode()
    {
        return devicesCode;
    }
    public void setDevicesName(String devicesName)
    {
        this.devicesName = devicesName;
    }
    public String getDevicesName()
    {
        return devicesName;
    }
    public void setBrand(String brand)
    {
        this.brand = brand;
    }
    public String getBrand()
    {
        return brand;
    }
    public void setSpecs(String specs)
    {
        this.specs = specs;
    }
    public String getSpecs()
    {
        return specs;
    }
    public void setResults(String results)
    {
        this.results = results;
    }
    public String getResults()
    {
        return results;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }
    public String getRemarks()
    {
        return remarks;
    }
    public void setCreateUser(String createUser)
    {
        this.createUser = createUser;
    }
    public String getCreateUser()
    {
        return createUser;
    }
    public void setUpdateUser(String updateUser)
    {
        this.updateUser = updateUser;
    }
    public String getUpdateUser()
    {
        return updateUser;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("planCode", getPlanCode())
            .append("planName", getPlanName())
            .append("planType", getPlanType())
            .append("state", getState())
            .append("devicesCode", getDevicesCode())
            .append("devicesName", getDevicesName())
            .append("brand", getBrand())
            .append("specs", getSpecs())
            .append("results", getResults())
            .append("remarks", getRemarks())
            .append("createTime", getCreateTime())
            .append("createUser", getCreateUser())
            .append("updateTime", getUpdateTime())
            .append("updateUser", getUpdateUser())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/mapper/EmInspectionPlanTaskMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.jcdm.main.em.inspectionPlanTask.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jcdm.main.em.inspectionPlanTask.domain.EmInspectionPlanTask;
/**
 * ç‚¹æ£€ä»»åŠ¡Mapper接口
 *
 * @author Yi
 * @date 2024-03-23
 */
public interface EmInspectionPlanTaskMapper extends BaseMapper<EmInspectionPlanTask>
{
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡
     *
     * @param id ç‚¹æ£€ä»»åŠ¡ä¸»é”®
     * @return ç‚¹æ£€ä»»åŠ¡
     */
    public EmInspectionPlanTask selectEmInspectionPlanTaskById(Long id);
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡åˆ—表
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç‚¹æ£€ä»»åŠ¡é›†åˆ
     */
    public List<EmInspectionPlanTask> selectEmInspectionPlanTaskList(EmInspectionPlanTask emInspectionPlanTask);
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int insertEmInspectionPlanTask(EmInspectionPlanTask emInspectionPlanTask);
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int updateEmInspectionPlanTask(EmInspectionPlanTask emInspectionPlanTask);
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡
     *
     * @param id ç‚¹æ£€ä»»åŠ¡ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanTaskById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤ç‚¹æ£€ä»»åŠ¡
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanTaskByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/service/IEmInspectionPlanTaskService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,63 @@
package com.jcdm.main.em.inspectionPlanTask.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jcdm.main.em.inspectionPlanTask.domain.EmInspectionPlanTask;
/**
 * ç‚¹æ£€ä»»åŠ¡Service接口
 *
 * @author Yi
 * @date 2024-03-23
 */
public interface IEmInspectionPlanTaskService extends IService<EmInspectionPlanTask>
{
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡
     *
     * @param id ç‚¹æ£€ä»»åŠ¡ä¸»é”®
     * @return ç‚¹æ£€ä»»åŠ¡
     */
    public EmInspectionPlanTask selectEmInspectionPlanTaskById(Long id);
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡åˆ—表
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç‚¹æ£€ä»»åŠ¡é›†åˆ
     */
    public List<EmInspectionPlanTask> selectEmInspectionPlanTaskList(EmInspectionPlanTask emInspectionPlanTask);
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int insertEmInspectionPlanTask(EmInspectionPlanTask emInspectionPlanTask);
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç»“æžœ
     */
    public int updateEmInspectionPlanTask(EmInspectionPlanTask emInspectionPlanTask);
    /**
     * æ‰¹é‡åˆ é™¤ç‚¹æ£€ä»»åŠ¡
     *
     * @param ids éœ€è¦åˆ é™¤çš„点检任务主键集合
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanTaskByIds(Long[] ids);
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡ä¿¡æ¯
     *
     * @param id ç‚¹æ£€ä»»åŠ¡ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteEmInspectionPlanTaskById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanTask/service/impl/EmInspectionPlanTaskServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
package com.jcdm.main.em.inspectionPlanTask.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.em.inspectionPlanTask.mapper.EmInspectionPlanTaskMapper;
import com.jcdm.main.em.inspectionPlanTask.domain.EmInspectionPlanTask;
import com.jcdm.main.em.inspectionPlanTask.service.IEmInspectionPlanTaskService;
/**
 * ç‚¹æ£€ä»»åŠ¡Service业务层处理
 *
 * @author Yi
 * @date 2024-03-23
 */
@Service
public class EmInspectionPlanTaskServiceImpl extends ServiceImpl<EmInspectionPlanTaskMapper,EmInspectionPlanTask> implements IEmInspectionPlanTaskService
{
    @Autowired
    private EmInspectionPlanTaskMapper emInspectionPlanTaskMapper;
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡
     *
     * @param id ç‚¹æ£€ä»»åŠ¡ä¸»é”®
     * @return ç‚¹æ£€ä»»åŠ¡
     */
    @Override
    public EmInspectionPlanTask selectEmInspectionPlanTaskById(Long id)
    {
        return emInspectionPlanTaskMapper.selectEmInspectionPlanTaskById(id);
    }
    /**
     * æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡åˆ—表
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç‚¹æ£€ä»»åŠ¡
     */
    @Override
    public List<EmInspectionPlanTask> selectEmInspectionPlanTaskList(EmInspectionPlanTask emInspectionPlanTask)
    {
        return emInspectionPlanTaskMapper.selectEmInspectionPlanTaskList(emInspectionPlanTask);
    }
    /**
     * æ–°å¢žç‚¹æ£€ä»»åŠ¡
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç»“æžœ
     */
    @Override
    public int insertEmInspectionPlanTask(EmInspectionPlanTask emInspectionPlanTask)
    {
        emInspectionPlanTask.setCreateTime(DateUtils.getNowDate());
        return emInspectionPlanTaskMapper.insertEmInspectionPlanTask(emInspectionPlanTask);
    }
    /**
     * ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡
     *
     * @param emInspectionPlanTask ç‚¹æ£€ä»»åŠ¡
     * @return ç»“æžœ
     */
    @Override
    public int updateEmInspectionPlanTask(EmInspectionPlanTask emInspectionPlanTask)
    {
        emInspectionPlanTask.setUpdateTime(DateUtils.getNowDate());
        return emInspectionPlanTaskMapper.updateEmInspectionPlanTask(emInspectionPlanTask);
    }
    /**
     * æ‰¹é‡åˆ é™¤ç‚¹æ£€ä»»åŠ¡
     *
     * @param ids éœ€è¦åˆ é™¤çš„点检任务主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteEmInspectionPlanTaskByIds(Long[] ids)
    {
        return emInspectionPlanTaskMapper.deleteEmInspectionPlanTaskByIds(ids);
    }
    /**
     * åˆ é™¤ç‚¹æ£€ä»»åŠ¡ä¿¡æ¯
     *
     * @param id ç‚¹æ£€ä»»åŠ¡ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteEmInspectionPlanTaskById(Long id)
    {
        return emInspectionPlanTaskMapper.deleteEmInspectionPlanTaskById(id);
    }
}
jcdm-main/src/main/java/com/jcdm/main/restful/controller/testClass.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.jcdm.main.restful.controller;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
public class testClass {
    public static void main(String[] args) {
        // åˆ›å»ºTimer实例
        Timer timer = new Timer();
        // åˆ›å»ºTimerTask实例
        TimerTask task = new TimerTask() {
            @Override
            public void run() {
                // åœ¨è¿™é‡Œç¼–写定时任务的具体逻辑
                System.out.println("定时任务触发,当前时间:" + new Date());
            }
        };
        // è®¾ç½®å®šæ—¶ä»»åŠ¡çš„触发时间为每天的9:25
        // èŽ·å–当前时间
        Date currentTime = new Date();
        // è®¾ç½®å®šæ—¶ä»»åŠ¡çš„触发时间为当天的9:25
        Date scheduleTime = new Date(currentTime.getYear(), currentTime.getMonth(), currentTime.getDate(), 9, 27, 0);
        // å¯åŠ¨å®šæ—¶ä»»åŠ¡
        timer.schedule(task, scheduleTime);
    }
}
jcdm-main/src/main/java/com/jcdm/main/restful/service/RestfulService.java
ÎļþÃû´Ó jcdm-main/src/main/java/com/jcdm/main/restful/service/restfulService.java ÐÞ¸Ä
@@ -5,7 +5,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
public class restfulService {
public class RestfulService {
    public static final String getRealmName = "https://imes-test-group.geelycv-test.com/api/mom-open/restful/aMesSysIntegration";
    public static final String postRealmName = "https://imes-uat-group.geelycv-test.com/api/mom-open/restful/interface";
jcdm-main/src/main/resources/mapper/em/inspectionPlanItemsProject/EmInspectionPlanItemsProjectMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jcdm.main.em.inspectionPlanItemsProject.mapper.EmInspectionPlanItemsProjectMapper">
    <resultMap type="EmInspectionPlanItemsProject" id="EmInspectionPlanItemsProjectResult">
        <result property="id"    column="id"    />
        <result property="itemsCode"    column="items_code"    />
        <result property="itemsName"    column="items_name"    />
        <result property="itemsType"    column="items_type"    />
        <result property="standard"    column="standard"    />
        <result property="itemsContent"    column="items_content"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="results"    column="results"    />
        <result property="planTaskId"    column="plan_task_id"    />
    </resultMap>
    <sql id="selectEmInspectionPlanItemsProjectVo">
        select id, items_code, items_name, items_type, standard, items_content, create_user, create_time, update_user, update_time, results, plan_task_id from em_inspection_plan_items_project
    </sql>
    <select id="selectEmInspectionPlanItemsProjectList" parameterType="EmInspectionPlanItemsProject" resultMap="EmInspectionPlanItemsProjectResult">
        <include refid="selectEmInspectionPlanItemsProjectVo"/>
        <where>
            <if test="itemsCode != null  and itemsCode != ''"> and items_code = #{itemsCode}</if>
            <if test="itemsName != null  and itemsName != ''"> and items_name like concat('%', #{itemsName}, '%')</if>
            <if test="itemsType != null  and itemsType != ''"> and items_type = #{itemsType}</if>
            <if test="standard != null  and standard != ''"> and standard = #{standard}</if>
            <if test="results != null  and results != ''"> and results = #{results}</if>
        </where>
    </select>
    <select id="selectEmInspectionPlanItemsProjectById" parameterType="Long" resultMap="EmInspectionPlanItemsProjectResult">
        <include refid="selectEmInspectionPlanItemsProjectVo"/>
        where id = #{id}
    </select>
    <insert id="insertEmInspectionPlanItemsProject" parameterType="EmInspectionPlanItemsProject" useGeneratedKeys="true" keyProperty="id">
        insert into em_inspection_plan_items_project
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="itemsCode != null">items_code,</if>
            <if test="itemsName != null">items_name,</if>
            <if test="itemsType != null">items_type,</if>
            <if test="standard != null">standard,</if>
            <if test="itemsContent != null">items_content,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="results != null">results,</if>
            <if test="planTaskId != null">plan_task_id,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="itemsCode != null">#{itemsCode},</if>
            <if test="itemsName != null">#{itemsName},</if>
            <if test="itemsType != null">#{itemsType},</if>
            <if test="standard != null">#{standard},</if>
            <if test="itemsContent != null">#{itemsContent},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="results != null">#{results},</if>
            <if test="planTaskId != null">#{planTaskId},</if>
         </trim>
    </insert>
    <update id="updateEmInspectionPlanItemsProject" parameterType="EmInspectionPlanItemsProject">
        update em_inspection_plan_items_project
        <trim prefix="SET" suffixOverrides=",">
            <if test="itemsCode != null">items_code = #{itemsCode},</if>
            <if test="itemsName != null">items_name = #{itemsName},</if>
            <if test="itemsType != null">items_type = #{itemsType},</if>
            <if test="standard != null">standard = #{standard},</if>
            <if test="itemsContent != null">items_content = #{itemsContent},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="results != null">results = #{results},</if>
            <if test="planTaskId != null">plan_task_id = #{planTaskId},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteEmInspectionPlanItemsProjectById" parameterType="Long">
        delete from em_inspection_plan_items_project where id = #{id}
    </delete>
    <delete id="deleteEmInspectionPlanItemsProjectByIds" parameterType="String">
        delete from em_inspection_plan_items_project where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-main/src/main/resources/mapper/em/inspectionPlanTask/EmInspectionPlanTaskMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jcdm.main.em.inspectionPlanTask.mapper.EmInspectionPlanTaskMapper">
    <resultMap type="EmInspectionPlanTask" id="EmInspectionPlanTaskResult">
        <result property="id"    column="id"    />
        <result property="planCode"    column="plan_code"    />
        <result property="planName"    column="plan_name"    />
        <result property="planType"    column="plan_type"    />
        <result property="state"    column="state"    />
        <result property="devicesCode"    column="devices_code"    />
        <result property="devicesName"    column="devices_name"    />
        <result property="brand"    column="brand"    />
        <result property="specs"    column="specs"    />
        <result property="results"    column="results"    />
        <result property="remarks"    column="remarks"    />
        <result property="createTime"    column="create_time"    />
        <result property="createUser"    column="create_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateUser"    column="update_user"    />
    </resultMap>
    <sql id="selectEmInspectionPlanTaskVo">
        select id, plan_code, plan_name, plan_type, state, devices_code, devices_name, brand, specs, results, remarks, create_time, create_user, update_time, update_user from em_inspection_plan_task
    </sql>
    <select id="selectEmInspectionPlanTaskList" parameterType="EmInspectionPlanTask" resultMap="EmInspectionPlanTaskResult">
        <include refid="selectEmInspectionPlanTaskVo"/>
        <where>
            <if test="planCode != null  and planCode != ''"> and plan_code = #{planCode}</if>
            <if test="planName != null  and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
            <if test="planType != null  and planType != ''"> and plan_type = #{planType}</if>
            <if test="state != null  and state != ''"> and state = #{state}</if>
            <if test="devicesCode != null  and devicesCode != ''"> and devices_code = #{devicesCode}</if>
            <if test="devicesName != null  and devicesName != ''"> and devices_name like concat('%', #{devicesName}, '%')</if>
        </where>
    </select>
    <select id="selectEmInspectionPlanTaskById" parameterType="Long" resultMap="EmInspectionPlanTaskResult">
        <include refid="selectEmInspectionPlanTaskVo"/>
        where id = #{id}
    </select>
    <insert id="insertEmInspectionPlanTask" parameterType="EmInspectionPlanTask" useGeneratedKeys="true" keyProperty="id">
        insert into em_inspection_plan_task
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="planCode != null">plan_code,</if>
            <if test="planName != null">plan_name,</if>
            <if test="planType != null">plan_type,</if>
            <if test="state != null">state,</if>
            <if test="devicesCode != null">devices_code,</if>
            <if test="devicesName != null">devices_name,</if>
            <if test="brand != null">brand,</if>
            <if test="specs != null">specs,</if>
            <if test="results != null">results,</if>
            <if test="remarks != null">remarks,</if>
            <if test="createTime != null">create_time,</if>
            <if test="createUser != null">create_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="updateUser != null">update_user,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="planCode != null">#{planCode},</if>
            <if test="planName != null">#{planName},</if>
            <if test="planType != null">#{planType},</if>
            <if test="state != null">#{state},</if>
            <if test="devicesCode != null">#{devicesCode},</if>
            <if test="devicesName != null">#{devicesName},</if>
            <if test="brand != null">#{brand},</if>
            <if test="specs != null">#{specs},</if>
            <if test="results != null">#{results},</if>
            <if test="remarks != null">#{remarks},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
         </trim>
    </insert>
    <update id="updateEmInspectionPlanTask" parameterType="EmInspectionPlanTask">
        update em_inspection_plan_task
        <trim prefix="SET" suffixOverrides=",">
            <if test="planCode != null">plan_code = #{planCode},</if>
            <if test="planName != null">plan_name = #{planName},</if>
            <if test="planType != null">plan_type = #{planType},</if>
            <if test="state != null">state = #{state},</if>
            <if test="devicesCode != null">devices_code = #{devicesCode},</if>
            <if test="devicesName != null">devices_name = #{devicesName},</if>
            <if test="brand != null">brand = #{brand},</if>
            <if test="specs != null">specs = #{specs},</if>
            <if test="results != null">results = #{results},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteEmInspectionPlanTaskById" parameterType="Long">
        delete from em_inspection_plan_task where id = #{id}
    </delete>
    <delete id="deleteEmInspectionPlanTaskByIds" parameterType="String">
        delete from em_inspection_plan_task where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-main/src/main/resources/mapper/om/productionOrde/OmProductionOrdeInfoMapper.xml
@@ -39,10 +39,10 @@
        <result property="marketAreaCode"    column="market_area_code"    />
        <result property="softwareVersionCode"    column="software_version_code"    />
        <result property="productCompanyCode"    column="product_company_code"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="spareField3"    column="spare_field_3"    />
        <result property="spareField4"    column="spare_field_4"    />
        <result property="spareField1"    column="spare_field1"    />
        <result property="spareField2"    column="spare_field2"    />
        <result property="spareField3"    column="spare_field3"    />
        <result property="spareField4"    column="spare_field4"    />
        <result property="siteCode"    column="site_code"    />
        <result property="productNum"    column="product_num"    />
        <result property="stationCode"    column="station_code"    />
@@ -54,7 +54,7 @@
    </resultMap>
    <sql id="selectOmProductionOrdeInfoVo">
        select id,site_code,product_num,station_code, product_model,result_code,result_text,sf_result ,work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from om_production_orde_info
        select id,site_code,product_num,station_code, product_model,result_code,result_text,sf_result ,work_order_no, sales_order_code, product_code, product_name, workshop_code, line_code, route_code, bom_code, recipe_code, plan_qty, actual_qty, bad_qty, scrap_qty, repair_qty, actual_online_qty, online_completion_mark, demand_date, plan_start_time, plan_end_time, actual_start_time, actual_end_time, serial_number, order_status, create_time, update_time, create_user, update_user, remarks, stream_number, custom, market_area_code, software_version_code, product_company_code, spare_field1, spare_field2, spare_field3, spare_field4 from om_production_orde_info
    </sql>
    <select id="selectOmProductionOrdeInfoList" parameterType="OmProductionOrdeInfo" resultMap="OmProductionOrdeInfoResult">
jcdm-ui/src/api/main/em/inspectionPlanItemsProject/inspectionPlanItemsProject.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目列表
export function listInspectionPlanItemsProject(query) {
  return request({
    url: '/em/inspectionPlanItemsProject/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目详细
export function getInspectionPlanItemsProject(id) {
  return request({
    url: '/em/inspectionPlanItemsProject/' + id,
    method: 'get'
  })
}
// æ–°å¢žç‚¹æ£€ä»»åŠ¡-项目
export function addInspectionPlanItemsProject(data) {
  return request({
    url: '/em/inspectionPlanItemsProject',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡-项目
export function updateInspectionPlanItemsProject(data) {
  return request({
    url: '/em/inspectionPlanItemsProject',
    method: 'put',
    data: data
  })
}
// åˆ é™¤ç‚¹æ£€ä»»åŠ¡-项目
export function delInspectionPlanItemsProject(id) {
  return request({
    url: '/em/inspectionPlanItemsProject/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/api/main/em/inspectionPlanTask/inspectionPlanTask.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡åˆ—表
export function listInspectionPlanTask(query) {
  return request({
    url: '/em/inspectionPlanTask/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡è¯¦ç»†
export function getInspectionPlanTask(id) {
  return request({
    url: '/em/inspectionPlanTask/' + id,
    method: 'get'
  })
}
// æ–°å¢žç‚¹æ£€ä»»åŠ¡
export function addInspectionPlanTask(data) {
  return request({
    url: '/em/inspectionPlanTask',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹ç‚¹æ£€ä»»åŠ¡
export function updateInspectionPlanTask(data) {
  return request({
    url: '/em/inspectionPlanTask',
    method: 'put',
    data: data
  })
}
// åˆ é™¤ç‚¹æ£€ä»»åŠ¡
export function delInspectionPlanTask(id) {
  return request({
    url: '/em/inspectionPlanTask/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/em/inspectionPlanItemsProject/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,357 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="项目编号" prop="itemsCode">
            <el-input
              v-model="queryParams.itemsCode"
              placeholder="请输入项目编号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="项目名称" prop="itemsName">
            <el-input
              v-model="queryParams.itemsName"
              placeholder="请输入项目名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
<!--          <el-form-item label="项目类型" prop="itemsType">-->
<!--            <el-select v-model="queryParams.itemsType" placeholder="请选择项目类型" clearable>-->
<!--              <el-option-->
<!--                v-for="dict in dict.type.${dictType}"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item label="标准" prop="standard">
            <el-input
              v-model="queryParams.standard"
              placeholder="请输入标准"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="结果" prop="results">
            <el-input
              v-model="queryParams.results"
              placeholder="请输入结果"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['em:inspectionPlanItemsProject:add']"
            >新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="mini"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['em:inspectionPlanItemsProject:edit']"
            >修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="mini"
              :disabled="multiple"
              @click="handleDelete"
              v-hasPermi="['em:inspectionPlanItemsProject:remove']"
            >删除</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['em:inspectionPlanItemsProject:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="inspectionPlanItemsProjectList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="ID" align="center" prop="id" />
          <el-table-column label="项目编号" align="center" prop="itemsCode">
          </el-table-column>
          <el-table-column label="项目名称" align="center" prop="itemsName">
          </el-table-column>
          <el-table-column label="项目类型" align="center" prop="itemsType">
          </el-table-column>
          <el-table-column label="标准" align="center" prop="standard">
          </el-table-column>
          <el-table-column label="项目内容" align="center" prop="itemsContent">
          </el-table-column>
          <el-table-column label="创建人" align="center" prop="createUser">
          </el-table-column>
          <el-table-column label="创建时间" align="center" prop="createTime">
          </el-table-column>
          <el-table-column label="更新人" align="center" prop="updateUser">
          </el-table-column>
          <el-table-column label="更新时间" align="center" prop="updateTime">
          </el-table-column>
          <el-table-column label="结果" align="center" prop="results">
          </el-table-column>
          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="success"
                plain
                style="width: 72px"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['em:inspectionPlanItemsProject:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['em:inspectionPlanItemsProject:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改点检任务-项目对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="项目编号" prop="itemsCode">
          <el-input v-model="form.itemsCode" placeholder="请输入项目编号" />
        </el-form-item>
        <el-form-item label="项目名称" prop="itemsName">
          <el-input v-model="form.itemsName" placeholder="请输入项目名称" />
        </el-form-item>
<!--        <el-form-item label="项目类型" prop="itemsType">-->
<!--          <el-select v-model="form.itemsType" placeholder="请选择项目类型">-->
<!--            <el-option-->
<!--              v-for="dict in dict.type.${dictType}"-->
<!--              :key="dict.value"-->
<!--              :label="dict.label"-->
<!--              :value="dict.value"-->
<!--            ></el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="标准" prop="standard">
          <el-input v-model="form.standard" placeholder="请输入标准" />
        </el-form-item>
        <el-form-item label="项目内容">
          <editor v-model="form.itemsContent" :min-height="192"/>
        </el-form-item>
        <el-form-item label="创建人" prop="createUser">
          <el-input v-model="form.createUser" placeholder="请输入创建人" />
        </el-form-item>
        <el-form-item label="更新人" prop="updateUser">
          <el-input v-model="form.updateUser" placeholder="请输入更新人" />
        </el-form-item>
        <el-form-item label="结果" prop="results">
          <el-input v-model="form.results" placeholder="请输入结果" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listInspectionPlanItemsProject, getInspectionPlanItemsProject, delInspectionPlanItemsProject, addInspectionPlanItemsProject, updateInspectionPlanItemsProject } from "@/api/main/em/inspectionPlanItemsProject/inspectionPlanItemsProject";
export default {
  name: "InspectionPlanItemsProject",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // ç‚¹æ£€ä»»åŠ¡-项目表格数据
      inspectionPlanItemsProjectList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        itemsCode: null,
        itemsName: null,
        itemsType: null,
        standard: null,
        results: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "ID不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡-项目列表 */
    getList() {
      this.loading = true;
      listInspectionPlanItemsProject(this.queryParams).then(response => {
        this.inspectionPlanItemsProjectList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        itemsCode: null,
        itemsName: null,
        itemsType: null,
        standard: null,
        itemsContent: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: null,
        results: null,
        spareField2: null,
        planTaskId: null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.open = true;
      this.titleName = "添加点检任务-项目";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getInspectionPlanItemsProject(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.titleName = "修改点检任务-项目";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateInspectionPlanItemsProject(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addInspectionPlanItemsProject(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除点检任务-项目编号为"' + ids + '"的数据项?').then(function() {
        return delInspectionPlanItemsProject(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('em/inspectionPlanItemsProject/export', {
        ...this.queryParams
      }, `inspectionPlanItemsProject_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
jcdm-ui/src/views/main/em/inspectionPlanTask/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,392 @@
<template>
  <div class="app-container">
    <el-card class="box-card">
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
          <el-form-item label="计划编号" prop="planCode">
            <el-input
              v-model="queryParams.planCode"
              placeholder="请输入计划编号"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="计划名称" prop="planName">
            <el-input
              v-model="queryParams.planName"
              placeholder="请输入计划名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
<!--          <el-form-item label="计划类型" prop="planType">-->
<!--            <el-select v-model="queryParams.planType" placeholder="请选择计划类型" clearable>-->
<!--              <el-option-->
<!--                v-for="dict in dict.type.${dictType}"-->
<!--                :key="dict.value"-->
<!--                :label="dict.label"-->
<!--                :value="dict.value"-->
<!--              />-->
<!--            </el-select>-->
<!--          </el-form-item>-->
          <el-form-item label="状态" prop="state">
            <el-input
              v-model="queryParams.state"
              placeholder="请输入状态"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="设备编码" prop="devicesCode">
            <el-input
              v-model="queryParams.devicesCode"
              placeholder="请输入设备编码"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item label="设备名称" prop="devicesName">
            <el-input
              v-model="queryParams.devicesName"
              placeholder="请输入设备名称"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item style="float: right">
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
            <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
          </el-form-item>
        </el-form>
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              plain
              icon="el-icon-plus"
              size="mini"
              @click="handleAdd"
              v-hasPermi="['em:inspectionPlanTask:add']"
            >新增</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="success"
              plain
              icon="el-icon-edit"
              size="mini"
              :disabled="single"
              @click="handleUpdate"
              v-hasPermi="['em:inspectionPlanTask:edit']"
            >修改</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="danger"
              plain
              icon="el-icon-delete"
              size="mini"
              :disabled="multiple"
              @click="handleDelete"
              v-hasPermi="['em:inspectionPlanTask:remove']"
            >删除</el-button>
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-download"
              size="mini"
              @click="handleExport"
              v-hasPermi="['em:inspectionPlanTask:export']"
            >导出</el-button>
          </el-col>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table border v-loading="loading" :data="inspectionPlanTaskList" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55" align="center" />
          <el-table-column label="ID" align="center" prop="id" />
          <el-table-column label="计划编号" align="center" prop="planCode">
          </el-table-column>
          <el-table-column label="计划名称" align="center" prop="planName">
          </el-table-column>
          <el-table-column label="计划类型" align="center" prop="planType">
          </el-table-column>
          <el-table-column label="状态" align="center" prop="state">
          </el-table-column>
          <el-table-column label="设备编码" align="center" prop="devicesCode">
          </el-table-column>
          <el-table-column label="设备名称" align="center" prop="devicesName">
          </el-table-column>
          <el-table-column label="品牌" align="center" prop="brand">
          </el-table-column>
          <el-table-column label="规格" align="center" prop="specs">
          </el-table-column>
          <el-table-column label="结果" align="center" prop="results">
          </el-table-column>
          <el-table-column label="备注" align="center" prop="remarks">
          </el-table-column>
          <el-table-column label="创建时间" align="center" prop="createTime">
          </el-table-column>
          <el-table-column label="创建人" align="center" prop="createUser">
          </el-table-column>
          <el-table-column label="修改时间" align="center" prop="updateTime">
          </el-table-column>
          <el-table-column label="修改人" align="center" prop="updateUser">
          </el-table-column>
          <el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope">
              <el-button
                size="mini"
                type="success"
                plain
                style="width: 72px"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['em:inspectionPlanTask:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="danger"
                plain
                style="width: 72px"
                icon="el-icon-delete"
                @click="handleDelete(scope.row)"
                v-hasPermi="['em:inspectionPlanTask:remove']"
              >删除</el-button>
            </template>
          </el-table-column>
        </el-table>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ·»åŠ æˆ–修改点检任务对话框 -->
    <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body>
      <span slot="title">
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="计划编号" prop="planCode">
          <el-input v-model="form.planCode" placeholder="请输入计划编号" />
        </el-form-item>
        <el-form-item label="计划名称" prop="planName">
          <el-input v-model="form.planName" placeholder="请输入计划名称" />
        </el-form-item>
<!--        <el-form-item label="计划类型" prop="planType">-->
<!--          <el-select v-model="form.planType" placeholder="请选择计划类型">-->
<!--            <el-option-->
<!--              v-for="dict in dict.type.${dictType}"-->
<!--              :key="dict.value"-->
<!--              :label="dict.label"-->
<!--              :value="dict.value"-->
<!--            ></el-option>-->
<!--          </el-select>-->
<!--        </el-form-item>-->
        <el-form-item label="状态" prop="state">
          <el-input v-model="form.state" placeholder="请输入状态" />
        </el-form-item>
        <el-form-item label="设备编码" prop="devicesCode">
          <el-input v-model="form.devicesCode" placeholder="请输入设备编码" />
        </el-form-item>
        <el-form-item label="设备名称" prop="devicesName">
          <el-input v-model="form.devicesName" placeholder="请输入设备名称" />
        </el-form-item>
        <el-form-item label="品牌" prop="brand">
          <el-input v-model="form.brand" placeholder="请输入品牌" />
        </el-form-item>
        <el-form-item label="规格" prop="specs">
          <el-input v-model="form.specs" placeholder="请输入规格" />
        </el-form-item>
        <el-form-item label="结果" prop="results">
          <el-input v-model="form.results" placeholder="请输入结果" />
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" placeholder="请输入备注" />
        </el-form-item>
        <el-form-item label="创建人" prop="createUser">
          <el-input v-model="form.createUser" placeholder="请输入创建人" />
        </el-form-item>
        <el-form-item label="修改人" prop="updateUser">
          <el-input v-model="form.updateUser" placeholder="请输入修改人" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
        <el-button @click="cancel">取 æ¶ˆ</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import { listInspectionPlanTask, getInspectionPlanTask, delInspectionPlanTask, addInspectionPlanTask, updateInspectionPlanTask } from "@/api/main/em/inspectionPlanTask/inspectionPlanTask";
export default {
  name: "InspectionPlanTask",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      titleName: "",
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // ç‚¹æ£€ä»»åŠ¡è¡¨æ ¼æ•°æ®
      inspectionPlanTaskList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        planCode: null,
        planName: null,
        planType: null,
        state: null,
        devicesCode: null,
        devicesName: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "ID不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢ç‚¹æ£€ä»»åŠ¡åˆ—表 */
    getList() {
      this.loading = true;
      listInspectionPlanTask(this.queryParams).then(response => {
        this.inspectionPlanTaskList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        planCode: null,
        planName: null,
        planType: null,
        state: null,
        devicesCode: null,
        devicesName: null,
        brand: null,
        specs: null,
        results: null,
        remarks: null,
        createTime: null,
        createUser: null,
        updateTime: null,
        updateUser: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: null
      };
      this.resetForm("form");
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    handleAdd() {
      this.reset();
      this.open = true;
      this.titleName = "添加点检任务";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getInspectionPlanTask(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.titleName = "修改点检任务";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateInspectionPlanTask(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addInspectionPlanTask(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除点检任务编号为"' + ids + '"的数据项?').then(function() {
        return delInspectionPlanTask(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('em/inspectionPlanTask/export', {
        ...this.queryParams
      }, `inspectionPlanTask_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>