|
@@ -323,7 +323,7 @@ public class InspectionCaseServiceImpl implements IInspectionCaseService {
|
|
|
|
|
|
//查询对应流向信息
|
|
|
|
|
|
- List<InspectionCaseFlow> inspectionCaseFlowList = inspectionCaseFlowMapper.selectList(id);
|
|
|
+ List<InspectionCaseFlow> inspectionCaseFlowList = inspectionCaseFlowMapper.getList(id);
|
|
|
//转换类型
|
|
|
List<GetInspectionCaseInfoRes.FlowBean> flowBeanList = PojoConverterUtils.copyList(inspectionCaseFlowList, GetInspectionCaseInfoRes.FlowBean.class);
|
|
|
getInspectionCaseInfoRes.setFlowList(flowBeanList);
|
|
@@ -372,14 +372,19 @@ public class InspectionCaseServiceImpl implements IInspectionCaseService {
|
|
|
|
|
|
Long caseId = req.getCaseId();
|
|
|
String boxCode = req.getBoxCode();
|
|
|
- List<AssociatedWithCaseReq.FlowBean> reqFlowList = req.getFlowList();
|
|
|
+ //查询箱码信息
|
|
|
+ List<String> boxCodeList = Collections.singletonList(boxCode);
|
|
|
+ List<GetBoxCodeRes> flowInfoByBoxCodeList = this.getFlowInfoByBoxCodeList(boxCodeList);
|
|
|
+ GetBoxCodeRes getBoxCodeRes = flowInfoByBoxCodeList.get(0);
|
|
|
+
|
|
|
+ List<GetBoxCodeRes.FlowBean> reqFlowList = getBoxCodeRes.getFlowList();
|
|
|
//验证指定案件是否存在
|
|
|
InspectionCase inspectionCase = inspectionCaseMapper.selectById(caseId);
|
|
|
AssertUtil.isNull(inspectionCase, "指定案件不存在或已被删除!");
|
|
|
|
|
|
//验证SKU是否一致
|
|
|
String skuCode = inspectionCase.getSkuCode();
|
|
|
- AssertUtil.isMeets(req.getSkuCode(), s -> StrUtil.equals(s, skuCode), "当前箱码与指定案件SKU不一致!");
|
|
|
+ AssertUtil.isMeets(getBoxCodeRes.getSku().getSkuId(), s -> StrUtil.equals(s, skuCode), "当前箱码与指定案件SKU不一致!");
|
|
|
|
|
|
//验证当前箱码是否已经存在
|
|
|
QueryWrapper<InspectionCaseBoxCode> boxCodeQW = new QueryWrapper<>();
|
|
@@ -398,7 +403,7 @@ public class InspectionCaseServiceImpl implements IInspectionCaseService {
|
|
|
.collect(Collectors.toList());
|
|
|
//请求流向节点
|
|
|
List<Long> reqNodeIds = reqFlowList.stream()
|
|
|
- .map(AssociatedWithCaseReq.FlowBean::getNodeId)
|
|
|
+ .map(GetBoxCodeRes.FlowBean::getNodeId)
|
|
|
.collect(Collectors.toList());
|
|
|
|
|
|
|
|
@@ -418,7 +423,7 @@ public class InspectionCaseServiceImpl implements IInspectionCaseService {
|
|
|
//请求流向最小出库时间
|
|
|
LocalDateTime resOutStorageTime = reqFlowList.stream()
|
|
|
.filter(s -> Objects.nonNull(s.getOutStorageTime()))
|
|
|
- .min(Comparator.comparing(AssociatedWithCaseReq.FlowBean::getOutStorageTime))
|
|
|
+ .min(Comparator.comparing(GetBoxCodeRes.FlowBean::getOutStorageTime))
|
|
|
.get()
|
|
|
.getOutStorageTime();
|
|
|
|
|
@@ -493,7 +498,7 @@ public class InspectionCaseServiceImpl implements IInspectionCaseService {
|
|
|
List<GetBoxCodeRes> getBoxCodeResList = new ArrayList<>();
|
|
|
boxCodeList.forEach(s -> {
|
|
|
GetBoxCodeRes res = flowQueryService.getFlowInfoByBoxCode(s);
|
|
|
- AssertUtil.isNull(res, "案件新增失败!箱码:" + s + ",失败原因:未查询到此箱码信息!");
|
|
|
+ AssertUtil.isNull(res, "失败!箱码:" + s + ",失败原因:未查询到此箱码信息!");
|
|
|
getBoxCodeResList.add(res);
|
|
|
});
|
|
|
return getBoxCodeResList;
|