优化请购单转换采购订单批处理逻辑

This commit is contained in:
张明 2025-05-30 10:32:02 +08:00
parent 9f109aeaaf
commit be210c469f
1 changed files with 2 additions and 0 deletions

View File

@ -198,11 +198,13 @@ public class BatchTransferToPurchaseOrder implements IBackgroundWorkPlugin {
AppInfoContext.setBtnCode("Save");
SCMScriptResultDTO scriptResult = ((IBatchRunScriptService) NCLocator.getInstance().lookup(IBatchRunScriptService.class)).runBacth(cloudContext, OrderVO.class);
AbstractBill[] sucessVOs = scriptResult.getSucessVOs();
// TODO sucessVOs 获取成功保存的采购订单 但是无法保存 无法获取 暂时无法测试
Map<Integer, String> errorMessageMap = scriptResult.getErrorMessageMap();
if (!errorMessageMap.isEmpty()) {
errorMessageMap.keySet().forEach(key -> {
String errMsg = errorMessageMap.get(key);
if (errMsg.isEmpty()) return;
// TODO 此处逻辑有问题 采购订单转换 不成功的需要和错误信息一一对应后 才能设置错误信息
OrderVO orderVO = orderVOs[key];
// ¸øµ¥¾ÝÉèÖôíÎóÐÅÏ¢
orderVO.getHVO().setVdef30(errMsg);