zouyu
10 小时以前 2cf06285f64311722cbf79fd5635b16718635e5e
inspect-server/src/main/resources/mapper/InsUnqualifiedHandlerMapper.xml
@@ -93,6 +93,9 @@
                iuh.request_id,
                iuh.file_url,
                iuh.headline,
                iuh.ins_order_id,
                iuh.is_old_data,
                iuh.group_id,
                coa.operation
            from
                ins_unqualified_handler iuh
@@ -107,12 +110,12 @@
            FROM
            common_oa
            ) AS coa ON iuh.request_id = coa.workflow_id AND coa.rn = 1
            <where>
                <if test="feedbackStartDate!=null and feedbackEndDate !=null">
                    AND iuh.feedback_time between #{feedbackStartDate} AND #{feedbackEndDate}
                </if>
            </where>
        )tempA
        <where>
            <if test="feedbackStartDate!=null and feedbackEndDate !=null">
                AND feedback_time between #{feedbackStartDate} AND #{feedbackEndDate}
            </if>
        </where>
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
@@ -161,4 +164,34 @@
        and operation != '抄送'
        group by co.node_name
    </select>
    <select id="findByGroupId" resultType="com.ruoyi.inspect.vo.UnqualifiedHandlerVO">
        select
            iuh.id as handler_id,
            iuh.no,
            iuh.headline,
            iuh.material_name,
            GROUP_CONCAT(iuh.production_batch SEPARATOR '、') AS production_batch,
            SUM(iuh.cargo_quantity) AS cargo_quantity,
            iuh.buy_unit_meas,
            iuh.specs_models,
            iiq.supplier_name,
            iuh.inspect_time,
            iuh.feedback_user,
            iuh.feedback_time,
            iuh.classification,
            iuh.off_grade_ascription,
            iuh.unqualified_desc,
            iuh.inventory_quantity_id,
            iuh.request_id,
            iuh.oa_state,
            iuh.file_url,
            iuh.group_id
        from
            ins_unqualified_handler iuh
        inner join
            ifs_inventory_quantity iiq on iuh.inventory_quantity_id = iiq.id
        where iuh.group_id=#{groupId}
        group by iuh.group_id
            limit 1
    </select>
</mapper>