| | |
| | | <select id="findInsSampleAndOrder" resultType="com.yuanchu.mom.vo.InsOrderPlanVO"> |
| | | select * from(select * from( |
| | | SELECT |
| | | a.*,ios.ins_state,ios.verify_tell,verify_user,ios.id orderStateId,ios.create_time,ios.sort,sort_time |
| | | a.*, |
| | | ios.ins_state, |
| | | ios.verify_tell, |
| | | verify_user, |
| | | ios.id orderStateId, |
| | | ios.create_time, |
| | | (SELECT ins_time FROM ins_order_state WHERE ins_order_id = a.id AND laboratory = a.son_laboratory ORDER BY ins_time DESC LIMIT 1) AS ins_time , |
| | | iou.submit_time , |
| | | ios.sort, |
| | | sort_time, |
| | | version, |
| | | ios.num-1 num1 |
| | | FROM |
| | | ( |
| | | SELECT |
| | |
| | | userName, |
| | | checkName, |
| | | ip.son_laboratory, |
| | | io.ins_time, |
| | | io.laboratory |
| | | FROM |
| | | ins_order io |
| | |
| | | io.id |
| | | ) a |
| | | LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory |
| | | LEFT JOIN ins_order_user iou ON ios.id = iou.ins_order_state_id and ios.num=iou.num |
| | | ORDER BY |
| | | ios.sort, |
| | | sort_time desc, |
| | |
| | | LEFT JOIN user ON isu.user_id = user.id |
| | | WHERE |
| | | io.state = 1 |
| | | -- # AND io.ins_state != 5 |
| | | -- # AND io.ins_state != 5 |
| | | and send_time is not null |
| | | <if test="userId !=null and userId!=''"> |
| | | and (isu.user_id = #{userId} OR isu.user_id is NULL ) |
| | |
| | | ip.create_time ip_create_time, |
| | | ip.update_time ip_update_time, |
| | | template_id, |
| | | ipr.ins_value, |
| | | ipr.com_value, |
| | | ipr.equip_value, |
| | | ip.method_s |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | where isa.ins_order_id = #{id} |
| | | and state = 1 |
| | | -- and ins_fiber_id is null |
| | | -- and ins_fibers_id is null |
| | | and <!--isa.sample_code NOT REGEXP '/'--> |
| | | isa.id in(select id1 from (select is2.id id1 ,ip.id from ins_sample is2 left join ins_product ip on is2.id = ip.ins_sample_id where ip.id is not null)s ) |
| | | order by case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 如果以数字开头,则按照数字大小排序 |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 提取字母后面的数字部分 |
| | | ,id asc |
| | | and isa.id in (select id1 |
| | | from (select is2.id id1, ip.id |
| | | from ins_sample is2 |
| | | left join ins_product ip on is2.id = |
| | | ip.ins_sample_id |
| | | where ip.id is not null) s) |
| | | order by case |
| | | when man_hour_group is NULL then 1 |
| | | when man_hour_group = '' then 1 |
| | | else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 如果以数字开头,则按照数字大小排序 |
| | | WHEN man_hour_group REGEXP '[0-9]+' |
| | | THEN CAST(SUBSTRING(man_hour_group, 2) AS UNSIGNED) END -- 提取字母后面的数字部分 |
| | | , id asc |
| | | </select> |
| | | <select id="getInsOrderAndSample" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | ios.num num1, |
| | | 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | 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, |
| | | 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, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | | ipr2.angle, |
| | | ipr2.value, |
| | | ipr2.result, |
| | | ipr2.equip_value equipValue2, |
| | | ipr2.equip_name equipName2, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic, |
| | | ip.temperature, |
| | | ip.humidity |
| | | from ins_sample isa |
| | | left join ins_order_state ios on isa.ins_order_id = ios.ins_order_id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where isa.ins_order_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ios.laboratory = #{laboratory} |
| | | and (ipr2.num = ios.num or ipr2.num is null) |
| | | and (ipr.num = ios.num or ipr.num is null) |
| | | </select> |
| | | <select id="getInsOrderAndSample2" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ios.num num1, |
| | | 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, |
| | | 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, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | | ipr2.angle, |
| | | ipr2.value, |
| | | ipr2.result, |
| | | ipr2.equip_value equipValue2, |
| | | ipr2.equip_name equipName2, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic, |
| | | ip.temperature, |
| | | ip.humidity |
| | | from ins_sample isa |
| | | left join ins_order_state ios on isa.ins_order_id = ios.ins_order_id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where isa.ins_order_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ios.laboratory = #{laboratory} |
| | | and (ipr2.num is null or ipr.num is null) |
| | | </select> |
| | | <select id="getSampleEn" resultType="java.lang.String"> |
| | | select name_en |
| | |
| | | </select> |
| | | <select id="selectSampleProductListByOrderId2" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ip.id ip_id, |
| | | ios.num num1, |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | ask, |
| | | tell, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | 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, |
| | | 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.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | | ipr2.angle, |
| | | ipr2.value, |
| | | ipr2.result, |
| | | ipr2.equip_value equipValue2, |
| | | ipr2.equip_name equipName2, |
| | | ip.method_s |
| | | from ins_sample isa |
| | | left join ins_order_state ios on isa.ins_order_id = ios.ins_order_id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_order_id = #{id} |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where isa.ins_order_id = #{id} |
| | | and ip.standard_method_list_id is not null |
| | | and state = 1 |
| | | order by case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | and (ipr2.num = ios.num or ipr2.num is null) |
| | | and (ipr.num = ios.num or ipr.num is null) |
| | | order by case |
| | | when man_hour_group is NULL then 1 |
| | | when man_hour_group = '' then 1 |
| | | else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 如果以数字开头,则按照数字大小排序 |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 提取字母后面的数字部分 |
| | | ,id asc |
| | | WHEN man_hour_group REGEXP '[0-9]+' |
| | | THEN CAST(SUBSTRING(man_hour_group, 2) AS UNSIGNED) END -- 提取字母后面的数字部分 |
| | | , id asc |
| | | </select> |
| | | |
| | | <select id="selectSampleProductListByOrder2Id2" resultMap="sampleDto"> |
| | | select isa.*, |
| | | ios.num num1, |
| | | ip.id ip_id, |
| | | inspection_item, |
| | | inspection_item_en, |
| | | inspection_item_subclass, |
| | | inspection_item_subclass_en, |
| | | inspection_item_class, |
| | | inspection_item_class_en, |
| | | ip.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | 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, |
| | | tell, |
| | | `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.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | | ipr2.angle, |
| | | ipr2.value, |
| | | ipr2.result, |
| | | ipr2.equip_value equipValue2, |
| | | ipr2.equip_name equipName2, |
| | | ip.method_s |
| | | from ins_sample isa |
| | | left join ins_order_state ios on isa.ins_order_id = ios.ins_order_id |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where isa.ins_order_id = #{id} |
| | | and ip.standard_method_list_id is not null |
| | | and state = 1 |
| | | order by case |
| | | when man_hour_group is NULL then 1 |
| | | when man_hour_group = '' then 1 |
| | | else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 如果以数字开头,则按照数字大小排序 |
| | | WHEN man_hour_group REGEXP '[0-9]+' |
| | | THEN CAST(SUBSTRING(man_hour_group, 2) AS UNSIGNED) END -- 提取字母后面的数字部分 |
| | | , id asc |
| | | </select> |
| | | <select id="selectSampleProductListByOrderId3" resultMap="sampleDto3"> |
| | | select isa.id, |
| | | sample_code, |
| | | motor_number, |
| | | isa.sample, |
| | | entrust_code, |
| | | is_leave, |
| | |
| | | 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 |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_order io on io.id = ins_order_id |
| | | where ip.state = 1 |
| | | and ins_order_id in |
| | |
| | | #{id} |
| | | </foreach> |
| | | order by case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | CASE |
| | | WHEN man_hour_group REGEXP '^[0-9]' THEN CAST(man_hour_group AS UNSIGNED) -- 如果以数字开头,则按照数字大小排序 |
| | | WHEN man_hour_group REGEXP '[0-9]+' THEN CAST(SUBSTRING(man_hour_group, 2)AS UNSIGNED) END -- 提取字母后面的数字部分 |
| | |
| | | </select> |
| | | |
| | | <select id="getInsProduct1" resultMap="product"> |
| | | select ip.id ip_id, |
| | | 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | 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, |
| | | 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, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | | ipr2.angle, |
| | | ipr2.value, |
| | | ipr2.result, |
| | | ipr2.equip_value equipValue2, |
| | | ipr2.equip_name equipName2, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_sample isa on ip.ins_sample_id = isa.id |
| | | left join ins_order_state ios on ios.ins_order_id = isa.ins_order_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ins_fiber_id is null |
| | | and ins_fibers_id is null |
| | | and standard_method_list_id is not null |
| | | and ip.standard_method_list_id is not null |
| | | 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 ip.id, ipr.id, ipr2.id |
| | | </select> |
| | | <select id="getInsProduct2" resultMap="product"> |
| | | select ip.id ip_id, |
| | | <select id="getIns2Product1" 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | 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, |
| | | 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, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | | ipr2.angle, |
| | | ipr2.value, |
| | | ipr2.result, |
| | | ipr2.equip_value equipValue2, |
| | | ipr2.equip_name equipName2, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_sample isa on ip.ins_sample_id = isa.id |
| | | left join ins_order_state ios on ios.ins_order_id = isa.ins_order_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_fibers_id = #{id} |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ins_fiber_id is null |
| | | and standard_method_list_id is not null |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ip.standard_method_list_id is not null |
| | | and ios.laboratory = #{laboratory} |
| | | order by ip.id, ipr.id, ipr2.id |
| | | </select> |
| | | <select id="getInsProduct3" resultMap="product"> |
| | | select ip.id ip_id, |
| | | <select id="get2InsProduct1" 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.factory ip_factory, |
| | | ip.laboratory ip_laboratory, |
| | | ip.sample_type ip_sample_type, |
| | | ip.sample ip_sample, |
| | | ip.model ip_model, |
| | | son_laboratory, |
| | | ip.unit ip_unit, |
| | | ip.unit ip_unit, |
| | | price, |
| | | man_hour, |
| | | man_hour_group, |
| | |
| | | bsm, |
| | | ask, |
| | | `last_value`, |
| | | ip.ins_result ip_ins_result, |
| | | 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, |
| | | 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, |
| | | ipr.before_check, |
| | | ipr.after_check, |
| | | ipr2.frequency, |
| | | ipr2.often, |
| | | ipr2.port, |
| | | ipr2.angle, |
| | | ipr2.value, |
| | | ipr2.result, |
| | | ipr2.equip_value equipValue2, |
| | | ipr2.equip_name equipName2, |
| | | ip.method_s, |
| | | ip.tell, |
| | | ip.dic |
| | | from ins_product ip |
| | | left join ins_sample isa on ip.ins_sample_id = isa.id |
| | | left join ins_order_state ios on ios.ins_order_id = isa.ins_order_id |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_fiber_id = #{id} |
| | | left join ins_product_result_2 ipr2 on ip.id = ipr2.ins_product_id |
| | | where ins_sample_id = #{id} |
| | | and state = 1 |
| | | and ins_fibers_id is null |
| | | and standard_method_list_id is not null |
| | | and ip.son_laboratory = #{laboratory} |
| | | and ip.standard_method_list_id is not null |
| | | and ios.laboratory = #{laboratory} |
| | | and (ipr2.num = #{num} or ipr.num = #{num}) |
| | | order by ip.id, ipr.id, ipr2.id |
| | | </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="joinModel" column="join_model" jdbcType="VARCHAR"/> |
| | | <result property="joinName" column="join_name" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="motorNumber" column="motor_number" jdbcType="VARCHAR"/> |
| | | <result property="testRequirements" column="test_requirements" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | |
| | | <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> |
| | | <result property="standardMethodListId" column="standard_method_list_id"/> |
| | | <result property="unit" column="unit"/> |
| | | <result property="num1" column="num1"/> |
| | | <collection property="insProduct" resultMap="product"/> |
| | | </resultMap> |
| | | |
| | |
| | | <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"/> |
| | |
| | | <result property="temperature" column="temperature"/> |
| | | <result property="humidity" column="humidity"/> |
| | | <collection property="insProductResult" resultMap="insProductResult"/> |
| | | <collection property="insProductResult2" resultMap="insProductResult2"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="sampleDto3" type="com.yuanchu.mom.dto.SampleProductDto3"> |
| | |
| | | <result property="code" column="entrust_code" jdbcType="VARCHAR"/> |
| | | <result property="isLeave" column="is_leave" jdbcType="VARCHAR"/> |
| | | <result property="sampleCode" column="sample_code" jdbcType="VARCHAR"/> |
| | | <result property="motorNumber" column="motor_number" jdbcType="VARCHAR"/> |
| | | <result property="factory" column="factory" jdbcType="VARCHAR"/> |
| | | <result property="laboratory" column="laboratory" jdbcType="VARCHAR"/> |
| | | <result property="sampleType" column="sample_type" jdbcType="VARCHAR"/> |
| | |
| | | <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"/> |
| | |
| | | <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="beforeCheck" column="before_check" jdbcType="VARCHAR"/> |
| | | <result property="afterCheck" column="after_check" jdbcType="VARCHAR"/> |
| | | <result property="equipName" column="equip_name" jdbcType="VARBINARY"/> |
| | | </resultMap> |
| | | <resultMap id="insProductResult2" type="com.yuanchu.mom.pojo.InsProductResult2"> |
| | | <result column="frequency" property="frequency" jdbcType="VARCHAR"/> |
| | | <result column="often" property="often" jdbcType="VARCHAR"/> |
| | | <result column="port" property="port" jdbcType="VARCHAR"/> |
| | | <result column="angle" property="angle" jdbcType="VARCHAR"/> |
| | | <result column="value" property="value" jdbcType="VARCHAR"/> |
| | | <result column="result" property="result" jdbcType="INTEGER"/> |
| | | <result property="equipValue" column="equipValue2" jdbcType="VARCHAR"/> |
| | | <result property="equipName" column="equipName2" jdbcType="VARBINARY"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="sampleVo" type="com.yuanchu.mom.vo.SampleVo"> |
| | |
| | | from standard_method |
| | | where id = (select standard_method_list_id from ins_sample where id = #{sampleId}) |
| | | </select> |
| | | <select id="selectSampleList" resultType="java.util.Map"> |
| | | select DISTINCT sample_code |
| | | from ins_sample |
| | | left join ins_product ip on ins_sample.id = ip.ins_sample_id |
| | | where ins_order_id = #{orderId} |
| | | and ip.id is not null |
| | | </select> |
| | | <select id="selectSampleListByOrderId" resultType="com.yuanchu.mom.pojo.InsSample"> |
| | | select DISTINCT ins_sample.* |
| | | from ins_sample |
| | | left join ins_product ip on ins_sample.id = ip.ins_sample_id |
| | | where ins_order_id = #{orderId} |
| | | and ip.id is not null |
| | | </select> |
| | | <select id="selectInsSample" resultType="com.yuanchu.mom.pojo.InsSample"> |
| | | 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 |
| | | <foreach collection="ids" open="(" close=")" item="id" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectSample" resultType="com.yuanchu.mom.pojo.InsSample"> |
| | | select distinct isa.* |
| | | from ins_sample isa |
| | | left join ins_product ip on isa.id = ip.ins_sample_id |
| | | where son_laboratory = '电路试验' |
| | | and state = 1 |
| | | and ins_order_id = #{insOrderId} |
| | | </select> |
| | | <select id="selectList1" resultType="com.yuanchu.mom.dto.SampleProductDto"> |
| | | select * from ins_sample where ins_order_id=#{id |
| | | } |
| | | </select> |
| | | </mapper> |