QMS:完善PDA接口逻辑,WEB部分检验项目定量时上差值和下差值必须输入;完善Web质检结果查询
master
xs 8 months ago
parent d70e8a0453
commit 70d26e83f1

@ -43,7 +43,7 @@ public class QmsCheckResultController extends BaseController
public TableDataInfo list(QmsCheckResult qmsCheckResult) public TableDataInfo list(QmsCheckResult qmsCheckResult)
{ {
startPage(); startPage();
List<QmsCheckResult> list = qmsCheckResultService.selectQmsCheckResultList(qmsCheckResult); List<QmsCheckResult> list = qmsCheckResultService.selectQmsCheckResultJoinList(qmsCheckResult);
return getDataTable(list); return getDataTable(list);
} }

@ -85,6 +85,10 @@ public class QmsMobileController extends BaseController {
queryCheckRuleDetail.setTargetId(materialId); queryCheckRuleDetail.setTargetId(materialId);
queryCheckRuleDetail.setTargetType(QmsConstants.QMS_CHECK_RULE_DETAIL_TARGET_TYPE_MATERIAL); queryCheckRuleDetail.setTargetType(QmsConstants.QMS_CHECK_RULE_DETAIL_TARGET_TYPE_MATERIAL);
QmsCheckRule qmsCheckRule = qmsCheckRuleService.selectQmsCheckRuleByTarget(queryCheckRuleDetail); QmsCheckRule qmsCheckRule = qmsCheckRuleService.selectQmsCheckRuleByTarget(queryCheckRuleDetail);
if (qmsCheckRule == null) {
throw new ServiceException("无此物料的质检规则");
}
qmsCheckRule.setMaterialId(materialId);
qmsCheckRule.setMaterialCode(baseBarcodeInfo.getMaterialCode()); qmsCheckRule.setMaterialCode(baseBarcodeInfo.getMaterialCode());
qmsCheckRule.setMaterialName(baseBarcodeInfo.getMaterialName()); qmsCheckRule.setMaterialName(baseBarcodeInfo.getMaterialName());
Long checkResultId = qmsCheckResultService.insertCheckResult(baseBarcodeInfo, qmsCheckRule); Long checkResultId = qmsCheckResultService.insertCheckResult(baseBarcodeInfo, qmsCheckRule);
@ -180,12 +184,13 @@ public class QmsMobileController extends BaseController {
if (qmsQualityInstance != null) { if (qmsQualityInstance != null) {
qmsQualityInstanceActivities = qmsQualityInstance.getQmsQualityInstanceActivityList(); qmsQualityInstanceActivities = qmsQualityInstance.getQmsQualityInstanceActivityList();
QmsQualityInstanceActivity firstQualityInstanceActivity = qmsQualityInstanceActivities.get(0);//获取第一步工单实例
QmsQualityInstanceActivity lastQualityInstanceActivity = qmsQualityInstanceActivities.get(qmsQualityInstanceActivities.size() - 1); QmsQualityInstanceActivity lastQualityInstanceActivity = qmsQualityInstanceActivities.get(qmsQualityInstanceActivities.size() - 1);
processActivityOrder = lastQualityInstanceActivity.getProcessStepOrder() + 1;//获取下一步的流程实例步骤 processActivityOrder = lastQualityInstanceActivity.getProcessStepOrder() + 1;//获取下一步的流程实例步骤
QmsCheckInstanceFile queryCheckInstanceFile = new QmsCheckInstanceFile(); QmsCheckInstanceFile queryCheckInstanceFile = new QmsCheckInstanceFile();
queryCheckInstanceFile.setTargetType(WfConstants.QMS_FILE_TARGET_TYPE_QUALITY_INSTANCE_ACTIVITY); queryCheckInstanceFile.setTargetType(WfConstants.QMS_FILE_TARGET_TYPE_QUALITY_INSTANCE_ACTIVITY);
queryCheckInstanceFile.setTargetId(qmsQualityInstance.getQualityInstanceId()); queryCheckInstanceFile.setTargetId(firstQualityInstanceActivity.getInstanceActivityId());//第一步工单实例节点ID根据工单实例节点保存图片后续可扩展到每一步可保存图片
List<QmsCheckInstanceFile> qmsCheckInstanceFiles = qmsCheckInstanceFileService.selectQmsCheckInstanceFileList(queryCheckInstanceFile); List<QmsCheckInstanceFile> qmsCheckInstanceFiles = qmsCheckInstanceFileService.selectQmsCheckInstanceFileList(queryCheckInstanceFile);
qmsCheckResultDetailVo.setQmsCheckInstanceFiles(qmsCheckInstanceFiles); qmsCheckResultDetailVo.setQmsCheckInstanceFiles(qmsCheckInstanceFiles);
@ -229,13 +234,13 @@ public class QmsMobileController extends BaseController {
public AjaxResult handleQualityInstance(QmsQualityInstanceActivityVo qmsQualityInstanceActivityVo, public AjaxResult handleQualityInstance(QmsQualityInstanceActivityVo qmsQualityInstanceActivityVo,
List<MultipartFile> files) { List<MultipartFile> files) {
List<String> fileUrls = new ArrayList<>(); List<String> fileUrls = new ArrayList<>();
if(files!=null){ if (files != null) {
for (MultipartFile file : files) { for (MultipartFile file : files) {
R<SysFile> sysFileR = remoteFileService.upload(file); R<SysFile> sysFileR = remoteFileService.upload(file);
SysFile sysFile = sysFileR.getData(); SysFile sysFile = sysFileR.getData();
fileUrls.add(sysFile.getUrl()); fileUrls.add(sysFile.getUrl());
} }
} }
return success(qmsQualityInstanceService.handleQualityInstance(qmsQualityInstanceActivityVo,fileUrls)); return success(qmsQualityInstanceService.handleQualityInstance(qmsQualityInstanceActivityVo, fileUrls));
} }
} }

@ -51,6 +51,8 @@ public class QmsCheckRule extends BaseEntity
/** 质检结果id */ /** 质检结果id */
private Long checkResultId; private Long checkResultId;
private Long materialId;
private String materialCode; private String materialCode;
private String materialName; private String materialName;
@ -137,6 +139,13 @@ public class QmsCheckRule extends BaseEntity
this.checkResultId = checkResultId; this.checkResultId = checkResultId;
} }
public Long getMaterialId() {
return materialId;
}
public void setMaterialId(Long materialId) {
this.materialId = materialId;
}
public String getMaterialCode() { public String getMaterialCode() {
return materialCode; return materialCode;

@ -147,7 +147,7 @@ public class QmsCheckResultDetailServiceImpl implements IQmsCheckResultDetailSer
/** /**
* >< * >=<=//todo 后续可修改在服务端不判断)
* *
* @param qmsCheckResultDetail * @param qmsCheckResultDetail
*/ */

@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="checkRuleType != null and checkRuleType != ''"> and check_rule_type = #{checkRuleType}</if> <if test="checkRuleType != null and checkRuleType != ''"> and check_rule_type = #{checkRuleType}</if>
<if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if> <if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
<if test="materialId != null "> and material_id = #{materialId}</if> <if test="materialId != null "> and material_id = #{materialId}</if>
<if test="materialBatch != null and materialBatch != ''"> and material_batch = #{materialBatch}</if> <if test="checkRuleName != null and checkRuleName != ''"> and check_rule_name like concat('%', #{checkRuleName}, '%')</if>
<if test="checkMode != null and checkMode != ''"> and check_mode = #{checkMode}</if> <if test="checkMode != null and checkMode != ''"> and check_mode = #{checkMode}</if>
<if test="checkSample != null "> and check_sample = #{checkSample}</if> <if test="checkSample != null "> and check_sample = #{checkSample}</if>
<if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if> <if test="planCode != null and planCode != ''"> and plan_code = #{planCode}</if>

@ -262,7 +262,9 @@ export default {
defectSeverity: null, defectSeverity: null,
}, },
// //
form: {}, form: {
},
// //
rules: { rules: {
checkProjectName: [ checkProjectName: [
@ -274,6 +276,12 @@ export default {
standardValue: [ standardValue: [
{required: true, message: "标准值不能为空", trigger: "change"} {required: true, message: "标准值不能为空", trigger: "change"}
], ],
upperDiff: [
{required: true, message: "上差值不能为空", trigger: "change"}
],
downDiff: [
{required: true, message: "下差值不能为空", trigger: "change"}
],
checkProjectProperty: [ checkProjectProperty: [
{required: true, message: "项目属性不能为空", trigger: "blur"} {required: true, message: "项目属性不能为空", trigger: "blur"}
], ],
@ -286,7 +294,7 @@ export default {
globalVariable: { globalVariable: {
CHECK_PROJECT_PROPERTY_QUALITATIVE: '1',// CHECK_PROJECT_PROPERTY_QUALITATIVE: '1',//
CHECK_PROJECT_PROPERTY_QUANTITATIVE: '2',// 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, checkSample: null,
checkTool: null, checkTool: null,
unitCode: null, unitCode: null,
standardValue: null, standardValue: undefined,
upperDiff: null, upperDiff: undefined,
downDiff: null, downDiff: undefined,
defectSeverity: null, defectSeverity: null,
remark: null, remark: null,
createBy: null, createBy: null,
@ -360,6 +368,11 @@ export default {
const checkProjectId = row.checkProjectId || this.ids const checkProjectId = row.checkProjectId || this.ids
getCheckproject(checkProjectId).then(response => { getCheckproject(checkProjectId).then(response => {
this.form = response.data; 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.open = true;
this.title = "修改检验项目"; this.title = "修改检验项目";
}); });

@ -55,7 +55,7 @@
<el-form-item label="检验规则" prop="checkRuleName"> <el-form-item label="检验规则" prop="checkRuleName">
<el-input <el-input
v-model="queryParams.checkRuleName" v-model="queryParams.checkRuleName"
placeholder="请输入检验规则" placeholder="请输入检验规则名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />

@ -1,22 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="工单流程ID关联wf_process的wf_process_id;固定流程ID" prop="wfProcessId">
<el-input
v-model="queryParams.wfProcessId"
placeholder="请输入工单流程ID关联wf_process的wf_process_id;固定流程ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="质检结果ID,关联qms_check_result主键" prop="checkResultId">
<el-input
v-model="queryParams.checkResultId"
placeholder="请输入质检结果ID,关联qms_check_result主键"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="质检描述" prop="qualityDescription"> <el-form-item label="质检描述" prop="qualityDescription">
<el-input <el-input
v-model="queryParams.qualityDescription" v-model="queryParams.qualityDescription"
@ -47,56 +32,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['qms:ualityinstance:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['qms:ualityinstance:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['qms:ualityinstance:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['qms:ualityinstance:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="ualityinstanceList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="ualityinstanceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="质检工单实例ID" align="center" prop="qualityInstanceId" />
<el-table-column label="工单流程ID关联wf_process的wf_process_id;固定流程ID" align="center" prop="wfProcessId" />
<el-table-column label="状态" align="center" prop="wfInstanceStatus" /> <el-table-column label="状态" align="center" prop="wfInstanceStatus" />
<el-table-column label="质检结果ID,关联qms_check_result主键" align="center" prop="checkResultId" /> <el-table-column label="质检结果ID,关联qms_check_result主键" align="center" prop="checkResultId" />
<el-table-column label="质检描述" align="center" prop="qualityDescription" /> <el-table-column label="质检描述" align="center" prop="qualityDescription" />
@ -127,13 +64,6 @@
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['qms:ualityinstance:edit']" v-hasPermi="['qms:ualityinstance:edit']"
>修改</el-button> >修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['qms:ualityinstance:remove']"
>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

Loading…
Cancel
Save