|
|
|
@ -2291,7 +2291,9 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
if (null == task) { |
|
|
|
if (null == task) { |
|
|
|
throw new IllegalArgumentException("error id!"); |
|
|
|
throw new IllegalArgumentException("error id!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
int checkResult = task.getCheckResult(); |
|
|
|
List<WorkPlanItem> itemList = wpItemService.listByTaskId(id); |
|
|
|
List<WorkPlanItem> itemList = wpItemService.listByTaskId(id); |
|
|
|
|
|
|
|
if (CollectionUtils.isNotEmpty(itemList)) { |
|
|
|
StatusCountMap map = new StatusCountMap(); |
|
|
|
StatusCountMap map = new StatusCountMap(); |
|
|
|
int sumCheckQ = 0, sumTestQty = 0, sumLossQty = 0; |
|
|
|
int sumCheckQ = 0, sumTestQty = 0, sumLossQty = 0; |
|
|
|
for (WorkPlanItem item : itemList) { |
|
|
|
for (WorkPlanItem item : itemList) { |
|
|
|
@ -2313,7 +2315,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
task.setReceiveDate(LocalDateTime.now()); |
|
|
|
task.setReceiveDate(LocalDateTime.now()); |
|
|
|
} |
|
|
|
} |
|
|
|
// checkResult 处理
|
|
|
|
// checkResult 处理
|
|
|
|
int checkResult = InspectionTaskConst.CHECK_RESULT_TODO; // 默认 数据库
|
|
|
|
checkResult = InspectionTaskConst.CHECK_RESULT_TODO; // 默认 数据库
|
|
|
|
if (countToDo == 0) { // 未检验为0
|
|
|
|
if (countToDo == 0) { // 未检验为0
|
|
|
|
if (countOK == itemList.size()) { // 全部item 合格
|
|
|
|
if (countOK == itemList.size()) { // 全部item 合格
|
|
|
|
checkResult = InspectionTaskConst.CHECK_RESULT_OK; |
|
|
|
checkResult = InspectionTaskConst.CHECK_RESULT_OK; |
|
|
|
@ -2342,6 +2344,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
task.setStatus(checkResult); |
|
|
|
task.setStatus(checkResult); |
|
|
|
// 更新
|
|
|
|
// 更新
|
|
|
|
updateById(task); |
|
|
|
updateById(task); |
|
|
|
|
|
|
|
} |
|
|
|
// 如果检验任务结果不合格,创建 生产处置单
|
|
|
|
// 如果检验任务结果不合格,创建 生产处置单
|
|
|
|
if (checkResult == InspectionTaskConst.CHECK_RESULT_NG) { |
|
|
|
if (checkResult == InspectionTaskConst.CHECK_RESULT_NG) { |
|
|
|
addRsSheet(id); |
|
|
|
addRsSheet(id); |
|
|
|
@ -2510,7 +2513,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
sub.put("partCode", sjCompleteVO.getPartCode());//零件号
|
|
|
|
sub.put("partCode", sjCompleteVO.getPartCode());//零件号
|
|
|
|
sub.put("material", sjCompleteVO.getMaterial());//材料
|
|
|
|
sub.put("material", sjCompleteVO.getMaterial());//材料
|
|
|
|
sub.put("plate", sjCompleteVO.getPlate());//镀种
|
|
|
|
sub.put("plate", sjCompleteVO.getPlate());//镀种
|
|
|
|
sub.put("poArea",sjCompleteVO.getYpArea());//面积
|
|
|
|
sub.put("poArea", sjCompleteVO.getYpArea());//面积
|
|
|
|
sunPrWorkOrderList.add(sub); |
|
|
|
sunPrWorkOrderList.add(sub); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|