mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
webcad拆单新增部件房名、柜名
This commit is contained in:
+10
@@ -113,4 +113,14 @@ public class OrderComponentDO extends BaseDO {
|
|||||||
* 附加加工状态:不加工/部分加工(只有顶级)
|
* 附加加工状态:不加工/部分加工(只有顶级)
|
||||||
*/
|
*/
|
||||||
private Integer extraProcessStatus;
|
private Integer extraProcessStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 柜名
|
||||||
|
*/
|
||||||
|
private String bodyName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 房名
|
||||||
|
*/
|
||||||
|
private String roomName;
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-13
@@ -164,7 +164,7 @@ public class WebCadOrderImportFactory {
|
|||||||
private Map<Integer, WebCadDataGroupInfoReqVO> processGroupMap = new HashMap<>();
|
private Map<Integer, WebCadDataGroupInfoReqVO> processGroupMap = new HashMap<>();
|
||||||
|
|
||||||
// 部件缓存:{cad groupId:imes部件id}
|
// 部件缓存:{cad groupId:imes部件id}
|
||||||
private Map<Integer, Long> componentGroupMap = new HashMap<>();
|
private Map<Integer, OrderComponentDO> componentGroupMap = new HashMap<>();
|
||||||
|
|
||||||
private List<PlateDO> plateDOS = new ArrayList<>();
|
private List<PlateDO> plateDOS = new ArrayList<>();
|
||||||
private List<OrderItemDO> orderItemDOS = new ArrayList<>();
|
private List<OrderItemDO> orderItemDOS = new ArrayList<>();
|
||||||
@@ -266,6 +266,8 @@ public class WebCadOrderImportFactory {
|
|||||||
// 解析配件列表
|
// 解析配件列表
|
||||||
analyzeParts(webCadDataReqVO.getParts());
|
analyzeParts(webCadDataReqVO.getParts());
|
||||||
log.debug("====================【cad拆单解析配件结束】====================");
|
log.debug("====================【cad拆单解析配件结束】====================");
|
||||||
|
// 部件入库
|
||||||
|
orderComponentBatchInsertWithinThreshold(orderComponentDOS, true);
|
||||||
|
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, true);
|
orderItemBatchInsertWithinThreshold(orderItemDOS, true);
|
||||||
log.debug("====================【cad拆单全局保存开始】====================");
|
log.debug("====================【cad拆单全局保存开始】====================");
|
||||||
@@ -528,8 +530,6 @@ public class WebCadOrderImportFactory {
|
|||||||
for (OrderComponentTreeCompareVO root : roots) {
|
for (OrderComponentTreeCompareVO root : roots) {
|
||||||
createAndCacheComponent(root, null, null, 0);
|
createAndCacheComponent(root, null, null, 0);
|
||||||
}
|
}
|
||||||
// 部件入库
|
|
||||||
orderComponentBatchInsertWithinThreshold(orderComponentDOS, true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -808,10 +808,9 @@ public class WebCadOrderImportFactory {
|
|||||||
componentDO.setDeleted(false);
|
componentDO.setDeleted(false);
|
||||||
|
|
||||||
// 缓存部件
|
// 缓存部件
|
||||||
componentGroupMap.put(cadGroupId, componentId);
|
componentGroupMap.put(cadGroupId, componentDO);
|
||||||
// 部件入库
|
// 部件入库
|
||||||
orderComponentDOS.add(componentDO);
|
orderComponentDOS.add(componentDO);
|
||||||
orderComponentBatchInsertWithinThreshold(orderComponentDOS, false);
|
|
||||||
// 继续处理下级
|
// 继续处理下级
|
||||||
if (CollUtil.isNotEmpty(componentGroupReqVO.getChildren())) {
|
if (CollUtil.isNotEmpty(componentGroupReqVO.getChildren())) {
|
||||||
for (OrderComponentTreeCompareVO children : componentGroupReqVO.getChildren()) {
|
for (OrderComponentTreeCompareVO children : componentGroupReqVO.getChildren()) {
|
||||||
@@ -1494,9 +1493,9 @@ public class WebCadOrderImportFactory {
|
|||||||
Integer cadGroupId = block.getComponentId();
|
Integer cadGroupId = block.getComponentId();
|
||||||
Long plateComponentId = null;
|
Long plateComponentId = null;
|
||||||
if (ObjectUtil.isNotNull(cadGroupId)) {
|
if (ObjectUtil.isNotNull(cadGroupId)) {
|
||||||
Long componentId = componentGroupMap.get(cadGroupId);
|
OrderComponentDO component = componentGroupMap.get(cadGroupId);
|
||||||
if (ObjectUtil.isNotNull(componentId)) {
|
if (ObjectUtil.isNotNull(component)) {
|
||||||
plateComponentId = componentId;
|
plateComponentId = component.getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1736,9 +1735,9 @@ public class WebCadOrderImportFactory {
|
|||||||
List<Integer> cadGroupIds = part.getComponentIds();
|
List<Integer> cadGroupIds = part.getComponentIds();
|
||||||
List<Long> partComponentIds = new ArrayList<>();
|
List<Long> partComponentIds = new ArrayList<>();
|
||||||
for (Integer cadGroupId : cadGroupIds) {
|
for (Integer cadGroupId : cadGroupIds) {
|
||||||
Long componentId = componentGroupMap.get(cadGroupId);
|
OrderComponentDO componentDO = componentGroupMap.get(cadGroupId);
|
||||||
if (ObjectUtil.isNotNull(componentId)) {
|
if (ObjectUtil.isNotNull(componentDO)) {
|
||||||
partComponentIds.add(componentId);
|
partComponentIds.add(componentDO.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2338,13 +2337,16 @@ public class WebCadOrderImportFactory {
|
|||||||
update_time,
|
update_time,
|
||||||
deleted,
|
deleted,
|
||||||
level,
|
level,
|
||||||
extra_process_status
|
extra_process_status,
|
||||||
|
body_name,
|
||||||
|
room_name
|
||||||
) VALUES (
|
) VALUES (
|
||||||
?,?,?,?,?,?,
|
?,?,?,?,?,?,
|
||||||
?,?,?,?,
|
?,?,?,?,
|
||||||
?,?,?,?,
|
?,?,?,?,
|
||||||
?,?,?,
|
?,?,?,
|
||||||
?,?,?
|
?,?,?,
|
||||||
|
?,?
|
||||||
)
|
)
|
||||||
""";
|
""";
|
||||||
jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() {
|
jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() {
|
||||||
@@ -2389,6 +2391,8 @@ public class WebCadOrderImportFactory {
|
|||||||
} else {
|
} else {
|
||||||
ps.setNull(20, Types.INTEGER);
|
ps.setNull(20, Types.INTEGER);
|
||||||
}
|
}
|
||||||
|
ps.setString(21, item.getBodyName());
|
||||||
|
ps.setString(22, item.getRoomName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user