未排订单-板材分组,板材数据补充片数和面积

This commit is contained in:
gaoqr
2026-04-21 18:28:16 +08:00
parent a8550740d0
commit f1bb8a410d
2 changed files with 9 additions and 5 deletions
@@ -632,7 +632,7 @@ public class PlanServiceImpl implements PlanService {
statusList.add(OrderStatusEnum.SORTED.getStatus());
QueryWrapperX<PlanItemDO> queryWrapperX = new QueryWrapperX<>();
IPage<OrderGoodsResp> orderGoodsResps = new PageDTO<>();
IPage<OrderGoodsResp> orderGoodsResps;
Integer type = 0;
if (CollUtil.isNotEmpty(pageReqVO.getRoomId()) || CollUtil.isNotEmpty(pageReqVO.getBodyId())) {
@@ -687,7 +687,7 @@ public class PlanServiceImpl implements PlanService {
List<OrderGoodsResp> orderGoodsIdList = planItemMapper.selectNoOrderGoodsIdList(queryWrapperX, getUserOrganId(), type);
mergeOrderGoodsLists(records,orderGoodsIdList);
mergeOrderGoodsLists(records, orderGoodsIdList);
return new PageResult<>(orderGoodsResps.getRecords(), orderGoodsResps.getTotal());
@@ -232,6 +232,8 @@
<result property="texture" column="texture"/>
<result property="thickness" column="thickness"/>
<result property="brand" column="brand"/>
<result property="num" column="num"/>
<result property="area" column="area"/>
<collection property="orderIds" ofType="com.cf.imes.module.executor.controller.admin.plan.bo.OrderIds" resultMap="orderIdsMap"/>
@@ -272,14 +274,15 @@
<select id="selectNoPlanGoodsList" resultMap="OrderGoodsMap" parameterType="java.lang.Long">
select distinct
select
og.color as color,
og.goods_name as goodsName,
og.material as material,
og.thickness as thickness,
og.brand as brand,
og.texture as texture
og.texture as texture,
sum(og.plate_num - og.planned_plate_num) as num,
sum(og.area - og.planned_plate_area) as area
from orders o
join order_goods og on o.id = og.order_id and og.organ_id = #{organId}
@@ -287,6 +290,7 @@
${ew.customSqlSegment}
and og.plate_num - og.planned_plate_num > 0
and og.deleted = false
group by og.color, og.goods_name, og.material, og.thickness, og.brand, og.texture
order by thickness desc
</select>