mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 21:52:07 +08:00
提示语句修改
This commit is contained in:
+4
-1
@@ -8,6 +8,7 @@ import com.cf.imes.framework.common.pojo.PageParam;
|
|||||||
import org.hibernate.validator.constraints.Length;
|
import org.hibernate.validator.constraints.Length;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
|
||||||
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
@@ -20,7 +21,9 @@ import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
public class OrderPageReqVO extends PageParam {
|
public class OrderPageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "生产单号")
|
@Schema(description = "生产单号")
|
||||||
private Long id;
|
@Pattern(regexp = "^[0-9]*$",message = "生产单号应为数字")
|
||||||
|
@Length(max = 19,message = "排单号长度不能超过19位")
|
||||||
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "父单号")
|
@Schema(description = "父单号")
|
||||||
private Long parentNo;
|
private Long parentNo;
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ public interface OrderMapper extends BaseMapperX<OrderDO> {
|
|||||||
default PageResult<OrderDO> selectPage(OrderPageReqVO reqVO) {
|
default PageResult<OrderDO> selectPage(OrderPageReqVO reqVO) {
|
||||||
LambdaQueryWrapperX<OrderDO> query = new LambdaQueryWrapperX<OrderDO>()
|
LambdaQueryWrapperX<OrderDO> query = new LambdaQueryWrapperX<OrderDO>()
|
||||||
.eqIfPresent(OrderDO::getParentNo, reqVO.getParentNo())
|
.eqIfPresent(OrderDO::getParentNo, reqVO.getParentNo())
|
||||||
.likeIfPresent(OrderDO::getId, reqVO.getId() == null ? null : String.valueOf(reqVO.getId()))
|
.likeIfPresent(OrderDO::getId, reqVO.getId() == null ? null : reqVO.getId())
|
||||||
.betweenIfPresent(OrderDO::getDeliveryDate, reqVO.getDeliveryDate())
|
.betweenIfPresent(OrderDO::getDeliveryDate, reqVO.getDeliveryDate())
|
||||||
.eqIfPresent(OrderDO::getApiOrderId, reqVO.getApiOrderId())
|
.eqIfPresent(OrderDO::getApiOrderId, reqVO.getApiOrderId())
|
||||||
.betweenIfPresent(OrderDO::getOrderDate, reqVO.getOrderDate())
|
.betweenIfPresent(OrderDO::getOrderDate, reqVO.getOrderDate())
|
||||||
|
|||||||
+2
-2
@@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 板的造型数据
|
* 板的造型生成刀路数据
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@@ -41,6 +41,6 @@ public class IOriginModelingData {
|
|||||||
private Double addDepth;
|
private Double addDepth;
|
||||||
|
|
||||||
// ============ 启用 api =============
|
// ============ 启用 api =============
|
||||||
@Schema(description = "点列表")
|
@Schema(description = "造型点列表")
|
||||||
private List<PointList> pointList;
|
private List<PointList> pointList;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -56,9 +56,9 @@ public class ModelDetail {
|
|||||||
@Schema(description = "造型数据")
|
@Schema(description = "造型数据")
|
||||||
private IOriginModelingData originModeling;
|
private IOriginModelingData originModeling;
|
||||||
|
|
||||||
@Schema(description = "点列表")
|
@Schema(description = "造型点列表")
|
||||||
private List<PointList> pointList;
|
private List<PointList> pointList;
|
||||||
|
|
||||||
@Schema(description = "偏移量列表-模块偏移数据")
|
@Schema(description = "造型偏移量列表-模块偏移数据")
|
||||||
private List<OffSetList> offSetList;
|
private List<OffSetList> offSetList;
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-59
@@ -13,6 +13,7 @@ import com.cf.imes.module.system.api.dict.DictDataApi;
|
|||||||
import com.cf.imes.module.system.api.dict.dto.DictDataRespDTO;
|
import com.cf.imes.module.system.api.dict.dto.DictDataRespDTO;
|
||||||
import com.cf.imes.module.executor.enums.DictTypeConstants;
|
import com.cf.imes.module.executor.enums.DictTypeConstants;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@@ -84,6 +85,12 @@ public class ExcelReadUtil { // 文件读取
|
|||||||
// order 数据转换
|
// order 数据转换
|
||||||
public Map<String, Object> changeOrderDO(Map<String, Object> orderMap) {
|
public Map<String, Object> changeOrderDO(Map<String, Object> orderMap) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
|
||||||
|
if (MapUtils.isEmpty(orderMap)) {
|
||||||
|
map.put("error", false);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
boolean error = true;
|
boolean error = true;
|
||||||
|
|
||||||
if (orderMap.get("客户") == null) {
|
if (orderMap.get("客户") == null) {
|
||||||
@@ -156,65 +163,6 @@ public class ExcelReadUtil { // 文件读取
|
|||||||
map.put("error", error);
|
map.put("error", error);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
// public Map<String, Object> changeOrderDO(Map<Object, Object> orderMap) {
|
|
||||||
// Map<String, Object> map = new HashMap<>();
|
|
||||||
// String error = "";
|
|
||||||
// if (orderMap.get("客户") == null) {
|
|
||||||
// error += "客户不能为空;";
|
|
||||||
// }
|
|
||||||
// if (orderMap.get("经销商") == null) {
|
|
||||||
// error += "经销商不能为空;";
|
|
||||||
// }
|
|
||||||
// if (orderMap.get("客户地址") == null) {
|
|
||||||
// error += "客户地址不能为空;";
|
|
||||||
// }
|
|
||||||
// if (orderMap.get("客户电话") == null) {
|
|
||||||
// error += "客户电话不能为空;";
|
|
||||||
// } else {
|
|
||||||
// if (!ToolUtil.validatePhoneNumber((String) orderMap.get("客户电话"))) {
|
|
||||||
// error += orderMap.get("客户电话") + "-客户电话格式错误;";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (orderMap.get("经销商电话") != null) {
|
|
||||||
// if (!ToolUtil.validatePhoneNumber((String) orderMap.get("经销商电话"))) {
|
|
||||||
// error += orderMap.get("经销商电话") + "-经销商电话格式错误;";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// OrderDO orderDO = OrderDO.builder()
|
|
||||||
// .organId(OrganContextHolder.getOrganId())
|
|
||||||
// .dataType(DataTypeEnum.FILE_IMPORT.getStatus())
|
|
||||||
// .orderDate(LocalDateTime.now())
|
|
||||||
// .customer((String) orderMap.get("客户")) //
|
|
||||||
// .customOrderNo((String) orderMap.get("自定义单号"))
|
|
||||||
// .dealer((String) orderMap.get("经销商")) //
|
|
||||||
// .dealerPhoneNumber((String) orderMap.get("经销商电话"))
|
|
||||||
// .address((String) orderMap.get("客户地址")) //
|
|
||||||
// .phoneNumber((String) orderMap.get("客户电话")) //
|
|
||||||
// .salesman((String) orderMap.get("业务员"))
|
|
||||||
// .splitter((String) orderMap.get("拆单员"))
|
|
||||||
// .orderType(OrderTypeEnum.MAIN_ORDER.getStatus())
|
|
||||||
// .remark((String) orderMap.get("备注"))
|
|
||||||
// .build();
|
|
||||||
// if (orderMap.get("出货日期") == null) {
|
|
||||||
// error += "出货日期不能为空;";
|
|
||||||
// } else {
|
|
||||||
// String s = (String) orderMap.get("出货日期");
|
|
||||||
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
||||||
// Map<String, Object> mapDate = ToolUtil.changeDate(s, formatter);
|
|
||||||
// if (mapDate.get("error") instanceof Integer && (Integer) mapDate.get("error") == -1) {
|
|
||||||
// error += s + "-出货日期格式错误;";
|
|
||||||
// } else {
|
|
||||||
// LocalDate deliveryDate = (LocalDate) mapDate.get("date");
|
|
||||||
// if (deliveryDate.isBefore(LocalDate.now())) {
|
|
||||||
// deliveryDate = LocalDate.now().plus(30, ChronoUnit.DAYS);
|
|
||||||
// }
|
|
||||||
// orderDO.setDeliveryDate(deliveryDate.atStartOfDay());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// map.put("order", orderDO);
|
|
||||||
// map.put("error", error);
|
|
||||||
// return map;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 赋值单元格数据
|
// 赋值单元格数据
|
||||||
private OrderPlateImportExcelVO changeValue(Map<Integer, String> dataMap) {
|
private OrderPlateImportExcelVO changeValue(Map<Integer, String> dataMap) {
|
||||||
|
|||||||
+92
-43
@@ -1091,8 +1091,8 @@ public class XmlTypeRealize {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
String jsonString = JSONObject.toJSONString(extraVO);
|
String jsonString = JSON.toJSONString(extraVO);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(jsonString);
|
JSONObject jsonObject = JSON.parseObject(jsonString);
|
||||||
plateDetail.setPlateExtraRemark(jsonObject);
|
plateDetail.setPlateExtraRemark(jsonObject);
|
||||||
}
|
}
|
||||||
plateDetail.setSealUp(sealUp).setSealDown(sealDown).setSealLeft(sealLeft).setSealRight(sealRight);
|
plateDetail.setSealUp(sealUp).setSealDown(sealDown).setSealLeft(sealLeft).setSealRight(sealRight);
|
||||||
@@ -1149,9 +1149,20 @@ public class XmlTypeRealize {
|
|||||||
|
|
||||||
// 孔
|
// 孔
|
||||||
private void addHole(PlateDO plateDO, PlateDetail plateDetail, HoleXmlVOS holeXmlVOS) {
|
private void addHole(PlateDO plateDO, PlateDetail plateDetail, HoleXmlVOS holeXmlVOS) {
|
||||||
if (holeXmlVOS != null && holeXmlVOS.getHoleXmlVOList() != null && holeXmlVOS.getHoleXmlVOList().size() > 0) {
|
if (holeXmlVOS == null || holeXmlVOS.getHoleXmlVOList() == null || holeXmlVOS.getHoleXmlVOList().isEmpty()) {
|
||||||
Map<String,Integer> holeCountMap = new HashMap<>();
|
return;
|
||||||
holeCountMap.put("count",Integer.valueOf(holeXmlVOS.getCount()));
|
}
|
||||||
|
|
||||||
|
Map<String, Integer> holeCountMap = extractHoleCount(holeXmlVOS);
|
||||||
|
updatePlateDetailHoleCount(plateDetail, holeCountMap);
|
||||||
|
updatePlateDOHoleCount(plateDO, holeXmlVOS);
|
||||||
|
updatePlateDOFilterTypeIfThroughHolesExist(plateDO, holeXmlVOS);
|
||||||
|
addHoleDetailsToPlateDetail(plateDetail, holeXmlVOS.getHoleXmlVOList());
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, Integer> extractHoleCount(HoleXmlVOS holeXmlVOS) {
|
||||||
|
Map<String, Integer> holeCountMap = new HashMap<>();
|
||||||
|
holeCountMap.put("count", Integer.valueOf(holeXmlVOS.getCount()));
|
||||||
holeCountMap.put("countFaceA", Integer.valueOf(holeXmlVOS.getCountFaceA()));
|
holeCountMap.put("countFaceA", Integer.valueOf(holeXmlVOS.getCountFaceA()));
|
||||||
holeCountMap.put("countFaceB", Integer.valueOf(holeXmlVOS.getCountFaceB()));
|
holeCountMap.put("countFaceB", Integer.valueOf(holeXmlVOS.getCountFaceB()));
|
||||||
holeCountMap.put("countSide", Integer.valueOf(holeXmlVOS.getCountSide()));
|
holeCountMap.put("countSide", Integer.valueOf(holeXmlVOS.getCountSide()));
|
||||||
@@ -1164,22 +1175,41 @@ public class XmlTypeRealize {
|
|||||||
holeCountMap.put("countBuildIn", Integer.valueOf(holeXmlVOS.getCountBuildIn()));
|
holeCountMap.put("countBuildIn", Integer.valueOf(holeXmlVOS.getCountBuildIn()));
|
||||||
holeCountMap.put("countHinge", Integer.valueOf(holeXmlVOS.getCountHinge()));
|
holeCountMap.put("countHinge", Integer.valueOf(holeXmlVOS.getCountHinge()));
|
||||||
holeCountMap.put("countThrough", Integer.valueOf(holeXmlVOS.getCountThrough()));
|
holeCountMap.put("countThrough", Integer.valueOf(holeXmlVOS.getCountThrough()));
|
||||||
|
return holeCountMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updatePlateDetailHoleCount(PlateDetail plateDetail, Map<String, Integer> holeCountMap) {
|
||||||
plateDetail.getHoleCount().putAll(holeCountMap);
|
plateDetail.getHoleCount().putAll(holeCountMap);
|
||||||
plateDO.setFrontHoleCount(Integer.valueOf(holeXmlVOS.getCountFaceA())).
|
}
|
||||||
setBackHoleCount(Integer.valueOf(holeXmlVOS.getCountFaceB())).
|
|
||||||
setSideHoleCount(Integer.valueOf(holeXmlVOS.getCountSide()));
|
private void updatePlateDOHoleCount(PlateDO plateDO, HoleXmlVOS holeXmlVOS) {
|
||||||
|
plateDO.setFrontHoleCount(Integer.valueOf(holeXmlVOS.getCountFaceA()));
|
||||||
|
plateDO.setBackHoleCount(Integer.valueOf(holeXmlVOS.getCountFaceB()));
|
||||||
|
plateDO.setSideHoleCount(Integer.valueOf(holeXmlVOS.getCountSide()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updatePlateDOFilterTypeIfThroughHolesExist(PlateDO plateDO, HoleXmlVOS holeXmlVOS) {
|
||||||
if (holeXmlVOS.getCountThrough() != null && Integer.parseInt(holeXmlVOS.getCountThrough()) > 0) {
|
if (holeXmlVOS.getCountThrough() != null && Integer.parseInt(holeXmlVOS.getCountThrough()) > 0) {
|
||||||
plateDO.setFilterType(plateDO.getFilterType() + ",2");
|
plateDO.setFilterType(plateDO.getFilterType() + ",2");
|
||||||
}
|
}
|
||||||
if (holeXmlVOS.getHoleXmlVOList() != null && holeXmlVOS.getHoleXmlVOList().size() > 0) {
|
}
|
||||||
for (HoleXmlVO holeXmlVO : holeXmlVOS.getHoleXmlVOList()) {
|
|
||||||
|
private void addHoleDetailsToPlateDetail(PlateDetail plateDetail, List<HoleXmlVO> holeXmlVOList) {
|
||||||
|
for (HoleXmlVO holeXmlVO : holeXmlVOList) {
|
||||||
|
HoleDetail holeDetail = createHoleDetail(holeXmlVO);
|
||||||
|
plateDetail.getHoleDetail().add(holeDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private HoleDetail createHoleDetail(HoleXmlVO holeXmlVO) {
|
||||||
DictDataRespDTO faceType = dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, holeXmlVO.getFace()).getData();
|
DictDataRespDTO faceType = dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, holeXmlVO.getFace()).getData();
|
||||||
Integer faceTypeValue = faceType != null ? Integer.parseInt(faceType.getValue()) : 2;
|
Integer faceTypeValue = faceType != null ? Integer.parseInt(faceType.getValue()) : 2;
|
||||||
Integer direction = Integer.valueOf(dictDataApi.parseDictData(DictTypeConstants.HOLE_DIRECTION, holeXmlVO.getDirection()).getData().getValue());
|
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();
|
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 radius = holeXmlVO.getDiameter() != null ? Double.parseDouble(holeXmlVO.getDiameter()) / 2 : 0;
|
||||||
Double depth = holeXmlVO.getDepth() != null ? Double.parseDouble(holeXmlVO.getDepth()) : 0;
|
Double depth = holeXmlVO.getDepth() != null ? Double.parseDouble(holeXmlVO.getDepth()) : 0;
|
||||||
HoleDetail holeDetail = HoleDetail.builder()
|
|
||||||
|
return HoleDetail.builder()
|
||||||
.holeName(holeXmlVO.getName())
|
.holeName(holeXmlVO.getName())
|
||||||
.faceType(faceTypeValue)
|
.faceType(faceTypeValue)
|
||||||
.direction(direction)
|
.direction(direction)
|
||||||
@@ -1193,27 +1223,27 @@ public class XmlTypeRealize {
|
|||||||
.endY(holeXmlVO.getEndY() != null ? Double.parseDouble(holeXmlVO.getEndY()) : 0)
|
.endY(holeXmlVO.getEndY() != null ? Double.parseDouble(holeXmlVO.getEndY()) : 0)
|
||||||
.endZ(holeXmlVO.getEndZ() != null ? Double.parseDouble(holeXmlVO.getEndZ()) : 0)
|
.endZ(holeXmlVO.getEndZ() != null ? Double.parseDouble(holeXmlVO.getEndZ()) : 0)
|
||||||
.build();
|
.build();
|
||||||
// if (holeXmlVO.getPointBeginXmlVO() != null) {
|
|
||||||
// holeDetail.setStartX(Double.parseDouble(holeXmlVO.getPointBeginXmlVO().getX())).
|
|
||||||
// setStartY(Double.parseDouble(holeXmlVO.getPointBeginXmlVO().getY())).
|
|
||||||
// setStartZ(Double.parseDouble(holeXmlVO.getPointBeginXmlVO().getZ()));
|
|
||||||
// }
|
|
||||||
// if (holeXmlVO.getPointEndXmlVO() != null) {
|
|
||||||
// holeDetail.setEndX(Double.parseDouble(holeXmlVO.getPointEndXmlVO().getX())).
|
|
||||||
// setEndY(Double.parseDouble(holeXmlVO.getPointEndXmlVO().getY())).
|
|
||||||
// setEndZ(Double.parseDouble(holeXmlVO.getPointEndXmlVO().getZ()));
|
|
||||||
// }
|
|
||||||
plateDetail.getHoleDetail().add(holeDetail);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 造型
|
// 造型
|
||||||
private void addContourDetail(PlateDO plateDO, PlateDetail plateDetail, GrooveXmlVOS grooveXmlVOS) {
|
private void addContourDetail(PlateDO plateDO, PlateDetail plateDetail, GrooveXmlVOS grooveXmlVOS) {
|
||||||
if (grooveXmlVOS != null && ObjectUtils.allNull(grooveXmlVOS)) {
|
if (grooveXmlVOS == null || ObjectUtils.allNull(grooveXmlVOS)) {
|
||||||
Map<String,Integer> contourCount = new HashMap<>();
|
return;
|
||||||
contourCount.put("count",Integer.valueOf(grooveXmlVOS.getCount()));
|
}
|
||||||
|
|
||||||
|
Map<String, Integer> contourCount = extractContourCount(grooveXmlVOS);
|
||||||
|
updatePlateDetailWithContourCount(plateDetail, contourCount);
|
||||||
|
updatePlateDOWithContourCount(plateDO, grooveXmlVOS);
|
||||||
|
updatePlateDOFilterTypeIfThroughGroovesExist(plateDO, grooveXmlVOS);
|
||||||
|
|
||||||
|
if (grooveXmlVOS.getGrooveXmlVOList() != null && !grooveXmlVOS.getGrooveXmlVOList().isEmpty()) {
|
||||||
|
addGrooveDetailsToPlateDetail(plateDetail, grooveXmlVOS.getGrooveXmlVOList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, Integer> extractContourCount(GrooveXmlVOS grooveXmlVOS) {
|
||||||
|
Map<String, Integer> contourCount = new HashMap<>();
|
||||||
|
contourCount.put("count", Integer.valueOf(grooveXmlVOS.getCount()));
|
||||||
contourCount.put("countFaceA", Integer.valueOf(grooveXmlVOS.getCountFaceA()));
|
contourCount.put("countFaceA", Integer.valueOf(grooveXmlVOS.getCountFaceA()));
|
||||||
contourCount.put("countFaceB", Integer.valueOf(grooveXmlVOS.getCountFaceB()));
|
contourCount.put("countFaceB", Integer.valueOf(grooveXmlVOS.getCountFaceB()));
|
||||||
contourCount.put("countSide", Integer.valueOf(grooveXmlVOS.getCountSide()));
|
contourCount.put("countSide", Integer.valueOf(grooveXmlVOS.getCountSide()));
|
||||||
@@ -1226,19 +1256,41 @@ public class XmlTypeRealize {
|
|||||||
contourCount.put("count2V", Integer.valueOf(grooveXmlVOS.getCount2V()));
|
contourCount.put("count2V", Integer.valueOf(grooveXmlVOS.getCount2V()));
|
||||||
contourCount.put("count3D", Integer.valueOf(grooveXmlVOS.getCount3D()));
|
contourCount.put("count3D", Integer.valueOf(grooveXmlVOS.getCount3D()));
|
||||||
contourCount.put("countThrough", Integer.valueOf(grooveXmlVOS.getCountThrough()));
|
contourCount.put("countThrough", Integer.valueOf(grooveXmlVOS.getCountThrough()));
|
||||||
|
return contourCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updatePlateDetailWithContourCount(PlateDetail plateDetail, Map<String, Integer> contourCount) {
|
||||||
plateDetail.getHoleCount().putAll(contourCount);
|
plateDetail.getHoleCount().putAll(contourCount);
|
||||||
plateDetail.setHas2DModel(Integer.parseInt(grooveXmlVOS.getCount2V()) > 0);
|
plateDetail.setHas2DModel(contourCount.getOrDefault("count2V", 0) > 0);
|
||||||
plateDetail.setHas3DModel(Integer.parseInt(grooveXmlVOS.getCount3D()) > 0);
|
plateDetail.setHas3DModel(contourCount.getOrDefault("count3D", 0) > 0);
|
||||||
plateDO.setFrontModelCount(Integer.valueOf(grooveXmlVOS.getCountFaceA())).
|
}
|
||||||
setBackModelCount(Integer.valueOf(grooveXmlVOS.getCountFaceB()));
|
|
||||||
|
private void updatePlateDOWithContourCount(PlateDO plateDO, GrooveXmlVOS grooveXmlVOS) {
|
||||||
|
plateDO.setFrontModelCount(Integer.valueOf(grooveXmlVOS.getCountFaceA()));
|
||||||
|
plateDO.setBackModelCount(Integer.valueOf(grooveXmlVOS.getCountFaceB()));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updatePlateDOFilterTypeIfThroughGroovesExist(PlateDO plateDO, GrooveXmlVOS grooveXmlVOS) {
|
||||||
if (grooveXmlVOS.getCountThrough() != null && Integer.parseInt(grooveXmlVOS.getCountThrough()) > 0) {
|
if (grooveXmlVOS.getCountThrough() != null && Integer.parseInt(grooveXmlVOS.getCountThrough()) > 0) {
|
||||||
plateDO.setFilterType(plateDO.getFilterType() + ",1");
|
plateDO.setFilterType(plateDO.getFilterType() + ",1");
|
||||||
}
|
}
|
||||||
if (grooveXmlVOS.getGrooveXmlVOList() != null && grooveXmlVOS.getGrooveXmlVOList().size() > 0) {
|
}
|
||||||
for (GrooveXmlVO grooveXmlVO : grooveXmlVOS.getGrooveXmlVOList()) {
|
|
||||||
int faceType = Integer.parseInt(dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, grooveXmlVO.getFace()).getData().getValue());
|
private void addGrooveDetailsToPlateDetail(PlateDetail plateDetail, List<GrooveXmlVO> grooveXmlVOList) {
|
||||||
faceType = faceType == 0 || faceType == 1 ? faceType : 2;
|
for (GrooveXmlVO grooveXmlVO : grooveXmlVOList) {
|
||||||
ModelDetail modelDetail = ModelDetail.builder()
|
int faceType = parseFaceType(grooveXmlVO.getFace());
|
||||||
|
ModelDetail modelDetail = createModelDetail(grooveXmlVO, faceType);
|
||||||
|
plateDetail.getContourDetail().add(modelDetail);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int parseFaceType(String face) {
|
||||||
|
int faceType = Integer.parseInt(dictDataApi.parseDictData(DictTypeConstants.HOLE_FACE, face).getData().getValue());
|
||||||
|
return faceType == 0 || faceType == 1 ? faceType : 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ModelDetail createModelDetail(GrooveXmlVO grooveXmlVO, int faceType) {
|
||||||
|
return ModelDetail.builder()
|
||||||
.id(Integer.valueOf(grooveXmlVO.getId()))
|
.id(Integer.valueOf(grooveXmlVO.getId()))
|
||||||
.parentId(Integer.valueOf(grooveXmlVO.getParentId()))
|
.parentId(Integer.valueOf(grooveXmlVO.getParentId()))
|
||||||
.type(grooveXmlVO.getType())
|
.type(grooveXmlVO.getType())
|
||||||
@@ -1252,12 +1304,8 @@ public class XmlTypeRealize {
|
|||||||
.redundance(Double.parseDouble(grooveXmlVO.getRedundance()))
|
.redundance(Double.parseDouble(grooveXmlVO.getRedundance()))
|
||||||
.tangentAngle(Double.parseDouble(grooveXmlVO.getTangentAngle()))
|
.tangentAngle(Double.parseDouble(grooveXmlVO.getTangentAngle()))
|
||||||
.originModeling(getOriginModelingData(grooveXmlVO))
|
.originModeling(getOriginModelingData(grooveXmlVO))
|
||||||
.pointList(addPointDetail(grooveXmlVO.getPointXmlVOS()))
|
.offSetList(addOffSetDetail(grooveXmlVO.getOffsetLineXmlVOS()))
|
||||||
.offSetList(addOffSetDetail(grooveXmlVO.getOffsetLineXmlVOS())).build();
|
.build();
|
||||||
plateDetail.getContourDetail().add(modelDetail);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 造像轮廓数据
|
// 造像轮廓数据
|
||||||
@@ -1268,6 +1316,7 @@ public class XmlTypeRealize {
|
|||||||
.addLen(Double.valueOf(grooveXmlVO.getLengthExtend()))
|
.addLen(Double.valueOf(grooveXmlVO.getLengthExtend()))
|
||||||
.addDepth(Double.valueOf(grooveXmlVO.getDepthExtend()))
|
.addDepth(Double.valueOf(grooveXmlVO.getDepthExtend()))
|
||||||
.addWidth(Double.valueOf(grooveXmlVO.getWidthExtend()))
|
.addWidth(Double.valueOf(grooveXmlVO.getWidthExtend()))
|
||||||
|
.pointList(addPointDetail(grooveXmlVO.getPointXmlVOS()))
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -23,18 +23,18 @@ import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
|||||||
public class RemainPlatePageReqVO extends PageParam {
|
public class RemainPlatePageReqVO extends PageParam {
|
||||||
|
|
||||||
@Schema(description = "ID", example = "16628")
|
@Schema(description = "ID", example = "16628")
|
||||||
@Pattern(regexp = "^[0-9]*$",message = "余料号必须为数字")
|
@Pattern(regexp = "^[0-9]*$",message = "余料号应为数字")
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Schema(description = "排单 ID", example = "16628")
|
@Schema(description = "排单 ID", example = "16628")
|
||||||
@Pattern(regexp = "^[0-9]*$",message = "排单号必须为数字")
|
@Pattern(regexp = "^[0-9]*$",message = "使用排单号应为数字")
|
||||||
private String planId;
|
private String planId;
|
||||||
|
|
||||||
@Schema(description = "组织id", example = "1")
|
@Schema(description = "组织id", example = "1")
|
||||||
private Long organId;
|
private Long organId;
|
||||||
|
|
||||||
@Schema(description = "初始排单 ID", example = "6628")
|
@Schema(description = "初始排单 ID", example = "6628")
|
||||||
@Pattern(regexp = "^[0-9]*$",message = "初始排单号必须为数字")
|
@Pattern(regexp = "^[0-9]*$",message = "排单号应为数字")
|
||||||
private String initPlanId;
|
private String initPlanId;
|
||||||
|
|
||||||
@Schema(description = "余料板状态,0未使用,1使用中", example = "0")
|
@Schema(description = "余料板状态,0未使用,1使用中", example = "0")
|
||||||
|
|||||||
Reference in New Issue
Block a user