mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
排单Bug修改
This commit is contained in:
+4
-2
@@ -16,7 +16,7 @@ public class OrderGoodsResp {
|
||||
|
||||
@Schema(description = "生产单id")
|
||||
private List<OrderIds> orderIds;
|
||||
@Schema(description = "商品id")
|
||||
@Schema(description = "商品id-商品编号")
|
||||
private Long goodsId;
|
||||
@Schema(description = "商品名称")
|
||||
private String goodsName;
|
||||
@@ -30,10 +30,12 @@ public class OrderGoodsResp {
|
||||
private BigDecimal height;
|
||||
@Schema(description = "厚")
|
||||
private BigDecimal thickness;
|
||||
@Schema(description = "商品纹路")
|
||||
@Schema(description = "商品纹理")
|
||||
private Boolean texture;
|
||||
@Schema(description = "商品品牌")
|
||||
private String brand;
|
||||
@Schema(description = "商品规格")
|
||||
private String spec;
|
||||
@Schema(description = "面积")
|
||||
private BigDecimal area;
|
||||
|
||||
|
||||
+2
-2
@@ -213,11 +213,11 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
orderMapper.updateOrderListStatus(orderIds,OrderStatusEnum.IN_PRODUCTION.getStatus(),getUserOrganId());
|
||||
|
||||
|
||||
CutedBoardInfo cutedBoardInfo = optimizeBoardModelDO.getCutedBoardInfo();
|
||||
CutedBoardInfo cutedBoardInfo = optimizeBoardModelDO.getCutedBoardInfo() == null ? new CutedBoardInfo() : optimizeBoardModelDO.getCutedBoardInfo();
|
||||
|
||||
|
||||
// 获取原排单的开料大板数 + 新增的开料大板数
|
||||
long cutedBoardNumber = cutedBoardInfo.getCutedBoardNumber() ;
|
||||
long cutedBoardNumber = cutedBoardInfo.getCutedBoardNumber() == null ? 0 : cutedBoardInfo.getCutedBoardNumber();
|
||||
|
||||
|
||||
cutedBoardNumber += goodsNo.size();
|
||||
|
||||
+8
-5
@@ -215,7 +215,7 @@ public class PlanServiceImpl implements PlanService {
|
||||
PlanDO plan = BeanUtils.toBean(updateReqVO, PlanDO.class);
|
||||
|
||||
// 校验新增的板材是否和排单为统一类型的
|
||||
if(!updateReqVO.getItemList().isEmpty()){
|
||||
if(!(updateReqVO.getItemList() == null)){
|
||||
|
||||
// todo 目前之解决非混单的情况,混单的情况待解决
|
||||
Long goodsId = updateReqVO.getItemList().stream().map(PlanSaveReqVO.Item::getGoodsId).distinct().toList().get(0);
|
||||
@@ -542,6 +542,8 @@ public class PlanServiceImpl implements PlanService {
|
||||
// 根据排单ID查询ES中的优化数据 todo 目前只解决无混单的情况,混单情况待解决
|
||||
List<OptimizeBoardModelDO> optimizeBoardModelDOS = buildBoardByPlanIds(planIds, ORDER_REMAIN_PLATE_MODEL, infoVOList.size());
|
||||
|
||||
for (OptimizeBoardModelDO optimizeBoardModelDO : optimizeBoardModelDOS) {
|
||||
}
|
||||
|
||||
// 获取排单对应的生产单的信息
|
||||
List<PlanOrderRespVO> planOrderRespVOS = planItemMapper.selectOrderList(planIds, getUserOrganId());
|
||||
@@ -583,7 +585,10 @@ public class PlanServiceImpl implements PlanService {
|
||||
.mapToLong(m-> m.getPlaceBlockNumber() == null ? 0 : m.getPlaceBlockNumber())
|
||||
.sum());
|
||||
// 未优化小板数量
|
||||
e.setUnOptimizePlateCount(e.getPlateNum() - e.getOptimizePlateCount());
|
||||
e.setUnOptimizePlateCount(e.getPlateNum() - optimizeBoardModelDOS.stream()
|
||||
.filter(f->Objects.equals(f.getPlanId(), e.getId()))
|
||||
.mapToLong(m-> m.getPlaceBlockNumber() == null ? 0 : m.getPlaceBlockNumber())
|
||||
.sum());
|
||||
// 生产单信息
|
||||
e.setOrderList(planOrderRespVOS.stream()
|
||||
.filter( f-> Objects.equals(f.getPlanId(), e.getId()))
|
||||
@@ -801,7 +806,7 @@ public class PlanServiceImpl implements PlanService {
|
||||
.eq("og.deleted",false)
|
||||
|
||||
.inIfPresent("og.order_id", pageReqVO.getOrderIds())
|
||||
// .inIfPresent("og.id", goodsIds)
|
||||
.inIfPresent("og.id", pageReqVO.getIds())
|
||||
// .isNull("opi.item_id")
|
||||
// .isNotNull("og.id")
|
||||
|
||||
@@ -841,8 +846,6 @@ public class PlanServiceImpl implements PlanService {
|
||||
List<OrderGoodsResp> records = orderGoodsResps.getRecords();
|
||||
|
||||
|
||||
System.out.println("哈哈哈哈哈哈1 "+records.size());
|
||||
|
||||
List<Long> goodsIdList = records.stream().map(OrderGoodsResp::getGoodsId).toList();
|
||||
|
||||
queryWrapperX.in("og.goods_id", goodsIdList);
|
||||
|
||||
+5
-3
@@ -269,6 +269,7 @@
|
||||
<result property="color" column="color"/>
|
||||
<result property="texture" column="texture"/>
|
||||
<result property="brand" column="brand"/>
|
||||
<result property="spec" column="spec"/>
|
||||
<result property="goodsId" column="goodsId"/>
|
||||
|
||||
<collection property="orderIds" ofType="com.cf.imes.module.executor.controller.admin.plan.bo.OrderIds" resultMap="OrderIdMap"/>
|
||||
@@ -289,8 +290,8 @@
|
||||
|
||||
select distinct
|
||||
|
||||
og.order_id as orderId,
|
||||
og.id as id,
|
||||
-- og.order_id as orderId,
|
||||
-- og.id as id,
|
||||
og.goods_id as goodsId,
|
||||
|
||||
og.goods_name,
|
||||
@@ -300,7 +301,8 @@
|
||||
og.thickness,
|
||||
og.width,
|
||||
og.height,
|
||||
og.brand
|
||||
og.brand,
|
||||
og.spec
|
||||
|
||||
from orders o
|
||||
left join order_goods og on o.organ_id = og.organ_id and o.id = og.order_id
|
||||
|
||||
Reference in New Issue
Block a user