1、产品明细Service单元测试覆盖率异常修复;2、cad拆单新增支持板件的cadid和cad数据存储、生产单cadviewpath图纸路径存储;

This commit is contained in:
gaoqr
2025-12-17 15:35:52 +08:00
parent 010678724d
commit 89cc926634
14 changed files with 89 additions and 6 deletions
@@ -83,4 +83,10 @@ public class OrderPlatesDetailReqVO {
@ExcelProperty("颜色")
private String color;
@Schema(description = "cad图纸id")
private Integer cadViewId;
@Schema(description = "cad图纸数据")
private String cadData;
}
@@ -89,4 +89,6 @@ public class OrderRespVO {
private Boolean deleted;
@Schema(description = "cad图纸路径")
private String cadViewPath;
}
@@ -241,6 +241,11 @@ public class PlateRespVO extends PageParam {
@Schema(description = "排单状态")
private Long planStatus;
@Schema(description = "cad图纸id")
private Integer cadViewId;
@Schema(description = "cad图纸数据")
private String cadData;
// @Schema(description = "小板详情列表")
@@ -146,4 +146,9 @@ public class OrderDO extends BaseDO {
private Double plannedPlateArea;
private int version;
/**
* cad图纸路径
*/
private String cadViewPath;
}
@@ -211,4 +211,15 @@ public class PlateDO extends BaseDO {
* 排单id
*/
private Long planId;
/**
* cad图纸id
*/
private Integer cadViewId;
/**
* cad图纸数据
*/
private String cadData;
}
@@ -73,6 +73,7 @@ import com.cf.imes.module.executor.util.deviseData.structure.FieldConstants;
import com.cf.imes.module.executor.util.deviseData.structure.PlateDetail;
import com.cf.imes.module.executor.util.elasticsearch.EsUtils;
import com.cf.imes.module.executor.util.fileConversion.admin.api.webcad.ApiDataTypeVo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.aop.framework.AopContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -96,6 +97,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import static com.cf.imes.framework.common.util.json.JsonUtils.unzipString;
import static com.cf.imes.framework.security.core.util.SecurityFrameworkUtils.getUserOrganId;
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
import static com.cf.imes.module.executor.enums.EsIndexEnum.*;
@@ -307,7 +309,15 @@ public class OrderServiceImpl implements OrderService {
IPage<PlateRespVO> plateRespVOPage = orderItemMapper.selectPlatesDetailByOrderId(page, orderId, roomIds, bodyIds, groupIds,
groupName, getUserOrganId(), deleted);
List<PlateRespVO> orderDetail = plateRespVOPage.getRecords();
List<OrderPlatesDetailReqVO> platesDetailReqVOS = BeanUtils.toBean(orderDetail, OrderPlatesDetailReqVO.class);
List<OrderPlatesDetailReqVO> platesDetailReqVOS = new ArrayList<>();
for (PlateRespVO plateRespVO : orderDetail) {
OrderPlatesDetailReqVO orderPlatesDetailReqVO = BeanUtils.toBean(plateRespVO, OrderPlatesDetailReqVO.class);
String cadData = orderPlatesDetailReqVO.getCadData();
if(StringUtils.isNotEmpty(cadData)) {
orderPlatesDetailReqVO.setCadData(unzipString(cadData));
}
platesDetailReqVOS.add(orderPlatesDetailReqVO);
}
return new PageResult(platesDetailReqVOS, plateRespVOPage.getTotal());
}
@@ -6,7 +6,7 @@
<select id="selectPlatesDetailByOrderId" resultType="com.cf.imes.module.executor.controller.admin.plate.vo.PlateRespVO">
SELECT DISTINCT i.order_id, p.id, p.plate_no, g.material, p.name, p.area, p.seal_left, p.seal_down,
p.seal_right, p.seal_up, p.texture, p.is_special_shaped, p.is_sculpt,p.is_side_sculpt,p.is_2v, p.is_side_2v, p.unregular_point_count, p.front_hole_count,
p.back_hole_count, p.side_hole_count,p.width,p.height,p.thickness,p.remark,g.color,p.is_row_hole, p.custom_plate_no
p.back_hole_count, p.side_hole_count,p.width,p.height,p.thickness,p.remark,g.color,p.is_row_hole, p.custom_plate_no, p.cad_view_id, p.cad_data
FROM order_item i
RIGHT JOIN `order_plate` p ON i.plate_id = p.id
LEFT JOIN `order_goods` g ON g.id = p.goods_id