diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/datascreen/DataScreenController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/datascreen/DataScreenController.java index c3b5f68..27e87cf 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/datascreen/DataScreenController.java +++ b/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> threeRate(@RequestParam Map params) { Map map =new HashMap<>(); List> completeList = new ArrayList<>(); @@ -97,6 +97,29 @@ public class DataScreenController { return AjaxResult.success(map); } + @NotLogin + @GetMapping("/otherThreeRate") + @ApiOperation(value="部委支队三率") + public AjaxResult> otherThreeRate(@RequestParam Map params) { + Map map =new HashMap<>(); + List> completeList = new ArrayList<>(); + List> satisfiedList = new ArrayList<>(); + List> 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") diff --git a/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java b/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java index f635503..a474dbc 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataScreenMapper.java @@ -149,4 +149,16 @@ public interface DataScreenMapper extends BaseMapper { //获取流程时长 Map getDuration(@Param("mailId") String mailId,@Param("flowKey") String flowKey); + + List> getOtherStationCompletedRateByDept(String deptId); + + List> getOtherStationSatisfiedRateByDept(String deptId); + + List> getOtherStationResolvedRateByDept(String deptId); + + List> getOtherCompletedRate(); + + List> getOtherSatisfiedRate(); + + List> getOtherResolvedRate(); } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java index 3077d97..c32158a 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/DataScreenService.java @@ -297,4 +297,28 @@ public class DataScreenService extends ServiceImpl { mailDetail.setMailFlowList(mailFlowService.listOrderByCreateTimeDesc(mailDetail.getId())); return mailDetail; } + + public List> getOtherStationCompletedRateByDept(String deptId) { + return baseMapper.getOtherStationCompletedRateByDept(deptId); + } + + public List> getOtherStationSatisfiedRateByDept(String deptId) { + return baseMapper.getOtherStationSatisfiedRateByDept(deptId); + } + + public List> getOtherStationResolvedRateByDept(String deptId) { + return baseMapper.getOtherStationResolvedRateByDept(deptId); + } + + public List> getOtherCompletedRate() { + return baseMapper.getOtherCompletedRate(); + } + + public List> getOtherSatisfiedRate() { + return baseMapper.getOtherSatisfiedRate(); + } + + public List> getOtherResolvedRate() { + return baseMapper.getOtherResolvedRate(); + } } diff --git a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml b/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml index f191e2c..fae4f1e 100644 --- a/mailbox-lan/src/main/resources/mapper/DataScreenMapper.xml +++ b/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 @@ -268,5 +280,68 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by create_time desc limit 1 + + + + + +