diff --git a/cf-module-prod-manage/cf-module-prod-manage-api/src/main/java/com/cf/imes/module/manage/enums/DeletedCodeEnum.java b/cf-framework/cf-common/src/main/java/com/cf/imes/framework/common/enums/DeletedCodeEnum.java
similarity index 91%
rename from cf-module-prod-manage/cf-module-prod-manage-api/src/main/java/com/cf/imes/module/manage/enums/DeletedCodeEnum.java
rename to cf-framework/cf-common/src/main/java/com/cf/imes/framework/common/enums/DeletedCodeEnum.java
index 8963aa73a..caedf91d6 100644
--- a/cf-module-prod-manage/cf-module-prod-manage-api/src/main/java/com/cf/imes/module/manage/enums/DeletedCodeEnum.java
+++ b/cf-framework/cf-common/src/main/java/com/cf/imes/framework/common/enums/DeletedCodeEnum.java
@@ -1,4 +1,4 @@
-package com.cf.imes.module.manage.enums;
+package com.cf.imes.framework.common.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
diff --git a/cf-gateway/pom.xml b/cf-gateway/pom.xml
index 2df26d27c..79e7cb1be 100644
--- a/cf-gateway/pom.xml
+++ b/cf-gateway/pom.xml
@@ -101,6 +101,27 @@
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
+
+ ZIP
+
+
+ com.cf.imes
+ cf-common
+
+
+ com.cf.imes
+ cf-module-system-api
+
+
+ com.cf.imes
+ cf-spring-boot-starter-banner
+
+
+ com.cf.imes
+ cf-spring-boot-starter-monitor
+
+
+
@@ -108,15 +129,6 @@
-
-
-
-
-
-
-
-
-
org.apache.maven.plugins
@@ -132,7 +144,7 @@
target/lib
-
+ com.cf.imes
diff --git a/cf-module-infra/cf-module-infra-biz/pom.xml b/cf-module-infra/cf-module-infra-biz/pom.xml
index c8ac36b85..8227ad15f 100644
--- a/cf-module-infra/cf-module-infra-biz/pom.xml
+++ b/cf-module-infra/cf-module-infra-biz/pom.xml
@@ -161,6 +161,79 @@
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
+
+ ZIP
+
+
+ com.cf.imes
+ cf-common
+
+
+ com.cf.imes
+ cf-module-infra-api
+
+
+ com.cf.imes
+ cf-module-system-api
+
+
+ com.cf.imes
+ cf-spring-boot-starter-banner
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-error-code
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-operatelog
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-organ
+
+
+ com.cf.imes
+ cf-spring-boot-starter-excel
+
+
+ com.cf.imes
+ cf-spring-boot-starter-file
+
+
+ com.cf.imes
+ cf-spring-boot-starter-monitor
+
+
+ com.cf.imes
+ cf-spring-boot-starter-mybatis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-redis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-rpc
+
+
+ com.cf.imes
+ cf-spring-boot-starter-security
+
+
+ com.cf.imes
+ cf-spring-boot-starter-web
+
+
+ com.cf.imes
+ cf-spring-boot-starter-websocket
+
+
+ com.cf.imes
+ cf-spring-boot-starter-mq
+
+
+
diff --git a/cf-module-prod-executor/cf-module-prod-executor-api/src/main/java/com/cf/imes/module/executor/enums/DictTypeConstants.java b/cf-module-prod-executor/cf-module-prod-executor-api/src/main/java/com/cf/imes/module/executor/enums/DictTypeConstants.java
index a4fb9469a..693d813c1 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-api/src/main/java/com/cf/imes/module/executor/enums/DictTypeConstants.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-api/src/main/java/com/cf/imes/module/executor/enums/DictTypeConstants.java
@@ -5,17 +5,21 @@ package com.cf.imes.module.executor.enums;
*/
public interface DictTypeConstants {
+ String HOLE_FACE = "hole_face";//加工面
+ String HOLE_DIRECTION = "hole_direction";// 方向
+
// ========== PLATE 模块 ==========
String TYPOGRAPHY_TYPE = "typographyType"; // 排版面
String GRAIN_TYPE = "grainType";// 小板纹路类型
String DOOR_OPENING_DIRECTIONS = "doorOpeningDirections";//开门方向
String PLATE_TYPE = "order_plate_type"; // 板类型
- String UNIT_LENGTH = "unit_length"; // 长度单位
- String UNIT_AREA = "area_unit"; // 面积单位
// ========== HOLE 模块 ==========
- String HOLE_FACE = "hole_face";//孔加工面
- String HOLE_DIR = "hole_direction";// 孔方向
String HOLE_TYPE = "hole_type";//孔类型
+
+
+ // ========== 单位 模块 ==========
+ String UNIT_LENGTH = "length_unit"; // 长度单位
+ String UNIT_AREA = "area_unit"; // 面积单位
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml
index 7f93d1641..d16009736 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/pom.xml
@@ -173,6 +173,91 @@
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
+
+ ZIP
+
+
+ com.cf.imes
+ cf-common
+
+
+ com.cf.imes
+ cf-module-infra-api
+
+
+ com.cf.imes
+ cf-module-prod-executor-api
+
+
+ com.cf.imes
+ cf-module-report-api
+
+
+ com.cf.imes
+ cf-module-system-api
+
+
+ com.cf.imes
+ cf-spring-boot-starter-banner
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-data-permission
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-dict
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-error-code
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-operatelog
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-organ
+
+
+ com.cf.imes
+ cf-spring-boot-starter-elasticsearch
+
+
+ com.cf.imes
+ cf-spring-boot-starter-excel
+
+
+ com.cf.imes
+ cf-spring-boot-starter-file
+
+
+ com.cf.imes
+ cf-spring-boot-starter-monitor
+
+
+ com.cf.imes
+ cf-spring-boot-starter-mybatis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-redis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-rpc
+
+
+ com.cf.imes
+ cf-spring-boot-starter-security
+
+
+ com.cf.imes
+ cf-spring-boot-starter-web
+
+
+
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java
index ddbcf7cdd..9e2b4de9b 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/controller/admin/order/OrderController.java
@@ -50,6 +50,17 @@ import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.IMPORT
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
+import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
+import com.cf.imes.module.executor.service.order.OrderService;
+
+
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.concurrent.ExecutionException;
+
@Tag(name = "管理后台 - 生产单管理")
@RestController
@@ -273,17 +284,15 @@ public class OrderController {
@RequestParam(value = "type") Integer type,
@RequestParam(value = "index", required = false, defaultValue = "0") Integer index,
@RequestParam(value = "id", required = false, defaultValue = "0") Long orderId,
- HttpServletResponse response) {
+ HttpServletResponse response) throws Exception {
+ List list = null;
+ OrderXmlVO orderXmlVO = null;
+
+ OrderDO orderDO = null;
+ Map mapOrder = null;
+
+ Boolean flag = true;
try {
- List list = null;
- OrderXmlVO orderXmlVO = null;
-
- OrderDO orderDO = null;
- Map mapOrder;
-
- Boolean flag = true;
-
-
if (type == 0) { //excel
excelReadUtil.setErr(0);
Map map = excelReadUtil.read(file);
@@ -333,6 +342,7 @@ public class OrderController {
} else if (type == 2) { // xml
orderXmlVO = (OrderXmlVO) XMLUtil.read(file, OrderXmlVO.class);
+ System.out.println("1、 " + orderXmlVO);
if (index == 0){
if (orderXmlVO != null) {
@@ -356,16 +366,18 @@ public class OrderController {
orderXmlVO = new OrderXmlVO().setMemo("生产单内容为空");
flag = false;
} else if (orderDO.getCustomOrderNo() != null && !orderService.customOrderNoIsExists(orderDO.getCustomOrderNo())) {
- orderXmlVO.setCustomOrderNo(orderXmlVO.getCustomOrderNo() + "自定义单号重复");
+ orderXmlVO.setOrderCode(orderXmlVO.getOrderCode() + "自定义单号重复");
flag = false;
} else if (flag){ // 生产单的内容正确
if (orderXmlVO.getMaterialXmlVO().getPlateXmlVOS().getPlateXmlVOList().size() == 0) {
orderDO.setStatus(OrderStatusEnum.EMPTY.getStatus());
} else {
orderDO.setStatus(OrderStatusEnum.NEW_ORDER.getStatus());
+ flag = xmlUtil.checkVO(orderXmlVO);
}
}
if (!flag){
+ System.out.println("xml = " + orderXmlVO);
String xmlStr = XmlBuilder.objectToXmlStr(orderXmlVO);
XMLUtil.writeErr(response, xmlStr, " 错误.xml");
return;
@@ -374,6 +386,12 @@ public class OrderController {
orderService.importExcelData(orderDO, type , index, list, orderXmlVO);
} catch (Exception e) {
log.error("文件导入异常", e);
+ if (type == 0) {
+ ExcelWriterUtil.write(response, mapOrder, list, orderService.getSavePath() + File.separator + "order_add_excel_err.xlsx");
+ } else if (type == 2) {
+ String xmlStr = XmlBuilder.objectToXmlStr(orderXmlVO);
+ XMLUtil.writeErr(response, xmlStr, " 错误.xml");
+ }
}
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/dataobject/ordermodel/OrderModelDO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/dataobject/ordermodel/OrderModelDO.java
index 980610647..41f6a7e6d 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/dataobject/ordermodel/OrderModelDO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/dataobject/ordermodel/OrderModelDO.java
@@ -69,8 +69,10 @@ public class OrderModelDO extends ESDocument {
private List rawPointDetail;
@Schema(description = "孔明细列表")
private List holeDetail;
- @Schema(description = "造型明细")
+ @Schema(description = "造型明细(凹槽)")
private List contourDetail;
+ @Schema(description = "造型明细(孤岛,现在是xml数据格式添加)")
+ private List isletsDetail ; //造型明细(孤岛)
@Schema(description = "侧面孔明细列表")
private List sideHoleDetail;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateGoodMapper.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateGoodMapper.java
index f2aa7261b..6f3500231 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateGoodMapper.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/dal/mysql/plate/PlateGoodMapper.java
@@ -18,8 +18,8 @@ import java.util.List;
public interface PlateGoodMapper extends BaseMapperX {
// goodsId匹配
- default PlateGoodDO selectGoodOne(String id, Long organId) {
- return selectOne(new LambdaQueryWrapper()
+ default List selectGoodOne(String id, Long organId) {
+ return selectList(new LambdaQueryWrapper()
.eq(PlateGoodDO::getGoodsId, id)
.eq(PlateGoodDO::getDeleted, 0)
.eq(PlateGoodDO::getOrganId, organId));
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/order/OrderServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/order/OrderServiceImpl.java
index ff86d0e47..85bfe26d8 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/order/OrderServiceImpl.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/order/OrderServiceImpl.java
@@ -51,6 +51,7 @@ import com.cf.imes.module.executor.enums.OrderDeletedEnum;
import com.cf.imes.module.executor.enums.OrderStatusEnum;
import com.cf.imes.module.executor.service.plan.PlanService;
import com.cf.imes.module.executor.util.deviseData.structure.PlateDetail;
+import com.cf.imes.module.executor.util.fileConversion.admin.SnowflakeIdWorker3rd;
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.ExcelTypeRealize;
@@ -136,6 +137,9 @@ public class OrderServiceImpl implements OrderService {
@Resource
private ApiDataAchieve apiDataAchieve;
+ @Resource
+ private SnowflakeIdWorker3rd idWorker;
+
@Resource
private ApiTypeRealize apiTypeRealize;
@@ -864,11 +868,11 @@ public class OrderServiceImpl implements OrderService {
PlateGoodDO plateGoodDO = null;
List plateGoodDOS = null;
if (goodsDO.getGoodsId() != null) { // 有goodsId
- plateGoodDO = plateGoodMapper.selectGoodOne(goodsDO.getGoodsId(), SecurityFrameworkUtils.getLoginUser().getOrganId());
+ plateGoodDO = plateGoodMapper.selectGoodOne(goodsDO.getGoodsId(), OrganContextHolder.getOrganId()).get(0);
} else { // 没有goodsId 其他信息匹配
plateGoodDOS = plateGoodMapper.selectGood(goodsDO.getGoodsName(), goodsDO.getMaterial(), goodsDO.getColor(),
goodsDO.getTexture(), goodsDO.getWidth(), goodsDO.getThickness(), goodsDO.getHeight(), goodsDO.getBrand(),
- goodsDO.getSpec(), SecurityFrameworkUtils.getLoginUser().getOrganId());
+ goodsDO.getSpec(), OrganContextHolder.getOrganId());
}
if (plateGoodDOS != null && plateGoodDOS.size() > 0) {//存在板材
@@ -877,10 +881,13 @@ public class OrderServiceImpl implements OrderService {
goodsDO.setGoodsId(plateGoodDO.getGoodsId());
} else { // 不存在板材
Long plateGoods = (Long) identifierGenerator.nextId(null);
- Long goodsId = (Long) identifierGenerator.nextId(null);
+ long plateNo = idWorker.nextId();
+ long obtainingTime = idWorker.obtainingTime();
+
+// Long goodsId = (Long) identifierGenerator.nextId(null);
plateGoodDO = BeanUtils.toBean(goodsDO, PlateGoodDO.class)
.setId(plateGoods)
- .setGoodsId(String.valueOf(goodsId));
+ .setGoodsId((obtainingTime) + Long.toString(plateNo).substring(2));
// 判断是否存在raw_goods_id
if (goodsDO.getGoodsId() != null) {
plateGoodDO.setGoodsId(goodsDO.getGoodsId());
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/IOriginModelingData.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/IOriginModelingData.java
index 3b68e007a..44a1fe082 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/IOriginModelingData.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/IOriginModelingData.java
@@ -39,4 +39,8 @@ public class IOriginModelingData {
private Double addWidth;
@Schema(description = "槽加深")
private Double addDepth;
+
+// ============ 启用 api =============
+ @Schema(description = "点列表")
+ private List pointList;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/ModelDetail.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/ModelDetail.java
index 2267dacc3..69d90271b 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/ModelDetail.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/ModelDetail.java
@@ -18,15 +18,34 @@ import java.util.List;
@Schema(description = "管理后台 - 造型信息")
public class ModelDetail {
+ @Schema(description = "造型ID")
+ private Integer id;
+ @Schema(description = "父ID")
+ private Integer parentId;
+
@Schema(description = "类型——矩形槽Rectangle、路径槽Path、内铣槽internalMilling、折返路径槽turnbackPath")
private String type;
@Schema(description = "使用字典进行解析 造型排版面 0正面, 1反面, 2侧面")
private Integer faceType;
+ @Schema(description = "造型长度")
+ private Double width;
+ @Schema(description = "造型宽度")
+ private Double length;
@Schema(description = "造型深度")
private Double depth;
+ @Schema(description = "圆角半径")
+ private Double round;
+
+ @Schema(description = "刀路冗余量(偏移重叠量)")
+ private Double redundance;
+ @Schema(description = "角度(二维刀路V型刀提角/清角用)")
+ private Double tangentAngle;
+
+ @Schema(description = "造型数量")
+ private Integer count;
@Schema(description = "造像使用刀具名称")
private String knifeName;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/PlateDetail.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/PlateDetail.java
index 2b947e41c..25d278ad7 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/PlateDetail.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/deviseData/structure/PlateDetail.java
@@ -95,7 +95,8 @@ public class PlateDetail{
private List rawPointDetail ; //原始点明细(含封边)
private List holeDetail ; //孔明细,表示板上的孔
- private List contourDetail ; //造型明细
+ private List contourDetail ; //造型明细(凹槽)
+ private List isletsDetail ; //造型明细(孤岛)
private List sideHoleDetail;//侧面孔明细
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/ToolUtil.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/ToolUtil.java
index c7c6075e3..7d90262e3 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/ToolUtil.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/ToolUtil.java
@@ -57,7 +57,12 @@ public class ToolUtil {
// 数据类型转换
public static Boolean convertToType(String str, Class> targetType) {
try {
- Method method = targetType.getMethod("parse" + targetType.getSimpleName(), String.class);
+ Method method;
+ if (targetType.getSimpleName().equals("Integer")) {
+ method = targetType.getMethod("parseInt", String.class);
+ } else {
+ method = targetType.getMethod("parse" + targetType.getSimpleName(), String.class);
+ }
method.invoke(null, str);
return true;
} catch (Exception e) {
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java
index b636bd253..188c24c3a 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/api/webcad/ApiTypeRealize.java
@@ -931,6 +931,24 @@ public class ApiTypeRealize {
.build());
}
}
+
+ List pointListInOrigin = new ArrayList<>();
+ if (model.getJSONArray("OriginModeling") != null && !model.getJSONArray("OriginModeling").isEmpty()) {
+ for (int j = 0; j < model.getJSONArray("OriginModeling").size(); j++) {
+ JSONObject point = model.getJSONArray("OriginModeling").getJSONObject(j);
+ String[] points = splitAndTrim(point.getString("Pos"));
+ pointListInOrigin.add(PointList.builder()
+ .pointX(Double.valueOf(points[X]))
+ .pointY(Double.valueOf(points[Y]))
+ .pointZ(Double.valueOf(points[Z]))
+ .curve(Double.valueOf(point.getString("Curve")))
+ .build());
+ }
+ }
+ IOriginModelingData originModeling = IOriginModelingData.builder()
+ .pointList(pointListInOrigin)
+ .build();
+
modelDetails.add(ModelDetail.builder()
.depth(Double.valueOf(model.getString("Depth")))
.faceType(Integer.valueOf(model.getString("Face")))
@@ -938,6 +956,7 @@ public class ApiTypeRealize {
.knifeRadius(Double.valueOf(model.getString("Diameter")) / 2)
.pointList(pointLists)
.offSetList(offSetLists)
+ .originModeling(originModeling)
.build());
}
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/AssemblyXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/AssemblyXmlVO.java
index 56df3818d..01f5907fc 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/AssemblyXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/AssemblyXmlVO.java
@@ -15,18 +15,14 @@ import java.io.Serializable;
// 组件/部件信息
public class AssemblyXmlVO implements Serializable {
- // 五金ID
- @XmlAttribute(name = "组件/部件ID")
- private String id;
+ // 五金物料编码
+ @XmlAttribute(name = "itemCode")
+ private String itemCode;
// 类型——抽屉Drawer、酒格WineGrid、框架/拼框门FrameDoor、线条(顶线、脚线、挡水条等)Line、桌面/台面TableTop、水槽Sink……
@XmlAttribute(name = "type")
private String type;
- // 物料编码
- @XmlAttribute(name = "itemNo")
- private String itemNo;
-
// 厂家
@XmlAttribute(name = "manufacturer")
private String manufacturer;
@@ -67,7 +63,7 @@ public class AssemblyXmlVO implements Serializable {
@XmlAttribute(name = "count")
private String count;
- // 单位
+ // 长度单位
@XmlAttribute(name = "unit")
private String unit;
@@ -83,25 +79,37 @@ public class AssemblyXmlVO implements Serializable {
@XmlAttribute(name = "shelf")
private String shelf;
- // 房间ID
- @XmlAttribute(name = "roomId")
- private String roomId;
+ // 房间名称
+ @XmlAttribute(name = "roomName")
+ private String roomName;
- // 柜体ID
- @XmlAttribute(name = "boxId")
- private String boxId;
+ // 房间号
+ @XmlAttribute(name = "roomCode")
+ private String roomCode;
- // 加工组ID
- @XmlAttribute(name = "groupId")
- private String groupId;
+ // 柜体名称
+ @XmlAttribute(name = "boxName")
+ private String boxName;
- // 模块ID
- @XmlAttribute(name = "moduleId")
- private String moduleId;
+ // 柜体号
+ @XmlAttribute(name = "boxCode")
+ private String boxCode;
- // 父ID
- @XmlAttribute(name = "parentId")
- private String parentId;
+ // 加工组号
+ @XmlAttribute(name = "groupCode")
+ private String groupCode;
+
+ // 模块名称
+ @XmlAttribute(name = "moduleName")
+ private String moduleName;
+
+ // 模块号
+ @XmlAttribute(name = "moduleCode")
+ private String moduleCode;
+
+ // 父物料编码
+ @XmlAttribute(name = "parentCode")
+ private String parentCode;
// 备注
@XmlElement(name = "Remarks")
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BlockXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BlockXmlVO.java
index b8a4f6960..ab2976392 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BlockXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BlockXmlVO.java
@@ -15,35 +15,35 @@ import java.io.Serializable;
// 板件信息
public class BlockXmlVO implements Serializable {
- // 板件ID
- @XmlAttribute(name = "id")
- private String id;
-
// 设计编号
- @XmlAttribute(name = "designNo")
- private String designNo;
+ @XmlAttribute(name = "designCode")
+ private String designCode;
// 生产编号
- @XmlAttribute(name = "productionNo")
- private String productionNo;
+ @XmlAttribute(name = "productionCode")
+ private String productionCode;
// 名称
@XmlAttribute(name = "name")
private String name;
- // 类型——类型——背板类、层板类、立板类
+ // 类型——类型——背板类、层板类、立板类 -- order_plate_type
@XmlAttribute(name = "type")
private String type;
- // 开向——左开、右开、上开(上翻)、下开(下翻)、非门板
+ // 是否见光板/面板 ——是/否
+ @XmlAttribute(name = "visible")
+ private String visible;
+
+ // 开向——左开、右开、上开、下开、非门板 -- doorOpeningDirections
@XmlAttribute(name = "openDirection")
private String openDirection;
- // 设计纹路——正纹、反纹、可翻转
+ // 设计纹路——正纹、反纹、可翻转 -- grainType
@XmlAttribute(name = "texture")
private String texture;
- // 设计饰面——无、单面贴皮/涂装(正面、反面)、双面贴皮/涂装(不同色、同色)
+ // 设计饰面——无、单面、双面
@XmlAttribute(name = "coatingType")
private String coatingType;
@@ -83,11 +83,11 @@ public class BlockXmlVO implements Serializable {
@XmlAttribute(name = "cuttingThickness")
private String cuttingThickness;
- // 成倍数量
+ // 成倍拆单数量
@XmlAttribute(name = "multipleNumber")
private String multipleNumber;
- // 成倍序号
+ // 成倍拆单序号
@XmlAttribute(name = "multipleNo")
private String multipleNo;
@@ -99,7 +99,7 @@ public class BlockXmlVO implements Serializable {
@XmlAttribute(name = "slotting")
private String slotting;
- // 排版面——设计正面、设计反面、随意面
+ // 排版面——设计正面、设计反面、随意面 -- typographyType
@XmlAttribute(name = "layoutFace")
private String layoutFace;
@@ -112,40 +112,42 @@ public class BlockXmlVO implements Serializable {
private String coatingReverse;
// 长度单位
- @XmlAttribute(name = "unitLength")
- private String unitLength;
-
- // 面积单位
- @XmlAttribute(name = "unitArea")
- private String unitArea;
-
- // 成品面积
- @XmlAttribute(name = "area")
- private String area;
-
- // 开料面积
- @XmlAttribute(name = "areaCutting")
- private String areaCutting;
+ @XmlAttribute(name = "unit")
+ private String unit;
// 是否钻孔
@XmlAttribute(name = "drilling")
private String drilling;
- // 房间ID
- @XmlAttribute(name = "roomId")
- private String roomId;
+ // 房间名称
+ @XmlAttribute(name = "roomName")
+ private String roomName;
- // 柜体ID
- @XmlAttribute(name = "boxId")
- private String boxId;
+ // 房间号
+ @XmlAttribute(name = "roomCode")
+ private String roomCode;
+
+ // 房间名称
+ @XmlAttribute(name = "boxName")
+ private String boxName;
+
+ // 柜体号
+ @XmlAttribute(name = "boxCode")
+ private String boxCode;
+
+ // 加工组号
+ @XmlAttribute(name = "groupCode")
+ private String groupCode;
+
+ // 模块名称
+ @XmlAttribute(name = "moduleName")
+ private String moduleName;
+
+ // 模块号
+ @XmlAttribute(name = "moduleCode")
+ private String moduleCode;
- // 加工组ID
- @XmlAttribute(name = "groupId")
- private String groupId;
- // 模块ID
- @XmlAttribute(name = "moduleId")
- private String moduleId;
// 基点X坐标
@XmlAttribute(name = "basePointX")
@@ -171,6 +173,8 @@ public class BlockXmlVO implements Serializable {
@XmlAttribute(name = "axisZrotate")
private String axisZrotate;
+
+
// 成品(设计成型/已封边/贴皮或涂装的板件)轮廓信息
@XmlElement(name = "Outline")
private OutlineXmlVO outlineXmlVO ;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BoxXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BoxXmlVO.java
index e5429d8c9..e4ddfdd6a 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BoxXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/BoxXmlVO.java
@@ -17,10 +17,6 @@ import java.io.Serializable;
@XmlAccessorType(XmlAccessType.FIELD)
public class BoxXmlVO implements Serializable {
- // 柜体ID
- @XmlAttribute(name = "id")
- private String id;
-
// 房间名称
@XmlAttribute(name = "name")
private String name;
@@ -41,6 +37,15 @@ public class BoxXmlVO implements Serializable {
@XmlAttribute(name = "length")
private String length;
+ // 成倍拆单数量
+ @XmlAttribute(name = "multipleNumber")
+ private String multipleNumber;
+
+ // 成倍拆单序号
+ @XmlAttribute(name = "multipleNo")
+ private String multipleNo;
+
+
// 基点X坐标
@XmlAttribute(name = "basePointX")
private String basePointX;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVO.java
index f93cb9363..fea9be591 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVO.java
@@ -17,7 +17,59 @@ import java.io.Serializable;
@XmlAccessorType(XmlAccessType.FIELD)
public class CorrelationXmlVO implements Serializable {
- // [关联五金ID/关联组件ID]
- @XmlAttribute(name = "id")
- private String id;
+ // 关联五金/关联组件物料编码
+ @XmlAttribute(name = "itemCode")
+ private String itemCode;
+
+ // 类型
+ @XmlAttribute(name = "type")
+ private String type;
+
+ // 厂家
+ @XmlAttribute(name = "manufacturer")
+ private String manufacturer;
+
+ // 品牌
+ @XmlAttribute(name = "brand")
+ private String brand;
+
+ // 名称
+ @XmlAttribute(name = "name")
+ private String name;
+
+ // 材质
+ @XmlAttribute(name = "material")
+ private String material;
+
+ // 颜色
+ @XmlAttribute(name = "color")
+ private String color;
+
+ // 规格/类型
+ @XmlAttribute(name = "specs")
+ private String specs;
+
+ // 长
+ @XmlAttribute(name = "length")
+ private String length;
+
+ // 宽
+ @XmlAttribute(name = "width")
+ private String width;
+
+ // 高
+ @XmlAttribute(name = "height")
+ private String height;
+
+ // 长度单位
+ @XmlAttribute(name = "unit")
+ private String unit;
+
+ // 数量
+ @XmlAttribute(name = "count")
+ private String count;
+
+ // 数量单位
+ @XmlAttribute(name = "unitCount")
+ private String unitCount;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVOS.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVOS.java
index c68736b2d..1d52e003c 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVOS.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/CorrelationXmlVOS.java
@@ -4,10 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.*;
import java.io.Serializable;
import java.util.List;
@@ -18,6 +15,10 @@ import java.util.List;
@XmlAccessorType(XmlAccessType.FIELD)
public class CorrelationXmlVOS implements Serializable {
+ // 关联配件数量
+ @XmlAttribute(name = "count")
+ private String count;
+
// 房间
@XmlElement(name = "correlation")
private List correlationXmlVOList;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/EdgingXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/EdgingXmlVO.java
index 8b55addd1..c38ec8913 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/EdgingXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/EdgingXmlVO.java
@@ -15,13 +15,9 @@ import java.io.Serializable;
// 封边条信息
public class EdgingXmlVO implements Serializable {
- // 封边条ID
- @XmlAttribute(name = "id")
- private String id;
-
- // 物料编码
- @XmlAttribute(name = "itemNo")
- private String itemNo;
+ // 封边条物料编码
+ @XmlAttribute(name = "itemCode")
+ private String itemCode;
// 厂家
@XmlAttribute(name = "manufacturer")
@@ -79,25 +75,37 @@ public class EdgingXmlVO implements Serializable {
@XmlAttribute(name = "unitCount")
private String unitCount;
- // 房间ID
- @XmlAttribute(name = "roomId")
- private String roomId;
+ // 房间名称
+ @XmlAttribute(name = "roomName")
+ private String roomName;
- // 柜体ID
- @XmlAttribute(name = "boxId")
- private String boxId;
+ // 房间号
+ @XmlAttribute(name = "roomCode")
+ private String roomCode;
- // 加工组ID
- @XmlAttribute(name = "groupId")
- private String groupId;
+ // 柜体名称
+ @XmlAttribute(name = "boxName")
+ private String boxName;
- // 模块ID
- @XmlAttribute(name = "moduleId")
- private String moduleId;
+ // 柜体号
+ @XmlAttribute(name = "boxCode")
+ private String boxCode;
- // 父ID
- @XmlAttribute(name = "parentId")
- private String parentId;
+ // 加工组名称
+ @XmlAttribute(name = "groupName")
+ private String groupName;
+
+ // 加工组号
+ @XmlAttribute(name = "groupCode")
+ private String groupCode;
+
+ // 模块名称
+ @XmlAttribute(name = "moduleName")
+ private String moduleName;
+
+ // 模块号
+ @XmlAttribute(name = "moduleCode")
+ private String moduleCode;
// 备注
@XmlElement(name = "Remarks")
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVO.java
index 49202225a..8802bed73 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVO.java
@@ -91,4 +91,7 @@ public class GrooveXmlVO implements Serializable {
// 偏移刀路列表
@XmlElement(name = "offsetLines")
private OffsetLineXmlVOS offsetLineXmlVOS;
+
+ @XmlAttribute(name = "result")
+ private String result;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVOS.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVOS.java
index 20946770f..736d446ee 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVOS.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GrooveXmlVOS.java
@@ -20,18 +20,34 @@ public class GrooveXmlVOS implements Serializable {
@XmlAttribute(name = "count")
private String count;
- // 正面垂凹槽数量
+ // 正面垂凹槽数量/凹槽数量
@XmlAttribute(name = "countFaceA")
private String countFaceA;
- // 反面凹槽数量
+ // 反面凹槽数量/凹槽数量
@XmlAttribute(name = "countFaceB")
private String countFaceB;
- // 侧凹槽数量
+ // 侧凹槽数量/凹槽数量
@XmlAttribute(name = "countSide")
private String countSide;
+ // 左侧槽数量/凹槽数量
+ @XmlAttribute(name = "countSideL")
+ private String countSideL;
+
+ // 右侧槽数量/凹槽数量
+ @XmlAttribute(name = "countSideR")
+ private String countSideR;
+
+ // 上侧槽数量/凹槽数量
+ @XmlAttribute(name = "countSideU")
+ private String countSideU;
+
+ // 下侧槽数量/凹槽数量
+ @XmlAttribute(name = "countSideD")
+ private String countSideD;
+
// 斜面凹槽数量
@XmlAttribute(name = "countBevelled")
private String countBevelled;
@@ -44,6 +60,14 @@ public class GrooveXmlVOS implements Serializable {
@XmlAttribute(name = "countThrough")
private String countThrough;
+ // 二维造型刀路数量
+ @XmlAttribute(name = "count2V")
+ private String count2V;
+
+ // 三维造型刀路(浮雕)数量
+ @XmlAttribute(name = "count3D")
+ private String count3D;
+
// 凹槽信息
@XmlElement(name = "Groove")
private List grooveXmlVOList;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GroupXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GroupXmlVO.java
index 23b8751af..bf4de8884 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GroupXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/GroupXmlVO.java
@@ -17,10 +17,6 @@ import java.io.Serializable;
@XmlAccessorType(XmlAccessType.FIELD)
public class GroupXmlVO implements Serializable {
- // 加工组ID
- @XmlAttribute(name = "id")
- private String id;
-
// 加工组名称
@XmlAttribute(name = "name")
private String name;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HardwareXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HardwareXmlVO.java
index 88329ff81..49eb4d426 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HardwareXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HardwareXmlVO.java
@@ -15,18 +15,14 @@ import java.io.Serializable;
// 五金信息
public class HardwareXmlVO implements Serializable {
- // 五金ID
- @XmlAttribute(name = "id")
- private String id;
+ // 五金物料编码
+ @XmlAttribute(name = "itemCode")
+ private String itemCode;
// 类型——拉手Handle、铰链Hinge、导轨Track、衣杆/裤杆Pole、杆托/杆座PoleBase、拉直器Straightener、灯带LightBelt、螺丝(及螺母)Screw(Nut)……
@XmlAttribute(name = "type")
private String type;
- // 物料编码
- @XmlAttribute(name = "itemNo")
- private String itemNo;
-
// 厂家
@XmlAttribute(name = "manufacturer")
private String manufacturer;
@@ -67,7 +63,7 @@ public class HardwareXmlVO implements Serializable {
@XmlAttribute(name = "count")
private String count;
- // 单位
+ // 长度单位
@XmlAttribute(name = "unit")
private String unit;
@@ -83,25 +79,37 @@ public class HardwareXmlVO implements Serializable {
@XmlAttribute(name = "shelf")
private String shelf;
- // 房间ID
- @XmlAttribute(name = "roomId")
- private String roomId;
+ // 房间名称
+ @XmlAttribute(name = "roomName")
+ private String roomName;
- // 柜体ID
- @XmlAttribute(name = "boxId")
- private String boxId;
+ // 房间号
+ @XmlAttribute(name = "roomCode")
+ private String roomCode;
- // 加工组ID
- @XmlAttribute(name = "groupId")
- private String groupId;
+ // 柜体名称
+ @XmlAttribute(name = "boxName")
+ private String boxName;
- // 模块ID
- @XmlAttribute(name = "moduleId")
- private String moduleId;
+ // 柜体号
+ @XmlAttribute(name = "boxCode")
+ private String boxCode;
- // 父ID
- @XmlAttribute(name = "parentId")
- private String parentId;
+ // 加工组号
+ @XmlAttribute(name = "groupCode")
+ private String groupCode;
+
+ // 模块名称
+ @XmlAttribute(name = "moduleName")
+ private String moduleName;
+
+ // 模块号
+ @XmlAttribute(name = "moduleCode")
+ private String moduleCode;
+
+ // 父物料编码
+ @XmlAttribute(name = "parentCode")
+ private String parentCode;
// 备注
@XmlElement(name = "Remarks")
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVO.java
index caabba289..b7a0a3187 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVO.java
@@ -14,10 +14,6 @@ import java.io.Serializable;
@XmlAccessorType(XmlAccessType.FIELD)
public class HoleXmlVO implements Serializable {
- // 孔ID
- @XmlAttribute(name = "id")
- private String id;
-
// 孔类型
@XmlAttribute(name = "type")
private String type;
@@ -74,6 +70,59 @@ public class HoleXmlVO implements Serializable {
@XmlAttribute(name = "toolNo")
private String toolNo;
+ // 起点坐标X
+ @XmlAttribute(name = "startX")
+ private String startX;
+
+ // 起点坐标Y
+ @XmlAttribute(name = "startY")
+ private String startY;
+
+ // 起点坐标Z
+ @XmlAttribute(name = "startZ")
+ private String startZ;
+
+ // 刀具起点X轴旋转角度
+ @XmlAttribute(name = "toolStartRotateX")
+ private String toolStartRotateX;
+
+ // 刀具起点Y轴旋转角度
+ @XmlAttribute(name = "toolStartRotateY")
+ private String toolStartRotateY;
+
+ // 刀具起点Z轴旋转角度
+ @XmlAttribute(name = "toolStartRotateZ")
+ private String toolStartRotateZ;
+
+ // 终点坐标X
+ @XmlAttribute(name = "endX")
+ private String endX;
+
+ // 终点坐标Y
+ @XmlAttribute(name = "endY")
+ private String endY;
+
+ // 终点坐标Z
+ @XmlAttribute(name = "endZ")
+ private String endZ;
+
+ // 刀具终点X轴旋转角度
+ @XmlAttribute(name = "toolEndRotateX")
+ private String toolEndRotateX;
+
+ // 刀具终点Y轴旋转角度
+ @XmlAttribute(name = "toolEndRotateY")
+ private String toolEndRotateY;
+
+ // 刀具终点Z轴旋转角度
+ @XmlAttribute(name = "toolEndRotateZ")
+ private String toolEndRotateZ;
+
+
+
+
+
+ // 是否不要
@XmlElement(name = "Begin")
private PointBeginXmlVO pointBeginXmlVO;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVOS.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVOS.java
index fd6fa2d0e..b57295e6f 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVOS.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/HoleXmlVOS.java
@@ -32,6 +32,22 @@ public class HoleXmlVOS implements Serializable {
@XmlAttribute(name = "countSide")
private String countSide;
+ // 左侧孔数量
+ @XmlAttribute(name = "countSideL")
+ private String countSideL;
+
+ // 右侧孔数量
+ @XmlAttribute(name = "countSideR")
+ private String countSideR;
+
+ // 上侧孔数量
+ @XmlAttribute(name = "countSideU")
+ private String countSideU;
+
+ // 下侧孔数量
+ @XmlAttribute(name = "countSideD")
+ private String countSideD;
+
// 斜面孔数量
@XmlAttribute(name = "countBevelled")
private String countBevelled;
@@ -44,7 +60,11 @@ public class HoleXmlVOS implements Serializable {
@XmlAttribute(name = "countBuildIn")
private String countBuildIn;
- // 挖穿孔数量
+ // 铰链孔数量
+ @XmlAttribute(name = "countHinge")
+ private String countHinge;
+
+ // 挖穿孔数量(通孔/对成孔)
@XmlAttribute(name = "countThrough")
private String countThrough;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVO.java
index 54a96cf38..13ad7cafe 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVO.java
@@ -29,6 +29,6 @@ public class IsletXmlVO implements Serializable {
private String grooveCount;
// 孤岛点信息
- @XmlElement(name = "Point")
- private List pointXmlVOList;
+ @XmlElement(name = "Points")
+ private PointXmlVOS pointXmlVOS;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVOS.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVOS.java
index bcd177bba..503f1f5e2 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVOS.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/IsletXmlVOS.java
@@ -4,10 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.*;
import java.io.Serializable;
import java.util.List;
@@ -19,6 +16,10 @@ import java.util.List;
// 孤岛列表
public class IsletXmlVOS implements Serializable {
+ // 孤岛数量
+ @XmlAttribute(name = "count")
+ private String count;
+
// 房间
@XmlElement(name = "Islet")
private List isletXmlVOList;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/MaterialXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/MaterialXmlVO.java
index 2af12034f..e5f490e54 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/MaterialXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/MaterialXmlVO.java
@@ -10,7 +10,7 @@ import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
-@XmlRootElement(name = "Material")
+@XmlRootElement(name = "Materials")
@XmlAccessorType(XmlAccessType.FIELD)
// 物料信息
public class MaterialXmlVO implements Serializable {
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/ModuleXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/ModuleXmlVO.java
index b4de6bf05..42a9aa11c 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/ModuleXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/ModuleXmlVO.java
@@ -14,10 +14,6 @@ import java.io.Serializable;
@XmlAccessorType(XmlAccessType.FIELD)
public class ModuleXmlVO implements Serializable {
- // 模块ID
- @XmlAttribute(name = "id")
- private String id;
-
// 模块名称
@XmlAttribute(name = "name")
private String name;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVO.java
index af152f525..6d0f1ea9b 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVO.java
@@ -18,10 +18,6 @@ import java.io.Serializable;
// 偏移刀路信息
public class OffsetLineXmlVO implements Serializable {
- // 偏移刀路ID
- @XmlAttribute(name = "id")
- private String id;
-
// 偏移值——正值外偏/右偏、负值内偏/左偏
@XmlAttribute(name = "offset")
private String offset;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVOS.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVOS.java
index 7e215727f..14189e2ff 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVOS.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OffsetLineXmlVOS.java
@@ -4,10 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.*;
import java.io.Serializable;
import java.util.List;
@@ -19,6 +16,10 @@ import java.util.List;
// 偏移刀路列表
public class OffsetLineXmlVOS implements Serializable {
+ // 偏移刀路数量
+ @XmlAttribute(name = "count")
+ private String count;
+
@XmlElement(name = "offsetLine")
private List offsetLineXmlVOList;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OrderXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OrderXmlVO.java
index f87f036cf..09165b9c3 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OrderXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/OrderXmlVO.java
@@ -13,17 +13,14 @@ import java.io.Serializable;
@XmlRootElement(name = "Order")
@XmlAccessorType(XmlAccessType.FIELD)
public class OrderXmlVO implements Serializable {
- // 订单ID
- @XmlAttribute(name = "id")
- private String id;
// 订单编号
@XmlAttribute(name = "orderNo")
private String orderNo;
// 订单自定义编号
- @XmlAttribute(name = "customOrderNo")
- private String customOrderNo;
+ @XmlAttribute(name = "orderCode")
+ private String orderCode;
// 客户
@XmlAttribute(name = "customer")
@@ -110,7 +107,7 @@ public class OrderXmlVO implements Serializable {
private GroupXmlVOS groupXmlVOS;
// 材质信息
- @XmlElement(name = "Material")
+ @XmlElement(name = "Materials")
private MaterialXmlVO materialXmlVO;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVO.java
index 7f768fdd6..2d4e48f12 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVO.java
@@ -15,13 +15,9 @@ import java.io.Serializable;
// 板材信息
public class PlateXmlVO implements Serializable {
- // 板材ID
- @XmlAttribute(name = "id")
- private String id;
-
// 物料编码
- @XmlAttribute(name = "itemNo")
- private String itemNo;
+ @XmlAttribute(name = "itemCode")
+ private String itemCode;
// 厂家
@XmlAttribute(name = "manufacturer")
@@ -39,19 +35,19 @@ public class PlateXmlVO implements Serializable {
@XmlAttribute(name = "material")
private String material;
- // 饰面类型——无、单面贴皮/涂装、双面贴皮/涂装
+ // 饰面类型——无、单面、双面
@XmlAttribute(name = "coating")
private String coating;
- // 有无纹理
+ // 有无纹理 有 无
@XmlAttribute(name = "grained")
private String grained;
- // 正面饰面颜色、无
+ // 正面饰面颜色、无(空)
@XmlAttribute(name = "coatingObverse")
private String coatingObverse;
- // 反面饰面颜色、无
+ // 反面饰面颜色、无(空)
@XmlAttribute(name = "coatingReverse")
private String coatingReverse;
@@ -115,6 +111,10 @@ public class PlateXmlVO implements Serializable {
@XmlAttribute(name = "memo")
private String memo;
+ // 数量
+ @XmlAttribute(name = "count")
+ private String count;
+
@XmlElement(name = "Blocks")
private BlockXmlVOS blockXmlVOS;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVOS.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVOS.java
index 558c5531c..f69cff0f9 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVOS.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PlateXmlVOS.java
@@ -21,7 +21,7 @@ public class PlateXmlVOS implements Serializable {
@XmlElement( name = "Plate")
private List plateXmlVOList;
- // 上传结果
+ // 上传结果 内置
@XmlElement( name = "result")
private String result;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVO.java
index c213ce0bd..566e92a21 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVO.java
@@ -18,10 +18,6 @@ import java.io.Serializable;
// 孤岛点信息
public class PointXmlVO implements Serializable {
- // 点ID
- @XmlAttribute(name = "id")
- private String id;
-
// 点X坐标
@XmlAttribute(name = "pointX")
private String pointX;
@@ -30,7 +26,7 @@ public class PointXmlVO implements Serializable {
@XmlAttribute(name = "pointY")
private String pointY;
- // 点Z坐标
+ // 点Z坐标 (在outline中不用)
@XmlAttribute(name = "pointZ")
private String pointZ;
@@ -46,13 +42,13 @@ public class PointXmlVO implements Serializable {
@XmlAttribute(name = "process")
private String process;
- // 封边条ID
- @XmlAttribute(name = "edgingId")
- private String edgingId;
+ // 封边条物料编码
+ @XmlAttribute(name = "itemCode")
+ private String itemCode;
- // 封边条厚度
- @XmlAttribute(name = "edgingThickness")
- private String edgingThickness;
+ // 封边条物料名称
+ @XmlAttribute(name = "edgingName")
+ private String edgingName;
// 封边条颜色
@XmlAttribute(name = "edgingColor")
@@ -62,7 +58,19 @@ public class PointXmlVO implements Serializable {
@XmlAttribute(name = "edgingMaterial")
private String edgingMaterial;
- // 封边条余量(两头)
+ // 封边条厚度
+ @XmlAttribute(name = "edgingThickness")
+ private String edgingThickness;
+
+ // 封边条宽度
+ @XmlAttribute(name = "edgingWidth")
+ private String edgingWidth;
+
+ // 封边条长度
+ @XmlAttribute(name = "edgingLength")
+ private String edgingLength;
+
+ // 封边条余量
@XmlAttribute(name = "edgingExtend")
private String edgingExtend;
@@ -70,7 +78,7 @@ public class PointXmlVO implements Serializable {
@XmlAttribute(name = "preMilling")
private String preMilling;
- // 延展/收缩量
+ // 延展/收缩量,预留边
@XmlAttribute(name = "scale")
private String scale;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVOS.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVOS.java
index 7fc7d6c58..379a48d97 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVOS.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/PointXmlVOS.java
@@ -4,10 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.*;
import java.io.Serializable;
import java.util.List;
@@ -18,6 +15,13 @@ import java.util.List;
@XmlAccessorType(XmlAccessType.FIELD)
public class PointXmlVOS implements Serializable {
+ // 刀路点阵数量
+ @XmlAttribute(name = "count")
+ private String count;
+
@XmlElement(name = "Point")
private List pointXmlVOList;
+
+ @XmlAttribute(name = "result")
+ private String result;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RemarkXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RemarkXmlVO.java
index 666df5d93..0e1570ab2 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RemarkXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RemarkXmlVO.java
@@ -17,10 +17,6 @@ import java.io.Serializable;
@XmlAccessorType(XmlAccessType.FIELD)
public class RemarkXmlVO implements Serializable {
- // 备注ID
- @XmlAttribute(name = "id")
- private String id;
-
// 备注名称
@XmlAttribute(name = "name")
private String name;
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RoomXmlVO.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RoomXmlVO.java
index d00b74640..e953cea17 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RoomXmlVO.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/VO/RoomXmlVO.java
@@ -15,10 +15,6 @@ import java.util.List;
@XmlAccessorType(XmlAccessType.FIELD)
public class RoomXmlVO implements Serializable {
- // 房间ID
- @XmlAttribute(name = "id")
- private String id;
-
// 房间名称
@XmlAttribute(name = "name")
private String name;
@@ -39,10 +35,43 @@ public class RoomXmlVO implements Serializable {
@XmlAttribute(name = "length")
private String length;
- // 房间数量
+ // 成倍拆单数量
+ @XmlAttribute(name = "multipleNumber")
+ private String multipleNumber;
+
+ // 成倍拆单序号
+ @XmlAttribute(name = "multipleNo")
+ private String multipleNo;
+
+ // 柜体数量
@XmlAttribute(name = "count")
private String count;
+
+ // 基点X坐标
+ @XmlAttribute(name = "basePointX")
+ private String basePointX;
+
+ // 基点Y坐标
+ @XmlAttribute(name = "basePointY")
+ private String basePointY;
+
+ // 基点Z坐标
+ @XmlAttribute(name = "basePointZ")
+ private String basePointZ;
+
+ // 绕X轴旋转角度
+ @XmlAttribute(name = "axisXrotate")
+ private String axisXrotate;
+
+ // 绕Y轴旋转角度
+ @XmlAttribute(name = "axisYrotate")
+ private String axisYrotate;
+
+ // 绕Z轴旋转角度
+ @XmlAttribute(name = "axisZrotate")
+ private String axisZrotate;
+
@XmlElement(name = "Box")
private List boxXmlVOList;
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XMLUtil.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XMLUtil.java
index 36ad584c2..72cb28c8b 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XMLUtil.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XMLUtil.java
@@ -88,22 +88,11 @@ public class XMLUtil {
Map map = new HashMap<>();
boolean error = true;
- if (orderXmlVO.getCustomOrderNo() == null) {
- orderXmlVO.setCustomOrderNo("---< 客户不能为空 >---");
+ if (orderXmlVO.getCustomer() == null) {
+ orderXmlVO.setCustomer("---< 客户名不能为空 >---");
error = false;
}
- if (orderXmlVO.getDealer() == null) {
- orderXmlVO.setDealer("---< 经销商不能为空 >---");
- error = false;
- }
- if (orderXmlVO.getCustomerAddress() == null) {
- orderXmlVO.setCustomerAddress("---< 客户地址不能为空 >---");
- error = false;
- }
- if (orderXmlVO.getCustomerPhone() == null) {
- orderXmlVO.setCustomerPhone("---< 客户电话不能为空 >---");
- error = false;
- } else {
+ if (orderXmlVO.getCustomerPhone() != null) {
if (!ToolUtil.validatePhoneNumber(orderXmlVO.getCustomerPhone())) {
orderXmlVO.setCustomerPhone("---< " + orderXmlVO.getCustomerPhone() + "客户电话格式错误 >---");
error = false;
@@ -115,13 +104,30 @@ public class XMLUtil {
error = false;
}
}
+ if (orderXmlVO.getSellerPhone() != null) {
+ if (!ToolUtil.validatePhoneNumber(orderXmlVO.getSellerPhone())) {
+ orderXmlVO.setSellerPhone("---< " + orderXmlVO.getSellerPhone() + "业务员电话格式错误 >---");
+ error = false;
+ }
+ }
+ if (orderXmlVO.getDesignerPhone() != null) {
+ if (!ToolUtil.validatePhoneNumber(orderXmlVO.getDesignerPhone())) {
+ orderXmlVO.setDesignerPhone("---< " + orderXmlVO.getDesignerPhone() + "设计师电话格式错误 >---");
+ error = false;
+ }
+ }
+ if (orderXmlVO.getAnalystPhone() != null) {
+ if (!ToolUtil.validatePhoneNumber(orderXmlVO.getAnalystPhone())) {
+ orderXmlVO.setAnalystPhone("---< " + orderXmlVO.getAnalystPhone() + "解单员电话格式错误 >---");
+ error = false;
+ }
+ }
LocalDate orderDate = null;
LocalDate deliverDate = null;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
Map mapDate = ToolUtil.changeDate(orderXmlVO.getOrderDate(), formatter);
if (orderXmlVO.getOrderDate() == null) {
- orderXmlVO.setOrderDate("---< 订单日期不能为空 >---");
- error = false;
+ orderDate = LocalDate.now();
} else {
if (mapDate.get("error") instanceof Integer && (Integer) mapDate.get("error") == -1) {
orderXmlVO.setOrderDate("---< " + orderXmlVO.getOrderDate() + "订单日期格式错误 >---");
@@ -132,8 +138,7 @@ public class XMLUtil {
}
mapDate = ToolUtil.changeDate(orderXmlVO.getDeliveryDate(), formatter);
if (orderXmlVO.getDeliveryDate() == null) {
- orderXmlVO.setDeliveryDate("---< 出货日期不能为空 >---");
- error = false;
+ deliverDate = orderDate.plus(30, ChronoUnit.DAYS);
} else {
if (mapDate.get("error") instanceof Integer && (Integer) mapDate.get("error") == -1) {
orderXmlVO.setDeliveryDate("---< " + orderXmlVO.getDeliveryDate() + "出货日期格式错误 >---");
@@ -152,7 +157,7 @@ public class XMLUtil {
.organId(organId)
.dataType(DataTypeEnum.FILE_IMPORT.getStatus())
.customer(orderXmlVO.getCustomer())
- .customOrderNo(orderXmlVO.getCustomOrderNo())
+ .customOrderNo(orderXmlVO.getOrderCode())
.dealer(orderXmlVO.getDealer())
.dealerPhoneNumber(orderXmlVO.getDealerPhone())
.address(orderXmlVO.getCustomerAddress())
@@ -195,70 +200,254 @@ public class XMLUtil {
MaterialXmlVO materialXmlVO = orderXmlVO.getMaterialXmlVO();
if ( materialXmlVO != null ) {
PlateXmlVOS plateXmlVOS = materialXmlVO.getPlateXmlVOS();
- if (plateXmlVOS != null) {
+ if (plateXmlVOS != null && plateXmlVOS.getPlateXmlVOList().size() > 0) {
+ checkPlates(plateXmlVOS.getPlateXmlVOList(), flag);
+ }
- } else {
- materialXmlVO.setPlateXmlVOS(new PlateXmlVOS().setResult("---< 板材信息不能为空 >---"));
+ AccessoryXmlVO accessoryXmlVO = materialXmlVO.getAccessoryXmlVO(); //配件
+ if (accessoryXmlVO != null ){
+ checkEdgings(accessoryXmlVO.getEdgingXmlVOS(), flag);
+ checkHardwares(accessoryXmlVO.getHardwareXmlVOS(), flag);
+ }
+
+ AssemblieXmlVOS assemblieXmlVOS = materialXmlVO.getAssemblieXmlVOS(); // 组件
+ if (assemblieXmlVOS != null && assemblieXmlVOS.getAssemblyXmlVOList() != null && assemblieXmlVOS.getAssemblyXmlVOList().size() > 0) {
+ checkAssemblies(assemblieXmlVOS, flag);
}
}
return flag;
}
+ private void checkAssemblies(AssemblieXmlVOS assemblieXmlVOS, Boolean flag) {
+ if (assemblieXmlVOS != null && assemblieXmlVOS.getAssemblyXmlVOList().size() > 0) {
+ for (AssemblyXmlVO assemblyXmlVO : assemblieXmlVOS.getAssemblyXmlVOList()) {
+ if (StringUtils.isEmpty(assemblyXmlVO.getName())){
+ assemblyXmlVO.setName("---< 组件名称不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(assemblyXmlVO.getMaterial())){
+ assemblyXmlVO.setMaterial("---< 组件材质不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(assemblyXmlVO.getColor())){
+ assemblyXmlVO.setColor("---< 组件颜色不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(assemblyXmlVO.getCount())){
+ assemblyXmlVO.setCount("---< 组件数量不能为空 >---");
+ flag = false;
+ } else {
+ if (!checkNumber(assemblyXmlVO.getCount().trim(), Double.class)){
+ assemblyXmlVO.setCount("---< " + assemblyXmlVO.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ flag = false;
+ }
+ }
+ if (StringUtils.isEmpty(assemblyXmlVO.getUnitCount())){
+ assemblyXmlVO.setUnit("---< 组件数量单位不能为空 >---");
+ flag = false;
+ }
+ }
+ }
+ }
+
+ private void checkHardwares(HardwareXmlVOS hardwareXmlVOS, Boolean flag) {
+ if (hardwareXmlVOS != null && hardwareXmlVOS.getHardwareXmlVOList().size() > 0) {
+ for (HardwareXmlVO hardwareXmlVO : hardwareXmlVOS.getHardwareXmlVOList()) {
+ if (StringUtils.isEmpty(hardwareXmlVO.getName())){
+ hardwareXmlVO.setName("---< 五金名称不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(hardwareXmlVO.getMaterial())){
+ hardwareXmlVO.setMaterial("---< 五金材质不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(hardwareXmlVO.getColor())){
+ hardwareXmlVO.setColor("---< 五金条颜色不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(hardwareXmlVO.getCount())){
+ hardwareXmlVO.setCount("---< 五金数量不能为空 >---");
+ flag = false;
+ } else {
+ if (!checkNumber(hardwareXmlVO.getCount().trim() , Double.class)){
+ hardwareXmlVO.setCount("---< " + hardwareXmlVO.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ flag = false;
+ }
+ }
+ if (StringUtils.isEmpty(hardwareXmlVO.getUnitCount())){
+ hardwareXmlVO.setUnitCount("---< 五金数量单位不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(hardwareXmlVO.getUnit())){
+ hardwareXmlVO.setUnit("---< 五金单位不能为空 >---");
+ flag = false;
+ }
+ }
+ }
+ }
+
+ private void checkEdgings(EdgingXmlVOS edgingXmlVOS, Boolean flag) {
+ if (edgingXmlVOS != null && edgingXmlVOS.getEdgingXmlVOList().size() > 0) {
+ for (EdgingXmlVO edgingXmlVO : edgingXmlVOS.getEdgingXmlVOList()) {
+ if (StringUtils.isEmpty(edgingXmlVO.getName())){
+ edgingXmlVO.setName("---< 封边条名称不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getMaterial())){
+ edgingXmlVO.setMaterial("---< 封边条材质不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getColor())){
+ edgingXmlVO.setColor("---< 封边条颜色不能为空 >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getLength())){
+ edgingXmlVO.setLength("---< 封边条长度不能为空 >---");
+ flag = false;
+ } else if (!checkNumber(edgingXmlVO.getLength().trim(), Double.class)){
+ edgingXmlVO.setLength("---< " + edgingXmlVO.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getWidth())){
+ edgingXmlVO.setWidth("---< 封边条宽度不能为空 >---");
+ flag = false;
+ } else if (!checkNumber(edgingXmlVO.getWidth().trim(), Double.class)){
+ edgingXmlVO.setWidth("---< " + edgingXmlVO.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getThickness())){
+ edgingXmlVO.setThickness("---< 封边条厚度不能为空 >---");
+ flag = false;
+ } else if (!checkNumber(edgingXmlVO.getThickness().trim(), Double.class)){
+ edgingXmlVO.setThickness("---< " + edgingXmlVO.getThickness() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getUnit())){
+ edgingXmlVO.setUnit("mm");
+ } else {
+ DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_LENGTH, edgingXmlVO.getUnit().trim()).getData();
+ if (dictData == null) {
+ edgingXmlVO.setUnit("---< " + edgingXmlVO.getUnit().trim() + "封边条长度单位无效 >---");
+ flag = false;
+ }
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getCount())){
+ edgingXmlVO.setCount("---< 封边条数量不能为空 >---");
+ flag = false;
+ } else if (!checkNumber(edgingXmlVO.getCount().trim(), Double.class)){
+ edgingXmlVO.setCount("---< " + edgingXmlVO.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ flag = false;
+ }
+ if (StringUtils.isEmpty(edgingXmlVO.getUnitCount())){
+ edgingXmlVO.setUnitCount("m");
+ flag = false;
+ } else {
+ DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_LENGTH, edgingXmlVO.getUnitCount().trim()).getData();
+ if (dictData == null) {
+ edgingXmlVO.setUnitCount(edgingXmlVO.getUnitCount() + "---< " + "封边条数量单位无效 >---");
+ }
+ }
+ }
+ }
+ }
+
// 房间数据格式验证
public void checkRoom(RoomXmlVOS roomXmlVOS, Boolean error) {
- if (StringUtils.isEmpty(roomXmlVOS.getCount())) {
- roomXmlVOS.setCount("---< 房间数量不能为空 >---");
- error = false;
- } else {
- if (ToolUtil.convertToType(roomXmlVOS.getCount(), Integer.class)){
- if (!ToolUtil.checkNumber(roomXmlVOS.getCount())){
- roomXmlVOS.setCount("---< " + roomXmlVOS.getCount() + POSITIVE_ERR + " >---");
+ if (!StringUtils.isEmpty(roomXmlVOS.getCount())) {
+ if (ToolUtil.convertToType(roomXmlVOS.getCount().trim(), Integer.class)){
+ if (!ToolUtil.checkNumber(roomXmlVOS.getCount().trim())){
+ roomXmlVOS.setCount(roomXmlVOS.getCount() + "---< " + POSITIVE_ERR + " >---");
error = false;
}
} else {
- roomXmlVOS.setCount("---< " + roomXmlVOS.getCount() + TYPE_ERR + " >---");
+ roomXmlVOS.setCount(roomXmlVOS.getCount() + "---< " + roomXmlVOS.getCount() + TYPE_ERR + " >---");
error = false;
}
}
for ( RoomXmlVO room : roomXmlVOS.getRoomXmlVOList() ) {
if (room != null){
- if (StringUtils.isEmpty(room.getId())){
- room.setId("---< 房间编号不能为空 >---");
- error = false;
- }
- if (StringUtils.isEmpty(room.getName())){
- room.setName("---< 房间名称不能为空 >---");
- error = false;
- }
if (!StringUtils.isEmpty(room.getHeight()) ){
- Boolean flag = checkNumber(room.getHeight(), Double.class);
+ Boolean flag = checkNumber(room.getHeight().trim(), Double.class);
if (!flag) {
- room.setHeight("---< " + room.getHeight() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ room.setHeight(room.getHeight() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
}
} else {
room.setHeight("0");
}
if (!StringUtils.isEmpty(room.getLength()) ){
- Boolean flag = checkNumber(room.getLength(), Double.class);
+ Boolean flag = checkNumber(room.getLength().trim(), Double.class);
if (!flag) {
- room.setLength("---< " + room.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ room.setLength(room.getLength() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
}
} else {
room.setLength("0");
}
if (!StringUtils.isEmpty(room.getWidth()) ){
- Boolean flag = checkNumber(room.getWidth(), Double.class);
+ Boolean flag = checkNumber(room.getWidth().trim(), Double.class);
if (!flag) {
- room.setWidth("---< " + room.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ room.setWidth(room.getWidth() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
}
}else {
room.setWidth("0");
}
-
+ if (!StringUtils.isEmpty(room.getMultipleNumber()) ){
+ Boolean flag = checkNumber(room.getMultipleNumber().trim(), Integer.class);
+ if (!flag) {
+ room.setMultipleNumber(room.getMultipleNumber() +"---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }else {
+ room.setMultipleNumber("1");
+ }
+ if (!StringUtils.isEmpty(room.getMultipleNo()) ){
+ Boolean flag = checkNumber(room.getMultipleNo().trim(), Integer.class);
+ if (!flag) {
+ room.setMultipleNo(room.getMultipleNo() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }else {
+ room.setMultipleNo("1");
+ }
+ if (!StringUtils.isEmpty(room.getBasePointX()) ){
+ if (!ToolUtil.convertToType(room.getBasePointX().trim(), Double.class)) {
+ room.setBasePointX("---< " + room.getBasePointX() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(room.getBasePointY()) ){
+ if (!ToolUtil.convertToType(room.getBasePointY().trim(), Double.class)) {
+ room.setBasePointY("---< " + room.getBasePointY() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(room.getBasePointZ()) ){
+ if (!ToolUtil.convertToType(room.getBasePointZ().trim(), Double.class)) {
+ room.setBasePointZ("---< " + room.getBasePointZ() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(room.getAxisXrotate()) ){
+ if (!ToolUtil.convertToType(room.getAxisXrotate().trim(), Double.class)) {
+ room.setAxisXrotate("---< " + room.getAxisXrotate() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(room.getAxisYrotate()) ){
+ if (!ToolUtil.convertToType(room.getAxisYrotate().trim(), Double.class)) {
+ room.setAxisYrotate("---< " + room.getAxisYrotate() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(room.getAxisZrotate()) ){
+ if (!ToolUtil.convertToType(room.getAxisZrotate().trim(), Double.class)) {
+ room.setAxisZrotate("---< " + room.getAxisZrotate() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ // 柜体数据格式验证
if (room.getBoxXmlVOList() != null && room.getBoxXmlVOList().size() > 0){
checkBoxList(room.getBoxXmlVOList(), error);
}
@@ -268,16 +457,8 @@ public class XMLUtil {
// 柜体数据格式验证
public void checkBoxList(List boxXmlVOList, Boolean error) {
for ( BoxXmlVO box : boxXmlVOList ) {
- if (StringUtils.isEmpty(box.getId())){
- box.setId("---< 柜体编号不能为空 >---");
- error = false;
- }
- if (StringUtils.isEmpty(box.getName())){
- box.setName("---< 柜体名称不能为空 >---");
- error = false;
- }
if (!StringUtils.isEmpty(box.getHeight()) ){
- Boolean flag = checkNumber(box.getHeight(), Double.class);
+ Boolean flag = checkNumber(box.getHeight().trim(), Double.class);
if (!flag) {
box.setHeight("---< " + box.getHeight() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -286,7 +467,7 @@ public class XMLUtil {
box.setHeight("0");
}
if (!StringUtils.isEmpty(box.getLength()) ){
- Boolean flag = checkNumber(box.getLength(), Double.class);
+ Boolean flag = checkNumber(box.getLength().trim(), Double.class);
if (!flag) {
box.setLength("---< " + box.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -295,7 +476,7 @@ public class XMLUtil {
box.setLength("0");
}
if (!StringUtils.isEmpty(box.getWidth()) ){
- Boolean flag = checkNumber(box.getWidth(), Double.class);
+ Boolean flag = checkNumber(box.getWidth().trim(), Double.class);
if (!flag) {
box.setWidth("---< " + box.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -304,58 +485,43 @@ public class XMLUtil {
box.setWidth("0");
}
if (!StringUtils.isEmpty(box.getBasePointX())){
- if (!ToolUtil.convertToType(box.getBasePointX(), Double.class)) {
+ if (!ToolUtil.convertToType(box.getBasePointX().trim(), Double.class)) {
box.setBasePointX("---< " + box.getBasePointX() + TYPE_ERR + " >---");
}
- } else {
- box.setBasePointX("0");
}
if (!StringUtils.isEmpty(box.getBasePointY())){
- if (!ToolUtil.convertToType(box.getBasePointY(), Double.class)) {
+ if (!ToolUtil.convertToType(box.getBasePointY().trim(), Double.class)) {
box.setBasePointY("---< " + box.getBasePointY() + TYPE_ERR + " >---");
}
- } else {
- box.setBasePointY("0");
}
if (!StringUtils.isEmpty(box.getBasePointZ())){
- if (!ToolUtil.convertToType(box.getBasePointZ(), Double.class)) {
+ if (!ToolUtil.convertToType(box.getBasePointZ().trim(), Double.class)) {
box.setBasePointZ("---< " + box.getBasePointZ() + TYPE_ERR + " >---");
}
- } else {
- box.setBasePointZ("0");
}
if (!StringUtils.isEmpty(box.getAxisYrotate())){
- if (!ToolUtil.convertToType(box.getAxisYrotate(), Double.class)) {
+ if (!ToolUtil.convertToType(box.getAxisYrotate().trim(), Double.class)) {
box.setAxisYrotate("---< " + box.getAxisYrotate() + TYPE_ERR + " >---");
}
- } else {
- box.setAxisYrotate("0");
}
if (!StringUtils.isEmpty(box.getAxisXrotate())){
- if (!ToolUtil.convertToType(box.getAxisXrotate(), Double.class)) {
+ if (!ToolUtil.convertToType(box.getAxisXrotate().trim(), Double.class)) {
box.setAxisXrotate("---< " + box.getAxisXrotate() + TYPE_ERR + " >---");
}
- } else {
- box.setAxisXrotate("0");
}
if (!StringUtils.isEmpty(box.getAxisZrotate())){
- if (!ToolUtil.convertToType(box.getAxisZrotate(), Double.class)) {
+ if (!ToolUtil.convertToType(box.getAxisZrotate().trim(), Double.class)) {
box.setAxisZrotate("---< " + box.getAxisZrotate() + TYPE_ERR + " >---");
}
- } else {
- box.setAxisZrotate("0");
}
}
}
// 模块数据格式验证
public void checkModules(ModuleXmlVOS moduleXmlVOS, Boolean error) {
- if (StringUtils.isEmpty(moduleXmlVOS.getCount())) {
- moduleXmlVOS.setCount("---< 模块数量不能为空 >---");
- error = false;
- } else {
- if (ToolUtil.convertToType(moduleXmlVOS.getCount(), Integer.class)){
- if (!ToolUtil.checkNumber(moduleXmlVOS.getCount())){
+ if (!StringUtils.isEmpty(moduleXmlVOS.getCount())) {
+ if (ToolUtil.convertToType(moduleXmlVOS.getCount().trim(), Integer.class)){
+ if (!ToolUtil.checkNumber(moduleXmlVOS.getCount().trim())){
moduleXmlVOS.setCount("---< " + moduleXmlVOS.getCount() + POSITIVE_ERR + " >---");
error = false;
}
@@ -372,16 +538,8 @@ public class XMLUtil {
// 模块数据格式验证
public void checkModuleList(List moduleXmlVOSList, Boolean error) {
for ( ModuleXmlVO module : moduleXmlVOSList ) {
- if (StringUtils.isEmpty(module.getId())){
- module.setId("---< 柜体编号不能为空 >---");
- error = false;
- }
- if (StringUtils.isEmpty(module.getName())){
- module.setName("---< 柜体名称不能为空 >---");
- error = false;
- }
if (!StringUtils.isEmpty(module.getLength()) ){
- Boolean flag = checkNumber(module.getLength(), Double.class);
+ Boolean flag = checkNumber(module.getLength().trim(), Double.class);
if (!flag) {
module.setLength("---< " + module.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -390,7 +548,7 @@ public class XMLUtil {
module.setLength("0");
}
if (!StringUtils.isEmpty(module.getWidth()) ){
- Boolean flag = checkNumber(module.getWidth(), Double.class);
+ Boolean flag = checkNumber(module.getWidth().trim(), Double.class);
if (!flag) {
module.setWidth("---< " + module.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -399,7 +557,7 @@ public class XMLUtil {
module.setWidth("0");
}
if (!StringUtils.isEmpty(module.getHeight()) ){
- Boolean flag = checkNumber(module.getHeight(), Double.class);
+ Boolean flag = checkNumber(module.getHeight().trim(), Double.class);
if (!flag) {
module.setHeight("---< " + module.getHeight() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -412,12 +570,9 @@ public class XMLUtil {
// 加工组数据格式验证
public void checkGroups(GroupXmlVOS groupXmlVOS, Boolean error) {
- if (StringUtils.isEmpty(groupXmlVOS.getCount())) {
- groupXmlVOS.setCount("---< 模块数量不能为空 >---");
- error = false;
- } else {
- if (ToolUtil.convertToType(groupXmlVOS.getCount(), Integer.class)){
- if (!ToolUtil.checkNumber(groupXmlVOS.getCount())){
+ if (!StringUtils.isEmpty(groupXmlVOS.getCount())) {
+ if (ToolUtil.convertToType(groupXmlVOS.getCount().trim(), Integer.class)){
+ if (!ToolUtil.checkNumber(groupXmlVOS.getCount().trim())){
groupXmlVOS.setCount("---< " + groupXmlVOS.getCount() + POSITIVE_ERR + " >---");
error = false;
}
@@ -433,16 +588,8 @@ public class XMLUtil {
// 加工组数据格式验证
public void checkGroupList(List groupXmlVOList, Boolean error) {
for ( GroupXmlVO group : groupXmlVOList ) {
- if (StringUtils.isEmpty(group.getId())){
- group.setId("---< 加工组编号不能为空 >---");
- error = false;
- }
- if (StringUtils.isEmpty(group.getName())){
- group.setName("---< 加工组名称不能为空 >---");
- error = false;
- }
if (!StringUtils.isEmpty(group.getLength()) ){
- Boolean flag = checkNumber(group.getLength(), Double.class);
+ Boolean flag = checkNumber(group.getLength().trim(), Double.class);
if (!flag) {
group.setLength("---< " + group.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -451,7 +598,7 @@ public class XMLUtil {
group.setLength("0");
}
if (!StringUtils.isEmpty(group.getWidth()) ){
- Boolean flag = checkNumber(group.getWidth(), Double.class);
+ Boolean flag = checkNumber(group.getWidth().trim(), Double.class);
if (!flag) {
group.setWidth( "---< " + group.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -460,7 +607,7 @@ public class XMLUtil {
group.setWidth("0");
}
if (!StringUtils.isEmpty(group.getHeight()) ){
- Boolean flag = checkNumber(group.getHeight(), Double.class);
+ Boolean flag = checkNumber(group.getHeight().trim(), Double.class);
if (!flag) {
group.setHeight("---< " + group.getHeight() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
@@ -475,11 +622,11 @@ public class XMLUtil {
public void checkPlates(List plateXmlVOList, Boolean error) {
for ( PlateXmlVO plate : plateXmlVOList ) {
if (StringUtils.isEmpty(plate.getName())){
- plate.setId("---< 板材名称不能为空 >---");
+ plate.setName("---< 板材名称不能为空 >---");
error = false;
}
if (StringUtils.isEmpty(plate.getMaterial())){
- plate.setItemNo("---< 板材材质不能为空 >---");
+ plate.setItemCode("---< 板材材质不能为空 >---");
error = false;
}
// 纹理有效性判断
@@ -491,19 +638,25 @@ public class XMLUtil {
error = false;
}
}
- if (StringUtils.isEmpty(plate.getCoatingObverse())) {
- plate.setCoatingObverse("---< 板材正面颜色不可为空>---");
+ if (StringUtils.isEmpty(plate.getCoating())) {
+ plate.setCoating("双面");
+ } else {
+ if (!StringUtils.equals(plate.getCoating().trim(), "双面") && !StringUtils.equals(plate.getCoating().trim(), "单面") &&
+ !StringUtils.equals(plate.getCoating().trim(), "无")) {
+ plate.setCoating("---< " + plate.getCoating() + " 板材纹理无效 >---");
+ error = false;
+ }
}
if (StringUtils.isEmpty(plate.getLength())){
plate.setLength("---< 板材长度不可为空>---");
error = false;
} else {
- Boolean flag = checkNumber(plate.getLength(), Double.class);
+ Boolean flag = checkNumber(plate.getLength().trim(), Double.class);
if (!flag) {
plate.setLength("---< " + plate.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
- if (!ToolUtil.checkPrecision(plate.getLength(), 5, 3)){
+ if (!ToolUtil.checkPrecision(plate.getLength().trim(), 5, 3)){
plate.setLength("---< " + plate.getLength() + LONG_ERR + " >---");
error = false;
}
@@ -513,12 +666,12 @@ public class XMLUtil {
plate.setWidth("---< 板材宽度不可为空>---");
error = false;
} else {
- Boolean flag = checkNumber(plate.getWidth(), Double.class);
+ Boolean flag = checkNumber(plate.getWidth().trim(), Double.class);
if (!flag) {
plate.setWidth("---< " + plate.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
- if (!ToolUtil.checkPrecision(plate.getWidth(), 5, 3)){
+ if (!ToolUtil.checkPrecision(plate.getWidth().trim(), 5, 3)){
plate.setWidth("---< " + plate.getWidth() + LONG_ERR + " >---");
error = false;
}
@@ -528,48 +681,48 @@ public class XMLUtil {
plate.setThickness("---< 板材宽度不可为空>---");
error = false;
} else {
- Boolean flag = checkNumber(plate.getThickness(), Double.class);
+ Boolean flag = checkNumber(plate.getThickness().trim(), Double.class);
if (!flag) {
plate.setThickness("---< " + plate.getThickness() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
- if (!ToolUtil.checkPrecision(plate.getThickness(), 5, 3)){
+ if (!ToolUtil.checkPrecision(plate.getThickness().trim(), 5, 3)){
plate.setThickness("---< " + plate.getThickness() + LONG_ERR + " >---");
error = false;
}
}
}
if (!StringUtils.isEmpty(plate.getOddmentLength())){
- Boolean flag = checkNumber(plate.getOddmentLength(), Double.class);
+ Boolean flag = checkNumber(plate.getOddmentLength().trim(), Double.class);
if (!flag) {
plate.setOddmentLength("---< " + plate.getOddmentLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
- if (!ToolUtil.checkPrecision(plate.getOddmentLength(), 5, 3)){
+ if (!ToolUtil.checkPrecision(plate.getOddmentLength().trim(), 5, 3)){
plate.setOddmentLength("---< " + plate.getOddmentLength() + LONG_ERR + " >---");
error = false;
}
}
}
if (!StringUtils.isEmpty(plate.getOddmentWidth())){
- Boolean flag = checkNumber(plate.getOddmentWidth(), Double.class);
+ Boolean flag = checkNumber(plate.getOddmentWidth().trim(), Double.class);
if (!flag) {
plate.setOddmentWidth("---< " + plate.getOddmentWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
- if (!ToolUtil.checkPrecision(plate.getOddmentWidth(), 5, 3)){
+ if (!ToolUtil.checkPrecision(plate.getOddmentWidth().trim(), 5, 3)){
plate.setOddmentWidth("---< " + plate.getOddmentWidth() + LONG_ERR + " >---");
error = false;
}
}
}
if (!StringUtils.isEmpty(plate.getOddmentThickness())){
- Boolean flag = checkNumber(plate.getOddmentThickness(), Double.class);
+ Boolean flag = checkNumber(plate.getOddmentThickness().trim(), Double.class);
if (!flag) {
plate.setOddmentThickness("---< " + plate.getOddmentThickness() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
- if (!ToolUtil.checkPrecision(plate.getOddmentThickness(), 5, 3)){
+ if (!ToolUtil.checkPrecision(plate.getOddmentThickness().trim(), 5, 3)){
plate.setOddmentThickness("---< " + plate.getOddmentThickness() + LONG_ERR + " >---");
error = false;
}
@@ -577,25 +730,46 @@ public class XMLUtil {
}
if (!StringUtils.isEmpty(plate.getOddment())) {
if (!StringUtils.equals(plate.getOddment().trim(), "是") && !StringUtils.equals(plate.getOddment().trim(), "否")) {
- plate.setGrained("---< " + plate.getOddment() + "板材是否余料标识无效无效 >---");
+ plate.setOddment(plate.getOddment() + "---< " + "板材是否余料标识无效无效 >---");
error = false;
}
}
- if (StringUtils.isEmpty(plate.getUnitLength())){
- plate.setThickness("---< 板材长度单位不可为空>---");
- error = false;
+ if (StringUtils.isEmpty(plate.getUnitLength().trim())){
+ plate.setUnitLength("mm");
+ }else {
+ DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_LENGTH, plate.getUnitLength().trim()).getData();
+ if (dictData == null) {
+ plate.setUnitLength(plate.getUnitLength() + "---< " + "板块长度单位无效 >---");
+ error = false;
+ }
}
- if (StringUtils.isEmpty(plate.getArea())){
- plate.setArea("---< 板材面积不可为空>---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(plate.getArea())){
Boolean flag = checkNumber(plate.getArea(), Double.class);
if (!flag) {
- plate.setArea("---< " + plate.getArea() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ plate.setArea(plate.getArea() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(plate.getUnitArea())){
+ plate.setUnitArea("m²");
+ } else {
+ DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_AREA, plate.getUnitArea().trim()).getData();
+ if (dictData == null) {
+ plate.setUnitLength(plate.getUnitArea() + "---< " + "板块面积单位无效 >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(plate.getCount())) {
+ if (ToolUtil.convertToType(plate.getCount().trim(), Integer.class)){
+ if (!ToolUtil.checkNumber(plate.getCount().trim())){
+ plate.setCount(plate.getCount() + "---< " + POSITIVE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ plate.setCount(plate.getCount() + "---< " + TYPE_ERR + " >---");
error = false;
}
}
-
if (plate.getBlockXmlVOS() != null) {
checkBlocks(plate.getBlockXmlVOS(), error);
}
@@ -603,42 +777,41 @@ public class XMLUtil {
}
// 小板数据格式验证
public void checkBlocks(BlockXmlVOS blockXmlVOS, Boolean error) {
- if (StringUtils.isNotEmpty(blockXmlVOS.getCount())) {
- blockXmlVOS.setCount("---< 小板片数不可为空>---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(blockXmlVOS.getCount())) {
Boolean flag = checkNumber(blockXmlVOS.getCount(), Integer.class);
if (!flag) {
- blockXmlVOS.setCount("---< " + blockXmlVOS.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ blockXmlVOS.setCount(blockXmlVOS.getCount() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
if (!ToolUtil.checkNumber(blockXmlVOS.getCount())){
- blockXmlVOS.setCount("---< " + blockXmlVOS.getCount() + POSITIVE_ERR + " >---");
+ blockXmlVOS.setCount(blockXmlVOS.getCount() + "---< " + POSITIVE_ERR + " >---");
error = false;
}
}
}
- if (StringUtils.isNotEmpty(blockXmlVOS.getArea())) {
- blockXmlVOS.setArea("---< 小板总面积不可为空>---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(blockXmlVOS.getArea())) {
Boolean flag = checkNumber(blockXmlVOS.getArea(), Integer.class);
if (!flag) {
- blockXmlVOS.setArea("---< " + blockXmlVOS.getArea() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ blockXmlVOS.setArea(blockXmlVOS.getArea() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
} else {
if (!ToolUtil.checkNumber(blockXmlVOS.getArea())){
- blockXmlVOS.setArea("---< " + blockXmlVOS.getArea() + POSITIVE_ERR + " >---");
+ blockXmlVOS.setArea(blockXmlVOS.getArea() + "---< " + POSITIVE_ERR + " >---");
error = false;
}
}
}
- if (StringUtils.isNotEmpty(blockXmlVOS.getCount())) {
- blockXmlVOS.setArea("---< 小板面积单位不可为空>---");
- error = false;
+ if (StringUtils.isEmpty(blockXmlVOS.getCount())) {
+ blockXmlVOS.setArea("m²");
+ } else {
+ DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_AREA, blockXmlVOS.getUnit().trim()).getData();
+ if (dictData == null) {
+ blockXmlVOS.setUnit(blockXmlVOS.getUnit() + "---< " + "小板总面积单位无效 >---");
+ error = false;
+ }
}
- if (blockXmlVOS.getBlockXmlVOList() != null) {
+ if (blockXmlVOS.getBlockXmlVOList() != null && blockXmlVOS.getBlockXmlVOList().size() > 0) {
checkBlockList(blockXmlVOS.getBlockXmlVOList(), error);
}
}
@@ -650,63 +823,62 @@ public class XMLUtil {
blockXmlVO.setName("未命名");
}
if (StringUtils.isEmpty(blockXmlVO.getType())) {
- blockXmlVO.setType("---< 板块类型不可为空 >---");
- error = false;
+ blockXmlVO.setType("背板");
} else {
DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.PLATE_TYPE, blockXmlVO.getType()).getData();
if (dictData == null) {
- blockXmlVO.setType("---< " + blockXmlVO.getType() + "板块类型无效 >---");
+ blockXmlVO.setType(blockXmlVO.getType() +"---< " + "板块类型无效 >---");
error = false;
}
}
if (StringUtils.isEmpty(blockXmlVO.getOpenDirection())) {
- blockXmlVO.setOpenDirection("---< 板块开门方向不可为空 >---");
- error = false;
+ blockXmlVO.setOpenDirection("非门板");
} else {
DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.DOOR_OPENING_DIRECTIONS, blockXmlVO.getOpenDirection()).getData();
if (dictData == null) {
- blockXmlVO.setOpenDirection("---< " + blockXmlVO.getOpenDirection() + "板块开门方向无效 >---");
+ blockXmlVO.setOpenDirection(blockXmlVO.getOpenDirection() + "---< " + "板块开门方向无效 >---");
error = false;
}
}
if (StringUtils.isEmpty(blockXmlVO.getTexture())) {
- blockXmlVO.setTexture("---< 板块设计纹路不可为空 >---");
- error = false;
+ blockXmlVO.setTexture("正纹");
} else {
- DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.DOOR_OPENING_DIRECTIONS, blockXmlVO.getTexture()).getData();
+ DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.GRAIN_TYPE, blockXmlVO.getTexture()).getData();
if (dictData == null) {
- blockXmlVO.setTexture("---< " + blockXmlVO.getTexture() + "板块设计纹路无效 >---");
+ blockXmlVO.setTexture(blockXmlVO.getTexture() + "---< " + "板块设计纹路无效 >---");
error = false;
}
}
if (StringUtils.isEmpty(blockXmlVO.getLayoutFace())) {
- blockXmlVO.setLayoutFace("---< 板块排版面不可为空 >---");
- error = false;
+ blockXmlVO.setLayoutFace("随意面");
} else {
DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.TYPOGRAPHY_TYPE, blockXmlVO.getLayoutFace()).getData();
if (dictData == null) {
- blockXmlVO.setLayoutFace("---< " + blockXmlVO.getLayoutFace() + "板块排版面无效 >---");
+ blockXmlVO.setLayoutFace(blockXmlVO.getLayoutFace() + "---< " + "板块排版面无效 >---");
error = false;
}
}
if (StringUtils.isEmpty(blockXmlVO.getCoatingType())) {
- blockXmlVO.setCoatingType("---< 板块设计饰面不可为空 >---");
- error = false;
- }
- if (StringUtils.isEmpty(blockXmlVO.getCoatingObverse())) {
- blockXmlVO.setCoatingObverse("---< 板块正面颜色不可为空 >---");
- error = false;
- }
- if (StringUtils.isEmpty(blockXmlVO.getCoatingObverse())) {
- blockXmlVO.setCoatingReverse("---< 板块反面颜色不可为空 >---");
+ blockXmlVO.setCoatingType("双面");
+ } else if (!StringUtils.equals(blockXmlVO.getCoatingType().trim(), "双面") && !StringUtils.equals(blockXmlVO.getCoatingType().trim(), "无") &&
+ !StringUtils.equals(blockXmlVO.getCoatingType().trim(), "单面")) {
+ blockXmlVO.setCoatingType(blockXmlVO.getCoatingType() + "---< " + "小板设计饰面无效 >---");
error = false;
}
+// if (StringUtils.isEmpty(blockXmlVO.getCoatingObverse())) {
+// blockXmlVO.setCoatingObverse("---< 板块正面颜色不可为空 >---");
+// error = false;
+// }
+// if (StringUtils.isEmpty(blockXmlVO.getCoatingObverse())) {
+// blockXmlVO.setCoatingReverse("---< 板块反面颜色不可为空 >---");
+// error = false;
+// }
if (StringUtils.isEmpty(blockXmlVO.getLength())) {
blockXmlVO.setLength("---< 板块长度不可为空 >---");
error = false;
} else {
if (!checkNumber(blockXmlVO.getLength(), Double.class,5, 3)){
- blockXmlVO.setLength("---< " + blockXmlVO.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setLength(blockXmlVO.getLength() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -715,7 +887,7 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getWidth(), Double.class,5, 3)){
- blockXmlVO.setWidth("---< " + blockXmlVO.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setWidth(blockXmlVO.getWidth() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -724,7 +896,7 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getThickness(), Double.class,5, 3)){
- blockXmlVO.setThickness("---< " + blockXmlVO.getThickness() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setThickness(blockXmlVO.getThickness() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -733,7 +905,7 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getThickness(), Double.class,5, 3)){
- blockXmlVO.setCuttingLength("---< " + blockXmlVO.getCuttingLength() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setCuttingLength(blockXmlVO.getCuttingLength() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -742,7 +914,7 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getCuttingWidth(), Double.class,5, 3)){
- blockXmlVO.setCuttingWidth("---< " + blockXmlVO.getCuttingWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setCuttingWidth(blockXmlVO.getCuttingWidth() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -751,7 +923,7 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getCuttingThickness(), Double.class,5, 3)){
- blockXmlVO.setCuttingThickness("---< " + blockXmlVO.getCuttingThickness() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setCuttingThickness(blockXmlVO.getCuttingThickness() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -760,7 +932,7 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getRawLength(), Double.class,5, 3)){
- blockXmlVO.setRawLength("---< " + blockXmlVO.getRawLength() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setRawLength(blockXmlVO.getRawLength() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -769,7 +941,7 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getRawWidth(), Double.class,5, 3)){
- blockXmlVO.setRawWidth("---< " + blockXmlVO.getRawWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setRawWidth(blockXmlVO.getRawWidth() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
@@ -778,133 +950,98 @@ public class XMLUtil {
error = false;
} else {
if (!checkNumber(blockXmlVO.getRawThickness(), Double.class,5, 3)){
- blockXmlVO.setRawThickness("---< " + blockXmlVO.getRawThickness() + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
+ blockXmlVO.setRawThickness(blockXmlVO.getRawThickness() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + "或是" + LONG_ERR + " >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getUnitLength())) {
- blockXmlVO.setRawThickness("---< 板块长度单位不可为空 >---");
- error = false;
+ if (StringUtils.isEmpty(blockXmlVO.getUnit())) {
+ blockXmlVO.setUnit("mm");
} else {
- DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_LENGTH, blockXmlVO.getUnitLength()).getData();
+ DictDataRespDTO dictData = dictDataApi.parseDictData(blockXmlVO.getUnit(), DictTypeConstants.UNIT_LENGTH).getData();
if (dictData == null){
- blockXmlVO.setUnitLength("---< " + blockXmlVO.getUnitLength() + " 长度单位无效 >---");
+ blockXmlVO.setUnit(blockXmlVO.getUnit() + "---< " + " 长度单位无效 >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getArea())) {
- blockXmlVO.setArea("---< 板块成品面积不可为空 >---");
- error = false;
- } else {
- if (!checkNumber(blockXmlVO.getArea(), Double.class)){
- blockXmlVO.setArea("---< " + blockXmlVO.getArea() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
- error = false;
- }
- }
- if (StringUtils.isEmpty(blockXmlVO.getAreaCutting())){
- blockXmlVO.setAreaCutting("---< 板块开料面积不可为空 >---");
- error = false;
- } else {
- if (!checkNumber(blockXmlVO.getAreaCutting(), Double.class)){
- blockXmlVO.setAreaCutting("---< " + blockXmlVO.getAreaCutting() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
- error = false;
- }
- }
- if (StringUtils.isEmpty(blockXmlVO.getUnitArea())) {
- blockXmlVO.setUnitArea("---< 板块面积单位不可为空 >---");
- error = false;
- } else {
- DictDataRespDTO dictData = dictDataApi.parseDictData(DictTypeConstants.UNIT_AREA, blockXmlVO.getUnitArea()).getData();
- if (dictData == null){
- blockXmlVO.setUnitArea("---< " + blockXmlVO.getUnitArea() + "面积单位无效 >---");
- }
- }
if (StringUtils.isEmpty(blockXmlVO.getMultipleNumber())){
blockXmlVO.setMultipleNumber("1");
} else {
- if (!checkNumber(blockXmlVO.getMultipleNumber(), Integer.class)){
- blockXmlVO.setMultipleNumber("---< " + blockXmlVO.getMultipleNumber() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ if (!checkNumber(blockXmlVO.getMultipleNumber().trim(), Integer.class)){
+ blockXmlVO.setMultipleNumber(blockXmlVO.getMultipleNumber() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(blockXmlVO.getMultipleNo())){
+ blockXmlVO.setMultipleNo("1");
+ } else {
+ if (!checkNumber(blockXmlVO.getMultipleNo().trim(), Integer.class)){
+ blockXmlVO.setMultipleNo(blockXmlVO.getMultipleNo() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
}
}
if (StringUtils.isEmpty(blockXmlVO.getUnregular())){
- blockXmlVO.setUnregular("---< 板块是否异形不可为空 >---");
- error = false;
+ blockXmlVO.setUnregular("否");
} else {
if (!StringUtils.equals(blockXmlVO.getUnregular().trim(), "是") && !StringUtils.equals(blockXmlVO.getUnregular().trim(), "否")) {
- blockXmlVO.setUnregular("---< " + blockXmlVO.getUnregular() + "板材是否异形数据无效 >---");
+ blockXmlVO.setUnregular(blockXmlVO.getUnregular() + "---< " + "板材是否异形数据无效 >---");
error = false;
}
}
if (StringUtils.isEmpty(blockXmlVO.getDrilling())){
- blockXmlVO.setDrilling("---< 板块是否钻孔不可为空 >---");
- error = false;
+ blockXmlVO.setDrilling("否");
} else {
if (!StringUtils.equals(blockXmlVO.getDrilling().trim(), "是") && !StringUtils.equals(blockXmlVO.getDrilling().trim(), "否")) {
- blockXmlVO.setDrilling("---< " + blockXmlVO.getDrilling()+ "板材是否钻孔数据无效 >---");
+ blockXmlVO.setDrilling(blockXmlVO.getDrilling()+ "---< " + "板材是否钻孔数据无效 >---");
error = false;
}
}
if (StringUtils.isEmpty(blockXmlVO.getSlotting())){
- blockXmlVO.setSlotting("---< 板块是否挖槽不可为空 >---");
- error = false;
+ blockXmlVO.setSlotting("否");
} else {
if (!StringUtils.equals(blockXmlVO.getSlotting().trim(), "是") && !StringUtils.equals(blockXmlVO.getSlotting().trim(), "否")) {
- blockXmlVO.setSlotting("---< " + blockXmlVO.getSlotting() + "板材是否挖槽数据无效 >---");
+ blockXmlVO.setSlotting(blockXmlVO.getSlotting() + "---< " + "板材是否挖槽数据无效 >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getBasePointX())){
- blockXmlVO.setBasePointX("---< 板块基点X坐标不可为空 >---");
- error = false;
- } else {
+ if (StringUtils.isEmpty(blockXmlVO.getRoomName())){
+ blockXmlVO.setRoomName("未命名");
+ }
+ if (StringUtils.isEmpty(blockXmlVO.getBoxName())){
+ blockXmlVO.setBoxName("未命名");
+ }
+ if (!StringUtils.isEmpty(blockXmlVO.getBasePointX())){
if (!ToolUtil.convertToType(blockXmlVO.getBasePointX(), Double.class)) {
- blockXmlVO.setBasePointX("---< " + blockXmlVO.getBasePointX() + TYPE_ERR + " >---");
+ blockXmlVO.setBasePointX(blockXmlVO.getBasePointX() + "---< " + TYPE_ERR + " >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getBasePointY())){
- blockXmlVO.setBasePointY("---< 板块基点Y坐标不可为空 >---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(blockXmlVO.getBasePointY())){
if (!ToolUtil.convertToType(blockXmlVO.getBasePointX(), Double.class)) {
- blockXmlVO.setBasePointY("---< " + blockXmlVO.getBasePointY() + TYPE_ERR + " >---");
+ blockXmlVO.setBasePointY(blockXmlVO.getBasePointY() + "---< " + TYPE_ERR + " >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getBasePointZ())){
- blockXmlVO.setBasePointZ("---< 板块基点X坐标不可为空 >---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(blockXmlVO.getBasePointZ())){
if (!ToolUtil.convertToType(blockXmlVO.getBasePointZ(), Double.class)) {
- blockXmlVO.setBasePointZ("---< " + blockXmlVO.getBasePointZ() + TYPE_ERR + " >---");
+ blockXmlVO.setBasePointZ(blockXmlVO.getBasePointZ() + "---< " + TYPE_ERR + " >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getAxisXrotate())){
- blockXmlVO.setAxisXrotate("---< 板块绕X轴旋转角度不可为空 >---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(blockXmlVO.getAxisXrotate())){
if (!ToolUtil.convertToType(blockXmlVO.getAxisXrotate(), Double.class)) {
- blockXmlVO.setAxisXrotate("---< " + blockXmlVO.getAxisXrotate() + TYPE_ERR + " >---");
+ blockXmlVO.setAxisXrotate(blockXmlVO.getAxisXrotate() + "---< " + TYPE_ERR + " >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getAxisYrotate())){
- blockXmlVO.setAxisYrotate("---< 板块绕Y轴旋转角度不可为空 >---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(blockXmlVO.getAxisYrotate())){
if (!ToolUtil.convertToType(blockXmlVO.getAxisYrotate(), Double.class)) {
- blockXmlVO.setAxisYrotate("---< " + blockXmlVO.getAxisYrotate() + TYPE_ERR + " >---");
+ blockXmlVO.setAxisYrotate(blockXmlVO.getAxisYrotate() + "---< " + TYPE_ERR + " >---");
error = false;
}
}
- if (StringUtils.isEmpty(blockXmlVO.getAxisZrotate())){
- blockXmlVO.setAxisZrotate("---< 板块绕Z轴旋转角度不可为空 >---");
- error = false;
- } else {
+ if (!StringUtils.isEmpty(blockXmlVO.getAxisZrotate())){
if (!ToolUtil.convertToType(blockXmlVO.getAxisZrotate(), Double.class)) {
- blockXmlVO.setAxisZrotate("---< " + blockXmlVO.getAxisZrotate() + TYPE_ERR + " >---");
+ blockXmlVO.setAxisZrotate(blockXmlVO.getAxisZrotate() + "---< " + TYPE_ERR + " >---");
error = false;
}
}
@@ -913,65 +1050,858 @@ public class XMLUtil {
checkOutline(blockXmlVO.getOutlineXmlVO(), error);
}
+ if (blockXmlVO.getCuttingOutlineXmlVO() != null){
+ checkCuttingOutline(blockXmlVO.getCuttingOutlineXmlVO(), error);
+ }
+
+ if (blockXmlVO.getRawOutlineXmlVO() != null && blockXmlVO.getRawOutlineXmlVO().getPointXmlVOList() != null
+ && blockXmlVO.getRawOutlineXmlVO().getPointXmlVOList().size() > 0){
+ checkRawOutline(blockXmlVO.getRawOutlineXmlVO(), error);
+ }
+
+ if (blockXmlVO.getHoleXmlVOS() != null){
+ checkHoles(blockXmlVO.getHoleXmlVOS(), error);
+ }
+
+ if (blockXmlVO.getGrooveXmlVOS() != null){
+ checkGrooves(blockXmlVO.getGrooveXmlVOS(), error);
+ }
+
+ if (blockXmlVO.getIsletXmlVOS() != null && blockXmlVO.getIsletXmlVOS().getIsletXmlVOList() != null &&
+ blockXmlVO.getIsletXmlVOS().getIsletXmlVOList().size() > 0){
+ checkIslets(blockXmlVO.getIsletXmlVOS(), error);
+ }
+
+ if (blockXmlVO.getCorrelationXmlVOS() != null){
+ checkCorrelations(blockXmlVO.getCorrelationXmlVOS(), error);
+ }
+
}
}
}
- // 成品轮廓数据验证
- public void checkOutline(OutlineXmlVO outlineXmlVO, Boolean error) {
- if (!StringUtils.isNotEmpty(outlineXmlVO.getCount())){
- Boolean flag = checkNumber(outlineXmlVO.getCount(), Integer.class);
- if (!flag) {
- outlineXmlVO.setCount("---< " + outlineXmlVO.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ private void checkCorrelations(CorrelationXmlVOS correlationXmlVOS, Boolean error) {
+ if (!StringUtils.isEmpty(correlationXmlVOS.getCount())){
+ if (!checkNumber(correlationXmlVOS.getCount(), Integer.class)) {
+ correlationXmlVOS.setCount("---< " + correlationXmlVOS.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
error = false;
}
}
- if (outlineXmlVO.getPointXmlVOList() != null && outlineXmlVO.getPointXmlVOList().size() > 0){
- for (PointXmlVO pointXmlVO : outlineXmlVO.getPointXmlVOList()) {
- if (StringUtils.isEmpty(pointXmlVO.getPointX())){
- pointXmlVO.setPointX("---< 板块轮廓起点坐标X不可为空 >---");
- error = false;
- } else {
- if (!ToolUtil.convertToType(pointXmlVO.getPointX(), Double.class)) {
- pointXmlVO.setPointX("---< " + pointXmlVO.getPointX() + TYPE_ERR + " >---");
+ 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("---< 关联配件(五金)/组件名称不可为空 >---");
+ 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("---< 关联配件(五金)/组件数量不可为空 >---");
error = false;
}
}
- if (StringUtils.isEmpty(pointXmlVO.getPointY())){
- pointXmlVO.setPointY("---< 板块轮廓起点坐标Y不可为空 >---");
- error = false;
- } else {
- if (!ToolUtil.convertToType(pointXmlVO.getPointY(), Double.class)) {
- pointXmlVO.setPointY("---< " + pointXmlVO.getPointY() + TYPE_ERR + " >---");
- error = false;
- }
- }
- if (StringUtils.isEmpty(pointXmlVO.getCurvature())){
- pointXmlVO.setPointZ("---< 板块轮廓边圆弧凹凸度不可为空 >---");
- error = false;
- } else {
- if (!ToolUtil.convertToType(pointXmlVO.getCurvature(), Double.class)) {
- pointXmlVO.setCurvature("---< " + pointXmlVO.getCurvature() + TYPE_ERR + " >---");
- error = false;
- }
- }
- if (StringUtils.isEmpty(pointXmlVO.getRadius())){
- pointXmlVO.setRadius("---< 板块轮廓边圆弧半径不可为空 >---");
- error = false;
- } else {
- if (!ToolUtil.convertToType(pointXmlVO.getRadius(), Double.class)) {
- pointXmlVO.setRadius("---< " + pointXmlVO.getRadius() + TYPE_ERR + " >---");
- error = false;
- }
- }
- if (StringUtils.isEmpty(pointXmlVO.getEdgingId())){
- pointXmlVO.setProcess("---< 板块轮廓封边条ID不可为空 >---");
- error = false;
- }
-
}
}
}
+
+ private void checkIslets(IsletXmlVOS isletXmlVOS, Boolean error) {
+ Boolean index = true;
+ if (StringUtils.isEmpty(isletXmlVOS.getCount())){
+ isletXmlVOS.setCount("---< 孤岛数量不可为空 >---");
+ error = false;
+ index = false;
+ } else {
+ Boolean flag = checkNumber(isletXmlVOS.getCount().trim(), Integer.class);
+ if (!flag) {
+ isletXmlVOS.setCount("---< " + isletXmlVOS.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ index = false;
+ }
+ }
+ if (index) {
+ if (isletXmlVOS.getIsletXmlVOList() == null){
+ isletXmlVOS.setCount("---< 孤岛数量与孤岛列表数量不一致 >---");
+ error = false;
+ } else if (isletXmlVOS.getIsletXmlVOList().size() > 0){
+ if (Integer.valueOf(isletXmlVOS.getCount()) != isletXmlVOS.getIsletXmlVOList().size()) {
+ isletXmlVOS.setCount("---< 孤岛数量与孤岛列表数量不一致 >---");
+ error = false;
+ } else {
+ for (IsletXmlVO isletXmlVO : isletXmlVOS.getIsletXmlVOList()) {
+ checkIslet(isletXmlVO, error);
+ }
+ }
+ }
+ }
+
+ }
+
+ private void checkIslet(IsletXmlVO isletXmlVO, Boolean error) {
+ if (StringUtils.isEmpty(isletXmlVO.getId())){
+ isletXmlVO.setId("---< 孤岛ID不可为空 >---");
+ error = false;
+ }
+ // 造型内孤岛 两个
+
+ if (isletXmlVO.getPointXmlVOS() != null) {
+ Boolean index = true;
+ if (StringUtils.isEmpty(isletXmlVO.getPointXmlVOS().getCount())){
+ isletXmlVO.getPointXmlVOS().setCount("---< 孤岛数量不可为空 >---");
+ error = false;
+ index = false;
+ } else {
+ Boolean flag = checkNumber(isletXmlVO.getPointXmlVOS().getCount().trim(), Integer.class);
+ if (!flag) {
+ isletXmlVO.getPointXmlVOS().setCount("---< " + isletXmlVO.getPointXmlVOS().getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ index = false;
+ }
+ }
+
+ if (index) {
+ if (isletXmlVO.getPointXmlVOS().getPointXmlVOList() == null){
+ isletXmlVO.getPointXmlVOS().setCount("---< 孤岛数量与孤岛列表数量不一致 >---");
+ error = false;
+ } else if (isletXmlVO.getPointXmlVOS().getPointXmlVOList().size() > 0){
+ if (Integer.valueOf(isletXmlVO.getPointXmlVOS().getCount()) != isletXmlVO.getPointXmlVOS().getPointXmlVOList().size()) {
+ isletXmlVO.getPointXmlVOS().setCount("---< 孤岛数量与孤岛列表数量不一致 >---");
+ error = false;
+ } else {
+ for (PointXmlVO pointXmlVO : isletXmlVO.getPointXmlVOS().getPointXmlVOList()) {
+ checkPoint(pointXmlVO, error);
+ }
+ }
+ }
+ }
+ }
+
+ }
+
+ private void checkHoles(HoleXmlVOS holeXmlVOS, Boolean error) {
+ if (!StringUtils.isEmpty(holeXmlVOS.getCount()) ){
+ Boolean flag = checkNumber(holeXmlVOS.getCount().trim(), Double.class);
+ if (!flag) {
+ holeXmlVOS.setCount("---< " + holeXmlVOS.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountFaceA())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountFaceA().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountFaceA("---< " + holeXmlVOS.getCountFaceA() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountFaceB())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountFaceB().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountFaceB("---< " + holeXmlVOS.getCountFaceB() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountSide())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountSide().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountSide("---< " + holeXmlVOS.getCountSide() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountSideL())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountSideL().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountSideL("---< " + holeXmlVOS.getCountSideL() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountSideR())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountSideR().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountSideR("---< " + holeXmlVOS.getCountSideR() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountSideU())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountSideU().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountSideU("---< " + holeXmlVOS.getCountSideU() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountSideD())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountSideD().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountSideD("---< " + holeXmlVOS.getCountSideD() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountBevelled())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountBevelled().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountBevelled("---< " + holeXmlVOS.getCountBevelled() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountLocking())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountLocking().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountLocking("---< " + holeXmlVOS.getCountLocking() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountBuildIn())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountBuildIn().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountBuildIn("---< " + holeXmlVOS.getCountBuildIn() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountHinge())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountHinge().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountHinge("---< " + holeXmlVOS.getCountHinge() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVOS.getCountThrough())){
+ Boolean flag = checkNumber(holeXmlVOS.getCountThrough().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVOS.setCountThrough("---< " + holeXmlVOS.getCountThrough() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (holeXmlVOS.getHoleXmlVOList() != null && holeXmlVOS.getHoleXmlVOList().size() > 0){
+ for (HoleXmlVO holeXmlVO : holeXmlVOS.getHoleXmlVOList()) {
+ checkHole(holeXmlVO, error);
+ }
+ }
+ }
+
+ private void checkHole(HoleXmlVO holeXmlVO, Boolean error) {
+ if (StringUtils.isEmpty(holeXmlVO.getFace())){
+ holeXmlVO.setFace("---< 小板孔加工面不可为空 >---");
+ error = false;
+ } else {
+ DictDataRespDTO dictDataVO = dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, holeXmlVO.getFace()).getData();
+ if (dictDataVO == null){
+ holeXmlVO.setFace(holeXmlVO.getFace() + "---< " +" 小板孔加工面数据无效 >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getDirection())){
+ holeXmlVO.setDirection("---< 小板孔加工方向不可为空 >---");
+ error = false;
+ } else {
+ DictDataRespDTO dictDataVO = dictDataApi.parseDictData(DictTypeConstants.HOLE_DIRECTION, holeXmlVO.getDirection()).getData();
+ if (dictDataVO == null){
+ holeXmlVO.setDirection(holeXmlVO.getDirection() + "---< " + " 小板孔加工方向数据无效 >---");
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getDiameter())){
+ holeXmlVO.setDiameter("---< 小板孔直径不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = checkNumber(holeXmlVO.getDiameter().trim(), Double.class);
+ if (!flag) {
+ holeXmlVO.setDiameter(holeXmlVO.getDiameter() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isNotEmpty(holeXmlVO.getType()) && holeXmlVO.getType().equals("沉头孔")){
+ if (StringUtils.isEmpty(holeXmlVO.getDiameterInner())){
+ holeXmlVO.setDiameterInner("---< 当小板孔类型为沉头孔时,小板孔沉头孔内径不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = checkNumber(holeXmlVO.getDiameterInner().trim(), Double.class);
+ if (!flag) {
+ holeXmlVO.setDiameterInner(holeXmlVO.getDiameterInner() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getDepthInner())){
+ holeXmlVO.setDepthInner("---< 当小板孔类型为沉头孔时,沉头孔的深度不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = checkNumber(holeXmlVO.getDepthInner().trim(), Double.class);
+ if (!flag) {
+ holeXmlVO.setDepthInner(holeXmlVO.getDepthInner() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ }
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getDepth())){
+ holeXmlVO.setDepth("---< 小板孔深度不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = checkNumber(holeXmlVO.getDepth().trim(), Double.class);
+ if (!flag) {
+ holeXmlVO.setDepth(holeXmlVO.getDepth() + "---< " + POSITIVE_ERR+ "或是" + TYPE_ERR + " >---");
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVO.getGroupNumber())){
+ Boolean flag = checkNumber(holeXmlVO.getGroupNumber().trim(), Integer.class);
+ if (!flag) {
+ holeXmlVO.setGroupNumber(holeXmlVO.getGroupNumber() + "---< " + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getGroupXoffset())){
+ holeXmlVO.setGroupXoffset("0");
+ } else {
+ Boolean flag = ToolUtil.convertToType(holeXmlVO.getGroupXoffset().trim(), Double.class);
+ if (!flag) {
+ holeXmlVO.setGroupXoffset(holeXmlVO.getGroupXoffset() + "---< " + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getGroupYoffset())){
+ holeXmlVO.setGroupYoffset("0");
+ } else {
+ Boolean flag = ToolUtil.convertToType(holeXmlVO.getGroupYoffset().trim(), Double.class);
+ if (!flag) {
+ holeXmlVO.setGroupYoffset(holeXmlVO.getGroupYoffset() + "---< " + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getGroupZoffset())){
+ holeXmlVO.setGroupZoffset("0");
+ } else {
+ Boolean flag = ToolUtil.convertToType(holeXmlVO.getGroupZoffset().trim(), Double.class);
+ if (!flag) {
+ holeXmlVO.setGroupZoffset(holeXmlVO.getGroupZoffset() + "---< " + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getStartX())){
+ holeXmlVO.setStartX("---< 小板孔起点坐标X不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(holeXmlVO.getStartX().trim(), Double.class)){
+ holeXmlVO.setStartX(holeXmlVO.getStartX() + "---< " + " 小板孔起点坐标X数据无效 >---");
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getStartY())){
+ holeXmlVO.setStartY("---< 小板孔起点坐标Y不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(holeXmlVO.getStartY().trim(), Double.class)){
+ holeXmlVO.setStartY(holeXmlVO.getStartY() + "---< " + " 小板孔起点坐标Y数据无效 >---");
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getStartZ())){
+ holeXmlVO.setStartZ("---< 小板孔起点坐标Z不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(holeXmlVO.getStartZ().trim(), Double.class)){
+ holeXmlVO.setStartZ(holeXmlVO.getStartZ() + "---< " + " 小板孔起点坐标Z数据无效 >---");
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getEndX())){
+ holeXmlVO.setEndX("---< 小板孔终点坐标X不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(holeXmlVO.getEndX().trim(), Double.class)){
+ holeXmlVO.setEndX(holeXmlVO.getEndX() + "---< " + " 小板孔终点坐标X数据无效 >---");
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getEndY())){
+ holeXmlVO.setEndY("---< 小板孔终点坐标Y不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(holeXmlVO.getEndY().trim(), Double.class)){
+ holeXmlVO.setEndY(holeXmlVO.getEndY() + "---< " + " 小板孔终点坐标Y数据无效 >---");
+ }
+ }
+ if (StringUtils.isEmpty(holeXmlVO.getEndZ())){
+ holeXmlVO.setEndZ("---< 小板孔终点坐标Z不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(holeXmlVO.getEndZ().trim(), Double.class)){
+ holeXmlVO.setEndZ(holeXmlVO.getEndZ() + "---< " + " 小板孔终点坐标Z数据无效 >---");
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVO.getToolStartRotateX())){
+ if (!ToolUtil.convertToType(holeXmlVO.getToolStartRotateX().trim(), Double.class)){
+ holeXmlVO.setToolStartRotateX(holeXmlVO.getToolStartRotateX() + "---< " + " 小板孔起点旋转角度X数据无效 >---");
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVO.getToolStartRotateY())){
+ if (!ToolUtil.convertToType(holeXmlVO.getToolStartRotateY().trim(), Double.class)){
+ holeXmlVO.setToolStartRotateY(holeXmlVO.getToolStartRotateY() + "---< " + " 小板孔起点旋转角度Y数据无效 >---");
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVO.getToolStartRotateZ())){
+ if (!ToolUtil.convertToType(holeXmlVO.getToolStartRotateZ().trim(), Double.class)){
+ holeXmlVO.setToolStartRotateZ("---< " + holeXmlVO.getToolStartRotateZ() + " 小板孔起点旋转角度Z数据无效 >---");
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVO.getToolEndRotateX())){
+ if (!ToolUtil.convertToType(holeXmlVO.getToolEndRotateX().trim(), Double.class)){
+ holeXmlVO.setToolEndRotateX("---< " + holeXmlVO.getToolEndRotateX() + " 小板孔终点旋转角度X数据无效 >---");
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVO.getToolEndRotateY())){
+ if (!ToolUtil.convertToType(holeXmlVO.getToolEndRotateY().trim(), Double.class)){
+ holeXmlVO.setToolEndRotateY("---< " + holeXmlVO.getToolEndRotateY() + " 小板孔终点旋转角度Y数据无效 >---");
+ }
+ }
+ if (!StringUtils.isEmpty(holeXmlVO.getToolEndRotateZ())){
+ if (!ToolUtil.convertToType(holeXmlVO.getToolEndRotateZ().trim(), Double.class)){
+ holeXmlVO.setToolEndRotateZ("---< " + holeXmlVO.getToolEndRotateZ() + " 小板孔终点旋转角度Z数据无效 >---");
+ }
+ }
+ }
+
+ private void checkGrooves(GrooveXmlVOS grooveXmlVOS, Boolean error) {
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCount()) ){
+ Boolean flag = checkNumber(grooveXmlVOS.getCount().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVOS.setCount("---< " + grooveXmlVOS.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountFaceA())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountFaceA().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountFaceA("---< " + grooveXmlVOS.getCountFaceA() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountFaceB())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountFaceB().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountFaceB("---< " + grooveXmlVOS.getCountFaceB() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountSide())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountSide().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountSide("---< " + grooveXmlVOS.getCountSide() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountSideL())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountSideL().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountSideL("---< " + grooveXmlVOS.getCountSideL() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountSideR())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountSideR().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountSideR("---< " + grooveXmlVOS.getCountSideR() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountSideU())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountSideU().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountSideU("---< " + grooveXmlVOS.getCountSideU() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountSideD())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountSideD().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountSideD("---< " + grooveXmlVOS.getCountSideD() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountBevelled())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountBevelled().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountBevelled("---< " + grooveXmlVOS.getCountBevelled() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountRectangle())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountRectangle().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountRectangle("---< " + grooveXmlVOS.getCountRectangle() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCountThrough())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCountThrough().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCountThrough("---< " + grooveXmlVOS.getCountThrough() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCount2V())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCount2V().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCount2V("---< " + grooveXmlVOS.getCount2V() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVOS.getCount3D())){
+ Boolean flag = checkNumber(grooveXmlVOS.getCount3D().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVOS.setCount3D("---< " + grooveXmlVOS.getCount3D() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+
+ if (grooveXmlVOS.getGrooveXmlVOList() != null && grooveXmlVOS.getGrooveXmlVOList().size() > 0){
+ for (GrooveXmlVO grooveXmlVO : grooveXmlVOS.getGrooveXmlVOList()) {
+ checkGroove(grooveXmlVO, error);
+ }
+ }
+ }
+
+ private void checkGroove(GrooveXmlVO grooveXmlVO, Boolean error) {
+ if (StringUtils.isEmpty(grooveXmlVO.getId())){
+ grooveXmlVO.setId("---< 凹槽信息ID不可为空 >---");
+ error = false;
+ }
+ // 父孤岛id
+
+ if (StringUtils.isEmpty(grooveXmlVO.getType())){
+ grooveXmlVO.setType("---< 槽类型数据不可以为空 >---");
+ error = false;
+ }
+ if (StringUtils.isEmpty(grooveXmlVO.getFace())){
+ grooveXmlVO.setFace("---< 槽面不可为空 >---");
+ error = false;
+ } else {
+ DictDataRespDTO dictDataDO = dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, grooveXmlVO.getFace().trim()).getData();
+ if (dictDataDO == null){
+ grooveXmlVO.setFace(grooveXmlVO.getFace() + "---< 槽加工面数据无效 >---");
+ error = false;
+ }
+ }
+ if (grooveXmlVO.getType().trim().equals("矩形槽")) {
+ if (StringUtils.isEmpty(grooveXmlVO.getWidth())){
+ grooveXmlVO.setWidth("---< 当槽为矩形时,槽宽度不可为空 >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getWidth())) {
+ Boolean flag = checkNumber(grooveXmlVO.getWidth().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setWidth("---< " + grooveXmlVO.getWidth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getLength())) {
+ Boolean flag = checkNumber(grooveXmlVO.getLength().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setLength("---< " + grooveXmlVO.getLength() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(grooveXmlVO.getDepth())){
+ grooveXmlVO.setDepth("---< 槽深度不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = checkNumber(grooveXmlVO.getDepth().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setDepth("---< " + grooveXmlVO.getDepth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getWidthExtend())){
+ Boolean flag = checkNumber(grooveXmlVO.getWidthExtend().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setWidthExtend("---< " + grooveXmlVO.getWidthExtend() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }else {
+ grooveXmlVO.setWidthExtend("0");
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getLengthExtend())){
+ Boolean flag = checkNumber(grooveXmlVO.getLengthExtend().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setLengthExtend("---< " + grooveXmlVO.getLengthExtend() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ grooveXmlVO.setLengthExtend("0");
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getDepthExtend())){
+ Boolean flag = checkNumber(grooveXmlVO.getDepthExtend().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setDepthExtend("---< " + grooveXmlVO.getDepthExtend() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ grooveXmlVO.setDepthExtend("0");
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getRound())){
+ Boolean flag = checkNumber(grooveXmlVO.getRound().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setRound("---< " + grooveXmlVO.getRound() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ grooveXmlVO.setRound("0");
+ }
+ if (grooveXmlVO.getType().trim().equals("路径槽") || grooveXmlVO.getType().trim().equals("折返路径槽")){
+ if (StringUtils.isEmpty(grooveXmlVO.getToolDiameter())){
+ grooveXmlVO.setToolDiameter("---< 当槽为路径槽或是折返路径槽时,刀直径不可为空 >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getToolDiameter())){
+ Boolean flag = checkNumber(grooveXmlVO.getToolDiameter().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setToolDiameter("---< " + grooveXmlVO.getToolDiameter() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getRedundance())){
+ Boolean flag = checkNumber(grooveXmlVO.getRedundance().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setRedundance("---< " + grooveXmlVO.getRedundance() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ grooveXmlVO.setRedundance("0");
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getTangentAngle())){
+ Boolean flag = checkNumber(grooveXmlVO.getTangentAngle().trim(), Double.class);
+ if (!flag) {
+ grooveXmlVO.setTangentAngle("---< " + grooveXmlVO.getTangentAngle() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ grooveXmlVO.setTangentAngle("0");
+ }
+ if (!StringUtils.isEmpty(grooveXmlVO.getIsletCount())){
+ Boolean flag = checkNumber(grooveXmlVO.getIsletCount().trim(), Integer.class);
+ if (!flag) {
+ grooveXmlVO.setIsletCount("---< " + grooveXmlVO.getIsletCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ grooveXmlVO.setIsletCount("0");
+ }
+ if (grooveXmlVO.getPointXmlVOS() == null || grooveXmlVO.getPointXmlVOS().getPointXmlVOList() == null || grooveXmlVO.getPointXmlVOS().getPointXmlVOList().size() < 1) {
+ grooveXmlVO.setResult("---< 槽点坐标列表不可为空 >---");
+ error = false;
+ } else {
+ for (PointXmlVO pointXmlVO : grooveXmlVO.getPointXmlVOS().getPointXmlVOList()) {
+ checkPoint(pointXmlVO, error);
+ }
+ }
+
+ if (grooveXmlVO.getOffsetLineXmlVOS() != null && grooveXmlVO.getOffsetLineXmlVOS().getOffsetLineXmlVOList() != null && grooveXmlVO.getOffsetLineXmlVOS().getOffsetLineXmlVOList().size() > 0){
+ for (OffsetLineXmlVO offsetLineXmlVO : grooveXmlVO.getOffsetLineXmlVOS().getOffsetLineXmlVOList()) {
+ checkOffsetLine(offsetLineXmlVO, error);
+ }
+ }
+ }
+
+ private void checkOffsetLine(OffsetLineXmlVO offsetLineXmlVO, Boolean error) {
+ if (StringUtils.isEmpty(offsetLineXmlVO.getOffset())){
+ offsetLineXmlVO.setOffset("---< 偏移刀路偏移量不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = ToolUtil.convertToType(offsetLineXmlVO.getOffset().trim(), Double.class);
+ if (!flag) {
+ offsetLineXmlVO.setOffset("---< " + offsetLineXmlVO.getOffset() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(offsetLineXmlVO.getDepth())){
+ offsetLineXmlVO.setDepth("---< 偏移刀路深度不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = ToolUtil.convertToType(offsetLineXmlVO.getDepth().trim(), Double.class);
+ if (!flag) {
+ offsetLineXmlVO.setDepth("---< " + offsetLineXmlVO.getDepth() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ }
+ }
+ if (StringUtils.isEmpty(offsetLineXmlVO.getToolDiameter())) {
+ offsetLineXmlVO.setToolDiameter("---< 偏移刀路所用刀的直径不可为空 >---");
+ error = false;
+ } else {
+ Boolean flag = ToolUtil.convertToType(offsetLineXmlVO.getToolDiameter().trim(), Double.class);
+ if (!flag) {
+ offsetLineXmlVO.setToolDiameter("---< " + offsetLineXmlVO.getToolDiameter() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (!StringUtils.isEmpty(offsetLineXmlVO.getTangentAngle())){
+ Boolean flag = checkNumber(offsetLineXmlVO.getTangentAngle().trim(), Double.class);
+ if (!flag) {
+ offsetLineXmlVO.setTangentAngle("---< " + offsetLineXmlVO.getTangentAngle() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ } else {
+ offsetLineXmlVO.setTangentAngle("0");
+ }
+ }
+
+ private void checkRawOutline(RawOutlineXmlVO rawOutlineXmlVO, Boolean error) {
+ Boolean index = true;
+ if (StringUtils.isEmpty(rawOutlineXmlVO.getCount())){
+ rawOutlineXmlVO.setCount("---< 小板坯料(精加工)轮廓点阵列表数量不可为空 >---");
+ error = false;
+ index = false;
+ } else {
+ Boolean flag = checkNumber(rawOutlineXmlVO.getCount().trim(), Integer.class);
+ if (!flag) {
+ rawOutlineXmlVO.setCount("---< " + rawOutlineXmlVO.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ index = false;
+ }
+ }
+ if (StringUtils.isEmpty(rawOutlineXmlVO.getReferenceOffsetX())){
+ rawOutlineXmlVO.setReferenceOffsetX("---< 小板开坯料(精加工)轮廓参考点X坐标不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(rawOutlineXmlVO.getReferenceOffsetX().trim(), Double.class)) {
+ rawOutlineXmlVO.setReferenceOffsetX("---< " + rawOutlineXmlVO.getReferenceOffsetX() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(rawOutlineXmlVO.getReferenceOffsetY())){
+ rawOutlineXmlVO.setReferenceOffsetY("---< 小板坯料(精加工)轮廓参考点Y坐标不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(rawOutlineXmlVO.getReferenceOffsetY().trim(), Double.class)) {
+ rawOutlineXmlVO.setReferenceOffsetY("---< " + rawOutlineXmlVO.getReferenceOffsetY() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+
+ if (rawOutlineXmlVO.getPointXmlVOList() != null && rawOutlineXmlVO.getPointXmlVOList().size() > 0){
+ if (index) {
+ if (Integer.parseInt(rawOutlineXmlVO.getCount()) != rawOutlineXmlVO.getPointXmlVOList().size()){
+ rawOutlineXmlVO.setCount("---< 小板坯料(精加工)点阵数量与实际数量不一致 >---");
+ error = false;
+ }
+ } else {
+ for (PointXmlVO pointXmlVO : rawOutlineXmlVO.getPointXmlVOList()) {
+ checkPoint(pointXmlVO, error);
+ }
+ }
+ }
+ }
+
+ private void checkCuttingOutline(CuttingOutlineXmlVO cuttingOutlineXmlVO, Boolean error) {
+ Boolean index = true;
+ if (StringUtils.isEmpty(cuttingOutlineXmlVO.getCount())){
+ cuttingOutlineXmlVO.setCount("---< 小板开料轮廓点阵列表数量不可为空 >---");
+ error = false;
+ index = false;
+ } else {
+ Boolean flag = checkNumber(cuttingOutlineXmlVO.getCount().trim(), Integer.class);
+ if (!flag) {
+ cuttingOutlineXmlVO.setCount("---< " + cuttingOutlineXmlVO.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ index = false;
+ }
+ }
+ if (StringUtils.isEmpty(cuttingOutlineXmlVO.getReferenceOffsetX())){
+ cuttingOutlineXmlVO.setReferenceOffsetX("---< 小板开料轮廓参考点X坐标不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(cuttingOutlineXmlVO.getReferenceOffsetX().trim(), Double.class)) {
+ cuttingOutlineXmlVO.setReferenceOffsetX("---< " + cuttingOutlineXmlVO.getReferenceOffsetX() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(cuttingOutlineXmlVO.getReferenceOffsetY())){
+ cuttingOutlineXmlVO.setReferenceOffsetY("---< 小板开料轮廓参考点Y坐标不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(cuttingOutlineXmlVO.getReferenceOffsetY().trim(), Double.class)) {
+ cuttingOutlineXmlVO.setReferenceOffsetY("---< " + cuttingOutlineXmlVO.getReferenceOffsetY() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+
+ if (cuttingOutlineXmlVO.getPointXmlVOList() != null && cuttingOutlineXmlVO.getPointXmlVOList().size() > 0){
+ if (index) {
+ if (Integer.parseInt(cuttingOutlineXmlVO.getCount()) != cuttingOutlineXmlVO.getPointXmlVOList().size()){
+ cuttingOutlineXmlVO.setCount("---< 小板轮廓点阵数量与实际数量不一致 >---");
+ error = false;
+ }
+ } else {
+ for (PointXmlVO pointXmlVO : cuttingOutlineXmlVO.getPointXmlVOList()) {
+ checkPoint(pointXmlVO, error);
+ }
+ }
+ }
+ }
+
+ public void checkOutline(OutlineXmlVO outlineXmlVO, Boolean error) {
+ Boolean index = true;
+ if (StringUtils.isEmpty(outlineXmlVO.getCount())){
+ outlineXmlVO.setCount("---< 小板成品轮廓点阵列表数量不可为空 >---");
+ error = false;
+ index = false;
+ } else {
+ Boolean flag = checkNumber(outlineXmlVO.getCount().trim(), Integer.class);
+ if (!flag) {
+ outlineXmlVO.setCount("---< " + outlineXmlVO.getCount() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ index = false;
+ }
+ }
+ if (outlineXmlVO.getPointXmlVOList() != null && outlineXmlVO.getPointXmlVOList().size() > 0){
+ if (index){
+ if (Integer.parseInt(outlineXmlVO.getCount()) != outlineXmlVO.getPointXmlVOList().size()){
+ outlineXmlVO.setCount("---< 小板轮廓点阵数量与实际数量不一致 >---");
+ error = false;
+ }
+ } else {
+ for (PointXmlVO pointXmlVO : outlineXmlVO.getPointXmlVOList()) {
+ checkPoint(pointXmlVO, error);
+ if (StringUtils.isEmpty(pointXmlVO.getItemCode())){
+ if (StringUtils.isEmpty(pointXmlVO.getEdgingName()) || StringUtils.isEmpty(pointXmlVO.getEdgingColor()) ||
+ StringUtils.isEmpty(pointXmlVO.getEdgingMaterial())){
+ pointXmlVO.setItemCode("---< 当封边条没有物料编码时,封边条名称、颜色、材质不可为空 >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(pointXmlVO.getEdgingThickness())){
+ pointXmlVO.setEdgingThickness("0");
+ } else {
+ if (!checkNumber(pointXmlVO.getEdgingThickness().trim(), Double.class)) {
+ pointXmlVO.setEdgingThickness("---< " + pointXmlVO.getEdgingThickness() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(pointXmlVO.getEdgingExtend())){
+ pointXmlVO.setEdgingExtend("0");
+ } else {
+ if (!checkNumber(pointXmlVO.getEdgingExtend().trim(), Double.class)) {
+ pointXmlVO.setEdgingExtend("---< " + pointXmlVO.getEdgingExtend() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(pointXmlVO.getPreMilling())){
+ pointXmlVO.setPreMilling("0");
+ } else {
+ if (!checkNumber(pointXmlVO.getPreMilling().trim(), Double.class)) {
+ pointXmlVO.setPreMilling("---< " + pointXmlVO.getPreMilling() + POSITIVE_ERR + "或是" + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(pointXmlVO.getScale())){
+ pointXmlVO.setScale("0");
+ } else {
+ if (!ToolUtil.convertToType(pointXmlVO.getScale().trim(), Double.class)) {
+ pointXmlVO.setScale("---< " + pointXmlVO.getScale() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ }
+ }
+ }
+ }
+
// 数据格式+数据正数判断
private Boolean checkNumber(String numberStr, Class> targetType) {
boolean error = true;
@@ -996,4 +1926,43 @@ public class XMLUtil {
}
return true;
}
+ // point 验证
+ private void checkPoint(PointXmlVO pointXmlVO, Boolean error) {
+ if (StringUtils.isEmpty(pointXmlVO.getPointX())){
+ pointXmlVO.setPointX("---< 小板轮廓起点坐标X不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(pointXmlVO.getPointX(), Double.class)) {
+ pointXmlVO.setPointX("---< " + pointXmlVO.getPointX() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(pointXmlVO.getPointY())){
+ pointXmlVO.setPointY("---< 小板轮廓起点坐标Y不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(pointXmlVO.getPointY(), Double.class)) {
+ pointXmlVO.setPointY("---< " + pointXmlVO.getPointY() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(pointXmlVO.getCurvature())){
+ pointXmlVO.setPointZ("---< 小板轮廓边圆弧凹凸度不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(pointXmlVO.getCurvature(), Double.class)) {
+ pointXmlVO.setCurvature("---< " + pointXmlVO.getCurvature() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ if (StringUtils.isEmpty(pointXmlVO.getRadius())){
+ pointXmlVO.setRadius("---< 小板轮廓边圆弧半径不可为空 >---");
+ error = false;
+ } else {
+ if (!ToolUtil.convertToType(pointXmlVO.getRadius(), Double.class)) {
+ pointXmlVO.setRadius("---< " + pointXmlVO.getRadius() + TYPE_ERR + " >---");
+ error = false;
+ }
+ }
+ }
}
diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XmlTypeRealize.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XmlTypeRealize.java
index 682d5ebeb..c94e50164 100644
--- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XmlTypeRealize.java
+++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/util/fileConversion/admin/files/xml/XmlTypeRealize.java
@@ -3,6 +3,7 @@ package com.cf.imes.module.executor.util.fileConversion.admin.files.xml;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.nacos.common.utils.StringUtils;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
+import com.cf.imes.framework.mybatis.core.generator.SnowFlakeGenerator;
import com.cf.imes.module.executor.controller.admin.orderParts.vo.OrderPartsRemark;
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
import com.cf.imes.module.executor.dal.dataobject.orderBody.OrderBodyDO;
@@ -46,6 +47,8 @@ public class XmlTypeRealize {
final String NOT_ASSIGNED = "未命名";
+ @Resource
+ private SnowFlakeGenerator snowFlakeGenerator;
@Resource
private IdentifierGenerator identifierGenerator;
@@ -58,7 +61,7 @@ public class XmlTypeRealize {
for (RoomXmlVO roomXmlVO : roomXmlVOS.getRoomXmlVOList()) {
Map bodyInfos = new HashMap<>();
- Long roomId = Long.valueOf(roomXmlVO.getId());
+ Long roomId = (Long) snowFlakeGenerator.nextId(null);
for (BoxXmlVO boxXmlVO : roomXmlVO.getBoxXmlVOList()) {
OrderBodyDO orderBodyDO = OrderBodyDO.builder()
.id((Long) identifierGenerator.nextId(null))
@@ -73,9 +76,9 @@ public class XmlTypeRealize {
.plateNum(0)
.unregularNum(0)
.build();
- bodyInfos.put(boxXmlVO.getId(), orderBodyDO);
+ bodyInfos.put(boxXmlVO.getCode(), orderBodyDO);
}
- roomInfos.put(roomXmlVO.getId(), bodyInfos);
+ roomInfos.put(roomXmlVO.getCode(), bodyInfos);
}
}
return roomInfos;
@@ -96,9 +99,9 @@ public class XmlTypeRealize {
.axisYrotate(Double.valueOf(boxXmlVO.getAxisYrotate()))
.axisZrotate(Double.valueOf(boxXmlVO.getAxisZrotate()))
.build();
- basePositions.put(boxXmlVO.getId(), basePosition);
+ basePositions.put(boxXmlVO.getCode(), basePosition);
}
- roomInfos.put(roomXmlVO.getId(), basePositions);
+ roomInfos.put(roomXmlVO.getCode(), basePositions);
}
}
return roomInfos;
@@ -122,7 +125,7 @@ public class XmlTypeRealize {
.plateNum(0)
.unregularNum(0)
.build();
- groupInfos.put(groupXmlVO.getId(), groupDO);
+ groupInfos.put(groupXmlVO.getCode(), groupDO);
}
}
return groupInfos;
@@ -179,7 +182,7 @@ public class XmlTypeRealize {
.id(rawGoodsId)
.organId(organId)
.orderId(orderId)
- .rawGoodsId(plateXmlVO.getItemNo())
+ .rawGoodsId(plateXmlVO.getItemCode())
.goodsName(plateXmlVO.getName())
.material(plateXmlVO.getMaterial())
.color(plateXmlVO.getCoatingObverse())
@@ -195,7 +198,7 @@ public class XmlTypeRealize {
.organId(organId)
.orderId(orderId)
.rawGoodsId(String.valueOf(rawGoodsId))
- .goodsId(plateXmlVO.getItemNo())
+ .goodsId(plateXmlVO.getItemCode())
.goodsName(plateXmlVO.getName())
.material(plateXmlVO.getMaterial())
.color(plateXmlVO.getCoatingObverse())
@@ -304,14 +307,14 @@ public class XmlTypeRealize {
EdgingXmlVOS edgingXmlVOS = accessoryXmlVO.getEdgingXmlVOS();
for (EdgingXmlVO edgingXmlVO : edgingXmlVOS.getEdgingXmlVOList()) {
- Map idMap = getId(edgingXmlVO.getRoomId(), edgingXmlVO.getBoxId(), roomInfos, edgingXmlVO.getGroupId(), groupInfos, 0.0, 0.0, orderId, organId);
+ Map idMap = getId(edgingXmlVO.getRoomCode(), edgingXmlVO.getBoxCode(), roomInfos, edgingXmlVO.getGroupCode(), groupInfos, 0.0, 0.0, orderId, organId);
Long partsId = (Long) identifierGenerator.nextId(null);
- orderPartsMap.put(edgingXmlVO.getId(), OrderPartsAddVO.builder()
+ orderPartsMap.put(edgingXmlVO.getItemCode(), OrderPartsAddVO.builder()
.id(partsId)
.organId(organId)
.orderId(orderId)
- .goodsId(edgingXmlVO.getItemNo())
+ .goodsId(edgingXmlVO.getItemCode())
.factory(edgingXmlVO.getManufacturer())
.brand(edgingXmlVO.getBrand())
.name(edgingXmlVO.getName())
@@ -328,7 +331,7 @@ public class XmlTypeRealize {
.num(Double.valueOf(edgingXmlVO.getCount()))
.build());
- orderItemMap.put(edgingXmlVO.getId(), OrderItemDO.builder()
+ orderItemMap.put(edgingXmlVO.getItemCode(), OrderItemDO.builder()
.id((Long) identifierGenerator.nextId(null))
.organId(organId)
.orderId(orderId)
@@ -339,7 +342,7 @@ public class XmlTypeRealize {
.bodyId(idMap.get("bodyId"))
.num(Double.valueOf(edgingXmlVO.getCount()))
.build());
- orderPartsDOMap.put(edgingXmlVO.getId(), OrderPartsDO.builder()
+ orderPartsDOMap.put(edgingXmlVO.getItemCode(), OrderPartsDO.builder()
.id(partsId)
.organId(organId)
.orderId(orderId)
@@ -353,7 +356,7 @@ public class XmlTypeRealize {
.build());
if (edgingXmlVO.getRemarkXmlVOS() != null && edgingXmlVO.getRemarkXmlVOS().getRemarkXmlVOList() != null && edgingXmlVO.getRemarkXmlVOS().getRemarkXmlVOList().size() > 0) {
- orderPartsRemarks.put(edgingXmlVO.getId(), OrderPartsRemark.builder()
+ orderPartsRemarks.put(edgingXmlVO.getItemCode(), OrderPartsRemark.builder()
.partsId(partsId)
.orderId(orderId)
.remark(edgingXmlVO.getRemarkXmlVOS().toString())
@@ -365,15 +368,15 @@ public class XmlTypeRealize {
HardwareXmlVOS hardwareXmlVOS = accessoryXmlVO.getHardwareXmlVOS();
for (HardwareXmlVO hardwareXmlVO : hardwareXmlVOS.getHardwareXmlVOList()) {
- Map idMap = getId(hardwareXmlVO.getRoomId(), hardwareXmlVO.getBoxId(), roomInfos, hardwareXmlVO.getGroupId(), groupInfos, 0.0, 0.0,orderId, organId);
+ Map idMap = getId(hardwareXmlVO.getRoomCode(), hardwareXmlVO.getBoxCode(), roomInfos, hardwareXmlVO.getGroupCode(), groupInfos, 0.0, 0.0,orderId, organId);
Long partsId = (Long) identifierGenerator.nextId(null);
- orderPartsMap.put(hardwareXmlVO.getId(), OrderPartsAddVO.builder()
+ orderPartsMap.put(hardwareXmlVO.getItemCode(), OrderPartsAddVO.builder()
.id(partsId)
.organId(organId)
.type(hardwareXmlVO.getType())
.orderId(orderId)
- .goodsId(hardwareXmlVO.getItemNo())
+ .goodsId(hardwareXmlVO.getItemCode())
.factory(hardwareXmlVO.getManufacturer())
.brand(hardwareXmlVO.getBrand())
.name(hardwareXmlVO.getName())
@@ -387,11 +390,11 @@ public class XmlTypeRealize {
.shelf(hardwareXmlVO.getShelf())
.color(hardwareXmlVO.getColor())
.num(Double.valueOf(hardwareXmlVO.getCount()))
- .roomId(hardwareXmlVO.getRoomId())
- .bodyId(hardwareXmlVO.getBoxId())
+ .roomId(hardwareXmlVO.getRoomCode())
+ .bodyId(hardwareXmlVO.getBoxCode())
.isComposite(false)
.build());
- orderItemMap.put(hardwareXmlVO.getId(), OrderItemDO.builder()
+ orderItemMap.put(hardwareXmlVO.getItemCode(), OrderItemDO.builder()
.id((Long) identifierGenerator.nextId(null))
.organId(organId)
.orderId(orderId)
@@ -402,7 +405,7 @@ public class XmlTypeRealize {
.bodyId(idMap.get("bodyId"))
.num(Double.valueOf(hardwareXmlVO.getCount()))
.build());
- orderPartsDOMap.put(hardwareXmlVO.getId(), OrderPartsDO.builder()
+ orderPartsDOMap.put(hardwareXmlVO.getItemCode(), OrderPartsDO.builder()
.id(partsId)
.organId(organId)
.orderId(orderId)
@@ -415,7 +418,7 @@ public class XmlTypeRealize {
.isComposite(false)
.build());
if (hardwareXmlVO.getRemarkXmlVOS() != null && hardwareXmlVO.getRemarkXmlVOS().getRemarkXmlVOList() != null && hardwareXmlVO.getRemarkXmlVOS().getRemarkXmlVOList().size() > 0) {
- orderPartsRemarks.put(hardwareXmlVO.getId(), OrderPartsRemark.builder()
+ orderPartsRemarks.put(hardwareXmlVO.getItemCode(), OrderPartsRemark.builder()
.partsId(partsId)
.orderId(orderId)
.remark(hardwareXmlVO.getRemarkXmlVOS().toString())
@@ -429,15 +432,15 @@ public class XmlTypeRealize {
for (AssemblyXmlVO assemblyXmlVO : assemblieXmlVOS.getAssemblyXmlVOList()) {
if (assemblyXmlVO != null && assemblyXmlVO.toString().length() > 0) {
- Map idMap = getId(assemblyXmlVO.getRoomId(), assemblyXmlVO.getBoxId(), roomInfos, assemblyXmlVO.getGroupId(), groupInfos, 0.0, 0.0, orderId, organId);
+ Map idMap = getId(assemblyXmlVO.getRoomCode(), assemblyXmlVO.getBoxCode(), roomInfos, assemblyXmlVO.getGroupCode(), groupInfos, 0.0, 0.0, orderId, organId);
Long partsId = (Long) identifierGenerator.nextId(null);
- orderPartsMap.put(assemblyXmlVO.getId(), OrderPartsAddVO.builder()
+ orderPartsMap.put(assemblyXmlVO.getItemCode(), OrderPartsAddVO.builder()
.id(partsId)
.organId(organId)
.orderId(orderId)
.type(assemblyXmlVO.getType())
- .goodsId(assemblyXmlVO.getItemNo())
+ .goodsId(assemblyXmlVO.getItemCode())
.factory(assemblyXmlVO.getManufacturer())
.brand(assemblyXmlVO.getBrand())
.name(assemblyXmlVO.getName())
@@ -451,11 +454,11 @@ public class XmlTypeRealize {
.unit((assemblyXmlVO.getUnit()))
.warehouse(assemblyXmlVO.getWarehouse())
.shelf(assemblyXmlVO.getShelf())
- .roomId(assemblyXmlVO.getRoomId())
- .bodyId(assemblyXmlVO.getBoxId())
+ .roomId(assemblyXmlVO.getRoomCode())
+ .bodyId(assemblyXmlVO.getBoxCode())
.isComposite(true)
.build());
- orderItemMap.put(assemblyXmlVO.getId(), OrderItemDO.builder()
+ orderItemMap.put(assemblyXmlVO.getItemCode(), OrderItemDO.builder()
.id((Long) identifierGenerator.nextId(null))
.organId(organId)
.orderId(orderId)
@@ -466,7 +469,7 @@ public class XmlTypeRealize {
.bodyId(idMap.get("bodyId"))
.num(Double.valueOf(assemblyXmlVO.getCount()))
.build());
- orderPartsDOMap.put(assemblyXmlVO.getId(), OrderPartsDO.builder()
+ orderPartsDOMap.put(assemblyXmlVO.getItemCode(), OrderPartsDO.builder()
.id(partsId)
.organId(organId)
.orderId(orderId)
@@ -479,7 +482,7 @@ public class XmlTypeRealize {
.isComposite(true)
.build());
if (assemblyXmlVO.getRemarkXmlVOS() != null && assemblyXmlVO.getRemarkXmlVOS().getRemarkXmlVOList() != null && assemblyXmlVO.getRemarkXmlVOS().getRemarkXmlVOList().size() > 0) {
- orderPartsRemarks.put(assemblyXmlVO.getId(), OrderPartsRemark.builder()
+ orderPartsRemarks.put(assemblyXmlVO.getItemCode(), OrderPartsRemark.builder()
.partsId(partsId)
.orderId(orderId)
.remark(assemblyXmlVO.getRemarkXmlVOS().toString())
@@ -521,8 +524,8 @@ public class XmlTypeRealize {
}else {
plateNum = 1.0;
}
- Map idMap = getId(blockXmlVO.getRoomId(), blockXmlVO.getBoxId(), roomInfos, blockXmlVO.getGroupId(), groupInfos, plateNum, unregularNum, orderId, organId);
- BasePosition boxBasePoint = boxBasePositionMap.get(blockXmlVO.getRoomId()).get(blockXmlVO.getBoxId()).setBasePoint(String.valueOf(idMap.get("bodyId")));
+ Map idMap = getId(blockXmlVO.getRoomCode(), blockXmlVO.getBoxCode(), roomInfos, blockXmlVO.getGroupCode(), groupInfos, plateNum, unregularNum, orderId, organId);
+ BasePosition boxBasePoint = boxBasePositionMap.get(blockXmlVO.getRoomCode()).get(blockXmlVO.getBoxCode()).setBasePoint(String.valueOf(idMap.get("bodyId")));
PlateDO plateDO = PlateDO.builder()
.id(plateId)
@@ -547,7 +550,7 @@ public class XmlTypeRealize {
.isSpecialShaped(convertToBoolean(blockXmlVO.getUnregular()))
.build();
- orderItemMap.put(blockXmlVO.getId(), OrderItemDO.builder()
+ orderItemMap.put(blockXmlVO.getProductionCode(), OrderItemDO.builder()
.id((Long) identifierGenerator.nextId(null))
.organId(organId)
.orderId(orderId)
@@ -561,7 +564,7 @@ public class XmlTypeRealize {
// 基点坐标获取
BasePosition plateBasePosition = BasePosition.builder()
- .basePoint(blockXmlVO.getId())
+ .basePoint(blockXmlVO.getProductionCode())
.basePointX(Double.valueOf(blockXmlVO.getBasePointX()))
.basePointY(Double.valueOf(blockXmlVO.getBasePointY()))
.basePointZ(Double.valueOf(blockXmlVO.getBasePointZ()))
@@ -573,7 +576,7 @@ public class XmlTypeRealize {
.plateId(plateId)
.plateNo(plateDO.getPlateNo())
.name(plateDO.getName())
- .customPlateNo(blockXmlVO.getDesignNo())
+ .customPlateNo(blockXmlVO.getDesignCode())
.texture(plateDO.getTexture())
.typographicFace(plateDO.getHoleFace())
.openDoorType(plateDO.getOpenDoorType())
@@ -602,8 +605,10 @@ public class XmlTypeRealize {
addPointDetail(plateDO, plateDetail, blockXmlVO.getCuttingOutlineXmlVO());
// 孔数据
addHole(plateDO, plateDetail, blockXmlVO.getHoleXmlVOS());
- // 造型数据
+ // 造型数据 (槽)
addContourDetail(plateDO, plateDetail, blockXmlVO.getGrooveXmlVOS());
+ // 造型数据(孤岛)
+ addIslandDetail(plateDetail, blockXmlVO.getIsletXmlVOS());
// 小板备注信息
addRemark(plateDO, plateDetail, blockXmlVO);
@@ -616,6 +621,20 @@ public class XmlTypeRealize {
return plateDetails;
}
+ private void addIslandDetail(PlateDetail plateDetail, IsletXmlVOS isletXmlVOS) {
+ if (isletXmlVOS != null && ObjectUtils.allNull(isletXmlVOS)) {
+ if (isletXmlVOS.getIsletXmlVOList() != null && isletXmlVOS.getIsletXmlVOList().size() > 0) {
+ for (IsletXmlVO isletXmlVO : isletXmlVOS.getIsletXmlVOList()) {
+ ModelDetail modelDetail = ModelDetail.builder()
+ .id(Integer.valueOf(isletXmlVO.getId()))
+ .parentId(Integer.valueOf(isletXmlVO.getParentId()))
+ .pointList(addPointDetail(isletXmlVO.getPointXmlVOS())).build();
+ plateDetail.getContourDetail().add(modelDetail);
+ }
+ }
+ }
+ }
+
// 是否转换布尔值
public Boolean convertToBoolean(String str) {
Boolean isTrue = false;
@@ -642,7 +661,7 @@ public class XmlTypeRealize {
for (PointXmlVO pointXmlVO : outlineXmlVO.getPointXmlVOList()) {
Double x = Double.parseDouble(pointXmlVO.getPointX());
Double y = Double.parseDouble(pointXmlVO.getPointY());
- OrderPartsAddVO edging = (OrderPartsAddVO) edgIng.get(pointXmlVO.getEdgingId());
+ OrderPartsAddVO edging = (OrderPartsAddVO) edgIng.get(pointXmlVO.getItemCode());
if (edging != null){
size = edging.getThickness();
}
@@ -663,7 +682,7 @@ public class XmlTypeRealize {
}
plateDetail.getRawPointDetail().add(PointDetail.builder()
- .id(pointXmlVO.getId())
+// .id(pointXmlVO.getId())
.pointX(x)
.pointY(y)
.curve(Double.parseDouble(pointXmlVO.getCurvature()))
@@ -686,7 +705,7 @@ public class XmlTypeRealize {
if (cuttingOutlineXmlVO.getPointXmlVOList() != null && cuttingOutlineXmlVO.getPointXmlVOList().size() > 0) {
for (PointXmlVO pointXmlVO : cuttingOutlineXmlVO.getPointXmlVOList()) {
plateDetail.getPointDetail().add(PointDetail.builder()
- .id(pointXmlVO.getId())
+// .id(pointXmlVO.getId())
.pointX(Double.parseDouble(pointXmlVO.getPointX()))
.pointY(Double.parseDouble(pointXmlVO.getPointY()))
.curve(Double.parseDouble(pointXmlVO.getCurvature()))
@@ -709,8 +728,8 @@ public class XmlTypeRealize {
if (holeXmlVOS.getHoleXmlVOList() != null && holeXmlVOS.getHoleXmlVOList().size() > 0) {
for (HoleXmlVO holeXmlVO : holeXmlVOS.getHoleXmlVOList()) {
DictDataRespDTO faceType = dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, holeXmlVO.getFace()).getData();
- Integer faceTypeValue = faceType != null ? Integer.valueOf(faceType.getValue()) : 2;
- Integer direction = Integer.valueOf(dictDataApi.parseDictData(DictTypeConstants.HOLE_DIR, holeXmlVO.getDirection()).getData().getValue());
+ Integer faceTypeValue = faceType != null ? Integer.parseInt(faceType.getValue()) : 2;
+ Integer direction = Integer.valueOf(dictDataApi.parseDictData(DictTypeConstants.HOLE_DIRECTION, holeXmlVO.getDirection()).getData().getValue());
DictDataRespDTO holeType = holeXmlVO.getType() == null ? null : dictDataApi.parseDictData(DictTypeConstants.HOLE_TYPE, holeXmlVO.getType()).getData();
Double radius = holeXmlVO.getDiameter() != null ? Double.parseDouble(holeXmlVO.getDiameter()) / 2 : 0;
Double depth = holeXmlVO.getDepth() != null ? Double.parseDouble(holeXmlVO.getDepth()) : 0;
@@ -748,14 +767,21 @@ public class XmlTypeRealize {
}
if (grooveXmlVOS.getGrooveXmlVOList() != null && grooveXmlVOS.getGrooveXmlVOList().size() > 0) {
for (GrooveXmlVO grooveXmlVO : grooveXmlVOS.getGrooveXmlVOList()) {
- Integer faceType = Integer.valueOf(dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, grooveXmlVO.getFace()).getData().getValue());
+ int faceType = Integer.parseInt(dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, grooveXmlVO.getFace()).getData().getValue());
faceType = faceType == 0 || faceType == 1 ? faceType : 2;
ModelDetail modelDetail = ModelDetail.builder()
+ .id(Integer.valueOf(grooveXmlVO.getId()))
+ .parentId(Integer.valueOf(grooveXmlVO.getParentId()))
.type(grooveXmlVO.getType())
.faceType(faceType)
+ .width(Double.parseDouble(grooveXmlVO.getWidth()))
+ .length(Double.parseDouble(grooveXmlVO.getLength()))
.depth(Double.parseDouble(grooveXmlVO.getDepth()))
.knifeName(grooveXmlVO.getToolName())
.knifeRadius(Double.parseDouble(grooveXmlVO.getToolDiameter()) / 2)
+ .round(Double.parseDouble(grooveXmlVO.getRound()))
+ .redundance(Double.parseDouble(grooveXmlVO.getRedundance()))
+ .tangentAngle(Double.parseDouble(grooveXmlVO.getTangentAngle()))
.originModeling(getOriginModelingData(grooveXmlVO))
.pointList(addPointDetail(grooveXmlVO.getPointXmlVOS()))
.offSetList(addOffSetDetail(grooveXmlVO.getOffsetLineXmlVOS())).build();
@@ -782,7 +808,7 @@ public class XmlTypeRealize {
if (pointXmlVOS != null && pointXmlVOS.getPointXmlVOList() != null && pointXmlVOS.getPointXmlVOList().size() > 0) {
for (PointXmlVO pointXmlVO : pointXmlVOS.getPointXmlVOList()) {
pointLists.add(PointList.builder()
- .pointId(Integer.valueOf(pointXmlVO.getId()))
+// .pointId(Integer.valueOf(pointXmlVO.getId()))
.pointX(Double.parseDouble(pointXmlVO.getPointX())).
pointY(Double.parseDouble(pointXmlVO.getPointY()))
.pointZ(Double.parseDouble(pointXmlVO.getPointZ()))
@@ -801,7 +827,7 @@ public class XmlTypeRealize {
if (offsetLineXmlVOS != null && offsetLineXmlVOS.getOffsetLineXmlVOList() != null && offsetLineXmlVOS.getOffsetLineXmlVOList().size() > 0) {
for (OffsetLineXmlVO offsetLineXmlVO : offsetLineXmlVOS.getOffsetLineXmlVOList()) {
offSetList.add(OffSetList.builder()
- .id(offsetLineXmlVO.getId())
+// .id(offsetLineXmlVO.getId())
.value(Double.parseDouble(offsetLineXmlVO.getOffset()))
.depth(Double.parseDouble(offsetLineXmlVO.getDepth()))
.angle(Double.parseDouble(offsetLineXmlVO.getTangentAngle()))
diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml b/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml
index 876419071..7eccabf68 100644
--- a/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml
+++ b/cf-module-prod-manage/cf-module-prod-manage-biz/pom.xml
@@ -189,6 +189,83 @@
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
+
+ ZIP
+
+
+ com.cf.imes
+ cf-common
+
+
+ com.cf.imes
+ cf-module-infra-api
+
+
+ com.cf.imes
+ cf-module-prod-manage-api
+
+
+ com.cf.imes
+ cf-module-system-api
+
+
+ com.cf.imes
+ cf-spring-boot-starter-banner
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-data-permission
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-dict
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-error-code
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-operatelog
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-organ
+
+
+ com.cf.imes
+ cf-spring-boot-starter-excel
+
+
+ com.cf.imes
+ cf-spring-boot-starter-file
+
+
+ com.cf.imes
+ cf-spring-boot-starter-monitor
+
+
+ com.cf.imes
+ cf-spring-boot-starter-mybatis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-redis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-rpc
+
+
+ com.cf.imes
+ cf-spring-boot-starter-security
+
+
+ com.cf.imes
+ cf-spring-boot-starter-web
+
+
+
diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateRespVO.java b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateRespVO.java
index 9da84d1cb..a5c0c1b90 100644
--- a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateRespVO.java
+++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/controller/admin/plate/vo/remain/RemainPlateRespVO.java
@@ -60,7 +60,7 @@ public class RemainPlateRespVO {
@Schema(description = "纹理 有 无", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("纹理 有 无")
- private String texture;
+ private Boolean texture;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("宽度")
diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/dal/mysql/plate/PlateMapper.java b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/dal/mysql/plate/PlateMapper.java
index 3520d6805..421991b50 100644
--- a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/dal/mysql/plate/PlateMapper.java
+++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/dal/mysql/plate/PlateMapper.java
@@ -71,4 +71,11 @@ public interface PlateMapper extends BaseMapperX {
}
PlateDO selectOneById(@Param("id") Long id, @Param("organId") Long organId);
+
+ default Boolean isByGoodID(String goodId , Long organId) {
+ if (selectOne(PlateDO::getGoodsId, goodId, PlateDO::getOrganId, organId) != null) {
+ return true;
+ }
+ return false;
+ }
}
diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/plate/PlateServiceImpl.java b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/plate/PlateServiceImpl.java
index 330e139fd..d43935e5b 100644
--- a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/plate/PlateServiceImpl.java
+++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/plate/PlateServiceImpl.java
@@ -25,6 +25,7 @@ import java.util.List;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
+import static com.cf.imes.module.system.enums.ErrorCodeConstants.PLATE_GOODS_ID_NOT_SAME;
import static com.cf.imes.module.system.enums.ErrorCodeConstants.REMAIN_PLATE_NOT_EXISTS;
/**
@@ -73,6 +74,10 @@ public class PlateServiceImpl implements PlateService {
validatePlateExists(updateReqVO.getId(),
getOrganId(BASE_PLATE_UPDATE_PERMISSION, getLoginUser().getId(), updateReqVO.getOrganId()));
PlateDO updateObj = BeanUtils.toBean(updateReqVO, PlateDO.class);
+ // 校验板材goods_id是否相同
+ if (!plateMapper.isByGoodID(updateReqVO.getGoodsId(), getLoginUser().getId())) {
+ throw exception(PLATE_GOODS_ID_NOT_SAME);
+ }
plateMapper.updateById(updateObj);
}
diff --git a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java
index 821a823f0..6eb570638 100644
--- a/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java
+++ b/cf-module-prod-manage/cf-module-prod-manage-biz/src/main/java/com/cf/imes/module/manage/service/remainplaten/RemainPlateServiceImpl.java
@@ -5,7 +5,7 @@ import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlatePag
import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlateSaveReqVO;
import com.cf.imes.module.manage.dal.dataobject.remainplaten.RemainPlateDO;
import com.cf.imes.module.manage.dal.mysql.remainplaten.RemainPlateMapper;
-import com.cf.imes.module.manage.enums.DeletedCodeEnum;
+import com.cf.imes.framework.common.enums.DeletedCodeEnum;
import com.cf.imes.module.manage.enums.RemainPlateStatusEnum;
import com.cf.imes.module.manage.enums.RemainPlateUseTypeEnum;
import org.springframework.stereotype.Service;
diff --git a/cf-module-report/cf-module-report-biz/pom.xml b/cf-module-report/cf-module-report-biz/pom.xml
index 2dd925473..68e7d72d1 100644
--- a/cf-module-report/cf-module-report-biz/pom.xml
+++ b/cf-module-report/cf-module-report-biz/pom.xml
@@ -175,6 +175,65 @@
${spring.boot.version}
true
+ ZIP
+
+
+ com.cf.imes
+ cf-common
+
+
+ com.cf.imes
+ cf-module-infra-api
+
+
+ com.cf.imes
+ cf-module-prod-executor-api
+
+
+ com.cf.imes
+ cf-module-report-api
+
+
+ com.cf.imes
+ cf-module-system-api
+
+
+ com.cf.imes
+ cf-spring-boot-starter-banner
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-operatelog
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-organ
+
+
+ com.cf.imes
+ cf-spring-boot-starter-monitor
+
+
+ com.cf.imes
+ cf-spring-boot-starter-mybatis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-redis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-rpc
+
+
+ com.cf.imes
+ cf-spring-boot-starter-security
+
+
+ com.cf.imes
+ cf-spring-boot-starter-web
+
+
diff --git a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/controller/admin/template/ReportTemplateController.java b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/controller/admin/template/ReportTemplateController.java
index 4a6b22a18..5c5f2621c 100644
--- a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/controller/admin/template/ReportTemplateController.java
+++ b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/controller/admin/template/ReportTemplateController.java
@@ -151,7 +151,7 @@ public class ReportTemplateController {
}
}
- @GetMapping("/template/excel/import")
+ @PostMapping("/template/excel/import")
@Operation(summary = "导入excel模板")
@PreAuthorize("@ss.hasPermission('report:design')")
public ReportDefinitionWrapper importExcel(@RequestParam("file") MultipartFile file) {
diff --git a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/dataset/ReportDatasetDO.java b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/dataset/ReportDatasetDO.java
index 082c6408b..37c2ac48c 100644
--- a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/dataset/ReportDatasetDO.java
+++ b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/dataset/ReportDatasetDO.java
@@ -1,5 +1,6 @@
package com.cf.imes.module.report.dal.dataobject.dataset;
+import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -71,5 +72,6 @@ public class ReportDatasetDO extends BaseDO {
/**
* 组织id
*/
+ @TableField(fill = FieldFill.INSERT_UPDATE)
private Long organId;
}
diff --git a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/datasource/ReportDatasourceDO.java b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/datasource/ReportDatasourceDO.java
index 8c38c4dd6..5557bcc84 100644
--- a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/datasource/ReportDatasourceDO.java
+++ b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/datasource/ReportDatasourceDO.java
@@ -1,5 +1,6 @@
package com.cf.imes.module.report.dal.dataobject.datasource;
+import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
@@ -82,6 +83,7 @@ public class ReportDatasourceDO extends BaseDO {
/**
* 组织id
*/
+ @TableField(fill = FieldFill.INSERT_UPDATE)
private Long organId;
/**
diff --git a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/template/ReportTemplateDO.java b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/template/ReportTemplateDO.java
index 502f4d929..c59abe40c 100644
--- a/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/template/ReportTemplateDO.java
+++ b/cf-module-report/cf-module-report-biz/src/main/java/com/cf/imes/module/report/dal/dataobject/template/ReportTemplateDO.java
@@ -53,6 +53,7 @@ public class ReportTemplateDO extends BaseDO {
/**
* 组织id
*/
+ @TableField(fill = FieldFill.INSERT_UPDATE)
private Long organId;
/**
diff --git a/cf-module-report/cf-module-report-biz/src/main/resources/lib/ureport-core-2.3.0-SNAPSHOT.jar b/cf-module-report/cf-module-report-biz/src/main/resources/lib/ureport-core-2.3.0-SNAPSHOT.jar
index 447fc3b16..2a6a16686 100644
Binary files a/cf-module-report/cf-module-report-biz/src/main/resources/lib/ureport-core-2.3.0-SNAPSHOT.jar and b/cf-module-report/cf-module-report-biz/src/main/resources/lib/ureport-core-2.3.0-SNAPSHOT.jar differ
diff --git a/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java b/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java
index 7ea78c920..1b4d22daf 100644
--- a/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java
+++ b/cf-module-system/cf-module-system-api/src/main/java/com/cf/imes/module/system/enums/ErrorCodeConstants.java
@@ -251,6 +251,7 @@ public interface ErrorCodeConstants {
ErrorCode RAW_GOODS_NOT_EXISTS = new ErrorCode(1_002_033_006, "设计板材不存在");
ErrorCode RAW_GOODS_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_002_033_007, "生产板材导入数据不可以为空");
ErrorCode PLATENO_ERROR = new ErrorCode(1_002_033_008, "当前板编号无对应包裹信息");
+ ErrorCode PLATE_GOODS_ID_NOT_SAME = new ErrorCode(1_002_033_009, "板材商品编号存在,请重新命名商品编号");
diff --git a/cf-module-system/cf-module-system-biz/pom.xml b/cf-module-system/cf-module-system-biz/pom.xml
index 926be9a9c..62ca48d86 100644
--- a/cf-module-system/cf-module-system-biz/pom.xml
+++ b/cf-module-system/cf-module-system-biz/pom.xml
@@ -213,6 +213,103 @@
org.springframework.boot
spring-boot-maven-plugin
${spring.boot.version}
+
+ ZIP
+
+
+ com.cf.imes
+ cf-common
+
+
+ com.cf.imes
+ cf-module-infra-api
+
+
+ com.cf.imes
+ cf-module-prod-executor-api
+
+
+ com.cf.imes
+ cf-module-system-api
+
+
+ com.cf.imes
+ cf-spring-boot-starter-banner
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-data-permission
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-dict
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-error-code
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-ip
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-operatelog
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-organ
+
+
+ com.cf.imes
+ cf-spring-boot-starter-biz-sms
+
+
+ com.cf.imes
+ cf-spring-boot-starter-captcha
+
+
+ com.cf.imes
+ cf-spring-boot-starter-elasticsearch
+
+
+ com.cf.imes
+ cf-spring-boot-starter-env
+
+
+ com.cf.imes
+ cf-spring-boot-starter-excel
+
+
+ com.cf.imes
+ cf-spring-boot-starter-monitor
+
+
+ com.cf.imes
+ cf-spring-boot-starter-mybatis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-redis
+
+
+ com.cf.imes
+ cf-spring-boot-starter-rpc
+
+
+ com.cf.imes
+ cf-spring-boot-starter-security
+
+
+ com.cf.imes
+ cf-spring-boot-starter-web
+
+
+ com.cf.imes
+ cf-spring-boot-starter-mq
+
+
+
diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java
index 8537ef0d0..10650ce47 100644
--- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java
+++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/dict/vo/data/DictDataSaveReqVO.java
@@ -2,6 +2,7 @@ package com.cf.imes.module.system.controller.admin.dict.vo.data;
import com.cf.imes.framework.common.enums.CommonStatusEnum;
import com.cf.imes.framework.common.validation.InEnum;
+import com.cf.imes.module.system.validation.system.dict.CssClassValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@@ -44,6 +45,7 @@ public class DictDataSaveReqVO {
private String colorType;
@Schema(description = "css 样式", example = "btn-visible")
+ @CssClassValid
private String cssClass;
@Schema(description = "备注", example = "我是一个角色")
diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/organ/vo/packages/TenantPackageSaveReqVO.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/organ/vo/packages/TenantPackageSaveReqVO.java
index 817089c5b..173557beb 100644
--- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/organ/vo/packages/TenantPackageSaveReqVO.java
+++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/organ/vo/packages/TenantPackageSaveReqVO.java
@@ -4,6 +4,7 @@ import com.cf.imes.framework.common.enums.CommonStatusEnum;
import com.cf.imes.framework.common.validation.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
+import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@@ -18,6 +19,7 @@ public class TenantPackageSaveReqVO {
@Schema(description = "套餐名", requiredMode = Schema.RequiredMode.REQUIRED, example = "VIP")
@NotEmpty(message = "套餐名不能为空")
+ @Length(min = 1, max = 30, message = "套餐名长度不能超过30位")
private String name;
@Schema(description = "状态,参见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/permission/MenuController.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/permission/MenuController.java
index 1a6ea7b3b..a3d1a6264 100644
--- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/permission/MenuController.java
+++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/controller/admin/permission/MenuController.java
@@ -110,7 +110,7 @@ public class MenuController {
public CommonResult> getSimpleMenuList() {
// status:0 开启 visiable:1 显示
List list = menuService.getMenuListByOrgan(
- new MenuListReqVO().setStatus(CommonStatusEnum.ENABLE.getStatus()).setVisiable(CommonStatusEnum.DISABLE.getStatus()));
+ new MenuListReqVO().setStatus(CommonStatusEnum.ENABLE.getStatus()));
list.sort(Comparator.comparing(MenuDO::getSort));
return success(BeanUtils.toBean(list, MenuSimpleRespVO.class));
}
diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/order/OrderStatisticsUnitInEnumValidator.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/order/OrderStatisticsUnitInEnumValidator.java
deleted file mode 100644
index 85cd02a5e..000000000
--- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/order/OrderStatisticsUnitInEnumValidator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.cf.imes.module.system.order;
-
-import cn.hutool.core.util.ObjectUtil;
-import com.cf.imes.module.executor.enums.OrderStatisticsUnit;
-
-import javax.validation.ConstraintValidator;
-import javax.validation.ConstraintValidatorContext;
-
-/**
- * 生产单统计维度单位入参校验器
- *
- * @author Gqr
- * @since 2024/7/17 9:33
- */
-public class OrderStatisticsUnitInEnumValidator implements ConstraintValidator {
-
- @Override
- public void initialize(OrderStatisticsUnitInEnum constraintAnnotation) {
- ConstraintValidator.super.initialize(constraintAnnotation);
- }
-
- @Override
- public boolean isValid(Integer value, ConstraintValidatorContext context) {
- if (ObjectUtil.isNull(value)) {
- return true;
- }
- OrderStatisticsUnit unit = OrderStatisticsUnit.fromValue(value);
- if (ObjectUtil.isNotNull(unit)) {
- return true;
- } else {
- return false;
- }
- }
-
-}
-
diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictTypeServiceImpl.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictTypeServiceImpl.java
index 1af6b0759..134d04275 100644
--- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictTypeServiceImpl.java
+++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/service/dict/DictTypeServiceImpl.java
@@ -1,17 +1,23 @@
package com.cf.imes.module.system.service.dict;
+import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.cf.imes.framework.common.enums.DeletedCodeEnum;
import com.cf.imes.framework.common.exception.util.ServiceExceptionUtil;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.date.LocalDateTimeUtils;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.system.controller.admin.dict.vo.type.DictTypePageReqVO;
import com.cf.imes.module.system.controller.admin.dict.vo.type.DictTypeSaveReqVO;
+import com.cf.imes.module.system.dal.dataobject.dict.DictDataDO;
import com.cf.imes.module.system.dal.dataobject.dict.DictTypeDO;
+import com.cf.imes.module.system.dal.mysql.dict.DictDataMapper;
import com.cf.imes.module.system.dal.mysql.dict.DictTypeMapper;
import com.cf.imes.module.system.enums.ErrorCodeConstants;
import com.google.common.annotations.VisibleForTesting;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
@@ -33,6 +39,9 @@ public class DictTypeServiceImpl implements DictTypeService {
@Resource
private DictTypeMapper dictTypeMapper;
+ @Resource
+ private DictDataMapper dictDataMapper;
+
@Override
public PageResult getDictTypePage(DictTypePageReqVO pageReqVO) {
return dictTypeMapper.selectPage(pageReqVO);
@@ -63,17 +72,25 @@ public class DictTypeServiceImpl implements DictTypeService {
}
@Override
+ @Transactional(rollbackFor = Exception.class)
public void updateDictType(DictTypeSaveReqVO updateReqVO) {
+ String updateReqVOType = updateReqVO.getType();
// 校验自己存在
- validateDictTypeExists(updateReqVO.getId());
+ DictTypeDO oldDictTypeDO = validateDictTypeExists(updateReqVO.getId());
// 校验字典类型的名字的唯一性
validateDictTypeNameUnique(updateReqVO.getId(), updateReqVO.getName());
// 校验字典类型的类型的唯一性
- validateDictTypeUnique(updateReqVO.getId(), updateReqVO.getType());
+ validateDictTypeUnique(updateReqVO.getId(), updateReqVOType);
// 更新字典类型
DictTypeDO updateObj = BeanUtils.toBean(updateReqVO, DictTypeDO.class);
dictTypeMapper.updateById(updateObj);
+
+ // 字典类型发生改变,更新关联字典数据
+ String oldDictTypeDOType = oldDictTypeDO.getType();
+ if (ObjectUtil.isAllNotEmpty(oldDictTypeDOType, updateReqVOType) && ObjectUtil.notEqual(oldDictTypeDOType, updateReqVOType)) {
+ dictDataMapper.update(new LambdaUpdateWrapper().set(DictDataDO::getDictType, updateReqVOType).eq(DictDataDO::getDictType, oldDictTypeDOType).eq(DictDataDO::getStatus, DeletedCodeEnum.NOT_DELETED.getStatus()));
+ }
}
@Override
diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/order/OrderStatisticsUnitInEnum.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/validation/system/dict/CssClassValid.java
similarity index 51%
rename from cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/order/OrderStatisticsUnitInEnum.java
rename to cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/validation/system/dict/CssClassValid.java
index 6bc77140e..4c4fe19de 100644
--- a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/order/OrderStatisticsUnitInEnum.java
+++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/validation/system/dict/CssClassValid.java
@@ -1,14 +1,16 @@
-package com.cf.imes.module.system.order;
+package com.cf.imes.module.system.validation.system.dict;
import javax.validation.Constraint;
import javax.validation.Payload;
-import java.lang.annotation.*;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
/**
- * 生产单统计维度单位入参校验注解
- *
* @author Gqr
- * @since 2024/7/17 9:33
+ * @since 2024/9/20 15:24
*/
@Target({
ElementType.METHOD,
@@ -21,10 +23,10 @@ import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(
- validatedBy = {OrderStatisticsUnitInEnumValidator.class}
+ validatedBy = {CssClassValidator.class}
)
-public @interface OrderStatisticsUnitInEnum {
- String message() default "生产单统计维度单位[unit]错误,请检查";
+public @interface CssClassValid {
+ String message() default "颜色格式错误,请检查";
Class>[] groups() default {};
diff --git a/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/validation/system/dict/CssClassValidator.java b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/validation/system/dict/CssClassValidator.java
new file mode 100644
index 000000000..b699b2cb9
--- /dev/null
+++ b/cf-module-system/cf-module-system-biz/src/main/java/com/cf/imes/module/system/validation/system/dict/CssClassValidator.java
@@ -0,0 +1,27 @@
+package com.cf.imes.module.system.validation.system.dict;
+
+import org.apache.commons.lang3.StringUtils;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Gqr
+ * @since 2024/9/20 15:27
+ */
+public class CssClassValidator implements ConstraintValidator {
+ private static final String REGEX = "^#([0-9a-fA-F]{3}){1,2}$";
+
+ @Override
+ public void initialize(CssClassValid constraintAnnotation) {
+ ConstraintValidator.super.initialize(constraintAnnotation);
+ }
+
+ @Override
+ public boolean isValid(String value, ConstraintValidatorContext context) {
+ if (StringUtils.isEmpty(value)) {
+ return true;
+ }
+ return value.matches(REGEX);
+ }
+}
diff --git a/cf-module-system/cf-module-system-biz/src/main/resources/application.yaml b/cf-module-system/cf-module-system-biz/src/main/resources/application.yaml
index ff3b4969c..085a8f37d 100644
--- a/cf-module-system/cf-module-system-biz/src/main/resources/application.yaml
+++ b/cf-module-system/cf-module-system-biz/src/main/resources/application.yaml
@@ -206,9 +206,9 @@ chenfeng:
end-code: 9999 # 这里配置 9999 的原因是,测试方便。
sms:
channel: DEBUG_DING_TALK
- signature:
- apiKey: 28PlJanD0aJLMyMLuH6JI5oVj1/j5ZNGvZPx/zguEvJl02PdrbWe5yIV4s1RSD3CDX9obUhITNlc6glW7MNJq03N7H/v50MFgN4f8mK1oAA=
- apiSecret: O6Yk9gT3xQ9fqSKFuZa9I4bWOULCw2syH4/a1OrD2W7BAE2aQ+bSgqLXfBJT+de0GKHKgjuPNv0v+sDKkizLP22gsYIhdn/3OPSvyJF7Tng=
+ signature: sELLIaR5FAhCp8xx6tDJr1goyvsziMfTsD1HHxWnLkZgbVQOoly0GeadK81IkxbMVlvA5AhB7Apapg38Gx+MuE7G5xiVXt4JSzOqW1Qa6gn88joGXe0wh++lAtw=
+ apiKey: sELLIaR5FAhCp8xx6tDJr1goyvsziMfTsD1HHxWnLkZgbVQOoly0GeadK81IkxbMVlvA5AhB7Apapg38Gx+MuE7G5xiVXt4JSzOqW1Qa6gn88joGXe0wh++lAtw=
+ apiSecret: UjISv3wc1DfeFeG4WaPF4q8boPdrdhuUKuIhUDr1MImA0bK1KMqV76HL7fzEW2NR/Uqrq9Fe3vfWOCwblgKgL/J0twmrNCknBQSXhLNDw9zosoQR9Q1Lgql8dcI/d4g=
encrypt:
enable: false
publicKey: cfimes