bug 4447修复: 查询结束后,分页控件出错

This commit is contained in:
gaowdong 2024-12-30 17:43:13 +08:00
parent f4bbf5445e
commit 2820d70736
1 changed files with 26 additions and 31 deletions

View File

@ -59,26 +59,27 @@
WHERE bsc.is_active = '1' and td.`value` = #{params.month} and fcpe.eva_date is not null WHERE bsc.is_active = '1' and td.`value` = #{params.month} and fcpe.eva_date is not null
</select> </select>
<select id="list" resultType="com.bonus.bmw.subeva.entity.SubEvaBean" >
SELECT <sql id="listRef">
bsc.`id` as id, SELECT
bp.`NAME` as proName, bsc.`id` as id,
bs.sub_name as subName, bp.`NAME` as proName,
bsc.contract_name as contractName, bs.sub_name as subName,
COUNT(bsr.id) AS teamNumber, bsc.contract_name as contractName,
td.`value` AS evaMonth, COUNT(bsr.id) AS teamNumber,
fcpe.eva_grade AS evaGrade, td.`value` AS evaMonth,
fcpe.eva_name AS evaName, fcpe.eva_grade AS evaGrade,
fcpe.eva_date AS evaDate, fcpe.eva_name AS evaName,
fcpe.eva_id as evaId, fcpe.eva_date AS evaDate,
fcpe.eva_year as evaYear fcpe.eva_id as evaId,
fcpe.eva_year as evaYear
FROM FROM
`bm_sub_contract` bsc `bm_sub_contract` bsc
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1' LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1'
LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1' LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1'
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '3' and bsr.is_active = '1' LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '3' and bsr.is_active = '1'
LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1' LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1'
LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year} LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year}
WHERE bsc.is_active = '1' and td.`value` = #{params.month} WHERE bsc.is_active = '1' and td.`value` = #{params.month}
<if test="params != null and params != ''"> <if test="params != null and params != ''">
@ -91,21 +92,15 @@
</if> </if>
GROUP BY bsc.id GROUP BY bsc.id
limit #{offset}, #{limit} </sql>
<select id="list" resultType="com.bonus.bmw.subeva.entity.SubEvaBean" >
<include refid="listRef"></include>
limit #{offset}, #{limit}
</select> </select>
<select id="count" resultType="java.lang.Integer"> <select id="count" resultType="java.lang.Integer">
SELECT select count(*) from (<include refid="listRef"></include>) as c
count(1)
FROM
`bm_sub_contract` bsc
LEFT JOIN bm_project bp on bp.id = bsc.pro_id and bp.is_active = '1'
LEFT JOIN bm_subcontractor bs on bs.id = bsc.sub_id and bs.is_active = '1'
LEFT JOIN bm_sub_relation bsr ON bsr.sub_contract_id = bsc.id AND bsr.type = '1' and bsr.is_active = '3'
LEFT JOIN t_dict td ON td.type = 'monthcheck' and td.is_active = '1'
LEFT JOIN fbeva_core_person_evalu fcpe ON fcpe.eva_month = td.`value` AND bsc.id = fcpe.contract_id and fcpe.eva_year = #{params.year}
WHERE bsc.is_active = '1' and td.`value` = #{params.month}
</select> </select>
<select id="getPersonNameList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean"> <select id="getPersonNameList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
select select