|
@@ -4,6 +4,7 @@ import com.iamberry.rst.core.cm.SalesOrder;
|
|
import com.iamberry.rst.core.cm.SalesOrderItem;
|
|
import com.iamberry.rst.core.cm.SalesOrderItem;
|
|
import com.iamberry.rst.core.cm.StoreInfo;
|
|
import com.iamberry.rst.core.cm.StoreInfo;
|
|
import com.iamberry.rst.core.page.PagedResult;
|
|
import com.iamberry.rst.core.page.PagedResult;
|
|
|
|
+import com.iamberry.rst.core.tools.LogisticsInfo;
|
|
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;
|
|
@@ -310,7 +311,18 @@ public class AdminSalesOrderController {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
public String getPostCode(String firm) {
|
|
public String getPostCode(String firm) {
|
|
- String postCode = "";
|
|
|
|
|
|
+ if (firm == null || firm.equals("")) {
|
|
|
|
+ return "01";
|
|
|
|
+ }
|
|
|
|
+ LogisticsInfo logisticsInfo = new LogisticsInfo();
|
|
|
|
+ logisticsInfo.setLogisticsName(firm);
|
|
|
|
+ List<LogisticsInfo> listLogisticsInfo = salesOrderService.getLogisticsInfo(logisticsInfo);
|
|
|
|
+ if(listLogisticsInfo.size() > 0){
|
|
|
|
+ return listLogisticsInfo.get(0).getLogisticsRstCode();
|
|
|
|
+ }else{
|
|
|
|
+ return "01";
|
|
|
|
+ }
|
|
|
|
+ /*String postCode = "";
|
|
switch (firm) {
|
|
switch (firm) {
|
|
case "申通快递":postCode = "sto";break;
|
|
case "申通快递":postCode = "sto";break;
|
|
case "圆通快递":postCode = "yto";break;
|
|
case "圆通快递":postCode = "yto";break;
|
|
@@ -330,7 +342,7 @@ public class AdminSalesOrderController {
|
|
case "上门送货":postCode = "02";break;
|
|
case "上门送货":postCode = "02";break;
|
|
default:postCode = "sto";break;
|
|
default:postCode = "sto";break;
|
|
}
|
|
}
|
|
- return postCode;
|
|
|
|
|
|
+ return postCode;*/
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -503,7 +515,7 @@ public class AdminSalesOrderController {
|
|
String path = request.getServletContext().getRealPath(file);
|
|
String path = request.getServletContext().getRealPath(file);
|
|
boolean flag = ExcelUtil.readExcelNumber(path,maxNumber);
|
|
boolean flag = ExcelUtil.readExcelNumber(path,maxNumber);
|
|
if(!flag){
|
|
if(!flag){
|
|
- return "最大上传数量为一百条,请检查文档内的数据是否正常!";
|
|
|
|
|
|
+ return "最大上传数量为一百条,请检查文档内的数据是否符合条件!";
|
|
}
|
|
}
|
|
List<String> listString = ExcelUtil.readExcelHead(path);
|
|
List<String> listString = ExcelUtil.readExcelHead(path);
|
|
if(listString == null){
|
|
if(listString == null){
|