|
|
|
@ -248,10 +248,13 @@ public class ProOrderServiceImpl implements IProOrderService {
|
|
|
|
|
//获取当前所选工厂
|
|
|
|
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
|
|
|
|
String key = "#header.poolName";
|
|
|
|
|
sapqo.setFactoryCode(request.getHeader(key.substring(8)));
|
|
|
|
|
sapqo.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_",""));
|
|
|
|
|
|
|
|
|
|
R<List<SapProOrder>> rSapProOrder = remoteSapService.shopOrderSync(sapqo);
|
|
|
|
|
List<SapProOrder> newOrders = rSapProOrder.getData();
|
|
|
|
|
if(CollectionUtils.isEmpty(newOrders)){
|
|
|
|
|
return AjaxResult.error("无"+sapqo.getCreateTime()+"之后的最新订单");
|
|
|
|
|
}
|
|
|
|
|
ProOrder proOrder = null;
|
|
|
|
|
for (SapProOrder sapProOrder : newOrders) {
|
|
|
|
|
//工单下达后整个订单就被锁定//订单存在就更新,不存在就插入
|
|
|
|
|