mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 12:52:07 +08:00
xml数据转换修改
This commit is contained in:
+1
@@ -22,4 +22,5 @@ public interface DictTypeConstants {
|
||||
// ========== 单位 模块 ==========
|
||||
String UNIT_LENGTH = "length_unit"; // 长度单位
|
||||
String UNIT_AREA = "area_unit"; // 面积单位
|
||||
String UNIT_NUMBER = "area_number"; // 个数单位
|
||||
}
|
||||
|
||||
+22
-44
@@ -6,6 +6,7 @@ import com.cf.imes.framework.common.pojo.CommonResult;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.common.util.object.BeanUtils;
|
||||
import com.cf.imes.framework.mybatis.core.generator.SnowFlakeGenerator;
|
||||
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
|
||||
import com.cf.imes.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.*;
|
||||
@@ -20,10 +21,12 @@ import com.cf.imes.module.executor.util.ExcelWriterUtil;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.api.webcad.ApiDataAchieve;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.api.webcad.ApiTypeRealize;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.excel.ExcelReadUtil;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.excel.ExcelTypeRealize;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.excel.OrderPlateImportExcelVO;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.xml.VO.OrderXmlVO;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.xml.XMLUtil;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.xml.XmlBuilder;
|
||||
import com.cf.imes.module.executor.util.fileConversion.admin.files.xml.XmlTypeRealize;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
@@ -41,6 +44,7 @@ import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
@@ -87,7 +91,14 @@ public class OrderController {
|
||||
@Resource
|
||||
private XMLUtil xmlUtil;
|
||||
|
||||
@Resource
|
||||
private ExcelTypeRealize excelTypeRealize;
|
||||
|
||||
@Resource
|
||||
private SnowFlakeGenerator snowFlakeGenerator;
|
||||
|
||||
@Resource
|
||||
private XmlTypeRealize xmlTypeRealize;
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新生产单")
|
||||
@PreAuthorize("@ss.hasPermission('production:manager-list:edit')")
|
||||
@@ -229,46 +240,6 @@ public class OrderController {
|
||||
}
|
||||
|
||||
}
|
||||
// public CommonResult<Long> test(@RequestParam(value = "orderNo") String orderNo)
|
||||
// throws InterruptedException, ExecutionException {
|
||||
//
|
||||
// Long orderId = (Long) identifierGenerator.nextId(null);
|
||||
// Long organId = getUserOrganId();
|
||||
//
|
||||
// JSONObject oauth = apiDataAchieve.getApiToken(organId).get();
|
||||
// String token = oauth.getJSONObject("info").getString("access_token");
|
||||
// String shopId = oauth.getJSONObject("info").getString("shop_id");
|
||||
// JSONObject order = apiDataAchieve.getApiOrder(token, shopId, orderNo).get();
|
||||
// if (!order.getString("err_code").equals("0")) {
|
||||
// throw exception(PLATE_PLAN_DATA_ERROR);
|
||||
// }
|
||||
// if (order.getJSONArray("data") == null) {
|
||||
// throw exception(PLATE_PLAN_DATA_NULL);
|
||||
// }
|
||||
// JSONObject dataPlates = apiDataAchieve.getApiPlateProData(token, orderNo).get();
|
||||
// JSONObject dataParts = apiDataAchieve.getApiPartsMessage(token, orderNo).get();
|
||||
// JSONObject dataBody = apiDataAchieve.getApiBodyMessage(token, orderNo).get();
|
||||
// JSONObject dataGoods = apiDataAchieve.getApiGoodsMessage(token, orderNo).get();
|
||||
// JSONObject plate = apiDataAchieve.getApiPlateDetailMessage(token, orderNo).get();
|
||||
// JSONObject dataModule = apiDataAchieve.getApiGroupMessage(token, orderNo).get();
|
||||
// JSONObject block = apiDataAchieve.getApiBlocksMessage(token, orderNo).get();
|
||||
//
|
||||
// CompletableFuture.runAsync(() -> {
|
||||
// try {
|
||||
// DynamicDataSourceContextHolder.push("slave");
|
||||
// orderService.importApiData(order,dataPlates,dataParts,dataBody,dataGoods,plate,dataModule,block,orderNo, orderId, organId);
|
||||
// DynamicDataSourceContextHolder.clear();
|
||||
// } catch (Exception e) {
|
||||
//
|
||||
// log.error(" 1: ", e);
|
||||
// }
|
||||
// }, asyncExecutor).exceptionally(e -> {
|
||||
// log.error("error", e);
|
||||
// return null;
|
||||
// });
|
||||
//
|
||||
// return success(orderId);
|
||||
// }
|
||||
|
||||
@PostMapping("/importFile")
|
||||
@Operation(summary = "生产单文件导入新增/导入板材")
|
||||
@@ -287,6 +258,7 @@ public class OrderController {
|
||||
HttpServletResponse response) throws Exception {
|
||||
List<OrderPlateImportExcelVO> list = null;
|
||||
OrderXmlVO orderXmlVO = null;
|
||||
Map<String, List<?>> listMap = null;
|
||||
|
||||
OrderDO orderDO = null;
|
||||
Map<String, Object> mapOrder = null;
|
||||
@@ -304,6 +276,7 @@ public class OrderController {
|
||||
Map<String, Object> mapChange = excelReadUtil.changeOrderDO(mapOrder);
|
||||
mapOrder = (Map<String, Object>) mapChange.get("file");
|
||||
orderDO = (OrderDO) mapChange.get("order");
|
||||
orderDO.setId((Long) snowFlakeGenerator.nextId(null));
|
||||
flag = (Boolean) mapChange.get("error");
|
||||
}
|
||||
} else {
|
||||
@@ -332,6 +305,7 @@ public class OrderController {
|
||||
orderDO.setStatus(OrderStatusEnum.EMPTY.getStatus());
|
||||
} else {
|
||||
orderDO.setStatus(OrderStatusEnum.NEW_ORDER.getStatus());
|
||||
listMap = excelTypeRealize.changeDate(list, orderDO.getId());
|
||||
}
|
||||
}
|
||||
if (!flag) {
|
||||
@@ -347,12 +321,13 @@ public class OrderController {
|
||||
if (orderXmlVO != null) {
|
||||
mapOrder = xmlUtil.changeDate(orderXmlVO, getUserOrganId()); // 生产单数据格式验证
|
||||
orderDO = (OrderDO) mapOrder.get("order");
|
||||
orderDO.setId((Long) snowFlakeGenerator.nextId(null));
|
||||
flag = (Boolean) mapOrder.get("error");
|
||||
}
|
||||
} else {
|
||||
orderDO = orderService.getOrder(orderId);
|
||||
if (orderDO == null) {
|
||||
orderXmlVO = new OrderXmlVO().setMemo("生产单号不存在");
|
||||
orderXmlVO = new OrderXmlVO().setMemo("---< 生产单号不存在 >---");
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
@@ -365,14 +340,17 @@ public class OrderController {
|
||||
orderXmlVO = new OrderXmlVO().setMemo("生产单内容为空");
|
||||
flag = false;
|
||||
} else if (orderDO.getCustomOrderNo() != null && !orderService.customOrderNoIsExists(orderDO.getCustomOrderNo())) {
|
||||
orderXmlVO.setOrderCode(orderXmlVO.getOrderCode() + "自定义单号重复");
|
||||
orderXmlVO.setOrderCode(orderXmlVO.getOrderCode() + "---< 自定义单号重复 >---");
|
||||
flag = false;
|
||||
} else if (flag){ // 生产单的内容正确
|
||||
if (orderXmlVO.getMaterialXmlVO().getPlateXmlVOS().getPlateXmlVOList().size() == 0) {
|
||||
if (orderXmlVO.getMaterialXmlVO() == null || orderXmlVO.getMaterialXmlVO().getPlateXmlVOS() == null ||
|
||||
orderXmlVO.getMaterialXmlVO().getPlateXmlVOS().getPlateXmlVOList() == null ||
|
||||
orderXmlVO.getMaterialXmlVO().getPlateXmlVOS().getPlateXmlVOList().size() == 0) {
|
||||
orderDO.setStatus(OrderStatusEnum.EMPTY.getStatus());
|
||||
} else {
|
||||
orderDO.setStatus(OrderStatusEnum.NEW_ORDER.getStatus());
|
||||
flag = xmlUtil.checkVO(orderXmlVO);
|
||||
listMap = xmlTypeRealize.goodsInfoChange(orderXmlVO, orderDO.getId(), getUserOrganId());
|
||||
}
|
||||
}
|
||||
if (!flag){
|
||||
@@ -381,7 +359,7 @@ public class OrderController {
|
||||
return;
|
||||
}
|
||||
}
|
||||
orderService.importExcelData(orderDO, type , index, list, orderXmlVO);
|
||||
orderService.importExcelData(orderDO, index, listMap);
|
||||
} catch (Exception e) {
|
||||
log.error("文件导入异常", e);
|
||||
if (type == 0) {
|
||||
|
||||
+9
-4
@@ -2,10 +2,7 @@ package com.cf.imes.module.executor.dal.dataobject.ordermodel;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cf.imes.framework.es.core.dal.ESDocument;
|
||||
import com.cf.imes.module.executor.util.deviseData.structure.BasePosition;
|
||||
import com.cf.imes.module.executor.util.deviseData.structure.HoleDetail;
|
||||
import com.cf.imes.module.executor.util.deviseData.structure.ModelDetail;
|
||||
import com.cf.imes.module.executor.util.deviseData.structure.PointDetail;
|
||||
import com.cf.imes.module.executor.util.deviseData.structure.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
@@ -48,6 +45,8 @@ public class OrderModelDO extends ESDocument {
|
||||
@Schema(description = "小板类型")
|
||||
private String boardType;
|
||||
|
||||
@Schema(description = "板件配件信息")
|
||||
private List<PartsInfo> partsInfos;
|
||||
|
||||
@Schema(description = "开料长")
|
||||
private BigDecimal splitLength;
|
||||
@@ -69,8 +68,14 @@ public class OrderModelDO extends ESDocument {
|
||||
private List<PointDetail> pointDetail;
|
||||
@Schema(description = "原始点明细列表")
|
||||
private List<PointDetail> rawPointDetail;
|
||||
@Schema(description = "坯料点明细")
|
||||
private List<PointDetail> basePointDetail ; //坯料点明细
|
||||
@Schema(description = "holes数量集合 count=孔数量 countFaceA=正面垂直孔数量] countFaceB=反面垂直孔数量] countSide=水平侧孔数量] countSideL=左侧孔数量] countSideR=右侧孔数量 countSideU=上侧孔数量 countSideD=下侧孔数量 countBevelled=斜面孔数量 countLocking=偏心轮/锁定孔数量 countBuildIn=预埋件/插入孔数量 countHinge=铰链孔数量 countThrough=通孔(对穿孔)/挖穿孔数量]")
|
||||
private Map<String,Integer> holeCount;//孔类型数量集合
|
||||
@Schema(description = "孔明细列表")
|
||||
private List<HoleDetail> holeDetail;
|
||||
@Schema(description = "凹槽数量集合")
|
||||
private Map<String,Integer> contourCount;//凹槽数量集合
|
||||
@Schema(description = "造型明细(凹槽)")
|
||||
private List<ModelDetail> contourDetail;
|
||||
@Schema(description = "造型明细(孤岛,现在是xml数据格式添加)")
|
||||
|
||||
+1
-5
@@ -101,15 +101,11 @@ public interface OrderService {
|
||||
* @date 2024/3/30
|
||||
*/
|
||||
Long importApiData(Map<String, List<?>> listMap);
|
||||
void importApiData(JSONObject order, JSONObject dataPlates, JSONObject dataParts
|
||||
, JSONObject dataBody, JSONObject dataGoods
|
||||
, JSONObject plates, JSONObject dataModule
|
||||
, JSONObject dataBlocks, String orderNo,Long orderId, Long organId);
|
||||
|
||||
/**
|
||||
* 文件数据导入
|
||||
*/
|
||||
void importExcelData(OrderDO orderDO, Integer type, Integer index, List<OrderPlateImportExcelVO> list, OrderXmlVO orderXmlVO);
|
||||
void importExcelData(OrderDO orderDO, Integer index, Map<String, List<?>> mapOrder);
|
||||
|
||||
/**
|
||||
* 生产导入文件模板下载
|
||||
|
||||
+9
-86
@@ -520,34 +520,10 @@ public class OrderServiceImpl implements OrderService {
|
||||
}
|
||||
|
||||
@Override
|
||||
// @Async
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importApiData(JSONObject order, JSONObject dataPlates, JSONObject dataParts
|
||||
, JSONObject dataBody, JSONObject dataGoods
|
||||
, JSONObject plates, JSONObject dataModule
|
||||
, JSONObject dataBlocks, String orderNo,Long orderId, Long organId) {
|
||||
// RequestContextHolder.setRequestAttributes(requestAttributes);
|
||||
|
||||
String nickName = SecurityFrameworkUtils.getLoginUser().getNickname();
|
||||
Map<String, List<?>> listMap = apiTypeRealize.apiPlateDataChange(
|
||||
order,
|
||||
dataPlates,//板件生产信息
|
||||
dataParts,// 配件信息
|
||||
dataBody, // 柜体信息
|
||||
dataGoods, // 商品信息
|
||||
plates, // 板件明细
|
||||
dataModule,// 加工组信息
|
||||
dataBlocks,// 板材数据
|
||||
orderNo,// 原始板编号
|
||||
orderId,
|
||||
organId);
|
||||
|
||||
List<OrderDO> orderDOS = (List<OrderDO>) listMap.get("orderDO");
|
||||
if (orderDOS != null && orderDOS.size() > 0) {
|
||||
OrderDO orderDO = orderDOS.get(0);
|
||||
validateCustomOrderNoExists(orderDO.getCustomOrderNo());
|
||||
|
||||
orderDO.setCreator(nickName).setUpdater(nickName);
|
||||
public void importExcelData(OrderDO orderDO, Integer index, Map<String, List<?>> listMap) {
|
||||
if (index == 0) {
|
||||
String nickName = Objects.requireNonNull(SecurityFrameworkUtils.getLoginUser()).getNickname();
|
||||
if (orderDO.getSalesman() == null || orderDO.getSalesman().equals("")) {
|
||||
orderDO.setSalesman(nickName);
|
||||
}
|
||||
@@ -556,61 +532,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
}
|
||||
orderMapper.insert(orderDO);
|
||||
}
|
||||
List<GoodsDO> goodsDO = (List<GoodsDO>) listMap.get("goodsDO");
|
||||
List<RawGoodsDO> rawGoodsDO = (List<RawGoodsDO>) listMap.get("rawGoodsDO");
|
||||
List<OrderBodyDO> bodyDO = (List<OrderBodyDO>) listMap.get("bodyDO");
|
||||
List<OrderGroupDO> groupDO = (List<OrderGroupDO>) listMap.get("groupDO");
|
||||
List<OrderPartsDO> partsDO = (List<OrderPartsDO>) listMap.get("partsDO");
|
||||
List<PlateDO> plateDO = (List<PlateDO>) listMap.get("platesDO");
|
||||
List<PlateDetail> plateDetail = (List<PlateDetail>) listMap.get("plateDetail");
|
||||
List<OrderItemDO> itemDO = (List<OrderItemDO>) listMap.get("itemDO");
|
||||
List<OrderPartsRemark> partsRemark = (List<OrderPartsRemark>) listMap.get("partsRemark");
|
||||
|
||||
Map<String, List<?>> map = getPlateGoods(goodsDO);// 检验商品板材信息是否存在
|
||||
goodsDO = (List<GoodsDO>) map.get("goodsDO");
|
||||
List<PlateGoodDO> plateGoodDOS = (List<PlateGoodDO>) map.get("plateGoodDOLists");
|
||||
|
||||
|
||||
orderInputProcessor.batchInsert(rawGoodsDO, bodyDO, groupDO, partsDO, plateDO, itemDO, goodsDO, plateGoodDOS);
|
||||
List<OrderModelDO> orderModelDOs = BeanUtils.toBean(plateDetail, OrderModelDO.class);
|
||||
|
||||
if (orderModelDOs.size() > 0) {
|
||||
orderModelDOs.forEach(orderModelDO -> orderModelDO.setOrderId(orderDOS.get(0).getId()));
|
||||
orderInputProcessor.batchSaveModel(orderModelDOs);
|
||||
}
|
||||
if (partsRemark.size() > 0) {
|
||||
orderInputProcessor.batchSaveOrderPartsModel(partsRemark);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importExcelData(OrderDO orderDO, Integer type, Integer index, List<OrderPlateImportExcelVO> list, OrderXmlVO orderXmlVO) {
|
||||
if (index == null || index == 0) {
|
||||
orderDO.setId((Long) snowFlakeGenerator.nextId(null));
|
||||
String nickName = SecurityFrameworkUtils.getLoginUser().getNickname();
|
||||
if (orderDO.getSalesman() == null || orderDO.getSalesman().equals("")) {
|
||||
orderDO.setSalesman(nickName);
|
||||
}
|
||||
if (orderDO.getSplitter() == null || orderDO.getSplitter().equals("")) {
|
||||
orderDO.setSplitter(nickName);
|
||||
}
|
||||
orderMapper.insert(orderDO);
|
||||
}
|
||||
Map<String, List<?>> listMap = null;
|
||||
|
||||
if (type == 0){
|
||||
if (list != null && list.size() > 0) {
|
||||
listMap = excelTypeRealize.changeDate(list, orderDO.getId());
|
||||
}
|
||||
} else if (type == 1) {
|
||||
|
||||
} else if (type == 2) {
|
||||
if (orderXmlVO != null) {
|
||||
listMap = xmlTypeRealize.goodsInfoChange(orderXmlVO, orderDO.getId(), getUserOrganId());
|
||||
}
|
||||
}
|
||||
if (Objects.equals(orderDO.getStatus(), OrderStatusEnum.NEW_ORDER.getStatus())) {
|
||||
List<RawGoodsDO> rawGoodsDO = (List<RawGoodsDO>) listMap.get("rawGoodsDOS");
|
||||
List<GoodsDO> goodsDO = (List<GoodsDO>) listMap.get("goodsDOS");
|
||||
|
||||
@@ -628,17 +550,17 @@ public class OrderServiceImpl implements OrderService {
|
||||
List<PlateGoodDO> plateGoodDOS = (List<PlateGoodDO>) map.get("plateGoodDOLists");
|
||||
|
||||
|
||||
if (index != null && index != 0) {
|
||||
if (index != 0) {
|
||||
roomCabinetProcessGroupMatch(orderDO.getId(), bodyDO, itemDO);
|
||||
if (orderDO.getStatus() == OrderStatusEnum.EMPTY.getStatus()) {
|
||||
if (Objects.equals(orderDO.getStatus(), OrderStatusEnum.EMPTY.getStatus())) {
|
||||
orderDO.setStatus(OrderStatusEnum.NEW_ORDER.getStatus());
|
||||
updateOrder(BeanUtils.toBean(orderDO, OrderSaveReqVO.class));
|
||||
}
|
||||
if (orderDO.getStatus() == OrderStatusEnum.FINISH_PRODUCTION.getStatus()) {
|
||||
if (Objects.equals(orderDO.getStatus(), OrderStatusEnum.FINISH_PRODUCTION.getStatus())) {
|
||||
orderDO.setStatus(OrderStatusEnum.IN_PRODUCTION.getStatus());
|
||||
updateOrder(BeanUtils.toBean(orderDO, OrderSaveReqVO.class));
|
||||
}
|
||||
if (orderDO.getPackaged() == OrderPackageStatusEnum.PACKAGED.getStatus()) {
|
||||
if (Objects.equals(orderDO.getPackaged(), OrderPackageStatusEnum.PACKAGED.getStatus())) {
|
||||
orderDO.setPackaged(OrderPackageStatusEnum.PACKAGING.getStatus());
|
||||
updateOrder(BeanUtils.toBean(orderDO, OrderSaveReqVO.class));
|
||||
}
|
||||
@@ -657,6 +579,7 @@ public class OrderServiceImpl implements OrderService {
|
||||
if (orderPartsRemarks != null && orderPartsRemarks.size() > 0) {
|
||||
orderInputProcessor.batchSaveOrderPartsModel(orderPartsRemarks);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
-2
@@ -36,6 +36,4 @@ public class OffSetList {
|
||||
@Schema(description = "二维刀路的属性-刀的半径")
|
||||
private Double radius;
|
||||
|
||||
@Schema(description = "面向类型(0正面, 1反面, 2侧面)")
|
||||
private String faceType;
|
||||
}
|
||||
|
||||
+3
-34
@@ -14,43 +14,12 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class PartsInfo {
|
||||
|
||||
private String id; // 配件标识
|
||||
private Long id; // 配件标识
|
||||
private String name; // 配件名称
|
||||
|
||||
|
||||
// 配件所属信息
|
||||
private String roomName; //房间名称
|
||||
private String bodyName; //柜体名
|
||||
private Integer bodyNo; // 柜体编号
|
||||
|
||||
|
||||
// 柜体成倍拆单的倍数
|
||||
private Integer multiNum;
|
||||
|
||||
// 单个配件的数量
|
||||
private Double partNum;
|
||||
|
||||
// 商品信息
|
||||
private String goodsNo; // 商品编码
|
||||
private Long goodId; // 商品对应标识
|
||||
private String material; //材质
|
||||
private String color; //颜色
|
||||
private String factory; //商品生产厂商
|
||||
private String brand; //商品品牌
|
||||
private String model; //商品型号
|
||||
private String unit; //商品单位
|
||||
private Double price; // 配件价格
|
||||
|
||||
private Boolean isComposite; // 是否为配件
|
||||
private String groupName; // 组件名称
|
||||
private String processGroup; // 五金加工组
|
||||
private String objectType; // 五金类型
|
||||
private String objectSpecExtras; // 五金额外规格
|
||||
private Double goodsNumber; //产品数量为特殊处理,板件和配件都有数量
|
||||
|
||||
private String doorRemark; // 门板组件铰链备注
|
||||
private String hingeRemark; // 门板组件拉手备注
|
||||
private String remark;
|
||||
private String specialRemark; // 特殊备注(Json字符串)
|
||||
|
||||
// 配件数量单位
|
||||
private String unit;
|
||||
}
|
||||
|
||||
+9
@@ -19,6 +19,10 @@ import java.util.Map;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlateDetail{
|
||||
// 组织id
|
||||
private Long organId;
|
||||
// 生产单id
|
||||
private Long orderId;
|
||||
// 板名称
|
||||
private String name;
|
||||
// 板id
|
||||
@@ -39,6 +43,8 @@ public class PlateDetail{
|
||||
private String roomNo; // 房间号
|
||||
private String bodyName; //柜体名
|
||||
private String bodyNo; // 柜体号
|
||||
private String groupName; //加工组号
|
||||
private String groupNo; // 加工组名称
|
||||
// 柜体 长 宽 深
|
||||
private Double width;
|
||||
private Double height;
|
||||
@@ -95,8 +101,11 @@ public class PlateDetail{
|
||||
private BasePosition plateBasePosition; // 板件基准点坐标
|
||||
private List<PointDetail> pointDetail ; //点明细,表示小板外围轮廓的几个转折点(不含封边)
|
||||
private List<PointDetail> rawPointDetail ; //原始点明细(含封边)
|
||||
private List<PointDetail> basePointDetail ; //坯料点明细
|
||||
|
||||
private Map<String,Integer> holeCount;//孔类型数量集合
|
||||
private List<HoleDetail> holeDetail ; //孔明细,表示板上的孔
|
||||
private Map<String,Integer> contourCount;//凹槽数量集合
|
||||
private List<ModelDetail> contourDetail ; //造型明细(凹槽)
|
||||
private List<ModelDetail> isletsDetail ; //造型明细(孤岛)
|
||||
|
||||
|
||||
+3
@@ -33,4 +33,7 @@ public class PointDetail {
|
||||
// 点的封边尺寸
|
||||
@Schema(description = "点的封边尺寸,封边尺寸,封边的厚度,长同边长")
|
||||
private BigDecimal sealSize;
|
||||
|
||||
@Schema(description = "加工工艺")
|
||||
private String process;
|
||||
}
|
||||
|
||||
+8
@@ -1,12 +1,20 @@
|
||||
package com.cf.imes.module.executor.util.fileConversion.admin.files.xml;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
/**
|
||||
* xml中房间、柜体、加工组的位置信息
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PositionVO {
|
||||
|
||||
@Schema(name = "房间名称")
|
||||
|
||||
+4
@@ -99,6 +99,10 @@ public class AssemblyXmlVO implements Serializable {
|
||||
@XmlAttribute(name = "groupCode")
|
||||
private String groupCode;
|
||||
|
||||
// 加工组名称
|
||||
@XmlAttribute(name = "groupName")
|
||||
private String groupName;
|
||||
|
||||
// 模块名称
|
||||
@XmlAttribute(name = "moduleName")
|
||||
private String moduleName;
|
||||
|
||||
+4
@@ -139,6 +139,10 @@ public class BlockXmlVO implements Serializable {
|
||||
@XmlAttribute(name = "groupCode")
|
||||
private String groupCode;
|
||||
|
||||
// 柜体名称
|
||||
@XmlAttribute(name = "groupName")
|
||||
private String groupName;
|
||||
|
||||
// 模块名称
|
||||
@XmlAttribute(name = "moduleName")
|
||||
private String moduleName;
|
||||
|
||||
+2
@@ -1,6 +1,7 @@
|
||||
package com.cf.imes.module.executor.util.fileConversion.admin.files.xml.VO;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@@ -8,6 +9,7 @@ import javax.xml.bind.annotation.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@XmlRootElement(name = "Edging")
|
||||
|
||||
+1
-1
@@ -39,6 +39,6 @@ public class ExtraVO {
|
||||
private List<String> edgeRemarks;
|
||||
|
||||
@Schema(description ="封边备注" )
|
||||
private List<String> rectSealDetail;
|
||||
private List<RectSealVO> rectSealDetail;
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -99,6 +99,10 @@ public class HardwareXmlVO implements Serializable {
|
||||
@XmlAttribute(name = "groupCode")
|
||||
private String groupCode;
|
||||
|
||||
// 加工组名称
|
||||
@XmlAttribute(name = "groupName")
|
||||
private String groupName;
|
||||
|
||||
// 模块名称
|
||||
@XmlAttribute(name = "moduleName")
|
||||
private String moduleName;
|
||||
|
||||
+8
@@ -85,4 +85,12 @@ public class PointXmlVO implements Serializable {
|
||||
// 边备注信息
|
||||
@XmlAttribute(name = "remark")
|
||||
private String remark;
|
||||
|
||||
// 单边封边尺寸
|
||||
@XmlAttribute(name = "count")
|
||||
private String count;
|
||||
|
||||
// 封边尺寸单位
|
||||
@XmlAttribute(name = "countUnit")
|
||||
private String countUnit;
|
||||
}
|
||||
|
||||
+4
-4
@@ -16,15 +16,15 @@ import lombok.NoArgsConstructor;
|
||||
public class RectSealVO {
|
||||
|
||||
@Schema(description ="点id" )
|
||||
private String PointID;
|
||||
private String pointID;
|
||||
|
||||
@Schema(description ="预留边" )
|
||||
private String ReservedEdge;
|
||||
private String reservedEdge;
|
||||
|
||||
@Schema(description ="封边颜色" )
|
||||
private String SealColor;
|
||||
private String sealColor;
|
||||
|
||||
@Schema(description ="封边尺寸" )
|
||||
private String SealSize;
|
||||
private String sealSize;
|
||||
|
||||
}
|
||||
|
||||
+147
-15
@@ -33,6 +33,9 @@ public class XMLUtil {
|
||||
final String POSITIVE_ERR = "数据需为正数";
|
||||
final String LONG_ERR = "数据长度不符合(共8位整数位5位,小数位3位)";
|
||||
|
||||
final String NOT_ASSIGNED = "未命名";
|
||||
final String NOT_ASSIGNED_CODE = "未命编号";
|
||||
|
||||
@Resource
|
||||
private DictDataApi dictDataApi;
|
||||
|
||||
@@ -247,6 +250,24 @@ public class XMLUtil {
|
||||
assemblyXmlVO.setUnit("---< 组件数量单位不能为空 >---");
|
||||
flag = false;
|
||||
}
|
||||
if (StringUtils.isEmpty(assemblyXmlVO.getRoomCode())) {
|
||||
assemblyXmlVO.setRoomCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(assemblyXmlVO.getRoomName())) {
|
||||
assemblyXmlVO.setRoomName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(assemblyXmlVO.getBoxCode())) {
|
||||
assemblyXmlVO.setBoxCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(assemblyXmlVO.getBoxName())) {
|
||||
assemblyXmlVO.setBoxName(NOT_ASSIGNED);
|
||||
}
|
||||
// if (StringUtils.isEmpty(assemblyXmlVO.getGroupCode())) {
|
||||
// assemblyXmlVO.setGroupCode(NOT_ASSIGNED_CODE);
|
||||
// }
|
||||
// if (StringUtils.isEmpty(assemblyXmlVO.getGroupName())) {
|
||||
// assemblyXmlVO.setGroupName(NOT_ASSIGNED);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -254,6 +275,24 @@ public class XMLUtil {
|
||||
private void checkHardwares(HardwareXmlVOS hardwareXmlVOS, Boolean flag) {
|
||||
if (hardwareXmlVOS != null && hardwareXmlVOS.getHardwareXmlVOList().size() > 0) {
|
||||
for (HardwareXmlVO hardwareXmlVO : hardwareXmlVOS.getHardwareXmlVOList()) {
|
||||
if (StringUtils.isEmpty(hardwareXmlVO.getRoomCode())) {
|
||||
hardwareXmlVO.setRoomCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(hardwareXmlVO.getRoomName())) {
|
||||
hardwareXmlVO.setRoomName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(hardwareXmlVO.getBoxCode())) {
|
||||
hardwareXmlVO.setBoxCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(hardwareXmlVO.getBoxName())) {
|
||||
hardwareXmlVO.setBoxName(NOT_ASSIGNED);
|
||||
}
|
||||
// if (StringUtils.isEmpty(hardwareXmlVO.getGroupCode())) {
|
||||
// hardwareXmlVO.setGroupCode(NOT_ASSIGNED_CODE);
|
||||
// }
|
||||
// if (StringUtils.isEmpty(hardwareXmlVO.getGroupName())) {
|
||||
// hardwareXmlVO.setGroupName(NOT_ASSIGNED);
|
||||
// }
|
||||
if (StringUtils.isEmpty(hardwareXmlVO.getName())) {
|
||||
hardwareXmlVO.setName("---< 五金名称不能为空 >---");
|
||||
flag = false;
|
||||
@@ -290,6 +329,24 @@ public class XMLUtil {
|
||||
private void checkEdgings(EdgingXmlVOS edgingXmlVOS, Boolean flag) {
|
||||
if (edgingXmlVOS != null && edgingXmlVOS.getEdgingXmlVOList().size() > 0) {
|
||||
for (EdgingXmlVO edgingXmlVO : edgingXmlVOS.getEdgingXmlVOList()) {
|
||||
if (StringUtils.isEmpty(edgingXmlVO.getRoomCode())) {
|
||||
edgingXmlVO.setRoomCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(edgingXmlVO.getRoomName())) {
|
||||
edgingXmlVO.setRoomName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(edgingXmlVO.getBoxCode())) {
|
||||
edgingXmlVO.setBoxCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(edgingXmlVO.getBoxName())) {
|
||||
edgingXmlVO.setBoxName(NOT_ASSIGNED);
|
||||
}
|
||||
// if (StringUtils.isEmpty(edgingXmlVO.getGroupCode())) {
|
||||
// edgingXmlVO.setGroupCode(NOT_ASSIGNED_CODE);
|
||||
// }
|
||||
// if (StringUtils.isEmpty(edgingXmlVO.getGroupName())) {
|
||||
// edgingXmlVO.setGroupName(NOT_ASSIGNED);
|
||||
// }
|
||||
if (StringUtils.isEmpty(edgingXmlVO.getName())) {
|
||||
edgingXmlVO.setName("---< 封边条名称不能为空 >---");
|
||||
flag = false;
|
||||
@@ -365,6 +422,12 @@ public class XMLUtil {
|
||||
}
|
||||
}
|
||||
for (RoomXmlVO room : roomXmlVOS.getRoomXmlVOList()) {
|
||||
if (StringUtils.isEmpty(room.getName())) {
|
||||
room.setName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(room.getCode())) {
|
||||
room.setCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (room != null) {
|
||||
if (!StringUtils.isEmpty(room.getHeight())) {
|
||||
Boolean flag = checkNumber(room.getHeight().trim(), Double.class);
|
||||
@@ -557,6 +620,12 @@ public class XMLUtil {
|
||||
} else {
|
||||
box.setAxisZrotate("0");
|
||||
}
|
||||
if (StringUtils.isEmpty(box.getName())) {
|
||||
box.setName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(box.getCode())) {
|
||||
box.setCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,6 +651,12 @@ public class XMLUtil {
|
||||
// 模块数据格式验证
|
||||
public void checkModuleList(List<ModuleXmlVO> moduleXmlVOSList, Boolean error) {
|
||||
for (ModuleXmlVO module : moduleXmlVOSList) {
|
||||
if (StringUtils.isEmpty(module.getName())) {
|
||||
module.setName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(module.getCode())) {
|
||||
module.setCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (!StringUtils.isEmpty(module.getLength())) {
|
||||
Boolean flag = checkNumber(module.getLength().trim(), Double.class);
|
||||
if (!flag) {
|
||||
@@ -633,6 +708,12 @@ public class XMLUtil {
|
||||
// 加工组数据格式验证
|
||||
public void checkGroupList(List<GroupXmlVO> groupXmlVOList, Boolean error) {
|
||||
for (GroupXmlVO group : groupXmlVOList) {
|
||||
if (StringUtils.isEmpty(group.getName())) {
|
||||
group.setName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(group.getCode())) {
|
||||
group.setCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (!StringUtils.isEmpty(group.getLength())) {
|
||||
Boolean flag = checkNumber(group.getLength().trim(), Double.class);
|
||||
if (!flag) {
|
||||
@@ -1050,12 +1131,24 @@ public class XMLUtil {
|
||||
error = false;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(blockXmlVO.getRoomCode())) {
|
||||
blockXmlVO.setRoomCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(blockXmlVO.getRoomName())) {
|
||||
blockXmlVO.setRoomName("未命名");
|
||||
blockXmlVO.setRoomName(NOT_ASSIGNED);
|
||||
}
|
||||
if (StringUtils.isEmpty(blockXmlVO.getBoxCode())) {
|
||||
blockXmlVO.setBoxCode(NOT_ASSIGNED_CODE);
|
||||
}
|
||||
if (StringUtils.isEmpty(blockXmlVO.getBoxName())) {
|
||||
blockXmlVO.setBoxName("未命名");
|
||||
blockXmlVO.setBoxName(NOT_ASSIGNED);
|
||||
}
|
||||
// if (StringUtils.isEmpty(blockXmlVO.getGroupCode())) {
|
||||
// blockXmlVO.setGroupCode(NOT_ASSIGNED_CODE);
|
||||
// }
|
||||
// if (StringUtils.isEmpty(blockXmlVO.getGroupName())) {
|
||||
// blockXmlVO.setGroupName(NOT_ASSIGNED);
|
||||
// }
|
||||
if (!StringUtils.isEmpty(blockXmlVO.getBasePointX())) {
|
||||
if (!ToolUtil.convertToType(blockXmlVO.getBasePointX(), Double.class)) {
|
||||
blockXmlVO.setBasePointX(blockXmlVO.getBasePointX() + "---< " + TYPE_ERR + " >---");
|
||||
@@ -1149,23 +1242,19 @@ public class XMLUtil {
|
||||
if (correlationXmlVOS.getCorrelationXmlVOList() != null && correlationXmlVOS.getCorrelationXmlVOList().size() > 0) {
|
||||
for (CorrelationXmlVO correlationXmlVO : correlationXmlVOS.getCorrelationXmlVOList()) {
|
||||
if (StringUtils.isEmpty(correlationXmlVO.getItemCode())) {
|
||||
if (StringUtils.isEmpty(correlationXmlVO.getName())) {
|
||||
correlationXmlVO.setName("---< 关联配件(五金)/组件名称不可为空 >---");
|
||||
if (StringUtils.isEmpty(correlationXmlVO.getItemCode())) {
|
||||
correlationXmlVO.setName("---< 关联配件(五金)/组件物料编码 >---");
|
||||
error = false;
|
||||
}
|
||||
if (StringUtils.isEmpty(correlationXmlVO.getUnitCount())) {
|
||||
correlationXmlVO.setUnitCount("---< 关联配件(五金)/组件单位不可为空 >---");
|
||||
error = false;
|
||||
}
|
||||
if (!StringUtils.isEmpty(correlationXmlVO.getCount())) {
|
||||
if (!checkNumber(correlationXmlVO.getCount(), Integer.class)) {
|
||||
correlationXmlVO.setCount(correlationXmlVO.getCount() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
correlationXmlVO.setCount("---< 关联配件(五金)/组件数量不可为空 >---");
|
||||
}
|
||||
if (!StringUtils.isEmpty(correlationXmlVO.getCount())) {
|
||||
if (!checkNumber(correlationXmlVO.getCount(), Integer.class)) {
|
||||
correlationXmlVO.setCount(correlationXmlVO.getCount() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
correlationXmlVO.setCount("---< 关联配件(五金)/组件数量不可为空 >---");
|
||||
error = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1251,6 +1340,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCount(holeXmlVOS.getCount() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCount("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountFaceA())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountFaceA().trim(), Integer.class);
|
||||
@@ -1258,6 +1349,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountFaceA(holeXmlVOS.getCountFaceA() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountFaceA("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountFaceB())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountFaceB().trim(), Integer.class);
|
||||
@@ -1265,6 +1358,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountFaceB(holeXmlVOS.getCountFaceB() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountFaceB("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountSide())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountSide().trim(), Integer.class);
|
||||
@@ -1272,6 +1367,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountSide(holeXmlVOS.getCountSide() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountSide("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountSideL())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountSideL().trim(), Integer.class);
|
||||
@@ -1279,6 +1376,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountSideL(holeXmlVOS.getCountSideL() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountSideL("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountSideR())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountSideR().trim(), Integer.class);
|
||||
@@ -1286,6 +1385,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountSideR(holeXmlVOS.getCountSideR() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountSideR("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountSideU())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountSideU().trim(), Integer.class);
|
||||
@@ -1293,6 +1394,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountSideU(holeXmlVOS.getCountSideU() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountSideU("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountSideD())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountSideD().trim(), Integer.class);
|
||||
@@ -1300,6 +1403,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountSideD(holeXmlVOS.getCountSideD() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountSideD("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountBevelled())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountBevelled().trim(), Integer.class);
|
||||
@@ -1307,6 +1412,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountBevelled(holeXmlVOS.getCountBevelled() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountBevelled("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountLocking())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountLocking().trim(), Integer.class);
|
||||
@@ -1314,6 +1421,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountLocking(holeXmlVOS.getCountLocking() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountLocking("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountBuildIn())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountBuildIn().trim(), Integer.class);
|
||||
@@ -1321,6 +1430,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountBuildIn(holeXmlVOS.getCountBuildIn() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountBuildIn("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountHinge())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountHinge().trim(), Integer.class);
|
||||
@@ -1328,6 +1439,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountHinge(holeXmlVOS.getCountHinge() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountHinge("0");
|
||||
}
|
||||
if (!StringUtils.isEmpty(holeXmlVOS.getCountThrough())) {
|
||||
Boolean flag = checkNumber(holeXmlVOS.getCountThrough().trim(), Integer.class);
|
||||
@@ -1335,6 +1448,8 @@ public class XMLUtil {
|
||||
holeXmlVOS.setCountThrough(holeXmlVOS.getCountThrough() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
} else {
|
||||
holeXmlVOS.setCountThrough("0");
|
||||
}
|
||||
if (holeXmlVOS.getHoleXmlVOList() != null && holeXmlVOS.getHoleXmlVOList().size() > 0) {
|
||||
for (HoleXmlVO holeXmlVO : holeXmlVOS.getHoleXmlVOList()) {
|
||||
@@ -1964,6 +2079,23 @@ public class XMLUtil {
|
||||
error = false;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(pointXmlVO.getCount())) {
|
||||
pointXmlVO.setCount("0");
|
||||
} else {
|
||||
if (!checkNumber(pointXmlVO.getCount().trim(), Double.class)) {
|
||||
pointXmlVO.setRadius("---< " + pointXmlVO.getRadius() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
|
||||
error = false;
|
||||
}
|
||||
}
|
||||
if (StringUtils.isEmpty(pointXmlVO.getCountUnit())) {
|
||||
pointXmlVO.setCountUnit("m");
|
||||
} else {
|
||||
DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_LENGTH, pointXmlVO.getCountUnit().trim()).getData();
|
||||
if (dictData == null) {
|
||||
pointXmlVO.setCountUnit(pointXmlVO.getCountUnit() + "---< " + "封边条长度单位无效 >---");
|
||||
error = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+648
-255
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user