mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
1、装配设置接入加工状态筛选;2、group_id=0过滤异常修复;
This commit is contained in:
+6
@@ -1,5 +1,7 @@
|
|||||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||||
|
|
||||||
|
import com.cf.imes.framework.common.validation.InEnum;
|
||||||
|
import com.cf.imes.module.executor.enums.ordercomponent.OrderComponentProcessStatusEnum;
|
||||||
import com.cf.imes.module.executor.validation.order.OrderStatusValid;
|
import com.cf.imes.module.executor.validation.order.OrderStatusValid;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
@@ -100,4 +102,8 @@ public class OrderPageReqVO extends PageParam {
|
|||||||
|
|
||||||
@Schema(description = "排序字段", example = "id")
|
@Schema(description = "排序字段", example = "id")
|
||||||
private String field;
|
private String field;
|
||||||
|
|
||||||
|
@Schema(description = "加工状态")
|
||||||
|
@InEnum(OrderComponentProcessStatusEnum.class)
|
||||||
|
private Integer processStatus;
|
||||||
}
|
}
|
||||||
+5
-1
@@ -424,7 +424,11 @@ public class OrderComponentServiceImpl implements OrderComponentService {
|
|||||||
.in(OrderItemDO::getOrderId, pageReqVO.getOrderIds())
|
.in(OrderItemDO::getOrderId, pageReqVO.getOrderIds())
|
||||||
.inIfPresent(OrderItemDO::getCompId, queryComponentIds)
|
.inIfPresent(OrderItemDO::getCompId, queryComponentIds)
|
||||||
.in(OrderItemDO::getPartsId, partsIds)
|
.in(OrderItemDO::getPartsId, partsIds)
|
||||||
.ne(OrderItemDO::getGroupId, 0L)
|
.and(wrapper ->
|
||||||
|
wrapper.ne(OrderItemDO::getGroupId, 0L)
|
||||||
|
.or()
|
||||||
|
.isNull(OrderItemDO::getGroupId)
|
||||||
|
)
|
||||||
.select(OrderItemDO::getPartsId, OrderItemDO::getCadViewId, OrderItemDO::getGroupId, OrderItemDO::getCompId, OrderItemDO::getNum)
|
.select(OrderItemDO::getPartsId, OrderItemDO::getCadViewId, OrderItemDO::getGroupId, OrderItemDO::getCompId, OrderItemDO::getNum)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+5
-1
@@ -1032,7 +1032,11 @@ public class PlateServiceImpl implements PlateService {
|
|||||||
.eq(OrderItemDO::getOrderId, pageReqVO.getOrderId())
|
.eq(OrderItemDO::getOrderId, pageReqVO.getOrderId())
|
||||||
.inIfPresent(OrderItemDO::getBodyId, bodyIds)
|
.inIfPresent(OrderItemDO::getBodyId, bodyIds)
|
||||||
.inIfPresent(OrderItemDO::getGroupId, groupIds)
|
.inIfPresent(OrderItemDO::getGroupId, groupIds)
|
||||||
.ne(OrderItemDO::getGroupId, 0L)
|
.and(wrapper ->
|
||||||
|
wrapper.ne(OrderItemDO::getGroupId, 0L)
|
||||||
|
.or()
|
||||||
|
.isNull(OrderItemDO::getGroupId)
|
||||||
|
)
|
||||||
.in(OrderItemDO::getPartsId, partsIds)
|
.in(OrderItemDO::getPartsId, partsIds)
|
||||||
.select(OrderItemDO::getPartsId, OrderItemDO::getBodyId, OrderItemDO::getCadViewId, OrderItemDO::getGroupId, OrderItemDO::getCompId, OrderItemDO::getNum)
|
.select(OrderItemDO::getPartsId, OrderItemDO::getBodyId, OrderItemDO::getCadViewId, OrderItemDO::getGroupId, OrderItemDO::getCompId, OrderItemDO::getNum)
|
||||||
);
|
);
|
||||||
|
|||||||
+54
@@ -127,6 +127,60 @@
|
|||||||
AND t.create_time BETWEEN #{reqVO.createTime[0]} AND #{reqVO.createTime[1]}
|
AND t.create_time BETWEEN #{reqVO.createTime[0]} AND #{reqVO.createTime[1]}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<!-- 部件装配状态过滤(单选):加在子订单的过滤条件中 -->
|
||||||
|
<if test="reqVO.processStatus != null">
|
||||||
|
<choose>
|
||||||
|
<!-- 0. 不加工 -->
|
||||||
|
<when test="reqVO.processStatus == 0">
|
||||||
|
AND EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM order_component oc
|
||||||
|
WHERE oc.order_id = t.id
|
||||||
|
AND oc.deleted = 0
|
||||||
|
AND oc.pid = 0
|
||||||
|
AND oc.extra_process_status = 0
|
||||||
|
)
|
||||||
|
</when>
|
||||||
|
|
||||||
|
<!-- 1. 未加工 -->
|
||||||
|
<when test="reqVO.processStatus == 1">
|
||||||
|
AND EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM order_component oc
|
||||||
|
WHERE oc.order_id = t.id
|
||||||
|
AND oc.deleted = 0
|
||||||
|
AND oc.pid = 0
|
||||||
|
AND oc.process_status = 1
|
||||||
|
AND oc.extra_process_status IS NULL
|
||||||
|
)
|
||||||
|
</when>
|
||||||
|
|
||||||
|
<!-- 2. 已加工 -->
|
||||||
|
<when test="reqVO.processStatus == 2">
|
||||||
|
AND EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM order_component oc
|
||||||
|
WHERE oc.order_id = t.id
|
||||||
|
AND oc.deleted = 0
|
||||||
|
AND oc.pid = 0
|
||||||
|
AND oc.process_status = 2
|
||||||
|
)
|
||||||
|
</when>
|
||||||
|
|
||||||
|
<!-- 3. 部分加工 -->
|
||||||
|
<when test="reqVO.processStatus == 3">
|
||||||
|
AND EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM order_component oc
|
||||||
|
WHERE oc.order_id = t.id
|
||||||
|
AND oc.deleted = 0
|
||||||
|
AND oc.pid = 0
|
||||||
|
AND oc.extra_process_status = 3
|
||||||
|
)
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
|
</if>
|
||||||
|
|
||||||
AND t.deleted = #{reqVO.deleted}
|
AND t.deleted = #{reqVO.deleted}
|
||||||
|
|
||||||
) tmp
|
) tmp
|
||||||
|
|||||||
+1
-1
@@ -454,7 +454,7 @@
|
|||||||
oi.parts_id != 0
|
oi.parts_id != 0
|
||||||
AND oi.package_id = 0
|
AND oi.package_id = 0
|
||||||
AND oi.source_id = 0
|
AND oi.source_id = 0
|
||||||
AND oi.group_id != 0
|
AND (oi.group_id != 0 oi.group_id is null)
|
||||||
AND op.deleted = false
|
AND op.deleted = false
|
||||||
AND op.type != '封边条'
|
AND op.type != '封边条'
|
||||||
AND oi.order_id IN
|
AND oi.order_id IN
|
||||||
|
|||||||
Reference in New Issue
Block a user