| | |
| | | <if test="flowCard.processId != null and flowCard.processId != ''"> |
| | | and a.process_Id regexp #{flowCard.processId} |
| | | </if> |
| | | <if test="flowCard.order.batch != null and flowCard.order.batch != ''"> |
| | | and b.batch regexp #{flowCard.order.batch} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | '' as qrcode, |
| | | ifnull(rack,"") as rack |
| | | ifnull(rack,"") as rack, |
| | | o.quantity as orderQuantity, |
| | | o.area as orderArea, |
| | | o.order_type |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | #{technologyNumber} as technologyNumber, |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | '' as qrcode |
| | | '' as qrcode, |
| | | o.order_type |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | pd.separation, |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | </select> |
| | | |
| | | <select id="selectReplenishPrintMp"> |
| | | select fc.id, |
| | | select pl.id, |
| | | fc.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | |
| | | pl.reporting_work_id, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | pl.patch_id, |
| | | date(pl.create_time) as create_time |
| | | date(pl.create_time) as create_time, |
| | | pl.print_num |
| | | |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | |
| | | round(SUM(ogd.total_area), 2) as gross_area, |
| | | sum(od.weight) as weight, |
| | | #{technologyNumber} as technologyNumber, |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | o.order_type |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | pl.patch_reason, |
| | | pl.patch_processes, |
| | | pl.responsible_team, |
| | | pl.responsible_personnel |
| | | pl.responsible_personnel, |
| | | od.building_number |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | dd.responsible_personnel, |
| | | #{mergeTechnologyNumber} as mergeTechnologyNumber, |
| | | pl.patch_id |
| | | pl.patch_id, |
| | | o.order_type |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | and fcs.process = #{process} |
| | | where fc.process_id = #{processId} |
| | | and fc.order_number = #{orderNumber} |
| | | and position(fc.technology_number in #{technologyNumber}) |
| | | <if test="technologyNumber != null and technologyNumber != ''"> |
| | | AND position(fc.technology_number in #{technologyNumber}) |
| | | </if> |
| | | group by fc.process_id,od.order_number, ogd.technology_number, ogd.child_width, ogd.child_height |
| | | order by IF(fcs.sort != NULL or fcs.sort != '', fcs.sort, fc.order_number) |
| | | </select> |
| | | |
| | | <select id="getgetPrintCustomDataSemiSp"> |
| | | select * from pp.optimize_detail opd |
| | | where opd.process_id= #{processId} and opd.order_sort = #{orderNumber} |
| | | <if test="technologyNumber != null and technologyNumber != ''"> |
| | | and opd.layer = #{technologyNumber} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <select id="selectPrintNotMp"> |
| | |
| | | concat(fc.process_id, '/', #{technologyNumber}) as processIdNumber, |
| | | concat('对应我司单号', o.batch) AS otherRemarks, |
| | | fc.technology_number as qrcode, |
| | | o.other_remarks |
| | | o.other_remarks, |
| | | o.quantity as orderQuantity, |
| | | o.area as orderArea, |
| | | o.order_type |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | ORDER BY opd.stock_id |
| | | </select> |
| | | |
| | | <select id="getPrintProjectDetailsMpSp"> |
| | | SELECT opd.project_no,opd.stock_id,opd.polys_id,o_width,o_height,p_width,p_height,opd.glass_id |
| | | FROM optimize_detail as opd left join optimize_layout as opl on opl.project_no=opd.project_no and opl.stock_id=opd.stock_id |
| | | where opd.project_no=#{projectNo} and opd.stock_id in |
| | | <foreach item="item" index="index" collection="stockId" open="(" separator="," close=")"> |
| | | #{item} |
| | | </foreach> |
| | | order BY opd.stock_id |
| | | </select> |
| | | |
| | | <select id="getPrintCustomDataProjectDetail"> |
| | | select |
| | | opt.glass_id as heat_layout_sort , |
| | |
| | | contacts, |
| | | delivery_address as deliveryAddress, |
| | | od.processing_note as processingNote, |
| | | opt.width, |
| | | opt.height, |
| | | opt.o_width, |
| | | opt.o_height, |
| | | opl.glass_count as flowQuantity, |
| | | CONCAT( |
| | | opt.width, |
| | | opt.o_width, |
| | | ' X ', |
| | | opt.height, |
| | | opt.o_height, |
| | | ' = ',opl.glass_count ) as size, |
| | | CONCAT( |
| | | od.order_number,') ', |
| | | opt.width, |
| | | opt.o_width, |
| | | ' X ', |
| | | opt.height, |
| | | opt.o_height, |
| | | ' = ',opl.glass_count ) as numberSize, |
| | | CONCAT( |
| | | od.order_number,')',' ', |
| | | opt.width, |
| | | opt.o_width, |
| | | ' X ', |
| | | opt.height) as numberSizeQuantity, |
| | | opt.o_height) as numberSizeQuantity, |
| | | od.order_number as orderNumber, |
| | | fc.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | |
| | | left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and |
| | | pd.glass_sort = fc.technology_number |
| | | where opt.project_no=#{projectNo} and opt.stock_id=#{stockId} |
| | | <if test="polysId != null"> |
| | | and opt.polys_id=#{polysId} |
| | | </if> |
| | | order by opt.stock_id,opt.polys_id |
| | | </select> |
| | | |
| | |
| | | pd.separation, |
| | | #{compound} as technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | </update> |
| | | |
| | | <update id="updateTerminationNoMp"> |
| | | update pp.flow_card set termination_status=0 where process_id = #{processId} and order_number = #{orderNumber} |
| | | update pp.flow_card set termination_status=0 , termination_quantity=0 where process_id = #{processId} and order_number = #{orderNumber} |
| | | </update> |
| | | |
| | | <select id="getNewProcessMp"> |
| | | select opd.process,bd.sort from sd.order_process_detail as opd |
| | | left join sd.basic_data as bd on bd.basic_name = opd.process and bd.basic_category='process' |
| | | where opd.process_id=#{processId} and opd.order_number=#{orderNumber} |
| | | and opd.technology_number = #{technologyNumber} and reporting_work_num_count>0 ORDER BY opd.id DESC LIMIT 1 |
| | | </select> |
| | | |
| | | <select id="getProcessInfo"> |
| | | select basic_name as process,sort FROM sd.basic_data as bd |
| | | where bd.basic_category='process' and bd.basic_name = #{processName} |
| | | </select> |
| | | </mapper> |