| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.TbBasicData"> |
| | | <id column="id" property="id" /> |
| | | <result column="quarter" property="quarter" /> |
| | | <result column="dept_area_code" property="deptAreaCode" /> |
| | | <result column="transfer_payment_scale" property="transferPaymentScale" /> |
| | | <result column="current_gdp" property="currentGdp" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="status" property="status" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <id column="id" property="id"/> |
| | | <result column="quarter" property="quarter"/> |
| | | <result column="dept_area_code" property="deptAreaCode"/> |
| | | <result column="transfer_payment_scale" property="transferPaymentScale"/> |
| | | <result column="current_gdp" property="currentGdp"/> |
| | | <result column="remark" property="remark"/> |
| | | <result column="status" property="status"/> |
| | | <result column="del_flag" property="delFlag"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | |
| | | </sql> |
| | | <select id="fieldsStatics" resultType="com.ruoyi.system.vo.CurrentFieldsVO"> |
| | | SELECT |
| | | tbd.id, |
| | | su.area_name, |
| | | IF(tbd.`quarter` IS NULL, CONCAT(YEAR(NOW()), '年', |
| | | CASE |
| | |
| | | tbd.create_time, |
| | | COALESCE(tbd.`status`, 1) AS `status` |
| | | FROM |
| | | (SELECT * FROM sys_user WHERE user_type = 2) su |
| | | (SELECT * FROM sys_user WHERE user_type = 2) AS su |
| | | LEFT JOIN |
| | | (SELECT * FROM tb_basic_data WHERE `quarter` = #{nowQuarter}) tbd ON su.area_code = tbd.dept_area_code |
| | | (SELECT * FROM tb_basic_data WHERE `quarter` = #{dto.quarter}) AS tbd ON su.area_code = tbd.dept_area_code |
| | | <where> |
| | | <if test="nowQuarter != null and nowQuarter !=''"> |
| | | tbd.quarter LIKE CONCAT('%',#{nowQuarter},'%') |
| | | </if> |
| | | tbd.quarter = #{dto.quarter} |
| | | <if test="dto.areaName != null and dto.areaName !=''"> |
| | | su.area_name LIKE CONCAT('%',#{dto.areaName},'%') |
| | | AND su.area_name LIKE CONCAT('%',#{dto.areaName},'%') |
| | | </if> |
| | | <if test="dto.status != null and dto.status !=''"> |
| | | tbd.status = #{dto.status} |
| | | <if test="dto.status != null"> |
| | | AND tbd.status = #{dto.status} |
| | | </if> |
| | | <if test="dto.personInCharge != null and dto.personInCharge !=''"> |
| | | su.person_in_charge LIKE CONCAT('%',#{dto.personInCharge},'%') |
| | | AND su.person_in_charge LIKE CONCAT('%',#{dto.personInCharge},'%') |
| | | </if> |
| | | <if test="dto.phoneNumber != null and dto.phoneNumber != ''"> |
| | | su.phone_number LIKE CONCAT('%',#{dto.phoneNumber},'%') |
| | | AND su.phone_number LIKE CONCAT('%',#{dto.phoneNumber},'%') |
| | | </if> |
| | | </where> |
| | | </select> |