old mode 100644
new mode 100755
| | |
| | | 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 |
| | |
| | | '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} |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | </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}, |
| | |
| | | <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 |
| | |
| | | '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} |
| | |
| | | </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}%' |
| | |
| | | <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 >= #{startTime} |
| | | </if> |