|
@@ -5,6 +5,7 @@ import com.iamberry.rst.core.cm.SalesOrder;
|
|
|
import com.iamberry.rst.core.cm.SalesOrderItem;
|
|
|
import com.iamberry.rst.core.cm.StoreShip;
|
|
|
import com.iamberry.rst.core.order.EOrderRequestData;
|
|
|
+import com.iamberry.rst.core.order.PostInfo;
|
|
|
import com.iamberry.rst.core.page.PagedResult;
|
|
|
import com.iamberry.rst.core.tools.LogisticsInfo;
|
|
|
import com.iamberry.rst.faces.cm.SalesOrderService;
|
|
@@ -82,40 +83,30 @@ public class AwaitSendController {
|
|
|
temp.setSalesOrderItemList(salesOrderService.listSalesOrderItem(item));
|
|
|
}
|
|
|
}
|
|
|
- List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
|
|
|
- Integer status = salesOrder.getSalesShippingStatus();
|
|
|
- salesOrder.setSalesShippingStatus(11);
|
|
|
- PagedResult<SalesOrder> pagedResults = salesOrderService.listSalesOrderPage(1, 10000, salesOrder,totalNum == 0);
|
|
|
- salesOrder.setSalesShippingStatus(status);
|
|
|
int errorOrderNum = 0;
|
|
|
// 聚合打单方式
|
|
|
- Map<String, List<SalesOrder>> postMap = new HashMap<>();
|
|
|
- if (pagedResults != null && pagedResults.getDataList() != null && !pagedResults.getDataList().isEmpty()) {
|
|
|
- for (SalesOrder temp : pagedResults.getDataList()) {
|
|
|
+ Map<String, Integer> postMap = new HashMap<>();
|
|
|
+ List<PostInfo> postInfos = salesOrderService.listWaitPrintOrderNum();
|
|
|
+ if (postInfos != null && !postInfos.isEmpty()) {
|
|
|
+ for (PostInfo temp : postInfos) {
|
|
|
LogisticsInfo info = new LogisticsInfo();
|
|
|
- info.setLogisticsRstCode(temp.getSalesPostFirm());
|
|
|
+ info.setLogisticsRstCode(temp.getPostFirm());
|
|
|
List<LogisticsInfo> logisticsInfos = salesOrderService.getLogisticsInfo(info);
|
|
|
if (logisticsInfos == null || logisticsInfos.size() <= 0) {
|
|
|
errorOrderNum ++;
|
|
|
continue;
|
|
|
}
|
|
|
String key = logisticsInfos.get(0).getLogisticsName();
|
|
|
- List<SalesOrder> list = postMap.get(key);
|
|
|
- if (list == null) {
|
|
|
- list = new ArrayList<>();
|
|
|
- postMap.put(key, list);
|
|
|
- }
|
|
|
- list.add(temp);
|
|
|
+ postMap.put(key, temp.getNumber());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
salesOrder.setSalesOrderItemList(null);
|
|
|
ModelAndView mv = new ModelAndView("order/salesOrder/list_wait_send_order");
|
|
|
StitchAttrUtil.getSa()
|
|
|
.addDatePro("yyyy-MM-dd HH:mm:ss","startDate","endDate")
|
|
|
.setModelAndView(salesOrder, mv, "/admin/await_send/listAwaitSendOrder", pagedResult);
|
|
|
mv.addObject("req",salesOrder);
|
|
|
- mv.addObject("logisticsInfoList",logisticsInfoList);
|
|
|
+ mv.addObject("logisticsInfoList",logisticsInfoService.getLogisticsInfoList(new LogisticsInfo()));
|
|
|
mv.addObject("postMap", postMap);
|
|
|
mv.addObject("errorOrderNum", errorOrderNum);
|
|
|
return mv;
|