|
@@ -19,6 +19,7 @@ import zs.payment.req.aftersales.AfterSalesOrderReq;
|
|
|
import zs.payment.req.aftersales.AfterSalesOrderTypeReq;
|
|
import zs.payment.req.aftersales.AfterSalesOrderTypeReq;
|
|
|
import zs.payment.resp.Result;
|
|
import zs.payment.resp.Result;
|
|
|
|
|
|
|
|
|
|
+import zs.payment.service.imseweishopexpress.ImsEweiShopExpressService;
|
|
|
import zs.payment.service.imseweishoporder.ImsEweiShopOrderService;
|
|
import zs.payment.service.imseweishoporder.ImsEweiShopOrderService;
|
|
|
import zs.payment.service.order.OrdersService;
|
|
import zs.payment.service.order.OrdersService;
|
|
|
import zs.payment.service.supply.order.OrderSupplyService;
|
|
import zs.payment.service.supply.order.OrderSupplyService;
|
|
@@ -51,6 +52,9 @@ public class PaySupplyServiceImpl implements PaySupplyService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ImsEweiShopOrderService imsEweiShopOrderService;
|
|
private ImsEweiShopOrderService imsEweiShopOrderService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private ImsEweiShopExpressService imsEweiShopExpressService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Result orderPayOnly(OrderPayReq req) {
|
|
public Result orderPayOnly(OrderPayReq req) {
|
|
@@ -182,7 +186,6 @@ public class PaySupplyServiceImpl implements PaySupplyService {
|
|
|
|
|
|
|
|
String resp = HttpUtil.restTemplatePost(prefixUrl + "/supplyapi/app/order/Logistic", params, headers);
|
|
String resp = HttpUtil.restTemplatePost(prefixUrl + "/supplyapi/app/order/Logistic", params, headers);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
JSONObject respJson = JSONObject.parseObject(resp);
|
|
JSONObject respJson = JSONObject.parseObject(resp);
|
|
|
if (respJson.getIntValue("code") != 0) {
|
|
if (respJson.getIntValue("code") != 0) {
|
|
|
return Result.fail(respJson.getString("msg"));
|
|
return Result.fail(respJson.getString("msg"));
|
|
@@ -190,24 +193,20 @@ public class PaySupplyServiceImpl implements PaySupplyService {
|
|
|
//获取物流信息
|
|
//获取物流信息
|
|
|
JSONArray array = respJson.getJSONArray("data");
|
|
JSONArray array = respJson.getJSONArray("data");
|
|
|
//获取物流中的物流编号+物流编码
|
|
//获取物流中的物流编号+物流编码
|
|
|
-
|
|
|
|
|
// 物流编号
|
|
// 物流编号
|
|
|
String expressNo = array.getJSONObject(0).getString("express_no");
|
|
String expressNo = array.getJSONObject(0).getString("express_no");
|
|
|
// 物流编码
|
|
// 物流编码
|
|
|
- String companyCode = array.getJSONObject(0).getString("company_code");
|
|
|
|
|
- // 公司
|
|
|
|
|
|
|
+// String companyCode = array.getJSONObject(0).getString("company_code");
|
|
|
|
|
+ // 公司 :申通
|
|
|
String companyName = array.getJSONObject(0).getString("company_name");
|
|
String companyName = array.getJSONObject(0).getString("company_name");
|
|
|
-
|
|
|
|
|
|
|
+ //根据公司查询自研系统内的物流编码
|
|
|
|
|
+ String express= imsEweiShopExpressService.getExpressByName(companyName);
|
|
|
OrderExpressUpdateDTO dto = new OrderExpressUpdateDTO();
|
|
OrderExpressUpdateDTO dto = new OrderExpressUpdateDTO();
|
|
|
dto.setOrdersn(orderSn);
|
|
dto.setOrdersn(orderSn);
|
|
|
dto.setExpressNo(expressNo);
|
|
dto.setExpressNo(expressNo);
|
|
|
- dto.setCompanyCode(companyCode);
|
|
|
|
|
|
|
+ dto.setCompanyCode(express);
|
|
|
dto.setCompanyName(companyName);
|
|
dto.setCompanyName(companyName);
|
|
|
-
|
|
|
|
|
Boolean b = imsEweiShopOrderService.updateExpressByOrdersn(dto);
|
|
Boolean b = imsEweiShopOrderService.updateExpressByOrdersn(dto);
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
return Result.success(b);
|
|
return Result.success(b);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|