hdy
2023-12-23 8d1643af93c55e5a2e7ddf2b24d604ca1b4ac59d
车间信息、产线信息问题修改,返修管理模块增加
已修改7个文件
已添加8个文件
1126 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/domain/BsLineInfo.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/domain/BsWorkshopInfo.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/controller/RmRepairRecordController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/domain/RmRepairRecord.java 207 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/mapper/RmRepairRecordMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/service/IRmRepairRecordService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/service/impl/RmRepairRecordServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/lineInfo/BsLineInfoMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/workshop/BsWorkshopInfoMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/rm/repairRecord/RmRepairRecordMapper.xml 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/rm/repairRecord/repairRecord.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/lineInfo/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/processes/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/workshop/index.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/rm/repairRecord/index.vue 337 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/bs/lineInfo/domain/BsLineInfo.java
@@ -54,6 +54,11 @@
    @Excel(name = "更改用户")
    private String updateUser;
    @Excel(name = "车间名称")
    private String workshopName;
    @Excel(name = "状态")
    private String status;
    public void setId(Long id)
    {
        this.id = id;
@@ -81,6 +86,15 @@
    {
        return lineName;
    }
    public void setWorkshopName(String workshopName)
    {
        this.workshopName = workshopName;
    }
    public String getWorkshopName()
    {
        return workshopName;
    }
    public void setWorkshopCode(String workshopCode)
    {
        this.workshopCode = workshopCode;
@@ -98,6 +112,15 @@
    public String getWorkCalendar()
    {
        return workCalendar;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }
    public String getStatus()
    {
        return status;
    }
    public void setSpareField1(String spareField1)
    {
@@ -160,6 +183,8 @@
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("workshopName", getWorkshopName())
            .append("status", getStatus())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/bs/workshop/domain/BsWorkshopInfo.java
@@ -44,6 +44,9 @@
    @Excel(name = "更新人")
    private String updateUser;
    @Excel(name = "状态")
    private String status;
    public void setId(Long id) 
    {
        this.id = id;
@@ -89,6 +92,11 @@
    {
        return spareField2;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }
    public String getStatus() {return status;}
    public void setRemarks(String remarks) 
    {
        this.remarks = remarks;
@@ -130,6 +138,7 @@
            .append("createTime", getCreateTime())
            .append("updateUser", getUpdateUser())
            .append("updateTime", getUpdateTime())
            .append("status", getStatus())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/controller/RmRepairRecordController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.rm.repairRecord.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.rm.repairRecord.domain.RmRepairRecord;
import com.jcdm.main.rm.repairRecord.service.IRmRepairRecordService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * è¿”修记录Controller
 *
 * @author Yi
 * @date 2023-12-22
 */
@RestController
@RequestMapping("/rm/repairRecord")
public class RmRepairRecordController extends BaseController
{
    @Autowired
    private IRmRepairRecordService rmRepairRecordService;
    /**
     * æŸ¥è¯¢è¿”修记录列表
     */
    @PreAuthorize("@ss.hasPermi('rm:repairRecord:list')")
    @GetMapping("/list")
    public TableDataInfo list(RmRepairRecord rmRepairRecord)
    {
        startPage();
        List<RmRepairRecord> list = rmRepairRecordService.selectRmRepairRecordList(rmRepairRecord);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºè¿”修记录列表
     */
    @PreAuthorize("@ss.hasPermi('rm:repairRecord:export')")
    @Log(title = "返修记录", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, RmRepairRecord rmRepairRecord)
    {
        List<RmRepairRecord> list = rmRepairRecordService.selectRmRepairRecordList(rmRepairRecord);
        ExcelUtil<RmRepairRecord> util = new ExcelUtil<RmRepairRecord>(RmRepairRecord.class);
        util.exportExcel(response, list, "返修记录数据");
    }
    /**
     * èŽ·å–返修记录详细信息
     */
    @PreAuthorize("@ss.hasPermi('rm:repairRecord:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(rmRepairRecordService.selectRmRepairRecordById(id));
    }
    /**
     * æ–°å¢žè¿”修记录
     */
    @PreAuthorize("@ss.hasPermi('rm:repairRecord:add')")
    @Log(title = "返修记录", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody RmRepairRecord rmRepairRecord)
    {
        return toAjax(rmRepairRecordService.insertRmRepairRecord(rmRepairRecord));
    }
    /**
     * ä¿®æ”¹è¿”修记录
     */
    @PreAuthorize("@ss.hasPermi('rm:repairRecord:edit')")
    @Log(title = "返修记录", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody RmRepairRecord rmRepairRecord)
    {
        return toAjax(rmRepairRecordService.updateRmRepairRecord(rmRepairRecord));
    }
    /**
     * åˆ é™¤è¿”修记录
     */
    @PreAuthorize("@ss.hasPermi('rm:repairRecord:remove')")
    @Log(title = "返修记录", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(rmRepairRecordService.deleteRmRepairRecordByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/domain/RmRepairRecord.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,207 @@
package com.jcdm.main.rm.repairRecord.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;
/**
 * è¿”修记录对象 rm_repair_record
 *
 * @author Yi
 * @date 2023-12-22
 */
public class RmRepairRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** æ€»æˆç¼–码 */
    @Excel(name = "总成编码")
    private String snCode;
    /** è¿”修标识 */
    @Excel(name = "返修标识")
    private String repairIdentification;
    /** ç®±ä½“编码 */
    @Excel(name = "箱体编码")
    private String boxCode;
    /** å·¥åºç¼–码 */
    @Excel(name = "工序编码")
    private String processesCode;
    /** åŽŸç»“æžœ */
    @Excel(name = "原结果")
    private String originalResult;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ–°ç”¨æˆ· */
    @Excel(name = "更新用户")
    private String updateUser;
    /** è¿”修结果 */
    @Excel(name = "返修结果")
    private String repairResults;
    /** çŠ¶æ€ */
    @Excel(name = "状态")
    private String status;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    /** é¢„留字段1 */
    @Excel(name = "预留字段1")
    private String spareField1;
    /** é¢„留字段2 */
    @Excel(name = "预留字段2")
    private String spareField2;
    public void setId(Long id)
    {
        this.id = id;
    }
    public Long getId()
    {
        return id;
    }
    public void setSnCode(String snCode)
    {
        this.snCode = snCode;
    }
    public String getSnCode()
    {
        return snCode;
    }
    public void setRepairIdentification(String repairIdentification)
    {
        this.repairIdentification = repairIdentification;
    }
    public String getRepairIdentification()
    {
        return repairIdentification;
    }
    public void setBoxCode(String boxCode)
    {
        this.boxCode = boxCode;
    }
    public String getBoxCode()
    {
        return boxCode;
    }
    public void setProcessesCode(String processesCode)
    {
        this.processesCode = processesCode;
    }
    public String getProcessesCode()
    {
        return processesCode;
    }
    public void setOriginalResult(String originalResult)
    {
        this.originalResult = originalResult;
    }
    public String getOriginalResult()
    {
        return originalResult;
    }
    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 setRepairResults(String repairResults)
    {
        this.repairResults = repairResults;
    }
    public String getRepairResults()
    {
        return repairResults;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }
    public String getStatus()
    {
        return status;
    }
    public void setRemarks(String remarks)
    {
        this.remarks = remarks;
    }
    public String getRemarks()
    {
        return remarks;
    }
    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;
    }
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("snCode", getSnCode())
            .append("repairIdentification", getRepairIdentification())
            .append("boxCode", getBoxCode())
            .append("processesCode", getProcessesCode())
            .append("originalResult", getOriginalResult())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("updateUser", getUpdateUser())
            .append("repairResults", getRepairResults())
            .append("status", getStatus())
            .append("remarks", getRemarks())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/mapper/RmRepairRecordMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.rm.repairRecord.mapper;
import java.util.List;
import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord;
/**
 * è¿”修记录Mapper接口
 *
 * @author Yi
 * @date 2023-12-22
 */
public interface RmRepairRecordMapper
{
    /**
     * æŸ¥è¯¢è¿”修记录
     *
     * @param id è¿”修记录主键
     * @return è¿”修记录
     */
    public RmRepairRecord selectRmRepairRecordById(Long id);
    /**
     * æŸ¥è¯¢è¿”修记录列表
     *
     * @param rmRepairRecord è¿”修记录
     * @return è¿”修记录集合
     */
    public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord);
    /**
     * æ–°å¢žè¿”修记录
     *
     * @param rmRepairRecord è¿”修记录
     * @return ç»“æžœ
     */
    public int insertRmRepairRecord(RmRepairRecord rmRepairRecord);
    /**
     * ä¿®æ”¹è¿”修记录
     *
     * @param rmRepairRecord è¿”修记录
     * @return ç»“æžœ
     */
    public int updateRmRepairRecord(RmRepairRecord rmRepairRecord);
    /**
     * åˆ é™¤è¿”修记录
     *
     * @param id è¿”修记录主键
     * @return ç»“æžœ
     */
    public int deleteRmRepairRecordById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤è¿”修记录
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteRmRepairRecordByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/service/IRmRepairRecordService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.rm.repairRecord.service;
import java.util.List;
import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord;
/**
 * è¿”修记录Service接口
 *
 * @author Yi
 * @date 2023-12-22
 */
public interface IRmRepairRecordService
{
    /**
     * æŸ¥è¯¢è¿”修记录
     *
     * @param id è¿”修记录主键
     * @return è¿”修记录
     */
    public RmRepairRecord selectRmRepairRecordById(Long id);
    /**
     * æŸ¥è¯¢è¿”修记录列表
     *
     * @param rmRepairRecord è¿”修记录
     * @return è¿”修记录集合
     */
    public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord);
    /**
     * æ–°å¢žè¿”修记录
     *
     * @param rmRepairRecord è¿”修记录
     * @return ç»“æžœ
     */
    public int insertRmRepairRecord(RmRepairRecord rmRepairRecord);
    /**
     * ä¿®æ”¹è¿”修记录
     *
     * @param rmRepairRecord è¿”修记录
     * @return ç»“æžœ
     */
    public int updateRmRepairRecord(RmRepairRecord rmRepairRecord);
    /**
     * æ‰¹é‡åˆ é™¤è¿”修记录
     *
     * @param ids éœ€è¦åˆ é™¤çš„返修记录主键集合
     * @return ç»“æžœ
     */
    public int deleteRmRepairRecordByIds(Long[] ids);
    /**
     * åˆ é™¤è¿”修记录信息
     *
     * @param id è¿”修记录主键
     * @return ç»“æžœ
     */
    public int deleteRmRepairRecordById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairRecord/service/impl/RmRepairRecordServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.rm.repairRecord.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.rm.repairRecord.mapper.RmRepairRecordMapper;
import com.jcdm.main.rm.repairRecord.domain.RmRepairRecord;
import com.jcdm.main.rm.repairRecord.service.IRmRepairRecordService;
/**
 * è¿”修记录Service业务层处理
 *
 * @author Yi
 * @date 2023-12-22
 */
@Service
public class RmRepairRecordServiceImpl implements IRmRepairRecordService
{
    @Autowired
    private RmRepairRecordMapper rmRepairRecordMapper;
    /**
     * æŸ¥è¯¢è¿”修记录
     *
     * @param id è¿”修记录主键
     * @return è¿”修记录
     */
    @Override
    public RmRepairRecord selectRmRepairRecordById(Long id)
    {
        return rmRepairRecordMapper.selectRmRepairRecordById(id);
    }
    /**
     * æŸ¥è¯¢è¿”修记录列表
     *
     * @param rmRepairRecord è¿”修记录
     * @return è¿”修记录
     */
    @Override
    public List<RmRepairRecord> selectRmRepairRecordList(RmRepairRecord rmRepairRecord)
    {
        return rmRepairRecordMapper.selectRmRepairRecordList(rmRepairRecord);
    }
    /**
     * æ–°å¢žè¿”修记录
     *
     * @param rmRepairRecord è¿”修记录
     * @return ç»“æžœ
     */
    @Override
    public int insertRmRepairRecord(RmRepairRecord rmRepairRecord)
    {
        rmRepairRecord.setCreateTime(DateUtils.getNowDate());
        return rmRepairRecordMapper.insertRmRepairRecord(rmRepairRecord);
    }
    /**
     * ä¿®æ”¹è¿”修记录
     *
     * @param rmRepairRecord è¿”修记录
     * @return ç»“æžœ
     */
    @Override
    public int updateRmRepairRecord(RmRepairRecord rmRepairRecord)
    {
        rmRepairRecord.setUpdateTime(DateUtils.getNowDate());
        return rmRepairRecordMapper.updateRmRepairRecord(rmRepairRecord);
    }
    /**
     * æ‰¹é‡åˆ é™¤è¿”修记录
     *
     * @param ids éœ€è¦åˆ é™¤çš„返修记录主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteRmRepairRecordByIds(Long[] ids)
    {
        return rmRepairRecordMapper.deleteRmRepairRecordByIds(ids);
    }
    /**
     * åˆ é™¤è¿”修记录信息
     *
     * @param id è¿”修记录主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteRmRepairRecordById(Long id)
    {
        return rmRepairRecordMapper.deleteRmRepairRecordById(id);
    }
}
jcdm-main/src/main/resources/mapper/bs/lineInfo/BsLineInfoMapper.xml
@@ -17,10 +17,12 @@
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="workshopName"    column="workshop_name"    />
        <result property="status"    column="status"    />
    </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
        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,workshop_name,status from bs_line_info
    </sql>
    <select id="selectBsLineInfoList" parameterType="BsLineInfo" resultMap="BsLineInfoResult">
@@ -52,6 +54,8 @@
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="workshopName != null">workshop_name,</if>
            <if test="status != null">status,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="lineCode != null and lineCode != ''">#{lineCode},</if>
@@ -65,6 +69,8 @@
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="workshopName != null">#{workshopName},</if>
            <if test="status != null">#{status},</if>
         </trim>
    </insert>
@@ -82,6 +88,8 @@
            <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="workshopName != null">workshop_name = #{workshopName},</if>
            <if test="status != null">status = #{status},</if>
        </trim>
        where id = #{id}
    </update>
jcdm-main/src/main/resources/mapper/bs/workshop/BsWorkshopInfoMapper.xml
@@ -15,10 +15,11 @@
        <result property="createTime"    column="create_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="updateTime"    column="update_time"    />
        <result property="status"    column="status"    />
    </resultMap>
    <sql id="selectBsWorkshopInfoVo">
        select id, workshop_code, workshop_name, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time from bs_workshop_info
        select id, workshop_code, workshop_name, spare_field_1, spare_field_2, remarks, create_user, create_time, update_user, update_time,status from bs_workshop_info
    </sql>
    <select id="selectBsWorkshopInfoList" parameterType="BsWorkshopInfo" resultMap="BsWorkshopInfoResult">
@@ -49,6 +50,7 @@
            <if test="createTime != null">create_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="status != null">status,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
@@ -61,6 +63,7 @@
            <if test="createTime != null">#{createTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="status != null">#{status},</if>
         </trim>
    </insert>
@@ -76,6 +79,7 @@
            <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="status != null">status = #{status},</if>
        </trim>
        where id = #{id}
    </update>
jcdm-main/src/main/resources/mapper/rm/repairRecord/RmRepairRecordMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,119 @@
<?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.rm.repairRecord.mapper.RmRepairRecordMapper">
    <resultMap type="RmRepairRecord" id="RmRepairRecordResult">
        <result property="id"    column="id"    />
        <result property="snCode"    column="sn_code"    />
        <result property="repairIdentification"    column="repair_identification"    />
        <result property="boxCode"    column="box_code"    />
        <result property="processesCode"    column="processes_code"    />
        <result property="originalResult"    column="original_result"    />
        <result property="createUser"    column="create_user"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
        <result property="updateUser"    column="update_user"    />
        <result property="repairResults"    column="repair_results"    />
        <result property="status"    column="status"    />
        <result property="remarks"    column="remarks"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
    </resultMap>
    <sql id="selectRmRepairRecordVo">
        select id, sn_code, repair_identification, box_code, processes_code, original_result, create_user, create_time, update_time, update_user, repair_results, status, remarks, spare_field_1, spare_field_2,repair_time from rm_repair_record
    </sql>
    <select id="selectRmRepairRecordList" parameterType="RmRepairRecord" resultMap="RmRepairRecordResult">
        <include refid="selectRmRepairRecordVo"/>
        <where>
            <if test="snCode != null  and snCode != ''"> and sn_code = #{snCode}</if>
            <if test="repairIdentification != null  and repairIdentification != ''"> and repair_identification = #{repairIdentification}</if>
            <if test="boxCode != null  and boxCode != ''"> and box_code = #{boxCode}</if>
            <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
            <if test="originalResult != null  and originalResult != ''"> and original_result = #{originalResult}</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="repairResults != null  and repairResults != ''"> and repair_results = #{repairResults}</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</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>
        </where>
    </select>
    <select id="selectRmRepairRecordById" parameterType="Long" resultMap="RmRepairRecordResult">
        <include refid="selectRmRepairRecordVo"/>
        where id = #{id}
    </select>
    <insert id="insertRmRepairRecord" parameterType="RmRepairRecord" useGeneratedKeys="true" keyProperty="id">
        insert into rm_repair_record
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="snCode != null">sn_code,</if>
            <if test="repairIdentification != null">repair_identification,</if>
            <if test="boxCode != null">box_code,</if>
            <if test="processesCode != null">processes_code,</if>
            <if test="originalResult != null">original_result,</if>
            <if test="createUser != null">create_user,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="updateUser != null">update_user,</if>
            <if test="repairResults != null">repair_results,</if>
            <if test="status != null">status,</if>
            <if test="remarks != null">remarks,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="snCode != null">#{snCode},</if>
            <if test="repairIdentification != null">#{repairIdentification},</if>
            <if test="boxCode != null">#{boxCode},</if>
            <if test="processesCode != null">#{processesCode},</if>
            <if test="originalResult != null">#{originalResult},</if>
            <if test="createUser != null">#{createUser},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="updateUser != null">#{updateUser},</if>
            <if test="repairResults != null">#{repairResults},</if>
            <if test="status != null">#{status},</if>
            <if test="remarks != null">#{remarks},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
         </trim>
    </insert>
    <update id="updateRmRepairRecord" parameterType="RmRepairRecord">
        update rm_repair_record
        <trim prefix="SET" suffixOverrides=",">
            <if test="snCode != null">sn_code = #{snCode},</if>
            <if test="repairIdentification != null">repair_identification = #{repairIdentification},</if>
            <if test="boxCode != null">box_code = #{boxCode},</if>
            <if test="processesCode != null">processes_code = #{processesCode},</if>
            <if test="originalResult != null">original_result = #{originalResult},</if>
            <if test="createUser != null">create_user = #{createUser},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="updateUser != null">update_user = #{updateUser},</if>
            <if test="repairResults != null">repair_results = #{repairResults},</if>
            <if test="status != null">status = #{status},</if>
            <if test="remarks != null">remarks = #{remarks},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteRmRepairRecordById" parameterType="Long">
        delete from rm_repair_record where id = #{id}
    </delete>
    <delete id="deleteRmRepairRecordByIds" parameterType="String">
        delete from rm_repair_record where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/rm/repairRecord/repairRecord.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢è¿”修记录列表
export function listRepairRecord(query) {
  return request({
    url: '/rm/repairRecord/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢è¿”修记录详细
export function getRepairRecord(id) {
  return request({
    url: '/rm/repairRecord/' + id,
    method: 'get'
  })
}
// æ–°å¢žè¿”修记录
export function addRepairRecord(data) {
  return request({
    url: '/rm/repairRecord',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹è¿”修记录
export function updateRepairRecord(data) {
  return request({
    url: '/rm/repairRecord',
    method: 'put',
    data: data
  })
}
// åˆ é™¤è¿”修记录
export function delRepairRecord(id) {
  return request({
    url: '/rm/repairRecord/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/bs/lineInfo/index.vue
@@ -92,6 +92,11 @@
        </el-table-column>
        <el-table-column label="车间名称" align="center" prop="workshopName">
        </el-table-column>
        <el-table-column label="状态" align="center" prop="status" width="80">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
          </template>
        </el-table-column>
        <el-table-column label="备注" align="center" prop="remarks">
        </el-table-column>
        <el-table-column label="创建人" align="center" prop="createUser" width="80">
@@ -179,8 +184,27 @@
        <el-form-item label="车间编号" prop="workshopCode">
          <el-input v-model="form.workshopCode" placeholder="请输入车间编号" />
        </el-form-item>
        <el-form-item style="margin-left: -15px" label="车间编号" prop="workshopCode">
          <el-select style="width: 93%" v-model="form.workshopCode" placeholder="请选择车间编号">
            <el-option
              v-for="item in lineOptions"
              :key="item.lineCode"
              :label="item.lineName"
              :value="item.lineCode">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="车间名称" prop="workshopName">
          <el-input v-model="form.workshopName" 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_normal_disable"
              :key="dict.value"
              :label="dict.value"
            >{{dict.label}}</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" placeholder="请输入备注" />
@@ -200,6 +224,7 @@
export default {
  name: "LineInfo",
  dicts: ['sys_normal_disable'],
  data() {
    return {
      // é®ç½©å±‚
@@ -282,6 +307,7 @@
        id: null,
        lineCode: null,
        lineName: null,
        workshopName: null,
        workshopCode: null,
        workCalendar: null,
        spareField1: null,
@@ -290,6 +316,7 @@
        createUser: null,
        createTime: null,
        updateUser: null,
        status: "0",
        updateTime: null
      };
      this.resetForm("form");
jcdm-ui/src/views/main/bs/processes/index.vue
@@ -79,8 +79,8 @@
      </el-table-column>
      <el-table-column label="工序名称" align="center" prop="processesName">
      </el-table-column>
      <el-table-column label="工序类型" align="center" prop="processesType">
      </el-table-column>
<!--      <el-table-column label="工序类型" align="center" prop="processesType">-->
<!--      </el-table-column>-->
      <el-table-column label="状态" align="center" prop="status" width="80">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
jcdm-ui/src/views/main/bs/workshop/index.vue
@@ -81,6 +81,11 @@
        </el-table-column>
        <el-table-column :show-overflow-tooltip='true' label="车间名称" align="center" prop="workshopName">
        </el-table-column>
        <el-table-column label="状态" align="center" prop="status" width="80">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
          </template>
        </el-table-column>
        <el-table-column label="备注" align="center" prop="remarks">
        </el-table-column>
        <el-table-column label="创建人" align="center" prop="createUser" width="80">
@@ -141,6 +146,15 @@
        <el-form-item label="车间名称" prop="workshopName">
          <el-input v-model="form.workshopName" 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_normal_disable"
              :key="dict.value"
              :label="dict.value"
            >{{dict.label}}</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" placeholder="请输入备注" />
        </el-form-item>
@@ -158,6 +172,7 @@
export default {
  name: "Workshop",
  dicts: ['sys_normal_disable'],
  data() {
    return {
      select: '',
@@ -240,6 +255,7 @@
        createUser: null,
        createTime: null,
        updateUser: null,
        status: "0",
        updateTime: null
      };
      this.resetForm("form");
jcdm-ui/src/views/main/rm/repairRecord/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,337 @@
<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="repairIdentification">
        <el-input
          v-model="queryParams.repairIdentification"
          placeholder="请输入返修标识"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="箱体编码" prop="boxCode">
        <el-input
          v-model="queryParams.boxCode"
          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="['rm:repairRecord: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="['rm:repairRecord: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="['rm:repairRecord: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="['rm:repairRecord:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" border :data="repairRecordList" @selection-change="handleSelectionChange" v-if="repairRecordList.length > 0">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="返修标识" align="center" prop="repairIdentification" />
      <el-table-column label="箱体编码" align="center" prop="boxCode" />
      <el-table-column label="工序编码" align="center" prop="processesCode" />
      <el-table-column label="原结果" align="center" prop="originalResult" />
      <el-table-column label="返修结果" align="center" prop="repairResults" />
      <el-table-column label="创建用户" align="center" prop="createUser" />
      <el-table-column label="创建时间" align="center" prop="createTime" />
      <el-table-column label="返修时间" align="center" prop="repairTime" />
      <el-table-column label="状态" align="center" prop="status" width="80">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
        </template>
      </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="['rm:repairRecord:edit']"-->
<!--          >修改</el-button>-->
<!--          <el-button-->
<!--            size="mini"-->
<!--            type="text"-->
<!--            icon="el-icon-delete"-->
<!--            @click="handleDelete(scope.row)"-->
<!--            v-hasPermi="['rm:repairRecord: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-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="snCode">
          <el-input v-model="form.snCode" placeholder="请输入总成编码" />
        </el-form-item>
        <el-form-item label="返修标识" prop="repairIdentification">
          <el-input v-model="form.repairIdentification" placeholder="请输入返修标识" />
        </el-form-item>
        <el-form-item label="箱体编码" prop="boxCode">
          <el-input v-model="form.boxCode" placeholder="请输入箱体编码" />
        </el-form-item>
        <el-form-item label="工序编码" prop="processesCode">
          <el-input v-model="form.processesCode" placeholder="请输入工序编码" />
        </el-form-item>
        <el-form-item label="原结果" prop="originalResult">
          <el-input v-model="form.originalResult" 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-item label="返修结果" prop="repairResults">
          <el-input v-model="form.repairResults" placeholder="请输入返修结果" />
        </el-form-item>
        <el-form-item label="备注" prop="remarks">
          <el-input v-model="form.remarks" 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="status">
          <el-radio-group v-model="form.status">
            <el-radio
              v-for="dict in dict.type.sys_normal_disable"
              :key="dict.value"
              :label="dict.value"
            >{{dict.label}}</el-radio>
          </el-radio-group>
        </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 { listRepairRecord, getRepairRecord, delRepairRecord, addRepairRecord, updateRepairRecord } from "@/api/main/rm/repairRecord/repairRecord";
export default {
  name: "RepairRecord",
  dicts: ['sys_normal_disable'],
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // è¿”修记录表格数据
      repairRecordList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        snCode: null,
        repairIdentification: null,
        boxCode: null,
        processesCode: null,
        originalResult: null,
        createUser: null,
        updateUser: null,
        repairResults: null,
        status: null,
        remarks: null,
        spareField1: null,
        spareField2: null
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** æŸ¥è¯¢è¿”修记录列表 */
    getList() {
      this.loading = true;
      listRepairRecord(this.queryParams).then(response => {
        this.repairRecordList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        snCode: null,
        repairIdentification: null,
        boxCode: null,
        processesCode: null,
        originalResult: null,
        createUser: null,
        createTime: null,
        updateTime: null,
        updateUser: null,
        repairResults: null,
        status: "0",
        remarks: null,
        spareField1: null,
        repairTime: null,
        spareField2: 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
      getRepairRecord(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) {
            updateRepairRecord(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addRepairRecord(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 delRepairRecord(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('rm/repairRecord/export', {
        ...this.queryParams
      }, `repairRecord_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>