mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 05:42:06 +08:00
1、装配清单部件列表增加orderIds的过滤影响;2、cad拆单部件层级异常累加修复;
This commit is contained in:
+6
-1
@@ -79,7 +79,9 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 查询入参部件
|
// 查询入参部件
|
||||||
List<OrderComponentDO> componentDOS = orderComponentMapper.selectByIds(componentIds);
|
List<OrderComponentDO> componentDOS = orderComponentMapper.selectList(new LambdaUpdateWrapper<OrderComponentDO>()
|
||||||
|
.in(OrderComponentDO::getId, componentIds)
|
||||||
|
.in(OrderComponentDO::getOrderId, reqVO.getOrderIds()));
|
||||||
if (CollUtil.isEmpty(componentDOS) || componentDOS.size() != componentIds.size()) {
|
if (CollUtil.isEmpty(componentDOS) || componentDOS.size() != componentIds.size()) {
|
||||||
throw new ServiceException(ORDER_COMPONENT_NOT_EXIST);
|
throw new ServiceException(ORDER_COMPONENT_NOT_EXIST);
|
||||||
}
|
}
|
||||||
@@ -117,6 +119,9 @@ public class AssemblyListServiceImpl implements AssemblyListService {
|
|||||||
List<String> topComponentNames = orderComponentTreeRespVOS.stream().map(OrderComponentTreeCompareVO::getName).distinct().toList();
|
List<String> topComponentNames = orderComponentTreeRespVOS.stream().map(OrderComponentTreeCompareVO::getName).distinct().toList();
|
||||||
|
|
||||||
// 根据名称查询组织装配设置
|
// 根据名称查询组织装配设置
|
||||||
|
if (CollUtil.isEmpty(topComponentNames)) {
|
||||||
|
return orderComponentTreeRespVOS;
|
||||||
|
}
|
||||||
CommonResult<List<AssemblyConfigRespDTO>> assemblyConfigByComponentNameListResult = assemblyConfigApi.getAssemblyConfigByPartNameList(topComponentNames);
|
CommonResult<List<AssemblyConfigRespDTO>> assemblyConfigByComponentNameListResult = assemblyConfigApi.getAssemblyConfigByPartNameList(topComponentNames);
|
||||||
if(assemblyConfigByComponentNameListResult.isError()) {
|
if(assemblyConfigByComponentNameListResult.isError()) {
|
||||||
throw new ServiceException(ORDER_COMPONENT_ASSEMBLY_CONFIG_QUERY_ERROR);
|
throw new ServiceException(ORDER_COMPONENT_ASSEMBLY_CONFIG_QUERY_ERROR);
|
||||||
|
|||||||
+1
-1
@@ -1824,7 +1824,7 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
reader.startArray();
|
reader.startArray();
|
||||||
while (reader.hasNext()) {
|
while (reader.hasNext()) {
|
||||||
// 递归子节点
|
// 递归子节点
|
||||||
processComponent(reader, componentId, topId, level); // 子节点在递归中生成组件DO
|
processComponent(reader, componentId, topId, level + 1); // 子节点在递归中生成组件DO
|
||||||
}
|
}
|
||||||
reader.endArray();
|
reader.endArray();
|
||||||
break;
|
break;
|
||||||
|
|||||||
+2
-2
@@ -579,9 +579,9 @@ public class WebCadOrderImportFactory {
|
|||||||
orderComponentDOS.add(componentDO);
|
orderComponentDOS.add(componentDO);
|
||||||
orderComponentBatchInsertWithinThreshold(orderComponentDOS, false);
|
orderComponentBatchInsertWithinThreshold(orderComponentDOS, false);
|
||||||
// 继续处理下级
|
// 继续处理下级
|
||||||
if (!componentGroupReqVO.getChildren().isEmpty()) {
|
if (CollUtil.isNotEmpty(componentGroupReqVO.getChildren())) {
|
||||||
for (WebCadDataComponentGroupReqVO children : componentGroupReqVO.getChildren()) {
|
for (WebCadDataComponentGroupReqVO children : componentGroupReqVO.getChildren()) {
|
||||||
createAndCacheComponent(children, componentId, topId, ++level);
|
createAndCacheComponent(children, componentId, topId, level + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user