diff --git a/README.md b/README.md index 11071a2..9c820ec 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,9 @@ 系统将提供“售前”、“实施”、“用户培训”、“运维”等多个阶段的指导文档和教学视频,以帮助非IT专业人士顺利完成MES项目的实施应用。 - 前端代码地址:https://gitee.com/kutangguo/ktg-mes-ui - -- 触控屏端地址:https://gitee.com/kutangguo/ktg-mes-pad - - PC端在线体验地址: [http://www.029tec.com](http://www.029tec.com/) 【请不要修改账户密码,以免影响其他人体验】 - - 当前开发进度请参考doc->开发进度->进度甘特图.xlsx - - 第一版售前PPT请查看doc->售前资料->《苦糖果MES系统产品介绍(A4横板).pptx》 - - 操作手册/软件说明书请参考doc->售前资料->《苦糖果生产执行管理系统-【软件说明书】.docx》 欢迎交流沟通:QQ:411641505 diff --git a/doc/设计文档/数据库设计/mes-qc.sql b/doc/设计文档/数据库设计/mes-qc.sql index 4016822..6139973 100644 --- a/doc/设计文档/数据库设计/mes-qc.sql +++ b/doc/设计文档/数据库设计/mes-qc.sql @@ -8,6 +8,8 @@ create table qc_index ( index_name varchar(255) not null comment '检测项名称', index_type varchar(64) not null comment '检测项类型', qc_tool varchar(255) comment '检测工具', + qc_result_type varchar(64) not null comment '质检值类型', + qc_result_spc varchar(255) comment '值属性', remark varchar(500) default '' comment '备注', attr1 varchar(64) default null comment '预留字段1', attr2 varchar(255) default null comment '预留字段2', @@ -432,3 +434,68 @@ create table qc_oqc_line ( +-- ---------------------------- +-- 14、检测结果记录表 +-- ---------------------------- +drop table if exists qc_result; +create table qc_result ( + result_id bigint(20) not null auto_increment comment '记录ID', + result_code varchar(64) not null comment '样品编号', + source_doc_id bigint(20) comment '关联的质检单ID', + source_doc_code varchar(64) comment '关联的质检单编号', + source_doc_name varchar(255) comment '关联的质检单名称', + source_doc_type varchar(64) comment '关联的质检单类型', + item_id bigint(20) not null comment '产品物料ID', + item_code varchar(64) comment '产品物料编码', + item_name varchar(255) comment '产品物料名称', + specification varchar(500) comment '规格型号', + unit_of_measure varchar(64) comment '单位', + sn_code varchar(255) comment '对应的物资SN', + remark varchar(500) default '' comment '备注', + attr1 varchar(64) default null comment '预留字段1', + attr2 varchar(255) default null comment '预留字段2', + attr3 int(11) default 0 comment '预留字段3', + attr4 int(11) default 0 comment '预留字段4', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (result_id) +) engine=innodb auto_increment=200 comment = '检测结果记录表'; + + +-- ---------------------------- +-- 14、检测结果明细记录表 +-- ---------------------------- +drop table if exists qc_result_detail; +create table qc_result_detail ( + detail_id bigint(20) not null auto_increment comment '流水号', + result_id bigint(20) not null comment '结果记录ID', + index_id bigint(20) not null comment '检测项ID', + index_type varchar(64) comment '检测项类型', + qc_tool varchar(255) comment '检测工具', + check_method varchar(500) comment '检测要求', + stander_val double(12,4) comment '标准值', + unit_of_measure varchar(64) comment '单位', + threshold_max double(12,4) comment '误差上限', + threshold_min double(12,4) comment '误差下限', + qc_result_type varchar(64) not null comment '质检值类型', + qc_result_spc varchar(255) comment '值属性', + qc_val_float float(14,4) comment '浮点值', + qc_val_integer int(11) comment '整数', + qc_val_text varchar(500) comment '文字', + qc_val_dict varchar(64) comment '字典项', + qc_val_file varchar(255) comment '文件', + defect_flag varchar(64) default 'normarl' comment '判定', + remark varchar(500) default '' comment '备注', + attr1 varchar(64) default null comment '预留字段1', + attr2 varchar(255) default null comment '预留字段2', + attr3 int(11) default 0 comment '预留字段3', + attr4 int(11) default 0 comment '预留字段4', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (detail_id) +) engine=innodb auto_increment=200 comment = '检测结果明细记录表'; + diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcResultController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcResultController.java new file mode 100644 index 0000000..28a12eb --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcResultController.java @@ -0,0 +1,203 @@ +package com.ktg.mes.qc.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ktg.common.constant.UserConstants; +import com.ktg.common.utils.StringUtils; +import com.ktg.mes.qc.domain.*; +import com.ktg.mes.qc.service.*; +import net.sf.jsqlparser.util.validation.metadata.DatabaseException; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +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.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 检测结果记录Controller + * + * @author yinjinlu + * @date 2024-11-29 + */ +@RestController +@RequestMapping("/mes/qc/qcresult") +public class QcResultController extends BaseController +{ + @Autowired + private IQcResultService qcResultService; + + @Autowired + private IQcResultDetailService qcResultDetailService; + + @Autowired + private IQcIndexService qcIndexService; + + @Autowired + private IQcIqcService iqcService; + + @Autowired + private IQcIpqcService pqcService; + + @Autowired + private IQcOqcService oqcService; + + + /** + * 查询检测结果记录列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:list')") + @GetMapping("/list") + public TableDataInfo list(QcResult qcResult) + { + startPage(); + List list = qcResultService.selectQcResultList(qcResult); + return getDataTable(list); + } + + /** + * 导出检测结果记录列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:export')") + @Log(title = "检测结果记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, QcResult qcResult) + { + List list = qcResultService.selectQcResultList(qcResult); + ExcelUtil util = new ExcelUtil(QcResult.class); + util.exportExcel(response, list, "检测结果记录数据"); + } + + /** + * 获取检测结果记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:query')") + @GetMapping(value = "/{resultId}") + public AjaxResult getInfo(@PathVariable("resultId") Long resultId) + { + return AjaxResult.success(qcResultService.selectQcResultByResultId(resultId)); + } + + /** + * 新增检测结果记录 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:add')") + @Log(title = "检测结果记录", businessType = BusinessType.INSERT) + @Transactional + @PostMapping + public AjaxResult add(@RequestBody QcResult qcResult) + { + List items = qcResult.getItems(); + if(CollectionUtils.isEmpty(items)){ + return AjaxResult.error("检测项以及对应的结果值不能为空!"); + } + + switch (qcResult.getSourceDocType()){ + case UserConstants.QC_TYPE_IQC: + QcIqc iqc = iqcService.selectQcIqcByIqcId(qcResult.getSourceDocId()); + if(!StringUtils.isNotNull(iqc)){ + return AjaxResult.error("检测结果对应的来料检验单不存在!"); + } + + qcResult.setSourceDocCode(iqc.getIqcCode()); + qcResult.setSourceDocName(iqc.getIqcName()); + qcResult.setItemId(iqc.getItemId()); + qcResult.setItemCode(iqc.getItemCode()); + qcResult.setItemName(iqc.getItemName()); + qcResult.setSpecification(iqc.getSpecification()); + qcResult.setUnitOfMeasure(iqc.getUnitOfMeasure()); + break; + case UserConstants.QC_TYPE_IPQC: + QcIpqc pqc = pqcService.selectQcIpqcByIpqcId(qcResult.getSourceDocId()); + if(!StringUtils.isNotNull(pqc)){ + return AjaxResult.error("检测结果对应的过程检验单不存在!"); + } + qcResult.setSourceDocCode(pqc.getIpqcCode()); + qcResult.setSourceDocName(pqc.getIpqcName()); + qcResult.setItemId(pqc.getItemId()); + qcResult.setItemCode(pqc.getItemCode()); + qcResult.setItemName(pqc.getItemName()); + qcResult.setSpecification(pqc.getSpecification()); + qcResult.setUnitOfMeasure(pqc.getUnitOfMeasure()); + break; + case UserConstants.QC_TYPE_OQC: + QcOqc oqc = oqcService.selectQcOqcByOqcId(qcResult.getSourceDocId()); + if(!StringUtils.isNotNull(oqc)){ + return AjaxResult.error("检测结果对应的出货检验单不存在!"); + } + qcResult.setSourceDocCode(oqc.getOqcCode()); + qcResult.setSourceDocName(oqc.getOqcName()); + qcResult.setItemId(oqc.getItemId()); + qcResult.setItemCode(oqc.getItemCode()); + qcResult.setItemName(oqc.getItemName()); + qcResult.setSpecification(oqc.getSpecification()); + qcResult.setUnitOfMeasure(oqc.getUnitOfMeasure()); + break; + default: + return AjaxResult.error("不支持的来源单据类型!请检查sourceDocType参数!"); + } + + qcResultService.insertQcResult(qcResult); + for(QcResultDetail detail : items){ + detail.setResultId(qcResult.getResultId()); + if(StringUtils.isNotNull(detail.getIndexId())){ + QcIndex index = qcIndexService.selectQcIndexByIndexId(detail.getIndexId()); + if(!StringUtils.isNotNull(index)){ + return AjaxResult.error("检测项:【"+detail.getIndexName()+"】在系统中不存在,请检查检测项设置;重新编辑检测模板,再重新起草此检测单!"); + } + } + qcResultDetailService.insertQcResultDetail(detail); + } + return AjaxResult.success(qcResult); + } + + /** + * 修改检测结果记录 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:edit')") + @Log(title = "检测结果记录", businessType = BusinessType.UPDATE) + @Transactional + @PutMapping + public AjaxResult edit(@RequestBody QcResult qcResult) + { + List items = qcResult.getItems(); + if(CollectionUtils.isEmpty(items)){ + return AjaxResult.error("检测项以及对应的结果值不能为空!"); + } + + for(QcResultDetail detail : items){ + qcResultDetailService.updateQcResultDetail(detail); + } + + return toAjax(qcResultService.updateQcResult(qcResult)); + } + + /** + * 删除检测结果记录 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:remove')") + @Log(title = "检测结果记录", businessType = BusinessType.DELETE) + @Transactional + @DeleteMapping("/{resultIds}") + public AjaxResult remove(@PathVariable Long[] resultIds) + { + //先删除检测结果明细 + for(Long resultId :resultIds){ + qcResultDetailService.deleteQcResultDetailByResultId(resultId); + } + return toAjax(qcResultService.deleteQcResultByResultIds(resultIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcResultDetailController.java b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcResultDetailController.java new file mode 100644 index 0000000..33d797b --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/controller/QcResultDetailController.java @@ -0,0 +1,135 @@ +package com.ktg.mes.qc.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ktg.common.constant.UserConstants; +import com.ktg.common.utils.StringUtils; +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.QcResultDetail; +import com.ktg.mes.qc.service.IQcResultDetailService; +import com.ktg.common.utils.poi.ExcelUtil; +import com.ktg.common.core.page.TableDataInfo; + +/** + * 检测结果明细记录Controller + * + * @author yinjinlu + * @date 2024-11-29 + */ +@RestController +@RequestMapping("/mes/qc/qcresultdetail") +public class QcResultDetailController extends BaseController +{ + @Autowired + private IQcResultDetailService qcResultDetailService; + + /** + * 查询检测结果明细记录列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:list')") + @GetMapping("/list") + public TableDataInfo list(QcResultDetail qcResultDetail) + { + startPage(); + List list = qcResultDetailService.selectQcResultDetailList(qcResultDetail); + return getDataTable(list); + } + + /** + * + * @param qcResultDetail + * @return + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:list')") + @GetMapping("/listDetails") + public AjaxResult listDetails(QcResultDetail qcResultDetail){ + List details = null; + if(StringUtils.isNotNull(qcResultDetail.getQcType())){ + switch (qcResultDetail.getQcType()){ + case UserConstants.QC_TYPE_IQC: + details = qcResultDetailService.selectQcResultDetailByResultIdAndIQCId(qcResultDetail); + break; + case UserConstants.QC_TYPE_IPQC: + details = qcResultDetailService.selectQcResultDetailByResultIdAndIPQCId(qcResultDetail); + break; + case UserConstants.QC_TYPE_OQC: + details = qcResultDetailService.selectQcResultDetailByResultIdAndOQCId(qcResultDetail); + break; + default: + return AjaxResult.error("来源单据类型错误!"); + } + } + return AjaxResult.success(details); + } + + + /** + * 导出检测结果明细记录列表 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:export')") + @Log(title = "检测结果明细记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, QcResultDetail qcResultDetail) + { + List list = qcResultDetailService.selectQcResultDetailList(qcResultDetail); + ExcelUtil util = new ExcelUtil(QcResultDetail.class); + util.exportExcel(response, list, "检测结果明细记录数据"); + } + + /** + * 获取检测结果明细记录详细信息 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:query')") + @GetMapping(value = "/{detailId}") + public AjaxResult getInfo(@PathVariable("detailId") Long detailId) + { + return AjaxResult.success(qcResultDetailService.selectQcResultDetailByDetailId(detailId)); + } + + /** + * 新增检测结果明细记录 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:add')") + @Log(title = "检测结果明细记录", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody QcResultDetail qcResultDetail) + { + return toAjax(qcResultDetailService.insertQcResultDetail(qcResultDetail)); + } + + /** + * 修改检测结果明细记录 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:edit')") + @Log(title = "检测结果明细记录", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody QcResultDetail qcResultDetail) + { + return toAjax(qcResultDetailService.updateQcResultDetail(qcResultDetail)); + } + + /** + * 删除检测结果明细记录 + */ + @PreAuthorize("@ss.hasPermi('mes:qc:qcresult:remove')") + @Log(title = "检测结果明细记录", businessType = BusinessType.DELETE) + @DeleteMapping("/{detailIds}") + public AjaxResult remove(@PathVariable Long[] detailIds) + { + return toAjax(qcResultDetailService.deleteQcResultDetailByDetailIds(detailIds)); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcResult.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcResult.java new file mode 100644 index 0000000..82dcac5 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcResult.java @@ -0,0 +1,260 @@ +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; + +import java.util.List; + +/** + * 检测结果记录对象 qc_result + * + * @author yinjinlu + * @date 2024-11-29 + */ +public class QcResult extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 记录ID */ + private Long resultId; + + /** 记录编号 */ + @Excel(name = "记录编号") + private String resultCode; + + /** 关联的质检单ID */ + @Excel(name = "关联的质检单ID") + private Long sourceDocId; + + /** 关联的质检单编号 */ + @Excel(name = "关联的质检单编号") + private String sourceDocCode; + + /** 关联的质检单名称 */ + @Excel(name = "关联的质检单名称") + private String sourceDocName; + + /** 关联的质检单类型 */ + @Excel(name = "关联的质检单类型") + private String sourceDocType; + + /** 产品物料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; + + /** 对应的物资SN */ + @Excel(name = "对应的物资SN") + private String snCode; + + /** 预留字段1 */ + private String attr1; + + /** 预留字段2 */ + private String attr2; + + /** 预留字段3 */ + private Long attr3; + + /** 预留字段4 */ + private Long attr4; + + private List items; + + public void setResultId(Long resultId) + { + this.resultId = resultId; + } + + public Long getResultId() + { + return resultId; + } + + public String getResultCode() { + return resultCode; + } + + public void setResultCode(String resultCode) { + this.resultCode = resultCode; + } + + public void setSourceDocId(Long sourceDocId) + { + this.sourceDocId = sourceDocId; + } + + public Long getSourceDocId() + { + return sourceDocId; + } + public void setSourceDocCode(String sourceDocCode) + { + this.sourceDocCode = sourceDocCode; + } + + public String getSourceDocCode() + { + return sourceDocCode; + } + public void setSourceDocName(String sourceDocName) + { + this.sourceDocName = sourceDocName; + } + + public String getSourceDocName() + { + return sourceDocName; + } + public void setSourceDocType(String sourceDocType) + { + this.sourceDocType = sourceDocType; + } + + public String getSourceDocType() + { + return sourceDocType; + } + 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 setSnCode(String snCode) + { + this.snCode = snCode; + } + + public String getSnCode() + { + return snCode; + } + 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; + } + + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("resultId", getResultId()) + .append("resultCode", getResultCode()) + .append("sourceDocId", getSourceDocId()) + .append("sourceDocCode", getSourceDocCode()) + .append("sourceDocName", getSourceDocName()) + .append("sourceDocType", getSourceDocType()) + .append("itemId", getItemId()) + .append("itemCode", getItemCode()) + .append("itemName", getItemName()) + .append("specification", getSpecification()) + .append("unitOfMeasure", getUnitOfMeasure()) + .append("snCode", getSnCode()) + .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/domain/QcResultDetail.java b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcResultDetail.java new file mode 100644 index 0000000..f9c6db5 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/domain/QcResultDetail.java @@ -0,0 +1,367 @@ +package com.ktg.mes.qc.domain; + +import java.math.BigDecimal; +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_result_detail + * + * @author yinjinlu + * @date 2024-11-29 + */ +public class QcResultDetail extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + private Long qcId; + + private String qcType; + + /** 流水号 */ + private Long detailId; + + /** 结果记录ID */ + @Excel(name = "结果记录ID") + private Long resultId; + + /** 检测项ID */ + @Excel(name = "检测项ID") + private Long indexId; + + + private String indexCode; + + + private String indexName; + + + /** 检测项类型 */ + @Excel(name = "检测项类型") + private String indexType; + + /** 检测工具 */ + @Excel(name = "检测工具") + private String qcTool; + + /** 检测要求 */ + @Excel(name = "检测要求") + private String checkMethod; + + /** 标准值 */ + @Excel(name = "标准值") + private BigDecimal standerVal; + + /** 单位 */ + @Excel(name = "单位") + private String unitOfMeasure; + + /** 误差上限 */ + @Excel(name = "误差上限") + private BigDecimal thresholdMax; + + /** 误差下限 */ + @Excel(name = "误差下限") + private BigDecimal thresholdMin; + + /** 质检值类型 */ + @Excel(name = "质检值类型") + private String qcResultType; + + /** 值属性 */ + @Excel(name = "值属性") + private String qcResultSpc; + + /** 浮点值 */ + @Excel(name = "浮点值") + private BigDecimal qcValFloat; + + /** 整数 */ + @Excel(name = "整数") + private Long qcValInteger; + + /** 文字 */ + @Excel(name = "文字") + private String qcValText; + + /** 字典项 */ + @Excel(name = "字典项") + private String qcValDict; + + /** 文件 */ + @Excel(name = "文件") + private String qcValFile; + + /** 预留字段1 */ + @Excel(name = "预留字段1") + private String attr1; + + /** 预留字段2 */ + @Excel(name = "预留字段2") + private String attr2; + + /** 预留字段3 */ + @Excel(name = "预留字段3") + private Long attr3; + + /** 预留字段4 */ + @Excel(name = "预留字段4") + private Long attr4; + + public Long getQcId() { + return qcId; + } + + public void setQcId(Long qcId) { + this.qcId = qcId; + } + + public String getQcType() { + return qcType; + } + + public void setQcType(String qcType) { + this.qcType = qcType; + } + + public void setDetailId(Long detailId) + { + this.detailId = detailId; + } + + public Long getDetailId() + { + return detailId; + } + public void setResultId(Long resultId) + { + this.resultId = resultId; + } + + public Long getResultId() + { + return resultId; + } + public void setIndexId(Long indexId) + { + this.indexId = indexId; + } + + public Long getIndexId() + { + return indexId; + } + + public String getIndexCode() { + return indexCode; + } + + public void setIndexCode(String indexCode) { + this.indexCode = indexCode; + } + + public String getIndexName() { + return indexName; + } + + public void setIndexName(String indexName) { + this.indexName = indexName; + } + + public void setIndexType(String indexType) + { + this.indexType = indexType; + } + + public String getIndexType() + { + return indexType; + } + public void setQcTool(String qcTool) + { + this.qcTool = qcTool; + } + + public String getQcTool() + { + return qcTool; + } + public void setCheckMethod(String checkMethod) + { + this.checkMethod = checkMethod; + } + + public String getCheckMethod() + { + return checkMethod; + } + public void setStanderVal(BigDecimal standerVal) + { + this.standerVal = standerVal; + } + + public BigDecimal getStanderVal() + { + return standerVal; + } + public void setUnitOfMeasure(String unitOfMeasure) + { + this.unitOfMeasure = unitOfMeasure; + } + + public String getUnitOfMeasure() + { + return unitOfMeasure; + } + public void setThresholdMax(BigDecimal thresholdMax) + { + this.thresholdMax = thresholdMax; + } + + public BigDecimal getThresholdMax() + { + return thresholdMax; + } + public void setThresholdMin(BigDecimal thresholdMin) + { + this.thresholdMin = thresholdMin; + } + + public BigDecimal getThresholdMin() + { + return thresholdMin; + } + public void setQcResultType(String qcResultType) + { + this.qcResultType = qcResultType; + } + + public String getQcResultType() + { + return qcResultType; + } + public void setQcResultSpc(String qcResultSpc) + { + this.qcResultSpc = qcResultSpc; + } + + public String getQcResultSpc() + { + return qcResultSpc; + } + public void setQcValFloat(BigDecimal qcValFloat) + { + this.qcValFloat = qcValFloat; + } + + public BigDecimal getQcValFloat() + { + return qcValFloat; + } + public void setQcValInteger(Long qcValInteger) + { + this.qcValInteger = qcValInteger; + } + + public Long getQcValInteger() + { + return qcValInteger; + } + public void setQcValText(String qcValText) + { + this.qcValText = qcValText; + } + + public String getQcValText() + { + return qcValText; + } + public void setQcValDict(String qcValDict) + { + this.qcValDict = qcValDict; + } + + public String getQcValDict() + { + return qcValDict; + } + public void setQcValFile(String qcValFile) + { + this.qcValFile = qcValFile; + } + + public String getQcValFile() + { + return qcValFile; + } + 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("detailId", getDetailId()) + .append("resultId", getResultId()) + .append("indexId", getIndexId()) + .append("indexType", getIndexType()) + .append("qcTool", getQcTool()) + .append("checkMethod", getCheckMethod()) + .append("standerVal", getStanderVal()) + .append("unitOfMeasure", getUnitOfMeasure()) + .append("thresholdMax", getThresholdMax()) + .append("thresholdMin", getThresholdMin()) + .append("qcResultType", getQcResultType()) + .append("qcResultSpc", getQcResultSpc()) + .append("qcValFloat", getQcValFloat()) + .append("qcValInteger", getQcValInteger()) + .append("qcValText", getQcValText()) + .append("qcValDict", getQcValDict()) + .append("qcValFile", getQcValFile()) + .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/QcResultDetailMapper.java b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcResultDetailMapper.java new file mode 100644 index 0000000..7822dbc --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcResultDetailMapper.java @@ -0,0 +1,93 @@ +package com.ktg.mes.qc.mapper; + +import java.util.List; +import com.ktg.mes.qc.domain.QcResultDetail; + +/** + * 检测结果明细记录Mapper接口 + * + * @author yinjinlu + * @date 2024-11-29 + */ +public interface QcResultDetailMapper +{ + /** + * 查询检测结果明细记录 + * + * @param detailId 检测结果明细记录主键 + * @return 检测结果明细记录 + */ + public QcResultDetail selectQcResultDetailByDetailId(Long detailId); + + /** + * 查询检测结果明细记录列表 + * + * @param qcResultDetail 检测结果明细记录 + * @return 检测结果明细记录集合 + */ + public List selectQcResultDetailList(QcResultDetail qcResultDetail); + + /** + * 查询某个IQC单据下某个ResultId的检测值列表 + * 如果ResultId为空,则返回此单据的根据index检查项构造的列表 + * @param qcResultDetail + * @return + */ + public List selectQcResultDetailByResultIdAndIQCId(QcResultDetail qcResultDetail); + + + /** + * 查询某个IPQC单据下某个ResultId的检测值列表 + * 如果ResultId为空,则返回此单据的根据index检查项构造的列表 + * @param qcResultDetail + * @return + */ + public List selectQcResultDetailByResultIdAndIPQCId(QcResultDetail qcResultDetail); + + /** + * 查询某个OQC单据下某个ResultId的检测值列表 + * 如果ResultId为空,则返回此单据的根据index检查项构造的列表 + * @param qcResultDetail + * @return + */ + public List selectQcResultDetailByResultIdAndOQCId(QcResultDetail qcResultDetail); + + /** + * 新增检测结果明细记录 + * + * @param qcResultDetail 检测结果明细记录 + * @return 结果 + */ + public int insertQcResultDetail(QcResultDetail qcResultDetail); + + /** + * 修改检测结果明细记录 + * + * @param qcResultDetail 检测结果明细记录 + * @return 结果 + */ + public int updateQcResultDetail(QcResultDetail qcResultDetail); + + /** + * 删除检测结果明细记录 + * + * @param detailId 检测结果明细记录主键 + * @return 结果 + */ + public int deleteQcResultDetailByDetailId(Long detailId); + + /** + * 批量删除检测结果明细记录 + * + * @param detailIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteQcResultDetailByDetailIds(Long[] detailIds); + + /** + * 根据检测结果ID删除所有明细信息 + * @param resultId + * @return + */ + public int deleteQcResultDetailByResultId(long resultId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcResultMapper.java b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcResultMapper.java new file mode 100644 index 0000000..5c43e49 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/mapper/QcResultMapper.java @@ -0,0 +1,61 @@ +package com.ktg.mes.qc.mapper; + +import java.util.List; +import com.ktg.mes.qc.domain.QcResult; + +/** + * 检测结果记录Mapper接口 + * + * @author yinjinlu + * @date 2024-11-29 + */ +public interface QcResultMapper +{ + /** + * 查询检测结果记录 + * + * @param resultId 检测结果记录主键 + * @return 检测结果记录 + */ + public QcResult selectQcResultByResultId(Long resultId); + + /** + * 查询检测结果记录列表 + * + * @param qcResult 检测结果记录 + * @return 检测结果记录集合 + */ + public List selectQcResultList(QcResult qcResult); + + /** + * 新增检测结果记录 + * + * @param qcResult 检测结果记录 + * @return 结果 + */ + public int insertQcResult(QcResult qcResult); + + /** + * 修改检测结果记录 + * + * @param qcResult 检测结果记录 + * @return 结果 + */ + public int updateQcResult(QcResult qcResult); + + /** + * 删除检测结果记录 + * + * @param resultId 检测结果记录主键 + * @return 结果 + */ + public int deleteQcResultByResultId(Long resultId); + + /** + * 批量删除检测结果记录 + * + * @param resultIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteQcResultByResultIds(Long[] resultIds); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcResultDetailService.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcResultDetailService.java new file mode 100644 index 0000000..7101ce0 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcResultDetailService.java @@ -0,0 +1,93 @@ +package com.ktg.mes.qc.service; + +import java.util.List; +import com.ktg.mes.qc.domain.QcResultDetail; + +/** + * 检测结果明细记录Service接口 + * + * @author yinjinlu + * @date 2024-11-29 + */ +public interface IQcResultDetailService +{ + /** + * 查询检测结果明细记录 + * + * @param detailId 检测结果明细记录主键 + * @return 检测结果明细记录 + */ + public QcResultDetail selectQcResultDetailByDetailId(Long detailId); + + /** + * 查询检测结果明细记录列表 + * + * @param qcResultDetail 检测结果明细记录 + * @return 检测结果明细记录集合 + */ + public List selectQcResultDetailList(QcResultDetail qcResultDetail); + + /** + * 查询某个IQC单据下某个ResultId的检测值列表 + * 如果ResultId为空,则返回此单据的根据index检查项构造的列表 + * @param qcResultDetail + * @return + */ + public List selectQcResultDetailByResultIdAndIQCId(QcResultDetail qcResultDetail); + + + /** + * 查询某个IPQC单据下某个ResultId的检测值列表 + * 如果ResultId为空,则返回此单据的根据index检查项构造的列表 + * @param qcResultDetail + * @return + */ + public List selectQcResultDetailByResultIdAndIPQCId(QcResultDetail qcResultDetail); + + /** + * 查询某个OQC单据下某个ResultId的检测值列表 + * 如果ResultId为空,则返回此单据的根据index检查项构造的列表 + * @param qcResultDetail + * @return + */ + public List selectQcResultDetailByResultIdAndOQCId(QcResultDetail qcResultDetail); + + /** + * 新增检测结果明细记录 + * + * @param qcResultDetail 检测结果明细记录 + * @return 结果 + */ + public int insertQcResultDetail(QcResultDetail qcResultDetail); + + /** + * 修改检测结果明细记录 + * + * @param qcResultDetail 检测结果明细记录 + * @return 结果 + */ + public int updateQcResultDetail(QcResultDetail qcResultDetail); + + /** + * 批量删除检测结果明细记录 + * + * @param detailIds 需要删除的检测结果明细记录主键集合 + * @return 结果 + */ + public int deleteQcResultDetailByDetailIds(Long[] detailIds); + + /** + * 删除检测结果明细记录信息 + * + * @param detailId 检测结果明细记录主键 + * @return 结果 + */ + public int deleteQcResultDetailByDetailId(Long detailId); + + /** + * 根据检测结果ID删除所有明细信息 + * @param resultId + * @return + */ + public int deleteQcResultDetailByResultId(long resultId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcResultService.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcResultService.java new file mode 100644 index 0000000..117788c --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/IQcResultService.java @@ -0,0 +1,61 @@ +package com.ktg.mes.qc.service; + +import java.util.List; +import com.ktg.mes.qc.domain.QcResult; + +/** + * 检测结果记录Service接口 + * + * @author yinjinlu + * @date 2024-11-29 + */ +public interface IQcResultService +{ + /** + * 查询检测结果记录 + * + * @param resultId 检测结果记录主键 + * @return 检测结果记录 + */ + public QcResult selectQcResultByResultId(Long resultId); + + /** + * 查询检测结果记录列表 + * + * @param qcResult 检测结果记录 + * @return 检测结果记录集合 + */ + public List selectQcResultList(QcResult qcResult); + + /** + * 新增检测结果记录 + * + * @param qcResult 检测结果记录 + * @return 结果 + */ + public int insertQcResult(QcResult qcResult); + + /** + * 修改检测结果记录 + * + * @param qcResult 检测结果记录 + * @return 结果 + */ + public int updateQcResult(QcResult qcResult); + + /** + * 批量删除检测结果记录 + * + * @param resultIds 需要删除的检测结果记录主键集合 + * @return 结果 + */ + public int deleteQcResultByResultIds(Long[] resultIds); + + /** + * 删除检测结果记录信息 + * + * @param resultId 检测结果记录主键 + * @return 结果 + */ + public int deleteQcResultByResultId(Long resultId); +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcResultDetailServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcResultDetailServiceImpl.java new file mode 100644 index 0000000..eaed6e2 --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcResultDetailServiceImpl.java @@ -0,0 +1,116 @@ +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.QcResultDetailMapper; +import com.ktg.mes.qc.domain.QcResultDetail; +import com.ktg.mes.qc.service.IQcResultDetailService; + +/** + * 检测结果明细记录Service业务层处理 + * + * @author yinjinlu + * @date 2024-11-29 + */ +@Service +public class QcResultDetailServiceImpl implements IQcResultDetailService +{ + @Autowired + private QcResultDetailMapper qcResultDetailMapper; + + /** + * 查询检测结果明细记录 + * + * @param detailId 检测结果明细记录主键 + * @return 检测结果明细记录 + */ + @Override + public QcResultDetail selectQcResultDetailByDetailId(Long detailId) + { + return qcResultDetailMapper.selectQcResultDetailByDetailId(detailId); + } + + /** + * 查询检测结果明细记录列表 + * + * @param qcResultDetail 检测结果明细记录 + * @return 检测结果明细记录 + */ + @Override + public List selectQcResultDetailList(QcResultDetail qcResultDetail) + { + return qcResultDetailMapper.selectQcResultDetailList(qcResultDetail); + } + + @Override + public List selectQcResultDetailByResultIdAndIQCId(QcResultDetail qcResultDetail) { + return qcResultDetailMapper.selectQcResultDetailByResultIdAndIQCId(qcResultDetail); + } + + @Override + public List selectQcResultDetailByResultIdAndIPQCId(QcResultDetail qcResultDetail) { + return qcResultDetailMapper.selectQcResultDetailByResultIdAndIPQCId(qcResultDetail); + } + + @Override + public List selectQcResultDetailByResultIdAndOQCId(QcResultDetail qcResultDetail) { + return qcResultDetailMapper.selectQcResultDetailByResultIdAndOQCId(qcResultDetail); + } + + /** + * 新增检测结果明细记录 + * + * @param qcResultDetail 检测结果明细记录 + * @return 结果 + */ + @Override + public int insertQcResultDetail(QcResultDetail qcResultDetail) + { + qcResultDetail.setCreateTime(DateUtils.getNowDate()); + return qcResultDetailMapper.insertQcResultDetail(qcResultDetail); + } + + /** + * 修改检测结果明细记录 + * + * @param qcResultDetail 检测结果明细记录 + * @return 结果 + */ + @Override + public int updateQcResultDetail(QcResultDetail qcResultDetail) + { + qcResultDetail.setUpdateTime(DateUtils.getNowDate()); + return qcResultDetailMapper.updateQcResultDetail(qcResultDetail); + } + + /** + * 批量删除检测结果明细记录 + * + * @param detailIds 需要删除的检测结果明细记录主键 + * @return 结果 + */ + @Override + public int deleteQcResultDetailByDetailIds(Long[] detailIds) + { + return qcResultDetailMapper.deleteQcResultDetailByDetailIds(detailIds); + } + + /** + * 删除检测结果明细记录信息 + * + * @param detailId 检测结果明细记录主键 + * @return 结果 + */ + @Override + public int deleteQcResultDetailByDetailId(Long detailId) + { + return qcResultDetailMapper.deleteQcResultDetailByDetailId(detailId); + } + + @Override + public int deleteQcResultDetailByResultId(long resultId) { + return qcResultDetailMapper.deleteQcResultDetailByResultId(resultId); + } +} diff --git a/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcResultServiceImpl.java b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcResultServiceImpl.java new file mode 100644 index 0000000..335a28e --- /dev/null +++ b/ktg-mes/src/main/java/com/ktg/mes/qc/service/impl/QcResultServiceImpl.java @@ -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.QcResultMapper; +import com.ktg.mes.qc.domain.QcResult; +import com.ktg.mes.qc.service.IQcResultService; + +/** + * 检测结果记录Service业务层处理 + * + * @author yinjinlu + * @date 2024-11-29 + */ +@Service +public class QcResultServiceImpl implements IQcResultService +{ + @Autowired + private QcResultMapper qcResultMapper; + + /** + * 查询检测结果记录 + * + * @param resultId 检测结果记录主键 + * @return 检测结果记录 + */ + @Override + public QcResult selectQcResultByResultId(Long resultId) + { + return qcResultMapper.selectQcResultByResultId(resultId); + } + + /** + * 查询检测结果记录列表 + * + * @param qcResult 检测结果记录 + * @return 检测结果记录 + */ + @Override + public List selectQcResultList(QcResult qcResult) + { + return qcResultMapper.selectQcResultList(qcResult); + } + + /** + * 新增检测结果记录 + * + * @param qcResult 检测结果记录 + * @return 结果 + */ + @Override + public int insertQcResult(QcResult qcResult) + { + qcResult.setCreateTime(DateUtils.getNowDate()); + return qcResultMapper.insertQcResult(qcResult); + } + + /** + * 修改检测结果记录 + * + * @param qcResult 检测结果记录 + * @return 结果 + */ + @Override + public int updateQcResult(QcResult qcResult) + { + qcResult.setUpdateTime(DateUtils.getNowDate()); + return qcResultMapper.updateQcResult(qcResult); + } + + /** + * 批量删除检测结果记录 + * + * @param resultIds 需要删除的检测结果记录主键 + * @return 结果 + */ + @Override + public int deleteQcResultByResultIds(Long[] resultIds) + { + return qcResultMapper.deleteQcResultByResultIds(resultIds); + } + + /** + * 删除检测结果记录信息 + * + * @param resultId 检测结果记录主键 + * @return 结果 + */ + @Override + public int deleteQcResultByResultId(Long resultId) + { + return qcResultMapper.deleteQcResultByResultId(resultId); + } +} diff --git a/ktg-mes/src/main/resources/mapper/qc/QcResultDetailMapper.xml b/ktg-mes/src/main/resources/mapper/qc/QcResultDetailMapper.xml new file mode 100644 index 0000000..87f315f --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/qc/QcResultDetailMapper.xml @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select detail_id, result_id, index_id, index_type, qc_tool, check_method, stander_val, unit_of_measure, threshold_max, threshold_min, qc_result_type, qc_result_spc, qc_val_float, qc_val_integer, qc_val_text, qc_val_dict, qc_val_file, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_result_detail + + + + + + + + + + + + + + insert into qc_result_detail + + result_id, + index_id, + index_type, + qc_tool, + check_method, + stander_val, + unit_of_measure, + threshold_max, + threshold_min, + qc_result_type, + qc_result_spc, + qc_val_float, + qc_val_integer, + qc_val_text, + qc_val_dict, + qc_val_file, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + + + #{resultId}, + #{indexId}, + #{indexType}, + #{qcTool}, + #{checkMethod}, + #{standerVal}, + #{unitOfMeasure}, + #{thresholdMax}, + #{thresholdMin}, + #{qcResultType}, + #{qcResultSpc}, + #{qcValFloat}, + #{qcValInteger}, + #{qcValText}, + #{qcValDict}, + #{qcValFile}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update qc_result_detail + + result_id = #{resultId}, + index_id = #{indexId}, + index_type = #{indexType}, + qc_tool = #{qcTool}, + check_method = #{checkMethod}, + stander_val = #{standerVal}, + unit_of_measure = #{unitOfMeasure}, + threshold_max = #{thresholdMax}, + threshold_min = #{thresholdMin}, + qc_result_type = #{qcResultType}, + qc_result_spc = #{qcResultSpc}, + qc_val_float = #{qcValFloat}, + qc_val_integer = #{qcValInteger}, + qc_val_text = #{qcValText}, + qc_val_dict = #{qcValDict}, + qc_val_file = #{qcValFile}, + remark = #{remark}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where detail_id = #{detailId} + + + + delete from qc_result_detail where detail_id = #{detailId} + + + + delete from qc_result_detail where detail_id in + + #{detailId} + + + + + delete from qc_result_detail where result_id = #{resultId} + + + \ No newline at end of file diff --git a/ktg-mes/src/main/resources/mapper/qc/QcResultMapper.xml b/ktg-mes/src/main/resources/mapper/qc/QcResultMapper.xml new file mode 100644 index 0000000..dfae4c3 --- /dev/null +++ b/ktg-mes/src/main/resources/mapper/qc/QcResultMapper.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select result_id, result_code, source_doc_id, source_doc_code, source_doc_name, source_doc_type, item_id, item_code, item_name, specification, unit_of_measure, sn_code, remark, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time from qc_result + + + + + + + + insert into qc_result + + result_code, + source_doc_id, + source_doc_code, + source_doc_name, + source_doc_type, + item_id, + item_code, + item_name, + specification, + unit_of_measure, + sn_code, + remark, + attr1, + attr2, + attr3, + attr4, + create_by, + create_time, + update_by, + update_time, + + + #{resultCode}, + #{sourceDocId}, + #{sourceDocCode}, + #{sourceDocName}, + #{sourceDocType}, + #{itemId}, + #{itemCode}, + #{itemName}, + #{specification}, + #{unitOfMeasure}, + #{snCode}, + #{remark}, + #{attr1}, + #{attr2}, + #{attr3}, + #{attr4}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update qc_result + + result_code = #{resultCode}, + source_doc_id = #{sourceDocId}, + source_doc_code = #{sourceDocCode}, + source_doc_name = #{sourceDocName}, + source_doc_type = #{sourceDocType}, + item_id = #{itemId}, + item_code = #{itemCode}, + item_name = #{itemName}, + specification = #{specification}, + unit_of_measure = #{unitOfMeasure}, + sn_code = #{snCode}, + remark = #{remark}, + attr1 = #{attr1}, + attr2 = #{attr2}, + attr3 = #{attr3}, + attr4 = #{attr4}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where result_id = #{resultId} + + + + delete from qc_result where result_id = #{resultId} + + + + delete from qc_result where result_id in + + #{resultId} + + + \ No newline at end of file