parent
33c50fdf9c
commit
e398aa9d8a
|
|
@ -4,7 +4,7 @@ import com.nflg.wms.common.pojo.qo.PageQO;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PQC检验规则搜索参数
|
* PQC检验规则搜索参数
|
||||||
|
|
@ -36,10 +36,10 @@ public class PqcInspectionRuleSearchQO extends PageQO {
|
||||||
/**
|
/**
|
||||||
* 创建时间开始
|
* 创建时间开始
|
||||||
*/
|
*/
|
||||||
private LocalDateTime createTimeStart;
|
private LocalDate createTimeStart;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间结束
|
* 创建时间结束
|
||||||
*/
|
*/
|
||||||
private LocalDateTime createTimeEnd;
|
private LocalDate createTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -444,7 +444,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
QmsPqcInspectionPointItems item = itemMap.get(detail.getInspectionPointItemId());
|
QmsPqcInspectionPointItems item = itemMap.get(detail.getInspectionPointItemId());
|
||||||
if (item == null) continue;
|
if (item == null) continue;
|
||||||
|
|
||||||
if (item.getInspectionType() != null && item.getInspectionType() == 1) {
|
if (isDetailType(detail, 1)) {
|
||||||
// 关键物料拍照
|
// 关键物料拍照
|
||||||
QmsPqcTaskRecordDetailVO.MaterialCollectionVO materialVO = new QmsPqcTaskRecordDetailVO.MaterialCollectionVO();
|
QmsPqcTaskRecordDetailVO.MaterialCollectionVO materialVO = new QmsPqcTaskRecordDetailVO.MaterialCollectionVO();
|
||||||
materialVO.setSerialNo(detail.getSelfTestData());
|
materialVO.setSerialNo(detail.getSelfTestData());
|
||||||
|
|
@ -454,7 +454,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
materialVO.setCollector(taskRecord.getSelfTesterName());
|
materialVO.setCollector(taskRecord.getSelfTesterName());
|
||||||
materialVO.setCollectionTime(detail.getSelfTestUploadTime());
|
materialVO.setCollectionTime(detail.getSelfTestUploadTime());
|
||||||
materialCollections.add(materialVO);
|
materialCollections.add(materialVO);
|
||||||
} else {
|
} else if (isDetailType(detail, 0)) {
|
||||||
// 工序检查
|
// 工序检查
|
||||||
QmsPqcTaskRecordDetailVO.ProcessInspectionVO processVO = new QmsPqcTaskRecordDetailVO.ProcessInspectionVO();
|
QmsPqcTaskRecordDetailVO.ProcessInspectionVO processVO = new QmsPqcTaskRecordDetailVO.ProcessInspectionVO();
|
||||||
processVO.setInspectionContent(item.getInspectionContent());
|
processVO.setInspectionContent(item.getInspectionContent());
|
||||||
|
|
@ -537,9 +537,9 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
QmsPqcInspectionPointItems item = itemMap.get(detail.getInspectionPointItemId());
|
QmsPqcInspectionPointItems item = itemMap.get(detail.getInspectionPointItemId());
|
||||||
if (item == null) continue;
|
if (item == null) continue;
|
||||||
|
|
||||||
// 只返回星级1和2
|
// 自检只返回星级1和2
|
||||||
if (item.getInspectionLevel() != null && (item.getInspectionLevel() == 1 || item.getInspectionLevel() == 2)) {
|
if (isSelfInspectionLevel(item)) {
|
||||||
if (item.getInspectionType() != null && item.getInspectionType() == 1) {
|
if (isDetailType(detail, 1)) {
|
||||||
// 关键物料拍照
|
// 关键物料拍照
|
||||||
QmsPqcTaskRecordRepairSelfVO.MaterialCollectionVO materialVO = new QmsPqcTaskRecordRepairSelfVO.MaterialCollectionVO();
|
QmsPqcTaskRecordRepairSelfVO.MaterialCollectionVO materialVO = new QmsPqcTaskRecordRepairSelfVO.MaterialCollectionVO();
|
||||||
materialVO.setSerialNo(detail.getSelfTestData());
|
materialVO.setSerialNo(detail.getSelfTestData());
|
||||||
|
|
@ -549,7 +549,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
materialVO.setCollector(taskRecord.getSelfTesterName());
|
materialVO.setCollector(taskRecord.getSelfTesterName());
|
||||||
materialVO.setCollectionTime(detail.getSelfTestUploadTime());
|
materialVO.setCollectionTime(detail.getSelfTestUploadTime());
|
||||||
materialCollections.add(materialVO);
|
materialCollections.add(materialVO);
|
||||||
} else {
|
} else if (isDetailType(detail, 0)) {
|
||||||
// 工序检查
|
// 工序检查
|
||||||
QmsPqcTaskRecordRepairSelfVO.ProcessInspectionVO processVO = new QmsPqcTaskRecordRepairSelfVO.ProcessInspectionVO();
|
QmsPqcTaskRecordRepairSelfVO.ProcessInspectionVO processVO = new QmsPqcTaskRecordRepairSelfVO.ProcessInspectionVO();
|
||||||
processVO.setInspectionContent(item.getInspectionContent());
|
processVO.setInspectionContent(item.getInspectionContent());
|
||||||
|
|
@ -623,6 +623,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
|
|
||||||
// 6. 分类组装数据
|
// 6. 分类组装数据
|
||||||
List<QmsPqcTaskRecordReviewVO.MaterialCollectionVO> materialCollections = new ArrayList<>();
|
List<QmsPqcTaskRecordReviewVO.MaterialCollectionVO> materialCollections = new ArrayList<>();
|
||||||
|
List<QmsPqcTaskRecordReviewVO.MaterialCollectionVO> qcMaterialCollections = new ArrayList<>();
|
||||||
List<QmsPqcTaskRecordReviewVO.ProcessInspectionVO> processInspections = new ArrayList<>();
|
List<QmsPqcTaskRecordReviewVO.ProcessInspectionVO> processInspections = new ArrayList<>();
|
||||||
List<QmsPqcTaskRecordReviewVO.ProcessInspectionLevel3VO> processInspectionsLevel3 = new ArrayList<>();
|
List<QmsPqcTaskRecordReviewVO.ProcessInspectionLevel3VO> processInspectionsLevel3 = new ArrayList<>();
|
||||||
|
|
||||||
|
|
@ -630,7 +631,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
QmsPqcInspectionPointItems item = itemMap.get(detail.getInspectionPointItemId());
|
QmsPqcInspectionPointItems item = itemMap.get(detail.getInspectionPointItemId());
|
||||||
if (item == null) continue;
|
if (item == null) continue;
|
||||||
|
|
||||||
if (item.getInspectionType() != null && item.getInspectionType() == 1) {
|
if (isDetailType(detail, 1)) {
|
||||||
// 关键物料拍照
|
// 关键物料拍照
|
||||||
QmsPqcTaskRecordReviewVO.MaterialCollectionVO materialVO = new QmsPqcTaskRecordReviewVO.MaterialCollectionVO();
|
QmsPqcTaskRecordReviewVO.MaterialCollectionVO materialVO = new QmsPqcTaskRecordReviewVO.MaterialCollectionVO();
|
||||||
materialVO.setSerialNo(detail.getSelfTestData());
|
materialVO.setSerialNo(detail.getSelfTestData());
|
||||||
|
|
@ -639,10 +640,14 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
QmsPqcTaskRecordReviewVO.FileDetailVO.class));
|
QmsPqcTaskRecordReviewVO.FileDetailVO.class));
|
||||||
materialVO.setCollector(taskRecord.getSelfTesterName());
|
materialVO.setCollector(taskRecord.getSelfTesterName());
|
||||||
materialVO.setCollectionTime(detail.getSelfTestUploadTime());
|
materialVO.setCollectionTime(detail.getSelfTestUploadTime());
|
||||||
|
if (isQcInspectionLevel(item)) {
|
||||||
|
qcMaterialCollections.add(materialVO);
|
||||||
|
} else if (isSelfInspectionLevel(item)) {
|
||||||
materialCollections.add(materialVO);
|
materialCollections.add(materialVO);
|
||||||
} else {
|
}
|
||||||
|
} else if (isDetailType(detail, 0)) {
|
||||||
// 工序检查
|
// 工序检查
|
||||||
if (item.getInspectionLevel() != null && (item.getInspectionLevel() == 1 || item.getInspectionLevel() == 2)) {
|
if (isSelfInspectionLevel(item)) {
|
||||||
// 星级1和2:复核用
|
// 星级1和2:复核用
|
||||||
QmsPqcTaskRecordReviewVO.ProcessInspectionVO processVO = new QmsPqcTaskRecordReviewVO.ProcessInspectionVO();
|
QmsPqcTaskRecordReviewVO.ProcessInspectionVO processVO = new QmsPqcTaskRecordReviewVO.ProcessInspectionVO();
|
||||||
processVO.setInspectionContent(item.getInspectionContent());
|
processVO.setInspectionContent(item.getInspectionContent());
|
||||||
|
|
@ -659,7 +664,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
QmsPqcTaskRecordReviewVO.FileDetailVO.class));
|
QmsPqcTaskRecordReviewVO.FileDetailVO.class));
|
||||||
processVO.setReviewOpinion(detail.getReviewOpinion());
|
processVO.setReviewOpinion(detail.getReviewOpinion());
|
||||||
processInspections.add(processVO);
|
processInspections.add(processVO);
|
||||||
} else if (item.getInspectionLevel() != null && item.getInspectionLevel() == 3) {
|
} else if (isQcInspectionLevel(item)) {
|
||||||
// 星级3:检测用
|
// 星级3:检测用
|
||||||
QmsPqcTaskRecordReviewVO.ProcessInspectionLevel3VO processVO = new QmsPqcTaskRecordReviewVO.ProcessInspectionLevel3VO();
|
QmsPqcTaskRecordReviewVO.ProcessInspectionLevel3VO processVO = new QmsPqcTaskRecordReviewVO.ProcessInspectionLevel3VO();
|
||||||
processVO.setInspectionContent(item.getInspectionContent());
|
processVO.setInspectionContent(item.getInspectionContent());
|
||||||
|
|
@ -688,6 +693,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
vo.setNo(taskRecord.getNo());
|
vo.setNo(taskRecord.getNo());
|
||||||
vo.setModelNo(taskRecord.getModelNo());
|
vo.setModelNo(taskRecord.getModelNo());
|
||||||
vo.setMaterialCollections(materialCollections);
|
vo.setMaterialCollections(materialCollections);
|
||||||
|
vo.setQcMaterialCollections(qcMaterialCollections);
|
||||||
vo.setProcessInspections(processInspections);
|
vo.setProcessInspections(processInspections);
|
||||||
vo.setProcessInspectionsLevel3(processInspectionsLevel3);
|
vo.setProcessInspectionsLevel3(processInspectionsLevel3);
|
||||||
vo.setTesterId(taskRecord.getSelfTesterId());
|
vo.setTesterId(taskRecord.getSelfTesterId());
|
||||||
|
|
@ -989,6 +995,9 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
* 判断是否有复核相关内容
|
* 判断是否有复核相关内容
|
||||||
*/
|
*/
|
||||||
private boolean hasReviewContent(QmsPqcTaskRecordDraftQO request) {
|
private boolean hasReviewContent(QmsPqcTaskRecordDraftQO request) {
|
||||||
|
if (request.getQcMaterialCollections() != null && !request.getQcMaterialCollections().isEmpty()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if (request.getProcessInspections() != null) {
|
if (request.getProcessInspections() != null) {
|
||||||
for (QmsPqcTaskRecordDraftQO.ProcessInspectionItem item : request.getProcessInspections()) {
|
for (QmsPqcTaskRecordDraftQO.ProcessInspectionItem item : request.getProcessInspections()) {
|
||||||
if (StrUtil.isNotBlank(item.getReviewData())
|
if (StrUtil.isNotBlank(item.getReviewData())
|
||||||
|
|
@ -1011,6 +1020,18 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isDetailType(QmsPqcTaskRecordDetails detail, int type) {
|
||||||
|
return detail != null && Objects.equals(detail.getType(), (short) type);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isSelfInspectionLevel(QmsPqcInspectionPointItems item) {
|
||||||
|
return item != null && (Objects.equals(item.getInspectionLevel(), 1) || Objects.equals(item.getInspectionLevel(), 2));
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isQcInspectionLevel(QmsPqcInspectionPointItems item) {
|
||||||
|
return item != null && Objects.equals(item.getInspectionLevel(), 3);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验数据完整性
|
* 校验数据完整性
|
||||||
*/
|
*/
|
||||||
|
|
@ -1019,12 +1040,10 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
|
|
||||||
// 校验关键物料采集
|
// 校验关键物料采集
|
||||||
if (request.getMaterialCollections() != null) {
|
if (request.getMaterialCollections() != null) {
|
||||||
for (int i = 0; i < request.getMaterialCollections().size(); i++) {
|
validateMaterialCollections(request.getMaterialCollections(), "materialCollections", emptyFields);
|
||||||
QmsPqcTaskRecordDraftQO.MaterialCollectionItem item = request.getMaterialCollections().get(i);
|
|
||||||
if (StrUtil.isBlank(item.getSerialNo())) {
|
|
||||||
emptyFields.add("materialCollections[" + i + "].serialNo");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (request.getQcMaterialCollections() != null) {
|
||||||
|
validateMaterialCollections(request.getQcMaterialCollections(), "qcMaterialCollections", emptyFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 校验工序检查(一二级):自检数据和自检附件有一个不为空即有效
|
// 校验工序检查(一二级):自检数据和自检附件有一个不为空即有效
|
||||||
|
|
@ -1058,10 +1077,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
List<QmsPqcTaskRecordDetails> details = pqcTaskRecordDetailsService.lambdaQuery()
|
List<QmsPqcTaskRecordDetails> details = pqcTaskRecordDetailsService.lambdaQuery()
|
||||||
.eq(QmsPqcTaskRecordDetails::getTaskId, taskId)
|
.eq(QmsPqcTaskRecordDetails::getTaskId, taskId)
|
||||||
.list();
|
.list();
|
||||||
List<QmsPqcTaskRecordDetails> type0Details = details.stream()
|
Set<Long> itemIds = details.stream()
|
||||||
.filter(d -> d.getType() != null && d.getType() == 0)
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
Set<Long> itemIds = type0Details.stream()
|
|
||||||
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
.collect(Collectors.toSet());
|
.collect(Collectors.toSet());
|
||||||
|
|
@ -1069,11 +1085,15 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
? new HashMap<>()
|
? new HashMap<>()
|
||||||
: pqcInspectionPointItemsService.listByIds(itemIds).stream()
|
: pqcInspectionPointItemsService.listByIds(itemIds).stream()
|
||||||
.collect(Collectors.toMap(QmsPqcInspectionPointItems::getId, item -> item, (a, b) -> a));
|
.collect(Collectors.toMap(QmsPqcInspectionPointItems::getId, item -> item, (a, b) -> a));
|
||||||
|
List<QmsPqcTaskRecordDetails> selfProcessDetails = details.stream()
|
||||||
|
.filter(d -> isDetailType(d, 0))
|
||||||
|
.filter(d -> isSelfInspectionLevel(itemMap.get(d.getInspectionPointItemId())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
List<String> emptyFields = new ArrayList<>();
|
List<String> emptyFields = new ArrayList<>();
|
||||||
if (hasReviewContent) {
|
if (hasReviewContent) {
|
||||||
validateReviewData(request, type0Details, itemMap, emptyFields);
|
validateReviewData(request, selfProcessDetails, itemMap, emptyFields);
|
||||||
} else {
|
} else {
|
||||||
validateSelfTestData(request, type0Details, itemMap, emptyFields);
|
validateSelfTestData(request, selfProcessDetails, itemMap, emptyFields);
|
||||||
}
|
}
|
||||||
return emptyFields;
|
return emptyFields;
|
||||||
}
|
}
|
||||||
|
|
@ -1083,12 +1103,10 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
Map<Long, QmsPqcInspectionPointItems> itemMap,
|
Map<Long, QmsPqcInspectionPointItems> itemMap,
|
||||||
List<String> emptyFields) {
|
List<String> emptyFields) {
|
||||||
if (request.getMaterialCollections() != null) {
|
if (request.getMaterialCollections() != null) {
|
||||||
for (int i = 0; i < request.getMaterialCollections().size(); i++) {
|
validateMaterialCollections(request.getMaterialCollections(), "materialCollections", emptyFields);
|
||||||
QmsPqcTaskRecordDraftQO.MaterialCollectionItem item = request.getMaterialCollections().get(i);
|
|
||||||
if (item.getFiles() == null || item.getFiles().isEmpty()) {
|
|
||||||
emptyFields.add("materialCollections[" + i + "].files");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (request.getQcMaterialCollections() != null) {
|
||||||
|
validateMaterialCollections(request.getQcMaterialCollections(), "qcMaterialCollections", emptyFields);
|
||||||
}
|
}
|
||||||
if (request.getProcessInspections() == null) {
|
if (request.getProcessInspections() == null) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1110,6 +1128,12 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
List<QmsPqcTaskRecordDetails> type0Details,
|
List<QmsPqcTaskRecordDetails> type0Details,
|
||||||
Map<Long, QmsPqcInspectionPointItems> itemMap,
|
Map<Long, QmsPqcInspectionPointItems> itemMap,
|
||||||
List<String> emptyFields) {
|
List<String> emptyFields) {
|
||||||
|
if (request.getMaterialCollections() != null) {
|
||||||
|
validateMaterialCollections(request.getMaterialCollections(), "materialCollections", emptyFields);
|
||||||
|
}
|
||||||
|
if (request.getQcMaterialCollections() != null) {
|
||||||
|
validateMaterialCollections(request.getQcMaterialCollections(), "qcMaterialCollections", emptyFields);
|
||||||
|
}
|
||||||
if (request.getProcessInspections() != null) {
|
if (request.getProcessInspections() != null) {
|
||||||
for (int i = 0; i < request.getProcessInspections().size() && i < type0Details.size(); i++) {
|
for (int i = 0; i < request.getProcessInspections().size() && i < type0Details.size(); i++) {
|
||||||
QmsPqcTaskRecordDraftQO.ProcessInspectionItem item = request.getProcessInspections().get(i);
|
QmsPqcTaskRecordDraftQO.ProcessInspectionItem item = request.getProcessInspections().get(i);
|
||||||
|
|
@ -1139,6 +1163,23 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void validateMaterialCollections(List<QmsPqcTaskRecordDraftQO.MaterialCollectionItem> items,
|
||||||
|
String fieldPrefix,
|
||||||
|
List<String> emptyFields) {
|
||||||
|
for (int i = 0; i < items.size(); i++) {
|
||||||
|
QmsPqcTaskRecordDraftQO.MaterialCollectionItem item = items.get(i);
|
||||||
|
if (StrUtil.isBlank(item.getSerialNo())) {
|
||||||
|
emptyFields.add(fieldPrefix + "[" + i + "].serialNo");
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(item.getBatchNo())) {
|
||||||
|
emptyFields.add(fieldPrefix + "[" + i + "].batchNo");
|
||||||
|
}
|
||||||
|
if (item.getFiles() == null || item.getFiles().isEmpty()) {
|
||||||
|
emptyFields.add(fieldPrefix + "[" + i + "].files");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存任务详情
|
* 保存任务详情
|
||||||
*/
|
*/
|
||||||
|
|
@ -1150,15 +1191,48 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
.eq(QmsPqcTaskRecordDetails::getTaskId, taskId)
|
.eq(QmsPqcTaskRecordDetails::getTaskId, taskId)
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
// type=1 的 inspectionPointItemId 列表(关键物料)
|
Set<Long> oldItemIds = oldDetails.stream()
|
||||||
List<Long> type1ItemIds = oldDetails.stream()
|
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
||||||
.filter(d -> d.getType() != null && d.getType() == 1)
|
.filter(Objects::nonNull)
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
Map<Long, QmsPqcInspectionPointItems> oldItemMap = oldItemIds.isEmpty()
|
||||||
|
? new HashMap<>()
|
||||||
|
: pqcInspectionPointItemsService.listByIds(oldItemIds).stream()
|
||||||
|
.collect(Collectors.toMap(QmsPqcInspectionPointItems::getId, item -> item, (a, b) -> a));
|
||||||
|
|
||||||
|
// type=1 且星级1/2 的明细(自检关键物料)
|
||||||
|
List<QmsPqcTaskRecordDetails> selfMaterialDetails = oldDetails.stream()
|
||||||
|
.filter(d -> isDetailType(d, 1))
|
||||||
|
.filter(d -> isSelfInspectionLevel(oldItemMap.get(d.getInspectionPointItemId())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<Long> selfMaterialItemIds = selfMaterialDetails.stream()
|
||||||
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
// type=0 的 inspectionPointItemId 列表(工序检查,一二级+三级按顺序)
|
// type=1 且星级3 的明细(QC关键物料)
|
||||||
List<Long> type0ItemIds = oldDetails.stream()
|
List<QmsPqcTaskRecordDetails> qcMaterialDetails = oldDetails.stream()
|
||||||
.filter(d -> d.getType() != null && d.getType() == 0)
|
.filter(d -> isDetailType(d, 1))
|
||||||
|
.filter(d -> isQcInspectionLevel(oldItemMap.get(d.getInspectionPointItemId())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<Long> qcMaterialItemIds = qcMaterialDetails.stream()
|
||||||
|
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// type=0 且星级1/2 的明细(自检/复核工序检查)
|
||||||
|
List<QmsPqcTaskRecordDetails> selfProcessDetails = oldDetails.stream()
|
||||||
|
.filter(d -> isDetailType(d, 0))
|
||||||
|
.filter(d -> isSelfInspectionLevel(oldItemMap.get(d.getInspectionPointItemId())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<Long> selfProcessItemIds = selfProcessDetails.stream()
|
||||||
|
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
// type=0 且星级3 的明细(QC工序检查)
|
||||||
|
List<QmsPqcTaskRecordDetails> qcProcessDetails = oldDetails.stream()
|
||||||
|
.filter(d -> isDetailType(d, 0))
|
||||||
|
.filter(d -> isQcInspectionLevel(oldItemMap.get(d.getInspectionPointItemId())))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<Long> qcProcessItemIds = qcProcessDetails.stream()
|
||||||
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
.map(QmsPqcTaskRecordDetails::getInspectionPointItemId)
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
|
@ -1174,7 +1248,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
QmsPqcTaskRecordDetails detail = new QmsPqcTaskRecordDetails()
|
QmsPqcTaskRecordDetails detail = new QmsPqcTaskRecordDetails()
|
||||||
.setTaskId(taskId)
|
.setTaskId(taskId)
|
||||||
.setType((short) 1)
|
.setType((short) 1)
|
||||||
.setInspectionPointItemId(i < type1ItemIds.size() ? type1ItemIds.get(i) : null)
|
.setInspectionPointItemId(i < selfMaterialItemIds.size() ? selfMaterialItemIds.get(i) : null)
|
||||||
.setSelfTestData(item.getSerialNo())
|
.setSelfTestData(item.getSerialNo())
|
||||||
.setSelfCheck(item.getFiles() != null && !item.getFiles().isEmpty() ? true : null)
|
.setSelfCheck(item.getFiles() != null && !item.getFiles().isEmpty() ? true : null)
|
||||||
.setReviewData(item.getBatchNo())
|
.setReviewData(item.getBatchNo())
|
||||||
|
|
@ -1182,6 +1256,27 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
.setSelfTestUploadTime(now);
|
.setSelfTestUploadTime(now);
|
||||||
pqcTaskRecordDetailsService.save(detail);
|
pqcTaskRecordDetailsService.save(detail);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
saveExistingTaskDetails(taskId, selfMaterialDetails);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存QC关键物料采集(三级)
|
||||||
|
if (request.getQcMaterialCollections() != null) {
|
||||||
|
for (int i = 0; i < request.getQcMaterialCollections().size(); i++) {
|
||||||
|
QmsPqcTaskRecordDraftQO.MaterialCollectionItem item = request.getQcMaterialCollections().get(i);
|
||||||
|
QmsPqcTaskRecordDetails detail = new QmsPqcTaskRecordDetails()
|
||||||
|
.setTaskId(taskId)
|
||||||
|
.setType((short) 1)
|
||||||
|
.setInspectionPointItemId(i < qcMaterialItemIds.size() ? qcMaterialItemIds.get(i) : null)
|
||||||
|
.setSelfTestData(item.getSerialNo())
|
||||||
|
.setSelfCheck(item.getFiles() != null && !item.getFiles().isEmpty() ? true : null)
|
||||||
|
.setReviewData(item.getBatchNo())
|
||||||
|
.setSelfTestAttachments(serializeFileList(item.getFiles()))
|
||||||
|
.setSelfTestUploadTime(now);
|
||||||
|
pqcTaskRecordDetailsService.save(detail);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
saveExistingTaskDetails(taskId, qcMaterialDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存工序检查(一二级)
|
// 保存工序检查(一二级)
|
||||||
|
|
@ -1191,7 +1286,7 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
QmsPqcTaskRecordDetails detail = new QmsPqcTaskRecordDetails()
|
QmsPqcTaskRecordDetails detail = new QmsPqcTaskRecordDetails()
|
||||||
.setTaskId(taskId)
|
.setTaskId(taskId)
|
||||||
.setType((short) 0)
|
.setType((short) 0)
|
||||||
.setInspectionPointItemId(i < type0ItemIds.size() ? type0ItemIds.get(i) : null)
|
.setInspectionPointItemId(i < selfProcessItemIds.size() ? selfProcessItemIds.get(i) : null)
|
||||||
.setSelfTestData(item.getSelfTestData())
|
.setSelfTestData(item.getSelfTestData())
|
||||||
.setSelfCheck(item.getSelfCheck())
|
.setSelfCheck(item.getSelfCheck())
|
||||||
.setReviewData(item.getReviewData())
|
.setReviewData(item.getReviewData())
|
||||||
|
|
@ -1203,18 +1298,18 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
.setReviewUploadTime(StrUtil.isNotBlank(item.getReviewData()) ? now : null);
|
.setReviewUploadTime(StrUtil.isNotBlank(item.getReviewData()) ? now : null);
|
||||||
pqcTaskRecordDetailsService.save(detail);
|
pqcTaskRecordDetailsService.save(detail);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
saveExistingTaskDetails(taskId, selfProcessDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存工序检查(三级),index 接在一二级后面
|
// 保存工序检查(三级),index 接在一二级后面
|
||||||
if (request.getProcessInspectionsLevel3() != null) {
|
if (request.getProcessInspectionsLevel3() != null) {
|
||||||
int offset = request.getProcessInspections() != null ? request.getProcessInspections().size() : 0;
|
|
||||||
for (int i = 0; i < request.getProcessInspectionsLevel3().size(); i++) {
|
for (int i = 0; i < request.getProcessInspectionsLevel3().size(); i++) {
|
||||||
QmsPqcTaskRecordDraftQO.ProcessInspectionLevel3Item item = request.getProcessInspectionsLevel3().get(i);
|
QmsPqcTaskRecordDraftQO.ProcessInspectionLevel3Item item = request.getProcessInspectionsLevel3().get(i);
|
||||||
int idx = offset + i;
|
|
||||||
QmsPqcTaskRecordDetails detail = new QmsPqcTaskRecordDetails()
|
QmsPqcTaskRecordDetails detail = new QmsPqcTaskRecordDetails()
|
||||||
.setTaskId(taskId)
|
.setTaskId(taskId)
|
||||||
.setType((short) 0)
|
.setType((short) 0)
|
||||||
.setInspectionPointItemId(idx < type0ItemIds.size() ? type0ItemIds.get(idx) : null)
|
.setInspectionPointItemId(i < qcProcessItemIds.size() ? qcProcessItemIds.get(i) : null)
|
||||||
.setSelfCheck(null)
|
.setSelfCheck(null)
|
||||||
.setReviewEnable(item.getEnable());
|
.setReviewEnable(item.getEnable());
|
||||||
if (hasReviewContent) {
|
if (hasReviewContent) {
|
||||||
|
|
@ -1231,9 +1326,32 @@ public class QmsPqcTaskRecordControllerService {
|
||||||
}
|
}
|
||||||
pqcTaskRecordDetailsService.save(detail);
|
pqcTaskRecordDetailsService.save(detail);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
saveExistingTaskDetails(taskId, qcProcessDetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void saveExistingTaskDetails(Long taskId, List<QmsPqcTaskRecordDetails> details) {
|
||||||
|
if (details == null || details.isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
details.forEach(old -> pqcTaskRecordDetailsService.save(new QmsPqcTaskRecordDetails()
|
||||||
|
.setTaskId(taskId)
|
||||||
|
.setInspectionPointItemId(old.getInspectionPointItemId())
|
||||||
|
.setSelfTestAttachments(old.getSelfTestAttachments())
|
||||||
|
.setSelfTestData(old.getSelfTestData())
|
||||||
|
.setSelfCheck(old.getSelfCheck())
|
||||||
|
.setSelfTestUploadTime(old.getSelfTestUploadTime())
|
||||||
|
.setReviewAttachments(old.getReviewAttachments())
|
||||||
|
.setReviewData(old.getReviewData())
|
||||||
|
.setReviewEnable(old.getReviewEnable())
|
||||||
|
.setReviewUploadTime(old.getReviewUploadTime())
|
||||||
|
.setQcTestAttachments(old.getQcTestAttachments())
|
||||||
|
.setQcTestData(old.getQcTestData())
|
||||||
|
.setType(old.getType())
|
||||||
|
.setReviewOpinion(old.getReviewOpinion())));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 序列化文件列表
|
* 序列化文件列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import com.nflg.wms.common.exception.NflgException;
|
||||||
import com.nflg.wms.common.pojo.PageData;
|
import com.nflg.wms.common.pojo.PageData;
|
||||||
import com.nflg.wms.common.pojo.dto.PqcInspectionRuleExportDTO;
|
import com.nflg.wms.common.pojo.dto.PqcInspectionRuleExportDTO;
|
||||||
import com.nflg.wms.common.pojo.dto.PqcInspectionRuleImportDTO;
|
import com.nflg.wms.common.pojo.dto.PqcInspectionRuleImportDTO;
|
||||||
|
import com.nflg.wms.common.pojo.dto.PqcInspectionRuleImportTemplateDTO;
|
||||||
import com.nflg.wms.common.pojo.qo.PqcInspectionRuleExportQO;
|
import com.nflg.wms.common.pojo.qo.PqcInspectionRuleExportQO;
|
||||||
import com.nflg.wms.common.pojo.vo.QmsPqcInspectionPointItemListVO;
|
import com.nflg.wms.common.pojo.vo.QmsPqcInspectionPointItemListVO;
|
||||||
import com.nflg.wms.common.pojo.vo.QmsPqcInspectionPointItemsGroupedVO;
|
import com.nflg.wms.common.pojo.vo.QmsPqcInspectionPointItemsGroupedVO;
|
||||||
|
|
@ -101,10 +102,11 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
.orderByAsc(QmsPqcInspectionPointItems::getSort)
|
.orderByAsc(QmsPqcInspectionPointItems::getSort)
|
||||||
.list();
|
.list();
|
||||||
|
|
||||||
// 初始化三个分类列表
|
// 初始化分类列表
|
||||||
List<QmsPqcInspectionPointItemListVO> materialItems = new ArrayList<>(); // 第1类:关键物料拍照
|
List<QmsPqcInspectionPointItemListVO> materialItems = new ArrayList<>(); // 第1类:关键物料拍照
|
||||||
List<QmsPqcInspectionPointItemListVO> selfReviewItems = new ArrayList<>(); // 第2类:工序检查-自检复核
|
List<QmsPqcInspectionPointItemListVO> selfReviewItems = new ArrayList<>(); // 第2类:工序检查-自检复核
|
||||||
List<QmsPqcInspectionPointItemListVO> qcItems = new ArrayList<>(); // 第3类:工序检查-QC检测
|
List<QmsPqcInspectionPointItemListVO> qcMaterialItems = new ArrayList<>(); // 第3类:QC关键物料拍照
|
||||||
|
List<QmsPqcInspectionPointItemListVO> qcItems = new ArrayList<>(); // 第4类:工序检查-QC检测
|
||||||
|
|
||||||
// 分类逻辑
|
// 分类逻辑
|
||||||
for (QmsPqcInspectionPointItems item : allItems) {
|
for (QmsPqcInspectionPointItems item : allItems) {
|
||||||
|
|
@ -121,20 +123,28 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
Integer type = item.getInspectionType();
|
Integer type = item.getInspectionType();
|
||||||
Integer level = item.getInspectionLevel();
|
Integer level = item.getInspectionLevel();
|
||||||
|
|
||||||
// 第1类:关键物料拍照类
|
boolean materialType = Objects.equals(type, 1) || Objects.equals(type, 2);
|
||||||
// 包含:inspectionType = 1(关键物料拍照)+ inspectionType = 2(全部)
|
boolean processType = Objects.equals(type, 0) || Objects.equals(type, 2);
|
||||||
if (Objects.equals(type, 1) || Objects.equals(type, 2)) {
|
boolean selfLevel = Objects.equals(level, 1) || Objects.equals(level, 2);
|
||||||
|
boolean qcLevel = Objects.equals(level, 3);
|
||||||
|
|
||||||
|
// 第1类:自检侧关键物料拍照类
|
||||||
|
if (materialType && selfLevel) {
|
||||||
materialItems.add(vo);
|
materialItems.add(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 第2类:自检只看1/2星的工序检查或全部
|
// 第2类:自检只看1/2星的工序检查或全部
|
||||||
if ((Objects.equals(type, 0) || Objects.equals(type, 2))
|
if (processType && selfLevel) {
|
||||||
&& (Objects.equals(level, 1) || Objects.equals(level, 2))) {
|
|
||||||
selfReviewItems.add(vo);
|
selfReviewItems.add(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 第3类:3星不区分检测/采集,全部由复核人员处理
|
// 第3类:QC侧3星关键物料拍照类
|
||||||
if (Objects.equals(level, 3)) {
|
if (materialType && qcLevel) {
|
||||||
|
qcMaterialItems.add(vo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 第4类:QC侧3星工序检查类
|
||||||
|
if (processType && qcLevel) {
|
||||||
qcItems.add(vo);
|
qcItems.add(vo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -143,6 +153,7 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
QmsPqcInspectionPointItemsGroupedVO groupedVO = new QmsPqcInspectionPointItemsGroupedVO();
|
QmsPqcInspectionPointItemsGroupedVO groupedVO = new QmsPqcInspectionPointItemsGroupedVO();
|
||||||
groupedVO.setMaterialItems(materialItems);
|
groupedVO.setMaterialItems(materialItems);
|
||||||
groupedVO.setSelfReviewItems(selfReviewItems);
|
groupedVO.setSelfReviewItems(selfReviewItems);
|
||||||
|
groupedVO.setQcMaterialItems(qcMaterialItems);
|
||||||
groupedVO.setQcItems(qcItems);
|
groupedVO.setQcItems(qcItems);
|
||||||
|
|
||||||
return groupedVO;
|
return groupedVO;
|
||||||
|
|
@ -182,8 +193,8 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
.like(StrUtil.isNotBlank(qo.getPqcRuleCode()), QmsPqcInspectionRule::getPqcRuleCode, qo.getPqcRuleCode())
|
.like(StrUtil.isNotBlank(qo.getPqcRuleCode()), QmsPqcInspectionRule::getPqcRuleCode, qo.getPqcRuleCode())
|
||||||
.eq(Objects.nonNull(qo.getIsDisabled()), QmsPqcInspectionRule::getIsDisabled, qo.getIsDisabled())
|
.eq(Objects.nonNull(qo.getIsDisabled()), QmsPqcInspectionRule::getIsDisabled, qo.getIsDisabled())
|
||||||
.eq(Objects.nonNull(qo.getAuditStatus()), QmsPqcInspectionRule::getAuditStatus, qo.getAuditStatus())
|
.eq(Objects.nonNull(qo.getAuditStatus()), QmsPqcInspectionRule::getAuditStatus, qo.getAuditStatus())
|
||||||
.ge(Objects.nonNull(qo.getCreateTimeStart()), QmsPqcInspectionRule::getCreateTime, qo.getCreateTimeStart())
|
.ge(Objects.nonNull(qo.getCreateTimeStart()), QmsPqcInspectionRule::getCreateTime, qo.getCreateTimeStart() == null ? null : qo.getCreateTimeStart().atStartOfDay())
|
||||||
.le(Objects.nonNull(qo.getCreateTimeEnd()), QmsPqcInspectionRule::getCreateTime, qo.getCreateTimeEnd())
|
.lt(Objects.nonNull(qo.getCreateTimeEnd()), QmsPqcInspectionRule::getCreateTime, qo.getCreateTimeEnd() == null ? null : qo.getCreateTimeEnd().plusDays(1).atStartOfDay())
|
||||||
.orderByDesc(QmsPqcInspectionRule::getCreateTime);
|
.orderByDesc(QmsPqcInspectionRule::getCreateTime);
|
||||||
|
|
||||||
Page<QmsPqcInspectionRule> page = ruleService.page(new Page<>(qo.getPage(), qo.getPageSize()), queryWrapper);
|
Page<QmsPqcInspectionRule> page = ruleService.page(new Page<>(qo.getPage(), qo.getPageSize()), queryWrapper);
|
||||||
|
|
@ -343,8 +354,9 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
|
|
||||||
// 创建新规则
|
// 创建新规则
|
||||||
QmsPqcInspectionRule newRule = new QmsPqcInspectionRule();
|
QmsPqcInspectionRule newRule = new QmsPqcInspectionRule();
|
||||||
newRule.setModelNo(null); // 清空机型编号
|
newRule.setModelNo(existRule.getModelNo());
|
||||||
newRule.setRuleVersion(1);
|
newRule.setPqcRuleCode(serialNumberControllerService.generateSerialNumber(40));
|
||||||
|
newRule.setRuleVersion(getNextRuleVersion(existRule.getModelNo()));
|
||||||
newRule.setIsDisabled(true);
|
newRule.setIsDisabled(true);
|
||||||
newRule.setAuditStatus(0);
|
newRule.setAuditStatus(0);
|
||||||
newRule.setCreateBy(operatorId);
|
newRule.setCreateBy(operatorId);
|
||||||
|
|
@ -829,6 +841,7 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
throw new NflgException(STATE.BusinessError, "机型" + modelNo + "已存在未审核的版本,请先完成审核后再导入");
|
throw new NflgException(STATE.BusinessError, "机型" + modelNo + "已存在未审核的版本,请先完成审核后再导入");
|
||||||
}
|
}
|
||||||
targetRuleId = forkNewVersion(highestRule);
|
targetRuleId = forkNewVersion(highestRule);
|
||||||
|
isNewRule = true;
|
||||||
} else {
|
} else {
|
||||||
// 最高版本未审核,直接在其上修改
|
// 最高版本未审核,直接在其上修改
|
||||||
targetRuleId = highestRule.getId();
|
targetRuleId = highestRule.getId();
|
||||||
|
|
@ -861,6 +874,10 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
// 追加导入:保留已有数据,追加导入数据(去重)
|
// 追加导入:保留已有数据,追加导入数据(去重)
|
||||||
appendImportPointsAndItems(targetRuleId, pointGroups, stepDicItems, operator, operatorId, now);
|
appendImportPointsAndItems(targetRuleId, pointGroups, stepDicItems, operator, operatorId, now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isNewRule) {
|
||||||
|
ensurePlaceholderPointsForMissingSteps(targetRuleId, stepDicItems, operator, operatorId, now);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1191,7 +1208,7 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void downloadTemplate(HttpServletResponse response) throws IOException {
|
public void downloadTemplate(HttpServletResponse response) throws IOException {
|
||||||
PqcInspectionRuleImportDTO example = new PqcInspectionRuleImportDTO()
|
PqcInspectionRuleImportTemplateDTO example = new PqcInspectionRuleImportTemplateDTO()
|
||||||
.setModelNo("示例机型编号")
|
.setModelNo("示例机型编号")
|
||||||
.setStepName("示例步装名称")
|
.setStepName("示例步装名称")
|
||||||
.setInspectionPointCode("示例检查点编号")
|
.setInspectionPointCode("示例检查点编号")
|
||||||
|
|
@ -1204,4 +1221,46 @@ public class QmsPqcInspectionRuleControllerServiceImpl implements QmsPqcInspecti
|
||||||
.setSort(1);
|
.setSort(1);
|
||||||
EecExcelUtil.export("PQC检测规则导入模板", "PQC检测规则导入模板", List.of(example), response);
|
EecExcelUtil.export("PQC检测规则导入模板", "PQC检测规则导入模板", List.of(example), response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Integer getNextRuleVersion(String modelNo) {
|
||||||
|
Integer maxVersion = ruleService.lambdaQuery()
|
||||||
|
.eq(StrUtil.isNotBlank(modelNo), QmsPqcInspectionRule::getModelNo, modelNo)
|
||||||
|
.select(QmsPqcInspectionRule::getRuleVersion)
|
||||||
|
.list()
|
||||||
|
.stream()
|
||||||
|
.map(QmsPqcInspectionRule::getRuleVersion)
|
||||||
|
.filter(Objects::nonNull)
|
||||||
|
.max(Integer::compareTo)
|
||||||
|
.orElse(0);
|
||||||
|
return maxVersion + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ensurePlaceholderPointsForMissingSteps(Long ruleId,
|
||||||
|
List<DictionaryItem> stepDicItems,
|
||||||
|
String operator,
|
||||||
|
Long operatorId,
|
||||||
|
LocalDateTime now) {
|
||||||
|
List<QmsPqcInspectionPoint> existPoints = pointService.lambdaQuery()
|
||||||
|
.eq(QmsPqcInspectionPoint::getPqcRuleId, ruleId)
|
||||||
|
.list();
|
||||||
|
Map<Long, QmsPqcInspectionPoint> existStepMap = existPoints.stream()
|
||||||
|
.filter(point -> point.getStepDicItemId() != null)
|
||||||
|
.collect(Collectors.toMap(QmsPqcInspectionPoint::getStepDicItemId, point -> point, (a, b) -> a));
|
||||||
|
|
||||||
|
for (DictionaryItem stepDicItem : stepDicItems) {
|
||||||
|
if (stepDicItem.getId() == null || existStepMap.containsKey(stepDicItem.getId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
QmsPqcInspectionPoint placeholderPoint = new QmsPqcInspectionPoint();
|
||||||
|
placeholderPoint.setPqcRuleId(ruleId);
|
||||||
|
placeholderPoint.setStepName(stepDicItem.getName());
|
||||||
|
placeholderPoint.setStepDicItemId(stepDicItem.getId());
|
||||||
|
placeholderPoint.setInspectionPointCode("");
|
||||||
|
placeholderPoint.setInspectionPointName("");
|
||||||
|
placeholderPoint.setCreateBy(operatorId);
|
||||||
|
placeholderPoint.setCreateName(operator);
|
||||||
|
placeholderPoint.setCreateTime(now);
|
||||||
|
pointService.save(placeholderPoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.nflg.wms.common.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.ttzero.excel.annotation.ExcelColumn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PQC检测规则 导入模板DTO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class PqcInspectionRuleImportTemplateDTO {
|
||||||
|
|
||||||
|
@ExcelColumn("机型编号*")
|
||||||
|
private String modelNo;
|
||||||
|
|
||||||
|
@ExcelColumn("步装名称*")
|
||||||
|
private String stepName;
|
||||||
|
|
||||||
|
@ExcelColumn("检查点编号*")
|
||||||
|
private String inspectionPointCode;
|
||||||
|
|
||||||
|
@ExcelColumn("检查点名称")
|
||||||
|
private String inspectionPointName;
|
||||||
|
|
||||||
|
@ExcelColumn("检查项内容*")
|
||||||
|
private String inspectionContent;
|
||||||
|
|
||||||
|
@ExcelColumn("检查项类别*")
|
||||||
|
private String inspectionTypeText;
|
||||||
|
|
||||||
|
@ExcelColumn("检测方法*")
|
||||||
|
private String inspectionMethodsText;
|
||||||
|
|
||||||
|
@ExcelColumn("等级*")
|
||||||
|
private String inspectionLevelText;
|
||||||
|
|
||||||
|
@ExcelColumn("实例图")
|
||||||
|
private String inspectionImage;
|
||||||
|
|
||||||
|
@ExcelColumn("排序")
|
||||||
|
private Integer sort;
|
||||||
|
}
|
||||||
|
|
@ -45,6 +45,11 @@ public class QmsPqcTaskRecordDraftQO {
|
||||||
*/
|
*/
|
||||||
private List<MaterialCollectionItem> materialCollections;
|
private List<MaterialCollectionItem> materialCollections;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QC关键物料采集对象列表(三级)
|
||||||
|
*/
|
||||||
|
private List<MaterialCollectionItem> qcMaterialCollections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工序检查对象列表(一二级)
|
* 工序检查对象列表(一二级)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.nflg.wms.common.pojo.vo;
|
package com.nflg.wms.common.pojo.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -75,11 +76,13 @@ public class QmsPdiComponentBindingSearchVO {
|
||||||
/**
|
/**
|
||||||
* x轴坐标
|
* x轴坐标
|
||||||
*/
|
*/
|
||||||
|
@JsonProperty("xCoordinatePoint")
|
||||||
private String xCoordinatePoint;
|
private String xCoordinatePoint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* y轴坐标
|
* y轴坐标
|
||||||
*/
|
*/
|
||||||
|
@JsonProperty("yCoordinatePoint")
|
||||||
private String yCoordinatePoint;
|
private String yCoordinatePoint;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ public class QmsPqcInspectionPointItemsGroupedVO {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第1类:关键物料拍照类
|
* 第1类:关键物料拍照类
|
||||||
* 包含:inspectionType = 1(关键物料拍照)+ inspectionType = 2(全部)
|
* 包含:inspectionType = 1或2,且星级=1或2
|
||||||
*/
|
*/
|
||||||
private List<QmsPqcInspectionPointItemListVO> materialItems;
|
private List<QmsPqcInspectionPointItemListVO> materialItems;
|
||||||
|
|
||||||
|
|
@ -23,8 +23,14 @@ public class QmsPqcInspectionPointItemsGroupedVO {
|
||||||
private List<QmsPqcInspectionPointItemListVO> selfReviewItems;
|
private List<QmsPqcInspectionPointItemListVO> selfReviewItems;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 第3类:工序检查-QC检测类
|
* 第3类:QC关键物料拍照类
|
||||||
* 包含:星级=3,不区分检查类型
|
* 包含:inspectionType = 1或2,且星级=3
|
||||||
|
*/
|
||||||
|
private List<QmsPqcInspectionPointItemListVO> qcMaterialItems;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第4类:工序检查-QC检测类
|
||||||
|
* 包含:inspectionType = 0或2,且星级=3
|
||||||
*/
|
*/
|
||||||
private List<QmsPqcInspectionPointItemListVO> qcItems;
|
private List<QmsPqcInspectionPointItemListVO> qcItems;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,11 @@ public class QmsPqcTaskRecordReviewVO {
|
||||||
*/
|
*/
|
||||||
private List<MaterialCollectionVO> materialCollections;
|
private List<MaterialCollectionVO> materialCollections;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* QC关键物料采集对象列表(三级)
|
||||||
|
*/
|
||||||
|
private List<MaterialCollectionVO> qcMaterialCollections;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工序检查对象列表(一二级)- 复核用
|
* 工序检查对象列表(一二级)- 复核用
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue