|
@@ -715,6 +715,10 @@ public class ChangeOrderLogic {
|
|
AdminWebsit adminWebsit = adminWebsitMap.get(websitId);
|
|
AdminWebsit adminWebsit = adminWebsitMap.get(websitId);
|
|
Region region = orderBaseLogic.getRegion(pName, cName, aName, sName);
|
|
Region region = orderBaseLogic.getRegion(pName, cName, aName, sName);
|
|
|
|
|
|
|
|
+
|
|
|
|
+ List<WebsitDispatch> list = websitDispatchService.lambdaQuery().eq(WebsitDispatch::getStreetCode, region.getId())
|
|
|
|
+ .list();
|
|
|
|
+
|
|
if (region == null)
|
|
if (region == null)
|
|
throw new RemoteServiceException(pName+cName+aName+sName+"该地址查找不到");
|
|
throw new RemoteServiceException(pName+cName+aName+sName+"该地址查找不到");
|
|
|
|
|
|
@@ -749,19 +753,16 @@ public class ChangeOrderLogic {
|
|
websitDispatch.setSaleTypeName(saleOne.getDictValue());
|
|
websitDispatch.setSaleTypeName(saleOne.getDictValue());
|
|
websitDispatch.setSaleTypeId(saleOne.getDictCode());
|
|
websitDispatch.setSaleTypeId(saleOne.getDictCode());
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- WebsitDispatch websitDispatch1 = websitDispatchService.lambdaQuery().eq(WebsitDispatch::getStreetCode, region.getId())
|
|
|
|
- .eq(WebsitDispatch::getOrderSmallId, websitDispatch.getOrderSmallId())
|
|
|
|
- .eq(WebsitDispatch::getCategoryId, websitDispatch.getCategoryId())
|
|
|
|
- .eq(WebsitDispatch::getSaleTypeId, websitDispatch.getSaleTypeId()).last("limit 1").one();
|
|
|
|
- if (websitDispatch1 != null) {
|
|
|
|
- websitDispatch.setId(websitDispatch1.getId());
|
|
|
|
|
|
+ List<WebsitDispatch> websitDispatchList = list.stream().filter(item -> item.getOrderSmallId().equals(websitDispatch.getOrderSmallId()) &&
|
|
|
|
+ item.getCategoryId().equals(websitDispatch.getCategoryId()) &&
|
|
|
|
+ item.getSaleTypeId().equals(websitDispatch.getSaleTypeId())
|
|
|
|
+ ).collect(Collectors.toList());
|
|
|
|
+ if (CollectionUtils.isNotEmpty(websitDispatchList)) {
|
|
|
|
+ websitDispatch.setId(websitDispatchList.get(0).getId());
|
|
websitDispatcheUps.add(websitDispatch);
|
|
websitDispatcheUps.add(websitDispatch);
|
|
- }else {
|
|
|
|
-
|
|
|
|
- websitDispatches.add(websitDispatch);
|
|
|
|
- }
|
|
|
|
|
|
+ }else {
|
|
|
|
+ websitDispatches.add(websitDispatch);
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|