Browse Source

查询delflag=0

develop
zhangyuan 3 years ago
parent
commit
020617b557
  1. 135
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractInfoDao.xml

135
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/rent/RentContractInfoDao.xml

@ -41,72 +41,73 @@
FROM FROM
pli_rent_contract_info i pli_rent_contract_info i
LEFT JOIN pli_rent_blacklist b ON i.LESSEE_ID_CARD = b.ID_CARD LEFT JOIN pli_rent_blacklist b ON i.LESSEE_ID_CARD = b.ID_CARD
<where> WHERE
<if test="gridId != null and gridId != ''"> i.DEL_FLAG = '0'
AND i.GRID_ID = #{gridId} AND b.DEL_FLAG = '0'
</if> <if test="gridId != null and gridId != ''">
<if test="villageId != null and villageId != ''"> AND i.GRID_ID = #{gridId}
AND i.VILLAGE_ID = #{villageId} </if>
</if> <if test="villageId != null and villageId != ''">
<if test="buildId != null and buildId != ''"> AND i.VILLAGE_ID = #{villageId}
AND i.BUILD_ID = #{buildId} </if>
</if> <if test="buildId != null and buildId != ''">
<if test="unitId != null and unitId != ''"> AND i.BUILD_ID = #{buildId}
AND i.UNIT_ID = #{unitId} </if>
</if> <if test="unitId != null and unitId != ''">
<if test="homeId != null and homeId != ''"> AND i.UNIT_ID = #{unitId}
AND i.HOME_ID = #{homeId} </if>
</if> <if test="homeId != null and homeId != ''">
<if test="state != null and state != ''"> AND i.HOME_ID = #{homeId}
AND i.STATE = #{state} </if>
</if> <if test="state != null and state != ''">
<if test="lessorName != null and lessorName != ''"> AND i.STATE = #{state}
AND i.LESSOR_NAME = #{lessorName} </if>
</if> <if test="lessorName != null and lessorName != ''">
<if test="lessorIdCard != null and lessorIdCard != ''"> AND i.LESSOR_NAME = #{lessorName}
AND i.LESSOR_ID_CARD = #{lessorIdCard} </if>
</if> <if test="lessorIdCard != null and lessorIdCard != ''">
<if test="lessorMobile != null and lessorMobile != ''"> AND i.LESSOR_ID_CARD = #{lessorIdCard}
AND i.LESSOR_MOBILE = #{lessorMobile} </if>
</if> <if test="lessorMobile != null and lessorMobile != ''">
<if test="lesseeName != null and lesseeName != ''"> AND i.LESSOR_MOBILE = #{lessorMobile}
AND i.LESSEE_NAME = #{lesseeName} </if>
</if> <if test="lesseeName != null and lesseeName != ''">
<if test="lesseeIdCard != null and lesseeIdCard != ''"> AND i.LESSEE_NAME = #{lesseeName}
AND i.LESSEE_ID_CARD = #{lesseeIdCard} </if>
</if> <if test="lesseeIdCard != null and lesseeIdCard != ''">
<if test="lesseeMobile != null and lesseeMobile != ''"> AND i.LESSEE_ID_CARD = #{lesseeIdCard}
AND i.LESSEE_MOBILE = #{lesseeMobile} </if>
</if> <if test="lesseeMobile != null and lesseeMobile != ''">
<if test="reviewStartTime != null and reviewStartTime != ''"> AND i.LESSEE_MOBILE = #{lesseeMobile}
AND i.REVIEW_DATE >= #{reviewStartTime} </if>
</if> <if test="reviewStartTime != null and reviewStartTime != ''">
<if test="reviewEndTime != null and reviewEndTime != ''"> AND i.REVIEW_DATE >= #{reviewStartTime}
AND i.REVIEW_DATE &lt;= #{reviewEndTime} </if>
</if> <if test="reviewEndTime != null and reviewEndTime != ''">
<if test="startTime != null and startTime != ''"> AND i.REVIEW_DATE &lt;= #{reviewEndTime}
AND i.SIGN_DATE >= #{startTime} </if>
</if> <if test="startTime != null and startTime != ''">
<if test="endTime != null and endTime != ''"> AND i.SIGN_DATE >= #{startTime}
AND i.SIGN_DATE &lt;= #{endTime} </if>
</if> <if test="endTime != null and endTime != ''">
<if test="endDate != null and endDate != ''"> AND i.SIGN_DATE &lt;= #{endTime}
<if test="endDate == '0' or endDate == 0"> </if>
AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 1 MONTH ) <if test="endDate != null and endDate != ''">
AND DATE( i.END_DATE ) > CURDATE() <if test="endDate == '0' or endDate == 0">
</if> AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 1 MONTH )
<if test="endDate == '1' or endDate == 1"> AND DATE( i.END_DATE ) > CURDATE()
AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 2 MONTH ) </if>
AND DATE( i.END_DATE ) > CURDATE() <if test="endDate == '1' or endDate == 1">
</if> AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 2 MONTH )
<if test="endDate == '2' or endDate == 2"> AND DATE( i.END_DATE ) > CURDATE()
AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 3 MONTH ) </if>
AND DATE( i.END_DATE ) > CURDATE() <if test="endDate == '2' or endDate == 2">
</if> AND DATE( i.END_DATE ) &lt;= DATE_ADD( curdate(), INTERVAL 3 MONTH )
<if test="endDate == '3' or endDate == 3"> AND DATE( i.END_DATE ) > CURDATE()
AND DATE( i.END_DATE ) &lt;= CURDATE() </if>
</if> <if test="endDate == '3' or endDate == 3">
</if> AND DATE( i.END_DATE ) &lt;= CURDATE()
</where> </if>
</if>
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save