gdg
2021-02-01 1cbac7aa20a183a9a893651bf0cef24b1909eb5c
src/main/java/com/nanometer/smartlab/dao/OpeUseFlowDao.xml
@@ -216,6 +216,12 @@
        <if test="receiptNumber !=null and receiptNumber != ''">
            and ouf.receipt_number like concat("%",#{receiptNumber},"%")
        </if>
        <if test="reagentName !=null and reagentName != ''">
            and sr.name like concat("%",#{reagentName},"%")
        </if>
        <if test="applyPerson !=null and applyPerson != ''">
            and su.name like concat("%",#{applyPerson},"%")
        </if>
        group by ouf.receipt_number) a
@@ -262,6 +268,12 @@
        <if test="receiptNumber !=null and receiptNumber != ''">
            and ouf.receipt_number like concat("%",#{receiptNumber},"%")
        </if>
        <if test="reagentName !=null and reagentName != ''">
            and sr.name like concat("%",#{reagentName},"%")
        </if>
        <if test="applyPerson !=null and applyPerson != ''">
            and su.name like concat("%",#{applyPerson},"%")
        </if>
        group by ouf.receipt_number
        ORDER BY ouf.create_time desc
        <if test="first != null and pageSize != null">
@@ -290,6 +302,21 @@
        and ouf.receipt_number = #{receiptNumber}
    </select>
    <select id="getApplyInfoSize" resultType="java.lang.Integer">
        SELECT
        count(0)
        from `ope_use_flow` ouf
        LEFT JOIN ope_reagent_status ors ON ors.reagent_code = ouf.reagent_code
        LEFT join sys_reagent sr ON ors.reagent_id = sr.id
        LEFT JOIN base_meta bm ON bm.id = sr.reagent_format
        LEFT JOIN base_meta bm1 on bm1.id = sr.reagent_unit
        LEFT JOIN base_meta bm2 on bm2.id = sr.product_home
        LEFT JOIN base_meta bm3 on bm3.id = sr.control_products
        WHERE ouf.operatestate = #{operatestate}
        and ouf.receipt_number = #{receiptNumber}
    </select>
    <insert id="insertOpeUseFlow" parameterType="com.nanometer.smartlab.entity.OpeUseFlow">
    insert into ope_use_flow(id, reagent_code, status, house_id, container_id, user_id, remainder, place, store_type, valid_flag, create_time, realstatus, operatestate)
    values (#{id}, #{reagentCode}, #{status}, #{houseId}, #{containerId}, #{userId}, #{remainder}, #{place}, #{storeType}, 1, #{createTime}, #{realstatus},#{operateState})