Commit 2d15c1cdfd8562006100ea706010032a272fbaf6

Authored by youxiw2000
1 parent ded4a1fe

m

trash-ui/src/api/casefile/replyApprovalProcess.js
... ... @@ -9,6 +9,7 @@ export function listReplyApprovalProcess(query) {
9 9 })
10 10 }
11 11  
  12 +
12 13 // 查询回复审批流程详细
13 14 export function getReplyApprovalProcess(id) {
14 15 return request({
... ...
trash-ui/src/api/casefile/violationCaseFile.js
... ... @@ -9,6 +9,16 @@ export function listViolationCaseFile(query) {
9 9 })
10 10 }
11 11  
  12 +// 查询回复审批流程列表
  13 +export function caseTable(query) {
  14 + return request({
  15 + url: '/casefile/violationCaseFile/caseTable',
  16 + method: 'get',
  17 + params: query
  18 + })
  19 +}
  20 +
  21 +
12 22 // 查询平台违规案卷详细
13 23 export function getViolationCaseFile(id) {
14 24 return request({
... ...
trash-ui/src/router/index.js
... ... @@ -213,7 +213,14 @@ export const constantRoutes = [
213 213 component: (resolve) => require(['@/views/caseOffline/caseOffline'], resolve),
214 214 name: '手动案卷',
215 215 meta: { title: '手动案卷' }
216   - }, {
  216 + },
  217 + {
  218 + path: 'casefileTable',
  219 + component: (resolve) => require(['@/views/casefile/violationCaseFile/violationCaseTable'], resolve),
  220 + name: '平台案卷统计',
  221 + meta: { title: '平台案卷统计' }
  222 + },
  223 + {
217 224 path: 'sitePaper',
218 225 component: (resolve) => require(['@/views/activiti/task/constructsiteInfo'], resolve),
219 226 name: '手工签字',
... ...
trash-ui/src/views/casefile/violationCaseFile/violationCaseTable.vue 0 → 100644
  1 +<template>
  2 + <el-table :data="tableData" :span-method="spanMethod" show-summary="true" :summary-method="getSummaries">
  3 + <el-table-column label="行政范围" header-align="center" align="center" >
  4 + <template slot-scope="scope">
  5 + 长沙市
  6 + </template>
  7 + </el-table-column>
  8 + <el-table-column property="type" label="案卷类型" header-align="center" align="center"></el-table-column>
  9 + <el-table-column property="count" label="违规案卷数" header-align="center" align="center"></el-table-column>
  10 + <el-table-column property="repCount" label="违规案卷回复数" header-align="center" align="center"></el-table-column>
  11 + <el-table-column property="repPct" label="违规案卷回复率" header-align="center" align="center"></el-table-column>
  12 + </el-table>
  13 +</template>
  14 +
  15 +<script>
  16 +
  17 +import {caseTable} from "@/api/casefile/violationCaseFile";
  18 +export default {
  19 + name: "caseTable",
  20 + props: {
  21 + },
  22 + data() {
  23 + return {
  24 + tableData:[],
  25 + }
  26 + },
  27 + created() {
  28 + caseTable().then(res=>{
  29 +
  30 + this.tableData = res.data;
  31 +
  32 + });
  33 + },
  34 + methods:{
  35 + spanMethod({ row, column, rowIndex, columnIndex }) {
  36 + if(columnIndex == 0) {
  37 + if(rowIndex == 0){
  38 + return {rowspan:300 , colspan:1}
  39 + }else{
  40 + return {rowspan:0 , colspan:0}
  41 + }
  42 + }
  43 + },
  44 + getSummaries(param){
  45 + const { columns, data } = param;
  46 + const sums = [];
  47 +
  48 + let allCount = 0;
  49 + let allRepCount = 0;
  50 + for(let i in data){
  51 +
  52 + allCount += Number(data[i].count );
  53 + allRepCount += Number(data[i].repCount );
  54 +
  55 + }
  56 +
  57 + columns.forEach((column, index) => {
  58 + if (index == 0 || index == 1) {
  59 + return;
  60 + }
  61 +
  62 + if(index == 2){
  63 + sums[2] = allCount;
  64 + }
  65 +
  66 + if(index == 3){
  67 + sums[3] = allRepCount;
  68 + }
  69 +
  70 + if(index == 4){
  71 + sums[4] = ((allRepCount/allCount)*100 ).toFixed(2)+ "%";
  72 + }
  73 + })
  74 +
  75 + return sums;
  76 + },
  77 +
  78 + }
  79 +}
  80 +</script>
  81 +
  82 +<style scoped>
  83 +
  84 +</style>
... ...
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationCaseFileController.java
... ... @@ -2,7 +2,9 @@ package com.trash.casefile.controller;
2 2  
3 3 import java.io.IOException;
4 4 import java.util.ArrayList;
  5 +import java.util.HashMap;
5 6 import java.util.List;
  7 +import java.util.Map;
6 8  
7 9 import com.alibaba.fastjson.JSON;
8 10 import com.trash.casefile.domain.ViolationWarningInformation;
... ... @@ -122,6 +124,63 @@ public class ViolationCaseFileController extends BaseController
122 124 }
123 125  
124 126  
  127 + String[] caseType = {"进入非专用车辆","无许可手续(工)","无许可手续(消)","黄土覆盖情况","出入口路面污染","出入口道路硬化","车辆冲洗是否到位",
  128 + "雾炮机是否正常开启","使用费专用车运输","监控点位未对准","未报开工作业","视频设备离线超时报警","三无车辆进入工地","未按时间作业",
  129 + "未报开工作业","视频设备离线超时报警","三无车辆进入消纳场","未到指定的消纳场作业","离线运输报警(工)","离线运输报警(消)","未激活车辆作业",
  130 + "未核准作业车辆作业","未按线路行驶","闯禁行驶","失信车辆作业","其他1","其他2","其他3","其他4","其他5"};
  131 +
  132 + @GetMapping(value = "/caseTable")
  133 + public AjaxResult getTable(){
  134 + List<HashMap<String, String>> maps = new ArrayList<HashMap<String,String>>();
  135 +
  136 +
  137 +
  138 + List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileList(new ViolationCaseFile());
  139 +
  140 + for(String type:caseType){
  141 +
  142 + HashMap<String, String> map = new HashMap<>();
  143 +
  144 + map.put("type", type);
  145 +
  146 + int count = 0;
  147 + int repCount = 0;
  148 +
  149 + for(ViolationCaseFile file:list){
  150 + if(type.equals(file.getViolationType())){
  151 + count +=1;
  152 + if(file.getReadBy() != null && !file.getReadBy().isEmpty()){
  153 + repCount += 1;
  154 + }
  155 +
  156 + }
  157 +
  158 +
  159 + }
  160 +
  161 + map.put("count", count + "");
  162 + map.put("repCount", repCount + "");
  163 +
  164 + if(count == 0){
  165 + double pct = ((double)repCount)/((double)count);
  166 + map.put("repPct","0%");
  167 + maps.add(map);
  168 + }else{
  169 + double pct = ((double)repCount)/((double)count);
  170 + map.put("repPct",(pct*100) + "%");
  171 + maps.add(map);
  172 + }
  173 +
  174 +
  175 +
  176 + }
  177 +
  178 +
  179 +
  180 + return AjaxResult.success(maps);
  181 + }
  182 +
  183 +
125 184  
126 185  
127 186 /**
... ...