Merge remote-tracking branch 'origin/master-hlq-20240927sapMsg' into test
This commit is contained in:
commit
8fddd3d864
|
|
@ -3,6 +3,7 @@ package com.nflg.product.bomnew.service;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
|
|
@ -79,6 +80,7 @@ public class BomNewEbomExportToSAP {
|
|||
sapDto.setI_EMPNO(root.getCreatedBy());
|
||||
sapDto.setT1(Convert.toList(T1DTO.class, this.children.stream().filter(c -> !c.isIgnore()).collect(Collectors.toList())));
|
||||
liErrMsg = SpringUtil.getBean(SapOpUtilService.class).importToSapV2(sapDto, null);
|
||||
this.tempHandleSapErrMsg(liErrMsg);
|
||||
if (CollUtil.isEmpty(liErrMsg)) {
|
||||
state = SapStatusEnum.PUB_SUCCESS;
|
||||
} else if (sapDto.getT1().size() != liErrMsg.size()) {
|
||||
|
|
@ -102,6 +104,18 @@ public class BomNewEbomExportToSAP {
|
|||
return liErrMsg;
|
||||
}
|
||||
|
||||
// 乔生要求,临时处理EBOM导入SAP报错情况:SAP信息含有“在工厂1010中未被维护”,不算报错
|
||||
// 后面可能取消掉
|
||||
private void tempHandleSapErrMsg(List<OperationErrorMsgVO> liErrMsg) {
|
||||
if (CollUtil.isEmpty(liErrMsg)) {
|
||||
return;
|
||||
}
|
||||
List<OperationErrorMsgVO> filterList = liErrMsg.stream().filter(item -> ObjectUtil.isNotEmpty(item.msg) && item.msg.contains("在工厂1010中未被维护")).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(filterList)) {
|
||||
liErrMsg.removeAll(filterList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建child数据发包编号
|
||||
* @param p 上级节点的parent
|
||||
|
|
|
|||
Loading…
Reference in New Issue