修改接口

This commit is contained in:
liuwu 2023-09-05 17:43:07 +08:00
parent 54be395376
commit e18aca6940
5 changed files with 14 additions and 34 deletions

View File

@ -225,7 +225,7 @@ public class TAmentPartyAffairsController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult importantWork(TAmentPartyAffairs tAmentPartyAffairs) public AjaxResult importantWork(TAmentPartyAffairs tAmentPartyAffairs)
{ {
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.importantWork(tAmentPartyAffairs); List<Map<String,Object>> list = tAmentPartyAffairsService.importantWork(tAmentPartyAffairs);
return AjaxResult.success(list); return AjaxResult.success(list);
} }
@ -234,7 +234,7 @@ public class TAmentPartyAffairsController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult labelTotal(TAmentPartyAffairs tAmentPartyAffairs) public AjaxResult labelTotal(TAmentPartyAffairs tAmentPartyAffairs)
{ {
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.labelTotal(tAmentPartyAffairs); List<Map<String,Object>> list = tAmentPartyAffairsService.labelTotal(tAmentPartyAffairs);
return AjaxResult.success(list); return AjaxResult.success(list);
} }

View File

@ -83,6 +83,6 @@ public interface TAmentPartyAffairsMapper
List<Map<String, Object>> deptTree(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String, Object>> deptTree(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> importantWork(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String,Object>> importantWork(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> labelTotal(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String,Object>> labelTotal(TAmentPartyAffairs tAmentPartyAffairs);
} }

View File

@ -83,6 +83,6 @@ public interface ITAmentPartyAffairsService
List<Map<String, Object>> deptTree(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String, Object>> deptTree(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> importantWork(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String,Object>> importantWork(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> labelTotal(TAmentPartyAffairs tAmentPartyAffairs); List<Map<String,Object>> labelTotal(TAmentPartyAffairs tAmentPartyAffairs);
} }

View File

@ -68,11 +68,11 @@ public class TAmentPartyAffairsServiceImpl implements ITAmentPartyAffairsService
} }
@Override @Override
public List<TAmentPartyAffairs> importantWork(TAmentPartyAffairs tAmentPartyAffairs){ public List<Map<String,Object>> importantWork(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.importantWork(tAmentPartyAffairs); return tAmentPartyAffairsMapper.importantWork(tAmentPartyAffairs);
} }
@Override @Override
public List<TAmentPartyAffairs> labelTotal(TAmentPartyAffairs tAmentPartyAffairs){ public List<Map<String,Object>> labelTotal(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.labelTotal(tAmentPartyAffairs); return tAmentPartyAffairsMapper.labelTotal(tAmentPartyAffairs);
} }

View File

@ -156,43 +156,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.type f.type
</select> </select>
<select id="labelTotal" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult"> <select id="labelTotal" parameterType="TAmentPartyAffairs" resultType="map">
SELECT SELECT
ROUND( sum(a.now_score) / sum(a.score) * 100 ) percent, ROUND( sum(a.now_score) / sum(a.score) * 100 ) percent,
a.shot_name shotName, a.shot_name shotName,
a.now_score nowScore, a.type
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM FROM
t_ament_party_affairs a t_ament_party_affairs a
LEFT JOIN t_ament_personnel b ON a.per_id = b.id
LEFT JOIN t_ament_personnel c ON a.reviewed = c.id
LEFT JOIN t_ament_personnel d ON a.head = d.id
LEFT JOIN t_ament_branch e ON a.branch_id = e.branch_id
LEFT JOIN sys_dept f ON a.dept_id = f.dept_id
group by a.type,a.shot_name group by a.type,a.shot_name
</select> </select>
<select id="importantWork" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult"> <select id="importantWork" parameterType="TAmentPartyAffairs" resultType="map">
SELECT SELECT
ROUND( sum(a.now_score) / sum(a.score) * 100 ) percent, ROUND( sum(a.now_score) / sum(a.score) * 100 ) percent,
a.shot_name shotName, a.shot_name shotName,
a.now_score nowScore, a.type
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM FROM
t_ament_party_affairs a t_ament_party_affairs a
LEFT JOIN t_ament_personnel b ON a.per_id = b.id
LEFT JOIN t_ament_personnel c ON a.reviewed = c.id
LEFT JOIN t_ament_personnel d ON a.head = d.id
LEFT JOIN t_ament_branch e ON a.branch_id = e.branch_id
LEFT JOIN sys_dept f ON a.dept_id = f.dept_id
where a.type in ('党风廉政建设','党务意识形态') where a.type in ('党风廉政建设','党务意识形态')
group by a.type,a.shot_name group by a.type,a.shot_name
</select> </select>