| | |
| | | ) |
| | | </foreach> |
| | | </insert> |
| | | |
| | | |
| | | <!--钣金计划大表 工单基础信息查询--> |
| | | <select id="selectPlatePlanBaseTable" resultType="com.aps.core.domain.ApsPlate.ApsPlateProcessShopPlanStat"> |
| | | with a as( |
| | | select ap.document_number, string_agg(pr.process_name,',') as remained_process |
| | | from aps_plate_plan as ap |
| | | left join aps_process_route as pr on ap.document_number=pr.work_order_no |
| | | where cast(pr.process_number as numeric) > cast(ap.process_number as numeric) |
| | | group by ap.document_number |
| | | ) |
| | | select |
| | | app.id, |
| | | app.main_part_number, |
| | | app.customer, |
| | | app.business_type, |
| | | app.document_number, |
| | | app.item_number, |
| | | app.drawing_no, |
| | | app.version_number, |
| | | app.low_order_code, |
| | | app.production_quantity, |
| | | app.requirement_type, |
| | | app.document_status, |
| | | app.approve_on, |
| | | app.process_number, |
| | | app.work_center, |
| | | app.department, |
| | | app.op_status, |
| | | app.next_op_name, |
| | | app.order_create_time, |
| | | app.start_work_date, |
| | | app.production_base, |
| | | a.remained_process |
| | | from aps_plate_plan as app |
| | | left join a on app.document_number=a.document_number |
| | | where app.del_flag='0'; |
| | | </select> |
| | | </mapper> |