修改页面

This commit is contained in:
liuwu 2023-09-05 17:35:11 +08:00
parent fdd2bc530e
commit 54be395376
5 changed files with 82 additions and 8 deletions

View File

@ -220,6 +220,24 @@ public class TAmentPartyAffairsController extends BaseController
return getDataTable(list);
}
@RequiresPermissions("base:affairs:list")
@PostMapping("/importantWork")
@ResponseBody
public AjaxResult importantWork(TAmentPartyAffairs tAmentPartyAffairs)
{
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.importantWork(tAmentPartyAffairs);
return AjaxResult.success(list);
}
@RequiresPermissions("base:affairs:list")
@PostMapping("/labelTotal")
@ResponseBody
public AjaxResult labelTotal(TAmentPartyAffairs tAmentPartyAffairs)
{
List<TAmentPartyAffairs> list = tAmentPartyAffairsService.labelTotal(tAmentPartyAffairs);
return AjaxResult.success(list);
}
@GetMapping("/deptTree")
@ResponseBody
public Object deptTree(TAmentPartyAffairs tAmentPartyAffairs)
@ -227,14 +245,14 @@ public class TAmentPartyAffairsController extends BaseController
JSONArray array =new JSONArray();
List<Map<String,Object>> list = tAmentPartyAffairsService.deptTree(tAmentPartyAffairs);
list.forEach(l->{
JSONObject p = new JSONObject();
p.put("id",l.get("id"));
p.put("pId",0);
p.put("name",l.get("type"));
p.put("title",l.get("type"));
p.put("open",false);
p.put("checked",false);
array.add(p);
// JSONObject p = new JSONObject();
// p.put("id",l.get("id"));
// p.put("pId",0);
// p.put("name",l.get("type"));
// p.put("title",l.get("type"));
// p.put("open",false);
// p.put("checked",false);
// array.add(p);
JSONArray array1 = JSONArray.parseArray("["+l.get("json")+"]");
array1.forEach(a->{
JSONObject o = (JSONObject) a;

View File

@ -82,4 +82,7 @@ public interface TAmentPartyAffairsMapper
List<TAmentPartyAffairs> approveList(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> deptTree(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> importantWork(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> labelTotal(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -82,4 +82,7 @@ public interface ITAmentPartyAffairsService
List<TAmentPartyAffairs> approveList(TAmentPartyAffairs tAmentPartyAffairs);
List<Map<String, Object>> deptTree(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> importantWork(TAmentPartyAffairs tAmentPartyAffairs);
List<TAmentPartyAffairs> labelTotal(TAmentPartyAffairs tAmentPartyAffairs);
}

View File

@ -67,6 +67,15 @@ public class TAmentPartyAffairsServiceImpl implements ITAmentPartyAffairsService
return tAmentPartyAffairsMapper.deptTree(tAmentPartyAffairs);
}
@Override
public List<TAmentPartyAffairs> importantWork(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.importantWork(tAmentPartyAffairs);
}
@Override
public List<TAmentPartyAffairs> labelTotal(TAmentPartyAffairs tAmentPartyAffairs){
return tAmentPartyAffairsMapper.labelTotal(tAmentPartyAffairs);
}
/**
* 新增党务
*

View File

@ -156,6 +156,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
f.type
</select>
<select id="labelTotal" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
SELECT
ROUND( sum(a.now_score) / sum(a.score) * 100 ) percent,
a.shot_name shotName,
a.now_score nowScore,
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM
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
</select>
<select id="importantWork" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
SELECT
ROUND( sum(a.now_score) / sum(a.score) * 100 ) percent,
a.shot_name shotName,
a.now_score nowScore,
b.`name` oprator,
c.`name` reviewer,
d.`name` header,
e.branch_name branch,
f.dept_name deptName
FROM
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 ('党风廉政建设','党务意识形态')
group by a.type,a.shot_name
</select>
<select id="approveList" parameterType="TAmentPartyAffairs" resultMap="TAmentPartyAffairsResult">
SELECT
a.*,