|
@@ -218,8 +218,15 @@
|
|
|
t.warehousing_way warehousingWay,
|
|
t.warehousing_way warehousingWay,
|
|
|
t.community_id communityId
|
|
t.community_id communityId
|
|
|
from purchase_apply t
|
|
from purchase_apply t
|
|
|
|
|
+ <if test="resName != null and resName != ''" >
|
|
|
|
|
+ left join purchase_apply_detail pad on t.apply_order_id = pad.apply_order_id and pad.status_cd = '0'
|
|
|
|
|
+ left join resource_store rs on pad.res_id = rs.res_id and rs.status_cd = '0'
|
|
|
|
|
+ </if>
|
|
|
inner join t_dict d on t.state = d.status_cd and d.table_name = 'purchase_apply' and d.table_columns = 'state'
|
|
inner join t_dict d on t.state = d.status_cd and d.table_name = 'purchase_apply' and d.table_columns = 'state'
|
|
|
where 1 = 1
|
|
where 1 = 1
|
|
|
|
|
+ <if test="resName != null and resName != ''" >
|
|
|
|
|
+ and rs.res_name like concat('%','','%')
|
|
|
|
|
+ </if>
|
|
|
<if test="resOrderType !=null and resOrderType != ''">
|
|
<if test="resOrderType !=null and resOrderType != ''">
|
|
|
and t.res_order_type= #{resOrderType}
|
|
and t.res_order_type= #{resOrderType}
|
|
|
</if>
|
|
</if>
|
|
@@ -263,6 +270,12 @@
|
|
|
<if test="communityId !=null and communityId != ''">
|
|
<if test="communityId !=null and communityId != ''">
|
|
|
and t.community_id= #{communityId}
|
|
and t.community_id= #{communityId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="startTime !=null and startTime != ''">
|
|
|
|
|
+ and t.create_time >= #{startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime !=null and endTime != ''">
|
|
|
|
|
+ and t.create_time <= #{startTime}
|
|
|
|
|
+ </if>
|
|
|
order by t.create_time desc
|
|
order by t.create_time desc
|
|
|
<if test="page != -1 and page != null ">
|
|
<if test="page != -1 and page != null ">
|
|
|
limit #{page}, #{row}
|
|
limit #{page}, #{row}
|
|
@@ -406,7 +419,14 @@
|
|
|
<select id="queryPurchaseApplysCount" parameterType="Map" resultType="Map">
|
|
<select id="queryPurchaseApplysCount" parameterType="Map" resultType="Map">
|
|
|
select count(1) count
|
|
select count(1) count
|
|
|
from purchase_apply t
|
|
from purchase_apply t
|
|
|
|
|
+ <if test="resName != null and resName != ''" >
|
|
|
|
|
+ left join purchase_apply_detail pad on t.apply_order_id = pad.apply_order_id and pad.status_cd = '0'
|
|
|
|
|
+ left join resource_store rs on pad.res_id = rs.res_id and rs.status_cd = '0'
|
|
|
|
|
+ </if>
|
|
|
where 1 = 1
|
|
where 1 = 1
|
|
|
|
|
+ <if test="resName != null and resName != ''" >
|
|
|
|
|
+ and rs.res_name like concat('%','','%')
|
|
|
|
|
+ </if>
|
|
|
<if test="resOrderType !=null and resOrderType != ''">
|
|
<if test="resOrderType !=null and resOrderType != ''">
|
|
|
and t.res_order_type= #{resOrderType}
|
|
and t.res_order_type= #{resOrderType}
|
|
|
</if>
|
|
</if>
|
|
@@ -453,6 +473,12 @@
|
|
|
<if test="communityId !=null and communityId != ''">
|
|
<if test="communityId !=null and communityId != ''">
|
|
|
and t.community_id = #{communityId}
|
|
and t.community_id = #{communityId}
|
|
|
</if>
|
|
</if>
|
|
|
|
|
+ <if test="startTime !=null and startTime != ''">
|
|
|
|
|
+ and t.create_time >= #{startTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="endTime !=null and endTime != ''">
|
|
|
|
|
+ and t.create_time <= #{startTime}
|
|
|
|
|
+ </if>
|
|
|
<if test='urgentFlag !=null and urgentFlag == "1"'>
|
|
<if test='urgentFlag !=null and urgentFlag == "1"'>
|
|
|
and date_format(t.create_time,'%Y-%m') = date_format(now(),'%Y-%m')
|
|
and date_format(t.create_time,'%Y-%m') = date_format(now(),'%Y-%m')
|
|
|
</if>
|
|
</if>
|