| | |
| | | |
| | | LEFT JOIN ( |
| | | SELECT ins_sample_id,GROUP_CONCAT( DISTINCT uu.name SEPARATOR ',') AS userName |
| | | FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id |
| | | FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id |
| | | WHERE son_laboratory=#{sonLaboratory} |
| | | and u.state=0 |
| | | GROUP BY ins_sample_id |
| | |
| | | ) isu ON isu.ins_sample_id = io.id |
| | | LEFT JOIN ( |
| | | SELECT ins_sample_id,uu.name checkName |
| | | FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id |
| | | FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id |
| | | WHERE son_laboratory=#{sonLaboratory} |
| | | and u.state=1 |
| | | GROUP BY ins_sample_id |
| | |
| | | )isu2 ON isu2.ins_sample_id = io.id |
| | | |
| | | LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id |
| | | WHERE io.state = 1 and send_time is not null |
| | | WHERE io.state = 1 and send_time is not null |
| | | <if test="userName !=null and userName!=''"> |
| | | and ( (userName like CONCAT ('%', #{userName},'%') ) |
| | | or (checkName like CONCAT ('%', #{userName},'%') ) ) |
| | | and ( (userName like CONCAT ('%', #{userName},'%') ) |
| | | or (checkName like CONCAT ('%', #{userName},'%') ) ) |
| | | </if> |
| | | and ip.son_laboratory=#{sonLaboratory} |
| | | GROUP BY |
| | | ip.son_laboratory, |
| | | io.id |
| | | ) a |
| | | |
| | | |
| | | |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory |
| | |
| | | and ins_fibers_id is null |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | |
| | | <select id="getInsProduct4" resultMap="product"> |
| | | select ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.ins_bush_id, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | | inspection_item_type, |
| | | inspection_value_type, |
| | | device_group, |
| | | checkout_number, |
| | | section, |
| | | value_type, |
| | | method, |
| | | man_day, |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | state, |
| | | ins_sample_id, |
| | | ip.create_user ip_create_user, |
| | | ip.update_user ip_update_user, |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ipr.equip_name, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_bush_id = #{id} |
| | | and state = 1 |
| | | and ins_fibers_id is null |
| | | and standard_method_list_id is not null |
| | | </select> |
| | | <select id="getReportModel" resultType="java.util.Map"> |
| | | </select> |
| | | |
| | |
| | | <result property="lastValue" column="last_value" jdbcType="VARCHAR"/> |
| | | <result property="insResult" column="ip_ins_result" jdbcType="INTEGER"/> |
| | | <result property="state" column="state" jdbcType="INTEGER"/> |
| | | <result property="insBushId" column="ins_bush_id" jdbcType="INTEGER"/> |
| | | <result property="insSampleId" column="ins_sample_id" jdbcType="INTEGER"/> |
| | | <result property="createUser" column="ip_create_user" jdbcType="INTEGER"/> |
| | | <result property="updateUser" column="ip_update_user" jdbcType="INTEGER"/> |