diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckResultController.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckResultController.java index b563f409..79e9b7a0 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckResultController.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/controller/QmsCheckResultController.java @@ -43,7 +43,7 @@ public class QmsCheckResultController extends BaseController public TableDataInfo list(QmsCheckResult qmsCheckResult) { startPage(); - List list = qmsCheckResultService.selectQmsCheckResultList(qmsCheckResult); + List list = qmsCheckResultService.selectQmsCheckResultJoinList(qmsCheckResult); return getDataTable(list); } 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 48588519..796fb8d1 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 @@ -85,6 +85,10 @@ public class QmsMobileController extends BaseController { queryCheckRuleDetail.setTargetId(materialId); queryCheckRuleDetail.setTargetType(QmsConstants.QMS_CHECK_RULE_DETAIL_TARGET_TYPE_MATERIAL); QmsCheckRule qmsCheckRule = qmsCheckRuleService.selectQmsCheckRuleByTarget(queryCheckRuleDetail); + if (qmsCheckRule == null) { + throw new ServiceException("无此物料的质检规则"); + } + qmsCheckRule.setMaterialId(materialId); qmsCheckRule.setMaterialCode(baseBarcodeInfo.getMaterialCode()); qmsCheckRule.setMaterialName(baseBarcodeInfo.getMaterialName()); Long checkResultId = qmsCheckResultService.insertCheckResult(baseBarcodeInfo, qmsCheckRule); @@ -180,12 +184,13 @@ public class QmsMobileController extends BaseController { if (qmsQualityInstance != null) { qmsQualityInstanceActivities = qmsQualityInstance.getQmsQualityInstanceActivityList(); + QmsQualityInstanceActivity firstQualityInstanceActivity = qmsQualityInstanceActivities.get(0);//获取第一步工单实例 QmsQualityInstanceActivity lastQualityInstanceActivity = qmsQualityInstanceActivities.get(qmsQualityInstanceActivities.size() - 1); processActivityOrder = lastQualityInstanceActivity.getProcessStepOrder() + 1;//获取下一步的流程实例步骤 QmsCheckInstanceFile queryCheckInstanceFile = new QmsCheckInstanceFile(); queryCheckInstanceFile.setTargetType(WfConstants.QMS_FILE_TARGET_TYPE_QUALITY_INSTANCE_ACTIVITY); - queryCheckInstanceFile.setTargetId(qmsQualityInstance.getQualityInstanceId()); + queryCheckInstanceFile.setTargetId(firstQualityInstanceActivity.getInstanceActivityId());//第一步工单实例节点ID,根据工单实例节点保存图片,后续可扩展到每一步可保存图片 List qmsCheckInstanceFiles = qmsCheckInstanceFileService.selectQmsCheckInstanceFileList(queryCheckInstanceFile); qmsCheckResultDetailVo.setQmsCheckInstanceFiles(qmsCheckInstanceFiles); @@ -229,13 +234,13 @@ public class QmsMobileController extends BaseController { public AjaxResult handleQualityInstance(QmsQualityInstanceActivityVo qmsQualityInstanceActivityVo, List files) { List fileUrls = new ArrayList<>(); - if(files!=null){ + if (files != null) { for (MultipartFile file : files) { R sysFileR = remoteFileService.upload(file); SysFile sysFile = sysFileR.getData(); fileUrls.add(sysFile.getUrl()); } } - return success(qmsQualityInstanceService.handleQualityInstance(qmsQualityInstanceActivityVo,fileUrls)); + return success(qmsQualityInstanceService.handleQualityInstance(qmsQualityInstanceActivityVo, fileUrls)); } } diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckRule.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckRule.java index 8dee3aae..3c7ffb64 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckRule.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/domain/QmsCheckRule.java @@ -51,6 +51,8 @@ public class QmsCheckRule extends BaseEntity /** 质检结果id */ private Long checkResultId; + private Long materialId; + private String materialCode; private String materialName; @@ -137,6 +139,13 @@ public class QmsCheckRule extends BaseEntity this.checkResultId = checkResultId; } + public Long getMaterialId() { + return materialId; + } + + public void setMaterialId(Long materialId) { + this.materialId = materialId; + } public String getMaterialCode() { return materialCode; diff --git a/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultDetailServiceImpl.java b/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultDetailServiceImpl.java index 60fb114d..09e066b3 100644 --- a/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultDetailServiceImpl.java +++ b/hw-modules/hw-qms/src/main/java/com/hw/qms/service/impl/QmsCheckResultDetailServiceImpl.java @@ -147,7 +147,7 @@ public class QmsCheckResultDetailServiceImpl implements IQmsCheckResultDetailSer /** - * 新增质检结果详情项目信息信息(前端已经根据标准值、上限值和下限值判断,>下限值,<上限值) + * 新增质检结果详情项目信息信息(前端已经根据标准值、上限值和下限值判断,>=下限值,<=上限值//todo 后续可修改在服务端不判断) * * @param qmsCheckResultDetail 质检结果详情对象 */ 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 5c8c530e..cb474467 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 @@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and check_rule_type = #{checkRuleType} and material_type = #{materialType} and material_id = #{materialId} - and material_batch = #{materialBatch} + and check_rule_name like concat('%', #{checkRuleName}, '%') and check_mode = #{checkMode} and check_sample = #{checkSample} and plan_code = #{planCode} diff --git a/hw-ui/src/views/qms/base/checkproject/index.vue b/hw-ui/src/views/qms/base/checkproject/index.vue index b8bc1c6c..008f672c 100644 --- a/hw-ui/src/views/qms/base/checkproject/index.vue +++ b/hw-ui/src/views/qms/base/checkproject/index.vue @@ -262,7 +262,9 @@ export default { defectSeverity: null, }, // 表单参数 - form: {}, + form: { + + }, // 表单校验 rules: { checkProjectName: [ @@ -274,6 +276,12 @@ export default { standardValue: [ {required: true, message: "标准值不能为空", trigger: "change"} ], + upperDiff: [ + {required: true, message: "上差值不能为空", trigger: "change"} + ], + downDiff: [ + {required: true, message: "下差值不能为空", trigger: "change"} + ], checkProjectProperty: [ {required: true, message: "项目属性不能为空", trigger: "blur"} ], @@ -286,7 +294,7 @@ export default { globalVariable: { CHECK_PROJECT_PROPERTY_QUALITATIVE: '1',//项目属性:定性 CHECK_PROJECT_PROPERTY_QUANTITATIVE: '2',//项目属性:定量 - CHECK_PROJECT_CHECK_MODE_ALL:'1',//检验方式:全检 + CHECK_PROJECT_CHECK_MODE_ALL: '1',//检验方式:全检 } }; }, @@ -319,9 +327,9 @@ export default { checkSample: null, checkTool: null, unitCode: null, - standardValue: null, - upperDiff: null, - downDiff: null, + standardValue: undefined, + upperDiff: undefined, + downDiff: undefined, defectSeverity: null, remark: null, createBy: null, @@ -360,6 +368,11 @@ export default { const checkProjectId = row.checkProjectId || this.ids getCheckproject(checkProjectId).then(response => { this.form = response.data; + if(this.form.checkProjectProperty === "1"){ //定性 + this.form.standardValue = undefined; + this.form.upperDiff = undefined; + this.form.downDiff = undefined; + } this.open = true; this.title = "修改检验项目"; }); diff --git a/hw-ui/src/views/qms/base/checkresult/index.vue b/hw-ui/src/views/qms/base/checkresult/index.vue index 24b41aee..ece79d99 100644 --- a/hw-ui/src/views/qms/base/checkresult/index.vue +++ b/hw-ui/src/views/qms/base/checkresult/index.vue @@ -55,7 +55,7 @@ diff --git a/hw-ui/src/views/qms/base/qualityinstance/index.vue b/hw-ui/src/views/qms/base/qualityinstance/index.vue index bd85f246..9d008b12 100644 --- a/hw-ui/src/views/qms/base/qualityinstance/index.vue +++ b/hw-ui/src/views/qms/base/qualityinstance/index.vue @@ -1,22 +1,7 @@