| | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TCheckAcceptRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="contractId" property="contractId" /> |
| | | <result column="houseId" property="houseId" /> |
| | | <result column="checkTime" property="checkTime" /> |
| | | <result column="leaseReason" property="leaseReason" /> |
| | | <result column="checkPerson" property="checkPerson" /> |
| | | <result column="accompanyPerson" property="accompanyPerson" /> |
| | | <result column="overallSituation" property="overallSituation" /> |
| | | <result column="furnitureSituation" property="furnitureSituation" /> |
| | | <result column="deviceSituation" property="deviceSituation" /> |
| | | <result column="cleanSituation" property="cleanSituation" /> |
| | | <result column="otherProblem" property="otherProblem" /> |
| | | <result column="contract_id" property="contractId" /> |
| | | <result column="house_id" property="houseId" /> |
| | | <result column="check_time" property="checkTime" /> |
| | | <result column="lease_reason" property="leaseReason" /> |
| | | <result column="check_person" property="checkPerson" /> |
| | | <result column="accompany_person" property="accompanyPerson" /> |
| | | <result column="overall_situation" property="overallSituation" /> |
| | | <result column="furniture_situation" property="furnitureSituation" /> |
| | | <result column="device_situation" property="deviceSituation" /> |
| | | <result column="clean_situation" property="cleanSituation" /> |
| | | <result column="other_problem" property="otherProblem" /> |
| | | <result column="pictures" property="pictures" /> |
| | | <result column="checkResult" property="checkResult" /> |
| | | <result column="checkMoney" property="checkMoney" /> |
| | | <result column="createTime" property="createTime" /> |
| | | <result column="updateTime" property="updateTime" /> |
| | | <result column="createBy" property="createBy" /> |
| | | <result column="updateBy" property="updateBy" /> |
| | | <result column="isDelete" property="isDelete" /> |
| | | <result column="check_result" property="checkResult" /> |
| | | <result column="check_money" property="checkMoney" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="disabled" property="disabled" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, contractId, houseId, checkTime, leaseReason, checkPerson, accompanyPerson, overallSituation, furnitureSituation, deviceSituation, cleanSituation, otherProblem, pictures, checkResult, checkMoney, createTime, updateTime, createBy, updateBy, isDelete |
| | | id, contract_id, house_id, check_time, lease_reason, check_person, accompany_person, overall_situation, furniture_situation, device_situation, clean_situation, |
| | | other_problem, pictures, check_result, check_money, create_time, update_time, create_by, update_by, disabled |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TCheckAcceptRecordVO"> |
| | | select |
| | | t.id, |
| | | t.contract_id, |
| | | t.house_id, |
| | | t.check_time, |
| | | t.lease_reason, |
| | | t.check_person, |
| | | t.accompany_person, |
| | | t.overall_situation, |
| | | t.furniture_situation, |
| | | t.device_situation, |
| | | t.clean_situation, |
| | | t.other_problem, |
| | | t.pictures, |
| | | t.check_result, |
| | | t.check_money, |
| | | t.create_time, |
| | | t.update_time, |
| | | t.create_by, |
| | | t.update_by, |
| | | t.disabled, |
| | | t.code, |
| | | t.check_money, |
| | | t.status, |
| | | c.contract_number, |
| | | h.house_name, |
| | | h.house_address |
| | | from t_check_accept_record t |
| | | left join t_contract c on t.contract_id = c.id |
| | | left join t_house h on t.house_id = h.id |
| | | <where> |
| | | <if test="query.contractNumber != null and query.contractNumber != ''"> |
| | | AND c.contract_number LIKE concat('%', #{query.contractNumber}, '%') |
| | | </if> |
| | | <if test="query.checkResult != null"> |
| | | AND t.check_result = #{query.checkResult} |
| | | </if> |
| | | <if test="query.houseName != null and query.houseName != ''"> |
| | | AND h.house_name LIKE concat('%', #{query.houseName}, '%') |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | AND t.check_time >= #{query.startTime} |
| | | AND t.check_time <= #{query.endTime} |
| | | </if> |
| | | <if test="query.businessDeptId != null and query.businessDeptId != '' and query.businessDeptId != 0"> |
| | | AND c.business_dept_id = #{query.businessDeptId} |
| | | </if> |
| | | AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY t.create_time DESC |
| | | </select> |
| | | <select id="pageListApplet" resultType="com.ruoyi.system.vo.TCheckAcceptRecordVO"> |
| | | select |
| | | t.*, |
| | | c.contract_number, |
| | | h.house_name |
| | | from t_check_accept_record t |
| | | left join t_contract c on t.contract_id = c.id |
| | | left join t_house h on t.house_id = h.id |
| | | <where> |
| | | |
| | | <if test="query.status != null and query.status != '' and query.status == 1"> |
| | | AND t.status = 0 |
| | | </if> |
| | | <if test="query.status != null and query.status != '' and query.status == 2"> |
| | | AND t.status = 1 |
| | | </if> |
| | | <if test="query.houseNameOrAddress != null and query.houseNameOrAddress != ''"> |
| | | AND (h.house_name LIKE concat('%', #{query.houseNameOrAddress}, '%') or h.house_address LIKE concat('%', #{query.houseNameOrAddress}, '%')) |
| | | </if> |
| | | <if test="query.businessDeptId != null and query.businessDeptId != '' and query.businessDeptId!=0"> |
| | | AND h.business_dept_id =#{query.businessDeptId} |
| | | </if> |
| | | AND t.disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY t.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |