|
@@ -250,4 +250,47 @@
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
|
|
|
-</mapper>
|
|
|
+ <select id="agreementRemind" parameterType="TWarehouseAgreement" resultType="Map">
|
|
|
+ select distinct
|
|
|
+ agre.f_id AS fId,
|
|
|
+ agre.f_feetypeid AS fFeetypeid,
|
|
|
+ corp.f_name AS fCorpid,
|
|
|
+ agre.f_contractno AS fContractno,
|
|
|
+ agre.f_begindate AS fBegindate,
|
|
|
+ agre.f_enddate AS fEnddate,
|
|
|
+ agre.create_by AS createBy,
|
|
|
+ agre.create_time AS createTime,
|
|
|
+ agre.remark AS remark
|
|
|
+ from t_warehouse_agreement agre
|
|
|
+ left join t_corps corp on corp.f_id = agre.f_corpid
|
|
|
+ where
|
|
|
+ agre.f_status = '0'
|
|
|
+ and datediff(date_format(agre.f_enddate, '%Y-%m-%d'), date_format(now(), '%Y-%m-%d')) <= 60
|
|
|
+ <if test="value != null and value != ''">
|
|
|
+ and datediff(date_format(agre.f_enddate, '%Y-%m-%d'), date_format(now(), '%Y-%m-%d')) <= #{value}
|
|
|
+ </if>
|
|
|
+ <if test="fCorpid != null ">and agre.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fContractno != null and fContractno != ''">and agre.f_contractno = #{fContractno}</if>
|
|
|
+ <if test="fBegindate != null ">and agre.f_begindate = #{fBegindate}</if>
|
|
|
+ <if test="fEnddate != null ">and agre.f_enddate = #{fEnddate}</if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="biContractCount" resultType="map">
|
|
|
+ select count(f_id) as contractCount
|
|
|
+ from t_warehouse_agreement
|
|
|
+ where f_feetypeid = 0
|
|
|
+ <if test="beginDate != null and beginDate != ''">and f_enddate >= #{beginDate}</if>
|
|
|
+ <if test="endDate != null and endDate != ''">and f_enddate < #{endDate}</if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="biContractList" resultType="map">
|
|
|
+ select
|
|
|
+ tc.f_name AS customerName,
|
|
|
+ ta.f_begindate AS beginDate,
|
|
|
+ ta.f_enddate AS endDate
|
|
|
+ from t_warehouse_agreement ta left join t_corps tc on tc.f_id = ta.f_corpid
|
|
|
+ where ta.f_feetypeid = 0
|
|
|
+ order by ta.create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|