Browse Source

大屏样式调整,"部委支队三率排名"功能添加

master
21819 2 years ago
parent
commit
9f1e8db03b
  1. 25
      mailbox-lan/src/main/java/com/biutag/lan/controller/datascreen/DataScreenController.java
  2. 12
      mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java
  3. 24
      mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java
  4. 85
      mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

25
mailbox-lan/src/main/java/com/biutag/lan/controller/datascreen/DataScreenController.java

@ -75,7 +75,7 @@ public class DataScreenController {
@NotLogin
@GetMapping("/threeRate")
@ApiOperation(value="三率")
@ApiOperation(value="分县市局三率")
public AjaxResult<Map<String, Object>> threeRate(@RequestParam Map<String,String> params) {
Map<String, Object> map =new HashMap<>();
List<Map<String, String>> completeList = new ArrayList<>();
@ -97,6 +97,29 @@ public class DataScreenController {
return AjaxResult.success(map);
}
@NotLogin
@GetMapping("/otherThreeRate")
@ApiOperation(value="部委支队三率")
public AjaxResult<Map<String, Object>> otherThreeRate(@RequestParam Map<String,String> params) {
Map<String, Object> map =new HashMap<>();
List<Map<String, String>> completeList = new ArrayList<>();
List<Map<String, String>> satisfiedList = new ArrayList<>();
List<Map<String, String>> resolvedList = new ArrayList<>();
if(params.size()>0){
String deptId=params.get("id");
completeList = dataScreenService.getOtherStationCompletedRateByDept(deptId);
satisfiedList = dataScreenService.getOtherStationSatisfiedRateByDept(deptId);
resolvedList = dataScreenService.getOtherStationResolvedRateByDept(deptId);
}else{
completeList = dataScreenService.getOtherCompletedRate();
satisfiedList = dataScreenService.getOtherSatisfiedRate();
resolvedList = dataScreenService.getOtherResolvedRate();
}
map.put("completeList",completeList);
map.put("satisfiedList",satisfiedList);
map.put("resolvedList",resolvedList);
return AjaxResult.success(map);
}
@NotLogin
@GetMapping("/mailTrend")

12
mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java

@ -149,4 +149,16 @@ public interface DataScreenMapper extends BaseMapper<Mail> {
//获取流程时长
Map<String,Integer> getDuration(@Param("mailId") String mailId,@Param("flowKey") String flowKey);
List<Map<String, String>> getOtherStationCompletedRateByDept(String deptId);
List<Map<String, String>> getOtherStationSatisfiedRateByDept(String deptId);
List<Map<String, String>> getOtherStationResolvedRateByDept(String deptId);
List<Map<String, String>> getOtherCompletedRate();
List<Map<String, String>> getOtherSatisfiedRate();
List<Map<String, String>> getOtherResolvedRate();
}

24
mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java

@ -297,4 +297,28 @@ public class DataScreenService extends ServiceImpl<DataScreenMapper, Mail> {
mailDetail.setMailFlowList(mailFlowService.listOrderByCreateTimeDesc(mailDetail.getId()));
return mailDetail;
}
public List<Map<String, String>> getOtherStationCompletedRateByDept(String deptId) {
return baseMapper.getOtherStationCompletedRateByDept(deptId);
}
public List<Map<String, String>> getOtherStationSatisfiedRateByDept(String deptId) {
return baseMapper.getOtherStationSatisfiedRateByDept(deptId);
}
public List<Map<String, String>> getOtherStationResolvedRateByDept(String deptId) {
return baseMapper.getOtherStationResolvedRateByDept(deptId);
}
public List<Map<String, String>> getOtherCompletedRate() {
return baseMapper.getOtherCompletedRate();
}
public List<Map<String, String>> getOtherSatisfiedRate() {
return baseMapper.getOtherSatisfiedRate();
}
public List<Map<String, String>> getOtherResolvedRate() {
return baseMapper.getOtherResolvedRate();
}
}

85
mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml

@ -20,22 +20,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select a.name,CONCAT(ROUND(sum(COALESCE(b.completed, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.completed, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.completed, 0)) completed,count(1) sum
from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2'
GROUP BY a.name order by rateNumber desc limit 10
-- from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2'
-- GROUP BY a.name order by rateNumber desc limit 10
from dept a left join mail_mark b on a.id = b.second_dept_id
where ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局'
group by a.name
order by rateNumber desc
</select>
<select id="getResolvedRate" resultType="java.util.Map">
select a.name,
CONCAT(ROUND(sum(COALESCE(b.resolved, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.resolved, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.resolved, 0)) resolved,count(1) sum
from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2'
GROUP BY a.name order by rateNumber desc limit 10
-- from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2'
-- GROUP BY a.name order by rateNumber desc limit 10
from dept a left join mail_mark b on a.id = b.second_dept_id
where ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局'
group by a.name
order by rateNumber desc
</select>
<select id="getSatisfiedRate" resultType="java.util.Map">
select a.name,CONCAT(ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.satisfied, 0)) satisfied,count(1) sum
from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2' GROUP BY a.name order by rateNumber desc limit 10
-- from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2' GROUP BY a.name order by rateNumber desc limit 10
from dept a left join mail_mark b on a.id = b.second_dept_id
where ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局'
group by a.name
order by rateNumber desc
</select>
@ -268,5 +280,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by create_time desc limit 1
</select>
<select id="getOtherStationCompletedRateByDept" resultType="java.util.Map" parameterType="String">
select b.three_dept_name name,CONCAT(ROUND(sum(COALESCE(b.completed, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.completed, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.completed, 0)) completed,count(1) sum
from dept a inner join mail_mark b on a.id=b.second_dept_id where b.second_dept_id=#{deptId}
GROUP BY three_dept_name order by rateNumber desc ,sum desc limit 10
</select>
<select id="getOtherStationResolvedRateByDept" resultType="java.util.Map" parameterType="String">
select b.three_dept_name name,CONCAT(ROUND(sum(COALESCE(b.resolved, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.resolved, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.resolved, 0)) resolved,count(1) sum
from dept a inner join mail_mark b on a.id=b.second_dept_id where b.second_dept_id=#{deptId}
GROUP BY three_dept_name order by rateNumber desc ,sum desc limit 10
</select>
<select id="getOtherStationSatisfiedRateByDept" resultType="java.util.Map" parameterType="String">
select b.three_dept_name name,CONCAT(ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.satisfied, 0)) satisfied,count(1) sum
from dept a inner join mail_mark b on a.id=b.second_dept_id where b.second_dept_id=#{deptId}
GROUP BY three_dept_name order by rateNumber desc ,sum desc limit 10
</select>
<select id="getOtherCompletedRate" resultType="java.util.Map">
select a.name,CONCAT(ROUND(sum(COALESCE(b.completed, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.completed, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.completed, 0)) completed,count(1) sum
-- from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2'
-- GROUP BY a.name order by rateNumber desc limit 10
from dept a left join mail_mark b on a.id = b.second_dept_id
where
a.level = '2' and (((a.category = '3' or a.category = '4')and a.name != '交警支队')
or a.name = '公交分局'
or a.name = '森林公安局')
group by a.name
order by rateNumber desc
</select>
<select id="getOtherResolvedRate" resultType="java.util.Map">
select a.name,
CONCAT(ROUND(sum(COALESCE(b.resolved, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.resolved, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.resolved, 0)) resolved,count(1) sum
-- from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2'
-- GROUP BY a.name order by rateNumber desc limit 10
from dept a left join mail_mark b on a.id = b.second_dept_id
where
a.level = '2' and (((a.category = '3' or a.category = '4')and a.name != '交警支队')
or a.name = '公交分局'
or a.name = '森林公安局')
group by a.name
order by rateNumber desc
</select>
<select id="getOtherSatisfiedRate" resultType="java.util.Map">
select a.name,CONCAT(ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0),'%') rate,
ROUND(sum(COALESCE(b.satisfied, 0))*100/count(1),0) rateNumber,
SUM(COALESCE(b.satisfied, 0)) satisfied,count(1) sum
-- from dept a left join mail_mark b on a.id=b.second_dept_id where a.category='2' GROUP BY a.name order by rateNumber desc limit 10
from dept a left join mail_mark b on a.id = b.second_dept_id
where
a.level = '2' and (((a.category = '3' or a.category = '4')and a.name != '交警支队')
or a.name = '公交分局'
or a.name = '森林公安局')
group by a.name
order by rateNumber desc
</select>
</mapper>

Loading…
Cancel
Save