| | |
| | | ira.temp_url_pdf, |
| | | iiq.is_copper, |
| | | iiq.is_split_order, |
| | | iiq.update_batch_no, |
| | | iiq.part_desc, |
| | | |
| | | CASE |
| | | WHEN io.ifs_inventory_id IS NOT NULL THEN iiq.update_batch_no |
| | | ELSE io.update_batch_no |
| | | END AS update_batch_no, |
| | | |
| | | CASE |
| | | WHEN io.ifs_inventory_id IS NOT NULL THEN iiq.part_desc |
| | | ELSE io.part_desc |
| | | END AS part_desc, |
| | | |
| | | CASE |
| | | WHEN io.ifs_inventory_id IS NOT NULL THEN iiq.supplier_name |
| | | ELSE io.supplier_name |
| | | END AS supplier_name, |
| | | |
| | | iiq.material_prop AS material_prop |
| | | FROM |
| | | ins_order io |
| | |
| | | |
| | | WHERE io.state = 1 |
| | | AND io.send_time IS NOT NULL |
| | | |
| | | <if test="materialProp != null and materialProp != ''"> |
| | | AND iiq.material_prop LIKE CONCAT('%', #{materialProp}, '%') |
| | | </if> |
| | | |
| | | <if test="sonLaboratory != null and sonLaboratory != ''"> |
| | | AND ip.son_laboratory = #{sonLaboratory} |
| | | </if> |
| | |
| | | </if> |
| | | ORDER BY send_time ASC |
| | | </select> |
| | | |
| | | <!-- <select id="findInsSampleAndOrder" resultType="com.ruoyi.inspect.vo.InsOrderPlanVO">--> |
| | | <!-- select * from(select * from(--> |
| | | <!-- SELECT--> |
| | | <!-- a.*,ios.ins_state,ios.verify_tell,verify_user--> |
| | | <!-- FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT--> |
| | | <!-- io.id,--> |
| | | <!-- io.entrust_code,--> |
| | | <!-- io.type,--> |
| | | <!-- io.appointed,--> |
| | | <!-- io.send_time,--> |
| | | <!-- io.order_type,--> |
| | | <!-- case when--> |
| | | <!-- io.type_source = 0--> |
| | | <!-- then io.sample_view--> |
| | | <!-- else io.sample end sample,--> |
| | | <!-- GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model,--> |
| | | <!-- userName,--> |
| | | <!-- checkName,--> |
| | | <!-- ip.son_laboratory,--> |
| | | <!-- io.ins_time,--> |
| | | <!-- io.laboratory,--> |
| | | <!-- io.type_source,--> |
| | | <!-- io.ifs_inventory_id,--> |
| | | <!-- ira.id ins_report_id,--> |
| | | <!-- ira.url,--> |
| | | <!-- ira.url_s,--> |
| | | <!-- ira.temp_url_pdf,--> |
| | | <!-- iiq.is_copper,--> |
| | | <!-- iiq.is_split_order,--> |
| | | <!-- iiq.update_batch_no,--> |
| | | <!-- iiq.part_desc,--> |
| | | <!-- iiq.material_prop AS material_prop--> |
| | | <!-- FROM--> |
| | | <!-- ins_order io--> |
| | | <!-- LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id--> |
| | | <!-- LEFT JOIN ins_report ira ON ira.ins_order_id = io.id--> |
| | | |
| | | <!-- LEFT JOIN ifs_inventory_quantity iiq--> |
| | | <!-- ON iiq.id = io.ifs_inventory_id--> |
| | | <!-- <if test="materialProp != null and materialProp != ''">--> |
| | | <!-- AND iiq.material_prop LIKE CONCAT('%', #{materialProp}, '%')--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- 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--> |
| | | <!-- WHERE u.state=0--> |
| | | <!-- <if test="sonLaboratory!= null and sonLaboratory != ''">--> |
| | | <!-- and son_laboratory=#{sonLaboratory}--> |
| | | <!-- </if>--> |
| | | <!-- GROUP BY ins_sample_id--> |
| | | <!-- ORDER 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--> |
| | | <!-- WHERE u.state=1--> |
| | | <!-- <if test="sonLaboratory!= null and sonLaboratory != ''">--> |
| | | <!-- and son_laboratory=#{sonLaboratory}--> |
| | | <!-- </if>--> |
| | | <!-- GROUP BY ins_sample_id--> |
| | | <!-- ORDER 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--> |
| | | <!-- <if test="isCheck != null">--> |
| | | <!-- <if test="userName !=null and userName!=''">--> |
| | | <!-- and checkName like CONCAT ('%', #{userName},'%')--> |
| | | <!-- </if>--> |
| | | <!-- </if>--> |
| | | <!-- <if test="isCheck == null">--> |
| | | <!-- <if test="userName !=null and userName!=''">--> |
| | | <!-- and userName like CONCAT ('%', #{userName},'%')--> |
| | | <!-- </if>--> |
| | | <!-- </if>--> |
| | | <!-- <if test="sonLaboratory!= null and sonLaboratory != ''">--> |
| | | <!-- and ip.son_laboratory = #{sonLaboratory}--> |
| | | <!-- </if>--> |
| | | <!-- 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--> |
| | | <!-- ORDER BY--> |
| | | <!-- a.type DESC,--> |
| | | <!-- a.id--> |
| | | <!-- ) b--> |
| | | <!-- where ins_state is not null--> |
| | | <!-- <if test="laboratory!=null and laboratory!=''">--> |
| | | <!-- and laboratory=#{laboratory}--> |
| | | <!-- </if>--> |
| | | <!-- )A--> |
| | | <!-- <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">--> |
| | | <!-- ${ew.customSqlSegment}--> |
| | | <!-- </if>--> |
| | | <!-- ORDER BY send_time asc--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="inspectionOrderDetailsTaskSwitching" resultType="com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo"> |
| | | select * from( |
| | |
| | | -- 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 ) |
| | | 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 ip.sort asc, |
| | | case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | |
| | | limit 1 |
| | | </select> |
| | | <select id="selectInsOrder" resultType="map"> |
| | | SELECT |
| | | ifs.order_no AS orderNo, |
| | | SELECT ifs.order_no AS orderNo, |
| | | ifs.supplier_id AS supplierId, |
| | | ifs.supplier_name AS supplierName, |
| | | ifs.part_no AS partNo, |
| | |
| | | io.test_quantity testQuantity, |
| | | ifs.buy_unit_meas buyUnitMeas, |
| | | ifs.declare_date declareDate |
| | | FROM |
| | | ifs_inventory_quantity ifs |
| | | FROM ifs_inventory_quantity ifs |
| | | LEFT JOIN ins_order io ON ifs.id = io.ifs_inventory_id |
| | | WHERE |
| | | io.id = #{id} |
| | | WHERE io.id = #{id} |
| | | </select> |
| | | <select id="selectSampleProductListByOrderId2" resultMap="sampleDto"> |
| | | select isa.*, |
| | |
| | | and state = 1 |
| | | and ip.is_binding != 1 |
| | | order by ip.sort asc, |
| | | case when man_hour_group is NULL then 1 |
| | | when man_hour_group ='' then 1 else 0 end, |
| | | 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 -- 提取字母后面的数字部分 |
| | | WHEN man_hour_group REGEXP '[0-9]+' |
| | | THEN CAST(SUBSTRING(man_hour_group, 2) AS UNSIGNED) END -- 提取字母后面的数字部分 |
| | | ,id asc |
| | | </select> |
| | | |
| | | <select id="getInsProduct1" resultMap="product"> |
| | | select <include refid="getInsProducSql"/> |
| | | select |
| | | <include refid="getInsProducSql"/> |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_sample_id = #{id} |
| | |
| | | </select> |
| | | |
| | | <select id="getInsProduct6" resultMap="product"> |
| | | select <include refid="getInsProducSql"/> |
| | | select |
| | | <include refid="getInsProducSql"/> |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ins_sample_id = #{id} |
| | |
| | | |
| | | <!-- 查询检验项检验结果 --> |
| | | <select id="selectProductResult" resultMap="product"> |
| | | select <include refid="getInsProducSql"/> |
| | | select |
| | | <include refid="getInsProducSql"/> |
| | | from ins_product ip |
| | | left join ins_product_result ipr on ip.id = ipr.ins_product_id |
| | | where ip.id in |