fix: 修复导入到SAP时判断T项是否存在的逻辑错误
This commit is contained in:
parent
a536808643
commit
61a77eb542
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
|
@ -148,8 +147,7 @@ public class BomNewEbomExportToSAP {
|
|||
}
|
||||
|
||||
private void addToT1(T1ExtDTO dto) {
|
||||
if (StrUtil.equals(dto.getPOSTP(), BomConstant.PROJECT_TYPE_TEMPORARY)
|
||||
|| children.stream().noneMatch(c -> Objects.equals(c.getChildRowId(), dto.getChildRowId()))) {
|
||||
if (children.stream().noneMatch(c -> Objects.equals(c.getChildRowId(), dto.getChildRowId()))) {
|
||||
children.add(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -331,8 +331,7 @@ public class BomNewPbomExportToSAPImpl implements IBomNewPbomExportToSAP {
|
|||
}
|
||||
|
||||
private void addToT1(T1ExtDTO dto) {
|
||||
if (StrUtil.equals(dto.getPOSTP(), BomConstant.PROJECT_TYPE_TEMPORARY)
|
||||
|| children.stream().noneMatch(c -> Objects.equals(c.getChildRowId(), dto.getChildRowId()))) {
|
||||
if (children.stream().noneMatch(c -> Objects.equals(c.getChildRowId(), dto.getChildRowId()))) {
|
||||
children.add(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -407,8 +407,7 @@ public class DQBomService {
|
|||
List<T1ExtDTO> t1s = new ArrayList<>();
|
||||
String dateYMD = DateUtil.format(new Date(), "yyyyMMdd");
|
||||
datas.forEach(d -> {
|
||||
if (StrUtil.equals(BomConstant.PROJECT_TYPE_TEMPORARY, d.getProjectType())
|
||||
|| t1s.stream().noneMatch(c -> Objects.equals(c.getChildRowId(), d.getRowId()))) {
|
||||
if (t1s.stream().noneMatch(c -> Objects.equals(c.getChildRowId(), d.getRowId()))) {
|
||||
T1ExtDTO t1 = new T1ExtDTO();
|
||||
t1.setID(RandomUtil.randomNumbers(5));
|
||||
t1.setMATNR(d.getParentMaterialNo());
|
||||
|
|
|
|||
Loading…
Reference in New Issue