|
@@ -62,8 +62,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix=" WHERE" suffix="" suffixOverrides="AND">
|
|
|
t1.deleted = 0 and t2.deleted = 0 and t1.id not in (SELECT production_plan_detail_id from
|
|
|
biz_production_resource_group_sub_plan where deleted = 0 and resource_group_id = #{resourceGroupId})
|
|
|
+<!-- 生产计划进行投产,有生产子计划,且领料部门id等于工段id ;4-18修改看当前生产计划的批次里废品回用的批次是否是当前id-->
|
|
|
<if test="deptId != null and deptId != 0">AND (t1.id in (SELECT production_plan_detail_id from biz_daywork
|
|
|
- where deleted = 0 and dept_id = #{deptId}) or requisition_department_id = #{deptId})
|
|
|
+ where deleted = 0 and dept_id = #{deptId}) or requisition_department_id = #{deptId}
|
|
|
+ OR (t1.id IN (
|
|
|
+ SELECT production_plan_detail_id
|
|
|
+ FROM biz_lot
|
|
|
+ WHERE production_plan_detail_id = t1.id
|
|
|
+ AND is_waste_recycling = 1
|
|
|
+ AND requisition_department_id = #{deptId}
|
|
|
+ )))
|
|
|
</if>
|
|
|
<if test="keywords != null and keywords !=''">AND t1.product_description LIKE CONCAT('%', #{keywords},
|
|
|
'%')
|