|
@@ -517,55 +517,66 @@ public class ChangeOrderLogic {
|
|
|
String categoryName = (String)row.get(8);
|
|
|
String sourceName = (String)row.get(9);
|
|
|
|
|
|
- AdminWebsit adminWebsit = adminWebsitMap.get(websitId);
|
|
|
+ String[] channelNames = channelName.split("/");
|
|
|
+ String[] smallNames = smallName.split("/");
|
|
|
+ String[] categoryNames = categoryName.split("/");
|
|
|
+ String[] sourceNames = sourceName.split("/");
|
|
|
|
|
|
+ AdminWebsit adminWebsit = adminWebsitMap.get(websitId);
|
|
|
Region region = orderBaseLogic.getRegion(pName, cName, aName, sName);
|
|
|
|
|
|
- SysDictCompany orderChanne = orderChannelMap.get(channelName);
|
|
|
-
|
|
|
- GoodsCategory goodsCategory = categoryMap1.get(categoryName);
|
|
|
-
|
|
|
- OrderSmallType orderSmallType = orderSmallTypeMap.get(smallName);
|
|
|
-
|
|
|
- SysDictCompany orderSource = orderSourceMap.get(sourceName);
|
|
|
-
|
|
|
- WebsitDispatch websitDispatch = new WebsitDispatch();
|
|
|
- websitDispatch.setWebsitId(adminWebsit.getWebsitId());
|
|
|
- websitDispatch.setWebsitName(adminWebsit.getName());
|
|
|
- websitDispatch.setProvinceCode(region.getProvinceCode());
|
|
|
- websitDispatch.setProvinceName(region.getProvinceName());
|
|
|
- websitDispatch.setCityCode(region.getCityCode());
|
|
|
- websitDispatch.setCityName(region.getCityName());
|
|
|
- websitDispatch.setAreaCode(region.getAreaCode());
|
|
|
- websitDispatch.setAreaName(region.getAreaName());
|
|
|
- websitDispatch.setStreetCode(region.getId());
|
|
|
- websitDispatch.setStreetName(region.getName());
|
|
|
- websitDispatch.setCompanyWechatId(adminUser.getCompanyWechatId());
|
|
|
- websitDispatch.setCompanyWechatName(adminUser.getCompanyName());
|
|
|
-
|
|
|
-
|
|
|
- websitDispatch.setOrderSmallTypeText(orderSmallType.getOrderSmallTypeText());
|
|
|
- websitDispatch.setOrderSmallId(orderSmallType.getId());
|
|
|
-
|
|
|
- websitDispatch.setCategoryId(goodsCategory.getCategoryId());
|
|
|
- websitDispatch.setCategoryName(goodsCategory.getName());
|
|
|
-
|
|
|
- websitDispatch.setDictCode(orderChanne.getDictCode());
|
|
|
- websitDispatch.setDictValue(orderChanne.getDictValue());
|
|
|
-
|
|
|
- websitDispatch.setOrderSource(orderSource.getDictValue());
|
|
|
- websitDispatch.setOrderSourceId(orderSource.getDictCode());
|
|
|
-
|
|
|
- if (websitDispatchService.lambdaQuery().eq(WebsitDispatch::getStreetCode,region.getId())
|
|
|
- .eq(WebsitDispatch::getOrderSmallId,websitDispatch.getOrderSmallId())
|
|
|
- .eq(WebsitDispatch::getCategoryId,websitDispatch.getCategoryId())
|
|
|
- .eq(WebsitDispatch::getDictCode,websitDispatch.getDictCode())
|
|
|
- .eq(WebsitDispatch::getOrderSourceId,websitDispatch.getOrderSourceId()).count() > 0) {
|
|
|
- throw new RemoteServiceException("存在街道:"+websitDispatch.getStreetName()+",产品大类:"+websitDispatch.getCategoryName()+
|
|
|
- ",工单渠道:"+websitDispatch.getDictValue()+",工单来源:"+websitDispatch.getOrderSource()+",工单类型:"+websitDispatch.getOrderSmallTypeText());
|
|
|
+ for (String channel : channelNames) {
|
|
|
+ SysDictCompany orderChanne = orderChannelMap.get(channel);
|
|
|
+ for (String small : smallNames) {
|
|
|
+ OrderSmallType orderSmallType = orderSmallTypeMap.get(small);
|
|
|
+ for (String category : categoryNames) {
|
|
|
+ GoodsCategory goodsCategory = categoryMap1.get(category);
|
|
|
+ for (String source : sourceNames) {
|
|
|
+
|
|
|
+ SysDictCompany orderSource = orderSourceMap.get(source);
|
|
|
+
|
|
|
+ WebsitDispatch websitDispatch = new WebsitDispatch();
|
|
|
+ websitDispatch.setWebsitId(adminWebsit.getWebsitId());
|
|
|
+ websitDispatch.setWebsitName(adminWebsit.getName());
|
|
|
+ websitDispatch.setProvinceCode(region.getProvinceCode());
|
|
|
+ websitDispatch.setProvinceName(region.getProvinceName());
|
|
|
+ websitDispatch.setCityCode(region.getCityCode());
|
|
|
+ websitDispatch.setCityName(region.getCityName());
|
|
|
+ websitDispatch.setAreaCode(region.getAreaCode());
|
|
|
+ websitDispatch.setAreaName(region.getAreaName());
|
|
|
+ websitDispatch.setStreetCode(region.getId());
|
|
|
+ websitDispatch.setStreetName(region.getName());
|
|
|
+ websitDispatch.setCompanyWechatId(adminUser.getCompanyWechatId());
|
|
|
+ websitDispatch.setCompanyWechatName(adminUser.getCompanyName());
|
|
|
+
|
|
|
+
|
|
|
+ websitDispatch.setOrderSmallTypeText(orderSmallType.getOrderSmallTypeText());
|
|
|
+ websitDispatch.setOrderSmallId(orderSmallType.getId());
|
|
|
+
|
|
|
+ websitDispatch.setCategoryId(goodsCategory.getCategoryId());
|
|
|
+ websitDispatch.setCategoryName(goodsCategory.getName());
|
|
|
+
|
|
|
+ websitDispatch.setDictCode(orderChanne.getDictCode());
|
|
|
+ websitDispatch.setDictValue(orderChanne.getDictValue());
|
|
|
+
|
|
|
+ websitDispatch.setOrderSource(orderSource.getDictValue());
|
|
|
+ websitDispatch.setOrderSourceId(orderSource.getDictCode());
|
|
|
+
|
|
|
+ if (websitDispatchService.lambdaQuery().eq(WebsitDispatch::getStreetCode,region.getId())
|
|
|
+ .eq(WebsitDispatch::getOrderSmallId,websitDispatch.getOrderSmallId())
|
|
|
+ .eq(WebsitDispatch::getCategoryId,websitDispatch.getCategoryId())
|
|
|
+ .eq(WebsitDispatch::getDictCode,websitDispatch.getDictCode())
|
|
|
+ .eq(WebsitDispatch::getOrderSourceId,websitDispatch.getOrderSourceId()).count() > 0) {
|
|
|
+ throw new RemoteServiceException("存在街道:"+websitDispatch.getStreetName()+",产品大类:"+websitDispatch.getCategoryName()+
|
|
|
+ ",工单渠道:"+websitDispatch.getDictValue()+",工单来源:"+websitDispatch.getOrderSource()+",工单类型:"+websitDispatch.getOrderSmallTypeText());
|
|
|
+ }
|
|
|
+
|
|
|
+ websitDispatches.add(websitDispatch);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- websitDispatches.add(websitDispatch);
|
|
|
|
|
|
}
|
|
|
|