| | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | |
| | | <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and flowCard.layoutStatus == '不可排版'"> |
| | | and a.layout_status regexp 0 |
| | | </if> |
| | | <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and flowCard.layoutStatus == '可排版'"> |
| | | and a.layout_status regexp 1 |
| | | </if> |
| | | <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and flowCard.layoutStatus == '已排版'"> |
| | | and a.layout_status regexp 2 |
| | | </if> |
| | | |
| | | group by a.process_Id |
| | | ORDER BY a.id desc |
| | |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and a.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.productionId != null and flowCard.productionId != ''"> |
| | | and a.process_Id regexp #{flowCard.productionId} |
| | | <if test="flowCard.processId != null and flowCard.processId != ''"> |
| | | and a.process_Id regexp #{flowCard.processId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and c.product_id regexp #{flowCard.orderDetail.productId} |
| | |
| | | |
| | | <if test="flowCard.order.project != null and flowCard.order.project!= ''"> |
| | | and b.project regexp #{flowCard.order.project} |
| | | </if> |
| | | <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and flowCard.layoutStatus == '不可排版'"> |
| | | and a.layout_status regexp 0 |
| | | </if> |
| | | <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and flowCard.layoutStatus == '可排版'"> |
| | | and a.layout_status regexp 1 |
| | | </if> |
| | | <if test="flowCard.layoutStatus != null and flowCard.layoutStatus != '' and flowCard.layoutStatus == '已排版'"> |
| | | and a.layout_status regexp 2 |
| | | </if> |
| | | |
| | | ORDER BY a.id desc |
| | |
| | | delete from sd.order_process_detail |
| | | where left(process_id,11) = left(#{processId},11) |
| | | </delete> |
| | | |
| | | <select id="selectPrintFlowCardMp"> |
| | | select * from sd.order where create_time between #{selectTime1} and #{selectTime2} and |
| | | position(#{orderId} in order_id ) and position(#{project} in project) |
| | | and processing_card=2 |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | <select id="selectPrintMp"> |
| | | select fc.id, |
| | | fc.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | sum(od.quantity) as quantity, |
| | | sum(ogd.total_area) as total_area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | fc.founder, |
| | | date(fc.splitFrame_time) as splitFrame_time |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = fc.order_id and ogd.order_number = fc.order_number and |
| | | ogd.technology_number = fc.technology_number |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | left join sd.`order` as o on o.order_id = fc.order_id |
| | | where fc.order_id = #{orderId} |
| | | GROUP BY fc.process_id, ogd.technology_number |
| | | order by fc.process_id, ogd.technology_number |
| | | |
| | | </select> |
| | | |
| | | <select id="getPrimaryList"> |
| | | select o.customer_name, |
| | | o.project, |
| | | ogd.process, |
| | | od.edging_type, |
| | | ogd.glass_child, |
| | | od.product_name, |
| | | o.processing_note, |
| | | fc.process_id, |
| | | SUM( od.quantity) as quantity, |
| | | SUM(ogd.total_area) as gross_area, |
| | | SUM(od.weight) as weight, |
| | | #{technologyNumber} as technologyNumber, |
| | | concat(fc.process_id,'/',#{technologyNumber}) as processIdNumber |
| | | 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 |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | left join sd.`order` as o on o.order_id = fc.order_id |
| | | where fc.process_id = #{processId} |
| | | and fc.technology_number = #{technologyNumber} |
| | | group by fc.process_id, fc.technology_number |
| | | </select> |
| | | |
| | | <select id="getDetailList"> |
| | | select fc.order_number, |
| | | concat(ogd.child_width, "*", ogd.child_height) as child_width, |
| | | od.quantity, |
| | | round(ogd.total_area,2) as total_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.remarks |
| | | 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 |
| | | fc.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | where fc.process_id = #{processId} |
| | | and fc.technology_number = #{technologyNumber} |
| | | group by fc.process_id, fc.order_number |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | | <select id="getProcessList"> |
| | | select * |
| | | from sd.order_process_detail |
| | | where process_id = #{processId} |
| | | and technology_number = #{technologyNumber} |
| | | group by process |
| | | </select> |
| | | |
| | | <update id="updateInventory"> |
| | | update flow_card set inventory_quantity=#{completedQuantity} |
| | | where process_id = #{processId} and order_number = #{orderNumber} and technology_number = #{technologyNumber} |
| | | </update> |
| | | |
| | | <!-- 复选框修改排版状态--> |
| | | <update id="updateComposing"> |
| | | update flow_card as fc |
| | | set fc.layout_status=1 |
| | | where fc.process_id = #{processId} |
| | | </update> |
| | | |
| | | <select id="getPrintLabel"> |
| | | select c.customer_name, |
| | | c.order_id, |
| | | e.type_name, |
| | | b.remarks, |
| | | c.project, |
| | | a.child_width, |
| | | a.child_height, |
| | | sum(b.quantity) as quantity, |
| | | a.glass_child, |
| | | b.processing_note |
| | | from sd.order_glass_detail as a |
| | | left join sd.order_detail as b |
| | | on a.order_id = b.order_id |
| | | and a.order_number = b.order_number |
| | | left join sd.`order` as c |
| | | on c.order_id = a.order_id |
| | | left join flow_card as d |
| | | on d.order_id = a.order_id and d.order_number = a.order_number and |
| | | d.technology_number = a.technology_number |
| | | left join sd.basic_glass_type e |
| | | on e.type_id = b.product_id |
| | | where d.process_id = #{processId} |
| | | and d.technology_number = #{technologyNumber} |
| | | group by a.glass_child, a.child_width, a.child_height |
| | | order by d.technology_number |
| | | </select> |
| | | </mapper> |