hdy
2023-12-12 5c23e5e00a823fc50564ff31f97babad69246271
生产工单优化
已修改1个文件
已添加16个文件
2095 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/controller/BsLineInfoController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/domain/BsLineInfo.java 165 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/mapper/BsLineInfoMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/service/IBsLineInfoService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/service/impl/BsLineInfoServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/workReport/controller/OmWorkReportController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/workReport/domain/OmWorkReport.java 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/workReport/mapper/OmWorkReportMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/workReport/service/IOmWorkReportService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/workReport/service/impl/OmWorkReportServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/lineInfo/BsLineInfoMapper.xml 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/om/workReport/OmWorkReportMapper.xml 128 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/bs/lineInfo/lineInfo.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/om/workReport/workReport.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/lineInfo/index.vue 374 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/workReport/index.vue 373 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/controller/BsLineInfoController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.bs.lineInfo.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.bs.lineInfo.domain.BsLineInfo;
import com.jcdm.main.bs.lineInfo.service.IBsLineInfoService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * äº§çº¿ä¿¡æ¯Controller
 *
 * @author Yi
 * @date 2023-12-09
 */
@RestController
@RequestMapping("/main/lineInfo")
public class BsLineInfoController extends BaseController
{
    @Autowired
    private IBsLineInfoService bsLineInfoService;
    /**
     * æŸ¥è¯¢äº§çº¿ä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('main:lineInfo:list')")
    @GetMapping("/list")
    public TableDataInfo list(BsLineInfo bsLineInfo)
    {
        startPage();
        List<BsLineInfo> list = bsLineInfoService.selectBsLineInfoList(bsLineInfo);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºäº§çº¿ä¿¡æ¯åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('main:lineInfo:export')")
    @Log(title = "产线信息", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, BsLineInfo bsLineInfo)
    {
        List<BsLineInfo> list = bsLineInfoService.selectBsLineInfoList(bsLineInfo);
        ExcelUtil<BsLineInfo> util = new ExcelUtil<BsLineInfo>(BsLineInfo.class);
        util.exportExcel(response, list, "产线信息数据");
    }
    /**
     * èŽ·å–产线信息详细信息
     */
    @PreAuthorize("@ss.hasPermi('main:lineInfo:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(bsLineInfoService.selectBsLineInfoById(id));
    }
    /**
     * æ–°å¢žäº§çº¿ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('main:lineInfo:add')")
    @Log(title = "产线信息", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody BsLineInfo bsLineInfo)
    {
        return toAjax(bsLineInfoService.insertBsLineInfo(bsLineInfo));
    }
    /**
     * ä¿®æ”¹äº§çº¿ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('main:lineInfo:edit')")
    @Log(title = "产线信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody BsLineInfo bsLineInfo)
    {
        return toAjax(bsLineInfoService.updateBsLineInfo(bsLineInfo));
    }
    /**
     * åˆ é™¤äº§çº¿ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('main:lineInfo:remove')")
    @Log(title = "产线信息", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(bsLineInfoService.deleteBsLineInfoByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/domain/BsLineInfo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,165 @@
package com.jcdm.main.bs.lineInfo.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;
/**
 * äº§çº¿ä¿¡æ¯å¯¹è±¡ bs_line_info
 *
 * @author Yi
 * @date 2023-12-09
 */
public class BsLineInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** äº§çº¿ç¼–号 */
    @Excel(name = "产线编号")
    private String lineCode;
    /** äº§çº¿åç§° */
    @Excel(name = "产线名称")
    private String lineName;
    /** è½¦é—´ç¼–号 */
    @Excel(name = "车间编号")
    private String workshopCode;
    /** å·¥ä½œæ—¥åŽ† */
    @Excel(name = "工作日历")
    private String workCalendar;
    /** é¢„留字段1 */
    @Excel(name = "预留字段1")
    private String spareField1;
    /** é¢„留字段2 */
    @Excel(name = "预留字段2")
    private String spareField2;
    /** å¤‡æ³¨ */
    @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 setLineCode(String lineCode)
    {
        this.lineCode = lineCode;
    }
    public String getLineCode()
    {
        return lineCode;
    }
    public void setLineName(String lineName)
    {
        this.lineName = lineName;
    }
    public String getLineName()
    {
        return lineName;
    }
    public void setWorkshopCode(String workshopCode)
    {
        this.workshopCode = workshopCode;
    }
    public String getWorkshopCode()
    {
        return workshopCode;
    }
    public void setWorkCalendar(String workCalendar)
    {
        this.workCalendar = workCalendar;
    }
    public String getWorkCalendar()
    {
        return workCalendar;
    }
    public void setSpareField1(String spareField1)
    {
        this.spareField1 = spareField1;
    }
    public String getSpareField1()
    {
        return spareField1;
    }
    public void setSpareField2(String spareField2)
    {
        this.spareField2 = spareField2;
    }
    public String getSpareField2()
    {
        return spareField2;
    }
    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("lineCode", getLineCode())
            .append("lineName", getLineName())
            .append("workshopCode", getWorkshopCode())
            .append("workCalendar", getWorkCalendar())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("remarks", getRemarks())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/mapper/BsLineInfoMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.lineInfo.mapper;
import java.util.List;
import com.jcdm.main.bs.lineInfo.domain.BsLineInfo;
/**
 * äº§çº¿ä¿¡æ¯Mapper接口
 *
 * @author Yi
 * @date 2023-12-09
 */
public interface BsLineInfoMapper
{
    /**
     * æŸ¥è¯¢äº§çº¿ä¿¡æ¯
     *
     * @param id äº§çº¿ä¿¡æ¯ä¸»é”®
     * @return äº§çº¿ä¿¡æ¯
     */
    public BsLineInfo selectBsLineInfoById(Long id);
    /**
     * æŸ¥è¯¢äº§çº¿ä¿¡æ¯åˆ—表
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return äº§çº¿ä¿¡æ¯é›†åˆ
     */
    public List<BsLineInfo> selectBsLineInfoList(BsLineInfo bsLineInfo);
    /**
     * æ–°å¢žäº§çº¿ä¿¡æ¯
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsLineInfo(BsLineInfo bsLineInfo);
    /**
     * ä¿®æ”¹äº§çº¿ä¿¡æ¯
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsLineInfo(BsLineInfo bsLineInfo);
    /**
     * åˆ é™¤äº§çº¿ä¿¡æ¯
     *
     * @param id äº§çº¿ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsLineInfoById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤äº§çº¿ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteBsLineInfoByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/service/IBsLineInfoService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.bs.lineInfo.service;
import java.util.List;
import com.jcdm.main.bs.lineInfo.domain.BsLineInfo;
/**
 * äº§çº¿ä¿¡æ¯Service接口
 *
 * @author Yi
 * @date 2023-12-09
 */
public interface IBsLineInfoService
{
    /**
     * æŸ¥è¯¢äº§çº¿ä¿¡æ¯
     *
     * @param id äº§çº¿ä¿¡æ¯ä¸»é”®
     * @return äº§çº¿ä¿¡æ¯
     */
    public BsLineInfo selectBsLineInfoById(Long id);
    /**
     * æŸ¥è¯¢äº§çº¿ä¿¡æ¯åˆ—表
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return äº§çº¿ä¿¡æ¯é›†åˆ
     */
    public List<BsLineInfo> selectBsLineInfoList(BsLineInfo bsLineInfo);
    /**
     * æ–°å¢žäº§çº¿ä¿¡æ¯
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int insertBsLineInfo(BsLineInfo bsLineInfo);
    /**
     * ä¿®æ”¹äº§çº¿ä¿¡æ¯
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return ç»“æžœ
     */
    public int updateBsLineInfo(BsLineInfo bsLineInfo);
    /**
     * æ‰¹é‡åˆ é™¤äº§çº¿ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„产线信息主键集合
     * @return ç»“æžœ
     */
    public int deleteBsLineInfoByIds(Long[] ids);
    /**
     * åˆ é™¤äº§çº¿ä¿¡æ¯ä¿¡æ¯
     *
     * @param id äº§çº¿ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteBsLineInfoById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/service/impl/BsLineInfoServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.bs.lineInfo.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.bs.lineInfo.mapper.BsLineInfoMapper;
import com.jcdm.main.bs.lineInfo.domain.BsLineInfo;
import com.jcdm.main.bs.lineInfo.service.IBsLineInfoService;
/**
 * äº§çº¿ä¿¡æ¯Service业务层处理
 *
 * @author Yi
 * @date 2023-12-09
 */
@Service
public class BsLineInfoServiceImpl implements IBsLineInfoService
{
    @Autowired
    private BsLineInfoMapper bsLineInfoMapper;
    /**
     * æŸ¥è¯¢äº§çº¿ä¿¡æ¯
     *
     * @param id äº§çº¿ä¿¡æ¯ä¸»é”®
     * @return äº§çº¿ä¿¡æ¯
     */
    @Override
    public BsLineInfo selectBsLineInfoById(Long id)
    {
        return bsLineInfoMapper.selectBsLineInfoById(id);
    }
    /**
     * æŸ¥è¯¢äº§çº¿ä¿¡æ¯åˆ—表
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return äº§çº¿ä¿¡æ¯
     */
    @Override
    public List<BsLineInfo> selectBsLineInfoList(BsLineInfo bsLineInfo)
    {
        return bsLineInfoMapper.selectBsLineInfoList(bsLineInfo);
    }
    /**
     * æ–°å¢žäº§çº¿ä¿¡æ¯
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int insertBsLineInfo(BsLineInfo bsLineInfo)
    {
        bsLineInfo.setCreateTime(DateUtils.getNowDate());
        return bsLineInfoMapper.insertBsLineInfo(bsLineInfo);
    }
    /**
     * ä¿®æ”¹äº§çº¿ä¿¡æ¯
     *
     * @param bsLineInfo äº§çº¿ä¿¡æ¯
     * @return ç»“æžœ
     */
    @Override
    public int updateBsLineInfo(BsLineInfo bsLineInfo)
    {
        bsLineInfo.setUpdateTime(DateUtils.getNowDate());
        return bsLineInfoMapper.updateBsLineInfo(bsLineInfo);
    }
    /**
     * æ‰¹é‡åˆ é™¤äº§çº¿ä¿¡æ¯
     *
     * @param ids éœ€è¦åˆ é™¤çš„产线信息主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsLineInfoByIds(Long[] ids)
    {
        return bsLineInfoMapper.deleteBsLineInfoByIds(ids);
    }
    /**
     * åˆ é™¤äº§çº¿ä¿¡æ¯ä¿¡æ¯
     *
     * @param id äº§çº¿ä¿¡æ¯ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteBsLineInfoById(Long id)
    {
        return bsLineInfoMapper.deleteBsLineInfoById(id);
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -2,7 +2,6 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.jcdm.main.om.productionOrde.domain.OmProductionOrdeInfo;
import com.jcdm.main.om.productionOrde.service.IOmProductionOrdeInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
jcdm-main/src/main/java/com/jcdm/main/om/workReport/controller/OmWorkReportController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.om.workReport.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.om.workReport.domain.OmWorkReport;
import com.jcdm.main.om.workReport.service.IOmWorkReportService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * æŠ¥å·¥è®°å½• è¡¨Controller
 *
 * @author Yi
 * @date 2023-12-12
 */
@RestController
@RequestMapping("/om/workReport")
public class OmWorkReportController extends BaseController
{
    @Autowired
    private IOmWorkReportService omWorkReportService;
    /**
     * æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('om:workReport:list')")
    @GetMapping("/list")
    public TableDataInfo list(OmWorkReport omWorkReport)
    {
        startPage();
        List<OmWorkReport> list = omWorkReportService.selectOmWorkReportList(omWorkReport);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºæŠ¥å·¥è®°å½• è¡¨åˆ—表
     */
    @PreAuthorize("@ss.hasPermi('om:workReport:export')")
    @Log(title = "报工记录 è¡¨", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, OmWorkReport omWorkReport)
    {
        List<OmWorkReport> list = omWorkReportService.selectOmWorkReportList(omWorkReport);
        ExcelUtil<OmWorkReport> util = new ExcelUtil<OmWorkReport>(OmWorkReport.class);
        util.exportExcel(response, list, "报工记录 è¡¨æ•°æ®");
    }
    /**
     * èŽ·å–报工记录 è¡¨è¯¦ç»†ä¿¡æ¯
     */
    @PreAuthorize("@ss.hasPermi('om:workReport:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(omWorkReportService.selectOmWorkReportById(id));
    }
    /**
     * æ–°å¢žæŠ¥å·¥è®°å½• è¡¨
     */
    @PreAuthorize("@ss.hasPermi('om:workReport:add')")
    @Log(title = "报工记录 è¡¨", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody OmWorkReport omWorkReport)
    {
        return toAjax(omWorkReportService.insertOmWorkReport(omWorkReport));
    }
    /**
     * ä¿®æ”¹æŠ¥å·¥è®°å½• è¡¨
     */
    @PreAuthorize("@ss.hasPermi('om:workReport:edit')")
    @Log(title = "报工记录 è¡¨", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody OmWorkReport omWorkReport)
    {
        return toAjax(omWorkReportService.updateOmWorkReport(omWorkReport));
    }
    /**
     * åˆ é™¤æŠ¥å·¥è®°å½• è¡¨
     */
    @PreAuthorize("@ss.hasPermi('om:workReport:remove')")
    @Log(title = "报工记录 è¡¨", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(omWorkReportService.deleteOmWorkReportByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/workReport/domain/OmWorkReport.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,223 @@
package com.jcdm.main.om.workReport.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;
/**
 * æŠ¥å·¥è®°å½• è¡¨å¯¹è±¡ om_work_report
 *
 * @author Yi
 * @date 2023-12-12
 */
public class OmWorkReport extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** å·¥å•ç¼–号 */
    @Excel(name = "工单编号")
    private String workOrderCode;
    /** SFC总成序列号 */
    @Excel(name = "SFC总成序列号")
    private String sfcCode;
    /** äº§å“ç¼–号 */
    @Excel(name = "产品编号")
    private String productCode;
    /** äº§å“åç§° */
    @Excel(name = "产品名称")
    private String productName;
    /** ä¸Šçº¿æ—¶é—´ */
    @Excel(name = "上线时间")
    private String upTime;
    /** ä¸‹çº¿æ—¶é—´ */
    @Excel(name = "下线时间")
    private String offlineTime;
    /** æ˜¯å¦åˆæ ¼ */
    @Excel(name = "是否合格")
    private String status;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ”¹ç”¨æˆ· */
    @Excel(name = "更改用户")
    private String updateUser;
    /** é¢„留字段1 */
    @Excel(name = "预留字段1")
    private String spareField1;
    /** é¢„留字段2 */
    @Excel(name = "预留字段2")
    private String spareField2;
    /** é¢„留字段3 */
    @Excel(name = "预留字段3")
    private String spareField3;
    /** é¢„留字段4 */
    @Excel(name = "预留字段4")
    private String spareField4;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setWorkOrderCode(String workOrderCode)
    {
        this.workOrderCode = workOrderCode;
    }
    public String getWorkOrderCode()
    {
        return workOrderCode;
    }
    public void setSfcCode(String sfcCode)
    {
        this.sfcCode = sfcCode;
    }
    public String getSfcCode()
    {
        return sfcCode;
    }
    public void setProductCode(String productCode)
    {
        this.productCode = productCode;
    }
    public String getProductCode()
    {
        return productCode;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }
    public String getProductName()
    {
        return productName;
    }
    public void setUpTime(String upTime)
    {
        this.upTime = upTime;
    }
    public String getUpTime()
    {
        return upTime;
    }
    public void setOfflineTime(String offlineTime)
    {
        this.offlineTime = offlineTime;
    }
    public String getOfflineTime()
    {
        return offlineTime;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }
    public String getStatus()
    {
        return status;
    }
    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 setSpareField1(String spareField1)
    {
        this.spareField1 = spareField1;
    }
    public String getSpareField1()
    {
        return spareField1;
    }
    public void setSpareField2(String spareField2)
    {
        this.spareField2 = spareField2;
    }
    public String getSpareField2()
    {
        return spareField2;
    }
    public void setSpareField3(String spareField3)
    {
        this.spareField3 = spareField3;
    }
    public String getSpareField3()
    {
        return spareField3;
    }
    public void setSpareField4(String spareField4)
    {
        this.spareField4 = spareField4;
    }
    public String getSpareField4()
    {
        return spareField4;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("workOrderCode", getWorkOrderCode())
            .append("sfcCode", getSfcCode())
            .append("productCode", getProductCode())
            .append("productName", getProductName())
            .append("upTime", getUpTime())
            .append("offlineTime", getOfflineTime())
            .append("status", getStatus())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .append("spareField3", getSpareField3())
            .append("spareField4", getSpareField4())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/om/workReport/mapper/OmWorkReportMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.om.workReport.mapper;
import java.util.List;
import com.jcdm.main.om.workReport.domain.OmWorkReport;
/**
 * æŠ¥å·¥è®°å½• è¡¨Mapper接口
 *
 * @author Yi
 * @date 2023-12-12
 */
public interface OmWorkReportMapper
{
    /**
     * æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨
     *
     * @param id æŠ¥å·¥è®°å½• è¡¨ä¸»é”®
     * @return æŠ¥å·¥è®°å½• è¡¨
     */
    public OmWorkReport selectOmWorkReportById(Long id);
    /**
     * æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨åˆ—表
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return æŠ¥å·¥è®°å½• è¡¨é›†åˆ
     */
    public List<OmWorkReport> selectOmWorkReportList(OmWorkReport omWorkReport);
    /**
     * æ–°å¢žæŠ¥å·¥è®°å½• è¡¨
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return ç»“æžœ
     */
    public int insertOmWorkReport(OmWorkReport omWorkReport);
    /**
     * ä¿®æ”¹æŠ¥å·¥è®°å½• è¡¨
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return ç»“æžœ
     */
    public int updateOmWorkReport(OmWorkReport omWorkReport);
    /**
     * åˆ é™¤æŠ¥å·¥è®°å½• è¡¨
     *
     * @param id æŠ¥å·¥è®°å½• è¡¨ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteOmWorkReportById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤æŠ¥å·¥è®°å½• è¡¨
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteOmWorkReportByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/om/workReport/service/IOmWorkReportService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.om.workReport.service;
import java.util.List;
import com.jcdm.main.om.workReport.domain.OmWorkReport;
/**
 * æŠ¥å·¥è®°å½• è¡¨Service接口
 *
 * @author Yi
 * @date 2023-12-12
 */
public interface IOmWorkReportService
{
    /**
     * æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨
     *
     * @param id æŠ¥å·¥è®°å½• è¡¨ä¸»é”®
     * @return æŠ¥å·¥è®°å½• è¡¨
     */
    public OmWorkReport selectOmWorkReportById(Long id);
    /**
     * æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨åˆ—表
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return æŠ¥å·¥è®°å½• è¡¨é›†åˆ
     */
    public List<OmWorkReport> selectOmWorkReportList(OmWorkReport omWorkReport);
    /**
     * æ–°å¢žæŠ¥å·¥è®°å½• è¡¨
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return ç»“æžœ
     */
    public int insertOmWorkReport(OmWorkReport omWorkReport);
    /**
     * ä¿®æ”¹æŠ¥å·¥è®°å½• è¡¨
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return ç»“æžœ
     */
    public int updateOmWorkReport(OmWorkReport omWorkReport);
    /**
     * æ‰¹é‡åˆ é™¤æŠ¥å·¥è®°å½• è¡¨
     *
     * @param ids éœ€è¦åˆ é™¤çš„报工记录 è¡¨ä¸»é”®é›†åˆ
     * @return ç»“æžœ
     */
    public int deleteOmWorkReportByIds(Long[] ids);
    /**
     * åˆ é™¤æŠ¥å·¥è®°å½• è¡¨ä¿¡æ¯
     *
     * @param id æŠ¥å·¥è®°å½• è¡¨ä¸»é”®
     * @return ç»“æžœ
     */
    public int deleteOmWorkReportById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/om/workReport/service/impl/OmWorkReportServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.om.workReport.service.impl;
import java.util.List;
import com.jcdm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jcdm.main.om.workReport.mapper.OmWorkReportMapper;
import com.jcdm.main.om.workReport.domain.OmWorkReport;
import com.jcdm.main.om.workReport.service.IOmWorkReportService;
/**
 * æŠ¥å·¥è®°å½• è¡¨Service业务层处理
 *
 * @author Yi
 * @date 2023-12-12
 */
@Service
public class OmWorkReportServiceImpl implements IOmWorkReportService
{
    @Autowired
    private OmWorkReportMapper omWorkReportMapper;
    /**
     * æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨
     *
     * @param id æŠ¥å·¥è®°å½• è¡¨ä¸»é”®
     * @return æŠ¥å·¥è®°å½• è¡¨
     */
    @Override
    public OmWorkReport selectOmWorkReportById(Long id)
    {
        return omWorkReportMapper.selectOmWorkReportById(id);
    }
    /**
     * æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨åˆ—表
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return æŠ¥å·¥è®°å½• è¡¨
     */
    @Override
    public List<OmWorkReport> selectOmWorkReportList(OmWorkReport omWorkReport)
    {
        return omWorkReportMapper.selectOmWorkReportList(omWorkReport);
    }
    /**
     * æ–°å¢žæŠ¥å·¥è®°å½• è¡¨
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return ç»“æžœ
     */
    @Override
    public int insertOmWorkReport(OmWorkReport omWorkReport)
    {
        omWorkReport.setCreateTime(DateUtils.getNowDate());
        return omWorkReportMapper.insertOmWorkReport(omWorkReport);
    }
    /**
     * ä¿®æ”¹æŠ¥å·¥è®°å½• è¡¨
     *
     * @param omWorkReport æŠ¥å·¥è®°å½• è¡¨
     * @return ç»“æžœ
     */
    @Override
    public int updateOmWorkReport(OmWorkReport omWorkReport)
    {
        omWorkReport.setUpdateTime(DateUtils.getNowDate());
        return omWorkReportMapper.updateOmWorkReport(omWorkReport);
    }
    /**
     * æ‰¹é‡åˆ é™¤æŠ¥å·¥è®°å½• è¡¨
     *
     * @param ids éœ€è¦åˆ é™¤çš„报工记录 è¡¨ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteOmWorkReportByIds(Long[] ids)
    {
        return omWorkReportMapper.deleteOmWorkReportByIds(ids);
    }
    /**
     * åˆ é™¤æŠ¥å·¥è®°å½• è¡¨ä¿¡æ¯
     *
     * @param id æŠ¥å·¥è®°å½• è¡¨ä¸»é”®
     * @return ç»“æžœ
     */
    @Override
    public int deleteOmWorkReportById(Long id)
    {
        return omWorkReportMapper.deleteOmWorkReportById(id);
    }
}
jcdm-main/src/main/resources/mapper/bs/lineInfo/BsLineInfoMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,99 @@
<?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.bs.lineInfo.mapper.BsLineInfoMapper">
    <resultMap type="BsLineInfo" id="BsLineInfoResult">
        <result property="id"    column="id"    />
        <result property="lineCode"    column="line_code"    />
        <result property="lineName"    column="line_name"    />
        <result property="workshopCode"    column="workshop_code"    />
        <result property="workCalendar"    column="work_calendar"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="remarks"    column="remarks"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>
    <sql id="selectBsLineInfoVo">
        select id, line_code, line_name, workshop_code, work_calendar, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time from bs_line_info
    </sql>
    <select id="selectBsLineInfoList" parameterType="BsLineInfo" resultMap="BsLineInfoResult">
        <include refid="selectBsLineInfoVo"/>
        <where>
            <if test="lineCode != null  and lineCode != ''"> and line_code like concat('%', #{lineCode}, '%')</if>
            <if test="lineName != null  and lineName != ''"> and line_name like concat('%', #{lineName}, '%')</if>
            <if test="workshopCode != null  and workshopCode != ''"> and workshop_code like concat('%', #{workshopCode}, '%')</if>
            <if test="workCalendar != null  and workCalendar != ''"> and work_calendar = #{workCalendar}</if>
        </where>
    </select>
    <select id="selectBsLineInfoById" parameterType="Long" resultMap="BsLineInfoResult">
        <include refid="selectBsLineInfoVo"/>
        where id = #{id}
    </select>
    <insert id="insertBsLineInfo" parameterType="BsLineInfo" useGeneratedKeys="true" keyProperty="id">
        insert into bs_line_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="lineCode != null and lineCode != ''">line_code,</if>
            <if test="lineName != null and lineName != ''">line_name,</if>
            <if test="workshopCode != null and workshopCode != ''">workshop_code,</if>
            <if test="workCalendar != null">work_calendar,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="remarks != null">remarks,</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>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="lineCode != null and lineCode != ''">#{lineCode},</if>
            <if test="lineName != null and lineName != ''">#{lineName},</if>
            <if test="workshopCode != null and workshopCode != ''">#{workshopCode},</if>
            <if test="workCalendar != null">#{workCalendar},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="remarks != null">#{remarks},</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>
         </trim>
    </insert>
    <update id="updateBsLineInfo" parameterType="BsLineInfo">
        update bs_line_info
        <trim prefix="SET" suffixOverrides=",">
            <if test="lineCode != null and lineCode != ''">line_code = #{lineCode},</if>
            <if test="lineName != null and lineName != ''">line_name = #{lineName},</if>
            <if test="workshopCode != null and workshopCode != ''">workshop_code = #{workshopCode},</if>
            <if test="workCalendar != null">work_calendar = #{workCalendar},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="remarks != null">remarks = #{remarks},</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>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteBsLineInfoById" parameterType="Long">
        delete from bs_line_info where id = #{id}
    </delete>
    <delete id="deleteBsLineInfoByIds" parameterType="String">
        delete from bs_line_info where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-main/src/main/resources/mapper/om/workReport/OmWorkReportMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,128 @@
<?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.om.workReport.mapper.OmWorkReportMapper">
    <resultMap type="OmWorkReport" id="OmWorkReportResult">
        <result property="id"    column="id"    />
        <result property="workOrderCode"    column="work_order_code"    />
        <result property="sfcCode"    column="sfc_code"    />
        <result property="productCode"    column="product_code"    />
        <result property="productName"    column="product_name"    />
        <result property="upTime"    column="up_time"    />
        <result property="offlineTime"    column="offline_time"    />
        <result property="status"    column="status"    />
        <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="remark"    column="remark"    />
        <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"    />
    </resultMap>
    <sql id="selectOmWorkReportVo">
        select id, work_order_code, sfc_code, product_code, product_name, up_time, offline_time, status, create_user, create_time, update_user, update_time, remark, spare_field_1, spare_field_2, spare_field_3, spare_field_4 from om_work_report
    </sql>
    <select id="selectOmWorkReportList" parameterType="OmWorkReport" resultMap="OmWorkReportResult">
        <include refid="selectOmWorkReportVo"/>
        <where>
            <if test="workOrderCode != null  and workOrderCode != ''"> and work_order_code = #{workOrderCode}</if>
            <if test="sfcCode != null  and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
            <if test="upTime != null  and upTime != ''"> and up_time = #{upTime}</if>
            <if test="offlineTime != null  and offlineTime != ''"> and offline_time = #{offlineTime}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="createUser != null  and createUser != ''"> and create_user = #{createUser}</if>
            <if test="updateUser != null  and updateUser != ''"> and update_user = #{updateUser}</if>
            <if test="spareField1 != null  and spareField1 != ''"> and spare_field_1 = #{spareField1}</if>
            <if test="spareField2 != null  and spareField2 != ''"> and spare_field_2 = #{spareField2}</if>
            <if test="spareField3 != null  and spareField3 != ''"> and spare_field_3 = #{spareField3}</if>
            <if test="spareField4 != null  and spareField4 != ''"> and spare_field_4 = #{spareField4}</if>
        </where>
    </select>
    <select id="selectOmWorkReportById" parameterType="Long" resultMap="OmWorkReportResult">
        <include refid="selectOmWorkReportVo"/>
        where id = #{id}
    </select>
    <insert id="insertOmWorkReport" parameterType="OmWorkReport" useGeneratedKeys="true" keyProperty="id">
        insert into om_work_report
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="workOrderCode != null">work_order_code,</if>
            <if test="sfcCode != null">sfc_code,</if>
            <if test="productCode != null">product_code,</if>
            <if test="productName != null">product_name,</if>
            <if test="upTime != null">up_time,</if>
            <if test="offlineTime != null">offline_time,</if>
            <if test="status != null">status,</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="remark != null">remark,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="spareField3 != null">spare_field_3,</if>
            <if test="spareField4 != null">spare_field_4,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="workOrderCode != null">#{workOrderCode},</if>
            <if test="sfcCode != null">#{sfcCode},</if>
            <if test="productCode != null">#{productCode},</if>
            <if test="productName != null">#{productName},</if>
            <if test="upTime != null">#{upTime},</if>
            <if test="offlineTime != null">#{offlineTime},</if>
            <if test="status != null">#{status},</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="remark != null">#{remark},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="spareField3 != null">#{spareField3},</if>
            <if test="spareField4 != null">#{spareField4},</if>
         </trim>
    </insert>
    <update id="updateOmWorkReport" parameterType="OmWorkReport">
        update om_work_report
        <trim prefix="SET" suffixOverrides=",">
            <if test="workOrderCode != null">work_order_code = #{workOrderCode},</if>
            <if test="sfcCode != null">sfc_code = #{sfcCode},</if>
            <if test="productCode != null">product_code = #{productCode},</if>
            <if test="productName != null">product_name = #{productName},</if>
            <if test="upTime != null">up_time = #{upTime},</if>
            <if test="offlineTime != null">offline_time = #{offlineTime},</if>
            <if test="status != null">status = #{status},</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="remark != null">remark = #{remark},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="spareField3 != null">spare_field_3 = #{spareField3},</if>
            <if test="spareField4 != null">spare_field_4 = #{spareField4},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteOmWorkReportById" parameterType="Long">
        delete from om_work_report where id = #{id}
    </delete>
    <delete id="deleteOmWorkReportByIds" parameterType="String">
        delete from om_work_report where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/bs/lineInfo/lineInfo.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢äº§çº¿ä¿¡æ¯åˆ—表
export function listLineInfo(query) {
  return request({
    url: '/main/lineInfo/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢äº§çº¿ä¿¡æ¯è¯¦ç»†
export function getLineInfo(id) {
  return request({
    url: '/main/lineInfo/' + id,
    method: 'get'
  })
}
// æ–°å¢žäº§çº¿ä¿¡æ¯
export function addLineInfo(data) {
  return request({
    url: '/main/lineInfo',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹äº§çº¿ä¿¡æ¯
export function updateLineInfo(data) {
  return request({
    url: '/main/lineInfo',
    method: 'put',
    data: data
  })
}
// åˆ é™¤äº§çº¿ä¿¡æ¯
export function delLineInfo(id) {
  return request({
    url: '/main/lineInfo/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/api/main/om/workReport/workReport.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨åˆ—表
export function listWorkReport(query) {
  return request({
    url: '/om/workReport/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨è¯¦ç»†
export function getWorkReport(id) {
  return request({
    url: '/om/workReport/' + id,
    method: 'get'
  })
}
// æ–°å¢žæŠ¥å·¥è®°å½• è¡¨
export function addWorkReport(data) {
  return request({
    url: '/om/workReport',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹æŠ¥å·¥è®°å½• è¡¨
export function updateWorkReport(data) {
  return request({
    url: '/om/workReport',
    method: 'put',
    data: data
  })
}
// åˆ é™¤æŠ¥å·¥è®°å½• è¡¨
export function delWorkReport(id) {
  return request({
    url: '/om/workReport/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/bs/lineInfo/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,374 @@
<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="lineCode">
          <el-input
            v-model="queryParams.lineCode"
            placeholder="请输入产线编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="产线名称" prop="lineName">
          <el-input
            v-model="queryParams.lineName"
            placeholder="请输入产线名称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px">
        <el-form-item label="车间编号" prop="workshopCode">
          <el-input
            v-model="queryParams.workshopCode"
            placeholder="请输入车间编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="工作日历" prop="workCalendar">
          <el-input
            v-model="queryParams.workCalendar"
            placeholder="请输入工作日历"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </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="['main:lineInfo: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="['main:lineInfo: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="['main:lineInfo: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="['main:lineInfo:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
      <el-table v-loading="loading" border :data="lineInfoList" @selection-change="handleSelectionChange" v-if="lineInfoList.length > 0">
        <el-table-column type="selection" width="55" align="center" />
        <el-table-column label="产线编号" align="center" prop="lineCode">
        </el-table-column>
        <el-table-column label="产线名称" align="center" prop="lineName">
      </el-table-column>
        <el-table-column label="车间编码" align="center" prop="workshopCode">
        </el-table-column>
        <el-table-column label="车间名称" align="center" prop="workshopName">
        </el-table-column>
        <el-table-column label="备注" align="center" prop="remarks">
        </el-table-column>
        <el-table-column label="创建用户" align="center" prop="createUser" width="80">
        </el-table-column>
        <el-table-column label="创建时间" align="center" prop="createTime" width="170">
        </el-table-column>
        <el-table-column label="更新人" align="center" prop="updateUser" width="80">
        </el-table-column>
        <el-table-column label="更新时间" align="center" prop="updateTime" width="170">
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['bs:lineInfo:edit']"
            >修改</el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-hasPermi="['bs:lineInfo:remove']"
            >删除</el-button>
          </template>
        </el-table-column>
      </el-table>
      <el-empty v-else>
        <span slot="description">暂无数据</span>
      </el-empty>
    </el-card>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
<!--    <el-table v-loading="loading" :data="lineInfoList" @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" class-name="small-padding fixed-width">-->
<!--        <template slot-scope="scope">-->
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            icon="el-icon-edit"-->
<!--            @click="handleUpdate(scope.row)"-->
<!--            v-hasPermi="['main:lineInfo:edit']"-->
<!--          >修改</el-button>-->
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            icon="el-icon-delete"-->
<!--            @click="handleDelete(scope.row)"-->
<!--            v-hasPermi="['main:lineInfo:remove']"-->
<!--          >删除</el-button>-->
<!--        </template>-->
<!--      </el-table-column>-->
<!--    </el-table>-->
    <!-- æ·»åŠ æˆ–修改产线信息对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="产线编号" prop="lineCode">
          <el-input v-model="form.lineCode" placeholder="请输入产线编号" />
        </el-form-item>
        <el-form-item label="产线名称" prop="lineName">
          <el-input v-model="form.lineName" placeholder="请输入产线名称" />
        </el-form-item>
        <el-form-item label="车间编号" prop="workshopCode">
          <el-input v-model="form.workshopCode" placeholder="请输入车间编号" />
        </el-form-item>
<!--        <el-form-item label="工作日历" prop="workCalendar">-->
<!--          <el-input v-model="form.workCalendar" placeholder="请输入工作日历" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="预留字段1" prop="spareField1">-->
<!--          <el-input v-model="form.spareField1" placeholder="请输入预留字段1" />-->
<!--        </el-form-item>-->
<!--        <el-form-item label="预留字段2" prop="spareField2">-->
<!--          <el-input v-model="form.spareField2" placeholder="请输入预留字段2" />-->
<!--        </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 { listLineInfo, getLineInfo, delLineInfo, addLineInfo, updateLineInfo } from "@/api/main/bs/lineInfo/lineInfo";
export default {
  name: "LineInfo",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // äº§çº¿ä¿¡æ¯è¡¨æ ¼æ•°æ®
      lineInfoList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      advancedShowSearch: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        lineCode: null,
        lineName: null,
        workshopCode: null,
        workCalendar: null,
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
        lineCode: [
          { required: true, message: "产线编号不能为空", trigger: "blur" }
        ],
        lineName: [
          { required: true, message: "产线名称不能为空", trigger: "blur" }
        ],
        workshopCode: [
          { required: true, message: "车间编号不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    advancedQuery(){
      this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
    },
    /** æŸ¥è¯¢äº§çº¿ä¿¡æ¯åˆ—表 */
    getList() {
      this.loading = true;
      listLineInfo(this.queryParams).then(response => {
        this.lineInfoList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        lineCode: null,
        lineName: null,
        workshopCode: null,
        workCalendar: null,
        spareField1: null,
        spareField2: null,
        remarks: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: 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.title = "添加产线信息";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getLineInfo(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改产线信息";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateLineInfo(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addLineInfo(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 delLineInfo(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('main/lineInfo/export', {
        ...this.queryParams
      }, `lineInfo_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
jcdm-ui/src/views/main/om/workReport/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,373 @@
<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="workOrderCode">
          <el-input
            v-model="queryParams.workOrderCode"
            placeholder="请输入工单编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="SFC总成序列号" prop="sfcCode" label-width="110px">
          <el-input
            v-model="queryParams.sfcCode"
            placeholder="请输入SFC总成序列号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px">
        <el-form-item label="产品编号" prop="productCode">
          <el-input
            v-model="queryParams.productCode"
            placeholder="请输入产品编号"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="产品名称" prop="productName">
          <el-input
            v-model="queryParams.productName"
            placeholder="请输入产品名称"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </el-form-item>
        <el-form-item label="是否合格" prop="status">
          <el-input
            v-model="queryParams.status"
            placeholder="请输入是否合格"
            clearable
            @keyup.enter.native="handleQuery"
          />
        </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="['om:workReport: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="['om:' +
           '']"
        >修改</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="['om:workReport: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="['om:workReport:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="workReportList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
<!--      <el-table-column label="工单编号" align="center" prop="workOrderCode" />-->
      <el-table-column label="工单编号" width="130" align="center">
        <template slot-scope="scope">
          <router-link :to="{path: '/main/route-data/index/', query: {workOrderCode: scope.row.workOrderCode} }" class="link-type">
            <span>{{ scope.row.workOrderCode }}</span>
          </router-link>
        </template>
      </el-table-column>
      <el-table-column label="SFC总成序列号" align="center" prop="sfcCode" />
      <el-table-column label="产品编号" align="center" prop="productCode" />
      <el-table-column label="产品名称" align="center" prop="productName" />
      <el-table-column label="上线时间" align="center" prop="upTime" />
      <el-table-column label="下线时间" align="center" prop="offlineTime" />
      <el-table-column label="是否合格" align="center" prop="status">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.status"/>
        </template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remark" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['om:workReport:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['om:workReport: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 :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="工单编号" prop="workOrderCode">
          <el-input v-model="form.workOrderCode" placeholder="请输入工单编号" />
        </el-form-item>
        <el-form-item label="SFC总成序列号" prop="sfcCode">
          <el-input v-model="form.sfcCode" placeholder="请输入SFC总成序列号" />
        </el-form-item>
        <el-form-item label="产品编号" prop="productCode">
          <el-input v-model="form.productCode" placeholder="请输入产品编号" />
        </el-form-item>
        <el-form-item label="产品名称" prop="productName">
          <el-input v-model="form.productName" placeholder="请输入产品名称" />
        </el-form-item>
<!--        <el-form-item label="是否合格" prop="status">-->
<!--          <el-input v-model="form.status" placeholder="请输入产品名称" />-->
<!--        </el-form-item>-->
        <el-form-item label="是否合格" prop="status">
          <el-radio-group v-model="form.status">
            <el-radio
              v-for="dict in dict.type.sys_yes_no"
              :key="dict.value"
              :label="dict.value"
            >{{dict.label}}</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" 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 { listWorkReport, getWorkReport, delWorkReport, addWorkReport, updateWorkReport } from "@/api/main/om/workReport/workReport";
export default {
  name: "WorkReport",
  dicts: ['sys_yes_no'],
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // æŠ¥å·¥è®°å½• è¡¨è¡¨æ ¼æ•°æ®
      workReportList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      advancedShowSearch: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        workOrderCode: null,
        sfcCode: null,
        productCode: null,
        productName: null,
        upTime: null,
        offlineTime: null,
        status: null,
        createUser: null,
        updateUser: null,
        spareField1: null,
        spareField2: null,
        spareField3: null,
        spareField4: null
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
        workOrderCode: [
          { required: true, message: "请输入工单编号", trigger: "blur" }
        ],
        sfcCode: [
          { required: true, message: "请输入SFC总成序列号", trigger: "blur" }
        ],
        productCode: [
          { required: true, message: "请输入产品编号", trigger: "blur" }
        ],
        productName: [
          { required: true, message: "请输入产品名称", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    advancedQuery(){
      this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
    },
    /** æŸ¥è¯¢æŠ¥å·¥è®°å½• è¡¨åˆ—表 */
    getList() {
      this.loading = true;
      listWorkReport(this.queryParams).then(response => {
        this.workReportList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        workOrderCode: null,
        sfcCode: null,
        productCode: null,
        productName: null,
        upTime: null,
        offlineTime: null,
        status: null,
        createUser: null,
        createTime: null,
        updateUser: null,
        updateTime: null,
        remark: 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.title = "添加报工记录表";
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getWorkReport(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改报工记录表";
      });
    },
    /** æäº¤æŒ‰é’® */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateWorkReport(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addWorkReport(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 delWorkReport(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('om/workReport/export', {
        ...this.queryParams
      }, `workReport_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>