Commit 19895dc8da9a17be431997d62425775cbb6162db

Authored by youxiw2000
1 parent d664ddbb

m

Showing 38 changed files with 1228 additions and 204 deletions
trash-admin/src/main/resources/application-dev.yml
@@ -17,8 +17,8 @@ trash: @@ -17,8 +17,8 @@ trash:
17 # 验证码类型 math 数组计算 char 字符验证 17 # 验证码类型 math 数组计算 char 字符验证
18 captchaType: math 18 captchaType: math
19 # 远程服务器地址 19 # 远程服务器地址
20 - #remotePath: https://175.6.47.84:8008  
21 - #token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJkdXJhYmxlIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg1NDE2NjEzMzU1fQ.58-J0KKfsK2pQhDQAzaBaUj-oFWMbYF1YzMAcshmcfidIkW16TZWIVhAVKPvCJvWfG54x7xB-ETxKCDLFnSctQ 20 + # remotePath: http://175.6.47.84:8008
  21 + # token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJkdXJhYmxlIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg1NDE2NjEzMzU1fQ.58-J0KKfsK2pQhDQAzaBaUj-oFWMbYF1YzMAcshmcfidIkW16TZWIVhAVKPvCJvWfG54x7xB-ETxKCDLFnSctQ
22 remotePath: http://183.66.242.6:14601 22 remotePath: http://183.66.242.6:14601
23 token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w 23 token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w
24 24
trash-admin/src/main/resources/application.yml
@@ -8,7 +8,7 @@ logging: @@ -8,7 +8,7 @@ logging:
8 spring: 8 spring:
9 #kafka配置 9 #kafka配置
10 kafka: 10 kafka:
11 - bootstrap-servers: 183.66.242.6:9101 11 + bootstrap-servers: 183.66.242.6:14605
12 listener: 12 listener:
13 ack-mode: manual_immediate 13 ack-mode: manual_immediate
14 missing-topics-fatal: false 14 missing-topics-fatal: false
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
@@ -1048,6 +1048,149 @@ public class RemoteServerUtils { @@ -1048,6 +1048,149 @@ public class RemoteServerUtils {
1048 } 1048 }
1049 return null; 1049 return null;
1050 } 1050 }
  1051 +
  1052 +
  1053 + public static boolean delayUpCase(Map map) {
  1054 + if (okHttpClient == null) {
  1055 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  1056 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
  1057 + }
  1058 +
  1059 +
  1060 + String param = JSON.toJSON(map).toString();
  1061 +
  1062 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  1063 +
  1064 + Request request = new Request.Builder().url(upUrl + "/api/thirdApi/push/delayApply")
  1065 + .addHeader("Authorization", getUpUser()).post(body).build();
  1066 +
  1067 + try {
  1068 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  1069 + String result = response.body().string();
  1070 +
  1071 + if (result != null) {
  1072 + JSONObject json = JSON.parseObject(result);
  1073 + if (json.getBoolean("success")) {
  1074 + return json.getBoolean("success");
  1075 + }
  1076 + } else {
  1077 + return false;
  1078 + }
  1079 +
  1080 + } catch (Exception e) {
  1081 + e.printStackTrace();
  1082 + return false;
  1083 + }
  1084 + return false;
  1085 + }
  1086 +
  1087 +
  1088 + public static boolean deleteUpCase(Map map) {
  1089 + if (okHttpClient == null) {
  1090 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  1091 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
  1092 + }
  1093 +
  1094 +
  1095 + String param = JSON.toJSON(map).toString();
  1096 +
  1097 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  1098 +
  1099 + Request request = new Request.Builder().url(upUrl + "/api/thirdApi/push/rollbackApply")
  1100 + .addHeader("Authorization", getUpUser()).post(body).build();
  1101 +
  1102 + try {
  1103 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  1104 + String result = response.body().string();
  1105 +
  1106 + if (result != null) {
  1107 + JSONObject json = JSON.parseObject(result);
  1108 + if (json.getBoolean("success")) {
  1109 + return json.getBoolean("success");
  1110 + }
  1111 + } else {
  1112 + return false;
  1113 + }
  1114 +
  1115 + } catch (Exception e) {
  1116 + e.printStackTrace();
  1117 + return false;
  1118 + }
  1119 + return false;
  1120 + }
  1121 +
  1122 +
  1123 +
  1124 + public static JSONArray getUpCaseResult() {
  1125 + if (okHttpClient == null) {
  1126 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  1127 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
  1128 + }
  1129 +
  1130 + Map map = new HashMap<>();
  1131 +
  1132 + String param = JSON.toJSON(map).toString();
  1133 +
  1134 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  1135 +
  1136 + Request request = new Request.Builder().url(upUrl + "/api/thirdApi/query/handleResultList")
  1137 + .addHeader("Authorization", getUpUser()).post(body).build();
  1138 +
  1139 + try {
  1140 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  1141 + String result = response.body().string();
  1142 +
  1143 + if (result != null) {
  1144 + JSONObject json = JSON.parseObject(result);
  1145 + if (json.getBoolean("success")) {
  1146 + return json.getJSONArray("data");
  1147 + }
  1148 + } else {
  1149 + return null;
  1150 + }
  1151 +
  1152 + } catch (Exception e) {
  1153 + e.printStackTrace();
  1154 + return null;
  1155 + }
  1156 + return null;
  1157 +}
  1158 +
  1159 + public static JSONArray getUpCaseState(String url) {
  1160 + if (okHttpClient == null) {
  1161 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  1162 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
  1163 + }
  1164 +
  1165 + Map map = new HashMap<>();
  1166 +
  1167 + String param = JSON.toJSON(map).toString();
  1168 +
  1169 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  1170 +
  1171 + Request request = new Request.Builder().url(upUrl + url)
  1172 + .addHeader("Authorization", getUpUser()).post(body).build();
  1173 +
  1174 + try {
  1175 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  1176 + String result = response.body().string();
  1177 +
  1178 + if (result != null) {
  1179 + JSONObject json = JSON.parseObject(result);
  1180 + if (json.getBoolean("success")) {
  1181 + return json.getJSONArray("data");
  1182 + }
  1183 + } else {
  1184 + return null;
  1185 + }
  1186 +
  1187 + } catch (Exception e) {
  1188 + e.printStackTrace();
  1189 + return null;
  1190 + }
  1191 + return null;
  1192 + }
  1193 +
