pdi 的检测任务添加检测规则ID;返回的检测项添加返回的图片信息
This commit is contained in:
parent
32b9492088
commit
1d9c480331
|
|
@ -481,7 +481,7 @@ public class QmsPdiInspectionResultsControllerService {
|
|||
vo.setOrderNo(task.getOrderNo());
|
||||
vo.setRequiredCompletionTime(task.getRequiredCompletionTime());
|
||||
vo.setInspectionEnable(task.getInspectionEnable());
|
||||
|
||||
vo.setInspectionRuleId(task.getDetectionRulesId());
|
||||
// 查询检测规则获取机型编号和检测版本
|
||||
if (task.getDetectionRulesId() != null) {
|
||||
QmsPdiDetectionRules rules = detectionRulesService.getById(task.getDetectionRulesId());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
package com.nflg.qms.admin.service;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nflg.wms.common.constant.STATE;
|
||||
import com.nflg.wms.common.exception.NflgException;
|
||||
|
|
@ -465,6 +468,29 @@ public class QmsPdiTaskRecordControllerService {
|
|||
*/
|
||||
public PageData<QmsPdiTaskInspectionResultVO> inspectionResultDetail(QmsPdiTaskInspectionResultQO request) {
|
||||
Page<QmsPdiTaskInspectionResultVO> page = inspectionResultsService.listByTaskId(request);
|
||||
if (ObjUtil.isNotNull(page) && CollectionUtil.isNotEmpty(page.getRecords())) {
|
||||
page.getRecords().forEach(vo -> {
|
||||
if (StrUtil.isNotBlank(vo.getInspectionItemImage())) {
|
||||
List<QmsPdiTaskRecordDetailVO.FileDetailVO> files = new ArrayList<>();
|
||||
String[] imgIds = vo.getInspectionItemImage().split(",");
|
||||
for (String imgId : imgIds) {
|
||||
FileUploadRecord fileUploadRecord = fileUploadRecordService.
|
||||
lambdaQuery().
|
||||
eq(FileUploadRecord::getId, imgId).one();
|
||||
if (ObjUtil.isNotNull(fileUploadRecord)) {
|
||||
QmsPdiTaskRecordDetailVO.FileDetailVO fo = new QmsPdiTaskRecordDetailVO.FileDetailVO();
|
||||
fo.setFileName(fileUploadRecord.getFileName());
|
||||
fo.setUrl(fileUploadRecord.getUrl());
|
||||
fo.setFileType(fileUploadRecord.getFileType());
|
||||
fo.setId(fileUploadRecord.getId());
|
||||
files.add(fo);
|
||||
}
|
||||
}
|
||||
vo.setInspectionItemImages(files);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
PageData<QmsPdiTaskInspectionResultVO> result = new PageData<>();
|
||||
result.setItems(page.getRecords());
|
||||
result.setTotal((int) page.getTotal());
|
||||
|
|
@ -488,7 +514,7 @@ public class QmsPdiTaskRecordControllerService {
|
|||
vo.setFactoryNo(record.getFactoryNo());
|
||||
vo.setInspectionInspection(record.getInspectionInspection());
|
||||
vo.setDetectionCompletionTime(record.getDetectionCompletionTime());
|
||||
|
||||
vo.setInspectionRuleId(record.getDetectionRulesId());
|
||||
// 关联检测规则,获取机型编号、检查版本、检测类型、质检员
|
||||
if (record.getDetectionRulesId() != null) {
|
||||
QmsPdiDetectionRules rules = detectionRulesService.getById(record.getDetectionRulesId());
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.nflg.wms.common.pojo.vo;
|
|||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* PDI任务检验结果详情VO(联查检测项和部件信息)
|
||||
|
|
@ -40,6 +41,10 @@ public class QmsPdiTaskInspectionResultVO {
|
|||
*/
|
||||
private String inspectionItemImage;
|
||||
|
||||
/**
|
||||
* 现场图片/视频详情列表
|
||||
*/
|
||||
private List<QmsPdiTaskRecordDetailVO.FileDetailVO> inspectionItemImages;
|
||||
/**
|
||||
* 检验项结果:false=不合格,true=合格
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class QmsPdiTaskRecordDetailVO {
|
|||
*/
|
||||
private LocalDateTime inspectionTime;
|
||||
|
||||
/**
|
||||
/*
|
||||
* 检测人
|
||||
*/
|
||||
private String inspectionBy;
|
||||
|
|
@ -172,6 +172,11 @@ public class QmsPdiTaskRecordDetailVO {
|
|||
* 检测完成时间
|
||||
*/
|
||||
private LocalDateTime detectionCompletionTime;
|
||||
|
||||
/**
|
||||
* 检测规则ID
|
||||
*/
|
||||
private Long inspectionRuleId;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -59,4 +59,9 @@ public class QmsPdiTaskRecordSummaryVO {
|
|||
* 质检状态:0=待检查,1=检验中,2=已完成,3=待流转
|
||||
*/
|
||||
private Integer inspectionEnable;
|
||||
|
||||
/**
|
||||
* 检测规则ID
|
||||
*/
|
||||
private Long inspectionRuleId;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue