| | |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.state, |
| | | io.issue_time, |
| | | ins_sample_id |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | |
| | | and ios.laboratory = #{laboratory} |
| | | and (ipr2.num = ios.num or ipr2.num is null) |
| | | and (ipr.num = ios.num or ipr.num is null) |
| | | order by ipr.id, ipr2.id |
| | | order by ip.id, ipr.id, ipr2.id |
| | | </select> |
| | | <select id="getIns2Product1" resultMap="product"> |
| | | select ip.id ip_id, |
| | |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ip.standard_method_list_id is not null |
| | | and ios.laboratory = #{laboratory} |
| | | order by ipr.id, ipr2.id |
| | | order by ip.id, ipr.id, ipr2.id |
| | | </select> |
| | | <select id="get2InsProduct1" resultMap="product"> |
| | | select ip.id ip_id, |
| | |
| | | and ip.standard_method_list_id is not null |
| | | and ios.laboratory = #{laboratory} |
| | | and (ipr2.num = #{num} or ipr.num = #{num}) |
| | | order by ipr.id, ipr2.id |
| | | order by ip.id, ipr.id, ipr2.id |
| | | </select> |
| | | |
| | | <select id="getReportModel" resultType="java.util.Map"> |
| | |
| | | <result property="insState" column="ins_state" jdbcType="INTEGER"/> |
| | | <result property="joinNum" column="join_num" jdbcType="INTEGER"/> |
| | | <result property="remark" column="remark" jdbcType="VARCHAR"/> |
| | | <result property="issueTime" column="issue_time" /> |
| | | <result property="createUser" column="create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="update_user" jdbcType="INTEGER"/> |
| | | <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
| | |
| | | and ip.id is not null |
| | | </select> |
| | | <select id="selectInsSample" resultType="com.yuanchu.mom.pojo.InsSample"> |
| | | select isa.*,entrust_code |
| | | select isa.*, |
| | | case when entrust_code is null then out_entrust_code else entrust_code end as entrust_code |
| | | from ins_sample isa |
| | | left join ins_order io on isa.ins_order_id = io.id |
| | | where ins_order_id in |