新增标准节、优化设备统计
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.tower.mapper.TowerRentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*, b.company_name
|
||||
FROM tower_rent a
|
||||
LEFT JOIN sys_company b ON a.company_id = b.company_id
|
||||
<where>
|
||||
<if test="param.rentId != null">
|
||||
AND a.rent_id = #{param.rentId}
|
||||
</if>
|
||||
<if test="param.rent != null">
|
||||
AND a.rent = #{param.rent}
|
||||
</if>
|
||||
<if test="param.month != null">
|
||||
AND a.month = #{param.month}
|
||||
</if>
|
||||
<if test="param.totalRent != null">
|
||||
AND a.total_rent = #{param.totalRent}
|
||||
</if>
|
||||
<if test="param.projectId != null">
|
||||
AND a.project_id = #{param.projectId}
|
||||
</if>
|
||||
<if test="param.equipmentId != null">
|
||||
AND a.equipment_id = #{param.equipmentId}
|
||||
</if>
|
||||
<if test="param.startDate != null">
|
||||
AND a.start_date LIKE CONCAT('%', #{param.startDate}, '%')
|
||||
</if>
|
||||
<if test="param.stopDate != null">
|
||||
AND a.stop_date LIKE CONCAT('%', #{param.stopDate}, '%')
|
||||
</if>
|
||||
<if test="param.checkDate != null">
|
||||
AND a.check_date LIKE CONCAT('%', #{param.checkDate}, '%')
|
||||
</if>
|
||||
<if test="param.reportStopDate != null">
|
||||
AND a.report_stop_date LIKE CONCAT('%', #{param.reportStopDate}, '%')
|
||||
</if>
|
||||
<if test="param.reportStopType != null">
|
||||
AND a.report_stop_type LIKE CONCAT('%', #{param.reportStopType}, '%')
|
||||
</if>
|
||||
<if test="param.restoreDate != null">
|
||||
AND a.restore_date LIKE CONCAT('%', #{param.restoreDate}, '%')
|
||||
</if>
|
||||
<if test="param.reportMonitorNo != null">
|
||||
AND a.report_monitor_no LIKE CONCAT('%', #{param.reportMonitorNo}, '%')
|
||||
</if>
|
||||
<if test="param.companyId != null">
|
||||
AND a.company_id = #{param.companyId}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND ( a.company_name LIKE CONCAT('%', #{param.keywords}, '%') )
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.tower.entity.TowerRent">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.tower.entity.TowerRent">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user