|
@@ -665,14 +665,16 @@ public class BizProcessInspecionController extends BaseController {
|
|
|
throw new RuntimeException("该批次不需要外协检查");
|
|
|
}
|
|
|
// 现在先不考虑 审核通过后才能外协检查限制先放到下一迭代 20240625
|
|
|
-// if (detailList.stream().noneMatch(detail -> detail.getIsAudit().equals(1) && detail.getStatus().equals(1))) {
|
|
|
-// throw new RuntimeException("该批次需要审核通过后才能外协检查");
|
|
|
-// }
|
|
|
+// 20240703 加回去
|
|
|
+ if (detailList.stream().noneMatch(detail -> detail.getIsAudit().equals(1) && detail.getStatus().equals(1))) {
|
|
|
+ throw new RuntimeException("该批次需要审核通过后才能外协检查");
|
|
|
+ }
|
|
|
detailList = detailList.stream()
|
|
|
.filter(detail -> processCodes.stream().anyMatch(l -> l.trim().equals(detail.getProcessCode())) &&
|
|
|
detail.getIsAudit().equals(1)
|
|
|
// 现在先不考虑 审核通过后才能外协检查限制先放到下一迭代 20240625
|
|
|
-// && detail.getStatus().equals(1)
|
|
|
+// 20240703加回去
|
|
|
+ && detail.getStatus().equals(1)
|
|
|
)
|
|
|
.collect(Collectors.toList());
|
|
|
//如果有多道工序,则根据工序的排序找到最后一条
|