设备点检记录
This commit is contained in:
parent
1b4bc5725c
commit
3a95549ef8
@ -0,0 +1,176 @@
|
||||
package com.ktg.mes.dv.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ktg.common.constant.UserConstants;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.ktg.mes.dv.domain.DvCheckSubject;
|
||||
import com.ktg.mes.dv.service.IDvCheckRecordLineService;
|
||||
import com.ktg.mes.dv.service.IDvCheckSubjectService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
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.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecord;
|
||||
import com.ktg.mes.dv.service.IDvCheckRecordService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备点检记录Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/checkrecord")
|
||||
public class DvCheckRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvCheckRecordService dvCheckRecordService;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckSubjectService dvCheckSubjectService;
|
||||
|
||||
@Autowired
|
||||
private IDvCheckRecordLineService dvCheckRecordLineService;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckRecord> list = dvCheckRecordService.selectDvCheckRecordList(dvCheckRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备点检记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:export')")
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
List<DvCheckRecord> list = dvCheckRecordService.selectDvCheckRecordList(dvCheckRecord);
|
||||
ExcelUtil<DvCheckRecord> util = new ExcelUtil<DvCheckRecord>(DvCheckRecord.class);
|
||||
util.exportExcel(response, list, "设备点检记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:query')")
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckRecordService.selectDvCheckRecordByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:add')")
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
dvCheckRecordService.insertDvCheckRecord(dvCheckRecord);
|
||||
|
||||
if(dvCheckRecord.getPlanId()!= null){
|
||||
//根据选择的点检计划自动生成对应的行信息
|
||||
DvCheckSubject param = new DvCheckSubject();
|
||||
param.setPlanId(dvCheckRecord.getPlanId());
|
||||
List<DvCheckSubject> subjectList = dvCheckSubjectService.selectDvCheckSubjectList(param);
|
||||
if(!CollectionUtils.isEmpty(subjectList)){
|
||||
for(DvCheckSubject subject : subjectList){
|
||||
DvCheckRecordLine line = new DvCheckRecordLine();
|
||||
line.setRecordId(dvCheckRecord.getRecordId());
|
||||
line.setSubjectId(subject.getSubjectId());
|
||||
line.setSubjectName(subject.getSubjectName());
|
||||
line.setSubjectType(subject.getSubjectType());
|
||||
line.setSubjectContent(subject.getSubjectContent());
|
||||
line.setSubjectStandard(subject.getSubjectStandard());
|
||||
line.setCheckStatus(UserConstants.YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success(dvCheckRecord.getRecordId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:edit')")
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.UPDATE)
|
||||
@Transactional
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
if(UserConstants.ORDER_STATUS_FINISHED.equals(dvCheckRecord.getStatus())){
|
||||
DvCheckRecordLine param = new DvCheckRecordLine();
|
||||
param.setRecordId(dvCheckRecord.getRecordId());
|
||||
List<DvCheckRecordLine> lineList = dvCheckRecordLineService.selectDvCheckRecordLineList(param);
|
||||
if(CollectionUtils.isEmpty(lineList)){
|
||||
return AjaxResult.error("请添加设备点检项目结果信息");
|
||||
}
|
||||
}
|
||||
|
||||
DvCheckRecord oldRecord = dvCheckRecordService.selectDvCheckRecordByRecordId(dvCheckRecord.getRecordId());
|
||||
if(oldRecord.getPlanId() != null && dvCheckRecord.getPlanId() != null && !dvCheckRecord.getPlanId().equals(oldRecord.getPlanId())){
|
||||
dvCheckRecordLineService.deleteDvCheckRecordLineByRecordId(dvCheckRecord.getRecordId());
|
||||
//根据选择的点检计划自动生成对应的行信息
|
||||
DvCheckSubject param = new DvCheckSubject();
|
||||
param.setPlanId(dvCheckRecord.getPlanId());
|
||||
List<DvCheckSubject> subjectList = dvCheckSubjectService.selectDvCheckSubjectList(param);
|
||||
if(!CollectionUtils.isEmpty(subjectList)){
|
||||
for(DvCheckSubject subject : subjectList){
|
||||
DvCheckRecordLine line = new DvCheckRecordLine();
|
||||
line.setRecordId(dvCheckRecord.getRecordId());
|
||||
line.setSubjectId(subject.getSubjectId());
|
||||
line.setSubjectName(subject.getSubjectName());
|
||||
line.setSubjectType(subject.getSubjectType());
|
||||
line.setSubjectContent(subject.getSubjectContent());
|
||||
line.setSubjectStandard(subject.getSubjectStandard());
|
||||
line.setCheckStatus(UserConstants.YES);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return toAjax(dvCheckRecordService.updateDvCheckRecord(dvCheckRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:remove')")
|
||||
@Log(title = "设备点检记录", businessType = BusinessType.DELETE)
|
||||
@Transactional
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
|
||||
for(Long recordId : recordIds){
|
||||
dvCheckRecordLineService.deleteDvCheckRecordLineByRecordId(recordId);
|
||||
}
|
||||
|
||||
return toAjax(dvCheckRecordService.deleteDvCheckRecordByRecordIds(recordIds));
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package com.ktg.mes.dv.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.ktg.common.annotation.Log;
|
||||
import com.ktg.common.core.controller.BaseController;
|
||||
import com.ktg.common.core.domain.AjaxResult;
|
||||
import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.ktg.mes.dv.service.IDvCheckRecordLineService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/dv/checkrecordline")
|
||||
public class DvCheckRecordLineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDvCheckRecordLineService dvCheckRecordLineService;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
startPage();
|
||||
List<DvCheckRecordLine> list = dvCheckRecordLineService.selectDvCheckRecordLineList(dvCheckRecordLine);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备点检记录行列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:export')")
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
List<DvCheckRecordLine> list = dvCheckRecordLineService.selectDvCheckRecordLineList(dvCheckRecordLine);
|
||||
ExcelUtil<DvCheckRecordLine> util = new ExcelUtil<DvCheckRecordLine>(DvCheckRecordLine.class);
|
||||
util.exportExcel(response, list, "设备点检记录行数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备点检记录行详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:query')")
|
||||
@GetMapping(value = "/{lineId}")
|
||||
public AjaxResult getInfo(@PathVariable("lineId") Long lineId)
|
||||
{
|
||||
return AjaxResult.success(dvCheckRecordLineService.selectDvCheckRecordLineByLineId(lineId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:add')")
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
return toAjax(dvCheckRecordLineService.insertDvCheckRecordLine(dvCheckRecordLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:edit')")
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
return toAjax(dvCheckRecordLineService.updateDvCheckRecordLine(dvCheckRecordLine));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:dv:checkrecord:remove')")
|
||||
@Log(title = "设备点检记录行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{lineIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] lineIds)
|
||||
{
|
||||
return toAjax(dvCheckRecordLineService.deleteDvCheckRecordLineByLineIds(lineIds));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
282
ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvCheckRecord.java
Normal file
282
ktg-mes/src/main/java/com/ktg/mes/dv/domain/DvCheckRecord.java
Normal file
@ -0,0 +1,282 @@
|
||||
package com.ktg.mes.dv.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备点检记录对象 dv_check_record
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public class DvCheckRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 计划ID */
|
||||
private Long recordId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long planId;
|
||||
|
||||
/** 计划编码 */
|
||||
@Excel(name = "计划编码")
|
||||
private String planCode;
|
||||
|
||||
/** 计划名称 */
|
||||
@Excel(name = "计划名称")
|
||||
private String planName;
|
||||
|
||||
/** 计划类型 */
|
||||
@Excel(name = "计划类型")
|
||||
private String planType;
|
||||
|
||||
/** 设备ID */
|
||||
@Excel(name = "设备ID")
|
||||
private Long machineryId;
|
||||
|
||||
/** 设备编码 */
|
||||
@Excel(name = "设备编码")
|
||||
private String machineryCode;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String machineryName;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private String machineryBrand;
|
||||
|
||||
/** 规格型号 */
|
||||
@Excel(name = "规格型号")
|
||||
private String machinerySpec;
|
||||
|
||||
/** 点检时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
@Excel(name = "点检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date checkTime;
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String userName;
|
||||
|
||||
private String nickName;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setPlanId(Long planId)
|
||||
{
|
||||
this.planId = planId;
|
||||
}
|
||||
|
||||
public Long getPlanId()
|
||||
{
|
||||
return planId;
|
||||
}
|
||||
public void setPlanCode(String planCode)
|
||||
{
|
||||
this.planCode = planCode;
|
||||
}
|
||||
|
||||
public String getPlanCode()
|
||||
{
|
||||
return planCode;
|
||||
}
|
||||
public void setPlanName(String planName)
|
||||
{
|
||||
this.planName = planName;
|
||||
}
|
||||
|
||||
public String getPlanName()
|
||||
{
|
||||
return planName;
|
||||
}
|
||||
public void setPlanType(String planType)
|
||||
{
|
||||
this.planType = planType;
|
||||
}
|
||||
|
||||
public String getPlanType()
|
||||
{
|
||||
return planType;
|
||||
}
|
||||
public void setMachineryId(Long machineryId)
|
||||
{
|
||||
this.machineryId = machineryId;
|
||||
}
|
||||
|
||||
public Long getMachineryId()
|
||||
{
|
||||
return machineryId;
|
||||
}
|
||||
public void setMachineryCode(String machineryCode)
|
||||
{
|
||||
this.machineryCode = machineryCode;
|
||||
}
|
||||
|
||||
public String getMachineryCode()
|
||||
{
|
||||
return machineryCode;
|
||||
}
|
||||
public void setMachineryName(String machineryName)
|
||||
{
|
||||
this.machineryName = machineryName;
|
||||
}
|
||||
|
||||
public String getMachineryName()
|
||||
{
|
||||
return machineryName;
|
||||
}
|
||||
public void setMachineryBrand(String machineryBrand)
|
||||
{
|
||||
this.machineryBrand = machineryBrand;
|
||||
}
|
||||
|
||||
public String getMachineryBrand()
|
||||
{
|
||||
return machineryBrand;
|
||||
}
|
||||
public void setMachinerySpec(String machinerySpec)
|
||||
{
|
||||
this.machinerySpec = machinerySpec;
|
||||
}
|
||||
|
||||
public String getMachinerySpec()
|
||||
{
|
||||
return machinerySpec;
|
||||
}
|
||||
public void setCheckTime(Date checkTime)
|
||||
{
|
||||
this.checkTime = checkTime;
|
||||
}
|
||||
|
||||
public Date getCheckTime()
|
||||
{
|
||||
return checkTime;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("planId", getPlanId())
|
||||
.append("planCode", getPlanCode())
|
||||
.append("planName", getPlanName())
|
||||
.append("planType", getPlanType())
|
||||
.append("machineryId", getMachineryId())
|
||||
.append("machineryCode", getMachineryCode())
|
||||
.append("machineryName", getMachineryName())
|
||||
.append("machineryBrand", getMachineryBrand())
|
||||
.append("machinerySpec", getMachinerySpec())
|
||||
.append("checkTime", getCheckTime())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,219 @@
|
||||
package com.ktg.mes.dv.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ktg.common.annotation.Excel;
|
||||
import com.ktg.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 设备点检记录行对象 dv_check_record_line
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public class DvCheckRecordLine extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 计划ID */
|
||||
private Long lineId;
|
||||
|
||||
/** 计划ID */
|
||||
@Excel(name = "计划ID")
|
||||
private Long recordId;
|
||||
|
||||
/** 项目ID */
|
||||
@Excel(name = "项目ID")
|
||||
private Long subjectId;
|
||||
|
||||
/** 项目编码 */
|
||||
@Excel(name = "项目编码")
|
||||
private String subjectCode;
|
||||
|
||||
/** 项目名称 */
|
||||
@Excel(name = "项目名称")
|
||||
private String subjectName;
|
||||
|
||||
/** 项目类型 */
|
||||
@Excel(name = "项目类型")
|
||||
private String subjectType;
|
||||
|
||||
/** 项目内容 */
|
||||
@Excel(name = "项目内容")
|
||||
private String subjectContent;
|
||||
|
||||
/** 标准 */
|
||||
@Excel(name = "标准")
|
||||
private String subjectStandard;
|
||||
|
||||
/** 点检结果 */
|
||||
@Excel(name = "点检结果")
|
||||
private String checkStatus;
|
||||
|
||||
/** 异常描述 */
|
||||
@Excel(name = "异常描述")
|
||||
private String checkResult;
|
||||
|
||||
/** 预留字段1 */
|
||||
private String attr1;
|
||||
|
||||
/** 预留字段2 */
|
||||
private String attr2;
|
||||
|
||||
/** 预留字段3 */
|
||||
private Long attr3;
|
||||
|
||||
/** 预留字段4 */
|
||||
private Long attr4;
|
||||
|
||||
public void setLineId(Long lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public Long getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
public void setRecordId(Long recordId)
|
||||
{
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public Long getRecordId()
|
||||
{
|
||||
return recordId;
|
||||
}
|
||||
public void setSubjectId(Long subjectId)
|
||||
{
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public Long getSubjectId()
|
||||
{
|
||||
return subjectId;
|
||||
}
|
||||
public void setSubjectCode(String subjectCode)
|
||||
{
|
||||
this.subjectCode = subjectCode;
|
||||
}
|
||||
|
||||
public String getSubjectCode()
|
||||
{
|
||||
return subjectCode;
|
||||
}
|
||||
public void setSubjectName(String subjectName)
|
||||
{
|
||||
this.subjectName = subjectName;
|
||||
}
|
||||
|
||||
public String getSubjectName()
|
||||
{
|
||||
return subjectName;
|
||||
}
|
||||
public void setSubjectType(String subjectType)
|
||||
{
|
||||
this.subjectType = subjectType;
|
||||
}
|
||||
|
||||
public String getSubjectType()
|
||||
{
|
||||
return subjectType;
|
||||
}
|
||||
public void setSubjectContent(String subjectContent)
|
||||
{
|
||||
this.subjectContent = subjectContent;
|
||||
}
|
||||
|
||||
public String getSubjectContent()
|
||||
{
|
||||
return subjectContent;
|
||||
}
|
||||
public void setSubjectStandard(String subjectStandard)
|
||||
{
|
||||
this.subjectStandard = subjectStandard;
|
||||
}
|
||||
|
||||
public String getSubjectStandard()
|
||||
{
|
||||
return subjectStandard;
|
||||
}
|
||||
public void setCheckStatus(String checkStatus)
|
||||
{
|
||||
this.checkStatus = checkStatus;
|
||||
}
|
||||
|
||||
public String getCheckStatus()
|
||||
{
|
||||
return checkStatus;
|
||||
}
|
||||
public void setCheckResult(String checkResult)
|
||||
{
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public String getCheckResult()
|
||||
{
|
||||
return checkResult;
|
||||
}
|
||||
public void setAttr1(String attr1)
|
||||
{
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1()
|
||||
{
|
||||
return attr1;
|
||||
}
|
||||
public void setAttr2(String attr2)
|
||||
{
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2()
|
||||
{
|
||||
return attr2;
|
||||
}
|
||||
public void setAttr3(Long attr3)
|
||||
{
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public Long getAttr3()
|
||||
{
|
||||
return attr3;
|
||||
}
|
||||
public void setAttr4(Long attr4)
|
||||
{
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public Long getAttr4()
|
||||
{
|
||||
return attr4;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("lineId", getLineId())
|
||||
.append("recordId", getRecordId())
|
||||
.append("subjectId", getSubjectId())
|
||||
.append("subjectCode", getSubjectCode())
|
||||
.append("subjectName", getSubjectName())
|
||||
.append("subjectType", getSubjectType())
|
||||
.append("subjectContent", getSubjectContent())
|
||||
.append("subjectStandard", getSubjectStandard())
|
||||
.append("checkStatus", getCheckStatus())
|
||||
.append("checkResult", getCheckResult())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ktg.mes.dv.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecordLine;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface DvCheckRecordLineMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
public DvCheckRecordLine selectDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 设备点检记录行集合
|
||||
*/
|
||||
public List<DvCheckRecordLine> selectDvCheckRecordLineList(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录行
|
||||
*
|
||||
* @param lineIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineIds(Long[] lineIds);
|
||||
|
||||
/**
|
||||
* 根据记录ID删除设备点检记录行信息
|
||||
*
|
||||
* @param recordId 记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByRecordId(Long recordId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ktg.mes.dv.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecord;
|
||||
|
||||
/**
|
||||
* 设备点检记录Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface DvCheckRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
public DvCheckRecord selectDvCheckRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 设备点检记录集合
|
||||
*/
|
||||
public List<DvCheckRecord> selectDvCheckRecordList(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordIds(Long[] recordIds);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ktg.mes.dv.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecordLine;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface IDvCheckRecordLineService
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
public DvCheckRecordLine selectDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 设备点检记录行集合
|
||||
*/
|
||||
public List<DvCheckRecordLine> selectDvCheckRecordLineList(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录行
|
||||
*
|
||||
* @param lineIds 需要删除的设备点检记录行主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineIds(Long[] lineIds);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行信息
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByLineId(Long lineId);
|
||||
|
||||
/**
|
||||
* 根据记录ID删除设备点检记录行信息
|
||||
*
|
||||
* @param recordId 记录ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordLineByRecordId(Long recordId);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ktg.mes.dv.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecord;
|
||||
|
||||
/**
|
||||
* 设备点检记录Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
public interface IDvCheckRecordService
|
||||
{
|
||||
/**
|
||||
* 查询设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
public DvCheckRecord selectDvCheckRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 设备点检记录集合
|
||||
*/
|
||||
public List<DvCheckRecord> selectDvCheckRecordList(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDvCheckRecord(DvCheckRecord dvCheckRecord);
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录
|
||||
*
|
||||
* @param recordIds 需要删除的设备点检记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除设备点检记录信息
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDvCheckRecordByRecordId(Long recordId);
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.ktg.mes.dv.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ktg.mes.dv.mapper.DvCheckRecordLineMapper;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecordLine;
|
||||
import com.ktg.mes.dv.service.IDvCheckRecordLineService;
|
||||
|
||||
/**
|
||||
* 设备点检记录行Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Service
|
||||
public class DvCheckRecordLineServiceImpl implements IDvCheckRecordLineService
|
||||
{
|
||||
@Autowired
|
||||
private DvCheckRecordLineMapper dvCheckRecordLineMapper;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
@Override
|
||||
public DvCheckRecordLine selectDvCheckRecordLineByLineId(Long lineId)
|
||||
{
|
||||
return dvCheckRecordLineMapper.selectDvCheckRecordLineByLineId(lineId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备点检记录行列表
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 设备点检记录行
|
||||
*/
|
||||
@Override
|
||||
public List<DvCheckRecordLine> selectDvCheckRecordLineList(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
return dvCheckRecordLineMapper.selectDvCheckRecordLineList(dvCheckRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
dvCheckRecordLine.setCreateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordLineMapper.insertDvCheckRecordLine(dvCheckRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录行
|
||||
*
|
||||
* @param dvCheckRecordLine 设备点检记录行
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvCheckRecordLine(DvCheckRecordLine dvCheckRecordLine)
|
||||
{
|
||||
dvCheckRecordLine.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordLineMapper.updateDvCheckRecordLine(dvCheckRecordLine);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录行
|
||||
*
|
||||
* @param lineIds 需要删除的设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordLineByLineIds(Long[] lineIds)
|
||||
{
|
||||
return dvCheckRecordLineMapper.deleteDvCheckRecordLineByLineIds(lineIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录行信息
|
||||
*
|
||||
* @param lineId 设备点检记录行主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordLineByLineId(Long lineId)
|
||||
{
|
||||
return dvCheckRecordLineMapper.deleteDvCheckRecordLineByLineId(lineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteDvCheckRecordLineByRecordId(Long recordId) {
|
||||
return dvCheckRecordLineMapper.deleteDvCheckRecordLineByRecordId(recordId);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ktg.mes.dv.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ktg.mes.dv.mapper.DvCheckRecordMapper;
|
||||
import com.ktg.mes.dv.domain.DvCheckRecord;
|
||||
import com.ktg.mes.dv.service.IDvCheckRecordService;
|
||||
|
||||
/**
|
||||
* 设备点检记录Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Service
|
||||
public class DvCheckRecordServiceImpl implements IDvCheckRecordService
|
||||
{
|
||||
@Autowired
|
||||
private DvCheckRecordMapper dvCheckRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询设备点检记录
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
@Override
|
||||
public DvCheckRecord selectDvCheckRecordByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckRecordMapper.selectDvCheckRecordByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备点检记录列表
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 设备点检记录
|
||||
*/
|
||||
@Override
|
||||
public List<DvCheckRecord> selectDvCheckRecordList(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
return dvCheckRecordMapper.selectDvCheckRecordList(dvCheckRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDvCheckRecord(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
dvCheckRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordMapper.insertDvCheckRecord(dvCheckRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备点检记录
|
||||
*
|
||||
* @param dvCheckRecord 设备点检记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDvCheckRecord(DvCheckRecord dvCheckRecord)
|
||||
{
|
||||
dvCheckRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return dvCheckRecordMapper.updateDvCheckRecord(dvCheckRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备点检记录
|
||||
*
|
||||
* @param recordIds 需要删除的设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordByRecordIds(Long[] recordIds)
|
||||
{
|
||||
return dvCheckRecordMapper.deleteDvCheckRecordByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备点检记录信息
|
||||
*
|
||||
* @param recordId 设备点检记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDvCheckRecordByRecordId(Long recordId)
|
||||
{
|
||||
return dvCheckRecordMapper.deleteDvCheckRecordByRecordId(recordId);
|
||||
}
|
||||
}
|
134
ktg-mes/src/main/resources/mapper/dv/DvCheckRecordLineMapper.xml
Normal file
134
ktg-mes/src/main/resources/mapper/dv/DvCheckRecordLineMapper.xml
Normal file
@ -0,0 +1,134 @@
|
||||
<?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.ktg.mes.dv.mapper.DvCheckRecordLineMapper">
|
||||
|
||||
<resultMap type="DvCheckRecordLine" id="DvCheckRecordLineResult">
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="subjectId" column="subject_id" />
|
||||
<result property="subjectCode" column="subject_code" />
|
||||
<result property="subjectName" column="subject_name" />
|
||||
<result property="subjectType" column="subject_type" />
|
||||
<result property="subjectContent" column="subject_content" />
|
||||
<result property="subjectStandard" column="subject_standard" />
|
||||
<result property="checkStatus" column="check_status" />
|
||||
<result property="checkResult" column="check_result" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDvCheckRecordLineVo">
|
||||
select line_id, record_id, subject_id, subject_code, subject_name, subject_type, subject_content, subject_standard, check_status, check_result, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_check_record_line
|
||||
</sql>
|
||||
|
||||
<select id="selectDvCheckRecordLineList" parameterType="DvCheckRecordLine" resultMap="DvCheckRecordLineResult">
|
||||
<include refid="selectDvCheckRecordLineVo"/>
|
||||
<where>
|
||||
<if test="recordId != null "> and record_id = #{recordId}</if>
|
||||
<if test="subjectId != null "> and subject_id = #{subjectId}</if>
|
||||
<if test="subjectCode != null and subjectCode != ''"> and subject_code = #{subjectCode}</if>
|
||||
<if test="subjectName != null and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
|
||||
<if test="subjectType != null and subjectType != ''"> and subject_type = #{subjectType}</if>
|
||||
<if test="subjectContent != null and subjectContent != ''"> and subject_content = #{subjectContent}</if>
|
||||
<if test="subjectStandard != null and subjectStandard != ''"> and subject_standard = #{subjectStandard}</if>
|
||||
<if test="checkStatus != null and checkStatus != ''"> and check_status = #{checkStatus}</if>
|
||||
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
|
||||
</where>
|
||||
order by line_id desc
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckRecordLineByLineId" parameterType="Long" resultMap="DvCheckRecordLineResult">
|
||||
<include refid="selectDvCheckRecordLineVo"/>
|
||||
where line_id = #{lineId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckRecordLine" parameterType="DvCheckRecordLine" useGeneratedKeys="true" keyProperty="lineId">
|
||||
insert into dv_check_record_line
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id,</if>
|
||||
<if test="subjectId != null">subject_id,</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code,</if>
|
||||
<if test="subjectName != null">subject_name,</if>
|
||||
<if test="subjectType != null">subject_type,</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content,</if>
|
||||
<if test="subjectStandard != null">subject_standard,</if>
|
||||
<if test="checkStatus != null and checkStatus != ''">check_status,</if>
|
||||
<if test="checkResult != null">check_result,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">#{recordId},</if>
|
||||
<if test="subjectId != null">#{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">#{subjectCode},</if>
|
||||
<if test="subjectName != null">#{subjectName},</if>
|
||||
<if test="subjectType != null">#{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">#{subjectContent},</if>
|
||||
<if test="subjectStandard != null">#{subjectStandard},</if>
|
||||
<if test="checkStatus != null and checkStatus != ''">#{checkStatus},</if>
|
||||
<if test="checkResult != null">#{checkResult},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvCheckRecordLine" parameterType="DvCheckRecordLine">
|
||||
update dv_check_record_line
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id = #{recordId},</if>
|
||||
<if test="subjectId != null">subject_id = #{subjectId},</if>
|
||||
<if test="subjectCode != null and subjectCode != ''">subject_code = #{subjectCode},</if>
|
||||
<if test="subjectName != null">subject_name = #{subjectName},</if>
|
||||
<if test="subjectType != null">subject_type = #{subjectType},</if>
|
||||
<if test="subjectContent != null and subjectContent != ''">subject_content = #{subjectContent},</if>
|
||||
<if test="subjectStandard != null">subject_standard = #{subjectStandard},</if>
|
||||
<if test="checkStatus != null and checkStatus != ''">check_status = #{checkStatus},</if>
|
||||
<if test="checkResult != null">check_result = #{checkResult},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where line_id = #{lineId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvCheckRecordLineByLineId" parameterType="Long">
|
||||
delete from dv_check_record_line where line_id = #{lineId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckRecordLineByLineIds" parameterType="String">
|
||||
delete from dv_check_record_line where line_id in
|
||||
<foreach item="lineId" collection="array" open="(" separator="," close=")">
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckRecordLineByRecordId" parameterType="Long">
|
||||
delete from dv_check_record_line where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
158
ktg-mes/src/main/resources/mapper/dv/DvCheckRecordMapper.xml
Normal file
158
ktg-mes/src/main/resources/mapper/dv/DvCheckRecordMapper.xml
Normal file
@ -0,0 +1,158 @@
|
||||
<?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.ktg.mes.dv.mapper.DvCheckRecordMapper">
|
||||
|
||||
<resultMap type="DvCheckRecord" id="DvCheckRecordResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="planId" column="plan_id" />
|
||||
<result property="planCode" column="plan_code" />
|
||||
<result property="planName" column="plan_name" />
|
||||
<result property="planType" column="plan_type" />
|
||||
<result property="machineryId" column="machinery_id" />
|
||||
<result property="machineryCode" column="machinery_code" />
|
||||
<result property="machineryName" column="machinery_name" />
|
||||
<result property="machineryBrand" column="machinery_brand" />
|
||||
<result property="machinerySpec" column="machinery_spec" />
|
||||
<result property="checkTime" column="check_time" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="status" column="status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="attr1" column="attr1" />
|
||||
<result property="attr2" column="attr2" />
|
||||
<result property="attr3" column="attr3" />
|
||||
<result property="attr4" column="attr4" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDvCheckRecordVo">
|
||||
select record_id, plan_id, plan_code, plan_name, plan_type, machinery_id, machinery_code, machinery_name, machinery_brand, machinery_spec, check_time, user_id, user_name, nick_name, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from dv_check_record
|
||||
</sql>
|
||||
|
||||
<select id="selectDvCheckRecordList" parameterType="DvCheckRecord" resultMap="DvCheckRecordResult">
|
||||
<include refid="selectDvCheckRecordVo"/>
|
||||
<where>
|
||||
<if test="planId != null "> and plan_id = #{planId}</if>
|
||||
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>
|
||||
<if test="planName != null and planName != ''"> and plan_name like concat('%', #{planName}, '%')</if>
|
||||
<if test="planType != null and planType != ''"> and plan_type = #{planType}</if>
|
||||
<if test="machineryId != null "> and machinery_id = #{machineryId}</if>
|
||||
<if test="machineryCode != null and machineryCode != ''"> and machinery_code = #{machineryCode}</if>
|
||||
<if test="machineryName != null and machineryName != ''"> and machinery_name like concat('%', #{machineryName}, '%')</if>
|
||||
<if test="machineryBrand != null and machineryBrand != ''"> and machinery_brand = #{machineryBrand}</if>
|
||||
<if test="machinerySpec != null and machinerySpec != ''"> and machinery_spec = #{machinerySpec}</if>
|
||||
<if test="checkTime != null "> and check_time = #{checkTime}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectDvCheckRecordByRecordId" parameterType="Long" resultMap="DvCheckRecordResult">
|
||||
<include refid="selectDvCheckRecordVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDvCheckRecord" parameterType="DvCheckRecord" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into dv_check_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id,</if>
|
||||
<if test="planCode != null">plan_code,</if>
|
||||
<if test="planName != null">plan_name,</if>
|
||||
<if test="planType != null">plan_type,</if>
|
||||
<if test="machineryId != null">machinery_id,</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code,</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name,</if>
|
||||
<if test="machineryBrand != null">machinery_brand,</if>
|
||||
<if test="machinerySpec != null">machinery_spec,</if>
|
||||
<if test="checkTime != null">check_time,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="attr1 != null">attr1,</if>
|
||||
<if test="attr2 != null">attr2,</if>
|
||||
<if test="attr3 != null">attr3,</if>
|
||||
<if test="attr4 != null">attr4,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="planId != null">#{planId},</if>
|
||||
<if test="planCode != null">#{planCode},</if>
|
||||
<if test="planName != null">#{planName},</if>
|
||||
<if test="planType != null">#{planType},</if>
|
||||
<if test="machineryId != null">#{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">#{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">#{machineryName},</if>
|
||||
<if test="machineryBrand != null">#{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">#{machinerySpec},</if>
|
||||
<if test="checkTime != null">#{checkTime},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="attr1 != null">#{attr1},</if>
|
||||
<if test="attr2 != null">#{attr2},</if>
|
||||
<if test="attr3 != null">#{attr3},</if>
|
||||
<if test="attr4 != null">#{attr4},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDvCheckRecord" parameterType="DvCheckRecord">
|
||||
update dv_check_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="planId != null">plan_id = #{planId},</if>
|
||||
<if test="planCode != null">plan_code = #{planCode},</if>
|
||||
<if test="planName != null">plan_name = #{planName},</if>
|
||||
<if test="planType != null">plan_type = #{planType},</if>
|
||||
<if test="machineryId != null">machinery_id = #{machineryId},</if>
|
||||
<if test="machineryCode != null and machineryCode != ''">machinery_code = #{machineryCode},</if>
|
||||
<if test="machineryName != null and machineryName != ''">machinery_name = #{machineryName},</if>
|
||||
<if test="machineryBrand != null">machinery_brand = #{machineryBrand},</if>
|
||||
<if test="machinerySpec != null">machinery_spec = #{machinerySpec},</if>
|
||||
<if test="checkTime != null">check_time = #{checkTime},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="attr1 != null">attr1 = #{attr1},</if>
|
||||
<if test="attr2 != null">attr2 = #{attr2},</if>
|
||||
<if test="attr3 != null">attr3 = #{attr3},</if>
|
||||
<if test="attr4 != null">attr4 = #{attr4},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDvCheckRecordByRecordId" parameterType="Long">
|
||||
delete from dv_check_record where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDvCheckRecordByRecordIds" parameterType="String">
|
||||
delete from dv_check_record where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user