java110
2021-06-01 b497ff41e47f4ebe69b86f13f6972f34f33f4884
java110-db/src/main/resources/mapper/store/PurchaseApplyDetailServiceDaoImplMapper.xml
@@ -79,9 +79,11 @@
        rsp.supplier_name supplierName,
        td1.name resOrderTypeName,
        td2.name stateName,
        td3.name warehousingWayName
        td3.name warehousingWayName,
        rst.name rstName,
        rss.spec_name specName
        from purchase_apply_detail t
        left join purchase_apply pa on t.apply_order_id = pa.apply_order_id
        inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id
        left join resource_store rs on rs.res_id = t.res_id
        left join resource_supplier rsp on rsp.rs_id = t.rs_id
        left join t_dict td1 on pa.res_order_type = td1.status_cd and td1.table_name = 'purchase_apply' and
@@ -90,6 +92,8 @@
        'state'
        left join t_dict td3 on pa.warehousing_way = td3.status_cd and td3.table_name = 'purchase_apply' and
        td3.table_columns = 'warehousing_way'
        LEFT JOIN resource_store_type rst on rs.rst_id=rst.rst_id
        LEFT JOIN resource_store_specification rss on rs.rss_id=rss.rss_id
        where 1 = 1
        <if test="applyOrderId !=null and applyOrderId != ''">
            and t.apply_order_id= #{applyOrderId}
@@ -121,6 +125,9 @@
        <if test="userId !=null and userId != ''">
            and pa.user_id= #{userId}
        </if>
        <if test="createUserId !=null and createUserId != ''">
            and pa.create_user_id= #{createUserId}
        </if>
        <if test="userName !=null and userName != ''">
            and pa.user_name like '%${userName}%'
        </if>
@@ -151,6 +158,15 @@
        <if test="resId !=null and resId != ''">
            and t.res_id= #{resId}
        </if>
        <if test="storeId !=null and storeId != ''">
            and pa.store_id= #{storeId}
        </if>
        <if test="rssId !=null and rssId != ''">
            and rs.rss_id= #{rssId}
        </if>
        <if test="rstId !=null and rstId != ''">
            and rs.rst_id= #{rstId}
        </if>
        <if test="supplierName !=null and supplierName != ''">
            and rsp.supplier_name= #{supplierName}
        </if>
@@ -175,6 +191,9 @@
            </if>
            <if test="newBId != null and newBId != ''">
                t.b_id = #{newBId},
            </if>
            <if test="rsId != null and rsId != ''">
                t.rs_id = #{rsId},
            </if>
            <if test="resId !=null and resId != ''">
                t.res_id= #{resId},
@@ -202,7 +221,7 @@
    <select id="queryPurchaseApplyDetailsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from purchase_apply_detail t
        left join purchase_apply pa on t.apply_order_id = pa.apply_order_id
        inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id
        left join resource_store rs on rs.res_id = t.res_id
        left join resource_supplier rsp on rsp.rs_id = t.rs_id
        left join t_dict td1 on pa.res_order_type = td1.status_cd and td1.table_name = 'purchase_apply' and
@@ -211,6 +230,8 @@
        'state'
        left join t_dict td3 on pa.warehousing_way = td3.status_cd and td3.table_name = 'purchase_apply' and
        td3.table_columns = 'warehousing_way'
        LEFT JOIN resource_store_type rst on rs.rst_id=rst.rst_id
        LEFT JOIN resource_store_specification rss on rs.rss_id=rss.rss_id
        where 1 = 1
        <if test="applyOrderId !=null and applyOrderId != ''">
            and t.apply_order_id= #{applyOrderId}
@@ -241,6 +262,9 @@
        </if>
        <if test="userId !=null and userId != ''">
            and pa.user_id= #{userId}
        </if>
        <if test="createUserId !=null and createUserId != ''">
            and pa.create_user_id= #{createUserId}
        </if>
        <if test="userName !=null and userName != ''">
            and pa.user_name like '%${userName}%'
@@ -275,6 +299,15 @@
        <if test="resId !=null and resId != ''">
            and t.res_id= #{resId}
        </if>
        <if test="storeId !=null and storeId != ''">
            and pa.store_id= #{storeId}
        </if>
        <if test="rssId !=null and rssId != ''">
            and rs.rss_id= #{rssId}
        </if>
        <if test="rstId !=null and rstId != ''">
            and rs.rst_id= #{rstId}
        </if>
        <if test="startTime !=null and startTime != ''">
            and pa.create_time &gt;= #{startTime}
        </if>