|
|
|
@ -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<QmsCheckInstanceFile> qmsCheckInstanceFiles = qmsCheckInstanceFileService.selectQmsCheckInstanceFileList(queryCheckInstanceFile);
|
|
|
|
|
|
|
|
|
|
qmsCheckResultDetailVo.setQmsCheckInstanceFiles(qmsCheckInstanceFiles);
|
|
|
|
@ -229,13 +234,13 @@ public class QmsMobileController extends BaseController {
|
|
|
|
|
public AjaxResult handleQualityInstance(QmsQualityInstanceActivityVo qmsQualityInstanceActivityVo,
|
|
|
|
|
List<MultipartFile> files) {
|
|
|
|
|
List<String> fileUrls = new ArrayList<>();
|
|
|
|
|
if(files!=null){
|
|
|
|
|
if (files != null) {
|
|
|
|
|
for (MultipartFile file : files) {
|
|
|
|
|
R<SysFile> sysFileR = remoteFileService.upload(file);
|
|
|
|
|
SysFile sysFile = sysFileR.getData();
|
|
|
|
|
fileUrls.add(sysFile.getUrl());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return success(qmsQualityInstanceService.handleQualityInstance(qmsQualityInstanceActivityVo,fileUrls));
|
|
|
|
|
return success(qmsQualityInstanceService.handleQualityInstance(qmsQualityInstanceActivityVo, fileUrls));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|