| | |
| | | from aps_part_plan as pl |
| | | left join aps_process_route as rt on pl.document_number=rt.work_order_no |
| | | left join aps_resource_group as rs on rs.resource_group_name=rt.process_name |
| | | where pl.del_flag='0' and rt.del_flag='0' |
| | | /*零件计划状态为:非完工 */ |
| | | and document_status in (0,1,2,4) |
| | | where document_status in (0,1,2,4) |
| | | /*工序计划开工日 小于等于 资源组的截止日期*/ |
| | | and rt.process_plan_start_day <= rs.request_date |
| | | order by rt.work_order_no,process_plan_start_day |
| | |
| | | pl.plan_end_day as order_plan_end_day |
| | | from aps_plate_plan as pl |
| | | left join aps_process_route as rt on pl.document_number = rt.work_order_no |
| | | where pl.del_flag = '0' and rt.del_flag = '0' |
| | | and (pl.document_status is not null and (pl.document_status != '3')) |
| | | where pl.document_status in (0,1,2,4) |
| | | order by rt.work_order_no asc , rt.process_number desc |
| | | </select> |
| | | <update id="removeOtherStat" parameterType="String"> |
| | |
| | | is_hold_release,is_out_source,org_code, |
| | | order_id,now(),'0',org_code,doc_status,std_op |
| | | from aps_work_order_job |
| | | where ( doc_status in (0,1,2,4) and |
| | | (mainitem_code like 'M01%' or mainitem_code like 'M02%'or mainitem_code like 'M05%' or mainitem_code like 'M10%' |
| | | or mainitem_code like 'M14%'or mainitem_code like 'M15%' or mainitem_code like 'F%' or mainitem_code like 'Z%') |
| | | where ( doc_status in (0,1,2,4) and is_hold_release='0' |
| | | and (mainitem_code like 'M01%' or mainitem_code like 'M02%'or mainitem_code like 'M05%' or mainitem_code like 'M10%' |
| | | or mainitem_code like 'M14%'or mainitem_code like 'M15%' or mainitem_code like 'F%' or mainitem_code like 'Z%' |
| | | ) |
| | | ); |
| | | </insert> |
| | | <delete id="deleteAllPlatePlan" > |
| | |
| | | is_hold_release,is_out_source,org_code, |
| | | order_id,now(),'0',org_code,doc_status,std_op |
| | | from aps_work_order_job |
| | | where ( doc_status in (0,1,2,4) |
| | | where ( doc_status in (0,1,2,4) and is_hold_release='0' |
| | | and (mainitem_code like 'M03%' or mainitem_code like 'M04%'or mainitem_code like 'A75%') |
| | | ); |
| | | </insert> |
| | |
| | | order_id,now(),'0',org_code,doc_status,std_op, |
| | | case when substr(mainitem_code,3)='A65' then 'gas' else 'piping' end as plan_type |
| | | from aps_work_order_job |
| | | where ( doc_status in (0,1,2,4) |
| | | where ( doc_status in (0,1,2,4) and is_hold_release='0' |
| | | and (mainitem_code like 'A65%' or mainitem_code like 'W%')); |
| | | </insert> |
| | | </mapper> |