| | |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="layout_status" property="layoutStatus"/> |
| | | <result column="merge" property="merge"/> |
| | | <result column="rack" property="rack"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | |
| | | c.processing_note, |
| | | b.customer_name, |
| | | if(a.layout_status=0,'不可排版',if(a.layout_status=1,'可排版','已排版')) as layout_status, |
| | | a.merge |
| | | from (select id,order_id,process_id,order_number, quantity,founder,max(layout_status) as layout_status,create_time,merge from flow_card |
| | | a.merge, |
| | | a.rack |
| | | from (select id,order_id,process_id,order_number, quantity,founder,max(layout_status) as layout_status,create_time,merge,rack from flow_card |
| | | group by process_Id,order_number) as a |
| | | left join sd.`order` as b on a.order_Id=b.order_id |
| | | left join sd.order_detail as c on a.order_Id=c.order_id and a.order_Number=c.order_number |
| | |
| | | </if> |
| | | <if test="flowCard.merge != null"> |
| | | and a.merge regexp #{flowCard.merge} |
| | | </if> |
| | | <if test="flowCard.rack != null and flowCard.rack != ''"> |
| | | and a.rack regexp #{flowCard.rack} |
| | | </if> |
| | | <if test="flowCard.order.customerName != null and flowCard.order.customerName!= ''"> |
| | | and b.customer_name regexp #{flowCard.order.customerName} |
| | |
| | | <select id="flowCardToOptimizeCount"> |
| | | select count(*) from pp.flow_card where order_id = #{orderId} and engineering_occupancy=1 |
| | | </select> |
| | | |
| | | <select id="getFlowCardDetail" > |
| | | select |
| | | a.order_id, |
| | | a.process_id, |
| | | a.technology_number, |
| | | c.product_id, |
| | | c.product_name, |
| | | b.project, |
| | | sum(a.quantity) as quantity, |
| | | sum(c.compute_gross_area) as compute_gross_area, |
| | | a.founder, |
| | | c.processing_note, |
| | | b.customer_name, |
| | | a.merge, |
| | | a.rack |
| | | from pp.flow_card a |
| | | left join sd.`order` as b on a.order_id=b.order_id |
| | | left join sd.order_detail as c on a.order_id=c.order_id and a.order_number=c.order_number |
| | | where |
| | | a.process_id regexp #{processId} |
| | | group by a.process_id,a.technology_number |
| | | |
| | | </select> |
| | | </mapper> |