| | |
| | | <select id="findInsSampleAndOrder" resultType="com.yuanchu.mom.vo.InsOrderPlanVO"> |
| | | select * from( |
| | | SELECT |
| | | a.*,ios.ins_state,ios.verify_tell |
| | | a.*,ios.ins_state,ios.verify_tell,isu2.order_user_id |
| | | FROM |
| | | ( |
| | | SELECT |
| | |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id |
| | | WHERE |
| | | io.state = 1 |
| | | AND io.ins_state != 5 |
| | | # AND io.ins_state != 5 |
| | | and send_time is not null |
| | | and (isu.user_id = #{userId} OR isu.user_id is NULL) |
| | | GROUP BY |
| | |
| | | io.id |
| | | ) a |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory |
| | | left join (SELECT c.user_id order_user_id, c.ins_sample_id from (SELECT * FROM ins_sample_user ORDER BY id DESC) c GROUP BY ins_sample_id having order_user_id = #{userId}) isu2 on isu2.ins_sample_id = a.id |
| | | ORDER BY |
| | | a.user_id DESC, |
| | | a.type DESC, |
| | |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | |
| | | <result property="insValue" column="ins_value" jdbcType="VARCHAR"/> |
| | | <result property="comValue" column="com_value" jdbcType="VARCHAR"/> |
| | | <result property="equipValue" column="equip_value" jdbcType="VARCHAR"/> |
| | | <result property="equipName" column="equip_name" jdbcType="VARBINARY"/> |
| | | </resultMap> |
| | | </mapper> |