Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | |
| | | <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"> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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' |
| | | }) |
| | | } |
| | |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.remarks = null; |
| | | this.queryParams.createUser = null; |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |