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
</select>
<select id="list" resultType="com.bonus.bmw.subeva.entity.SubEvaBean" >
SELECT
bsc.`id` as id,
bp.`NAME` as proName,
bs.sub_name as subName,
bsc.contract_name as contractName,
COUNT(bsr.id) AS teamNumber,
td.`value` AS evaMonth,
fcpe.eva_grade AS evaGrade,
fcpe.eva_name AS evaName,
fcpe.eva_date AS evaDate,
fcpe.eva_id as evaId,
fcpe.eva_year as evaYear
<sql id="listRef">
SELECT
bsc.`id` as id,
bp.`NAME` as proName,
bs.sub_name as subName,
bsc.contract_name as contractName,
COUNT(bsr.id) AS teamNumber,
td.`value` AS evaMonth,
fcpe.eva_grade AS evaGrade,
fcpe.eva_name AS evaName,
fcpe.eva_date AS evaDate,
fcpe.eva_id as evaId,
fcpe.eva_year as evaYear
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 = '3' and bsr.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}
`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 = '3' and bsr.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}
WHERE bsc.is_active = '1' and td.`value` = #{params.month}
<if test="params != null and params != ''">
@ -91,21 +92,15 @@
</if>
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 id="count" resultType="java.lang.Integer">
SELECT
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 count(*) from (<include refid="listRef"></include>) as c
</select>
<select id="getPersonNameList" resultType="com.bonus.bmw.subeva.entity.SubEvaBean">
select