采购单同步

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent 393201cf57
commit 891ddeb34c

@ -46,6 +46,8 @@ public class RsyncDdOrdersAndPurchaseOrdersService extends SPIBaseService implem
public BaseResponse<Ret> handle(BaseRequest<RsyncDdOrdersAndPurchaseOrdersRequestDTO> req) {
initHandle(req);
Map retMap = new HashMap();
try {
String orderIdsStr = req.getData().getOrderIds();
String sourceOrderIdsStr = req.getData().getSourceOrderIds();
@ -82,8 +84,10 @@ public class RsyncDdOrdersAndPurchaseOrdersService extends SPIBaseService implem
if (!StringUtils.isEmpty(orderIdsStr)) {
RsyncOpOrderByOrderIdsResultDTO reynsRet = opOrderService.rsyncOpOrderByOrderIds(shopId, orderIds);
if (reynsRet.getOrderIdAndFailReasonMap().size() > 0) {
String reason = String.join(";", reynsRet.getOrderIdAndFailReasonMap().values());
return R.ok(Ret.fail(reason));
// String reason = String.join(";", reynsRet.getOrderIdAndFailReasonMap().values());
// return R.ok(Ret.fail(reason));
retMap.put("orderIdAndErrorMap", reynsRet.getOrderIdAndFailReasonMap());
return R.ok(Ret.success(retMap));
}
}
@ -124,8 +128,7 @@ public class RsyncDdOrdersAndPurchaseOrdersService extends SPIBaseService implem
}
}
Map retMap = new HashMap();
retMap.put("rsyncPurchaseOrderInfo", purchaseOrderListMap);
retMap.put("orderIdAndPurchaseOrderListMap", purchaseOrderListMap);
return R.ok(Ret.success(retMap));
} catch (Exception e) {
log.error("同步分销采购单失败,原因:" + e.getMessage());

Loading…
Cancel
Save