diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIqcController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIqcController.java new file mode 100644 index 0000000..82e43d4 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcIqcController.java @@ -0,0 +1,135 @@ +package com.ktg.mes.qc.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import cn.hutool.core.collection.CollUtil; +import com.ktg.common.constant.UserConstants; +import com.ktg.mes.qc.domain.QcTemplateProduct; +import com.ktg.mes.qc.service.IQcTemplateProductService; +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.QcIqc; +import com.ktg.mes.qc.service.IQcIqcService; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 来料检验单Controller + * + * @author yinjinlu + * @date 2022-05-19 + */ +@RestController +@RequestMapping("/mes/qc/iqc") +public class QcIqcController extends BaseController +{ + @Autowired + private IQcIqcService qcIqcService; + + @Autowired + private IQcTemplateProductService qcTemplateProductService; + + /** + * 查询来料检验单列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:iqc:list')") + @GetMapping("/list") + public TableDataInfo list(QcIqc qcIqc) + { + startPage(); + List list = qcIqcService.selectQcIqcList(qcIqc); + return getDataTable(list); + } + + /** + * 导出来料检验单列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:iqc:export')") + @Log(title = "来料检验单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, QcIqc qcIqc) + { + List list = qcIqcService.selectQcIqcList(qcIqc); + ExcelUtil util = new ExcelUtil(QcIqc.class); + util.exportExcel(response, list, "来料检验单数据"); + } + + /** + * 获取来料检验单详细信息 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:iqc:query')") + @GetMapping(value = "/{iqcId}") + public AjaxResult getInfo(@PathVariable("iqcId") Long iqcId) + { + return AjaxResult.success(qcIqcService.selectQcIqcByIqcId(iqcId)); + } + + /** + * 新增来料检验单 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:iqc:add')") + @Log(title = "来料检验单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody QcIqc qcIqc) + { + if(UserConstants.NOT_UNIQUE.equals(qcIqcService.checkIqcCodeUnique(qcIqc))){ + return AjaxResult.error("单据编号已存在!"); + } + + QcTemplateProduct param = new QcTemplateProduct(); + param.setItemId(qcIqc.getItemId()); + List templates = qcTemplateProductService.selectQcTemplateProductList(param); + if(CollUtil.isNotEmpty(templates)){ + qcIqc.setTemplateId(templates.get(0).getTemplateId()); + }else{ + return AjaxResult.error("当前产品未配置检测模板!"); + } + return toAjax(qcIqcService.insertQcIqc(qcIqc)); + } + + /** + * 修改来料检验单 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:iqc:edit')") + @Log(title = "来料检验单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody QcIqc qcIqc) + { + if(UserConstants.NOT_UNIQUE.equals(qcIqcService.checkIqcCodeUnique(qcIqc))){ + return AjaxResult.error("单据编号已存在!"); + } + QcTemplateProduct param = new QcTemplateProduct(); + param.setItemId(qcIqc.getItemId()); + List templates = qcTemplateProductService.selectQcTemplateProductList(param); + if(CollUtil.isNotEmpty(templates)){ + qcIqc.setTemplateId(templates.get(0).getTemplateId()); + }else{ + return AjaxResult.error("当前产品未配置检测模板!"); + } + return toAjax(qcIqcService.updateQcIqc(qcIqc)); + } + + /** + * 删除来料检验单 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:iqc:remove')") + @Log(title = "来料检验单", businessType = BusinessType.DELETE) + @DeleteMapping("/{iqcIds}") + public AjaxResult remove(@PathVariable Long[] iqcIds) + { + return toAjax(qcIqcService.deleteQcIqcByIqcIds(iqcIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIqc.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIqc.java new file mode 100644 index 0000000..12e62d1 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcIqc.java @@ -0,0 +1,505 @@ +package com.ktg.mes.qc.domain; + +import java.math.BigDecimal; +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; + +/** + * 来料检验单对象 qc_iqc + * + * @author yinjinlu + * @date 2022-05-19 + */ +public class QcIqc extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 来料检验单ID */ + private Long iqcId; + + /** 来料检验单编号 */ + @Excel(name = "来料检验单编号") + private String iqcCode; + + /** 来料检验单名称 */ + @Excel(name = "来料检验单名称") + private String iqcName; + + /** 检验模板ID */ + @Excel(name = "检验模板ID") + private Long templateId; + + /** 供应商ID */ + @Excel(name = "供应商ID") + private Long vendorId; + + /** 供应商编码 */ + @Excel(name = "供应商编码") + private String vendorCode; + + /** 供应商名称 */ + @Excel(name = "供应商名称") + private String vendorName; + + /** 供应商简称 */ + @Excel(name = "供应商简称") + private String vendorNick; + + /** 供应商批次号 */ + @Excel(name = "供应商批次号") + private String vendorBatch; + + /** 产品物料ID */ + @Excel(name = "产品物料ID") + private Long itemId; + + /** 产品物料编码 */ + @Excel(name = "产品物料编码") + private String itemCode; + + /** 产品物料名称 */ + @Excel(name = "产品物料名称") + private String itemName; + + /** 规格型号 */ + @Excel(name = "规格型号") + private String specification; + + /** 单位 */ + @Excel(name = "单位") + private String unitOfMeasure; + + /** 最低检测数 */ + @Excel(name = "最低检测数") + private Long quantityMinCheck; + + /** 最大不合格数 */ + @Excel(name = "最大不合格数") + private Long quantityMaxUnqualified; + + /** 本次接收数量 */ + @Excel(name = "本次接收数量") + private BigDecimal quantityRecived; + + /** 本次检测数量 */ + @Excel(name = "本次检测数量") + private Long quantityCheck; + + /** 不合格数 */ + @Excel(name = "不合格数") + private Long quantityUnqualified; + + /** 致命缺陷率 */ + @Excel(name = "致命缺陷率") + private BigDecimal crRate; + + /** 严重缺陷率 */ + @Excel(name = "严重缺陷率") + private BigDecimal majRate; + + /** 轻微缺陷率 */ + @Excel(name = "轻微缺陷率") + private BigDecimal minRate; + + /** 致命缺陷数量 */ + @Excel(name = "致命缺陷数量") + private Long crQuantity; + + /** 严重缺陷数量 */ + @Excel(name = "严重缺陷数量") + private Long majQuantity; + + /** 轻微缺陷数量 */ + @Excel(name = "轻微缺陷数量") + private Long minQuantity; + + /** 检测结果 */ + @Excel(name = "检测结果") + private String checkResult; + + /** 来料日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "来料日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date reciveDate; + + /** 检测日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "检测日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date inspectDate; + + /** 检测人员 */ + @Excel(name = "检测人员") + private String inspector; + + /** 单据状态 */ + @Excel(name = "单据状态") + private String status; + + /** 预留字段1 */ + private String attr1; + + /** 预留字段2 */ + private String attr2; + + /** 预留字段3 */ + private Long attr3; + + /** 预留字段4 */ + private Long attr4; + + public void setIqcId(Long iqcId) + { + this.iqcId = iqcId; + } + + public Long getIqcId() + { + return iqcId; + } + public void setIqcCode(String iqcCode) + { + this.iqcCode = iqcCode; + } + + public String getIqcCode() + { + return iqcCode; + } + public void setIqcName(String iqcName) + { + this.iqcName = iqcName; + } + + public String getIqcName() + { + return iqcName; + } + public void setTemplateId(Long templateId) + { + this.templateId = templateId; + } + + public Long getTemplateId() + { + return templateId; + } + public void setVendorId(Long vendorId) + { + this.vendorId = vendorId; + } + + public Long getVendorId() + { + return vendorId; + } + public void setVendorCode(String vendorCode) + { + this.vendorCode = vendorCode; + } + + public String getVendorCode() + { + return vendorCode; + } + public void setVendorName(String vendorName) + { + this.vendorName = vendorName; + } + + public String getVendorName() + { + return vendorName; + } + public void setVendorNick(String vendorNick) + { + this.vendorNick = vendorNick; + } + + public String getVendorNick() + { + return vendorNick; + } + public void setVendorBatch(String vendorBatch) + { + this.vendorBatch = vendorBatch; + } + + public String getVendorBatch() + { + return vendorBatch; + } + public void setItemId(Long itemId) + { + this.itemId = itemId; + } + + public Long getItemId() + { + return itemId; + } + public void setItemCode(String itemCode) + { + this.itemCode = itemCode; + } + + public String getItemCode() + { + return itemCode; + } + public void setItemName(String itemName) + { + this.itemName = itemName; + } + + public String getItemName() + { + return itemName; + } + public void setSpecification(String specification) + { + this.specification = specification; + } + + public String getSpecification() + { + return specification; + } + public void setUnitOfMeasure(String unitOfMeasure) + { + this.unitOfMeasure = unitOfMeasure; + } + + public String getUnitOfMeasure() + { + return unitOfMeasure; + } + public void setQuantityMinCheck(Long quantityMinCheck) + { + this.quantityMinCheck = quantityMinCheck; + } + + public Long getQuantityMinCheck() + { + return quantityMinCheck; + } + public void setQuantityMaxUnqualified(Long quantityMaxUnqualified) + { + this.quantityMaxUnqualified = quantityMaxUnqualified; + } + + public Long getQuantityMaxUnqualified() + { + return quantityMaxUnqualified; + } + public void setQuantityRecived(BigDecimal quantityRecived) + { + this.quantityRecived = quantityRecived; + } + + public BigDecimal getQuantityRecived() + { + return quantityRecived; + } + public void setQuantityCheck(Long quantityCheck) + { + this.quantityCheck = quantityCheck; + } + + public Long getQuantityCheck() + { + return quantityCheck; + } + public void setQuantityUnqualified(Long quantityUnqualified) + { + this.quantityUnqualified = quantityUnqualified; + } + + public Long getQuantityUnqualified() + { + return quantityUnqualified; + } + public void setCrRate(BigDecimal crRate) + { + this.crRate = crRate; + } + + public BigDecimal getCrRate() + { + return crRate; + } + public void setMajRate(BigDecimal majRate) + { + this.majRate = majRate; + } + + public BigDecimal getMajRate() + { + return majRate; + } + public void setMinRate(BigDecimal minRate) + { + this.minRate = minRate; + } + + public BigDecimal getMinRate() + { + return minRate; + } + public void setCrQuantity(Long crQuantity) + { + this.crQuantity = crQuantity; + } + + public Long getCrQuantity() + { + return crQuantity; + } + public void setMajQuantity(Long majQuantity) + { + this.majQuantity = majQuantity; + } + + public Long getMajQuantity() + { + return majQuantity; + } + public void setMinQuantity(Long minQuantity) + { + this.minQuantity = minQuantity; + } + + public Long getMinQuantity() + { + return minQuantity; + } + public void setCheckResult(String checkResult) + { + this.checkResult = checkResult; + } + + public String getCheckResult() + { + return checkResult; + } + public void setReciveDate(Date reciveDate) + { + this.reciveDate = reciveDate; + } + + public Date getReciveDate() + { + return reciveDate; + } + public void setInspectDate(Date inspectDate) + { + this.inspectDate = inspectDate; + } + + public Date getInspectDate() + { + return inspectDate; + } + public void setInspector(String inspector) + { + this.inspector = inspector; + } + + public String getInspector() + { + return inspector; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + 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("iqcId", getIqcId()) + .append("iqcCode", getIqcCode()) + .append("iqcName", getIqcName()) + .append("templateId", getTemplateId()) + .append("vendorId", getVendorId()) + .append("vendorCode", getVendorCode()) + .append("vendorName", getVendorName()) + .append("vendorNick", getVendorNick()) + .append("vendorBatch", getVendorBatch()) + .append("itemId", getItemId()) + .append("itemCode", getItemCode()) + .append("itemName", getItemName()) + .append("specification", getSpecification()) + .append("unitOfMeasure", getUnitOfMeasure()) + .append("quantityMinCheck", getQuantityMinCheck()) + .append("quantityMaxUnqualified", getQuantityMaxUnqualified()) + .append("quantityRecived", getQuantityRecived()) + .append("quantityCheck", getQuantityCheck()) + .append("quantityUnqualified", getQuantityUnqualified()) + .append("crRate", getCrRate()) + .append("majRate", getMajRate()) + .append("minRate", getMinRate()) + .append("crQuantity", getCrQuantity()) + .append("majQuantity", getMajQuantity()) + .append("minQuantity", getMinQuantity()) + .append("checkResult", getCheckResult()) + .append("reciveDate", getReciveDate()) + .append("inspectDate", getInspectDate()) + .append("inspector", getInspector()) + .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(); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcIqcMapper.java b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcIqcMapper.java new file mode 100644 index 0000000..bf1a84c --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcIqcMapper.java @@ -0,0 +1,63 @@ +package com.ktg.mes.qc.mapper; + +import java.util.List; +import com.ktg.mes.qc.domain.QcIqc; + +/** + * 来料检验单Mapper接口 + * + * @author yinjinlu + * @date 2022-05-19 + */ +public interface QcIqcMapper +{ + /** + * 查询来料检验单 + * + * @param iqcId 来料检验单主键 + * @return 来料检验单 + */ + public QcIqc selectQcIqcByIqcId(Long iqcId); + + /** + * 查询来料检验单列表 + * + * @param qcIqc 来料检验单 + * @return 来料检验单集合 + */ + public List selectQcIqcList(QcIqc qcIqc); + + public QcIqc checkIqcCodeUnique(QcIqc qcIqc); + + /** + * 新增来料检验单 + * + * @param qcIqc 来料检验单 + * @return 结果 + */ + public int insertQcIqc(QcIqc qcIqc); + + /** + * 修改来料检验单 + * + * @param qcIqc 来料检验单 + * @return 结果 + */ + public int updateQcIqc(QcIqc qcIqc); + + /** + * 删除来料检验单 + * + * @param iqcId 来料检验单主键 + * @return 结果 + */ + public int deleteQcIqcByIqcId(Long iqcId); + + /** + * 批量删除来料检验单 + * + * @param iqcIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteQcIqcByIqcIds(Long[] iqcIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcIqcService.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcIqcService.java new file mode 100644 index 0000000..fb8e52b --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcIqcService.java @@ -0,0 +1,68 @@ +package com.ktg.mes.qc.service; + +import java.util.List; +import com.ktg.mes.qc.domain.QcIqc; + +/** + * 来料检验单Service接口 + * + * @author yinjinlu + * @date 2022-05-19 + */ +public interface IQcIqcService +{ + /** + * 查询来料检验单 + * + * @param iqcId 来料检验单主键 + * @return 来料检验单 + */ + public QcIqc selectQcIqcByIqcId(Long iqcId); + + /** + * 查询来料检验单列表 + * + * @param qcIqc 来料检验单 + * @return 来料检验单集合 + */ + public List selectQcIqcList(QcIqc qcIqc); + + /** + * 检查来料检验单号是否重复 + * @param qcIqc + * @return + */ + public String checkIqcCodeUnique(QcIqc qcIqc); + + /** + * 新增来料检验单 + * + * @param qcIqc 来料检验单 + * @return 结果 + */ + public int insertQcIqc(QcIqc qcIqc); + + /** + * 修改来料检验单 + * + * @param qcIqc 来料检验单 + * @return 结果 + */ + public int updateQcIqc(QcIqc qcIqc); + + /** + * 批量删除来料检验单 + * + * @param iqcIds 需要删除的来料检验单主键集合 + * @return 结果 + */ + public int deleteQcIqcByIqcIds(Long[] iqcIds); + + /** + * 删除来料检验单信息 + * + * @param iqcId 来料检验单主键 + * @return 结果 + */ + public int deleteQcIqcByIqcId(Long iqcId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcIqcServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcIqcServiceImpl.java new file mode 100644 index 0000000..b3d6750 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcIqcServiceImpl.java @@ -0,0 +1,109 @@ +package com.ktg.mes.qc.service.impl; + +import java.util.List; + +import com.ktg.common.constant.UserConstants; +import com.ktg.common.utils.DateUtils; +import com.ktg.common.utils.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ktg.mes.qc.mapper.QcIqcMapper; +import com.ktg.mes.qc.domain.QcIqc; +import com.ktg.mes.qc.service.IQcIqcService; + +/** + * 来料检验单Service业务层处理 + * + * @author yinjinlu + * @date 2022-05-19 + */ +@Service +public class QcIqcServiceImpl implements IQcIqcService +{ + @Autowired + private QcIqcMapper qcIqcMapper; + + /** + * 查询来料检验单 + * + * @param iqcId 来料检验单主键 + * @return 来料检验单 + */ + @Override + public QcIqc selectQcIqcByIqcId(Long iqcId) + { + return qcIqcMapper.selectQcIqcByIqcId(iqcId); + } + + /** + * 查询来料检验单列表 + * + * @param qcIqc 来料检验单 + * @return 来料检验单 + */ + @Override + public List selectQcIqcList(QcIqc qcIqc) + { + return qcIqcMapper.selectQcIqcList(qcIqc); + } + + @Override + public String checkIqcCodeUnique(QcIqc qcIqc) { + QcIqc iqc = qcIqcMapper.checkIqcCodeUnique(qcIqc); + Long iqcId = qcIqc.getIqcId()==null?-1L:qcIqc.getIqcId(); + if(StringUtils.isNotNull(iqc) && iqc.getIqcId().longValue() != iqcId.longValue()){ + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 新增来料检验单 + * + * @param qcIqc 来料检验单 + * @return 结果 + */ + @Override + public int insertQcIqc(QcIqc qcIqc) + { + qcIqc.setCreateTime(DateUtils.getNowDate()); + return qcIqcMapper.insertQcIqc(qcIqc); + } + + /** + * 修改来料检验单 + * + * @param qcIqc 来料检验单 + * @return 结果 + */ + @Override + public int updateQcIqc(QcIqc qcIqc) + { + qcIqc.setUpdateTime(DateUtils.getNowDate()); + return qcIqcMapper.updateQcIqc(qcIqc); + } + + /** + * 批量删除来料检验单 + * + * @param iqcIds 需要删除的来料检验单主键 + * @return 结果 + */ + @Override + public int deleteQcIqcByIqcIds(Long[] iqcIds) + { + return qcIqcMapper.deleteQcIqcByIqcIds(iqcIds); + } + + /** + * 删除来料检验单信息 + * + * @param iqcId 来料检验单主键 + * @return 结果 + */ + @Override + public int deleteQcIqcByIqcId(Long iqcId) + { + return qcIqcMapper.deleteQcIqcByIqcId(iqcId); + } +} diff --git a/ktg-mes/src/main/resources/mapper/qc/QcIqcMapper.xml b/ktg-mes/src/main/resources/mapper/qc/QcIqcMapper.xml new file mode 100644 index 0000000..38acca1 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/qc/QcIqcMapper.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select iqc_id, iqc_code, iqc_name, template_id, vendor_id, vendor_code, vendor_name, vendor_nick, vendor_batch, item_id, item_code, item_name, specification, unit_of_measure, quantity_min_check, quantity_max_unqualified, quantity_recived, quantity_check, quantity_unqualified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, recive_date, inspect_date, inspector, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_iqc + + + + + + + + + + insert into qc_iqc + + iqc_code, + iqc_name, + template_id, + vendor_id, + vendor_code, + vendor_name, + vendor_nick, + vendor_batch, + item_id, + item_code, + item_name, + specification, + unit_of_measure, + quantity_min_check, + quantity_max_unqualified, + quantity_recived, + quantity_check, + quantity_unqualified, + cr_rate, + maj_rate, + min_rate, + cr_quantity, + maj_quantity, + min_quantity, + check_result, + recive_date, + inspect_date, + inspector, + status, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + + + #{iqcCode}, + #{iqcName}, + #{templateId}, + #{vendorId}, + #{vendorCode}, + #{vendorName}, + #{vendorNick}, + #{vendorBatch}, + #{itemId}, + #{itemCode}, + #{itemName}, + #{specification}, + #{unitOfMeasure}, + #{quantityMinCheck}, + #{quantityMaxUnqualified}, + #{quantityRecived}, + #{quantityCheck}, + #{quantityUnqualified}, + #{crRate}, + #{majRate}, + #{minRate}, + #{crQuantity}, + #{majQuantity}, + #{minQuantity}, + #{checkResult}, + #{reciveDate}, + #{inspectDate}, + #{inspector}, + #{status}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update qc_iqc + + iqc_code = #{iqcCode}, + iqc_name = #{iqcName}, + template_id = #{templateId}, + vendor_id = #{vendorId}, + vendor_code = #{vendorCode}, + vendor_name = #{vendorName}, + vendor_nick = #{vendorNick}, + vendor_batch = #{vendorBatch}, + item_id = #{itemId}, + item_code = #{itemCode}, + item_name = #{itemName}, + specification = #{specification}, + unit_of_measure = #{unitOfMeasure}, + quantity_min_check = #{quantityMinCheck}, + quantity_max_unqualified = #{quantityMaxUnqualified}, + quantity_recived = #{quantityRecived}, + quantity_check = #{quantityCheck}, + quantity_unqualified = #{quantityUnqualified}, + cr_rate = #{crRate}, + maj_rate = #{majRate}, + min_rate = #{minRate}, + cr_quantity = #{crQuantity}, + maj_quantity = #{majQuantity}, + min_quantity = #{minQuantity}, + check_result = #{checkResult}, + recive_date = #{reciveDate}, + inspect_date = #{inspectDate}, + inspector = #{inspector}, + status = #{status}, + remark = #{remark}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where iqc_id = #{iqcId} + + + + delete from qc_iqc where iqc_id = #{iqcId} + + + + delete from qc_iqc where iqc_id in + + #{iqcId} + + + \ No newline at end of file