From 7f566937ececf60b7f747c4b4ac37564729f5b2f Mon Sep 17 00:00:00 2001 From: xins Date: Fri, 12 Apr 2024 16:28:18 +0800 Subject: [PATCH] =?UTF-8?q?2.0.8=20QMS:=E8=B4=A8=E6=A3=80PDA=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/hw/qms/controller/QmsMobileController.java | 3 ++- .../main/java/com/hw/qms/domain/QmsCheckResult.java | 12 +++++++++++- .../hw/qms/domain/QmsCheckResultDetailProject.java | 11 +++++++++++ .../hw/qms/domain/vo/QmsCheckResultDetailVo.java | 10 ++++++++++ .../qms/service/impl/QmsCheckResultServiceImpl.java | 13 ++++++------- .../mapper/qms/QmsCheckResultDetailMapper.xml | 6 +++++- .../resources/mapper/qms/QmsCheckResultMapper.xml | 9 +++++++-- 7 files changed, 52 insertions(+), 12 deletions(-) diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsMobileController.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsMobileController.java index d946934..15f4837 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsMobileController.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsMobileController.java @@ -78,7 +78,7 @@ public class QmsMobileController extends BaseController { } else { MesBaseBarcodeInfo baseBarcodeInfo = mesBaseBarcodeInfoService.selectMesBaseBarcodeInfoByBarcodeInfo(materialBarcode); if (baseBarcodeInfo == null) { - throw new ServiceException("此物料条码系统中不存在"); + throw new ServiceException("物料条码有误"); } Long materialId = baseBarcodeInfo.getMaterialId(); QmsCheckRuleDetail queryCheckRuleDetail = new QmsCheckRuleDetail(); @@ -169,6 +169,7 @@ public class QmsMobileController extends BaseController { qmsCheckResultDetailVo.setCheckSample(qmsCheckResult.getCheckSample()); qmsCheckResultDetailVo.setMaterialCode(qmsCheckResult.getMaterialCode()); qmsCheckResultDetailVo.setMaterialName(qmsCheckResult.getMaterialName()); + qmsCheckResultDetailVo.setCheckRuleType(qmsCheckResult.getCheckRuleType()); QmsQualityInstance qmsQualityInstance = qmsQualityInstanceService.selectQmsQualityInstanceByCheckResultId(qmsCheckResult.getCheckResultId()); Long processActivityOrder = 1L; diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java index 032def4..4cea0d1 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResult.java @@ -75,10 +75,12 @@ public class QmsCheckResult extends BaseEntity @Excel(name = "检验状态(0待检验,1检验中,2质检通过,3质检不通过)") private String checkStatus; - /** 预留字段1 */ @Excel(name = "检验规则名称") private String checkRuleName; + /**检验规则类型(1来料检验,2,半成品检验,3成品检验,4工序检验)*/ + private String checkRuleType; + private String materialCode; private String materialName; @@ -230,6 +232,14 @@ public class QmsCheckResult extends BaseEntity this.checkRuleName = checkRuleName; } + public String getCheckRuleType() { + return checkRuleType; + } + + public void setCheckRuleType(String checkRuleType) { + this.checkRuleType = checkRuleType; + } + public List getQmsCheckResultDetailList() { return qmsCheckResultDetailList; diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResultDetailProject.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResultDetailProject.java index c377861..e3ec6da 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResultDetailProject.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckResultDetailProject.java @@ -58,6 +58,9 @@ public class QmsCheckResultDetailProject extends BaseEntity @Excel(name = "下差值,检验时从检验项目复制过来的值") private BigDecimal downDiff; + /**巡检项目描述*/ + private String inspectProjectDesc; + public void setResultDetailProjectId(Long resultDetailProjectId) { this.resultDetailProjectId = resultDetailProjectId; @@ -158,6 +161,14 @@ public class QmsCheckResultDetailProject extends BaseEntity return downDiff; } + public String getInspectProjectDesc() { + return inspectProjectDesc; + } + + public void setInspectProjectDesc(String inspectProjectDesc) { + this.inspectProjectDesc = inspectProjectDesc; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/vo/QmsCheckResultDetailVo.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/vo/QmsCheckResultDetailVo.java index 8ded6f7..29634eb 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/vo/QmsCheckResultDetailVo.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/vo/QmsCheckResultDetailVo.java @@ -40,6 +40,8 @@ public class QmsCheckResultDetailVo private String wfInstsanceStatus; + private String checkRuleType; + List qmsQualityInstanceActivities; List qmsCheckInstanceFiles; @@ -118,6 +120,14 @@ public class QmsCheckResultDetailVo this.wfInstsanceStatus = wfInstsanceStatus; } + public String getCheckRuleType() { + return checkRuleType; + } + + public void setCheckRuleType(String checkRuleType) { + this.checkRuleType = checkRuleType; + } + public List getQmsQualityInstanceActivities() { return qmsQualityInstanceActivities; } diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultServiceImpl.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultServiceImpl.java index 6b6ca34..34c75fc 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultServiceImpl.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultServiceImpl.java @@ -4,6 +4,7 @@ import java.util.Date; import java.util.List; import com.hw.common.core.constant.QmsConstants; +import com.hw.common.core.exception.ServiceException; import com.hw.common.core.utils.DateUtils; import com.hw.common.security.utils.SecurityUtils; import com.hw.qms.domain.*; @@ -128,12 +129,6 @@ public class QmsCheckResultServiceImpl implements IQmsCheckResultService { } - - - - - - /** * 在扫描物料条码时,如果是第一次对此批次质检,需要插入质检结果记录 * @@ -143,12 +138,17 @@ public class QmsCheckResultServiceImpl implements IQmsCheckResultService { */ @Override public Long insertCheckResult(MesBaseBarcodeInfo mesBaseBarcodeInfo, QmsCheckRule qmsCheckRule) { + if (qmsCheckRule == null) { + throw new ServiceException("没有此物料检验规则"); + } String batchCode = mesBaseBarcodeInfo.getBatchCode(); QmsCheckResult qmsCheckResult = qmsCheckResultMapper.selectQmsCheckResultByMaterialBatch(batchCode); if (qmsCheckResult == null) { qmsCheckResult = new QmsCheckResult(); String barcodeType = mesBaseBarcodeInfo.getBarcodeType();//条码类型(1原材料,2半成品,3成品,4背板) qmsCheckResult.setCheckRuleId(qmsCheckRule.getCheckRuleId()); + qmsCheckResult.setCheckRuleName(qmsCheckRule.getCheckRuleName()); + qmsCheckResult.setCheckRuleType(qmsCheckRule.getCheckRuleType()); qmsCheckResult.setMaterialType(barcodeType); qmsCheckResult.setMaterialId(mesBaseBarcodeInfo.getMaterialId()); qmsCheckResult.setMaterialBatch(mesBaseBarcodeInfo.getBatchCode()); @@ -171,7 +171,6 @@ public class QmsCheckResultServiceImpl implements IQmsCheckResultService { } - /** * 查询质检结果列表,Join material * diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml index 7132ad5..272d9f6 100644 --- a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultDetailMapper.xml @@ -20,6 +20,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -61,9 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" b.check_project_id as sub_check_project_id, b.check_project_status as sub_check_project_status, b.check_project_result as sub_check_project_result, b.project_step_order as sub_project_step_order,b.standard_value as sub_standard_value, b.check_project_name as sub_check_project_name, b.check_project_property as sub_check_project_property, - b.upper_diff as sub_upper_diff, b.down_diff as sub_down_diff + b.upper_diff as sub_upper_diff, b.down_diff as sub_down_diff,mbmi.material_code,mbmi.material_name from qms_check_result_detail a left join qms_check_result_detail_project b on b.check_result_detail_id = a.check_result_detail_id + left join mes_base_material_info mbmi on a.material_id=mbmi.material_id diff --git a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml index 740d73a..fcd77e1 100644 --- a/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml +++ b/hw-modules/hw-qms/src/main/resources/mapper/qms/QmsCheckResultMapper.xml @@ -7,6 +7,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + @@ -25,7 +27,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - @@ -99,6 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by, update_time, check_rule_name, + check_rule_type, #{checkRuleId}, @@ -121,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateBy}, #{updateTime}, #{checkRuleName}, + #{checkRuleType}, @@ -145,6 +148,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_by = #{updateBy}, update_time = #{updateTime}, check_rule_name = #{checkRuleName}, + check_rule_type = #{checkRuleType}, where check_result_id = #{checkResultId} @@ -193,9 +197,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"