mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
错误修改
This commit is contained in:
+5
-3
@@ -3,6 +3,7 @@ package com.cf.imes.module.executor.service.optimizeplan;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import co.elastic.clients.elasticsearch.ElasticsearchClient;
|
||||
import co.elastic.clients.elasticsearch._types.FieldValue;
|
||||
@@ -44,6 +45,7 @@ import com.cf.imes.module.executor.dal.mysql.orderItem.OrderItemMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.plan.PlanMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.plate.PlateMapper;
|
||||
import com.cf.imes.module.executor.dal.mysql.remainplaten.RemainPlateMapper;
|
||||
import com.cf.imes.module.executor.enums.ErrorCodeConstants;
|
||||
import com.cf.imes.module.executor.util.RandomUtils;
|
||||
import com.cf.imes.module.executor.util.RectangleChecker;
|
||||
import com.cf.imes.module.infra.api.file.FileApi;
|
||||
@@ -296,17 +298,17 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
throw exception(154112, "生产单id与排单id只能传一个");
|
||||
}
|
||||
OrderSource orderSource;
|
||||
if (!Objects.isNull(orderId)) {
|
||||
if (ObjectUtil.isNotNull(orderId)) {
|
||||
orderSource = getOrderSourceByOrderId(orderId);
|
||||
orderSource.setMachineDTO(machineApi.getMachineDetail(machineId).getCheckedData());
|
||||
return orderSource;
|
||||
}
|
||||
if (!Objects.isNull(planId)) {
|
||||
if (ObjectUtil.isNotNull(planId)) {
|
||||
orderSource = getOrderSourceByPlanId(planId);
|
||||
orderSource.setMachineDTO(machineApi.getMachineDetail(machineId).getCheckedData());
|
||||
return orderSource;
|
||||
}
|
||||
throw exception(154112, "生产单id或排单id不能都空");
|
||||
throw exception(ErrorCodeConstants.SOURCE_NOT_EXITS_ERROR);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+11
-5
@@ -10,7 +10,7 @@
|
||||
c.goods_name, c.material, c.color, c.goods_id,oi.num,a.is_special_shaped as specialShaped,a.is_sculpt as profiling
|
||||
|
||||
from order_plate a
|
||||
LEFT JOIN order_item oi on a.id = oi.plate_id
|
||||
LEFT JOIN order_item oi on a.id = oi.plate_id and a.order_id = oi.order_id
|
||||
LEFT JOIN `order` b on a.order_id = b.id
|
||||
LEFT JOIN order_goods c on a.goods_id = c.id
|
||||
left join order_plan_item opi on oi.id = opi.item_id
|
||||
@@ -30,7 +30,7 @@
|
||||
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateResList">
|
||||
select a.order_id, a.plate_no , a.name as plateName,a.is_special_shaped,a.is_sculpt, e.material, e.color, e.width, e.height, e.thickness, b.room_id, b.body_id
|
||||
from order_plate a
|
||||
LEFT JOIN order_item b ON a.id = b.plate_id
|
||||
LEFT JOIN order_item b ON a.id = b.plate_id AND a.order_id = b.order_id
|
||||
LEFT JOIN order_goods e ON e.id = a.goods_id AND e.order_id = a.order_id
|
||||
LEFT JOIN order_plan_item p ON b.id = p.item_id
|
||||
${ew.customSqlSegment}
|
||||
@@ -63,11 +63,17 @@
|
||||
|
||||
<select id="selectBatchOrderIdsAndGoodsIds" resultType="java.lang.Long">
|
||||
select oi.id from order_plate op
|
||||
join order_item oi on op.id = oi.plate_id
|
||||
where ( op.order_id, op.goods_id ) in
|
||||
join order_item oi on op.id = oi.plate_id and op.order_id = oi.order_id
|
||||
where op.order_id in
|
||||
<foreach collection="itemList" item="item" open="(" close=")" separator=",">
|
||||
(#{item.orderId},#{item.goodsId})
|
||||
(#{item.orderId})
|
||||
</foreach>
|
||||
and
|
||||
op.goods_id in
|
||||
<foreach collection="itemList" item="item" open="(" close=")" separator=",">
|
||||
(#{item.goodsId})
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user