|
@@ -13,6 +13,7 @@ import com.iamberry.rst.faces.cm.CompanyInfoService;
|
|
import com.iamberry.rst.faces.cm.SalesOrderService;
|
|
import com.iamberry.rst.faces.cm.SalesOrderService;
|
|
import com.iamberry.rst.faces.cm.StoreInfoService;
|
|
import com.iamberry.rst.faces.cm.StoreInfoService;
|
|
import com.iamberry.rst.faces.order.EfastOrderService;
|
|
import com.iamberry.rst.faces.order.EfastOrderService;
|
|
|
|
+import com.iamberry.rst.faces.order.LogisticsInfoService;
|
|
import com.iamberry.rst.faces.order.OrderBatchService;
|
|
import com.iamberry.rst.faces.order.OrderBatchService;
|
|
import com.iamberry.rst.faces.product.ProductService;
|
|
import com.iamberry.rst.faces.product.ProductService;
|
|
import com.iamberry.rst.utils.AdminUtils;
|
|
import com.iamberry.rst.utils.AdminUtils;
|
|
@@ -66,6 +67,8 @@ public class AdminSalesOrderController {
|
|
private ProductService productService ;
|
|
private ProductService productService ;
|
|
@Autowired
|
|
@Autowired
|
|
private GenerateKeyUtil generateKeyUtil ;
|
|
private GenerateKeyUtil generateKeyUtil ;
|
|
|
|
+ @Autowired
|
|
|
|
+ private LogisticsInfoService logisticsInfoService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 分页查询订单列表信息
|
|
* 分页查询订单列表信息
|
|
@@ -97,6 +100,7 @@ public class AdminSalesOrderController {
|
|
pagedResult.setTotal(totalNum);
|
|
pagedResult.setTotal(totalNum);
|
|
}
|
|
}
|
|
List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
|
|
List<StoreInfo> listStoreInfo = storeInfoService.listStore(new StoreInfo());
|
|
|
|
+ List<LogisticsInfo> logisticsInfoList = logisticsInfoService.getLogisticsInfoList(new LogisticsInfo());
|
|
salesOrder.setSalesOrderItemList(null);
|
|
salesOrder.setSalesOrderItemList(null);
|
|
|
|
|
|
StitchAttrUtil.getSa()
|
|
StitchAttrUtil.getSa()
|
|
@@ -104,6 +108,7 @@ public class AdminSalesOrderController {
|
|
.setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
|
|
.setModelAndView(salesOrder, mv, "/admin/salesOrder/list_order_page", pagedResult);
|
|
|
|
|
|
mv.addObject("listStoreInfo",listStoreInfo);
|
|
mv.addObject("listStoreInfo",listStoreInfo);
|
|
|
|
+ mv.addObject("logisticsInfoList",logisticsInfoList);
|
|
mv.addObject("identity",identity);
|
|
mv.addObject("identity",identity);
|
|
return mv;
|
|
return mv;
|
|
}
|
|
}
|
|
@@ -963,4 +968,40 @@ public class AdminSalesOrderController {
|
|
return rj;
|
|
return rj;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 分配快递方式
|
|
|
|
+ * @param request
|
|
|
|
+ * @return
|
|
|
|
+ * @throws Exception
|
|
|
|
+ */
|
|
|
|
+ @ResponseBody
|
|
|
|
+ @RequestMapping("/distribution_express")
|
|
|
|
+ @RequiresPermissions("salesOrder:distribution:express")
|
|
|
|
+ public ResponseJson distributionExpress(HttpServletRequest request,Integer[] salesOrderIds,String orderExpress) throws Exception {
|
|
|
|
+ ResponseJson rj = ResponseJson.getFAILURE();
|
|
|
|
+ Integer flag = 0;
|
|
|
|
+ String errorId = "";
|
|
|
|
+ for (Integer salesIds:salesOrderIds) {
|
|
|
|
+ SalesOrder so = new SalesOrder();
|
|
|
|
+ so.setSalesId(salesIds);
|
|
|
|
+ so.setSalesPostFirm(orderExpress);
|
|
|
|
+ try{
|
|
|
|
+ flag = salesOrderService.distributionExpress(so);
|
|
|
|
+ }catch (Exception e){
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ if(flag < 1){
|
|
|
|
+ errorId += salesIds + ",";
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(errorId.length() > 0){
|
|
|
|
+ rj.addResponseKeyValue("errorId",errorId);
|
|
|
|
+ return rj;
|
|
|
|
+ }
|
|
|
|
+ rj = new ResponseJson(200, "分配发货方式成功", 200);
|
|
|
|
+ return rj;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|