mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增webcad生产单导入:1、移除封边条配件对应逻辑;2、新增封边条宽度通过系统配置匹配宽度值逻辑;
This commit is contained in:
+3
-2
@@ -15,6 +15,7 @@ public class ErrorCodeConstants {
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_ORGANID_EMPTY_ERROR = new ErrorCode(1_005_000_005, "导入失败:无法获取机构信息,请检查cadtoken是否配置正确");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_FAILED = new ErrorCode(1_005_000_006, "导入失败:请检查拆单数据");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_PLATE_NOT_EXIST_ERROR = new ErrorCode(1_005_000_007, "导入失败:板材对应失败,板材库中不存在对应板材【{}】");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_SEAL_NOT_EXIST_ERROR = new ErrorCode(1_005_000_008, "导入失败:封边条对应失败,配件库中不存在对应封边条【{}】");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_SAVEDATA_ERROR = new ErrorCode(1_005_000_009, "导入失败:数据保存异常,请检查拆单数据");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_SAVEDATA_ERROR = new ErrorCode(1_005_000_008, "导入失败:数据保存异常,请检查拆单数据");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_GET_ORG_SEALEDGE_ERROR = new ErrorCode(1_005_000_009, "导入失败:获取组织封边对应配置异常,请检查服务");
|
||||
public static final ErrorCode WEBCAD_ORDER_IMPORT_ORG_SEALEDGE_ANALYZE_ERROR = new ErrorCode(1_005_000_010, "导入失败:组织封边对应配置解析异常,请检查配置");
|
||||
}
|
||||
|
||||
+17
-4
@@ -58,16 +58,14 @@ public class WebCadDataPartsReqVO {
|
||||
|
||||
private String remark;
|
||||
|
||||
private String goodsId;
|
||||
|
||||
private String partId;
|
||||
|
||||
private Integer objectId;
|
||||
|
||||
private Long imesPartsId;
|
||||
|
||||
private List<WebCadDataBlockReqVO.GroupInfo> groupInfos = new ArrayList<>();
|
||||
|
||||
private GroupDataDTO groupData;
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class GroupInfo {
|
||||
@@ -77,6 +75,21 @@ public class WebCadDataPartsReqVO {
|
||||
private Double height;
|
||||
private Double depth;
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
public static class GroupDataDTO {
|
||||
@JsonProperty("size")
|
||||
private Integer size;
|
||||
@JsonProperty("material")
|
||||
private String material;
|
||||
@JsonProperty("boardName")
|
||||
private String boardName;
|
||||
@JsonProperty("thickness")
|
||||
private Integer thickness;
|
||||
@JsonProperty("color")
|
||||
private String color;
|
||||
}
|
||||
}
|
||||
|
||||
@NoArgsConstructor
|
||||
|
||||
+5
-5
@@ -16,13 +16,13 @@ import com.cf.imes.module.plan.dal.mysql.orderBody.OrderBodyMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderGroup.OrderGroupMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderItem.OrderItemMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderParts.OrderPartsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderParts.PartsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.plate.PlateGoodMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.plate.PlateMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.rawgoods.RawGoodsMapper;
|
||||
import com.cf.imes.module.plan.service.customplateno.CustomPlateNoGenerateService;
|
||||
import com.cf.imes.module.plan.service.order.OrderInputProcessor;
|
||||
import com.cf.imes.module.plan.service.orderImport.factory.WebCadOrderImportFactory;
|
||||
import com.cf.imes.module.system.api.systemconfig.SystemConfigApi;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
@@ -69,9 +69,6 @@ public class WebCadOrderImportServiceImpl implements WebCadOrderImportService {
|
||||
@Resource
|
||||
private OrderInputProcessor orderInputProcessor;
|
||||
|
||||
@Resource
|
||||
private PartsMapper partsMapper;
|
||||
|
||||
@Resource
|
||||
private OrderPartsMapper orderPartsMapper;
|
||||
|
||||
@@ -96,6 +93,9 @@ public class WebCadOrderImportServiceImpl implements WebCadOrderImportService {
|
||||
@Resource
|
||||
private DataSourceTransactionManager transactionManager;
|
||||
|
||||
@Resource
|
||||
private SystemConfigApi systemConfigApi;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void webCadOrderImport(WebCadDataReqVO webCadDataReqVO) {
|
||||
@@ -112,7 +112,7 @@ public class WebCadOrderImportServiceImpl implements WebCadOrderImportService {
|
||||
throw new ServiceException(ORDER_IMPORT_ORGAN_LOCK_ERROR);
|
||||
}
|
||||
WebCadOrderImportFactory webCadOrderImportFactory = new WebCadOrderImportFactory(organId, orderMapper, snowFlakeGenerator, orderBodyMapper, plateMapper, orderItemMapper, orderGroupMapper,
|
||||
idWorker, orderInputProcessor, partsMapper, orderPartsMapper, goodsMapper, rawGoodsMapper, plateGoodMapper, customPlateNoGenerateService, transactionManager);
|
||||
idWorker, orderInputProcessor, orderPartsMapper, goodsMapper, rawGoodsMapper, plateGoodMapper, customPlateNoGenerateService, transactionManager, systemConfigApi);
|
||||
webCadOrderImportFactory.analyzeTempData(webCadDataReqVO);
|
||||
} catch (ServiceException se) {
|
||||
throw se;
|
||||
|
||||
+125
-54
@@ -6,10 +6,14 @@ import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.excel.util.ListUtils;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.cf.imes.framework.common.exception.ErrorCode;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
|
||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.id.core.util.SnowflakeIdWorker3rd;
|
||||
import com.cf.imes.framework.mybatis.core.generator.SnowFlakeGenerator;
|
||||
import com.cf.imes.framework.mybatis.core.injector.BaseBatchMapper;
|
||||
@@ -30,7 +34,6 @@ import com.cf.imes.module.plan.dal.dataobject.orderBody.OrderBodyDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderGroup.OrderGroupDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderItem.OrderItemDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderParts.OrderPartsDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.orderParts.PartsDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.ordermodel.OrderModelDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.plate.PlateDO;
|
||||
import com.cf.imes.module.plan.dal.dataobject.plate.PlateGoodDO;
|
||||
@@ -41,13 +44,15 @@ import com.cf.imes.module.plan.dal.mysql.orderBody.OrderBodyMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderGroup.OrderGroupMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderItem.OrderItemMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderParts.OrderPartsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.orderParts.PartsMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.plate.PlateGoodMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.plate.PlateMapper;
|
||||
import com.cf.imes.module.plan.dal.mysql.rawgoods.RawGoodsMapper;
|
||||
import com.cf.imes.module.plan.service.customplateno.CustomPlateNoGenerateService;
|
||||
import com.cf.imes.module.plan.service.customplateno.vo.CustomPlateNoGenerateConfigVO;
|
||||
import com.cf.imes.module.plan.service.order.OrderInputProcessor;
|
||||
import com.cf.imes.module.system.api.systemconfig.SystemConfigApi;
|
||||
import com.cf.imes.module.system.api.systemconfig.dto.SystemConfigRespDTO;
|
||||
import com.cf.imes.module.system.api.systemconfig.dto.SystemConfigSealEdgeRespDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
@@ -56,6 +61,7 @@ import org.springframework.transaction.TransactionStatus;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -67,9 +73,10 @@ import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.WEBCAD_ORDER_IMPORT_GET_ORG_SEALEDGE_ERROR;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.WEBCAD_ORDER_IMPORT_ORG_SEALEDGE_ANALYZE_ERROR;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.WEBCAD_ORDER_IMPORT_PLATE_NOT_EXIST_ERROR;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.WEBCAD_ORDER_IMPORT_SAVEDATA_ERROR;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.WEBCAD_ORDER_IMPORT_SEAL_NOT_EXIST_ERROR;
|
||||
import static com.cf.imes.module.plan.enums.ErrorCodeConstants.WEBCAD_ORDER_NOT_EXISTS_ERROR;
|
||||
import static com.cf.imes.module.plan.service.order.OrderInputProcessor.ORDER_PLATE_MODEL;
|
||||
|
||||
@@ -102,7 +109,7 @@ public class WebCadOrderImportFactory {
|
||||
|
||||
private OrderInputProcessor orderInputProcessor;
|
||||
|
||||
private PartsMapper partsMapper;
|
||||
private SystemConfigApi systemConfigApi;
|
||||
|
||||
private OrderPartsMapper orderPartsMapper;
|
||||
|
||||
@@ -154,6 +161,7 @@ public class WebCadOrderImportFactory {
|
||||
private List<OrderModelDO> orderModelDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<RawGoodsDO> rawGoodsDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<GoodsDO> goodsDOS = ListUtils.newArrayListWithExpectedSize(BATCH_THRESHOLD_NUMBER);
|
||||
private List<SystemConfigSealEdgeRespDTO> sealEdgeConfigList;
|
||||
|
||||
|
||||
private static String PART_CATEGORY_ONE = "封边条";
|
||||
@@ -170,13 +178,13 @@ public class WebCadOrderImportFactory {
|
||||
OrderGroupMapper orderGroupMapper,
|
||||
SnowflakeIdWorker3rd idWorker,
|
||||
OrderInputProcessor orderInputProcessor,
|
||||
PartsMapper partsMapper,
|
||||
OrderPartsMapper orderPartsMapper,
|
||||
GoodsMapper goodsMapper,
|
||||
RawGoodsMapper rawGoodsMapper,
|
||||
PlateGoodMapper plateGoodMapper,
|
||||
CustomPlateNoGenerateService customPlateNoGenerateService,
|
||||
DataSourceTransactionManager transactionManager) {
|
||||
DataSourceTransactionManager transactionManager,
|
||||
SystemConfigApi systemConfigApi) {
|
||||
this.organId = organId;
|
||||
this.orderMapper = orderMapper;
|
||||
this.snowFlakeGenerator = snowFlakeGenerator;
|
||||
@@ -186,16 +194,17 @@ public class WebCadOrderImportFactory {
|
||||
this.orderGroupMapper = orderGroupMapper;
|
||||
this.idWorker = idWorker;
|
||||
this.orderInputProcessor = orderInputProcessor;
|
||||
this.partsMapper = partsMapper;
|
||||
this.orderPartsMapper = orderPartsMapper;
|
||||
this.goodsMapper = goodsMapper;
|
||||
this.rawGoodsMapper = rawGoodsMapper;
|
||||
this.plateGoodMapper = plateGoodMapper;
|
||||
this.customPlateNoGenerateService = customPlateNoGenerateService;
|
||||
this.transactionManager = transactionManager;
|
||||
this.systemConfigApi = systemConfigApi;
|
||||
operatorName = SecurityFrameworkUtils.getLoginUser().getNickname();
|
||||
now = LocalDateTime.now();
|
||||
batchId = (Long) snowFlakeGenerator.nextId(null);
|
||||
sealEdgeConfigList = new ArrayList<>();
|
||||
}
|
||||
|
||||
public void analyzeTempData(WebCadDataReqVO webCadDataReqVO) {
|
||||
@@ -203,6 +212,9 @@ public class WebCadOrderImportFactory {
|
||||
// 获取自定义板编号配置
|
||||
plateNoGenerateConfigVO = customPlateNoGenerateService.getPlateNoGenerateConfig(orderId);
|
||||
|
||||
// 获取系统配置-封边对应配置
|
||||
getOrgSealEdgeConfig();
|
||||
|
||||
// 解析生产单信息
|
||||
analyzeOrder(webCadDataReqVO.getOrders());
|
||||
|
||||
@@ -238,6 +250,42 @@ public class WebCadOrderImportFactory {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取组织封边条对应配置
|
||||
*/
|
||||
private void getOrgSealEdgeConfig() {
|
||||
CommonResult<List<SystemConfigRespDTO>> orgSealEdgeConfig = systemConfigApi.getOrgSealEdgeConfig();
|
||||
boolean success = orgSealEdgeConfig.isSuccess();
|
||||
if (success) {
|
||||
try {
|
||||
List<SystemConfigRespDTO> orgSealEdgeConfigCheckedData = orgSealEdgeConfig.getCheckedData();
|
||||
if (CollUtil.isNotEmpty(orgSealEdgeConfigCheckedData)) {
|
||||
// 默认取第一条为配置
|
||||
SystemConfigRespDTO sealEdgeConfig = orgSealEdgeConfigCheckedData.get(0);
|
||||
String setting = sealEdgeConfig.getSetting();
|
||||
// 封边对应配置转列表
|
||||
JSONArray jsonArray = JSON.parseArray(setting);
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject jsonObject = jsonArray.getJSONObject(i);
|
||||
String widthMin = jsonObject.getString("widthMin");
|
||||
String widthMax = jsonObject.getString("widthMax");
|
||||
String widthValue = jsonObject.getString("widthValue");
|
||||
|
||||
if (StringUtils.isNotEmpty(widthMin) && StringUtils.isNotEmpty(widthMax) && StringUtils.isNotEmpty(widthValue)) {
|
||||
sealEdgeConfigList.add(new SystemConfigSealEdgeRespDTO(Integer.parseInt(widthMin), Integer.parseInt(widthMax), Integer.parseInt(widthValue)));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
ErrorCode webcadOrderImportOrgSealedgeAnalyzeError = WEBCAD_ORDER_IMPORT_ORG_SEALEDGE_ANALYZE_ERROR;
|
||||
log.error(webcadOrderImportOrgSealedgeAnalyzeError.getMsg(), e);
|
||||
throw ServiceExceptionUtil.exception(webcadOrderImportOrgSealedgeAnalyzeError);
|
||||
}
|
||||
} else {
|
||||
throw ServiceExceptionUtil.exception(WEBCAD_ORDER_IMPORT_GET_ORG_SEALEDGE_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析生产单信息
|
||||
*
|
||||
@@ -800,9 +848,6 @@ public class WebCadOrderImportFactory {
|
||||
return;
|
||||
}
|
||||
|
||||
// 配件对应列表
|
||||
matchLeftEdge(parts, blockObjectList);
|
||||
|
||||
// 解析orderParts
|
||||
analyzeOrderParts(blockObjectList);
|
||||
|
||||
@@ -1018,38 +1063,31 @@ public class WebCadOrderImportFactory {
|
||||
String spec = part.getSpec();
|
||||
String brand = part.getBrand();
|
||||
String factory = part.getFactory();
|
||||
String color = null;
|
||||
String material = null;
|
||||
if (PART_CATEGORY_ONE.equals(partType)) {
|
||||
// 封边对应查询配件库中的封边条配件,使用配件库的model、spec、brand、factory
|
||||
String sealPartId = part.getPartId();
|
||||
if (ObjectUtil.isNotNull(sealPartId)) {
|
||||
PartsDO partsDO = partsMapper.selectById(sealPartId);
|
||||
if (ObjectUtil.isNotNull(partsDO)) {
|
||||
model = partsDO.getModel();
|
||||
spec = partsDO.getSpec();
|
||||
brand = partsDO.getBrand();
|
||||
factory = partsDO.getFactory();
|
||||
} else {
|
||||
throw ServiceExceptionUtil.exception(WEBCAD_ORDER_IMPORT_SEAL_NOT_EXIST_ERROR, sealPartId);
|
||||
}
|
||||
}
|
||||
WebCadDataPartsReqVO.BlockObjectListDTO.GroupDataDTO partGroupData = part.getGroupData();
|
||||
color = partGroupData.getColor();
|
||||
material = partGroupData.getMaterial();
|
||||
// 封边条宽度从系统配置中获取宽度对应
|
||||
sealEdgeWidthMatch(part);
|
||||
}
|
||||
|
||||
String type = changePartType(partType, part.getIsComposite());
|
||||
String goodsId = part.getGoodsId();
|
||||
// todo orderId、color、remark、备注信息到es
|
||||
// todo remark、备注信息到es
|
||||
OrderPartsDO orderPartsDO = OrderPartsDO.builder()
|
||||
.id(partId)
|
||||
.orderId(orderId)
|
||||
.color(EMPTY_STRING)
|
||||
.color(getEmpty(color))
|
||||
.category(type)
|
||||
.type(type)
|
||||
.goodsId(getEmpty(goodsId))
|
||||
.goodsId(EMPTY_STRING)
|
||||
.length(NumberUtil.parseDouble(part.getHeight()))
|
||||
.width(NumberUtil.parseDouble(part.getWidth()))
|
||||
.thickness(NumberUtil.parseDouble(part.getThickness()))
|
||||
.isComposite(part.getIsComposite())
|
||||
.name(part.getName())
|
||||
.material(EMPTY_STRING)
|
||||
.material(getEmpty(material))
|
||||
.model(getEmpty(model))
|
||||
.spec(getEmpty(spec))
|
||||
.brand(getEmpty(brand))
|
||||
@@ -1073,12 +1111,11 @@ public class WebCadOrderImportFactory {
|
||||
for (WebCadDataPartsReqVO.BlockObjectListDTO module : moduleCollect) {
|
||||
Long partId = (Long) snowFlakeGenerator.nextId(null);
|
||||
String type = changePartType(module.getType(), module.getIsComposite());
|
||||
String goodsId = module.getGoodsId();
|
||||
// todo color、remark、备注信息到es
|
||||
OrderPartsDO orderPartsDO = OrderPartsDO.builder()
|
||||
.id(partId)
|
||||
.orderId(orderId)
|
||||
.goodsId(StringUtils.isNotEmpty(goodsId) ? goodsId : EMPTY_STRING)
|
||||
.goodsId(EMPTY_STRING)
|
||||
.color(EMPTY_STRING)
|
||||
.category(type)
|
||||
.type(type)
|
||||
@@ -1108,6 +1145,63 @@ public class WebCadOrderImportFactory {
|
||||
orderInfoBatchInsertWithinThreshold(orderPartsMapper, orderPartsDOS, true);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 封边条宽度匹配,获取厚度
|
||||
*
|
||||
* @param part
|
||||
*/
|
||||
private void sealEdgeWidthMatch(WebCadDataPartsReqVO.BlockObjectListDTO part) {
|
||||
// 从spec中解析宽度、厚度
|
||||
String spec = part.getSpec();
|
||||
Integer widthFromSpec = getWidthFromSpec(spec);
|
||||
part.setThickness(getThicknessFromSpec(spec));
|
||||
if (ObjectUtil.isNull(widthFromSpec)) {
|
||||
return;
|
||||
}
|
||||
for (SystemConfigSealEdgeRespDTO configSealEdgeRespDTO : sealEdgeConfigList) {
|
||||
// 宽度处于配置范围,宽取值作为最终配件宽度
|
||||
if (widthFromSpec >= configSealEdgeRespDTO.getWidthMin() && widthFromSpec <= configSealEdgeRespDTO.getWidthMax()) {
|
||||
part.setWidth(String.valueOf(configSealEdgeRespDTO.getWidthValue()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从规格中获取宽度,例:1mm-18mm
|
||||
*/
|
||||
private Integer getWidthFromSpec(String spec) {
|
||||
if (StringUtils.isNotEmpty(spec)) {
|
||||
String[] specSplit = spec.split("-");
|
||||
if (specSplit.length >= 2) {
|
||||
String widthInSpec = specSplit[1];
|
||||
String[] widthSplit = widthInSpec.split("mm");
|
||||
if (widthSplit.length == 1) {
|
||||
return Integer.parseInt(widthSplit[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从规格中获取厚度,例:1mm-18mm
|
||||
*/
|
||||
private String getThicknessFromSpec(String spec) {
|
||||
if (StringUtils.isNotEmpty(spec)) {
|
||||
String[] specSplit = spec.split("-");
|
||||
if (specSplit.length >= 2) {
|
||||
String widthInSpec = specSplit[0];
|
||||
String[] widthSplit = widthInSpec.split("mm");
|
||||
if (widthSplit.length == 1) {
|
||||
return widthSplit[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* value为空返回EMPTY_STRING
|
||||
*
|
||||
@@ -1118,30 +1212,6 @@ public class WebCadOrderImportFactory {
|
||||
return StringUtils.isNotEmpty(value) ? value : EMPTY_STRING;
|
||||
}
|
||||
|
||||
/**
|
||||
* 配件对应
|
||||
*
|
||||
* @param parts
|
||||
* @param blockObjectList
|
||||
*/
|
||||
private void matchLeftEdge(WebCadDataPartsReqVO parts, List<WebCadDataPartsReqVO.BlockObjectListDTO> blockObjectList) {
|
||||
List<WebCadDataPartsReqVO.LeftEdgesDTO> leftEdges = parts.getLeftEdges();
|
||||
if (CollUtil.isNotEmpty(leftEdges)) {
|
||||
for (WebCadDataPartsReqVO.LeftEdgesDTO leftEdge : leftEdges) {
|
||||
List<Integer> objectIds = leftEdge.getObjectIds();
|
||||
if (CollUtil.isNotEmpty(objectIds)) {
|
||||
for (Integer partIndex : objectIds) {
|
||||
// partIndex序号对应配件
|
||||
WebCadDataPartsReqVO.BlockObjectListDTO part = blockObjectList.get(partIndex - 1);
|
||||
// id、goodsId赋值到对应的cad配件上
|
||||
part.setGoodsId(leftEdge.getGoodsId());
|
||||
part.setPartId(leftEdge.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 配件类型转换
|
||||
*
|
||||
@@ -1304,5 +1374,6 @@ public class WebCadOrderImportFactory {
|
||||
orderModelDOS.clear();
|
||||
roomBodyMap.clear();
|
||||
bodyMap.clear();
|
||||
sealEdgeConfigList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user