From 4dfb57089839e7e6894f8c107f996e879e59aad2 Mon Sep 17 00:00:00 2001 From: "JinLu.Yin" <411641505@qq.com> Date: Wed, 31 Aug 2022 22:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=BA=E8=B4=A7=E5=8D=95=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mes/qc/controller/QcOqcController.java | 112 ++++ .../java/com/ktg/mes/qc/domain/QcOqc.java | 505 ++++++++++++++++++ .../com/ktg/mes/qc/mapper/QcOqcMapper.java | 68 +++ .../com/ktg/mes/qc/service/IQcOqcService.java | 69 +++ .../mes/qc/service/impl/QcOqcServiceImpl.java | 109 ++++ .../main/resources/mapper/qc/QcOqcMapper.xml | 237 ++++++++ 6 files changed, 1100 insertions(+) create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcOqcController.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcOqcMapper.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcOqcService.java create mode 100644 ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcOqcServiceImpl.java create mode 100644 ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcOqcController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcOqcController.java new file mode 100644 index 0000000..93252a4 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcOqcController.java @@ -0,0 +1,112 @@ +package com.ktg.mes.qc.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ktg.common.constant.UserConstants; +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.QcOqc; +import com.ktg.mes.qc.service.IQcOqcService; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 出货检验单Controller + * + * @author yinjinlu + * @date 2022-08-31 + */ +@RestController +@RequestMapping("/mes/qc/oqc") +public class QcOqcController extends BaseController +{ + @Autowired + private IQcOqcService qcOqcService; + + /** + * 查询出货检验单列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:oqc:list')") + @GetMapping("/list") + public TableDataInfo list(QcOqc qcOqc) + { + startPage(); + List list = qcOqcService.selectQcOqcList(qcOqc); + return getDataTable(list); + } + + /** + * 导出出货检验单列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:oqc:export')") + @Log(title = "出货检验单", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, QcOqc qcOqc) + { + List list = qcOqcService.selectQcOqcList(qcOqc); + ExcelUtil util = new ExcelUtil(QcOqc.class); + util.exportExcel(response, list, "出货检验单数据"); + } + + /** + * 获取出货检验单详细信息 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:oqc:query')") + @GetMapping(value = "/{oqcId}") + public AjaxResult getInfo(@PathVariable("oqcId") Long oqcId) + { + return AjaxResult.success(qcOqcService.selectQcOqcByOqcId(oqcId)); + } + + /** + * 新增出货检验单 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:oqc:add')") + @Log(title = "出货检验单", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody QcOqc qcOqc) + { + if(UserConstants.NOT_UNIQUE.equals(qcOqcService.checkOqcCodeUnique(qcOqc))){ + return AjaxResult.error("出货单编号已存在!"); + } + return toAjax(qcOqcService.insertQcOqc(qcOqc)); + } + + /** + * 修改出货检验单 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:oqc:edit')") + @Log(title = "出货检验单", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody QcOqc qcOqc) + { + if(UserConstants.NOT_UNIQUE.equals(qcOqcService.checkOqcCodeUnique(qcOqc))){ + return AjaxResult.error("出货单编号已存在!"); + } + return toAjax(qcOqcService.updateQcOqc(qcOqc)); + } + + /** + * 删除出货检验单 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:oqc:remove')") + @Log(title = "出货检验单", businessType = BusinessType.DELETE) + @DeleteMapping("/{oqcIds}") + public AjaxResult remove(@PathVariable Long[] oqcIds) + { + return toAjax(qcOqcService.deleteQcOqcByOqcIds(oqcIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.java new file mode 100644 index 0000000..5a6d238 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcOqc.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_oqc + * + * @author yinjinlu + * @date 2022-08-31 + */ +public class QcOqc extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 出货检验单ID */ + private Long oqcId; + + /** 出货检验单编号 */ + @Excel(name = "出货检验单编号") + private String oqcCode; + + /** 出货检验单名称 */ + @Excel(name = "出货检验单名称") + private String oqcName; + + /** 检验模板ID */ + @Excel(name = "检验模板ID") + private Long templateId; + + /** 客户ID */ + @Excel(name = "客户ID") + private Long clientId; + + /** 客户编码 */ + @Excel(name = "客户编码") + private String clientCode; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String clientName; + + /** 批次号 */ + @Excel(name = "批次号") + private String batchCode; + + /** 产品物料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 BigDecimal quantityMinCheck; + + /** 最大不合格数 */ + @Excel(name = "最大不合格数") + private BigDecimal quantityMaxUnqualified; + + /** 发货数量 */ + @Excel(name = "发货数量") + private BigDecimal quantityOut; + + /** 本次检测数量 */ + @Excel(name = "本次检测数量") + private BigDecimal quantityCheck; + + /** 不合格数 */ + @Excel(name = "不合格数") + private BigDecimal quantityUnqualified; + + /** 合格数量 */ + @Excel(name = "合格数量") + private BigDecimal quantityQuanlified; + + /** 致命缺陷率 */ + @Excel(name = "致命缺陷率") + private BigDecimal crRate; + + /** 严重缺陷率 */ + @Excel(name = "严重缺陷率") + private BigDecimal majRate; + + /** 轻微缺陷率 */ + @Excel(name = "轻微缺陷率") + private BigDecimal minRate; + + /** 致命缺陷数量 */ + @Excel(name = "致命缺陷数量") + private BigDecimal crQuantity; + + /** 严重缺陷数量 */ + @Excel(name = "严重缺陷数量") + private BigDecimal majQuantity; + + /** 轻微缺陷数量 */ + @Excel(name = "轻微缺陷数量") + private BigDecimal minQuantity; + + /** 检测结果 */ + @Excel(name = "检测结果") + private String checkResult; + + /** 出货日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "出货日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date outDate; + + /** 检测日期 */ + @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 setOqcId(Long oqcId) + { + this.oqcId = oqcId; + } + + public Long getOqcId() + { + return oqcId; + } + public void setOqcCode(String oqcCode) + { + this.oqcCode = oqcCode; + } + + public String getOqcCode() + { + return oqcCode; + } + public void setOqcName(String oqcName) + { + this.oqcName = oqcName; + } + + public String getOqcName() + { + return oqcName; + } + public void setTemplateId(Long templateId) + { + this.templateId = templateId; + } + + public Long getTemplateId() + { + return templateId; + } + public void setClientId(Long clientId) + { + this.clientId = clientId; + } + + public Long getClientId() + { + return clientId; + } + public void setClientCode(String clientCode) + { + this.clientCode = clientCode; + } + + public String getClientCode() + { + return clientCode; + } + public void setClientName(String clientName) + { + this.clientName = clientName; + } + + public String getClientName() + { + return clientName; + } + public void setBatchCode(String batchCode) + { + this.batchCode = batchCode; + } + + public String getBatchCode() + { + return batchCode; + } + 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(BigDecimal quantityMinCheck) + { + this.quantityMinCheck = quantityMinCheck; + } + + public BigDecimal getQuantityMinCheck() + { + return quantityMinCheck; + } + public void setQuantityMaxUnqualified(BigDecimal quantityMaxUnqualified) + { + this.quantityMaxUnqualified = quantityMaxUnqualified; + } + + public BigDecimal getQuantityMaxUnqualified() + { + return quantityMaxUnqualified; + } + public void setQuantityOut(BigDecimal quantityOut) + { + this.quantityOut = quantityOut; + } + + public BigDecimal getQuantityOut() + { + return quantityOut; + } + public void setQuantityCheck(BigDecimal quantityCheck) + { + this.quantityCheck = quantityCheck; + } + + public BigDecimal getQuantityCheck() + { + return quantityCheck; + } + public void setQuantityUnqualified(BigDecimal quantityUnqualified) + { + this.quantityUnqualified = quantityUnqualified; + } + + public BigDecimal getQuantityUnqualified() + { + return quantityUnqualified; + } + public void setQuantityQuanlified(BigDecimal quantityQuanlified) + { + this.quantityQuanlified = quantityQuanlified; + } + + public BigDecimal getQuantityQuanlified() + { + return quantityQuanlified; + } + 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(BigDecimal crQuantity) + { + this.crQuantity = crQuantity; + } + + public BigDecimal getCrQuantity() + { + return crQuantity; + } + public void setMajQuantity(BigDecimal majQuantity) + { + this.majQuantity = majQuantity; + } + + public BigDecimal getMajQuantity() + { + return majQuantity; + } + public void setMinQuantity(BigDecimal minQuantity) + { + this.minQuantity = minQuantity; + } + + public BigDecimal getMinQuantity() + { + return minQuantity; + } + public void setCheckResult(String checkResult) + { + this.checkResult = checkResult; + } + + public String getCheckResult() + { + return checkResult; + } + public void setOutDate(Date outDate) + { + this.outDate = outDate; + } + + public Date getOutDate() + { + return outDate; + } + 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("oqcId", getOqcId()) + .append("oqcCode", getOqcCode()) + .append("oqcName", getOqcName()) + .append("templateId", getTemplateId()) + .append("clientId", getClientId()) + .append("clientCode", getClientCode()) + .append("clientName", getClientName()) + .append("batchCode", getBatchCode()) + .append("itemId", getItemId()) + .append("itemCode", getItemCode()) + .append("itemName", getItemName()) + .append("specification", getSpecification()) + .append("unitOfMeasure", getUnitOfMeasure()) + .append("quantityMinCheck", getQuantityMinCheck()) + .append("quantityMaxUnqualified", getQuantityMaxUnqualified()) + .append("quantityOut", getQuantityOut()) + .append("quantityCheck", getQuantityCheck()) + .append("quantityUnqualified", getQuantityUnqualified()) + .append("quantityQuanlified", getQuantityQuanlified()) + .append("crRate", getCrRate()) + .append("majRate", getMajRate()) + .append("minRate", getMinRate()) + .append("crQuantity", getCrQuantity()) + .append("majQuantity", getMajQuantity()) + .append("minQuantity", getMinQuantity()) + .append("checkResult", getCheckResult()) + .append("outDate", getOutDate()) + .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/QcOqcMapper.java b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcOqcMapper.java new file mode 100644 index 0000000..f83af6f --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcOqcMapper.java @@ -0,0 +1,68 @@ +package com.ktg.mes.qc.mapper; + +import java.util.List; +import com.ktg.mes.qc.domain.QcOqc; + +/** + * 出货检验单Mapper接口 + * + * @author yinjinlu + * @date 2022-08-31 + */ +public interface QcOqcMapper +{ + /** + * 查询出货检验单 + * + * @param oqcId 出货检验单主键 + * @return 出货检验单 + */ + public QcOqc selectQcOqcByOqcId(Long oqcId); + + /** + * 查询出货检验单列表 + * + * @param qcOqc 出货检验单 + * @return 出货检验单集合 + */ + public List selectQcOqcList(QcOqc qcOqc); + + /** + * 检查出货检验单号是否唯一 + * @param qcOqc + * @return + */ + public QcOqc checkOqcCodeUnique(QcOqc qcOqc); + + /** + * 新增出货检验单 + * + * @param qcOqc 出货检验单 + * @return 结果 + */ + public int insertQcOqc(QcOqc qcOqc); + + /** + * 修改出货检验单 + * + * @param qcOqc 出货检验单 + * @return 结果 + */ + public int updateQcOqc(QcOqc qcOqc); + + /** + * 删除出货检验单 + * + * @param oqcId 出货检验单主键 + * @return 结果 + */ + public int deleteQcOqcByOqcId(Long oqcId); + + /** + * 批量删除出货检验单 + * + * @param oqcIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteQcOqcByOqcIds(Long[] oqcIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcOqcService.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcOqcService.java new file mode 100644 index 0000000..4be7e43 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcOqcService.java @@ -0,0 +1,69 @@ +package com.ktg.mes.qc.service; + +import java.util.List; +import com.ktg.mes.qc.domain.QcOqc; + +/** + * 出货检验单Service接口 + * + * @author yinjinlu + * @date 2022-08-31 + */ +public interface IQcOqcService +{ + /** + * 查询出货检验单 + * + * @param oqcId 出货检验单主键 + * @return 出货检验单 + */ + public QcOqc selectQcOqcByOqcId(Long oqcId); + + /** + * 查询出货检验单列表 + * + * @param qcOqc 出货检验单 + * @return 出货检验单集合 + */ + public List selectQcOqcList(QcOqc qcOqc); + + + /** + * 检查出货检验单号是否唯一 + * @param qcOqc + * @return + */ + public String checkOqcCodeUnique(QcOqc qcOqc); + + /** + * 新增出货检验单 + * + * @param qcOqc 出货检验单 + * @return 结果 + */ + public int insertQcOqc(QcOqc qcOqc); + + /** + * 修改出货检验单 + * + * @param qcOqc 出货检验单 + * @return 结果 + */ + public int updateQcOqc(QcOqc qcOqc); + + /** + * 批量删除出货检验单 + * + * @param oqcIds 需要删除的出货检验单主键集合 + * @return 结果 + */ + public int deleteQcOqcByOqcIds(Long[] oqcIds); + + /** + * 删除出货检验单信息 + * + * @param oqcId 出货检验单主键 + * @return 结果 + */ + public int deleteQcOqcByOqcId(Long oqcId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcOqcServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcOqcServiceImpl.java new file mode 100644 index 0000000..d0051ba --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcOqcServiceImpl.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.QcOqcMapper; +import com.ktg.mes.qc.domain.QcOqc; +import com.ktg.mes.qc.service.IQcOqcService; + +/** + * 出货检验单Service业务层处理 + * + * @author yinjinlu + * @date 2022-08-31 + */ +@Service +public class QcOqcServiceImpl implements IQcOqcService +{ + @Autowired + private QcOqcMapper qcOqcMapper; + + /** + * 查询出货检验单 + * + * @param oqcId 出货检验单主键 + * @return 出货检验单 + */ + @Override + public QcOqc selectQcOqcByOqcId(Long oqcId) + { + return qcOqcMapper.selectQcOqcByOqcId(oqcId); + } + + /** + * 查询出货检验单列表 + * + * @param qcOqc 出货检验单 + * @return 出货检验单 + */ + @Override + public List selectQcOqcList(QcOqc qcOqc) + { + return qcOqcMapper.selectQcOqcList(qcOqc); + } + + @Override + public String checkOqcCodeUnique(QcOqc qcOqc) { + QcOqc oqc = qcOqcMapper.checkOqcCodeUnique(qcOqc); + Long oqcId = qcOqc.getOqcId() == null? -1L : qcOqc.getOqcId(); + if(StringUtils.isNotNull(oqc) && oqc.getOqcId().longValue() != oqcId.longValue()){ + return UserConstants.NOT_UNIQUE; + } + return UserConstants.UNIQUE; + } + + /** + * 新增出货检验单 + * + * @param qcOqc 出货检验单 + * @return 结果 + */ + @Override + public int insertQcOqc(QcOqc qcOqc) + { + qcOqc.setCreateTime(DateUtils.getNowDate()); + return qcOqcMapper.insertQcOqc(qcOqc); + } + + /** + * 修改出货检验单 + * + * @param qcOqc 出货检验单 + * @return 结果 + */ + @Override + public int updateQcOqc(QcOqc qcOqc) + { + qcOqc.setUpdateTime(DateUtils.getNowDate()); + return qcOqcMapper.updateQcOqc(qcOqc); + } + + /** + * 批量删除出货检验单 + * + * @param oqcIds 需要删除的出货检验单主键 + * @return 结果 + */ + @Override + public int deleteQcOqcByOqcIds(Long[] oqcIds) + { + return qcOqcMapper.deleteQcOqcByOqcIds(oqcIds); + } + + /** + * 删除出货检验单信息 + * + * @param oqcId 出货检验单主键 + * @return 结果 + */ + @Override + public int deleteQcOqcByOqcId(Long oqcId) + { + return qcOqcMapper.deleteQcOqcByOqcId(oqcId); + } +} diff --git a/ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml b/ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml new file mode 100644 index 0000000..18eebac --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/qc/QcOqcMapper.xml @@ -0,0 +1,237 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select oqc_id, oqc_code, oqc_name, template_id, client_id, client_code, client_name, batch_code, item_id, item_code, item_name, specification, unit_of_measure, quantity_min_check, quantity_max_unqualified, quantity_out, quantity_check, quantity_unqualified, quantity_quanlified, cr_rate, maj_rate, min_rate, cr_quantity, maj_quantity, min_quantity, check_result, out_date, inspect_date, inspector, status, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_oqc + + + + + + + + + + insert into qc_oqc + + oqc_code, + oqc_name, + template_id, + client_id, + client_code, + client_name, + batch_code, + item_id, + item_code, + item_name, + specification, + unit_of_measure, + quantity_min_check, + quantity_max_unqualified, + quantity_out, + quantity_check, + quantity_unqualified, + quantity_quanlified, + cr_rate, + maj_rate, + min_rate, + cr_quantity, + maj_quantity, + min_quantity, + check_result, + out_date, + inspect_date, + inspector, + status, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + + + #{oqcCode}, + #{oqcName}, + #{templateId}, + #{clientId}, + #{clientCode}, + #{clientName}, + #{batchCode}, + #{itemId}, + #{itemCode}, + #{itemName}, + #{specification}, + #{unitOfMeasure}, + #{quantityMinCheck}, + #{quantityMaxUnqualified}, + #{quantityOut}, + #{quantityCheck}, + #{quantityUnqualified}, + #{quantityQuanlified}, + #{crRate}, + #{majRate}, + #{minRate}, + #{crQuantity}, + #{majQuantity}, + #{minQuantity}, + #{checkResult}, + #{outDate}, + #{inspectDate}, + #{inspector}, + #{status}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update qc_oqc + + oqc_code = #{oqcCode}, + oqc_name = #{oqcName}, + template_id = #{templateId}, + client_id = #{clientId}, + client_code = #{clientCode}, + client_name = #{clientName}, + batch_code = #{batchCode}, + item_id = #{itemId}, + item_code = #{itemCode}, + item_name = #{itemName}, + specification = #{specification}, + unit_of_measure = #{unitOfMeasure}, + quantity_min_check = #{quantityMinCheck}, + quantity_max_unqualified = #{quantityMaxUnqualified}, + quantity_out = #{quantityOut}, + quantity_check = #{quantityCheck}, + quantity_unqualified = #{quantityUnqualified}, + quantity_quanlified = #{quantityQuanlified}, + cr_rate = #{crRate}, + maj_rate = #{majRate}, + min_rate = #{minRate}, + cr_quantity = #{crQuantity}, + maj_quantity = #{majQuantity}, + min_quantity = #{minQuantity}, + check_result = #{checkResult}, + out_date = #{outDate}, + 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 oqc_id = #{oqcId} + + + + delete from qc_oqc where oqc_id = #{oqcId} + + + + delete from qc_oqc where oqc_id in + + #{oqcId} + + + \ No newline at end of file