修改大屏接口

This commit is contained in:
liuwu 2023-08-24 18:26:18 +08:00
parent 5b703a8946
commit d30a679941
6 changed files with 38 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package com.cyx.web.base.controller;
import java.util.List;
import java.util.Map;
import com.cyx.common.annotation.Log;
import com.cyx.common.core.controller.BaseController;
@ -90,6 +91,16 @@ public class TAmentPartyAffairsController extends BaseController
return prefix + "/finishedstatic";
}
@RequiresPermissions("base:affairs:list")
@PostMapping("/finishedstaticList")
@ResponseBody
public TableDataInfo finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs)
{
startPage();
List<Map<String,Object>> list = tAmentPartyAffairsService.finishedstaticList(tAmentPartyAffairs);
return getDataTable(list);
}
/**
* 查询党务列表
*/

View File

@ -72,4 +72,6 @@ public interface TAmentPartyAffairsMapper
List<Map<String, Object>> bmwcqk(TAmentPartyAffairs am);
List<Map<String, Object>> groupAll(TAmentPartyAffairs am);
List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -72,4 +72,6 @@ public interface ITAmentPartyAffairsService
List<Map<String, Object>> bmwcqk(TAmentPartyAffairs am);
List<Map<String, Object>> groupAll(TAmentPartyAffairs am);
List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -121,4 +121,9 @@ public class TAmentPartyAffairsServiceImpl implements ITAmentPartyAffairsService
public List<Map<String, Object>> groupAll(TAmentPartyAffairs am){
return tAmentPartyAffairsMapper.groupAll(am);
}
@Override
public List<Map<String,Object>> finishedstaticList(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.finishedstaticList(tAmentPartyAffairs);
}
}

View File

@ -83,7 +83,7 @@
$(function() {
var options = {
url: prefix + "/list",
url: prefix + "/finishedstaticList",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
@ -102,7 +102,7 @@
title: '单位名称'
},
{
field: 'deptId',
field: 'deptName',
title: '部门'
},
{

View File

@ -125,12 +125,27 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
type,
SUM( score ) score,
IF( SUM( now_score ), SUM( now_score ), 0 ) nowScore,
ROUND(IF( SUM( now_score ), SUM( now_score ), 0 )/ SUM( score )) percent
ROUND(IF( SUM( now_score ), SUM( now_score ), 0 )/ SUM( score )*100) percent
FROM
t_ament_party_affairs
GROUP BY
type
</select>
<select id="finishedstaticList" resultType="map">
SELECT
a.*,
ROUND( a.now_score / a.score ) percent,
d.dept_name deptName,
a.shot_name shotName,
a.now_score nowScore
FROM
t_ament_party_affairs a
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
GROUP BY
a.type,
a.shot_name
</select>
<insert id="insertTAmentPartyAffairs" parameterType="TAmentPartyAffairs" useGeneratedKeys="true" keyProperty="id">
insert into t_ament_party_affairs