将所有的缺陷记录统一存储到qc_defect_record表,原来IQC的qc_iqc_defect表不再使用。
This commit is contained in:
parent
9f1c3af61b
commit
1756fd1648
@ -0,0 +1,104 @@
|
||||
package com.ktg.mes.qc.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.qc.domain.QcDefectRecord;
|
||||
import com.ktg.mes.qc.service.IQcDefectRecordService;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 检验单缺陷记录Controller
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mes/qc/defectrecord")
|
||||
public class QcDefectRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IQcDefectRecordService qcDefectRecordService;
|
||||
|
||||
/**
|
||||
* 查询检验单缺陷记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:qc:defectrecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QcDefectRecord qcDefectRecord)
|
||||
{
|
||||
startPage();
|
||||
List<QcDefectRecord> list = qcDefectRecordService.selectQcDefectRecordList(qcDefectRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出检验单缺陷记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:qc:defectrecord:export')")
|
||||
@Log(title = "检验单缺陷记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QcDefectRecord qcDefectRecord)
|
||||
{
|
||||
List<QcDefectRecord> list = qcDefectRecordService.selectQcDefectRecordList(qcDefectRecord);
|
||||
ExcelUtil<QcDefectRecord> util = new ExcelUtil<QcDefectRecord>(QcDefectRecord.class);
|
||||
util.exportExcel(response, list, "检验单缺陷记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取检验单缺陷记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:qc:defectrecord:query')")
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return AjaxResult.success(qcDefectRecordService.selectQcDefectRecordByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检验单缺陷记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:qc:defectrecord:add')")
|
||||
@Log(title = "检验单缺陷记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QcDefectRecord qcDefectRecord)
|
||||
{
|
||||
return toAjax(qcDefectRecordService.insertQcDefectRecord(qcDefectRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检验单缺陷记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:qc:defectrecord:edit')")
|
||||
@Log(title = "检验单缺陷记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QcDefectRecord qcDefectRecord)
|
||||
{
|
||||
return toAjax(qcDefectRecordService.updateQcDefectRecord(qcDefectRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检验单缺陷记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('mes:qc:defectrecord:remove')")
|
||||
@Log(title = "检验单缺陷记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
return toAjax(qcDefectRecordService.deleteQcDefectRecordByRecordIds(recordIds));
|
||||
}
|
||||
}
|
178
ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcDefectRecord.java
Normal file
178
ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcDefectRecord.java
Normal file
@ -0,0 +1,178 @@
|
||||
package com.ktg.mes.qc.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;
|
||||
|
||||
/**
|
||||
* 检验单缺陷记录对象 qc_defect_record
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-30
|
||||
*/
|
||||
public class QcDefectRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 缺陷ID */
|
||||
private Long recordId;
|
||||
|
||||
/** 检验单类型 */
|
||||
@Excel(name = "检验单类型")
|
||||
private String qcType;
|
||||
|
||||
/** 检验单ID */
|
||||
@Excel(name = "检验单ID")
|
||||
private Long qcId;
|
||||
|
||||
/** 检验单行ID */
|
||||
@Excel(name = "检验单行ID")
|
||||
private Long lineId;
|
||||
|
||||
/** 缺陷描述 */
|
||||
@Excel(name = "缺陷描述")
|
||||
private String defectName;
|
||||
|
||||
/** 缺陷等级 */
|
||||
@Excel(name = "缺陷等级")
|
||||
private String defectLevel;
|
||||
|
||||
/** 缺陷数量 */
|
||||
@Excel(name = "缺陷数量")
|
||||
private Long defectQuantity;
|
||||
|
||||
/** 预留字段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 setQcType(String qcType)
|
||||
{
|
||||
this.qcType = qcType;
|
||||
}
|
||||
|
||||
public String getQcType()
|
||||
{
|
||||
return qcType;
|
||||
}
|
||||
public void setQcId(Long qcId)
|
||||
{
|
||||
this.qcId = qcId;
|
||||
}
|
||||
|
||||
public Long getQcId()
|
||||
{
|
||||
return qcId;
|
||||
}
|
||||
public void setLineId(Long lineId)
|
||||
{
|
||||
this.lineId = lineId;
|
||||
}
|
||||
|
||||
public Long getLineId()
|
||||
{
|
||||
return lineId;
|
||||
}
|
||||
public void setDefectName(String defectName)
|
||||
{
|
||||
this.defectName = defectName;
|
||||
}
|
||||
|
||||
public String getDefectName()
|
||||
{
|
||||
return defectName;
|
||||
}
|
||||
public void setDefectLevel(String defectLevel)
|
||||
{
|
||||
this.defectLevel = defectLevel;
|
||||
}
|
||||
|
||||
public String getDefectLevel()
|
||||
{
|
||||
return defectLevel;
|
||||
}
|
||||
public void setDefectQuantity(Long defectQuantity)
|
||||
{
|
||||
this.defectQuantity = defectQuantity;
|
||||
}
|
||||
|
||||
public Long getDefectQuantity()
|
||||
{
|
||||
return defectQuantity;
|
||||
}
|
||||
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("qcType", getQcType())
|
||||
.append("qcId", getQcId())
|
||||
.append("lineId", getLineId())
|
||||
.append("defectName", getDefectName())
|
||||
.append("defectLevel", getDefectLevel())
|
||||
.append("defectQuantity", getDefectQuantity())
|
||||
.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,61 @@
|
||||
package com.ktg.mes.qc.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.qc.domain.QcDefectRecord;
|
||||
|
||||
/**
|
||||
* 检验单缺陷记录Mapper接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-30
|
||||
*/
|
||||
public interface QcDefectRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询检验单缺陷记录
|
||||
*
|
||||
* @param recordId 检验单缺陷记录主键
|
||||
* @return 检验单缺陷记录
|
||||
*/
|
||||
public QcDefectRecord selectQcDefectRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询检验单缺陷记录列表
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 检验单缺陷记录集合
|
||||
*/
|
||||
public List<QcDefectRecord> selectQcDefectRecordList(QcDefectRecord qcDefectRecord);
|
||||
|
||||
/**
|
||||
* 新增检验单缺陷记录
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcDefectRecord(QcDefectRecord qcDefectRecord);
|
||||
|
||||
/**
|
||||
* 修改检验单缺陷记录
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcDefectRecord(QcDefectRecord qcDefectRecord);
|
||||
|
||||
/**
|
||||
* 删除检验单缺陷记录
|
||||
*
|
||||
* @param recordId 检验单缺陷记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcDefectRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 批量删除检验单缺陷记录
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcDefectRecordByRecordIds(Long[] recordIds);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ktg.mes.qc.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ktg.mes.qc.domain.QcDefectRecord;
|
||||
|
||||
/**
|
||||
* 检验单缺陷记录Service接口
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-30
|
||||
*/
|
||||
public interface IQcDefectRecordService
|
||||
{
|
||||
/**
|
||||
* 查询检验单缺陷记录
|
||||
*
|
||||
* @param recordId 检验单缺陷记录主键
|
||||
* @return 检验单缺陷记录
|
||||
*/
|
||||
public QcDefectRecord selectQcDefectRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询检验单缺陷记录列表
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 检验单缺陷记录集合
|
||||
*/
|
||||
public List<QcDefectRecord> selectQcDefectRecordList(QcDefectRecord qcDefectRecord);
|
||||
|
||||
/**
|
||||
* 新增检验单缺陷记录
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcDefectRecord(QcDefectRecord qcDefectRecord);
|
||||
|
||||
/**
|
||||
* 修改检验单缺陷记录
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcDefectRecord(QcDefectRecord qcDefectRecord);
|
||||
|
||||
/**
|
||||
* 批量删除检验单缺陷记录
|
||||
*
|
||||
* @param recordIds 需要删除的检验单缺陷记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcDefectRecordByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除检验单缺陷记录信息
|
||||
*
|
||||
* @param recordId 检验单缺陷记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcDefectRecordByRecordId(Long recordId);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ktg.mes.qc.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.qc.mapper.QcDefectRecordMapper;
|
||||
import com.ktg.mes.qc.domain.QcDefectRecord;
|
||||
import com.ktg.mes.qc.service.IQcDefectRecordService;
|
||||
|
||||
/**
|
||||
* 检验单缺陷记录Service业务层处理
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2022-08-30
|
||||
*/
|
||||
@Service
|
||||
public class QcDefectRecordServiceImpl implements IQcDefectRecordService
|
||||
{
|
||||
@Autowired
|
||||
private QcDefectRecordMapper qcDefectRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询检验单缺陷记录
|
||||
*
|
||||
* @param recordId 检验单缺陷记录主键
|
||||
* @return 检验单缺陷记录
|
||||
*/
|
||||
@Override
|
||||
public QcDefectRecord selectQcDefectRecordByRecordId(Long recordId)
|
||||
{
|
||||
return qcDefectRecordMapper.selectQcDefectRecordByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询检验单缺陷记录列表
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 检验单缺陷记录
|
||||
*/
|
||||
@Override
|
||||
public List<QcDefectRecord> selectQcDefectRecordList(QcDefectRecord qcDefectRecord)
|
||||
{
|
||||
return qcDefectRecordMapper.selectQcDefectRecordList(qcDefectRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增检验单缺陷记录
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertQcDefectRecord(QcDefectRecord qcDefectRecord)
|
||||
{
|
||||
qcDefectRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return qcDefectRecordMapper.insertQcDefectRecord(qcDefectRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改检验单缺陷记录
|
||||
*
|
||||
* @param qcDefectRecord 检验单缺陷记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateQcDefectRecord(QcDefectRecord qcDefectRecord)
|
||||
{
|
||||
qcDefectRecord.setUpdateTime(DateUtils.getNowDate());
|
||||
return qcDefectRecordMapper.updateQcDefectRecord(qcDefectRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除检验单缺陷记录
|
||||
*
|
||||
* @param recordIds 需要删除的检验单缺陷记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQcDefectRecordByRecordIds(Long[] recordIds)
|
||||
{
|
||||
return qcDefectRecordMapper.deleteQcDefectRecordByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除检验单缺陷记录信息
|
||||
*
|
||||
* @param recordId 检验单缺陷记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteQcDefectRecordByRecordId(Long recordId)
|
||||
{
|
||||
return qcDefectRecordMapper.deleteQcDefectRecordByRecordId(recordId);
|
||||
}
|
||||
}
|
117
ktg-mes/src/main/resources/mapper/qc/QcDefectRecordMapper.xml
Normal file
117
ktg-mes/src/main/resources/mapper/qc/QcDefectRecordMapper.xml
Normal file
@ -0,0 +1,117 @@
|
||||
<?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.qc.mapper.QcDefectRecordMapper">
|
||||
|
||||
<resultMap type="QcDefectRecord" id="QcDefectRecordResult">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="qcType" column="qc_type" />
|
||||
<result property="qcId" column="qc_id" />
|
||||
<result property="lineId" column="line_id" />
|
||||
<result property="defectName" column="defect_name" />
|
||||
<result property="defectLevel" column="defect_level" />
|
||||
<result property="defectQuantity" column="defect_quantity" />
|
||||
<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="selectQcDefectRecordVo">
|
||||
select record_id, qc_type, qc_id, line_id, defect_name, defect_level, defect_quantity, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_defect_record
|
||||
</sql>
|
||||
|
||||
<select id="selectQcDefectRecordList" parameterType="QcDefectRecord" resultMap="QcDefectRecordResult">
|
||||
<include refid="selectQcDefectRecordVo"/>
|
||||
<where>
|
||||
<if test="qcType != null and qcType != ''"> and qc_type = #{qcType}</if>
|
||||
<if test="qcId != null "> and qc_id = #{qcId}</if>
|
||||
<if test="lineId != null "> and line_id = #{lineId}</if>
|
||||
<if test="defectName != null and defectName != ''"> and defect_name like concat('%', #{defectName}, '%')</if>
|
||||
<if test="defectLevel != null and defectLevel != ''"> and defect_level = #{defectLevel}</if>
|
||||
<if test="defectQuantity != null "> and defect_quantity = #{defectQuantity}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcDefectRecordByRecordId" parameterType="Long" resultMap="QcDefectRecordResult">
|
||||
<include refid="selectQcDefectRecordVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertQcDefectRecord" parameterType="QcDefectRecord" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into qc_defect_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="qcType != null and qcType != ''">qc_type,</if>
|
||||
<if test="qcId != null">qc_id,</if>
|
||||
<if test="lineId != null">line_id,</if>
|
||||
<if test="defectName != null and defectName != ''">defect_name,</if>
|
||||
<if test="defectLevel != null and defectLevel != ''">defect_level,</if>
|
||||
<if test="defectQuantity != null">defect_quantity,</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="qcType != null and qcType != ''">#{qcType},</if>
|
||||
<if test="qcId != null">#{qcId},</if>
|
||||
<if test="lineId != null">#{lineId},</if>
|
||||
<if test="defectName != null and defectName != ''">#{defectName},</if>
|
||||
<if test="defectLevel != null and defectLevel != ''">#{defectLevel},</if>
|
||||
<if test="defectQuantity != null">#{defectQuantity},</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="updateQcDefectRecord" parameterType="QcDefectRecord">
|
||||
update qc_defect_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="qcType != null and qcType != ''">qc_type = #{qcType},</if>
|
||||
<if test="qcId != null">qc_id = #{qcId},</if>
|
||||
<if test="lineId != null">line_id = #{lineId},</if>
|
||||
<if test="defectName != null and defectName != ''">defect_name = #{defectName},</if>
|
||||
<if test="defectLevel != null and defectLevel != ''">defect_level = #{defectLevel},</if>
|
||||
<if test="defectQuantity != null">defect_quantity = #{defectQuantity},</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="deleteQcDefectRecordByRecordId" parameterType="Long">
|
||||
delete from qc_defect_record where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcDefectRecordByRecordIds" parameterType="String">
|
||||
delete from qc_defect_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