webcad拆单新增接收侧面二维刀路、es model构建初始化列表优化

This commit is contained in:
gaoqr
2025-05-22 11:58:41 +08:00
parent 2f78e41313
commit ee9f308d2e
3 changed files with 82 additions and 50 deletions
@@ -171,6 +171,8 @@ public class WebCadDataBlockReqVO {
private List<ModelDetailDTO> modelDetail; private List<ModelDetailDTO> modelDetail;
@JsonProperty("SideModelDetail") @JsonProperty("SideModelDetail")
private List<SideModelDetailDTO> sideModelDetail; private List<SideModelDetailDTO> sideModelDetail;
@JsonProperty("Side2DModelDetail")
private List<SideModelDetailDTO> side2DModelDetail;
@NoArgsConstructor @NoArgsConstructor
@Data @Data
@@ -893,7 +893,7 @@ public class WebCadOrderImportAsyncFactory {
.holeDetail(getHoleDetail(pointInfo.getHoleDetail())) .holeDetail(getHoleDetail(pointInfo.getHoleDetail()))
.sideHoleDetail(getSideHoleDetail(pointInfo.getSideHoleDetail())) .sideHoleDetail(getSideHoleDetail(pointInfo.getSideHoleDetail()))
.contourDetail(getContourDetail(pointInfo.getModelDetail())) .contourDetail(getContourDetail(pointInfo.getModelDetail()))
.sideDetail(getSideDetail(pointInfo.getSideModelDetail())) .sideDetail(getSideDetail(pointInfo.getSideModelDetail(), pointInfo.getSide2DModelDetail()))
.sideRemark(getSideRemark(plateRemark.getRemarks())) .sideRemark(getSideRemark(plateRemark.getRemarks()))
.boardType(block.getBoardTypeName()) .boardType(block.getBoardTypeName())
.has2DModel(block.isHas2DModel()) .has2DModel(block.isHas2DModel())
@@ -946,8 +946,8 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<PointDetail> getPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO> cadPointDetailList) { private List<PointDetail> getPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO> cadPointDetailList) {
List<PointDetail> pointDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadPointDetailList)) { if (CollUtil.isNotEmpty(cadPointDetailList)) {
List<PointDetail> pointDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO cadPointDetail : cadPointDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO cadPointDetail : cadPointDetailList) {
PointDetail pointDetail = new PointDetail(); PointDetail pointDetail = new PointDetail();
pointDetail.setId(String.valueOf(cadPointDetail.getPointID())); pointDetail.setId(String.valueOf(cadPointDetail.getPointID()));
@@ -956,8 +956,9 @@ public class WebCadOrderImportAsyncFactory {
pointDetail.setCurve(cadPointDetail.getCurve()); pointDetail.setCurve(cadPointDetail.getCurve());
pointDetails.add(pointDetail); pointDetails.add(pointDetail);
} }
return pointDetails;
} }
return pointDetails; return null;
} }
/** /**
@@ -967,8 +968,8 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<PointDetail> getRawPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO> orgPointDetail) { private List<PointDetail> getRawPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO> orgPointDetail) {
List<PointDetail> pointDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(orgPointDetail)) { if (CollUtil.isNotEmpty(orgPointDetail)) {
List<PointDetail> pointDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO cadPointDetail : orgPointDetail) { for (WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO cadPointDetail : orgPointDetail) {
PointDetail pointDetail = new PointDetail(); PointDetail pointDetail = new PointDetail();
pointDetail.setId(String.valueOf(cadPointDetail.getPointID())); pointDetail.setId(String.valueOf(cadPointDetail.getPointID()));
@@ -978,8 +979,9 @@ public class WebCadOrderImportAsyncFactory {
pointDetail.setSealSize(BigDecimal.valueOf(cadPointDetail.getSealSize())); pointDetail.setSealSize(BigDecimal.valueOf(cadPointDetail.getSealSize()));
pointDetails.add(pointDetail); pointDetails.add(pointDetail);
} }
return pointDetails;
} }
return pointDetails; return null;
} }
@@ -990,8 +992,8 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<HoleDetail> getHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO> cadHoleDetailList) { private List<HoleDetail> getHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO> cadHoleDetailList) {
List<HoleDetail> holeDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadHoleDetailList)) { if (CollUtil.isNotEmpty(cadHoleDetailList)) {
List<HoleDetail> holeDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO cadHoleDetail : cadHoleDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO cadHoleDetail : cadHoleDetailList) {
HoleDetail holeDetail = new HoleDetail(); HoleDetail holeDetail = new HoleDetail();
holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID())); holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID()));
@@ -1003,8 +1005,9 @@ public class WebCadOrderImportAsyncFactory {
holeDetail.setDepth(cadHoleDetail.getDepth()); holeDetail.setDepth(cadHoleDetail.getDepth());
holeDetails.add(holeDetail); holeDetails.add(holeDetail);
} }
return holeDetails;
} }
return holeDetails; return null;
} }
/** /**
@@ -1014,8 +1017,8 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<HoleDetail> getSideHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO> cadSideHoleDetailList) { private List<HoleDetail> getSideHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO> cadSideHoleDetailList) {
List<HoleDetail> holeDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadSideHoleDetailList)) { if (CollUtil.isNotEmpty(cadSideHoleDetailList)) {
List<HoleDetail> holeDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO cadHoleDetail : cadSideHoleDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO cadHoleDetail : cadSideHoleDetailList) {
HoleDetail holeDetail = new HoleDetail(); HoleDetail holeDetail = new HoleDetail();
holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID())); holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID()));
@@ -1030,8 +1033,9 @@ public class WebCadOrderImportAsyncFactory {
holeDetail.setDepth(cadHoleDetail.getDepth()); holeDetail.setDepth(cadHoleDetail.getDepth());
holeDetails.add(holeDetail); holeDetails.add(holeDetail);
} }
return holeDetails;
} }
return holeDetails; return null;
} }
/** /**
@@ -1041,8 +1045,8 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<ModelDetail> getContourDetail(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO> cadModelDetailList) { private List<ModelDetail> getContourDetail(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO> cadModelDetailList) {
List<ModelDetail> modelDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadModelDetailList)) { if (CollUtil.isNotEmpty(cadModelDetailList)) {
List<ModelDetail> modelDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO cadModelDetail : cadModelDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO cadModelDetail : cadModelDetailList) {
ModelDetail modelDetail = new ModelDetail(); ModelDetail modelDetail = new ModelDetail();
modelDetail.setModelID(cadModelDetail.getModelID()); modelDetail.setModelID(cadModelDetail.getModelID());
@@ -1072,8 +1076,9 @@ public class WebCadOrderImportAsyncFactory {
modelDetails.add(modelDetail); modelDetails.add(modelDetail);
} }
return modelDetails;
} }
return modelDetails; return null;
} }
/** /**
@@ -1083,8 +1088,8 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<OffSetList> getModelDetailOffsetList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO> cadOffSetList) { private List<OffSetList> getModelDetailOffsetList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO> cadOffSetList) {
List<OffSetList> offSetLists = new ArrayList<>();
if (CollUtil.isNotEmpty(cadOffSetList)) { if (CollUtil.isNotEmpty(cadOffSetList)) {
List<OffSetList> offSetLists = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO cadOffset : cadOffSetList) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO cadOffset : cadOffSetList) {
OffSetList offSet = new OffSetList(); OffSetList offSet = new OffSetList();
offSet.setValue(cadOffset.getValue()); offSet.setValue(cadOffset.getValue());
@@ -1095,8 +1100,9 @@ public class WebCadOrderImportAsyncFactory {
offSetLists.add(offSet); offSetLists.add(offSet);
} }
return offSetLists;
} }
return offSetLists; return null;
} }
/** /**
@@ -1106,10 +1112,12 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<PointList> getModelDetailPointList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO> cadPointList) { private List<PointList> getModelDetailPointList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO> cadPointList) {
List<PointList> pointList = new ArrayList<>();
if (CollUtil.isNotEmpty(cadPointList)) { if (CollUtil.isNotEmpty(cadPointList)) {
List<PointList> pointList = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO cadPoint : cadPointList) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO cadPoint : cadPointList) {
PointList point = new PointList(); PointList point = new PointList();
point.setLineId(cadPoint.getLineID());
point.setPointId(cadPoint.getPointID());
point.setPointX(cadPoint.getPointX()); point.setPointX(cadPoint.getPointX());
point.setPointY(cadPoint.getPointY()); point.setPointY(cadPoint.getPointY());
point.setCurve(cadPoint.getCurve()); point.setCurve(cadPoint.getCurve());
@@ -1118,8 +1126,9 @@ public class WebCadOrderImportAsyncFactory {
pointList.add(point); pointList.add(point);
} }
return pointList;
} }
return pointList; return null;
} }
/** /**
@@ -1129,14 +1138,13 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<IContourData> getOriginModelingOutlineList(WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO cadOutline) { private List<IContourData> getOriginModelingOutlineList(WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO cadOutline) {
List<IContourData> outlineList = new ArrayList<>();
if (ObjectUtil.isNull(cadOutline)) { if (ObjectUtil.isNull(cadOutline)) {
return outlineList; return null;
} }
List<Double> buls = cadOutline.getBuls(); List<Double> buls = cadOutline.getBuls();
List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO.PtsDTO> pts = cadOutline.getPts(); List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO.PtsDTO> pts = cadOutline.getPts();
if (CollUtil.isNotEmpty(pts) && CollUtil.isNotEmpty(buls)) { if (CollUtil.isNotEmpty(pts) && CollUtil.isNotEmpty(buls)) {
List<IContourData> outlineList = new ArrayList<>();
for (int i = 0; i < pts.size(); i++) { for (int i = 0; i < pts.size(); i++) {
IContourData iContourData = new IContourData(); IContourData iContourData = new IContourData();
Point point = new Point(); Point point = new Point();
@@ -1146,8 +1154,9 @@ public class WebCadOrderImportAsyncFactory {
iContourData.setBuls(buls.get(i)); iContourData.setBuls(buls.get(i));
outlineList.add(iContourData); outlineList.add(iContourData);
} }
return outlineList;
} }
return outlineList; return null;
} }
/** /**
@@ -1156,12 +1165,16 @@ public class WebCadOrderImportAsyncFactory {
* @param cadSideModelDetailList * @param cadSideModelDetailList
* @return * @return
*/ */
private List<ModelDetail> getSideDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO> cadSideModelDetailList) { private List<ModelDetail> getSideDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO> cadSideModelDetailList, List<WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO> cadSide2DModelDetail) {
List<ModelDetail> modelDetails = new ArrayList<>(); // 合并侧面2v刀路列表
cadSideModelDetailList.addAll(cadSide2DModelDetail);
if (CollUtil.isNotEmpty(cadSideModelDetailList)) { if (CollUtil.isNotEmpty(cadSideModelDetailList)) {
List<ModelDetail> modelDetails = new ArrayList<>();
// 侧面造型和侧面2v刀路合并,序号从头计算不使用cad的
int modelId = 1;
for (WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO cadSideModelDetail : cadSideModelDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO cadSideModelDetail : cadSideModelDetailList) {
ModelDetail modelDetail = new ModelDetail(); ModelDetail modelDetail = new ModelDetail();
modelDetail.setModelID(cadSideModelDetail.getModelID()); modelDetail.setModelID(modelId++);
modelDetail.setLineID(cadSideModelDetail.getLineID()); modelDetail.setLineID(cadSideModelDetail.getLineID());
modelDetail.setFaceType(cadSideModelDetail.getFace()); modelDetail.setFaceType(cadSideModelDetail.getFace());
modelDetail.setDepth(cadSideModelDetail.getDepth()); modelDetail.setDepth(cadSideModelDetail.getDepth());
@@ -1190,8 +1203,9 @@ public class WebCadOrderImportAsyncFactory {
modelDetails.add(modelDetail); modelDetails.add(modelDetail);
} }
return modelDetails;
} }
return modelDetails; return null;
} }
/** /**
@@ -1201,8 +1215,8 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private List<List<IContourData>> getSideModelingHoles(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO> cadSideHoles) { private List<List<IContourData>> getSideModelingHoles(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO> cadSideHoles) {
List<List<IContourData>> icontourDataList = new ArrayList<>();
if (CollUtil.isNotEmpty(cadSideHoles)) { if (CollUtil.isNotEmpty(cadSideHoles)) {
List<List<IContourData>> icontourDataList = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO sideHole : cadSideHoles) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO sideHole : cadSideHoles) {
List<IContourData> contourDatas = new ArrayList<>(); List<IContourData> contourDatas = new ArrayList<>();
List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO.PtsDTO> pts = sideHole.getPts(); List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO.PtsDTO> pts = sideHole.getPts();
@@ -1217,8 +1231,9 @@ public class WebCadOrderImportAsyncFactory {
} }
icontourDataList.add(contourDatas); icontourDataList.add(contourDatas);
} }
return icontourDataList;
} }
return icontourDataList; return null;
} }
/** /**
@@ -703,7 +703,7 @@ public class WebCadOrderImportFactory {
.holeDetail(getHoleDetail(pointInfo.getHoleDetail())) .holeDetail(getHoleDetail(pointInfo.getHoleDetail()))
.sideHoleDetail(getSideHoleDetail(pointInfo.getSideHoleDetail())) .sideHoleDetail(getSideHoleDetail(pointInfo.getSideHoleDetail()))
.contourDetail(getContourDetail(pointInfo.getModelDetail())) .contourDetail(getContourDetail(pointInfo.getModelDetail()))
.sideDetail(getSideDetail(pointInfo.getSideModelDetail())) .sideDetail(getSideDetail(pointInfo.getSideModelDetail(), pointInfo.getSide2DModelDetail()))
.sideRemark(getSideRemark(plateRemark.getRemarks())) .sideRemark(getSideRemark(plateRemark.getRemarks()))
.boardType(block.getBoardTypeName()) .boardType(block.getBoardTypeName())
.has2DModel(block.isHas2DModel()) .has2DModel(block.isHas2DModel())
@@ -756,8 +756,8 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<PointDetail> getPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO> cadPointDetailList) { private List<PointDetail> getPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO> cadPointDetailList) {
List<PointDetail> pointDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadPointDetailList)) { if (CollUtil.isNotEmpty(cadPointDetailList)) {
List<PointDetail> pointDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO cadPointDetail : cadPointDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.PointDetailDTO cadPointDetail : cadPointDetailList) {
PointDetail pointDetail = new PointDetail(); PointDetail pointDetail = new PointDetail();
pointDetail.setId(String.valueOf(cadPointDetail.getPointID())); pointDetail.setId(String.valueOf(cadPointDetail.getPointID()));
@@ -766,8 +766,9 @@ public class WebCadOrderImportFactory {
pointDetail.setCurve(cadPointDetail.getCurve()); pointDetail.setCurve(cadPointDetail.getCurve());
pointDetails.add(pointDetail); pointDetails.add(pointDetail);
} }
return pointDetails;
} }
return pointDetails; return null;
} }
/** /**
@@ -777,8 +778,8 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<PointDetail> getRawPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO> orgPointDetail) { private List<PointDetail> getRawPointDetail(List<WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO> orgPointDetail) {
List<PointDetail> pointDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(orgPointDetail)) { if (CollUtil.isNotEmpty(orgPointDetail)) {
List<PointDetail> pointDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO cadPointDetail : orgPointDetail) { for (WebCadDataBlockReqVO.PointInfoDTO.OrgPointDetailDTO cadPointDetail : orgPointDetail) {
PointDetail pointDetail = new PointDetail(); PointDetail pointDetail = new PointDetail();
pointDetail.setId(String.valueOf(cadPointDetail.getPointID())); pointDetail.setId(String.valueOf(cadPointDetail.getPointID()));
@@ -788,8 +789,9 @@ public class WebCadOrderImportFactory {
pointDetail.setSealSize(BigDecimal.valueOf(cadPointDetail.getSealSize())); pointDetail.setSealSize(BigDecimal.valueOf(cadPointDetail.getSealSize()));
pointDetails.add(pointDetail); pointDetails.add(pointDetail);
} }
return pointDetails;
} }
return pointDetails; return null;
} }
@@ -800,8 +802,8 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<HoleDetail> getHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO> cadHoleDetailList) { private List<HoleDetail> getHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO> cadHoleDetailList) {
List<HoleDetail> holeDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadHoleDetailList)) { if (CollUtil.isNotEmpty(cadHoleDetailList)) {
List<HoleDetail> holeDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO cadHoleDetail : cadHoleDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.HoleDetailDTO cadHoleDetail : cadHoleDetailList) {
HoleDetail holeDetail = new HoleDetail(); HoleDetail holeDetail = new HoleDetail();
holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID())); holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID()));
@@ -813,8 +815,9 @@ public class WebCadOrderImportFactory {
holeDetail.setDepth(cadHoleDetail.getDepth()); holeDetail.setDepth(cadHoleDetail.getDepth());
holeDetails.add(holeDetail); holeDetails.add(holeDetail);
} }
return holeDetails;
} }
return holeDetails; return null;
} }
/** /**
@@ -824,8 +827,8 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<HoleDetail> getSideHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO> cadSideHoleDetailList) { private List<HoleDetail> getSideHoleDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO> cadSideHoleDetailList) {
List<HoleDetail> holeDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadSideHoleDetailList)) { if (CollUtil.isNotEmpty(cadSideHoleDetailList)) {
List<HoleDetail> holeDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO cadHoleDetail : cadSideHoleDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.SideHoleDetailDTO cadHoleDetail : cadSideHoleDetailList) {
HoleDetail holeDetail = new HoleDetail(); HoleDetail holeDetail = new HoleDetail();
holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID())); holeDetail.setId(String.valueOf(cadHoleDetail.getHoleID()));
@@ -840,8 +843,9 @@ public class WebCadOrderImportFactory {
holeDetail.setDepth(cadHoleDetail.getDepth()); holeDetail.setDepth(cadHoleDetail.getDepth());
holeDetails.add(holeDetail); holeDetails.add(holeDetail);
} }
return holeDetails;
} }
return holeDetails; return null;
} }
/** /**
@@ -851,8 +855,8 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<ModelDetail> getContourDetail(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO> cadModelDetailList) { private List<ModelDetail> getContourDetail(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO> cadModelDetailList) {
List<ModelDetail> modelDetails = new ArrayList<>();
if (CollUtil.isNotEmpty(cadModelDetailList)) { if (CollUtil.isNotEmpty(cadModelDetailList)) {
List<ModelDetail> modelDetails = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO cadModelDetail : cadModelDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO cadModelDetail : cadModelDetailList) {
ModelDetail modelDetail = new ModelDetail(); ModelDetail modelDetail = new ModelDetail();
modelDetail.setModelID(cadModelDetail.getModelID()); modelDetail.setModelID(cadModelDetail.getModelID());
@@ -882,8 +886,9 @@ public class WebCadOrderImportFactory {
modelDetails.add(modelDetail); modelDetails.add(modelDetail);
} }
return modelDetails;
} }
return modelDetails; return null;
} }
/** /**
@@ -893,8 +898,8 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<OffSetList> getModelDetailOffsetList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO> cadOffSetList) { private List<OffSetList> getModelDetailOffsetList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO> cadOffSetList) {
List<OffSetList> offSetLists = new ArrayList<>();
if (CollUtil.isNotEmpty(cadOffSetList)) { if (CollUtil.isNotEmpty(cadOffSetList)) {
List<OffSetList> offSetLists = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO cadOffset : cadOffSetList) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OffSetListDTO cadOffset : cadOffSetList) {
OffSetList offSet = new OffSetList(); OffSetList offSet = new OffSetList();
offSet.setValue(cadOffset.getValue()); offSet.setValue(cadOffset.getValue());
@@ -905,8 +910,9 @@ public class WebCadOrderImportFactory {
offSetLists.add(offSet); offSetLists.add(offSet);
} }
return offSetLists;
} }
return offSetLists; return null;
} }
/** /**
@@ -916,10 +922,12 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<PointList> getModelDetailPointList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO> cadPointList) { private List<PointList> getModelDetailPointList(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO> cadPointList) {
List<PointList> pointList = new ArrayList<>();
if (CollUtil.isNotEmpty(cadPointList)) { if (CollUtil.isNotEmpty(cadPointList)) {
List<PointList> pointList = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO cadPoint : cadPointList) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.PointListDTO cadPoint : cadPointList) {
PointList point = new PointList(); PointList point = new PointList();
point.setLineId(cadPoint.getLineID());
point.setPointId(cadPoint.getPointID());
point.setPointX(cadPoint.getPointX()); point.setPointX(cadPoint.getPointX());
point.setPointY(cadPoint.getPointY()); point.setPointY(cadPoint.getPointY());
point.setCurve(cadPoint.getCurve()); point.setCurve(cadPoint.getCurve());
@@ -928,8 +936,9 @@ public class WebCadOrderImportFactory {
pointList.add(point); pointList.add(point);
} }
return pointList;
} }
return pointList; return null;
} }
/** /**
@@ -939,14 +948,13 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<IContourData> getOriginModelingOutlineList(WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO cadOutline) { private List<IContourData> getOriginModelingOutlineList(WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO cadOutline) {
List<IContourData> outlineList = new ArrayList<>();
if (ObjectUtil.isNull(cadOutline)) { if (ObjectUtil.isNull(cadOutline)) {
return outlineList; return null;
} }
List<Double> buls = cadOutline.getBuls(); List<Double> buls = cadOutline.getBuls();
List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO.PtsDTO> pts = cadOutline.getPts(); List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.OutlineDTO.PtsDTO> pts = cadOutline.getPts();
if (CollUtil.isNotEmpty(pts) && CollUtil.isNotEmpty(buls)) { if (CollUtil.isNotEmpty(pts) && CollUtil.isNotEmpty(buls)) {
List<IContourData> outlineList = new ArrayList<>();
for (int i = 0; i < pts.size(); i++) { for (int i = 0; i < pts.size(); i++) {
IContourData iContourData = new IContourData(); IContourData iContourData = new IContourData();
Point point = new Point(); Point point = new Point();
@@ -956,8 +964,9 @@ public class WebCadOrderImportFactory {
iContourData.setBuls(buls.get(i)); iContourData.setBuls(buls.get(i));
outlineList.add(iContourData); outlineList.add(iContourData);
} }
return outlineList;
} }
return outlineList; return null;
} }
/** /**
@@ -966,12 +975,16 @@ public class WebCadOrderImportFactory {
* @param cadSideModelDetailList * @param cadSideModelDetailList
* @return * @return
*/ */
private List<ModelDetail> getSideDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO> cadSideModelDetailList) { private List<ModelDetail> getSideDetail(List<WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO> cadSideModelDetailList, List<WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO> cadSide2DModelDetail) {
List<ModelDetail> modelDetails = new ArrayList<>(); // 合并侧面2v刀路列表
cadSideModelDetailList.addAll(cadSide2DModelDetail);
if (CollUtil.isNotEmpty(cadSideModelDetailList)) { if (CollUtil.isNotEmpty(cadSideModelDetailList)) {
List<ModelDetail> modelDetails = new ArrayList<>();
// 侧面造型和侧面2v刀路合并,序号从头计算不使用cad的
int modelId = 1;
for (WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO cadSideModelDetail : cadSideModelDetailList) { for (WebCadDataBlockReqVO.PointInfoDTO.SideModelDetailDTO cadSideModelDetail : cadSideModelDetailList) {
ModelDetail modelDetail = new ModelDetail(); ModelDetail modelDetail = new ModelDetail();
modelDetail.setModelID(cadSideModelDetail.getModelID()); modelDetail.setModelID(modelId++);
modelDetail.setLineID(cadSideModelDetail.getLineID()); modelDetail.setLineID(cadSideModelDetail.getLineID());
modelDetail.setFaceType(cadSideModelDetail.getFace()); modelDetail.setFaceType(cadSideModelDetail.getFace());
modelDetail.setDepth(cadSideModelDetail.getDepth()); modelDetail.setDepth(cadSideModelDetail.getDepth());
@@ -1000,8 +1013,9 @@ public class WebCadOrderImportFactory {
modelDetails.add(modelDetail); modelDetails.add(modelDetail);
} }
return modelDetails;
} }
return modelDetails; return null;
} }
/** /**
@@ -1011,8 +1025,8 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private List<List<IContourData>> getSideModelingHoles(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO> cadSideHoles) { private List<List<IContourData>> getSideModelingHoles(List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO> cadSideHoles) {
List<List<IContourData>> icontourDataList = new ArrayList<>();
if (CollUtil.isNotEmpty(cadSideHoles)) { if (CollUtil.isNotEmpty(cadSideHoles)) {
List<List<IContourData>> icontourDataList = new ArrayList<>();
for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO sideHole : cadSideHoles) { for (WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO sideHole : cadSideHoles) {
List<IContourData> contourDatas = new ArrayList<>(); List<IContourData> contourDatas = new ArrayList<>();
List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO.PtsDTO> pts = sideHole.getPts(); List<WebCadDataBlockReqVO.PointInfoDTO.ModelDetailDTO.OriginModelingDTO.HolesDTO.PtsDTO> pts = sideHole.getPts();
@@ -1027,8 +1041,9 @@ public class WebCadOrderImportFactory {
} }
icontourDataList.add(contourDatas); icontourDataList.add(contourDatas);
} }
return icontourDataList;
} }
return icontourDataList; return null;
} }
/** /**