|
@@ -661,11 +661,16 @@ public class BizProcessInspecionController extends BaseController {
|
|
if (detailList.stream().noneMatch(detail -> processCodes.stream().anyMatch(l -> l.trim().equals(detail.getProcessCode())))) {
|
|
if (detailList.stream().noneMatch(detail -> processCodes.stream().anyMatch(l -> l.trim().equals(detail.getProcessCode())))) {
|
|
throw new RuntimeException("该批次不需要外协检查");
|
|
throw new RuntimeException("该批次不需要外协检查");
|
|
}
|
|
}
|
|
- if (detailList.stream().noneMatch(detail -> detail.getIsAudit().equals(1) && detail.getStatus().equals(1))) {
|
|
|
|
- throw new RuntimeException("该批次需要审核通过后才能外协检查");
|
|
|
|
- }
|
|
|
|
|
|
+// 现在先不考虑 审核通过后才能外协检查限制先放到下一迭代 20240625
|
|
|
|
+// if (detailList.stream().noneMatch(detail -> detail.getIsAudit().equals(1) && detail.getStatus().equals(1))) {
|
|
|
|
+// throw new RuntimeException("该批次需要审核通过后才能外协检查");
|
|
|
|
+// }
|
|
detailList = detailList.stream()
|
|
detailList = detailList.stream()
|
|
- .filter(detail -> processCodes.stream().anyMatch(l -> l.trim().equals(detail.getProcessCode())) && detail.getIsAudit().equals(1) && detail.getStatus().equals(1))
|
|
|
|
|
|
+ .filter(detail -> processCodes.stream().anyMatch(l -> l.trim().equals(detail.getProcessCode())) &&
|
|
|
|
+ detail.getIsAudit().equals(1)
|
|
|
|
+// 现在先不考虑 审核通过后才能外协检查限制先放到下一迭代 20240625
|
|
|
|
+// && detail.getStatus().equals(1)
|
|
|
|
+ )
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
//如果有多道工序,则根据工序的排序找到最后一条
|
|
//如果有多道工序,则根据工序的排序找到最后一条
|
|
if (detailList.size() > 1) {
|
|
if (detailList.size() > 1) {
|
|
@@ -896,6 +901,11 @@ public class BizProcessInspecionController extends BaseController {
|
|
if (bizProcessInspecion.getStatus().equals(0) && newCarriers.isEmpty()) {
|
|
if (bizProcessInspecion.getStatus().equals(0) && newCarriers.isEmpty()) {
|
|
return error("该序检未完成,不能解绑载具");
|
|
return error("该序检未完成,不能解绑载具");
|
|
}
|
|
}
|
|
|
|
+ List<BizCarrierReject> carrierRejects = bizProcessInspecion.getRejectCarrier();
|
|
|
|
+ List<BizCarrier> carriers = bizCarrierService.query().in("id", carrierRejects.isEmpty() ? Collections.singletonList(0L) : carrierRejects.stream().map(BizCarrierReject::getCarrierId).collect(Collectors.toList())).list();
|
|
|
|
+ carriers.forEach(l -> l.setIsAbandoned(1));
|
|
|
|
+ bizCarrierService.updateBatchById(carriers);
|
|
|
|
+ bizCarrierRejectService.saveBatch(carrierRejects);
|
|
bizDayworkCarriers.forEach(l -> l.setIsChanged(1));
|
|
bizDayworkCarriers.forEach(l -> l.setIsChanged(1));
|
|
bizDayworkCarrierService.updateBatchById(bizDayworkCarriers);
|
|
bizDayworkCarrierService.updateBatchById(bizDayworkCarriers);
|
|
if (newCarriers.isEmpty()) {
|
|
if (newCarriers.isEmpty()) {
|