Merge pull request 'demand: 组树添加南京分拨中心、柯桥分拨中心' (#85) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/85
This commit is contained in:
commit
efb0c19764
@ -4134,6 +4134,28 @@ public class EmisBaseService {
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<EmisTransPlanRule> toAdd = new ArrayList<>();
|
||||
for (EmisTransPlanRule node : topLevelNodes) {
|
||||
// 柯桥市场部
|
||||
if ("25001".equals(node.getStartSiteCode())) {
|
||||
EmisTransPlanRule copyRule = new EmisTransPlanRule();
|
||||
BeanUtils.copyProperties(node, copyRule);
|
||||
copyRule.setStartSiteCode("25000");
|
||||
toAdd.add(copyRule);
|
||||
continue;
|
||||
}
|
||||
// 南京市场部
|
||||
if ("57502".equals(node.getStartSiteCode())) {
|
||||
EmisTransPlanRule copyRule = new EmisTransPlanRule();
|
||||
BeanUtils.copyProperties(node, copyRule);
|
||||
copyRule.setStartSiteCode("57501");
|
||||
toAdd.add(copyRule);
|
||||
}
|
||||
}
|
||||
if (!toAdd.isEmpty()) {
|
||||
topLevelNodes.addAll(toAdd);
|
||||
}
|
||||
|
||||
// 将顶级节点直接添加到结果中(进行深度复制)
|
||||
for (EmisTransPlanRule node : topLevelNodes) {
|
||||
result.add(deepCopyNode(node));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user