1051 1194
1052 public static JSONArray getCaseList() { 1195 public static JSONArray getCaseList() {
1053 if (okHttpClient == null) { 1196 if (okHttpClient == null) {
@@ -1089,4 +1232,6 @@ public class RemoteServerUtils { @@ -1089,4 +1232,6 @@ public class RemoteServerUtils {
1089 return get(GETAUTH, null, token.replace("Bearer ", "")); 1232 return get(GETAUTH, null, token.replace("Bearer ", ""));
1090 } 1233 }
1091 1234
  1235 +
  1236 +
1092 } 1237 }
trash-framework/src/main/java/com/trash/framework/web/service/SysLoginService.java
@@ -204,6 +204,8 @@ public class SysLoginService @@ -204,6 +204,8 @@ public class SysLoginService
204 204
205 205
206 JSONArray compnayList = redisCache.getCacheObject("companyList"); 206 JSONArray compnayList = redisCache.getCacheObject("companyList");
  207 +
  208 +
207 for(Object obj:compnayList){ 209 for(Object obj:compnayList){
208 JSONObject con = (JSONObject) obj; 210 JSONObject con = (JSONObject) obj;
209 211
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
@@ -12,8 +12,11 @@ import java.util.Date; @@ -12,8 +12,11 @@ import java.util.Date;
12 import java.util.HashMap; 12 import java.util.HashMap;
13 import java.util.List; 13 import java.util.List;
14 import java.util.Map; 14 import java.util.Map;
  15 +import java.util.concurrent.TimeUnit;
15 import java.util.stream.Collectors; 16 import java.util.stream.Collectors;
16 17
  18 +import javax.swing.Spring;
  19 +
17 import org.springframework.beans.BeansException; 20 import org.springframework.beans.BeansException;
18 import org.springframework.beans.factory.annotation.Autowired; 21 import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.stereotype.Component; 22 import org.springframework.stereotype.Component;
@@ -22,6 +25,7 @@ import org.springframework.web.multipart.MultipartFile; @@ -22,6 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
22 import com.alibaba.fastjson.JSONArray; 25 import com.alibaba.fastjson.JSONArray;
23 import com.alibaba.fastjson.JSONObject; 26 import com.alibaba.fastjson.JSONObject;
24 import com.google.gson.Gson; 27 import com.google.gson.Gson;
  28 +import com.google.gson.JsonObject;
25 import com.google.gson.reflect.TypeToken; 29 import com.google.gson.reflect.TypeToken;
26 import com.trash.activiti.service.IActTaskService; 30 import com.trash.activiti.service.IActTaskService;
27 import com.trash.business.domain.CompanyCredit; 31 import com.trash.business.domain.CompanyCredit;
@@ -38,15 +42,18 @@ import com.trash.business.service.ITruckCreditService; @@ -38,15 +42,18 @@ import com.trash.business.service.ITruckCreditService;
38 import com.trash.caseOffline.domain.CaseOffline; 42 import com.trash.caseOffline.domain.CaseOffline;
39 import com.trash.caseOffline.mapper.CaseOfflineMapper; 43 import com.trash.caseOffline.mapper.CaseOfflineMapper;
40 import com.trash.casefile.domain.KafkaCompensation; 44 import com.trash.casefile.domain.KafkaCompensation;
  45 +import com.trash.casefile.domain.ReplyApprovalProcess;
41 import com.trash.casefile.domain.ViolationCaseFile; 46 import com.trash.casefile.domain.ViolationCaseFile;
42 import com.trash.casefile.kafka.Consumer; 47 import com.trash.casefile.kafka.Consumer;
43 import com.trash.casefile.mapper.KafkaCompensationMapper; 48 import com.trash.casefile.mapper.KafkaCompensationMapper;
  49 +import com.trash.casefile.mapper.ReplyApprovalProcessMapper;
44 import com.trash.casefile.mapper.ViolationCaseFileMapper; 50 import com.trash.casefile.mapper.ViolationCaseFileMapper;
45 import com.trash.casefile.service.IViolationCaseFileService; 51 import com.trash.casefile.service.IViolationCaseFileService;
46 import com.trash.common.config.trashConfig; 52 import com.trash.common.config.trashConfig;
47 import com.trash.common.core.redis.RedisCache; 53 import com.trash.common.core.redis.RedisCache;
48 import com.trash.common.utils.LogUtils; 54 import com.trash.common.utils.LogUtils;
49 import com.trash.common.utils.RemoteServerUtils; 55 import com.trash.common.utils.RemoteServerUtils;
  56 +import com.trash.common.utils.SecurityUtils;
50 import com.trash.common.utils.file.FileUploadUtils; 57 import com.trash.common.utils.file.FileUploadUtils;
51 import com.trash.common.utils.spring.SpringUtils; 58 import com.trash.common.utils.spring.SpringUtils;
52 import com.trash.office.domain.LogisticsManagement; 59 import com.trash.office.domain.LogisticsManagement;
@@ -74,20 +81,13 @@ public class DriverTask { @@ -74,20 +81,13 @@ public class DriverTask {
74 private RedisCache redisCache; 81 private RedisCache redisCache;
75 82
76 public void getUpCase(){ 83 public void getUpCase(){
77 -  
78 -  
79 JSONArray array = RemoteServerUtils.getCaseList(); 84 JSONArray array = RemoteServerUtils.getCaseList();
80 -  
81 Map map = new HashMap<>(); 85 Map map = new HashMap<>();
82 List<String> ids = new ArrayList<String>(); 86 List<String> ids = new ArrayList<String>();
83 87
84 -  
85 if(array != null && array.size() > 0){ 88 if(array != null && array.size() > 0){
86 for(Object object:array){ 89 for(Object object:array){
87 JSONObject json = (JSONObject) object; 90 JSONObject json = (JSONObject) object;
88 -  
89 -  
90 -  
91 try { 91 try {
92 ViolationCaseFile caseFile = new ViolationCaseFile(json); 92 ViolationCaseFile caseFile = new ViolationCaseFile(json);
93 93
@@ -107,18 +107,6 @@ public class DriverTask { @@ -107,18 +107,6 @@ public class DriverTask {
107 107
108 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile); 108 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile);
109 109
110 - int i = 0;  
111 - //根据发送对象判断流程  
112 - if(caseFile.getSendObject().equals("区管理部门")){  
113 -  
114 - if(caseFile.getViolationGrade().equals("一般类")){  
115 - i = 1;  
116 - }else{  
117 - i = 2;  
118 - }  
119 - }  
120 -  
121 - SpringUtils.getBean(IWorkflowService.class).createCaseFileByTask(caseFile,i);  
122 110
123 ids.add(caseFile.getId()); 111 ids.add(caseFile.getId());
124 112
@@ -131,13 +119,118 @@ public class DriverTask { @@ -131,13 +119,118 @@ public class DriverTask {
131 119
132 map.put("taskIds", ids); 120 map.put("taskIds", ids);
133 map.put("taskType", "Q2"); 121 map.put("taskType", "Q2");
134 -  
135 RemoteServerUtils.updateUpCase(map); 122 RemoteServerUtils.updateUpCase(map);
  123 + }
  124 +
  125 +
  126 +
  127 + }
  128 +
  129 + public void getUpCaseState(){
  130 +
  131 +
  132 +
  133 + getCaseStateIntoDB("/api/thirdApi/query/urgeList","urgeUser","urgeDesc","urgeTime","Q5");
  134 +
  135 + getCaseStateIntoDB("/api/thirdApi/query/superviseList","supUser","supDesc","supTime","Q4");
  136 +
  137 +
  138 + JSONArray array = RemoteServerUtils.getUpCaseResult();
  139 + Map map = new HashMap<>();
  140 + List<String> ids = new ArrayList<String>();
  141 +
  142 + if(array != null && array.size() > 0){
  143 + for(Object object:array){
  144 + JSONObject json = (JSONObject) object;
  145 +
  146 + ViolationCaseFile casefile = SpringUtils.getBean(ViolationCaseFileMapper.class).selectViolationCaseFileById(json.getString("thirdCaseId"));
  147 +
  148 + if(casefile == null){
  149 + continue;
  150 + }else{
  151 +
  152 + Date d = new Date(json.getString("reportTime"));
  153 +
  154 + ids.add(json.getString("acceptId"));
  155 +
  156 + ReplyApprovalProcess rap = new ReplyApprovalProcess();
  157 + rap.setTableName("workflow_casefile:"+json.getString("thirdCaseId"));
  158 + rap.setReplyPeople("综管服");
  159 + rap.setReply(json.getString("replyContent"));
  160 + rap.setReplyTime(new Date(json.getString("handleTime")));
  161 +
  162 + JSONArray images = json.getJSONArray("attchList");
  163 + String path = "";
  164 + try{
  165 + for(Object obj:images){
  166 + JSONObject img = (JSONObject) obj;
  167 + path += img.getString("attchFilePath") + ",";
  168 + }
  169 + }catch(Exception e){
  170 + e.printStackTrace();
  171 + }
  172 + rap.setReplyImg(path.substring(0, path.length()-1));
  173 + }
  174 + }
  175 +
136 176
  177 + map.put("taskIds", ids);
  178 + map.put("taskType", "Q1");
  179 + RemoteServerUtils.updateUpCase(map);
137 } 180 }
138 181
  182 +
139 183
  184 + }
  185 +
  186 + private void getCaseStateIntoDB(String url,String arg0,String arg1,String arg2,String type) {
  187 + try{
140 188
  189 + JSONArray array = RemoteServerUtils.getUpCaseState(url);
  190 + Map map = new HashMap<>();
  191 + List<String> ids = new ArrayList<String>();
  192 +
  193 + if(array != null && array.size() > 0){
  194 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  195 + for(Object object:array){
  196 + JSONObject json = (JSONObject) object;
  197 +
  198 + ViolationCaseFile caseFile = new ViolationCaseFile();
  199 +
  200 + caseFile.setNumber(json.getString("evtId"));
  201 +
  202 + List<ViolationCaseFile> list = SpringUtils.getBean(ViolationCaseFileMapper.class).selectViolationCaseFileList(caseFile);
  203 +
  204 + if(list.size() == 0){
  205 + continue;
  206 + }
  207 +
  208 + ReplyApprovalProcess rap = new ReplyApprovalProcess();
  209 + rap.setTableName("workflow_casefile:"+list.get(0).getId());
  210 + rap.setReplyPeople(json.getString(arg0));
  211 + rap.setReply(json.getString(arg1));
  212 + try {
  213 + rap.setReplyTime(sdf.parse(json.getString(arg2)));
  214 + } catch (ParseException e) {
  215 +
  216 + rap.setReplyTime(new Date());
  217 +
  218 + e.printStackTrace();
  219 + }
  220 +
  221 + SpringUtils.getBean(ReplyApprovalProcessMapper.class).insertReplyApprovalProcess(rap);
  222 +
  223 + ids.add(json.getString("taskId"));
  224 + }
  225 +
  226 + map.put("taskIds", ids);
  227 + map.put("taskType", type);
  228 + RemoteServerUtils.updateUpCase(map);
  229 + }
  230 +
  231 + }catch(Exception e){
  232 + e.printStackTrace();
  233 + }
141 } 234 }
142 235
143 236
@@ -408,18 +501,28 @@ public class DriverTask { @@ -408,18 +501,28 @@ public class DriverTask {
408 d.setMinutes(59); 501 d.setMinutes(59);
409 d.setSeconds(59); 502 d.setSeconds(59);
410 503
411 - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");  
412 try{ 504 try{
413 list = list.parallelStream().filter(p->{ 505 list = list.parallelStream().filter(p->{
414 - if(p.getString("createAt") == null)  
415 - return false;  
416 - try {  
417 - return d.getTime() < simpleDateFormat.parse(p.getString("createAt")).getTime();  
418 - } catch (ParseException e) {  
419 - // TODO Auto-generated catch block 506 +
  507 + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  508 + String editTime = p.getString("editedAt");
  509 + String createdTime = p.getString("createdAt");
  510 + long newTime = 0;
  511 + try{
  512 + if(editTime == null){
  513 + if(createdTime == null){
  514 + return false;
  515 + }else{
  516 + newTime = simpleDateFormat.parse(p.getString("createdAt")).getTime();
  517 + }
  518 + }else{
  519 + newTime = simpleDateFormat.parse(p.getString("editedAt")).getTime();
  520 + }
  521 + }catch(Exception e){
420 e.printStackTrace(); 522 e.printStackTrace();
421 } 523 }
422 - return false; 524 + return d.getTime() < newTime;
  525 +
423 }).collect(Collectors.toList()); 526 }).collect(Collectors.toList());
424 }catch(Exception e){ 527 }catch(Exception e){
425 e.printStackTrace(); 528 e.printStackTrace();
@@ -701,7 +804,9 @@ public class DriverTask { @@ -701,7 +804,9 @@ public class DriverTask {
701 map.put("size", 99999); 804 map.put("size", 99999);
702 map.put("page", 1); 805 map.put("page", 1);
703 JSONArray jsonArray = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); 806 JSONArray jsonArray = RemoteServerUtils.getCompanyList(map, trashConfig.getToken());
704 - redisCache.setCacheObject("companyList", jsonArray); 807 + if(jsonArray != null){
  808 + redisCache.setCacheObject("companyList", jsonArray,60,TimeUnit.MINUTES);
  809 + }
705 } 810 }
706 811
707 public void getContractList() { 812 public void getContractList() {
@@ -714,7 +819,9 @@ public class DriverTask { @@ -714,7 +819,9 @@ public class DriverTask {
714 map.put("contractStatus", 1); 819 map.put("contractStatus", 1);
715 map.put("auditStatus", 1); 820 map.put("auditStatus", 1);
716 JSONArray jsonArray = RemoteServerUtils.getContractList(map, trashConfig.getToken()); 821 JSONArray jsonArray = RemoteServerUtils.getContractList(map, trashConfig.getToken());
717 - redisCache.setCacheObject("contractList", jsonArray); 822 + if(jsonArray != null){
  823 + redisCache.setCacheObject("contractList", jsonArray,60,TimeUnit.MINUTES);
  824 + }
718 } 825 }
719 826
720 /** 827 /**
@@ -728,7 +835,9 @@ public class DriverTask { @@ -728,7 +835,9 @@ public class DriverTask {
728 map.put("size", 99999); 835 map.put("size", 99999);
729 map.put("page", 1); 836 map.put("page", 1);
730 JSONArray jsonArray = RemoteServerUtils.getConstructionList(map, trashConfig.getToken()); 837 JSONArray jsonArray = RemoteServerUtils.getConstructionList(map, trashConfig.getToken());
731 - redisCache.setCacheObject("constructionList", jsonArray); 838 + if(jsonArray != null){
  839 + redisCache.setCacheObject("constructionList", jsonArray,60,TimeUnit.MINUTES);
  840 + }
732 } 841 }
733 842
734 /** 843 /**
@@ -742,7 +851,9 @@ public class DriverTask { @@ -742,7 +851,9 @@ public class DriverTask {
742 map.put("size", 99999); 851 map.put("size", 99999);
743 map.put("page", 1); 852 map.put("page", 1);
744 JSONArray jsonArray = RemoteServerUtils.getEarthSitesList(map, trashConfig.getToken()); 853 JSONArray jsonArray = RemoteServerUtils.getEarthSitesList(map, trashConfig.getToken());
745 - redisCache.setCacheObject("earthSitesList", jsonArray); 854 + if(jsonArray != null){
  855 + redisCache.setCacheObject("earthSitesList", jsonArray,60,TimeUnit.MINUTES);
  856 + }
746 } 857 }
747 858
748 /** 859 /**
@@ -758,7 +869,9 @@ public class DriverTask { @@ -758,7 +869,9 @@ public class DriverTask {
758 map.put("page", 1); 869 map.put("page", 1);
759 870
760 JSONArray jsonArray = RemoteServerUtils.getTruckList(map, trashConfig.getToken()); 871 JSONArray jsonArray = RemoteServerUtils.getTruckList(map, trashConfig.getToken());
761 - redisCache.setCacheObject("truckList", jsonArray); 872 + if(jsonArray != null){
  873 + redisCache.setCacheObject("truckList", jsonArray,60,TimeUnit.MINUTES);
  874 + }
762 } 875 }
763 876
764 /** 877 /**
@@ -772,6 +885,8 @@ public class DriverTask { @@ -772,6 +885,8 @@ public class DriverTask {
772 map.put("size", 99999); 885 map.put("size", 99999);
773 map.put("page", 1); 886 map.put("page", 1);
774 JSONArray jsonArray = RemoteServerUtils.getAreas(trashConfig.getToken()); 887 JSONArray jsonArray = RemoteServerUtils.getAreas(trashConfig.getToken());
775 - redisCache.setCacheObject("areaList", jsonArray); 888 + if(jsonArray != null){
  889 + redisCache.setCacheObject("areaList", jsonArray,60,TimeUnit.MINUTES);
  890 + }
776 } 891 }
777 } 892 }
trash-ui/dist.7z 0 → 100644
No preview for this file type
trash-ui/dist.zip deleted 100644 → 0
No preview for this file type
trash-ui/package.json
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 "axios": "0.18.1", 45 "axios": "0.18.1",
46 "clipboard": "2.0.4", 46 "clipboard": "2.0.4",
47 "core-js": "^3.30.0", 47 "core-js": "^3.30.0",
48 - "echarts": "4.2.1", 48 + "echarts": "^4.2.1",
49 "element-ui": "2.13.2", 49 "element-ui": "2.13.2",
50 "file-saver": "2.0.1", 50 "file-saver": "2.0.1",
51 "fuse.js": "3.4.4", 51 "fuse.js": "3.4.4",
trash-ui/src/api/casefile/violationCaseFile.js
@@ -34,8 +34,23 @@ export function addViolationCaseFile(data) { @@ -34,8 +34,23 @@ export function addViolationCaseFile(data) {
34 method: 'post', 34 method: 'post',
35 data: data 35 data: data
36 }) 36 })
37 -} 37 +}
38 38
  39 +export function deleteUpCase(data) {
  40 + return request({
  41 + url: '/casefile/violationCaseFile/deleteUpCase',
  42 + method: 'post',
  43 + data: data
  44 + })
  45 +}
  46 +
  47 +export function delayUpCase(data) {
  48 + return request({
  49 + url: '/casefile/violationCaseFile/delayUpCase',
  50 + method: 'post',
  51 + data: data
  52 + })
  53 +}
39 // 修改平台违规案卷 54 // 修改平台违规案卷
40 export function updateViolationCaseFile(data) { 55 export function updateViolationCaseFile(data) {
41 return request({ 56 return request({
trash-ui/src/api/casefile/violationWarningInformation.js
@@ -16,7 +16,16 @@ export function caseTable(query) { @@ -16,7 +16,16 @@ export function caseTable(query) {
16 method: 'get', 16 method: 'get',
17 params: query 17 params: query
18 }) 18 })
19 -} 19 +}
  20 +
  21 +export function getEVTable(query) {
  22 + return request({
  23 + url: '/casefile/violationWarningInformation/getEVTable',
  24 + method: 'get',
  25 + params: query
  26 + })
  27 +}
  28 +
20 29
21 // 查询违规预警信息详细 30 // 查询违规预警信息详细
22 export function getViolationWarningInformation(id) { 31 export function getViolationWarningInformation(id) {
trash-ui/src/api/taskmethod.js
@@ -474,7 +474,6 @@ export default { @@ -474,7 +474,6 @@ export default {
474 } 474 }
475 475
476 if (this.definitionKey == "workflow_casefile") { 476 if (this.definitionKey == "workflow_casefile") {
477 - this.modalLoading = true;  
478 let postData = {}; 477 let postData = {};
479 478
480 postData.tableName = this.businessKey; 479 postData.tableName = this.businessKey;
@@ -488,11 +487,17 @@ export default { @@ -488,11 +487,17 @@ export default {
488 } 487 }
489 } 488 }
490 if (this.taskName == "车辆所属企业" || this.taskName == "渣土办科员") { 489 if (this.taskName == "车辆所属企业" || this.taskName == "渣土办科员") {
491 - console.log(this.businessKey); 490 + if(this.taskName == "渣土办科员" && (postData.replyImg == "" || !postData.replyImg || postData.replyImg == "undefined")){
  491 + this.$message("请上传处置附件!")
  492 + return;
  493 + }
492 let objId = this.businessKey.split(":")[1]; 494 let objId = this.businessKey.split(":")[1];
493 updateViolationCaseFileReader({id: objId}).then(res => { 495 updateViolationCaseFileReader({id: objId}).then(res => {
494 }) 496 })
495 } 497 }
  498 +
  499 + this.modalLoading = true;
  500 +
496 addReplyApprovalProcess(postData).then(res => { 501 addReplyApprovalProcess(postData).then(res => {
497 this.videoSrc1 = []; 502 this.videoSrc1 = [];
498 this.slides1 = []; 503 this.slides1 = [];
trash-ui/src/api/track.js
@@ -292,22 +292,6 @@ export default { @@ -292,22 +292,6 @@ export default {
292 this.single = selection.length !== 1 292 this.single = selection.length !== 1
293 this.multiple = !selection.length 293 this.multiple = !selection.length
294 }, 294 },
295 - /** 新增按钮操作 */  
296 - handleAdd() {  
297 - this.reset();  
298 - this.open = true;  
299 - this.title = "添加跟踪监督";  
300 - },  
301 - /** 修改按钮操作 */  
302 - handleUpdate(row) {  
303 - this.reset();  
304 - const id = row.id || this.ids  
305 - getTrack(id).then(response => {  
306 - this.form = response.data;  
307 - this.open = true;  
308 - this.title = "修改跟踪监督";  
309 - });  
310 - },  
311 /** 提交按钮 */ 295 /** 提交按钮 */
312 submitForm() { 296 submitForm() {
313 this.$refs["form"].validate(valid => { 297 this.$refs["form"].validate(valid => {
trash-ui/src/api/truck_active.js
@@ -465,14 +465,23 @@ export default { @@ -465,14 +465,23 @@ export default {
465 465
466 /** 导出按钮操作 */ 466 /** 导出按钮操作 */
467 handleInfoExport() { 467 handleInfoExport() {
468 - const queryParams = this.queryParams; 468 + if(this.queryParams.createTime){
  469 + this.queryParams.startTime = this.queryParams.createTime[0];
  470 + this.queryParams.endTime = this.queryParams.createTime[1];
  471 + }
  472 + const query = {};
  473 +
  474 + for(var i in this.queryParams){
  475 + query[i] = this.queryParams[i];
  476 + }
  477 + query.createTime = null;
469 478
470 this.$confirm('是否确认导出所有车辆激活数据项?', "警告", { 479 this.$confirm('是否确认导出所有车辆激活数据项?', "警告", {
471 confirmButtonText: "确定", 480 confirmButtonText: "确定",
472 cancelButtonText: "取消", 481 cancelButtonText: "取消",
473 type: "warning" 482 type: "warning"
474 }).then(function() { 483 }).then(function() {
475 - return exportTruckInfoActivate(queryParams); 484 + return exportTruckInfoActivate(query);
476 }).then(response => { 485 }).then(response => {
477 this.download(response.message); 486 this.download(response.message);
478 }) 487 })
trash-ui/src/api/vio_casefile.js
@@ -4,7 +4,9 @@ import { @@ -4,7 +4,9 @@ import {
4 exportViolationCaseFile, 4 exportViolationCaseFile,
5 getViolationCaseFile, 5 getViolationCaseFile,
6 listViolationCaseFile, 6 listViolationCaseFile,
7 - updateViolationCaseFile 7 + updateViolationCaseFile,
  8 + deleteUpCase,
  9 + delayUpCase,
8 } from "@/api/casefile/violationCaseFile"; 10 } from "@/api/casefile/violationCaseFile";
9 import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"; 11 import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
10 12
@@ -106,11 +108,10 @@ export default { @@ -106,11 +108,10 @@ export default {
106 {code: 23, name: "闯禁行驶"}, 108 {code: 23, name: "闯禁行驶"},
107 {code: 24, name: "失信车辆作业"}, 109 {code: 24, name: "失信车辆作业"},
108 {code: 25, name: "卫星定位异常"}, 110 {code: 25, name: "卫星定位异常"},
109 - {code: 26, name: "其他2"}, 111 + {code: 26, name: "超速提醒"},
110 {code: 27, name: "其他3"}, 112 {code: 27, name: "其他3"},
111 {code: 28, name: "其他4"}, 113 {code: 28, name: "其他4"},
112 {code: 29, name: "其他5"}], 114 {code: 29, name: "其他5"}],
113 -  
114 projectNameList: {}, 115 projectNameList: {},
115 isLoading: false, 116 isLoading: false,
116 fileEntityList: [], 117 fileEntityList: [],
@@ -125,7 +126,11 @@ export default { @@ -125,7 +126,11 @@ export default {
125 idInfo: null, 126 idInfo: null,
126 openInfo: false, 127 openInfo: false,
127 slide1: [], 128 slide1: [],
128 - videoSrc: [], 129 + videoSrc: [],
  130 + object:null,
  131 + funIdx:null,
  132 + delayDialog:false,
  133 + deleteDialog:false,
129 }; 134 };
130 }, 135 },
131 watch: { 136 watch: {
@@ -137,15 +142,23 @@ export default { @@ -137,15 +142,23 @@ export default {
137 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1 || item.name.indexOf(".jpg") > -1) { 142 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1 || item.name.indexOf(".jpg") > -1) {
138 if (item.raw != null) { 143 if (item.raw != null) {
139 this.slide1.push(URL.createObjectURL(item.raw)); 144 this.slide1.push(URL.createObjectURL(item.raw));
140 - } else {  
141 - this.slide1.push(process.env.VUE_APP_BASE_API + item.url); 145 + } else {
  146 + if(item.url.startsWith("https:")){
  147 + this.slide1.push(item.url);
  148 + }else{
  149 + this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
  150 + }
142 } 151 }
143 } 152 }
144 if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) { 153 if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) {
145 if (item.raw != null) { 154 if (item.raw != null) {
146 this.videoSrc.push(URL.createObjectURL(item.raw)); 155 this.videoSrc.push(URL.createObjectURL(item.raw));
147 - } else {  
148 - this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url); 156 + } else {
  157 + if(item.url.startsWith("https:")){
  158 + this.videoSrc.push(item.url);
  159 + }else{
  160 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  161 + }
149 } 162 }
150 } 163 }
151 }) 164 })
@@ -209,16 +222,50 @@ export default { @@ -209,16 +222,50 @@ export default {
209 this.getList(); 222 this.getList();
210 }, 223 },
211 methods: { 224 methods: {
  225 + openFunction(obj,idx){
  226 + this.object = obj;
  227 + if(idx == 1){
  228 + this.deleteDialog = true;
  229 + this.reason = "综管回退"
  230 + }else if(idx == 2){
  231 + this.delayDialog = true;
  232 + this.reason = "延期处理"
  233 + }
  234 + },
  235 + deleteUpCase(){
  236 + debugger;
  237 + if(!this.form.describe){
  238 + this.$message("请填写理由!");
  239 + return;
  240 + }
  241 + this.object.describe = this.form.describe;
  242 + deleteUpCase(this.object).then(res=>{
  243 + this.deleteDialog = false;
  244 + this.getList();
  245 + });
  246 + },
  247 + delayUpCase(){
  248 + debugger;
  249 + if(!this.form.describe){
  250 + this.$message("请填写理由!");
  251 + return;
  252 + }
  253 + this.object.describe = this.form.describe;
  254 + this.object.timeType = this.form.timeType;
  255 + this.object.delayedTime = this.form.delayedTime;
  256 + delayUpCase(this.object).then(res=>{
  257 + this.delayDialog = false;
  258 + this.getList();
  259 + });
  260 + },
212 getRemoteDate(value){ 261 getRemoteDate(value){
213 this.remoteQueryData.name =value; 262 this.remoteQueryData.name =value;
214 constructionsitesList(this.remoteQueryData).then(res => { 263 constructionsitesList(this.remoteQueryData).then(res => {
215 this.projectNameList["0"] = res.result.list; 264 this.projectNameList["0"] = res.result.list;
216 -  
217 this.$forceUpdate(); 265 this.$forceUpdate();
218 }); 266 });
219 earthsitesList(this.remoteQueryData).then(res => { 267 earthsitesList(this.remoteQueryData).then(res => {
220 this.projectNameList["1"] = res.result.list; 268 this.projectNameList["1"] = res.result.list;
221 -  
222 this.$forceUpdate(); 269 this.$forceUpdate();
223 }); 270 });
224 }, 271 },
trash-ui/src/api/vio_casefile_info.js
@@ -66,11 +66,23 @@ export default { @@ -66,11 +66,23 @@ export default {
66 let files = JSON.stringify(response.data.uploadFiles); 66 let files = JSON.stringify(response.data.uploadFiles);
67 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")); 67 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
68 this.fileEntityList.map(item => { 68 this.fileEntityList.map(item => {
  69 +
  70 +
69 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1) { 71 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1) {
70 - this.slide1.push(process.env.VUE_APP_BASE_API + item.url); 72 + if(item.url.startsWith("https:")){
  73 + this.slide1.push(item.url);
  74 + }else{
  75 + this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
  76 + }
  77 +
  78 +
71 } 79 }
72 if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) { 80 if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) {
73 - this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url); 81 + if(item.url.startsWith("https:")){
  82 + this.videoSrc.push(item.url);
  83 + }else{
  84 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  85 + }
74 } 86 }
75 }) 87 })
76 88
trash-ui/src/api/warningInfo.js
@@ -165,8 +165,12 @@ export default { @@ -165,8 +165,12 @@ export default {
165 name: "失信车辆作业" 165 name: "失信车辆作业"
166 }, 166 },
167 { 167 {
168 - code: 14, 168 + code: 15,
169 name: "卫星定位异常" 169 name: "卫星定位异常"
  170 + },
  171 + {
  172 + code: 16,
  173 + name: "超速提醒"
170 } 174 }
171 ], 175 ],
172 projectNameList: {}, 176 projectNameList: {},
trash-ui/src/layout/index3.vue renamed to trash-ui/src/layout/inde3x.vue
@@ -4,7 +4,6 @@ @@ -4,7 +4,6 @@
4 <div :class="{ hasTagsView: false }" class="main-container"> 4 <div :class="{ hasTagsView: false }" class="main-container">
5 <tags-view v-if="needTagsView" /> 5 <tags-view v-if="needTagsView" />
6 <app-main /> 6 <app-main />
7 -  
8 </div> 7 </div>
9 </div> 8 </div>
10 </template> 9 </template>
trash-ui/src/main.js
@@ -42,8 +42,8 @@ Vue.use(plugins) @@ -42,8 +42,8 @@ Vue.use(plugins)
42 Vue.prototype.$aMapKey = "902732b0ff4758e4b39f0f34f0cb1cb0";// 高德地图key 42 Vue.prototype.$aMapKey = "902732b0ff4758e4b39f0f34f0cb1cb0";// 高德地图key
43 43
44 44
45 -Vue.prototype.remoteFrame = "http://183.66.242.6:14601"  
46 -// Vue.prototype.remoteFrame = "http://175.6.47.84:8008" 45 +// Vue.prototype.remoteFrame = "http://183.66.242.6:14601"
  46 +Vue.prototype.remoteFrame = "http://175.6.47.84:8008"
47 47
48 Vue.prototype.msgSuccess = function (msg) { 48 Vue.prototype.msgSuccess = function (msg) {
49 this.$message({ showClose: true, message: msg, type: "success" }); 49 this.$message({ showClose: true, message: msg, type: "success" });
trash-ui/src/router/index.js
@@ -274,6 +274,12 @@ export const constantRoutes = [ @@ -274,6 +274,12 @@ export const constantRoutes = [
274 meta: { title: '违规预警信息统计表' } 274 meta: { title: '违规预警信息统计表' }
275 }, 275 },
276 { 276 {
  277 + path: 'casefile/EVTable',
  278 + component: (resolve) => require(['@/views/casefile/violationWarningInformation/EVTable'], resolve),
  279 + name: '电车预警统计',
  280 + meta: { title: '电车预警统计' }
  281 + },
  282 + {
277 path: 'casefile/violationCaseFile', 283 path: 'casefile/violationCaseFile',
278 component: (resolve) => require(['@/views/casefile/violationCaseFile'], resolve), 284 component: (resolve) => require(['@/views/casefile/violationCaseFile'], resolve),
279 name: '平台违规案卷', 285 name: '平台违规案卷',
trash-ui/src/views/business/track/index.vue
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
2 <div class="app-container"> 2 <div class="app-container">
3 3
4 <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect"> 4 <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
5 - <el-menu-item index="0" >工地</el-menu-item>  
6 - <el-menu-item index="1">消纳场</el-menu-item>  
7 - <el-menu-item index="2">企业</el-menu-item> 5 + <el-menu-item index="0" >处置工地</el-menu-item>
  6 + <el-menu-item index="1">处理场所</el-menu-item>
  7 + <el-menu-item index="2">运输企业</el-menu-item>
8 <el-menu-item index="3">合同</el-menu-item> 8 <el-menu-item index="3">合同</el-menu-item>
9 <el-menu-item index="4">车辆</el-menu-item> 9 <el-menu-item index="4">车辆</el-menu-item>
10 <el-menu-item index="5">后勤管理</el-menu-item> 10 <el-menu-item index="5">后勤管理</el-menu-item>
@@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
89 <el-table-column label="序号" align="center" type="index" /> 89 <el-table-column label="序号" align="center" type="index" />
90 <el-table-column label="督查事项" align="center" prop="title"> 90 <el-table-column label="督查事项" align="center" prop="title">
91 <template slot-scope="scope"> 91 <template slot-scope="scope">
92 - <a @click="getInfo(scope.row.type,scope.row.objectId,scope.row.id,scope.row);">{{ (scope.row.title)}}</a> 92 + <a @click="getInfo(scope.row.type,scope.row.objectId,scope.row.id,scope.row);" style="color: ;">{{ (scope.row.title)}}</a>
93 </template> 93 </template>
94 </el-table-column> 94 </el-table-column>
95 <el-table-column label="所属区域" align="center" prop="place" /> 95 <el-table-column label="所属区域" align="center" prop="place" />
@@ -156,16 +156,17 @@ @@ -156,16 +156,17 @@
156 </el-dialog> 156 </el-dialog>
157 157
158 <el-dialog title="详情" :visible.sync="infoDialog" width="1500px" append-to-body :before-close="dialogClose"> 158 <el-dialog title="详情" :visible.sync="infoDialog" width="1500px" append-to-body :before-close="dialogClose">
  159 +
  160 + <div v-if="object" style="float:right;position: sticky;top:0px;right:0px;">
  161 + <el-button type="success" @click="update(0)" :disabled="object.status != -1 && object.status != 2 && object.status != 5">督察通过</el-button>
  162 + <el-button type="danger" @click="errorDialog = true;" :disabled="object.status != -1 && object.status != 2 && object.status != 5">督察异常</el-button>
  163 + </div>
159 <companyInfo :businessKey="objectId" :businessType="objectType" v-if="info0"/> 164 <companyInfo :businessKey="objectId" :businessType="objectType" v-if="info0"/>
160 <logisticsInfo :idInfo="objectId" v-if="info1"/> 165 <logisticsInfo :idInfo="objectId" v-if="info1"/>
161 <caseOfflineInfo :businessKey="objectId" v-if="info2"/> 166 <caseOfflineInfo :businessKey="objectId" v-if="info2"/>
162 <violationCaseFileInfo :idInfo="objectId" v-if="info3" /> 167 <violationCaseFileInfo :idInfo="objectId" v-if="info3" />
163 168
164 169
165 - <div slot="footer" class="dialog-footer" v-if="object">  
166 - <el-button type="success" @click="update(0)" :disabled="object.status != -1 && object.status != 2 && object.status != 5">督察通过</el-button>  
167 - <el-button type="danger" @click="errorDialog = true;" :disabled="object.status != -1 && object.status != 2 && object.status != 5">督察异常</el-button>  
168 - </div>  
169 </el-dialog> 170 </el-dialog>
170 171
171 <el-dialog title="" :visible.sync="errorTableShow" width="800px" append-to-body v-if="formData && errorTableShow" > 172 <el-dialog title="" :visible.sync="errorTableShow" width="800px" append-to-body v-if="formData && errorTableShow" >
trash-ui/src/views/casefile/violationCaseFile/index.vue
@@ -33,11 +33,18 @@ @@ -33,11 +33,18 @@
33 </el-form-item> 33 </el-form-item>
34 34
35 <el-form-item label="日期" prop="createTime"> 35 <el-form-item label="日期" prop="createTime">
36 - <el-date-picker size="small" v-model="queryParams.createTime" type="datetimerange" 36 + <el-date-picker size="small"
  37 + v-model="queryParams.createTime" type="datetimerange"
37 start-placeholder="开始日期" 38 start-placeholder="开始日期"
38 value-format="yyyy-MM-dd HH:mm:ss" 39 value-format="yyyy-MM-dd HH:mm:ss"
39 end-placeholder="结束日期"> 40 end-placeholder="结束日期">
40 </el-date-picker> 41 </el-date-picker>
  42 + </el-form-item>
  43 + <el-form-item label="数据来源" prop="needUpload">
  44 + <el-select v-model="queryParams.needUpload" placeholder="数据来源" size="small">
  45 + <el-option label="平台数据" value="0" />
  46 + <el-option label="综管数据" value="1" />
  47 + </el-select>
41 </el-form-item> 48 </el-form-item>
42 <el-form-item> 49 <el-form-item>
43 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> 50 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -96,13 +103,25 @@ @@ -96,13 +103,25 @@
96 </el-table-column> 103 </el-table-column>
97 <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> 104 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
98 <template slot-scope="scope"> 105 <template slot-scope="scope">
99 - 106 + <el-button
  107 + size="mini"
  108 + type="text"
  109 + icon="el-icon-view"
  110 + @click="openFunction(scope.row,1)"
  111 + v-if="!scope.row.status && scope.row.status!=0 && scope.row.needUpload == 1"
  112 + >综管数据回退</el-button>
  113 + <el-button
  114 + size="mini"
  115 + type="text"
  116 + icon="el-icon-view"
  117 + @click="openFunction(scope.row,2)"
  118 + v-if="!scope.row.status && scope.row.status!=1 && scope.row.needUpload == 1"
  119 + >延期处理</el-button>
100 <el-button 120 <el-button
101 size="mini" 121 size="mini"
102 type="text" 122 type="text"
103 icon="el-icon-view" 123 icon="el-icon-view"
104 @click="handleUpdate(scope.row)" 124 @click="handleUpdate(scope.row)"
105 - v-hasPermi="['casefile:violationCaseFile:edit']"  
106 v-if="!scope.row.status && scope.row.status!=0 && scope.row.needUpload == 1" 125 v-if="!scope.row.status && scope.row.status!=0 && scope.row.needUpload == 1"
107 >综管数据补填</el-button> 126 >综管数据补填</el-button>
108 127
@@ -129,7 +148,30 @@ @@ -129,7 +148,30 @@
129 <!-- >删除</el-button>--> 148 <!-- >删除</el-button>-->
130 </template> 149 </template>
131 </el-table-column> 150 </el-table-column>
132 - </el-table> 151 + </el-table>
  152 +
  153 + <el-dialog title="回退" :visible.sync="deleteDialog" width="400px" append-to-body >
  154 + <el-input v-model="form.describe" type="textarea" placeholder="填写理由" :row="4"/>
  155 + <div slot="footer" class="dialog-footer">
  156 + <el-button @click="deleteUpCase();">确 认</el-button>
  157 + <el-button @click="deleteDialog = false;">取 消</el-button>
  158 + </div>
  159 + </el-dialog>
  160 +
  161 + <el-dialog title="延期" :visible.sync="delayDialog" width="400px" append-to-body >
  162 + <el-select v-model="form.timeType" placeholder="时间类型" size="small" style="width: 100%">
  163 + <el-option label="小时" value="0" />
  164 + <el-option label="工作日" value="1" />
  165 + <el-option label="紧急工作时" value="2" />
  166 + </el-select>
  167 + <el-input v-model="form.delayedTime" placeholder="时间" />
  168 + <el-input v-model="form.describe" type="textarea" placeholder="填写理由" :row="4"/>
  169 + <div slot="footer" class="dialog-footer">
  170 + <el-button @click="delayUpCase();">确 认</el-button>
  171 + <el-button @click="delayDialog = false;">取 消</el-button>
  172 + </div>
  173 + </el-dialog>
  174 +
133 175
134 <pagination 176 <pagination
135 v-show="total>0" 177 v-show="total>0"
trash-ui/src/views/casefile/violationCaseFile/violationCaseTable.vue
@@ -9,11 +9,11 @@ @@ -9,11 +9,11 @@
9 <el-form-item label="日期" prop="createTime"> 9 <el-form-item label="日期" prop="createTime">
10 <el-date-picker 10 <el-date-picker
11 v-model="createTime" 11 v-model="createTime"
12 - type="datetimerange"  
13 - :picker-options="pickerOptions"  
14 - range-separator="至"  
15 - start-placeholder="开始日期"  
16 - end-placeholder="结束日期"> 12 + size="small"
  13 + type="datetimerange"
  14 + start-placeholder="开始日期"
  15 + value-format="yyyy-MM-dd HH:mm:ss"
  16 + end-placeholder="结束日期">
17 </el-date-picker> 17 </el-date-picker>
18 </el-form-item> 18 </el-form-item>
19 <el-form-item> 19 <el-form-item>
@@ -53,25 +53,6 @@ export default { @@ -53,25 +53,6 @@ export default {
53 hackReset: false, 53 hackReset: false,
54 pickerMinDate: null, 54 pickerMinDate: null,
55 pickerMaxDate: null, 55 pickerMaxDate: null,
56 - pickerOptions: {  
57 - onPick: ({ maxDate, minDate }) => {  
58 - if (minDate && this.pickerMinDate) {  
59 - this.pickerMinDate = null;  
60 - } else if (minDate) {  
61 - this.pickerMinDate = minDate.getTime();  
62 - }  
63 - },  
64 - disabledDate: (time) => {  
65 - if (this.pickerMinDate) {  
66 - const day1 = 30 * 24 * 3600 * 1000  
67 - let maxTime = this.pickerMinDate + day1  
68 - let minTime = this.pickerMinDate - day1  
69 - return time.getTime() > maxTime || time.getTime()<minTime || time.getTime() > Date.now()  
70 - } else {  
71 - return time.getTime() > Date.now()  
72 - }  
73 - },  
74 - },  
75 } 56 }
76 }, 57 },
77 created() { 58 created() {
@@ -134,8 +115,8 @@ export default { @@ -134,8 +115,8 @@ export default {
134 let startDate = null; 115 let startDate = null;
135 let endDate = null; 116 let endDate = null;
136 if(this.createTime.length!=0){ 117 if(this.createTime.length!=0){
137 - startDate = this.formatDate(this.createTime[0]);  
138 - endDate = this.formatDate(this.createTime[1]); 118 + startDate = this.createTime[0];
  119 + endDate = this.createTime[1];
139 } 120 }
140 caseTable({owningRegion: this.owningRegion, startDate: startDate, endDate: endDate}).then(res => { 121 caseTable({owningRegion: this.owningRegion, startDate: startDate, endDate: endDate}).then(res => {
141 this.tableData = res.data; 122 this.tableData = res.data;
@@ -145,12 +126,6 @@ export default { @@ -145,12 +126,6 @@ export default {
145 }) 126 })
146 }); 127 });
147 }, 128 },
148 - formatDate(date) {  
149 - const year = date.getFullYear();  
150 - const month = String(date.getMonth() + 1).padStart(2, '0');  
151 - const day = String(date.getDate()).padStart(2, '0');  
152 - return `${year}-${month}-${day}`;  
153 - }  
154 129
155 } 130 }
156 } 131 }
trash-ui/src/views/casefile/violationWarningInformation/EVTable.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 + <el-form ref="queryForm" :inline="true" label-width="105px">
  4 + <el-form-item label="周期" prop="violationObjectType">
  5 + <el-select v-model="params.violationObjectType">
  6 + <el-option value="周">周</el-option>
  7 + <el-option value="月">月</el-option>
  8 + <el-option value="季度">季度</el-option>
  9 + <el-option value="年">年</el-option>
  10 + </el-select>
  11 + </el-form-item>
  12 + <el-form-item>
  13 + <el-button type="cyan" icon="el-icon-search" size="mini" @click="init">搜索</el-button>
  14 + </el-form-item>
  15 + </el-form>
  16 +
  17 + <el-tabs v-model="activeName" @tab-click="changeActive()" style="width:50%;float: left;">
  18 + <el-tab-pane label="车" name="truck" style="width:50%;float: left;">
  19 + <el-tabs tab-position="left" @tab-click="refreshChart">
  20 + <el-tab-pane :label="item.name + '(违规' + item.count +'次)'" v-for="item in data.truck">
  21 +
  22 + </el-tab-pane>
  23 + </el-tabs>
  24 +
  25 +
  26 +<!-- <el-table :data="data.truck">
  27 + <el-table-column label="序号" align="center" type='index'/>
  28 + <el-table-column label="车号" header-align="center" align="center" property="name"></el-table-column>
  29 + <el-table-column property="count" label="违规次数" header-align="center" align="center"></el-table-column>
  30 + </el-table> -->
  31 +
  32 + </el-tab-pane>
  33 + <el-tab-pane label="企业" name="company" style="width:50%;float: left;">
  34 + <el-tabs tab-position="left" @tab-click="refreshChart">
  35 + <el-tab-pane :label="item.name + '(违规' + item.count +'次)'" v-for="item in data.company">
  36 +
  37 + </el-tab-pane>
  38 + </el-tabs>
  39 + </el-tab-pane>
  40 +
  41 +
  42 + <div style="width:400px;height:400px;float: left;" id="myECharts"></div>
  43 +
  44 + </el-tabs>
  45 + <el-row>
  46 + <div style="width:800px;height:400px;float: right;" id="yearChart"></div>
  47 + </el-row>
  48 + <el-row>
  49 + <div style="width:800px;height:400px;float: right;" id="monthChart"></div>
  50 + </el-row>
  51 +
  52 + </div>
  53 +</template>
  54 +
  55 +<script>
  56 +
  57 +import {getEVTable} from "@/api/casefile/violationWarningInformation";
  58 +import {getAreaList} from "@/api/casefile/remoteServer";
  59 +import * as echarts from "echarts";
  60 +
  61 +
  62 +export default {
  63 + name: "caseTable",
  64 + props: {},
  65 + data() {
  66 + return {
  67 + activeName:"truck",
  68 + params:{
  69 + violationObjectType:"周",
  70 + },
  71 + tableData: [],
  72 + owningRegion: "",
  73 + createTime: [],
  74 + areas: [],
  75 + hackReset:false,
  76 + pickerMinDate: null,
  77 + pickerMaxDate: null,
  78 + data:{}
  79 + }
  80 + },
  81 + mounted(){
  82 + this.init();
  83 + },
  84 + created() {
  85 +
  86 + },
  87 + methods: {
  88 + changeActive(comm){
  89 + let obj = {index:0};
  90 + this.refreshChart(obj);
  91 + },
  92 + createChart(){
  93 + let item = this.data["year"][0];
  94 + if(item){
  95 +
  96 +
  97 + let name = "";
  98 + let count = 0;
  99 + let keys = [];
  100 + let values = [];
  101 + for(let k in item){
  102 + if(k == "count"){
  103 + count = item[k];
  104 + continue;
  105 + }
  106 + if(k == "name"){
  107 + name = item[k];
  108 + continue;
  109 + }
  110 +
  111 + keys.push(k);
  112 + values.push(item[k]);
  113 + }
  114 +
  115 + let opt = {
  116 + title: {
  117 + text: "预警趋势",
  118 + left: "left",
  119 + },
  120 + tooltip: {
  121 + trigger: "axis"
  122 + },
  123 + xAxis: {
  124 +
  125 + type: 'category',
  126 +
  127 + data: keys
  128 +
  129 + },
  130 +
  131 + yAxis: {
  132 +
  133 + type: 'value'
  134 +
  135 + },
  136 + series: [
  137 + {
  138 + data:values,
  139 + type: "line",
  140 + smooth: true,
  141 + itemStyle: {
  142 + normal: {
  143 + label: {
  144 + show: true,
  145 + position: "top",
  146 + formatter: "{c}"
  147 + }
  148 + }
  149 + }
  150 + }
  151 + ]
  152 + };
  153 + let ychart = echarts.init(document.getElementById("yearChart"));
  154 + ychart.setOption(opt);
  155 + }
  156 +
  157 + let thisMonth = this.data["month"][0];
  158 + let lastMonth = this.data["month"][1];
  159 + if(thisMonth || lastMonth){
  160 +
  161 +
  162 + let keys = [];
  163 + let values = [];
  164 + let values1 = []
  165 +
  166 +
  167 +
  168 + for(let k in thisMonth){
  169 + if(k == "count"){
  170 + continue;
  171 + }
  172 + if(k == "name"){
  173 + continue;
  174 + }
  175 +
  176 + keys.push(k);
  177 + values.push(thisMonth[k]);
  178 + if(lastMonth[k]){
  179 + values1.push(lastMonth[k]);
  180 + }
  181 + }
  182 +
  183 + for(let k in lastMonth){
  184 + if(k == "count"){
  185 + continue;
  186 + }
  187 + if(k == "name"){
  188 + continue;
  189 + }
  190 +
  191 + if(keys.indexOf(k) == -1){
  192 + keys.push(k);
  193 + values.push(0);
  194 + values1.push(lastMonth[k]);
  195 + }
  196 + }
  197 +
  198 +
  199 +
  200 +
  201 + let opt2 = {
  202 + title: {
  203 + text: "同期环比",
  204 + left: "left",
  205 + },
  206 +
  207 + legend: {
  208 + data: ['上月', '本月']
  209 + },
  210 + tooltip: {
  211 + trigger: "axis"
  212 + },
  213 + xAxis: {
  214 + type: 'category',
  215 + data: keys
  216 + },
  217 + yAxis: {
  218 + type: 'value'
  219 + },
  220 + series: [
  221 + {
  222 + name: '上月',
  223 + type: 'line',
  224 + stack: 'Total',
  225 + data: values1
  226 + },{
  227 + name: '本月',
  228 + type: 'line',
  229 + stack: 'Total',
  230 + data: values
  231 + },
  232 + ]
  233 + };
  234 +
  235 +
  236 +
  237 + let mchart = echarts.init(document.getElementById("monthChart"));
  238 + mchart.setOption(opt2);
  239 + }
  240 + },
  241 + refreshChart(comm){
  242 +
  243 + let item = this.data[this.activeName][comm.index];
  244 + if(!item)
  245 + return;
  246 + let name = "";
  247 + let count = 0;
  248 + let params = [];
  249 + for(let k in item){
  250 + if(k == "count"){
  251 + count = item[k];
  252 + continue;
  253 + }
  254 + if(k == "name"){
  255 + name = item[k];
  256 + continue;
  257 + }
  258 + params.push({"value":item[k],"name":k + "(" + item[k]+")"});
  259 + }
  260 + let opt = {
  261 + title: {
  262 + text: name + "违规" + count + "次分布",
  263 + left: "center",
  264 + },
  265 + tooltip: {
  266 + trigger: "item"
  267 + },
  268 + series: [
  269 + {
  270 + data:params,
  271 + type: "pie",
  272 + radius: '50%'
  273 + }
  274 + ]
  275 + };
  276 + let chart = echarts.init(document.getElementById("myECharts"));
  277 + chart.setOption(opt);
  278 + },
  279 + init(){
  280 + getEVTable(this.params).then(res=>{
  281 + this.data = res.data;
  282 + let obj = {index:0};
  283 + this.refreshChart(obj);
  284 + this.createChart();
  285 + });
  286 + },
  287 + spanMethod({row, column, rowIndex, columnIndex}) {
  288 + if (columnIndex == 0) {
  289 + if (rowIndex == 0) {
  290 + return {rowspan: 300, colspan: 1}
  291 + } else {
  292 + return {rowspan: 0, colspan: 0}
  293 + }
  294 + }
  295 + },
  296 + getSummaries(param) {
  297 + const {columns, data} = param;
  298 + const sums = [];
  299 +
  300 + let allCount = 0;
  301 + let allRepCount = 0;
  302 + for (let i in data) {
  303 + allCount += Number(data[i].count==null?0:data[i].count);
  304 + allRepCount += Number(data[i].repCount==null?0:data[i].repCount);
  305 +
  306 + }
  307 +
  308 + columns.forEach((column, index) => {
  309 + if (index == 0 || index == 1) {
  310 + return;
  311 + }
  312 +
  313 + if (index == 2) {
  314 + sums[2] = allCount;
  315 + }
  316 +
  317 + if (index == 3) {
  318 + sums[3] = allRepCount;
  319 + }
  320 +
  321 + if (index == 4) {
  322 + if(allCount==0||allRepCount==0){
  323 + sums[4] = "0" + "%";
  324 + }else{
  325 + sums[4] = ((allRepCount / allCount) * 100).toFixed(2) + "%";
  326 + }
  327 +
  328 + }
  329 + })
  330 +
  331 + return sums;
  332 + },
  333 +
  334 + }
  335 +}
  336 +</script>
  337 +
  338 +<style scoped>
  339 +
  340 +</style>
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationTable.vue
@@ -8,12 +8,12 @@ @@ -8,12 +8,12 @@
8 </el-form-item> 8 </el-form-item>
9 <el-form-item label="日期" prop="createTime"> 9 <el-form-item label="日期" prop="createTime">
10 <el-date-picker 10 <el-date-picker
11 - v-model="createTime"  
12 - type="datetimerange"  
13 - :picker-options="pickerOptions"  
14 - range-separator="至"  
15 - start-placeholder="开始日期"  
16 - end-placeholder="结束日期"> 11 + v-model="createTime"
  12 + size="small"
  13 + type="datetimerange"
  14 + start-placeholder="开始日期"
  15 + value-format="yyyy-MM-dd HH:mm:ss"
  16 + end-placeholder="结束日期">
17 </el-date-picker> 17 </el-date-picker>
18 </el-form-item> 18 </el-form-item>
19 <el-form-item> 19 <el-form-item>
@@ -52,25 +52,6 @@ export default { @@ -52,25 +52,6 @@ export default {
52 hackReset:false, 52 hackReset:false,
53 pickerMinDate: null, 53 pickerMinDate: null,
54 pickerMaxDate: null, 54 pickerMaxDate: null,
55 - pickerOptions: {  
56 - onPick: ({ maxDate, minDate }) => {  
57 - if (minDate && this.pickerMinDate) {  
58 - this.pickerMinDate = null;  
59 - } else if (minDate) {  
60 - this.pickerMinDate = minDate.getTime();  
61 - }  
62 - },  
63 - disabledDate: (time) => {  
64 - if (this.pickerMinDate) {  
65 - const day1 = 30 * 24 * 3600 * 1000  
66 - let maxTime = this.pickerMinDate + day1  
67 - let minTime = this.pickerMinDate - day1  
68 - return time.getTime() > maxTime || time.getTime()<minTime || time.getTime() > Date.now()  
69 - } else {  
70 - return time.getTime() > Date.now()  
71 - }  
72 - },  
73 - },  
74 } 55 }
75 }, 56 },
76 created() { 57 created() {
@@ -133,8 +114,8 @@ export default { @@ -133,8 +114,8 @@ export default {
133 let startDate = null; 114 let startDate = null;
134 let endDate = null; 115 let endDate = null;
135 if(this.createTime.length!=0){ 116 if(this.createTime.length!=0){
136 - startDate = this.formatDate(this.createTime[0]);  
137 - endDate = this.formatDate(this.createTime[1]); 117 + startDate = this.createTime[0];
  118 + endDate = this.createTime[1];
138 } 119 }
139 caseTable({owningRegion:this.owningRegion,startDate:startDate,endDate:endDate}).then(res => { 120 caseTable({owningRegion:this.owningRegion,startDate:startDate,endDate:endDate}).then(res => {
140 this.tableData = res.data; 121 this.tableData = res.data;
@@ -144,12 +125,6 @@ export default { @@ -144,12 +125,6 @@ export default {
144 }) 125 })
145 }); 126 });
146 }, 127 },
147 - formatDate(date) {  
148 - const year = date.getFullYear();  
149 - const month = String(date.getMonth() + 1).padStart(2, '0');  
150 - const day = String(date.getDate()).padStart(2, '0');  
151 - return `${year}-${month}-${day}`;  
152 - }  
153 128
154 } 129 }
155 } 130 }
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
@@ -85,7 +85,16 @@ public class TruckActivateController extends BaseController @@ -85,7 +85,16 @@ public class TruckActivateController extends BaseController
85 @Log(title = "车辆激活", businessType = BusinessType.EXPORT) 85 @Log(title = "车辆激活", businessType = BusinessType.EXPORT)
86 @GetMapping("/export") 86 @GetMapping("/export")
87 public AjaxResult export(TruckActivate truckActivate) 87 public AjaxResult export(TruckActivate truckActivate)
88 - { 88 + {
  89 +
  90 + if(truckActivate.getStatus() == 0){
  91 + truckActivate.setMyTables(new ArrayList<>());
  92 + truckActivate.getMyTables().add("truck_activate");
  93 + }else{
  94 + List<String> tables = truckActivateMapper.getTables("truck_activate%");
  95 + truckActivate.setMyTables(tables);
  96 + }
  97 +
89 List<TruckActivate> list = truckActivateService.selectTruckActivateList(truckActivate); 98 List<TruckActivate> list = truckActivateService.selectTruckActivateList(truckActivate);
90 99
91 for(int i = 0;i<list.size();i++){ 100 for(int i = 0;i<list.size();i++){
trash-workFlow/src/main/java/com/trash/business/domain/TruckActivate.java
@@ -57,10 +57,11 @@ public class TruckActivate @@ -57,10 +57,11 @@ public class TruckActivate
57 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 57 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
58 @Excel(name = "激活时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") 58 @Excel(name = "激活时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
59 private Date activateTime; 59 private Date activateTime;
60 - /** 状态 0当前 1历史 */  
61 - @Excel(name = "激活状态", readConverterExp = "1=未激活,0=已激活")  
62 - private Long status;  
63 60
  61 + private Long status;
  62 +
  63 + /** 状态 0当前 1历史 */
  64 + @Excel(name = "激活状态")
64 private String isAct; 65 private String isAct;
65 66
66 private String startTime; 67 private String startTime;
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
@@ -166,12 +166,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -166,12 +166,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
166 supervisionThreestep.setIds(ids); 166 supervisionThreestep.setIds(ids);
167 167
168 if(ids.size() == 0){ 168 if(ids.size() == 0){
169 -  
170 return list; 169 return list;
171 } 170 }
172 171
173 -  
174 -  
175 list = supervisionThreestepMapper.selectSupervisionThreestepList(supervisionThreestep); 172 list = supervisionThreestepMapper.selectSupervisionThreestepList(supervisionThreestep);
176 173
177 return list; 174 return list;
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationCaseFileController.java
@@ -2,6 +2,7 @@ package com.trash.casefile.controller; @@ -2,6 +2,7 @@ package com.trash.casefile.controller;
2 2
3 import java.io.IOException; 3 import java.io.IOException;
4 import java.util.ArrayList; 4 import java.util.ArrayList;
  5 +import java.util.Date;
5 import java.util.HashMap; 6 import java.util.HashMap;
6 import java.util.List; 7 import java.util.List;
7 import java.util.Map; 8 import java.util.Map;
@@ -12,6 +13,7 @@ import com.alibaba.fastjson.JSONObject; @@ -12,6 +13,7 @@ import com.alibaba.fastjson.JSONObject;
12 import com.trash.casefile.domain.ViolationWarningInformation; 13 import com.trash.casefile.domain.ViolationWarningInformation;
13 import com.trash.casefile.domain.vo.ViolationCaseFileVo; 14 import com.trash.casefile.domain.vo.ViolationCaseFileVo;
14 import com.trash.casefile.domain.vo.ViolationWarningInformationVo; 15 import com.trash.casefile.domain.vo.ViolationWarningInformationVo;
  16 +import com.trash.casefile.mapper.ReplyApprovalProcessMapper;
15 import com.trash.office.domain.UploadFile; 17 import com.trash.office.domain.UploadFile;
16 import org.springframework.security.access.prepost.PreAuthorize; 18 import org.springframework.security.access.prepost.PreAuthorize;
17 import org.springframework.beans.factory.annotation.Autowired; 19 import org.springframework.beans.factory.annotation.Autowired;
@@ -22,6 +24,7 @@ import com.trash.common.core.controller.BaseController; @@ -22,6 +24,7 @@ import com.trash.common.core.controller.BaseController;
22 import com.trash.common.core.domain.AjaxResult; 24 import com.trash.common.core.domain.AjaxResult;
23 import com.trash.common.enums.BusinessType; 25 import com.trash.common.enums.BusinessType;
24 import com.trash.caseOffline.domain.CaseOffline; 26 import com.trash.caseOffline.domain.CaseOffline;
  27 +import com.trash.casefile.domain.ReplyApprovalProcess;
25 import com.trash.casefile.domain.ViolationCaseFile; 28 import com.trash.casefile.domain.ViolationCaseFile;
26 import com.trash.casefile.service.IViolationCaseFileService; 29 import com.trash.casefile.service.IViolationCaseFileService;
27 import com.trash.common.utils.DateUtils; 30 import com.trash.common.utils.DateUtils;
@@ -44,6 +47,9 @@ import org.springframework.web.multipart.MultipartFile; @@ -44,6 +47,9 @@ import org.springframework.web.multipart.MultipartFile;
44 public class ViolationCaseFileController extends BaseController { 47 public class ViolationCaseFileController extends BaseController {
45 @Autowired 48 @Autowired
46 private IViolationCaseFileService violationCaseFileService; 49 private IViolationCaseFileService violationCaseFileService;
  50 +
  51 + @Autowired
  52 + ReplyApprovalProcessMapper rapMapper;
47 53
48 54
49 /** 55 /**
@@ -79,6 +85,8 @@ public class ViolationCaseFileController extends BaseController { @@ -79,6 +85,8 @@ public class ViolationCaseFileController extends BaseController {
79 return AjaxResult.success(violationCaseFileService.selectViolationCaseFileById(id)); 85 return AjaxResult.success(violationCaseFileService.selectViolationCaseFileById(id));
80 } 86 }
81 87
  88 +
  89 +
82 /** 90 /**
83 * 新增平台违规案卷 91 * 新增平台违规案卷
84 */ 92 */
@@ -95,6 +103,51 @@ public class ViolationCaseFileController extends BaseController { @@ -95,6 +103,51 @@ public class ViolationCaseFileController extends BaseController {
95 } 103 }
96 return toAjax(i); 104 return toAjax(i);
97 } 105 }
  106 +
  107 + @PostMapping("/deleteUpCase")
  108 + public AjaxResult deleteUpCase(@RequestBody ViolationCaseFile violationCaseFile)
  109 + throws IOException {
  110 + int i = 0;
  111 +
  112 + Map map = new HashMap<>();
  113 +
  114 + map.put("taskId", violationCaseFile.getId());
  115 + map.put("evtId", violationCaseFile.getNumber());
  116 + map.put("reason", violationCaseFile.getDescribe());
  117 +
  118 + if(RemoteServerUtils.deleteUpCase(map)){
  119 + i = violationCaseFileService.deleteViolationCaseFileById(violationCaseFile.getId());
  120 + }
  121 +
  122 + return toAjax(i);
  123 + }
  124 +
  125 + @PostMapping("/delayUpCase")
  126 + public AjaxResult delayUpCase(@RequestBody ViolationCaseFile violationCaseFile)
  127 + throws IOException {
  128 + int i = 0;
  129 +
  130 + Map map = new HashMap<>();
  131 +
  132 + map.put("taskId", violationCaseFile.getId());
  133 + map.put("evtId", violationCaseFile.getNumber());
  134 + map.put("reason", violationCaseFile.getDescribe());
  135 + map.put("timeType", violationCaseFile.getTimeType());
  136 + map.put("delayedTime", violationCaseFile.getDelayedTime());
  137 +
  138 + if(RemoteServerUtils.delayUpCase(map)){
  139 + ReplyApprovalProcess rap = new ReplyApprovalProcess();
  140 + rap.setTableName("workflow_casefile:"+violationCaseFile.getId());
  141 + rap.setReplyPeople(SecurityUtils.getUsername());
  142 + rap.setReply("申请延期:" + violationCaseFile.getDescribe() + violationCaseFile.getDelayedTime() + violationCaseFile.getTimeType());
  143 + rap.setReplyTime(new Date());
  144 + i = rapMapper.insertReplyApprovalProcess(rap);
  145 + }
  146 +
  147 + return toAjax(i);
  148 + }
  149 +
  150 +
98 151
99 /** 152 /**
100 * 修改平台违规案卷 153 * 修改平台违规案卷
@@ -136,7 +189,7 @@ public class ViolationCaseFileController extends BaseController { @@ -136,7 +189,7 @@ public class ViolationCaseFileController extends BaseController {
136 "使用非专用车运输", "监控点位未对准", "工地预警-未报开工作业", "工地预警-视频设备离线超时报警", "工地预警-三无车辆进入工地", "工地预警-未按时间作业", 189 "使用非专用车运输", "监控点位未对准", "工地预警-未报开工作业", "工地预警-视频设备离线超时报警", "工地预警-三无车辆进入工地", "工地预警-未按时间作业",
137 "处理场所预警-未报开工作业", "处理场所预警-视频设备离线超时报警", "处理场所预警-三无车辆进入处理场所","处理场所预警-未到指定的处理场所作业", "离线运输报警(工)", "离线运输报警(消)", 190 "处理场所预警-未报开工作业", "处理场所预警-视频设备离线超时报警", "处理场所预警-三无车辆进入处理场所","处理场所预警-未到指定的处理场所作业", "离线运输报警(工)", "离线运输报警(消)",
138 "未激活车辆作业", "未核准作业车辆作业", "未按线路行驶", "闯禁行驶", "失信车辆作业", "卫星定位异常", 191 "未激活车辆作业", "未核准作业车辆作业", "未按线路行驶", "闯禁行驶", "失信车辆作业", "卫星定位异常",
139 - "其他2", "其他3", "其他4", "其他5" }; 192 + "超速提醒", "其他3", "其他4", "其他5" };
140 193
141 @GetMapping(value = "/caseTable") 194 @GetMapping(value = "/caseTable")
142 public AjaxResult getTable(String owningRegion, String startDate, String endDate,String violationObjectType) { 195 public AjaxResult getTable(String owningRegion, String startDate, String endDate,String violationObjectType) {
@@ -146,11 +199,6 @@ public class ViolationCaseFileController extends BaseController { @@ -146,11 +199,6 @@ public class ViolationCaseFileController extends BaseController {
146 owningRegion = ""; 199 owningRegion = "";
147 } 200 }
148 201
149 - if (startDate != null && endDate != null && startDate != "" && endDate != "") {  
150 - startDate = startDate.substring(0, 10);  
151 - endDate = endDate.substring(0, 10);  
152 - }  
153 -  
154 List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileListByTable(owningRegion, 202 List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileListByTable(owningRegion,
155 startDate, endDate,violationObjectType); 203 startDate, endDate,violationObjectType);
156 204
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationWarningInformationController.java
@@ -135,10 +135,17 @@ public class ViolationWarningInformationController extends BaseController @@ -135,10 +135,17 @@ public class ViolationWarningInformationController extends BaseController
135 } 135 }
136 136
137 137
  138 + @Log(title = "纯电动车统计管理")
  139 + @GetMapping("/getEVTable")
  140 + public AjaxResult getEVTable(ViolationWarningInformation violationWarningInformation)
  141 + {
  142 + return AjaxResult.success(violationWarningInformationService.getEVTable(violationWarningInformation));
  143 + }
  144 +
138 String[] caseType = {"工地预警-未报开工作业", "工地预警-视频设备离线超时报警", "工地预警-三无车辆进入工地", "工地预警-未按时间作业", 145 String[] caseType = {"工地预警-未报开工作业", "工地预警-视频设备离线超时报警", "工地预警-三无车辆进入工地", "工地预警-未按时间作业",
139 "处理场所预警-未报开工作业", "处理场所预警-视频设备离线超时报警", "处理场所预警-三无车辆进入处理场所", "处理场所预警-未到指定的处理场所作业", 146 "处理场所预警-未报开工作业", "处理场所预警-视频设备离线超时报警", "处理场所预警-三无车辆进入处理场所", "处理场所预警-未到指定的处理场所作业",
140 "离线运输报警(工)", "离线运输报警(消)", "未激活车辆作业", "未核准作业车辆作业", "未按线路行驶", 147 "离线运输报警(工)", "离线运输报警(消)", "未激活车辆作业", "未核准作业车辆作业", "未按线路行驶",
141 - "闯禁行驶", "失信车辆作业", "卫星定位异常"}; 148 + "闯禁行驶", "失信车辆作业", "卫星定位异常","超速提醒"};
142 149
143 @GetMapping(value = "/caseTable") 150 @GetMapping(value = "/caseTable")
144 public AjaxResult getTable(String owningRegion,String startDate,String endDate,String violationObjectType){ 151 public AjaxResult getTable(String owningRegion,String startDate,String endDate,String violationObjectType){
@@ -147,10 +154,6 @@ public class ViolationWarningInformationController extends BaseController @@ -147,10 +154,6 @@ public class ViolationWarningInformationController extends BaseController
147 if(owningRegion == null || owningRegion.equals("长沙市")){ 154 if(owningRegion == null || owningRegion.equals("长沙市")){
148 owningRegion = ""; 155 owningRegion = "";
149 } 156 }
150 - if(startDate != null && endDate != null&&startDate!=""&&endDate!=""){  
151 - startDate = startDate.substring(0,10);  
152 - endDate = endDate.substring(0,10);  
153 - }  
154 List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationListByTable(owningRegion,startDate,endDate,violationObjectType); 157 List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationListByTable(owningRegion,startDate,endDate,violationObjectType);
155 158
156 for(String type:caseType){ 159 for(String type:caseType){
@@ -196,7 +199,7 @@ public class ViolationWarningInformationController extends BaseController @@ -196,7 +199,7 @@ public class ViolationWarningInformationController extends BaseController
196 199
197 return AjaxResult.success(maps); 200 return AjaxResult.success(maps);
198 } 201 }
199 - 202 +
200 /** 203 /**
201 * 删除违规预警信息 204 * 删除违规预警信息
202 */ 205 */
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
@@ -79,7 +79,6 @@ public class ViolationCaseFile extends BaseEntity @@ -79,7 +79,6 @@ public class ViolationCaseFile extends BaseEntity
79 private Integer receiveStatus; 79 private Integer receiveStatus;
80 80
81 /** 阅览人 */ 81 /** 阅览人 */
82 - @Excel(name = "发送人")  
83 private String readBy; 82 private String readBy;
84 83
85 /** 阅览时间 */ 84 /** 阅览时间 */
@@ -97,7 +96,41 @@ public class ViolationCaseFile extends BaseEntity @@ -97,7 +96,41 @@ public class ViolationCaseFile extends BaseEntity
97 96
98 private String needUpload; 97 private String needUpload;
99 98
100 - public ViolationCaseFile() { 99 + private String timeType;
  100 +
  101 + private String delayedTime;
  102 +
  103 + @Excel(name = "发送人")
  104 + private String createBy;
  105 +
  106 +
  107 +
  108 +
  109 + public String getCreateBy() {
  110 + return createBy;
  111 + }
  112 +
  113 + public void setCreateBy(String createBy) {
  114 + this.createBy = createBy;
  115 + }
  116 +
  117 + public String getTimeType() {
  118 + return timeType;
  119 + }
  120 +
  121 + public void setTimeType(String timeType) {
  122 + this.timeType = timeType;
  123 + }
  124 +
  125 + public String getDelayedTime() {
  126 + return delayedTime;
  127 + }
  128 +
  129 + public void setDelayedTime(String delayedTime) {
  130 + this.delayedTime = delayedTime;
  131 + }
  132 +
  133 + public ViolationCaseFile() {
101 } 134 }
102 135
103 public ViolationCaseFile(JSONObject json) { 136 public ViolationCaseFile(JSONObject json) {
@@ -110,18 +143,17 @@ public class ViolationCaseFile extends BaseEntity @@ -110,18 +143,17 @@ public class ViolationCaseFile extends BaseEntity
110 this.createTime = d; 143 this.createTime = d;
111 144
112 this.violationObjectType = "0"; 145 this.violationObjectType = "0";
113 -  
114 - this.violationType = "工地预警-未按时间作业";  
115 this.violationGrade = "一般类"; 146 this.violationGrade = "一般类";
116 this.sendObject = "区管理部门"; 147 this.sendObject = "区管理部门";
  148 +// this.violationType = "工地预警-未按时间作业";
  149 +// this.owningRegion = json.getString("areaName");
117 150
118 151
119 152
120 this.projectName = json.getString("caseClassName"); // 153 this.projectName = json.getString("caseClassName"); //
121 154
122 - this.describe = "在"+json.getString("areaName")+"区域发现【"+json.getString("carNumber") +"】未按时间作业告警"; //json.getString("regCaseStandard"); 155 + this.describe = "在"+json.getString("areaName")+"区域发现【"+json.getString("carNumber") +"】" + json.getString("regCaseStandard");
123 156
124 - this.owningRegion = "芙蓉区";  
125 157
126 this.needUpload = "1"; 158 this.needUpload = "1";
127 159
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
@@ -63,7 +63,7 @@ public class Consumer { @@ -63,7 +63,7 @@ public class Consumer {
63 String[] code = {"44030020=工地预警-未报开工作业", "44030021=工地预警-视频设备离线超时报警", "44030022=工地预警-三无车辆进入工地", "44030023=工地预警-未按时间作业", 63 String[] code = {"44030020=工地预警-未报开工作业", "44030021=工地预警-视频设备离线超时报警", "44030022=工地预警-三无车辆进入工地", "44030023=工地预警-未按时间作业",
64 "44030024=处理场所预警-未报开工作业", "44030025=处理场所预警-视频设备离线超时报警", "44030026=处理场所预警-三无车辆进入处理场所", "44030027=处理场所预警-未到指定的处理场所作业", 64 "44030024=处理场所预警-未报开工作业", "44030025=处理场所预警-视频设备离线超时报警", "44030026=处理场所预警-三无车辆进入处理场所", "44030027=处理场所预警-未到指定的处理场所作业",
65 "44030028=离线运输报警(工)", "44030029=离线运输报警(消)", "44030030=未激活车辆作业", "44030031=未核准作业车辆作业", "44030032=未按线路行驶", 65 "44030028=离线运输报警(工)", "44030029=离线运输报警(消)", "44030030=未激活车辆作业", "44030031=未核准作业车辆作业", "44030032=未按线路行驶",
66 - "44030033=闯禁行驶", "44030034=失信车辆作业", "44030035=卫星定位异常"}; 66 + "44030033=闯禁行驶", "44030034=失信车辆作业", "44030035=卫星定位异常", "44030036=超速提醒"};
67 67
68 68
69 JSONObject jsonObject = JSONObject.parseObject(data); 69 JSONObject jsonObject = JSONObject.parseObject(data);
@@ -82,9 +82,6 @@ public class Consumer { @@ -82,9 +82,6 @@ public class Consumer {
82 tomorrowDate = DateFormatUtils.format(DateUtils.addDays(alarmTime, 1), "yyyy-MM-dd"); 82 tomorrowDate = DateFormatUtils.format(DateUtils.addDays(alarmTime, 1), "yyyy-MM-dd");
83 } 83 }
84 84
85 -  
86 -  
87 -  
88 //违规类型code 85 //违规类型code
89 String violationTypeCode = jsonObject.getString("alarmType"); 86 String violationTypeCode = jsonObject.getString("alarmType");
90 //违规类型 87 //违规类型
trash-workFlow/src/main/java/com/trash/casefile/mapper/ViolationWarningInformationMapper.java
@@ -38,6 +38,10 @@ public interface ViolationWarningInformationMapper @@ -38,6 +38,10 @@ public interface ViolationWarningInformationMapper
38 */ 38 */
39 List<ViolationWarningInformation> selectViolationWarningInformationList(ViolationWarningInformation violationWarningInformation); 39 List<ViolationWarningInformation> selectViolationWarningInformationList(ViolationWarningInformation violationWarningInformation);
40 List<ViolationWarningInformation> selectViolationWarningInformationListByTable(@Param("owningRegion") String owningRegion,@Param("startDate")String startDate,@Param("endDate")String endDate, @Param("violationObjectType")String violationObjectType); 40 List<ViolationWarningInformation> selectViolationWarningInformationListByTable(@Param("owningRegion") String owningRegion,@Param("startDate")String startDate,@Param("endDate")String endDate, @Param("violationObjectType")String violationObjectType);
  41 + List<ViolationWarningInformation> selectViolationWarningInformationListLessTime(ViolationWarningInformation violationWarningInformation);
  42 +
  43 +
  44 +
41 /** 45 /**
42 * 新增违规预警信息 46 * 新增违规预警信息
43 * 47 *
trash-workFlow/src/main/java/com/trash/casefile/service/IViolationWarningInformationService.java
@@ -2,10 +2,13 @@ package com.trash.casefile.service; @@ -2,10 +2,13 @@ package com.trash.casefile.service;
2 2
3 import java.io.IOException; 3 import java.io.IOException;
4 import java.util.List; 4 import java.util.List;
  5 +import java.util.Map;
5 6
6 import com.trash.casefile.domain.ViolationCaseFile; 7 import com.trash.casefile.domain.ViolationCaseFile;
7 import com.trash.casefile.domain.ViolationWarningInformation; 8 import com.trash.casefile.domain.ViolationWarningInformation;
8 import com.trash.casefile.domain.vo.ViolationWarningInformationVo; 9 import com.trash.casefile.domain.vo.ViolationWarningInformationVo;
  10 +import com.trash.common.core.domain.AjaxResult;
  11 +
9 import org.springframework.web.multipart.MultipartFile; 12 import org.springframework.web.multipart.MultipartFile;
10 13
11 /** 14 /**
@@ -67,4 +70,7 @@ public interface IViolationWarningInformationService { @@ -67,4 +70,7 @@ public interface IViolationWarningInformationService {
67 int deleteViolationWarningInformationById(Long id); 70 int deleteViolationWarningInformationById(Long id);
68 71
69 void updateViolationCaseFile(ViolationWarningInformation violationWarningInformation); 72 void updateViolationCaseFile(ViolationWarningInformation violationWarningInformation);
  73 +
  74 +
  75 + Map getEVTable(ViolationWarningInformation violationWarningInformation);
70 } 76 }
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
@@ -79,7 +79,11 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -79,7 +79,11 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
79 @Override 79 @Override
80 public List<ViolationCaseFile> selectViolationCaseFileList(ViolationCaseFile violationCaseFile) 80 public List<ViolationCaseFile> selectViolationCaseFileList(ViolationCaseFile violationCaseFile)
81 { 81 {
82 - 82 +
  83 + if(violationCaseFile.getNeedUpload() != null && violationCaseFile.getNeedUpload().equals("1")){
  84 + return violationCaseFileMapper.selectViolationCaseFileList(violationCaseFile);
  85 + }
  86 +
83 List<ViolationCaseFile> list = new ArrayList<>(); 87 List<ViolationCaseFile> list = new ArrayList<>();
84 JSONArray areas = redisCache.getCacheObject("areas"); 88 JSONArray areas = redisCache.getCacheObject("areas");
85 89
@@ -141,7 +145,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -141,7 +145,7 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
141 145
142 String cString = "工地预警-未报开工作业,工地预警-视频设备离线超时报警,工地预警-三无车辆进入工地,工地预警-未按时间作业,"; 146 String cString = "工地预警-未报开工作业,工地预警-视频设备离线超时报警,工地预警-三无车辆进入工地,工地预警-未按时间作业,";
143 String eString = "处理场所预警-未报开工作业,处理场所预警-视频设备离线超时报警,处理场所预警-三无车辆进入处理场所,处理场所预警-未到指定的处理场所作业"; 147 String eString = "处理场所预警-未报开工作业,处理场所预警-视频设备离线超时报警,处理场所预警-三无车辆进入处理场所,处理场所预警-未到指定的处理场所作业";
144 - String tString = "离线运输报警(工),离线运输报警(消),未激活车辆作业,未核准作业车辆作业,未按线路行驶,闯禁行驶,失信车辆作业,卫星定位异常"; 148 + String tString = "离线运输报警(工),离线运输报警(消),未激活车辆作业,未核准作业车辆作业,未按线路行驶,闯禁行驶,失信车辆作业,卫星定位异常,超速提醒";
145 149
146 @Override 150 @Override
147 public List<ViolationCaseFile> selectViolationCaseFileListByTable(String owningRegion,String startDate,String endDate,String violationObjectType) 151 public List<ViolationCaseFile> selectViolationCaseFileListByTable(String owningRegion,String startDate,String endDate,String violationObjectType)
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
@@ -6,6 +6,9 @@ import java.io.FileNotFoundException; @@ -6,6 +6,9 @@ import java.io.FileNotFoundException;
6 import java.io.FileReader; 6 import java.io.FileReader;
7 import java.io.IOException; 7 import java.io.IOException;
8 import java.util.ArrayList; 8 import java.util.ArrayList;
  9 +import java.util.Collection;
  10 +import java.util.Comparator;
  11 +import java.util.Date;
9 import java.util.HashMap; 12 import java.util.HashMap;
10 import java.util.List; 13 import java.util.List;
11 import java.util.Map; 14 import java.util.Map;
@@ -34,6 +37,7 @@ import com.trash.casefile.mapper.ViolationWarningInformationMapper; @@ -34,6 +37,7 @@ import com.trash.casefile.mapper.ViolationWarningInformationMapper;
34 import com.trash.casefile.domain.ViolationWarningInformation; 37 import com.trash.casefile.domain.ViolationWarningInformation;
35 import com.trash.casefile.service.IViolationWarningInformationService; 38 import com.trash.casefile.service.IViolationWarningInformationService;
36 import org.springframework.transaction.annotation.Transactional; 39 import org.springframework.transaction.annotation.Transactional;
  40 +import org.springframework.web.bind.annotation.RequestBody;
37 import org.springframework.web.multipart.MultipartFile; 41 import org.springframework.web.multipart.MultipartFile;
38 42
39 /** 43 /**
@@ -140,7 +144,7 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -140,7 +144,7 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
140 144
141 String cString = "工地预警-未报开工作业,工地预警-视频设备离线超时报警,工地预警-三无车辆进入工地,工地预警-未按时间作业,"; 145 String cString = "工地预警-未报开工作业,工地预警-视频设备离线超时报警,工地预警-三无车辆进入工地,工地预警-未按时间作业,";
142 String eString = "处理场所预警-未报开工作业,处理场所预警-视频设备离线超时报警,处理场所预警-三无车辆进入处理场所,处理场所预警-未到指定的处理场所作业"; 146 String eString = "处理场所预警-未报开工作业,处理场所预警-视频设备离线超时报警,处理场所预警-三无车辆进入处理场所,处理场所预警-未到指定的处理场所作业";
143 - String tString = "离线运输报警(工),离线运输报警(消),未激活车辆作业,未核准作业车辆作业,未按线路行驶,闯禁行驶,失信车辆作业,卫星定位异常"; 147 + String tString = "离线运输报警(工),离线运输报警(消),未激活车辆作业,未核准作业车辆作业,未按线路行驶,闯禁行驶,失信车辆作业,卫星定位异常,超速提醒";
144 148
145 @Override 149 @Override
146 public List<ViolationWarningInformation> selectViolationWarningInformationListByTable(String owningRegion,String startDate, String endDate,String violationObjectType) { 150 public List<ViolationWarningInformation> selectViolationWarningInformationListByTable(String owningRegion,String startDate, String endDate,String violationObjectType) {
@@ -411,4 +415,217 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -411,4 +415,217 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
411 public void updateViolationCaseFile(ViolationWarningInformation violationWarningInformation) { 415 public void updateViolationCaseFile(ViolationWarningInformation violationWarningInformation) {
412 violationWarningInformationMapper.updateViolationWarningInformation(violationWarningInformation); 416 violationWarningInformationMapper.updateViolationWarningInformation(violationWarningInformation);
413 } 417 }
  418 +
  419 + @Override
  420 + public Map getEVTable( ViolationWarningInformation violationWarningInformation) {
  421 +
  422 +// if(redisCache.getCacheObject("EVTdata"+ violationWarningInformation.getViolationObjectType()) != null){
  423 +// return redisCache.getCacheObject("EVTdata"+ violationWarningInformation.getViolationObjectType());
  424 +// }
  425 +
  426 +
  427 + Date date = new Date();
  428 + if(violationWarningInformation.getViolationObjectType().equals("周")){
  429 + date.setDate(date.getDate()-7);
  430 + violationWarningInformation.setCreateTime(date);
  431 + }else if(violationWarningInformation.getViolationObjectType().equals("月")){
  432 + date.setMonth(date.getMonth()-1);
  433 + violationWarningInformation.setCreateTime(date);
  434 + }else if(violationWarningInformation.getViolationObjectType().equals("季度")){
  435 + date.setMonth(date.getMonth()-3);
  436 + violationWarningInformation.setCreateTime(date);
  437 + }else if(violationWarningInformation.getViolationObjectType().equals("年")){
  438 + date.setYear(date.getYear()-1);
  439 + violationWarningInformation.setCreateTime(date);
  440 + }else{
  441 + return null;
  442 + }
  443 +
  444 +
  445 + List<ViolationWarningInformation> list = violationWarningInformationMapper.selectViolationWarningInformationListLessTime(violationWarningInformation);
  446 + Map<String, List> data = new HashMap<>();
  447 +
  448 +
  449 + Map<String,Map> companyMap = new HashMap<>();
  450 + Map<String,Map> truckMap = new HashMap<>();
  451 +
  452 + for(int i =0 ;i<list.size();i++){
  453 +
  454 + String companyName = list.get(i).getCompanyName();
  455 +
  456 + if(companyMap.get(companyName) == null){
  457 + companyMap.put(companyName, new HashMap<>());
  458 + companyMap.get(companyName).put("count", 0);
  459 + }
  460 + int count = (int) companyMap.get(companyName).get("count");
  461 + int typeCount = 0;
  462 + if(companyMap.get(companyName).get(list.get(i).getViolationType()) != null){
  463 + typeCount = (int) companyMap.get(companyName).get(list.get(i).getViolationType());
  464 + }
  465 + companyMap.get(companyName).put("count",count+1);
  466 + companyMap.get(companyName).put(list.get(i).getViolationType(),typeCount+1);
  467 + String truckNo = null;
  468 + try{
  469 +
  470 + truckNo = list.get(i).getDescribe().split(list.get(i).getCompanyName())[1].substring(1,8);
  471 + if(truckMap.get(truckNo) == null){
  472 + truckMap.put(truckNo, new HashMap<>());
  473 + truckMap.get(truckNo).put("count", 0);
  474 + }
  475 +
  476 + count = (int) truckMap.get(truckNo).get("count");
  477 + typeCount = 0;
  478 + if(truckMap.get(truckNo).get(list.get(i).getViolationType()) != null){
  479 + typeCount = (int) truckMap.get(truckNo).get(list.get(i).getViolationType());
  480 + }
  481 +
  482 + truckMap.get(truckNo).put("count",count+1);
  483 + truckMap.get(truckNo).put(list.get(i).getViolationType(),typeCount+1);
  484 + }catch(Exception e){
  485 + e.printStackTrace();
  486 + }
  487 +
  488 +
  489 + }
  490 +
  491 +
  492 + List companys = new ArrayList<Map<String, String>>();
  493 + List trucks = new ArrayList<Map<String, String>>();
  494 +
  495 +
  496 + for(String k:companyMap.keySet()){
  497 +
  498 + companyMap.get(k).put("name", k);
  499 +
  500 + companys.add(companyMap.get(k));
  501 + }
  502 +
  503 +
  504 + for(String k:truckMap.keySet()){
  505 +
  506 + truckMap.get(k).put("name", k);
  507 +
  508 + trucks.add(truckMap.get(k));
  509 + }
  510 +
  511 + trucks.sort(new Comparator<Map>() {
  512 +
  513 + @Override
  514 + public int compare(Map o1, Map o2) {
  515 + return ((int)o2.get("count") - (int)o1.get("count"));
  516 + }
  517 + });
  518 +
  519 + companys.sort(new Comparator<Map>() {
  520 +
  521 + @Override
  522 + public int compare(Map o1, Map o2) {
  523 + return ((int)o2.get("count") - (int)o1.get("count"));
  524 + }
  525 + });
  526 + if(companys.size() > 10){
  527 + companys = companys.subList(0, 10);
  528 + }
  529 +
  530 + if(trucks.size() > 10){
  531 + trucks = trucks.subList(0, 10);
  532 + }
  533 + data.put("company", companys);
  534 +
  535 + data.put("truck", trucks);
  536 +
  537 +
  538 + date.setMonth(0);
  539 + date.setDate(1);
  540 + date.setHours(0);
  541 + date.setMinutes(0);
  542 + date.setSeconds(0);
  543 + violationWarningInformation.setCreateTime(date);
  544 +
  545 + list = violationWarningInformationMapper.selectViolationWarningInformationListLessTime(violationWarningInformation);
  546 +
  547 +
  548 + List<Map> years = new ArrayList<Map>();
  549 + List<Map> months = new ArrayList<Map>();
  550 +
  551 + years.add(new HashMap<>());
  552 + years.get(0).put("count", 0);
  553 +
  554 + for(int i = 0 ; i < (new Date().getMonth() + 1);i++ ){
  555 + years.get(0).put((i+1) + "月", 0);
  556 + }
  557 +
  558 +
  559 + months.add(new HashMap<>());
  560 + months.add(new HashMap<>());
  561 +
  562 + months.get(0).put("count", 0);
  563 + months.get(1).put("count", 0);
  564 +
  565 +
  566 + Date now = new Date();
  567 +
  568 + now.setDate(1);
  569 + now.setHours(0);
  570 + now.setMinutes(0);
  571 + now.setSeconds(0);
  572 +
  573 + long thisMonth = now.getTime();
  574 +
  575 + now.setMonth(now.getMonth()-1);
  576 +
  577 + long lastMonth = now.getTime();
  578 +
  579 + for(int i =0 ; i < list.size();i++){
  580 +
  581 + if(list.get(i).getCreateTime().getYear() < now.getYear()){
  582 + continue;
  583 + }
  584 +
  585 + int count = (int) years.get(0).get("count");
  586 + int typeCount = (int) years.get(0).get((list.get(i).getCreateTime().getMonth()+1) + "月");
  587 + years.get(0).put("count",count+1);
  588 + years.get(0).put((list.get(i).getCreateTime().getMonth()+1) + "月",typeCount+1);
  589 + }
  590 +
  591 +
  592 + violationWarningInformation.setCreateTime(now);
  593 + list = violationWarningInformationMapper.selectViolationWarningInformationListLessTime(violationWarningInformation);
  594 +
  595 + for(int i = 0;i<list.size();i++){
  596 + int count = 0;
  597 + int typeCount = 0;
  598 + if(list.get(i).getCreateTime().getTime() > thisMonth){
  599 + count = (int) months.get(0).get("count");
  600 + typeCount = 0;
  601 + if(months.get(0).get(list.get(i).getViolationType()) != null){
  602 + typeCount = (int) months.get(0).get(list.get(i).getViolationType());
  603 + }
  604 + months.get(0).put("count",count+1);
  605 + months.get(0).put(list.get(i).getViolationType(),typeCount+1);
  606 + }
  607 +
  608 + if(list.get(i).getCreateTime().getTime() > lastMonth && list.get(i).getCreateTime().getTime() < thisMonth){
  609 + count = (int) months.get(1).get("count");
  610 + typeCount = 0;
  611 + if(months.get(1).get(list.get(i).getViolationType()) != null){
  612 + typeCount = (int) months.get(1).get(list.get(i).getViolationType());
  613 + }
  614 + months.get(1).put("count",count+1);
  615 + months.get(1).put(list.get(i).getViolationType(),typeCount+1);
  616 + }
  617 + }
  618 +
  619 +
  620 +
  621 +
  622 +
  623 + data.put("year", years);
  624 +
  625 + data.put("month", months);
  626 +
  627 + redisCache.setCacheObject("EVTdata" + violationWarningInformation.getViolationObjectType(), data,30,TimeUnit.MINUTES);
  628 +
  629 + return data;
  630 + }
414 } 631 }
trash-workFlow/src/main/java/com/trash/workflow/listener/casefileListener.java
@@ -57,28 +57,38 @@ public class casefileListener implements ExecutionListener { @@ -57,28 +57,38 @@ public class casefileListener implements ExecutionListener {
57 57
58 List<ReplyApprovalProcess> repList = SpringUtils.getBean(ReplyApprovalProcessMapper.class).selectReplyApprovalProcessList(replyApprovalProcess); 58 List<ReplyApprovalProcess> repList = SpringUtils.getBean(ReplyApprovalProcessMapper.class).selectReplyApprovalProcessList(replyApprovalProcess);
59 59
60 - replyApprovalProcess = repList.get(0);  
61 60
62 - Map map = new HashMap();  
63 -  
64 - for(String file :replyApprovalProcess.getReplyImg().split(",")){  
65 -  
66 - if(file.toUpperCase().endsWith("JPG")  
67 - || file.toUpperCase().endsWith("PNG")  
68 - || file.toUpperCase().endsWith("JPEG")){  
69 - map.put("attchType", 0);  
70 - }else if(file.toUpperCase().endsWith("MP3")){  
71 - map.put("attchType", 1);  
72 - }else if(file.toUpperCase().endsWith("MP4") || file.toUpperCase().endsWith("AVI")){  
73 - map.put("attchType", 2); 61 + for(ReplyApprovalProcess rep:repList){
  62 + if(rep.getReplyImg() == null){
  63 + continue;
74 } 64 }
75 65
76 - map.put("attchFileName", file.split("/")[file.split("/").length-1]);  
77 - map.put("attchFilePath", "http://172.26.157.12:10001/workflow" + file); 66 + replyApprovalProcess = rep;
  67 +
  68 + Map map = new HashMap();
  69 +
  70 + for(String file :replyApprovalProcess.getReplyImg().split(",")){
78 71
79 -  
80 - upfiles.add(map);  
81 - } 72 + if(file.toUpperCase().endsWith("JPG")
  73 + || file.toUpperCase().endsWith("PNG")
  74 + || file.toUpperCase().endsWith("JPEG")){
  75 + map.put("attchType", 0);
  76 + }else if(file.toUpperCase().endsWith("MP3")){
  77 + map.put("attchType", 1);
  78 + }else if(file.toUpperCase().endsWith("MP4") || file.toUpperCase().endsWith("AVI")){
  79 + map.put("attchType", 2);
  80 + }
  81 +
  82 + map.put("attchFileName", file.split("/")[file.split("/").length-1]);
  83 + map.put("attchFilePath", "http://172.26.157.12:10001/workflow" + file);
  84 +
  85 +
  86 + upfiles.add(map);
  87 + }
  88 + break;
  89 + }
  90 +
  91 +
82 92
83 93
84 Map params = new HashMap<>(); 94 Map params = new HashMap<>();
trash-workFlow/src/main/resources/mapper/casefile/ViolationCaseFileMapper.xml
@@ -58,8 +58,14 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -58,8 +58,14 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
58 #{name} 58 #{name}
59 </foreach> 59 </foreach>
60 </if> 60 </if>
  61 + <if test="needUpload == null or needUpload == 0 ">
  62 + and need_upload != 1
  63 + </if>
  64 + <if test="needUpload == 1 ">
  65 + and need_upload = 1
  66 + </if>
  67 +
61 </where> 68 </where>
62 - or need_upload = 1  
63 order by create_time desc 69 order by create_time desc
64 </select> 70 </select>
65 71
trash-workFlow/src/main/resources/mapper/casefile/ViolationWarningInformationMapper.xml
@@ -131,6 +131,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -131,6 +131,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
131 </trim> 131 </trim>
132 where id = #{id} 132 where id = #{id}
133 </update> 133 </update>
  134 +
  135 +
  136 + <select id="selectViolationWarningInformationListLessTime" resultType="com.trash.casefile.domain.ViolationWarningInformation">
  137 + select * from casefile_violation_warning_information where create_time > #{createTime}
  138 + </select>
134 139
135 <delete id="deleteViolationWarningInformationById" parameterType="Long"> 140 <delete id="deleteViolationWarningInformationById" parameterType="Long">
136 delete from casefile_violation_warning_information where id = #{id} 141 delete from casefile_violation_warning_information where id = #{id}