新增非混单创建排单时,加入纹路分组条件

This commit is contained in:
gaoqr
2025-07-08 16:23:08 +08:00
parent 0318e1bb8d
commit 36785e32d8
7 changed files with 26 additions and 10 deletions
@@ -85,6 +85,9 @@ public class SavePlanPlateList {
@Schema(description = "大板的品牌")
private String brand;
@Schema(description = "纹理")
private Boolean texture;
}
}
@@ -649,13 +649,16 @@ public class PlanServiceImpl implements PlanService {
List<String> brand = records.stream().map(OrderGoodsResp::getBrand).distinct().toList();
List<Boolean> texture = records.stream().map(OrderGoodsResp::getTexture).distinct().toList();
queryWrapperX
.inIfPresent("og.goods_name",goodsName)
.inIfPresent("og.material",material)
.inIfPresent("og.color",color)
.inIfPresent("og.thickness",thickness)
.inIfPresent("og.brand",brand);
.inIfPresent("og.brand",brand)
.inIfPresent("og.texture", texture);
List<OrderGoodsResp> orderGoodsIdList = planItemMapper.selectNoOrderGoodsIdList(queryWrapperX, getUserOrganId(), type);
@@ -1582,7 +1585,7 @@ public class PlanServiceImpl implements PlanService {
for (SavePlanPlateList.GoodsItemList item : items) {
// 将 material 和 thickness 组合成键
String key = item.getMaterial() + "|" + item.getThickness() + "|" + item.getColor()+ "|" + item.getBrand();
String key = item.getMaterial() + "|" + item.getThickness() + "|" + item.getColor()+ "|" + item.getBrand() + "|" + item.getTexture();
// 如果键不存在,初始化一个新的列表
groupedItems.putIfAbsent(key, new ArrayList<>());
@@ -1803,7 +1806,8 @@ public class PlanServiceImpl implements PlanService {
Objects.toString(item.getMaterial(), ""),
Objects.toString(item.getColor(), ""),
Objects.toString(item.getThickness(), ""),
Objects.toString(item.getBrand(), "")
Objects.toString(item.getBrand(), ""),
Objects.toString(item.getTexture(), "")
);
}
@@ -113,6 +113,7 @@ public class PlateServiceImpl implements PlateService {
private static final String FIELD_OG_BRAND = "og.brand";
private static final String FIELD_OG_COLOR = "og.color";
private static final String FIELD_OP_THICKNESS = "op.thickness";
private static final String FIELD_OG_TEXTURE = "og.texture";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -360,6 +361,8 @@ public class PlateServiceImpl implements PlateService {
List<BigDecimal> thickness = goodsRespVOS.stream().map(OrderGoodsResp::getThickness).distinct().toList();
List<Boolean> texture = goodsRespVOS.stream().map(OrderGoodsResp::getTexture).distinct().toList();
// 混单
if(planDO.getType().equals(PlanTypeEnum.MIXEDORDERPLAN.getType())){
@@ -372,7 +375,7 @@ public class PlateServiceImpl implements PlateService {
else {
// 非混单条件查询条件
noMixedInsertQuery(pageReqVO, planDO, material, brand, color, thickness, queryWrapperX);
noMixedInsertQuery(pageReqVO, planDO, material, brand, color, thickness, texture, queryWrapperX);
}
}
@@ -812,6 +815,7 @@ public class PlateServiceImpl implements PlateService {
List<String> brand,
List<String> color,
List<BigDecimal> thickness,
List<Boolean> texture,
QueryWrapperX<OrderDO> queryWrapperX) {
// 是否开启混单
@@ -844,7 +848,8 @@ public class PlateServiceImpl implements PlateService {
.inIfPresent(FIELD_OG_MATERIAL, material)
.inIfPresent(FIELD_OG_BRAND, brand)
.inIfPresent(FIELD_OG_COLOR, color)
.inIfPresent(FIELD_OP_THICKNESS, thickness);
.inIfPresent(FIELD_OP_THICKNESS, thickness)
.inIfPresent(FIELD_OG_TEXTURE, texture);
}
@@ -34,6 +34,7 @@
og.color,
og.thickness,
og.brand,
og.texture,
og.remark,
orp.id as remainId
@@ -265,9 +265,10 @@
select distinct og.thickness as thickness,
og.material as material,
og.color as color,
og.brand as brand
og.brand as brand,
og.texture as texture
from order_plate op
left join order_goods og on op.organ_id = og.organ_id and opi.goods_id = og.id
left join order_goods og on op.organ_id = og.organ_id and op.goods_id = og.id
where op.organ_id = #{organId}
and op.plan_id = #{planId};
</select>
@@ -242,7 +242,8 @@
og.goods_name as goodsName,
og.material as material,
og.thickness as thickness,
og.brand as brand
og.brand as brand,
og.texture as texture
from order_item oi
join order_plate op on op.order_id = oi.order_id and op.organ_id = oi.organ_id and op.id = oi.plate_id
@@ -265,7 +266,8 @@
og.goods_name as goodsName,
og.material as material,
og.thickness as thickness,
og.brand as brand
og.brand as brand,
og.texture as texture
from orders o
join order_goods og on o.id = og.order_id and og.organ_id = #{organId}
@@ -289,6 +291,7 @@
og.material as material,
og.thickness as thickness,
og.brand as brand,
og.texture as texture,
og.goods_id as goodsId,
og.order_id as orderId