懒羊羊
2023-12-26 6d1e00580dcd7d419ada2c816baa6b8c9c1ac579
Merge remote-tracking branch 'origin/master'
已修改2个文件
已添加8个文件
1142 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/controller/RmRepairDataController.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/domain/RmRepairData.java 233 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/mapper/RmRepairDataMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/service/IRmRepairDataService.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/service/impl/RmRepairDataServiceImpl.java 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/bs/processes/BsProcessesInfoMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/resources/mapper/rm/repairData/RmRepairDataMapper.xml 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/api/main/rm/repairData/repairData.js 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/bs/processes/index.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/rm/repairData/index.vue 398 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/controller/RmRepairDataController.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,104 @@
package com.jcdm.main.rm.repairData.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.repairData.domain.RmRepairData;
import com.jcdm.main.rm.repairData.service.IRmRepairDataService;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
/**
 * è¿”修数据Controller
 *
 * @author Yi
 * @date 2023-12-22
 */
@RestController
@RequestMapping("/rm/repairData")
public class RmRepairDataController extends BaseController
{
    @Autowired
    private IRmRepairDataService rmRepairDataService;
    /**
     * æŸ¥è¯¢è¿”修数据列表
     */
    @PreAuthorize("@ss.hasPermi('rm:repairData:list')")
    @GetMapping("/list")
    public TableDataInfo list(RmRepairData rmRepairData)
    {
        startPage();
        List<RmRepairData> list = rmRepairDataService.selectRmRepairDataList(rmRepairData);
        return getDataTable(list);
    }
    /**
     * å¯¼å‡ºè¿”修数据列表
     */
    @PreAuthorize("@ss.hasPermi('rm:repairData:export')")
    @Log(title = "返修数据", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, RmRepairData rmRepairData)
    {
        List<RmRepairData> list = rmRepairDataService.selectRmRepairDataList(rmRepairData);
        ExcelUtil<RmRepairData> util = new ExcelUtil<RmRepairData>(RmRepairData.class);
        util.exportExcel(response, list, "返修数据数据");
    }
    /**
     * èŽ·å–返修数据详细信息
     */
    @PreAuthorize("@ss.hasPermi('rm:repairData:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return success(rmRepairDataService.selectRmRepairDataById(id));
    }
    /**
     * æ–°å¢žè¿”修数据
     */
    @PreAuthorize("@ss.hasPermi('rm:repairData:add')")
    @Log(title = "返修数据", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody RmRepairData rmRepairData)
    {
        return toAjax(rmRepairDataService.insertRmRepairData(rmRepairData));
    }
    /**
     * ä¿®æ”¹è¿”修数据
     */
    @PreAuthorize("@ss.hasPermi('rm:repairData:edit')")
    @Log(title = "返修数据", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody RmRepairData rmRepairData)
    {
        return toAjax(rmRepairDataService.updateRmRepairData(rmRepairData));
    }
    /**
     * åˆ é™¤è¿”修数据
     */
    @PreAuthorize("@ss.hasPermi('rm:repairData:remove')")
    @Log(title = "返修数据", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(rmRepairDataService.deleteRmRepairDataByIds(ids));
    }
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/domain/RmRepairData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,233 @@
package com.jcdm.main.rm.repairData.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_data
 *
 * @author Yi
 * @date 2023-12-22
 */
public class RmRepairData extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    /** ä¸»é”®id */
    private Long id;
    /** æ€»æˆç¼–码 */
    @Excel(name = "总成编码")
    private String snCode;
    /** ç®±ä½“编码 */
    @Excel(name = "箱体编码")
    private String boxCode;
    /** å·¥åºç¼–码 */
    @Excel(name = "工序编码")
    private String processesCode;
    /** æ‹§ç´§æ¬¡æ•° */
    @Excel(name = "拧紧次数")
    private String tightenFrequency;
    /** æ‹§ç´§é¢—æ•° */
    @Excel(name = "拧紧颗数")
    private String tightenPiecesNumber;
    /** æ‰­åŠ› */
    @Excel(name = "扭力")
    private String torqueForce;
    /** è§’度 */
    @Excel(name = "角度")
    private String angle;
    /** ç»“æžœ */
    @Excel(name = "结果")
    private String result;
    /** åˆ›å»ºç”¨æˆ· */
    @Excel(name = "创建用户")
    private String createUser;
    /** æ›´æ–°ç”¨æˆ· */
    @Excel(name = "更新用户")
    private String updateUser;
    /** å¤‡æ³¨ */
    @Excel(name = "备注")
    private String remarks;
    /** é¢„留字段1 */
    @Excel(name = "预留字段1")
    private String spareField1;
    /** é¢„留字段2 */
    @Excel(name = "预留字段2")
    private String spareField2;
    @Excel(name = "工位")
    private String station;
    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 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 setTightenFrequency(String tightenFrequency)
    {
        this.tightenFrequency = tightenFrequency;
    }
    public String getTightenFrequency()
    {
        return tightenFrequency;
    }
    public void setTightenPiecesNumber(String tightenPiecesNumber)
    {
        this.tightenPiecesNumber = tightenPiecesNumber;
    }
    public String getTightenPiecesNumber()
    {
        return tightenPiecesNumber;
    }
    public void setTorqueForce(String torqueForce)
    {
        this.torqueForce = torqueForce;
    }
    public String getTorqueForce()
    {
        return torqueForce;
    }
    public void setAngle(String angle)
    {
        this.angle = angle;
    }
    public String getAngle()
    {
        return angle;
    }
    public void setStation(String station)
    {
        this.station = station;
    }
    public String getStation()
    {
        return station;
    }
    public void setResult(String result)
    {
        this.result = result;
    }
    public String getResult()
    {
        return result;
    }
    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 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("boxCode", getBoxCode())
            .append("processesCode", getProcessesCode())
            .append("tightenFrequency", getTightenFrequency())
            .append("tightenPiecesNumber", getTightenPiecesNumber())
            .append("torqueForce", getTorqueForce())
            .append("angle", getAngle())
            .append("result", getResult())
            .append("createUser", getCreateUser())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("updateUser", getUpdateUser())
            .append("remarks", getRemarks())
            .append("spareField1", getSpareField1())
            .append("spareField2", getSpareField2())
            .toString();
    }
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/mapper/RmRepairDataMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.rm.repairData.mapper;
import java.util.List;
import com.jcdm.main.rm.repairData.domain.RmRepairData;
/**
 * è¿”修数据Mapper接口
 *
 * @author Yi
 * @date 2023-12-22
 */
public interface RmRepairDataMapper
{
    /**
     * æŸ¥è¯¢è¿”修数据
     *
     * @param id è¿”修数据主键
     * @return è¿”修数据
     */
    public RmRepairData selectRmRepairDataById(Long id);
    /**
     * æŸ¥è¯¢è¿”修数据列表
     *
     * @param rmRepairData è¿”修数据
     * @return è¿”修数据集合
     */
    public List<RmRepairData> selectRmRepairDataList(RmRepairData rmRepairData);
    /**
     * æ–°å¢žè¿”修数据
     *
     * @param rmRepairData è¿”修数据
     * @return ç»“æžœ
     */
    public int insertRmRepairData(RmRepairData rmRepairData);
    /**
     * ä¿®æ”¹è¿”修数据
     *
     * @param rmRepairData è¿”修数据
     * @return ç»“æžœ
     */
    public int updateRmRepairData(RmRepairData rmRepairData);
    /**
     * åˆ é™¤è¿”修数据
     *
     * @param id è¿”修数据主键
     * @return ç»“æžœ
     */
    public int deleteRmRepairDataById(Long id);
    /**
     * æ‰¹é‡åˆ é™¤è¿”修数据
     *
     * @param ids éœ€è¦åˆ é™¤çš„数据主键集合
     * @return ç»“æžœ
     */
    public int deleteRmRepairDataByIds(Long[] ids);
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/service/IRmRepairDataService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
package com.jcdm.main.rm.repairData.service;
import java.util.List;
import com.jcdm.main.rm.repairData.domain.RmRepairData;
/**
 * è¿”修数据Service接口
 *
 * @author Yi
 * @date 2023-12-22
 */
public interface IRmRepairDataService
{
    /**
     * æŸ¥è¯¢è¿”修数据
     *
     * @param id è¿”修数据主键
     * @return è¿”修数据
     */
    public RmRepairData selectRmRepairDataById(Long id);
    /**
     * æŸ¥è¯¢è¿”修数据列表
     *
     * @param rmRepairData è¿”修数据
     * @return è¿”修数据集合
     */
    public List<RmRepairData> selectRmRepairDataList(RmRepairData rmRepairData);
    /**
     * æ–°å¢žè¿”修数据
     *
     * @param rmRepairData è¿”修数据
     * @return ç»“æžœ
     */
    public int insertRmRepairData(RmRepairData rmRepairData);
    /**
     * ä¿®æ”¹è¿”修数据
     *
     * @param rmRepairData è¿”修数据
     * @return ç»“æžœ
     */
    public int updateRmRepairData(RmRepairData rmRepairData);
    /**
     * æ‰¹é‡åˆ é™¤è¿”修数据
     *
     * @param ids éœ€è¦åˆ é™¤çš„返修数据主键集合
     * @return ç»“æžœ
     */
    public int deleteRmRepairDataByIds(Long[] ids);
    /**
     * åˆ é™¤è¿”修数据信息
     *
     * @param id è¿”修数据主键
     * @return ç»“æžœ
     */
    public int deleteRmRepairDataById(Long id);
}
jcdm-main/src/main/java/com/jcdm/main/rm/repairData/service/impl/RmRepairDataServiceImpl.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,96 @@
package com.jcdm.main.rm.repairData.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.repairData.mapper.RmRepairDataMapper;
import com.jcdm.main.rm.repairData.domain.RmRepairData;
import com.jcdm.main.rm.repairData.service.IRmRepairDataService;
/**
 * è¿”修数据Service业务层处理
 *
 * @author Yi
 * @date 2023-12-22
 */
@Service
public class RmRepairDataServiceImpl implements IRmRepairDataService
{
    @Autowired
    private RmRepairDataMapper rmRepairDataMapper;
    /**
     * æŸ¥è¯¢è¿”修数据
     *
     * @param id è¿”修数据主键
     * @return è¿”修数据
     */
    @Override
    public RmRepairData selectRmRepairDataById(Long id)
    {
        return rmRepairDataMapper.selectRmRepairDataById(id);
    }
    /**
     * æŸ¥è¯¢è¿”修数据列表
     *
     * @param rmRepairData è¿”修数据
     * @return è¿”修数据
     */
    @Override
    public List<RmRepairData> selectRmRepairDataList(RmRepairData rmRepairData)
    {
        return rmRepairDataMapper.selectRmRepairDataList(rmRepairData);
    }
    /**
     * æ–°å¢žè¿”修数据
     *
     * @param rmRepairData è¿”修数据
     * @return ç»“æžœ
     */
    @Override
    public int insertRmRepairData(RmRepairData rmRepairData)
    {
        rmRepairData.setCreateTime(DateUtils.getNowDate());
        return rmRepairDataMapper.insertRmRepairData(rmRepairData);
    }
    /**
     * ä¿®æ”¹è¿”修数据
     *
     * @param rmRepairData è¿”修数据
     * @return ç»“æžœ
     */
    @Override
    public int updateRmRepairData(RmRepairData rmRepairData)
    {
        rmRepairData.setUpdateTime(DateUtils.getNowDate());
        return rmRepairDataMapper.updateRmRepairData(rmRepairData);
    }
    /**
     * æ‰¹é‡åˆ é™¤è¿”修数据
     *
     * @param ids éœ€è¦åˆ é™¤çš„返修数据主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteRmRepairDataByIds(Long[] ids)
    {
        return rmRepairDataMapper.deleteRmRepairDataByIds(ids);
    }
    /**
     * åˆ é™¤è¿”修数据信息
     *
     * @param id è¿”修数据主键
     * @return ç»“æžœ
     */
    @Override
    public int deleteRmRepairDataById(Long id)
    {
        return rmRepairDataMapper.deleteRmRepairDataById(id);
    }
}
jcdm-main/src/main/resources/mapper/bs/processes/BsProcessesInfoMapper.xml
@@ -29,12 +29,12 @@
    <select id="selectBsProcessesInfoList" parameterType="BsProcessesInfo" resultMap="BsProcessesInfoResult">
        <include refid="selectBsProcessesInfoVo"/>
<!--        <where>  -->
<!--            <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>-->
<!--            <if test="processesName != null  and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>-->
<!--            <if test="processesType != null  and processesType != ''"> and processes_type like concat('%', #{processesType}, '%')</if>-->
<!--            <if test="status != null  and status != ''"> and status = #{status}</if>-->
<!--        </where>-->
        <where>
            <if test="processesCode != null  and processesCode != ''"> and processes_code = #{processesCode}</if>
            <if test="processesName != null  and processesName != ''"> and processes_name like concat('%', #{processesName}, '%')</if>
            <if test="processesType != null  and processesType != ''"> and processes_type like concat('%', #{processesType}, '%')</if>
            <if test="status != null  and status != ''"> and status = #{status}</if>
        </where>
    </select>
    
    <select id="selectBsProcessesInfoById" parameterType="Long" resultMap="BsProcessesInfoResult">
jcdm-main/src/main/resources/mapper/rm/repairData/RmRepairDataMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,131 @@
<?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.repairData.mapper.RmRepairDataMapper">
    <resultMap type="RmRepairData" id="RmRepairDataResult">
        <result property="id"    column="id"    />
        <result property="snCode"    column="sn_code"    />
        <result property="boxCode"    column="box_code"    />
        <result property="processesCode"    column="processes_code"    />
        <result property="tightenFrequency"    column="tighten_frequency"    />
        <result property="tightenPiecesNumber"    column="tighten_pieces_number"    />
        <result property="torqueForce"    column="torque_force"    />
        <result property="angle"    column="angle"    />
        <result property="result"    column="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="remarks"    column="remarks"    />
        <result property="spareField1"    column="spare_field_1"    />
        <result property="spareField2"    column="spare_field_2"    />
        <result property="station"    column="station"    />
    </resultMap>
    <sql id="selectRmRepairDataVo">
        select id, sn_code, box_code, processes_code, tighten_frequency, tighten_pieces_number, torque_force, angle, result, create_user, create_time, update_time, update_user, remarks, spare_field_1, spare_field_2,station from rm_repair_data
    </sql>
    <select id="selectRmRepairDataList" parameterType="RmRepairData" resultMap="RmRepairDataResult">
        <include refid="selectRmRepairDataVo"/>
        <where>
            <if test="snCode != null  and snCode != ''"> and sn_code = #{snCode}</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="tightenFrequency != null  and tightenFrequency != ''"> and tighten_frequency = #{tightenFrequency}</if>
            <if test="tightenPiecesNumber != null  and tightenPiecesNumber != ''"> and tighten_pieces_number = #{tightenPiecesNumber}</if>
            <if test="torqueForce != null  and torqueForce != ''"> and torque_force = #{torqueForce}</if>
            <if test="angle != null  and angle != ''"> and angle = #{angle}</if>
            <if test="result != null  and result != ''"> and result = #{result}</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="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>
            <if test="station != null  and station != ''"> and station = #{station}</if>
        </where>
    </select>
    <select id="selectRmRepairDataById" parameterType="Long" resultMap="RmRepairDataResult">
        <include refid="selectRmRepairDataVo"/>
        where id = #{id}
    </select>
    <insert id="insertRmRepairData" parameterType="RmRepairData" useGeneratedKeys="true" keyProperty="id">
        insert into rm_repair_data
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="snCode != null">sn_code,</if>
            <if test="boxCode != null">box_code,</if>
            <if test="processesCode != null">processes_code,</if>
            <if test="tightenFrequency != null">tighten_frequency,</if>
            <if test="tightenPiecesNumber != null">tighten_pieces_number,</if>
            <if test="torqueForce != null">torque_force,</if>
            <if test="angle != null">angle,</if>
            <if test="result != null">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="remarks != null">remarks,</if>
            <if test="spareField1 != null">spare_field_1,</if>
            <if test="spareField2 != null">spare_field_2,</if>
            <if test="station != null">station,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="snCode != null">#{snCode},</if>
            <if test="boxCode != null">#{boxCode},</if>
            <if test="processesCode != null">#{processesCode},</if>
            <if test="tightenFrequency != null">#{tightenFrequency},</if>
            <if test="tightenPiecesNumber != null">#{tightenPiecesNumber},</if>
            <if test="torqueForce != null">#{torqueForce},</if>
            <if test="angle != null">#{angle},</if>
            <if test="result != null">#{result},</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="remarks != null">#{remarks},</if>
            <if test="spareField1 != null">#{spareField1},</if>
            <if test="spareField2 != null">#{spareField2},</if>
            <if test="station != null">#{station},</if>
         </trim>
    </insert>
    <update id="updateRmRepairData" parameterType="RmRepairData">
        update rm_repair_data
        <trim prefix="SET" suffixOverrides=",">
            <if test="snCode != null">sn_code = #{snCode},</if>
            <if test="boxCode != null">box_code = #{boxCode},</if>
            <if test="processesCode != null">processes_code = #{processesCode},</if>
            <if test="tightenFrequency != null">tighten_frequency = #{tightenFrequency},</if>
            <if test="tightenPiecesNumber != null">tighten_pieces_number = #{tightenPiecesNumber},</if>
            <if test="torqueForce != null">torque_force = #{torqueForce},</if>
            <if test="angle != null">angle = #{angle},</if>
            <if test="result != null">result = #{result},</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="remarks != null">remarks = #{remarks},</if>
            <if test="spareField1 != null">spare_field_1 = #{spareField1},</if>
            <if test="spareField2 != null">spare_field_2 = #{spareField2},</if>
            <if test="station != null">station = #{station},</if>
        </trim>
        where id = #{id}
    </update>
    <delete id="deleteRmRepairDataById" parameterType="Long">
        delete from rm_repair_data where id = #{id}
    </delete>
    <delete id="deleteRmRepairDataByIds" parameterType="String">
        delete from rm_repair_data where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </delete>
</mapper>
jcdm-ui/src/api/main/rm/repairData/repairData.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,44 @@
import request from '@/utils/request'
// æŸ¥è¯¢è¿”修数据列表
export function listRepairData(query) {
  return request({
    url: '/rm/repairData/list',
    method: 'get',
    params: query
  })
}
// æŸ¥è¯¢è¿”修数据详细
export function getRepairData(id) {
  return request({
    url: '/rm/repairData/' + id,
    method: 'get'
  })
}
// æ–°å¢žè¿”修数据
export function addRepairData(data) {
  return request({
    url: '/rm/repairData',
    method: 'post',
    data: data
  })
}
// ä¿®æ”¹è¿”修数据
export function updateRepairData(data) {
  return request({
    url: '/rm/repairData',
    method: 'put',
    data: data
  })
}
// åˆ é™¤è¿”修数据
export function delRepairData(id) {
  return request({
    url: '/rm/repairData/' + id,
    method: 'delete'
  })
}
jcdm-ui/src/views/main/bs/processes/index.vue
@@ -291,6 +291,8 @@
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.resetForm("queryForm");
      this.queryParams.remarks = null;
      this.queryParams.createUser = null;
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
jcdm-ui/src/views/main/rm/repairData/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,398 @@
<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"  height="250" 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:repairData: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:repairData: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:repairData: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:repairData: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">
      <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" 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:repairData:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['rm:repairData:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="queryParams.pageNum"
        :limit.sync="queryParams.pageSize"
        @pagination="getRepairRecordList"
      />
    </el-card>
    <el-card style="margin-top: 10px" class="box-card">
      <el-tabs type="border-card" >
        <el-tab-pane>
          <span slot="label"> <a class="el-icon-date"></a>拧紧数据</span>
          <template>
            <el-table v-loading="loading" border :data="repairDataList" @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="55" align="center" />
              <el-table-column label="箱体编码" align="center" prop="boxCode">
              </el-table-column>
              <el-table-column label="工位" align="center" prop="station">
              </el-table-column>
              <el-table-column label="拧紧次数" align="center" prop="tightenFrequency">
              </el-table-column>
              <el-table-column label="拧紧颗数" align="center" prop="tightenPiecesNumber">
              </el-table-column>
              <el-table-column label="扭力" align="center" prop="torqueForce">
              </el-table-column>
              <el-table-column label="角度" align="center" prop="angle">
              </el-table-column>
              <el-table-column label="结果" align="center" prop="result">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.qualified_status" :value="scope.row.status"/>
                </template>
              </el-table-column>
              <el-table-column label="保存时间" align="center" prop="boxCode">
              </el-table-column>
            </el-table>
          </template>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"> <b class="el-icon-date"></b>相机检测</span>
          <el-empty >
            <span slot="description">暂无数据</span>
          </el-empty>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"> <c class="el-icon-date"></c>外漏检测</span>
          <el-empty >
            <span slot="description">暂无数据</span>
          </el-empty>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"> <d class="el-icon-date"></d>机轴加注</span>
          <el-empty >
            <span slot="description">暂无数据</span>
          </el-empty>
        </el-tab-pane>
        <el-tab-pane>
          <span slot="label"> <e class="el-icon-date"></e>工位结果</span>
          <el-empty >
            <span slot="description">暂无数据</span>
          </el-empty>
        </el-tab-pane>
      </el-tabs>
    </el-card>
    <!-- æ·»åŠ æˆ–修改返修数据对话框 -->
    <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="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="tightenFrequency">
          <el-input v-model="form.tightenFrequency" placeholder="请输入拧紧次数" />
        </el-form-item>
        <el-form-item label="拧紧颗数" prop="tightenPiecesNumber">
          <el-input v-model="form.tightenPiecesNumber" placeholder="请输入拧紧颗数" />
        </el-form-item>
        <el-form-item label="扭力" prop="torqueForce">
          <el-input v-model="form.torqueForce" placeholder="请输入扭力" />
        </el-form-item>
        <el-form-item label="角度" prop="angle">
          <el-input v-model="form.angle" placeholder="请输入角度" />
        </el-form-item>
        <el-form-item label="结果" prop="result">
          <el-input v-model="form.result" 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="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>
      <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";
import { listRepairData, getRepairData, delRepairData, addRepairData, updateRepairData } from "@/api/main/rm/repairData/repairData";
export default {
  name: "RepairData",
  dicts: ['qualified_status'],
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•ä¸ªç¦ç”¨
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // è¿”修数据表格数据
      repairDataList: [],
      repairRecordList: [],
      // å¼¹å‡ºå±‚标题
      title: "",
      // æ˜¯å¦æ˜¾ç¤ºå¼¹å‡ºå±‚
      open: false,
      // æŸ¥è¯¢å‚æ•°
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        snCode: null,
        boxCode: null,
        processesCode: null,
        tightenFrequency: null,
        tightenPiecesNumber: null,
        torqueForce: null,
        angle: null,
        result: null,
        createUser: null,
        updateUser: null,
        remarks: null,
        spareField1: null,
        station: null,
        spareField2: null
      },
      // è¡¨å•å‚æ•°
      form: {},
      // è¡¨å•æ ¡éªŒ
      rules: {
        id: [
          { required: true, message: "主键id不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
    this.getRepairRecordList();
  },
  methods: {
    /** æŸ¥è¯¢è¿”修记录列表 */
    getRepairRecordList() {
      this.loading = true;
      listRepairRecord(this.queryParams).then(response => {
        this.repairRecordList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    /** æŸ¥è¯¢è¿”修数据列表 */
    getList() {
      this.loading = true;
      listRepairData(this.queryParams).then(response => {
        this.repairDataList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // å–消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // è¡¨å•é‡ç½®
    reset() {
      this.form = {
        id: null,
        snCode: null,
        boxCode: null,
        processesCode: null,
        tightenFrequency: null,
        tightenPiecesNumber: null,
        torqueForce: null,
        angle: null,
        result: null,
        createUser: null,
        createTime: null,
        updateTime: null,
        updateUser: null,
        remarks: null,
        spareField1: null,
        station: 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
      getRepairData(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) {
            updateRepairData(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addRepairData(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 delRepairData(ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download('rm/repairData/export', {
        ...this.queryParams
      }, `repairData_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>