Commit 7559d99e22ed0484f3ebbb20953ba51ece1701eb

Authored by youxiw2000
1 parent 0ca2eb74

m

Showing 30 changed files with 1835 additions and 897 deletions
trash-admin/settings.txt
1 -2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1 2 1 1  
2 \ No newline at end of file 1 \ No newline at end of file
  2 +2 1 10 2 1 10 2 1 10 2 1 10 2 1 10 2 1 10 2 1 10 2 1 10
3 \ No newline at end of file 3 \ No newline at end of file
trash-admin/src/main/resources/183.66.242.6.crt 0 → 100644
  1 +-----BEGIN CERTIFICATE-----
  2 +MIIEhjCCAm6gAwIBAgICEREwDQYJKoZIhvcNAQELBQAwbTELMAkGA1UEBhMCQ04x
  3 +DjAMBgNVBAgMBUh1bmFuMREwDwYDVQQHDAhDaGFuZ3NoYTERMA8GA1UECgwIU3Ry
  4 +ZWFtYXgxETAPBgNVBAsMCFN0cmVhbWF4MRUwEwYDVQQDDAwxODMuNjYuMjQyLjYw
  5 +HhcNMjQwMTA5MDcyNDU0WhcNMjQwMjA4MDcyNDU0WjBtMQswCQYDVQQGEwJDTjEO
  6 +MAwGA1UECAwFSHVuYW4xETAPBgNVBAcMCENoYW5nc2hhMREwDwYDVQQKDAhTdHJl
  7 +YW1heDERMA8GA1UECwwIU3RyZWFtYXgxFTATBgNVBAMMDDE4My42Ni4yNDIuNjCC
  8 +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALSSZZJ7E/x7yd/yIPW0dwxG
  9 +yrqX32q2035s6itrYy0Fk1Fnzp66U/pgkwkOz7LRGOEanzqgsYxoKuIdgroEeoqC
  10 +44NN9sdICuYyl2m8jkF5SNRWjkq+WWKNK/CBJxaZSCgNwxmRKgw61GIBGZiSPJM5
  11 +0yMj6uZ14zKKKTBfBspnPyMoyJUd+fT056DS6TTFjig+Q7xJ+j2+iSYnTBxBpQJi
  12 +0lXswCnShQXC+4MqG7+QvDhnEqzL6q/WagUXMY14z3EpGbgZuE9By+mAMVkqUAjb
  13 +6zj4YHkdKyXHag3SV+0huF6Qv6RdoBOd4hKoGsqGy0Jy2HuNrqINZZPZt+OI8HUC
  14 +AwEAAaMwMC4wFwYDVR0RBBAwDoIAhwS3QvIGhwQKHhkdMBMGA1UdJQQMMAoGCCsG
  15 +AQUFBwMBMA0GCSqGSIb3DQEBCwUAA4ICAQAxSefkJ5hXC/GB4lok98T2e/T8a4ve
  16 +j91/flFsE5A5MGdqi+Hj6Xpg+3uPuI/X17DRm8Zlofnyr4O6aHfYJNob75cn6OUF
  17 +HRi7MV24BY8fjLE0lYMaC51vdg5WDftoGDwHcVfRcVI1MFgNibBVIiYh+3RyhC7c
  18 ++WxhL6UJF1xrN5KCSHe1mGcZjwee4REcmKd1m5nZNQJAhCINeEEVQyHwrN1RYhn8
  19 +aeHEdrN+qrLCCWpURyGQt+8+mhAkwMTt3WcyW67eq9IPfGL6J2z0V/gpCGZy9vhO
  20 +GB3zonFazIeaGYJZXAg82ZHcVBNYh23XC6zqcSuvWigW6IVhStEImky7WFxG4M7y
  21 +0uASmoTjbozkzwhblHBl1D3VodGJAYD4zSzMe0ZcCiaMGshHsK7x7wLwHywFwdFI
  22 +yg5PpVISBosZE4YdI/F/3Dylft6lShO3uVqyX/alYcdHlJRaDVpVuJLFBT5r08BD
  23 +LP/PJkFUayFyVq08X+Zn9n3zHvFbZqloA9dt9BCSYm6Ucl+JttdwufllbPeCqYnP
  24 +KsFtaiBRmDUHLX83AHnvO4XaGKbQcUMqCTQmTJrhTw20lo8uTaugWmahPi11b+LK
  25 +8BaqXUJucNzEUC37IWH0SgbWl75m9Frlvezsrl50NAL+7/aOEgxXen6mJAexBSON
  26 +16BJ5xHG9whbPw==
  27 +-----END CERTIFICATE-----
trash-admin/src/main/resources/EC_keystore.jks 0 → 100644
No preview for this file type
trash-admin/src/main/resources/application-dev.yml
@@ -16,9 +16,9 @@ trash: @@ -16,9 +16,9 @@ trash:
16 # 验证码类型 math 数组计算 char 字符验证 16 # 验证码类型 math 数组计算 char 字符验证
17 captchaType: math 17 captchaType: math
18 # 远程服务器地址 18 # 远程服务器地址
19 - #remotePath: http://175.6.47.84:8008 19 + #remotePath: https://175.6.47.84:8008
20 #token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJkdXJhYmxlIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg1NDE2NjEzMzU1fQ.58-J0KKfsK2pQhDQAzaBaUj-oFWMbYF1YzMAcshmcfidIkW16TZWIVhAVKPvCJvWfG54x7xB-ETxKCDLFnSctQ 20 #token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJkdXJhYmxlIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg1NDE2NjEzMzU1fQ.58-J0KKfsK2pQhDQAzaBaUj-oFWMbYF1YzMAcshmcfidIkW16TZWIVhAVKPvCJvWfG54x7xB-ETxKCDLFnSctQ
21 - remotePath: http://183.66.242.6:14601 21 + remotePath: https://183.66.242.6:14601
22 token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w 22 token: durable:auth:token:eyJhbGciOiJIUzUxMiJ9.eyJ5ZWEiOiJjc3poIiwiZXhwIjo0MTAyNDE1OTk5LCJjcmVhdGVkIjoxNjg0NDU5MjEzNzQ2fQ.85oIrOnU7cz7L_-IGt4Bt1LXDTkFtyrdqNt05K0v9-4nsrrzzpbjbemK-yMlbnUpe4Fx2FFES-Wbw8Yr8ML69w
23 23
24 24
trash-admin/src/main/resources/application.yml
@@ -80,7 +80,10 @@ swagger: @@ -80,7 +80,10 @@ swagger:
80 enabled: false 80 enabled: false
81 # 请求前缀 81 # 请求前缀
82 pathMapping: /dev-api 82 pathMapping: /dev-api
83 - 83 +
  84 +swagger-ui:
  85 + # 是否开启swagger
  86 + enabled: false
84 87
85 # 防止XSS攻击 88 # 防止XSS攻击
86 xss: 89 xss:
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
1 package com.trash.common.utils; 1 package com.trash.common.utils;
2 2
  3 +import java.io.File;
  4 +import java.io.FileInputStream;
  5 +import java.io.FileNotFoundException;
3 import java.io.IOException; 6 import java.io.IOException;
  7 +import java.io.InputStream;
  8 +import java.security.GeneralSecurityException;
  9 +import java.security.KeyStore;
  10 +import java.security.SecureRandom;
  11 +import java.security.cert.Certificate;
  12 +import java.security.cert.CertificateException;
  13 +import java.security.cert.CertificateFactory;
  14 +import java.security.cert.X509Certificate;
  15 +import java.util.ArrayList;
  16 +import java.util.Arrays;
  17 +import java.util.Collection;
4 import java.util.HashMap; 18 import java.util.HashMap;
5 import java.util.List; 19 import java.util.List;
6 import java.util.Map; 20 import java.util.Map;
7 import java.util.concurrent.TimeUnit; 21 import java.util.concurrent.TimeUnit;
8 22
9 -import org.springframework.beans.factory.annotation.Autowired;  
10 -import org.springframework.beans.factory.annotation.Value;  
11 -import org.springframework.context.annotation.Configuration;  
12 -import org.springframework.context.annotation.PropertySource; 23 +import javax.net.ssl.HostnameVerifier;
  24 +import javax.net.ssl.KeyManagerFactory;
  25 +import javax.net.ssl.SSLContext;
  26 +import javax.net.ssl.SSLSession;
  27 +import javax.net.ssl.SSLSocketFactory;
  28 +import javax.net.ssl.TrustManager;
  29 +import javax.net.ssl.TrustManagerFactory;
  30 +import javax.net.ssl.X509TrustManager;
13 31
14 import com.alibaba.fastjson.JSON; 32 import com.alibaba.fastjson.JSON;
15 import com.alibaba.fastjson.JSONArray; 33 import com.alibaba.fastjson.JSONArray;
16 import com.alibaba.fastjson.JSONObject; 34 import com.alibaba.fastjson.JSONObject;
17 -import com.trash.common.config.trashConfig;  
18 -import com.trash.common.core.redis.RedisCache;  
19 -import com.trash.common.utils.SecurityUtils;  
20 35
21 import okhttp3.MediaType; 36 import okhttp3.MediaType;
22 import okhttp3.OkHttpClient; 37 import okhttp3.OkHttpClient;
@@ -24,122 +39,114 @@ import okhttp3.Request; @@ -24,122 +39,114 @@ import okhttp3.Request;
24 import okhttp3.RequestBody; 39 import okhttp3.RequestBody;
25 40
26 public class RemoteServerUtils { 41 public class RemoteServerUtils {
27 -  
28 -// public static String remote = "http://183.66.242.6:14601/";  
29 -  
30 -// public static String remote = "http://175.6.47.84:8008/";  
31 -  
32 - 42 +
  43 + // public static String remote = "http://183.66.242.6:14601/";
  44 +
  45 + // public static String remote = "http://175.6.47.84:8008/";
  46 +
33 public static String remote; 47 public static String remote;
34 - 48 +
35 public static OkHttpClient okHttpClient; 49 public static OkHttpClient okHttpClient;
36 - 50 +
37 public static String TruckListRequestPath = "/api/gpsservice/cs/basevehicle/ledger/list"; 51 public static String TruckListRequestPath = "/api/gpsservice/cs/basevehicle/ledger/list";
38 - 52 +
39 public static String UpdateTruckRequestPath = "/api/gpsservice/cs/basevehicle/credit/status"; 53 public static String UpdateTruckRequestPath = "/api/gpsservice/cs/basevehicle/credit/status";
40 - 54 +
41 public static String TruckStatusListRequestPath = "/api/gpsservice/cs/basevehicle/statusquery"; 55 public static String TruckStatusListRequestPath = "/api/gpsservice/cs/basevehicle/statusquery";
42 -  
43 -  
44 - 56 +
45 public static String TruckInfo = "/api/gpsservice/cs/basevehicle/"; 57 public static String TruckInfo = "/api/gpsservice/cs/basevehicle/";
46 public static String EarthSitesInfo = "/api/siteservice/cs/earthsites/"; 58 public static String EarthSitesInfo = "/api/siteservice/cs/earthsites/";
47 - 59 +
48 public static String EarthSitesList = "/api/siteservice/cs/earthsites/ledger/list"; 60 public static String EarthSitesList = "/api/siteservice/cs/earthsites/ledger/list";
49 - 61 +
50 public static String ConstructionInfo = "/api/siteservice/cs/constructionsites/"; 62 public static String ConstructionInfo = "/api/siteservice/cs/constructionsites/";
51 -  
52 - //license/ 留一下... 63 +
  64 + // license/ 留一下...
53 public static String constructionLicenseById = "/api/siteservice/cs/constructionsites/"; 65 public static String constructionLicenseById = "/api/siteservice/cs/constructionsites/";
54 66
55 public static String ConstructionList = "/api/siteservice/cs/constructionsites/search"; 67 public static String ConstructionList = "/api/siteservice/cs/constructionsites/search";
56 -  
57 - public static String UpdateConstruction= "/api/siteservice/cs/constructionsites/status";  
58 68
59 - public static String UpdateSupervision= "/api/gpsservice/cs/supervision/status/update"; 69 + public static String UpdateConstruction = "/api/siteservice/cs/constructionsites/status";
  70 +
  71 + public static String UpdateSupervision = "/api/gpsservice/cs/supervision/status/update";
60 72
61 -  
62 public static String CompanyListRequestPath = "/api/gpsservice/cs/companies/ledger/list"; 73 public static String CompanyListRequestPath = "/api/gpsservice/cs/companies/ledger/list";
63 - 74 +
64 public static String UpdateCompanyRequestPath = "/api/gpsservice/cs/companies/credit/status"; 75 public static String UpdateCompanyRequestPath = "/api/gpsservice/cs/companies/credit/status";
65 76
66 public static String UpdateEarthSiteRequestPath = "/api/siteservice/cs/earthsites/status"; 77 public static String UpdateEarthSiteRequestPath = "/api/siteservice/cs/earthsites/status";
67 78
68 public static String UpdateConractRequestPath = "/api/siteservice/cs/sitecontract/audit/status"; 79 public static String UpdateConractRequestPath = "/api/siteservice/cs/sitecontract/audit/status";
69 - 80 +
70 public static String DriverListPath = "/api/gpsservice/v1/drivers/search"; 81 public static String DriverListPath = "/api/gpsservice/v1/drivers/search";
71 - 82 +
72 public static String CompanyUpdateAudit = "/api/gpsservice/cs/companies/audit/status"; 83 public static String CompanyUpdateAudit = "/api/gpsservice/cs/companies/audit/status";
73 84
74 public static String TruckUpdateAudit = "/api/gpsservice/cs/basevehicle/audit/status"; 85 public static String TruckUpdateAudit = "/api/gpsservice/cs/basevehicle/audit/status";
75 - 86 +
76 public static String DriverUpdateAudit = "/api/gpsservice/v1/drivers/audit/status"; 87 public static String DriverUpdateAudit = "/api/gpsservice/v1/drivers/audit/status";
77 - 88 +
78 public static String BasevehicleInfo = "/api/gpsservice/cs/basevehicle/"; 89 public static String BasevehicleInfo = "/api/gpsservice/cs/basevehicle/";
79 - 90 +
80 public static String ContractList = "/api/siteservice/cs/sitecontract/ledger/list"; 91 public static String ContractList = "/api/siteservice/cs/sitecontract/ledger/list";
81 - 92 +
82 public static String Unitetransport = "/api/siteservice/cs/unitetransport/bysite/"; 93 public static String Unitetransport = "/api/siteservice/cs/unitetransport/bysite/";
83 -  
84 - 94 +
85 public static String GETAUTH = "/api/gpsservice/cs/authority"; 95 public static String GETAUTH = "/api/gpsservice/cs/authority";
86 -  
87 -  
88 - public static JSONArray getUnitetransport(String id){  
89 - JSONArray list = null; 96 +
  97 + public static JSONArray getUnitetransport(String id) {
  98 + JSONArray list = null;
90 try { 99 try {
91 - list = (JSONArray)get(Unitetransport+id,null); 100 + list = (JSONArray) get(Unitetransport + id, null);
92 } catch (Exception e) { 101 } catch (Exception e) {
93 // TODO: handle exception 102 // TODO: handle exception
94 } 103 }
95 - 104 +
96 return list; 105 return list;
97 } 106 }
98 -  
99 -  
100 - public static JSONArray getContractList(Map map){  
101 - JSONArray list=null;  
102 - Object object = post(ContractList,map);  
103 -  
104 - if(object != null){  
105 - JSONObject jsonObject = JSON.parseObject(object.toString());  
106 - list = jsonObject.getJSONArray("list"); 107 +
  108 + public static JSONArray getContractList(Map map) {
  109 + JSONArray list = null;
  110 + Object object = post(ContractList, map);
  111 +
  112 + if (object != null) {
  113 + JSONObject jsonObject = JSON.parseObject(object.toString());
  114 + list = jsonObject.getJSONArray("list");
107 } 115 }
108 - 116 +
109 return list; 117 return list;
110 } 118 }
111 -  
112 - public static JSONArray getContractList(Map map,String token){  
113 -  
114 - JSONArray list=null;  
115 - Object object = post(ContractList,map,token);  
116 -  
117 - if(object != null){  
118 - JSONObject jsonObject = JSON.parseObject(object.toString());  
119 - list = jsonObject.getJSONArray("list"); 119 +
  120 + public static JSONArray getContractList(Map map, String token) {
  121 +
  122 + JSONArray list = null;
  123 + Object object = post(ContractList, map, token);
  124 +
  125 + if (object != null) {
  126 + JSONObject jsonObject = JSON.parseObject(object.toString());
  127 + list = jsonObject.getJSONArray("list");
120 } 128 }
121 - 129 +
122 return list; 130 return list;
123 } 131 }
124 -  
125 -  
126 - public static JSONArray getEarthSitesList(Map map){  
127 - JSONArray list=null;  
128 - Object object = post(EarthSitesList,map);  
129 -  
130 - if(object != null){  
131 - JSONObject jsonObject = JSON.parseObject(object.toString());  
132 - list = jsonObject.getJSONArray("list"); 132 +
  133 + public static JSONArray getEarthSitesList(Map map) {
  134 + JSONArray list = null;
  135 + Object object = post(EarthSitesList, map);
  136 +
  137 + if (object != null) {
  138 + JSONObject jsonObject = JSON.parseObject(object.toString());
  139 + list = jsonObject.getJSONArray("list");
133 } 140 }
134 - 141 +
135 return list; 142 return list;
136 } 143 }
137 144
138 - public static JSONArray getEarthSitesList(Map map,String token){  
139 - JSONArray list=null;  
140 - Object object = post(EarthSitesList,map,token); 145 + public static JSONArray getEarthSitesList(Map map, String token) {
  146 + JSONArray list = null;
  147 + Object object = post(EarthSitesList, map, token);
141 148
142 - if(object != null){ 149 + if (object != null) {
143 JSONObject jsonObject = JSON.parseObject(object.toString()); 150 JSONObject jsonObject = JSON.parseObject(object.toString());
144 list = jsonObject.getJSONArray("list"); 151 list = jsonObject.getJSONArray("list");
145 } 152 }
@@ -147,11 +154,11 @@ public class RemoteServerUtils { @@ -147,11 +154,11 @@ public class RemoteServerUtils {
147 return list; 154 return list;
148 } 155 }
149 156
150 - public static JSONArray getConstructionList(Map map){  
151 - JSONArray list=null;  
152 - Object object = post(ConstructionList,map); 157 + public static JSONArray getConstructionList(Map map) {
  158 + JSONArray list = null;
  159 + Object object = post(ConstructionList, map);
153 160
154 - if(object != null){ 161 + if (object != null) {
155 JSONObject jsonObject = JSON.parseObject(object.toString()); 162 JSONObject jsonObject = JSON.parseObject(object.toString());
156 list = jsonObject.getJSONArray("list"); 163 list = jsonObject.getJSONArray("list");
157 } 164 }
@@ -159,11 +166,11 @@ public class RemoteServerUtils { @@ -159,11 +166,11 @@ public class RemoteServerUtils {
159 return list; 166 return list;
160 } 167 }
161 168
162 - public static JSONArray getConstructionList(Map map,String token){  
163 - JSONArray list=null;  
164 - Object object = post(ConstructionList,map,token); 169 + public static JSONArray getConstructionList(Map map, String token) {
  170 + JSONArray list = null;
  171 + Object object = post(ConstructionList, map, token);
165 172
166 - if(object != null){ 173 + if (object != null) {
167 JSONObject jsonObject = JSON.parseObject(object.toString()); 174 JSONObject jsonObject = JSON.parseObject(object.toString());
168 list = jsonObject.getJSONArray("list"); 175 list = jsonObject.getJSONArray("list");
169 } 176 }
@@ -171,121 +178,117 @@ public class RemoteServerUtils { @@ -171,121 +178,117 @@ public class RemoteServerUtils {
171 return list; 178 return list;
172 } 179 }
173 180
174 - public static JSONArray getTruckOnline(Map map){  
175 - JSONArray turckList=null;  
176 - Object object = post(TruckStatusListRequestPath,map);  
177 -  
178 - if(object != null){  
179 - JSONObject jsonObject = JSON.parseObject(object.toString());  
180 - turckList = jsonObject.getJSONArray("list"); 181 + public static JSONArray getTruckOnline(Map map) {
  182 + JSONArray turckList = null;
  183 + Object object = post(TruckStatusListRequestPath, map);
  184 +
  185 + if (object != null) {
  186 + JSONObject jsonObject = JSON.parseObject(object.toString());
  187 + turckList = jsonObject.getJSONArray("list");
181 } 188 }
182 - 189 +
183 return turckList; 190 return turckList;
184 } 191 }
185 -  
186 - public static Object updateConstationCreditAndStatus(List<Map> map){  
187 - JSONArray turckList=null;  
188 - Object object = post(UpdateConstruction,map);  
189 - 192 +
  193 + public static Object updateConstationCreditAndStatus(List<Map> map) {
  194 + JSONArray turckList = null;
  195 + Object object = post(UpdateConstruction, map);
  196 +
190 return object; 197 return object;
191 } 198 }
192 199
193 - public static Object UpdateSupervisionStatus(List<Map> map){  
194 - Object object = post(UpdateSupervision,map); 200 + public static Object UpdateSupervisionStatus(List<Map> map) {
  201 + Object object = post(UpdateSupervision, map);
195 202
196 return object; 203 return object;
197 } 204 }
198 -  
199 -  
200 - public static Object updateCompanyAudit(List<Map> map,String token){  
201 - Object object = post(CompanyUpdateAudit,map,token); 205 +
  206 + public static Object updateCompanyAudit(List<Map> map, String token) {
  207 + Object object = post(CompanyUpdateAudit, map, token);
202 return object; 208 return object;
203 } 209 }
204 - public static Object updateTruckAudit(List<Map> map,String token){  
205 - Object object = post(TruckUpdateAudit,map,token); 210 +
  211 + public static Object updateTruckAudit(List<Map> map, String token) {
  212 + Object object = post(TruckUpdateAudit, map, token);
206 return object; 213 return object;
207 } 214 }
208 -  
209 - public static Object updateDriverAudit(List<Map> map,String token){  
210 - Object object = post(DriverUpdateAudit,map,token); 215 +
  216 + public static Object updateDriverAudit(List<Map> map, String token) {
  217 + Object object = post(DriverUpdateAudit, map, token);
211 return object; 218 return object;
212 } 219 }
213 -  
214 - public static Object updateCompanyAudit(List<Map> map){  
215 - Object object = post(CompanyUpdateAudit,map); 220 +
  221 + public static Object updateCompanyAudit(List<Map> map) {
  222 + Object object = post(CompanyUpdateAudit, map);
216 return object; 223 return object;
217 } 224 }
218 -  
219 - public static Object updateTruckAudit(List<Map> map){  
220 - Object object = post(TruckUpdateAudit,map); 225 +
  226 + public static Object updateTruckAudit(List<Map> map) {
  227 + Object object = post(TruckUpdateAudit, map);
221 return object; 228 return object;
222 } 229 }
223 -  
224 - public static Object updateDriverAudit(List<Map> map){  
225 - Object object = post(DriverUpdateAudit,map); 230 +
  231 + public static Object updateDriverAudit(List<Map> map) {
  232 + Object object = post(DriverUpdateAudit, map);
226 return object; 233 return object;
227 } 234 }
228 -  
229 - public static Object updateEarthSitesCreditAndStatus(List<Map> map){  
230 - JSONArray turckList=null;  
231 - Object object = post(UpdateEarthSiteRequestPath,map);  
232 - 235 +
  236 + public static Object updateEarthSitesCreditAndStatus(List<Map> map) {
  237 + JSONArray turckList = null;
  238 + Object object = post(UpdateEarthSiteRequestPath, map);
  239 +
233 return object; 240 return object;
234 } 241 }
235 -  
236 - public static Object updateConractStatus(List<Map> map){  
237 - JSONArray turckList=null;  
238 - Object object = post(UpdateConractRequestPath,map);  
239 - 242 +
  243 + public static Object updateConractStatus(List<Map> map) {
  244 + JSONArray turckList = null;
  245 + Object object = post(UpdateConractRequestPath, map);
  246 +
240 return object; 247 return object;
241 } 248 }
242 -  
243 -  
244 -  
245 249
246 public static JSONObject getEarthSitesInfo(String id) { 250 public static JSONObject getEarthSitesInfo(String id) {
247 - JSONObject json=null;  
248 - Object object = get(EarthSitesInfo + id,null);  
249 -  
250 - if(object != null){ 251 + JSONObject json = null;
  252 + Object object = get(EarthSitesInfo + id, null);
  253 +
  254 + if (object != null) {
251 json = JSON.parseObject(object.toString()); 255 json = JSON.parseObject(object.toString());
252 return json; 256 return json;
253 } 257 }
254 - 258 +
255 return json; 259 return json;
256 } 260 }
257 261
  262 + public static JSONObject getTruckInfo(String id) {
  263 + JSONObject turckList = null;
  264 + Object object = get(TruckInfo + id, null);
258 265
259 -  
260 - public static JSONObject getTruckInfo(String id){  
261 - JSONObject turckList=null;  
262 - Object object = get(TruckInfo + id,null);  
263 -  
264 - if(object != null){ 266 + if (object != null) {
265 turckList = JSON.parseObject(object.toString()); 267 turckList = JSON.parseObject(object.toString());
266 return turckList; 268 return turckList;
267 } 269 }
268 - 270 +
269 return turckList; 271 return turckList;
270 } 272 }
271 - 273 +
272 public static JSONObject getConstructionLicenseById(String id) { 274 public static JSONObject getConstructionLicenseById(String id) {
273 - JSONObject turckList=null;  
274 - Object object = get(constructionLicenseById + id,null);  
275 -  
276 - if(object != null){ 275 + JSONObject turckList = null;
  276 + Object object = get(constructionLicenseById + id, null);
  277 +
  278 + if (object != null) {
277 turckList = JSON.parseObject(object.toString()); 279 turckList = JSON.parseObject(object.toString());
278 return turckList; 280 return turckList;
279 } 281 }
280 - 282 +
281 return turckList; 283 return turckList;
282 - 284 +
283 } 285 }
284 - public static JSONObject getConstructionLicenseById(String id,String token) {  
285 - JSONObject turckList=null;  
286 - Object object = get(constructionLicenseById + id,null,token);  
287 286
288 - if(object != null){ 287 + public static JSONObject getConstructionLicenseById(String id, String token) {
  288 + JSONObject turckList = null;
  289 + Object object = get(constructionLicenseById + id, null, token);
  290 +
  291 + if (object != null) {
289 turckList = JSON.parseObject(object.toString()); 292 turckList = JSON.parseObject(object.toString());
290 return turckList; 293 return turckList;
291 } 294 }
@@ -294,426 +297,505 @@ public class RemoteServerUtils { @@ -294,426 +297,505 @@ public class RemoteServerUtils {
294 297
295 } 298 }
296 299
297 -  
298 public static JSONObject getConstructionInfo(String id) { 300 public static JSONObject getConstructionInfo(String id) {
299 - JSONObject turckList=null;  
300 - Object object = get(ConstructionInfo + id,null);  
301 -  
302 - if(object != null){ 301 + JSONObject turckList = null;
  302 + Object object = get(ConstructionInfo + id, null);
  303 +
  304 + if (object != null) {
303 turckList = JSON.parseObject(object.toString()); 305 turckList = JSON.parseObject(object.toString());
304 return turckList; 306 return turckList;
305 } 307 }
306 - 308 +
307 return turckList; 309 return turckList;
308 - 310 +
309 } 311 }
310 312
311 -  
312 - public static JSONArray getCompanyList(Map params){  
313 - JSONArray turckList=null;  
314 - Object object = post(CompanyListRequestPath,params);  
315 -  
316 - if(object != null){  
317 - JSONObject jsonObject = JSON.parseObject(object.toString());  
318 - turckList = jsonObject.getJSONArray("list"); 313 + public static JSONArray getCompanyList(Map params) {
  314 + JSONArray turckList = null;
  315 + Object object = post(CompanyListRequestPath, params);
  316 +
  317 + if (object != null) {
  318 + JSONObject jsonObject = JSON.parseObject(object.toString());
  319 + turckList = jsonObject.getJSONArray("list");
319 } 320 }
320 - 321 +
321 return turckList; 322 return turckList;
322 } 323 }
323 - 324 +
324 public static Object updateCompanyList(List<Map> updateList) { 325 public static Object updateCompanyList(List<Map> updateList) {
325 - JSONArray turckList=null;  
326 - Object object = post(UpdateCompanyRequestPath,updateList);  
327 -  
328 - 326 + JSONArray turckList = null;
  327 + Object object = post(UpdateCompanyRequestPath, updateList);
  328 +
329 return object; 329 return object;
330 } 330 }
331 -  
332 -  
333 - public static JSONArray getAreas(){  
334 - JSONArray array=null;  
335 - Object object = get("/api/gpsservice/cs/area",null);  
336 -  
337 - if(object != null){  
338 - array = JSON.parseArray(object.toString()); 331 +
  332 + public static JSONArray getAreas() {
  333 + JSONArray array = null;
  334 + Object object = get("/api/gpsservice/cs/area", null);
  335 +
  336 + if (object != null) {
  337 + array = JSON.parseArray(object.toString());
339 } 338 }
340 - 339 +
341 return array; 340 return array;
342 } 341 }
343 -  
344 - public static JSONArray getDict(Map params){  
345 - JSONArray array=null;  
346 - Object object = get("/api/gpsservice/cs/dataDict",params);  
347 -  
348 - if(object != null){  
349 - array = JSON.parseArray(object.toString()); 342 +
  343 + public static JSONArray getDict(Map params) {
  344 + JSONArray array = null;
  345 + Object object = get("/api/gpsservice/cs/dataDict", params);
  346 +
  347 + if (object != null) {
  348 + array = JSON.parseArray(object.toString());
350 } 349 }
351 - 350 +
352 return array; 351 return array;
353 } 352 }
354 353
355 - public static JSONArray getTruckList(Map params){  
356 - JSONArray turckList=null;  
357 - Object object = post(TruckListRequestPath,params);  
358 -  
359 - if(object != null){  
360 - JSONObject jsonObject = JSON.parseObject(object.toString());  
361 - turckList = jsonObject.getJSONArray("list"); 354 + public static JSONArray getTruckList(Map params) {
  355 + JSONArray turckList = null;
  356 + Object object = post(TruckListRequestPath, params);
  357 +
  358 + if (object != null) {
  359 + JSONObject jsonObject = JSON.parseObject(object.toString());
  360 + turckList = jsonObject.getJSONArray("list");
362 } 361 }
363 - 362 +
364 return turckList; 363 return turckList;
365 } 364 }
366 -  
367 -  
368 365
369 public static Object updateTruckList(List<Map> updateList) { 366 public static Object updateTruckList(List<Map> updateList) {
370 - JSONArray turckList=null;  
371 - Object object = post(UpdateTruckRequestPath,updateList);  
372 -  
373 - 367 + JSONArray turckList = null;
  368 + Object object = post(UpdateTruckRequestPath, updateList);
  369 +
374 return object; 370 return object;
375 } 371 }
376 -  
377 -  
378 -  
379 - public static JSONArray getTruckOnline(Map map,String token){  
380 - JSONArray turckList=null;  
381 - Object object = post(TruckStatusListRequestPath,map,token);  
382 -  
383 - if(object != null){  
384 - JSONObject jsonObject = JSON.parseObject(object.toString());  
385 - turckList = jsonObject.getJSONArray("list"); 372 +
  373 + public static JSONArray getTruckOnline(Map map, String token) {
  374 + JSONArray turckList = null;
  375 + Object object = post(TruckStatusListRequestPath, map, token);
  376 +
  377 + if (object != null) {
  378 + JSONObject jsonObject = JSON.parseObject(object.toString());
  379 + turckList = jsonObject.getJSONArray("list");
386 } 380 }
387 - 381 +
388 return turckList; 382 return turckList;
389 } 383 }
390 -  
391 - public static Object updateConstationCreditAndStatus(List<Map> map,String token){  
392 - JSONArray turckList=null;  
393 - Object object = post(UpdateConstruction,map,token);  
394 - 384 +
  385 + public static Object updateConstationCreditAndStatus(List<Map> map, String token) {
  386 + JSONArray turckList = null;
  387 + Object object = post(UpdateConstruction, map, token);
  388 +
395 return object; 389 return object;
396 } 390 }
397 -  
398 - public static Object updateEarthSitesCreditAndStatus(List<Map> map,String token){  
399 - JSONArray turckList=null;  
400 - Object object = post(UpdateEarthSiteRequestPath,map,token);  
401 - 391 +
  392 + public static Object updateEarthSitesCreditAndStatus(List<Map> map, String token) {
  393 + JSONArray turckList = null;
  394 + Object object = post(UpdateEarthSiteRequestPath, map, token);
  395 +
402 return object; 396 return object;
403 } 397 }
404 -  
405 - public static Object updateConractStatus(List<Map> map,String token){  
406 - JSONArray turckList=null;  
407 - Object object = post(UpdateConractRequestPath,map,token);  
408 - 398 +
  399 + public static Object updateConractStatus(List<Map> map, String token) {
  400 + JSONArray turckList = null;
  401 + Object object = post(UpdateConractRequestPath, map, token);
  402 +
409 return object; 403 return object;
410 } 404 }
411 -  
412 -  
413 405
  406 + public static JSONObject getEarthSitesInfo(String id, String token) {
  407 + JSONObject json = null;
  408 + Object object = get(EarthSitesInfo + id, null, token);
414 409
415 - public static JSONObject getEarthSitesInfo(String id,String token) {  
416 - JSONObject json=null;  
417 - Object object = get(EarthSitesInfo + id,null,token);  
418 -  
419 - if(object != null){ 410 + if (object != null) {
420 json = JSON.parseObject(object.toString()); 411 json = JSON.parseObject(object.toString());
421 return json; 412 return json;
422 } 413 }
423 - 414 +
424 return json; 415 return json;
425 } 416 }
426 417
  418 + public static JSONObject getTruckInfo(String id, String token) {
  419 + JSONObject turckList = null;
  420 + Object object = get(TruckInfo + id, null, token);
427 421
428 -  
429 - public static JSONObject getTruckInfo(String id,String token){  
430 - JSONObject turckList=null;  
431 - Object object = get(TruckInfo + id,null,token);  
432 -  
433 - if(object != null){ 422 + if (object != null) {
434 turckList = JSON.parseObject(object.toString()); 423 turckList = JSON.parseObject(object.toString());
435 return turckList; 424 return turckList;
436 } 425 }
437 - 426 +
438 return turckList; 427 return turckList;
439 } 428 }
440 -  
441 -  
442 - public static JSONObject getConstructionInfo(String id,String token) {  
443 - JSONObject turckList=null;  
444 - Object object = get(ConstructionInfo + id,null,token);  
445 -  
446 - if(object != null){ 429 +
  430 + public static JSONObject getConstructionInfo(String id, String token) {
  431 + JSONObject turckList = null;
  432 + Object object = get(ConstructionInfo + id, null, token);
  433 +
  434 + if (object != null) {
447 turckList = JSON.parseObject(object.toString()); 435 turckList = JSON.parseObject(object.toString());
448 return turckList; 436 return turckList;
449 } 437 }
450 - 438 +
451 return turckList; 439 return turckList;
452 - 440 +
453 } 441 }
454 442
455 -  
456 - public static JSONArray getCompanyList(Map params,String token){  
457 - JSONArray turckList=null;  
458 - Object object = post(CompanyListRequestPath,params,token);  
459 -  
460 - if(object != null){  
461 - JSONObject jsonObject = JSON.parseObject(object.toString());  
462 - turckList = jsonObject.getJSONArray("list"); 443 + public static JSONArray getCompanyList(Map params, String token) {
  444 + JSONArray turckList = null;
  445 + Object object = post(CompanyListRequestPath, params, token);
  446 +
  447 + if (object != null) {
  448 + JSONObject jsonObject = JSON.parseObject(object.toString());
  449 + turckList = jsonObject.getJSONArray("list");
463 } 450 }
464 - 451 +
465 return turckList; 452 return turckList;
466 } 453 }
467 -  
468 - public static Object updateCompanyList(List<Map> updateList,String token) {  
469 - JSONArray turckList=null;  
470 - Object object = post(UpdateCompanyRequestPath,updateList,token);  
471 -  
472 - 454 +
  455 + public static Object updateCompanyList(List<Map> updateList, String token) {
  456 + JSONArray turckList = null;
  457 + Object object = post(UpdateCompanyRequestPath, updateList, token);
  458 +
473 return object; 459 return object;
474 } 460 }
475 -  
476 -  
477 - public static JSONArray getAreas(String token){  
478 - JSONArray array=null;  
479 - Object object = get("/api/gpsservice/cs/area",null,token);  
480 -  
481 - if(object != null){  
482 - array = JSON.parseArray(object.toString()); 461 +
  462 + public static JSONArray getAreas(String token) {
  463 + JSONArray array = null;
  464 + Object object = get("/api/gpsservice/cs/area", null, token);
  465 +
  466 + if (object != null) {
  467 + array = JSON.parseArray(object.toString());
483 } 468 }
484 - 469 +
485 return array; 470 return array;
486 } 471 }
487 -  
488 - public static JSONArray getDict(Map params,String token){  
489 - JSONArray array=null;  
490 - Object object = get("/api/gpsservice/cs/dataDict",params,token);  
491 -  
492 - if(object != null){  
493 - array = JSON.parseArray(object.toString()); 472 +
  473 + public static JSONArray getDict(Map params, String token) {
  474 + JSONArray array = null;
  475 + Object object = get("/api/gpsservice/cs/dataDict", params, token);
  476 +
  477 + if (object != null) {
  478 + array = JSON.parseArray(object.toString());
494 } 479 }
495 - 480 +
496 return array; 481 return array;
497 } 482 }
498 -  
499 -  
500 - public static JSONArray getTruckList(Map params,String token){  
501 - JSONArray turckList=null;  
502 - Object object = post(TruckListRequestPath,params,token);  
503 -  
504 - if(object != null){  
505 - JSONObject jsonObject = JSON.parseObject(object.toString());  
506 - turckList = jsonObject.getJSONArray("list"); 483 +
  484 + public static JSONArray getTruckList(Map params, String token) {
  485 + JSONArray turckList = null;
  486 + Object object = post(TruckListRequestPath, params, token);
  487 +
  488 + if (object != null) {
  489 + JSONObject jsonObject = JSON.parseObject(object.toString());
  490 + turckList = jsonObject.getJSONArray("list");
507 } 491 }
508 - 492 +
509 return turckList; 493 return turckList;
510 } 494 }
511 -  
512 495
  496 + public static Object updateTruckList(List<Map> updateList, String token) {
  497 + JSONArray turckList = null;
  498 + Object object = post(UpdateTruckRequestPath, updateList, token);
513 499
514 - public static Object updateTruckList(List<Map> updateList,String token) {  
515 - JSONArray turckList=null;  
516 - Object object = post(UpdateTruckRequestPath,updateList,token);  
517 -  
518 -  
519 return object; 500 return object;
520 } 501 }
521 -  
522 - public static Object post(String url,Object obj){  
523 - if(okHttpClient == null){  
524 - okHttpClient = new OkHttpClient.Builder()  
525 - .connectTimeout(20, TimeUnit.SECONDS)  
526 - .writeTimeout(20, TimeUnit.SECONDS)  
527 - .readTimeout(30, TimeUnit.SECONDS)  
528 - .build(); 502 +
  503 + // 实现X509TrustManager接口
  504 + public static class MyTrustManager implements X509TrustManager {
  505 + @Override
  506 + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
  507 + }
  508 +
  509 + @Override
  510 + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
  511 + }
  512 +
  513 + @Override
  514 + public X509Certificate[] getAcceptedIssuers() {
  515 + return new X509Certificate[0];
  516 + }
  517 + }
  518 +
  519 + private static SSLSocketFactory createSSLSocketFactory() {
  520 + SSLSocketFactory ssfFactory = null;
  521 + try {
  522 + MyTrustManager mMyTrustManager = new MyTrustManager();
  523 + SSLContext sc = SSLContext.getInstance("TLS");
  524 + sc.init(null, new TrustManager[] { mMyTrustManager }, new SecureRandom());
  525 + ssfFactory = sc.getSocketFactory();
  526 + } catch (Exception ignored) {
  527 + ignored.printStackTrace();
  528 + }
  529 +
  530 + return ssfFactory;
  531 + }
  532 +
  533 + // 实现HostnameVerifier接口
  534 + private class TrustAllHostnameVerifier implements HostnameVerifier {
  535 + @Override
  536 + public boolean verify(String hostname, SSLSession session) {
  537 + return true;
  538 + }
  539 + }
  540 +
  541 + /**
  542 + * 获去信任自签证书的trustManager
  543 + *
  544 + * @param ins
  545 + * 自签证书输入流
  546 + * @return 信任自签证书的trustManager
  547 + * @throws GeneralSecurityException
  548 + */
  549 + private static X509TrustManager trustManagerForCertificates(InputStream... ins) throws GeneralSecurityException {
  550 + // 创建证书工厂
  551 + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
  552 +
  553 + // 通过证书工厂得到自签证书对象集合
  554 + Collection<Certificate> certificates = new ArrayList<>();
  555 +
  556 + for (InputStream inputStream : ins) {
  557 + certificates.addAll(certificateFactory.generateCertificates(inputStream));
  558 + }
  559 +
  560 + if (certificates.isEmpty()) {
  561 + throw new IllegalArgumentException("expected non-empty set of trusted certificates");
  562 + }
  563 +
  564 + // 为证书设置一个keyStore
  565 + char[] password = "password".toCharArray(); // Any password will work.
  566 + KeyStore keyStore = newEmptyKeyStore(password);
  567 + int index = 0;
  568 + // 将所有证书放入证书放入keystore中
  569 + for (Certificate certificate : certificates) {
  570 + String certificateAlias = Integer.toString(index++);
  571 + keyStore.setCertificateEntry(certificateAlias, certificate);
  572 + }
  573 +
  574 + // Use it to build an X509 trust manager.
  575 + // 使用包含自签证书信息的keyStore去构建一个X509TrustManager
  576 + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
  577 + keyManagerFactory.init(keyStore, password);
  578 + TrustManagerFactory trustManagerFactory = TrustManagerFactory
  579 + .getInstance(TrustManagerFactory.getDefaultAlgorithm());
  580 + trustManagerFactory.init(keyStore);
  581 + TrustManager[] trustManagers = trustManagerFactory.getTrustManagers();
  582 + if (trustManagers.length == 0) {
  583 + throw new IllegalStateException("Unexpected default trust managers:" + Arrays.toString(trustManagers));
  584 + }
  585 + return ((X509TrustManager) trustManagers[0]);
  586 + }
  587 +
  588 + private static KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException {
  589 + try {
  590 + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
  591 + InputStream in = null; // By convention, 'null' creates an empty key
  592 + // store.
  593 + keyStore.load(null, password);
  594 + return keyStore;
  595 + } catch (IOException e) {
  596 + throw new AssertionError(e);
  597 + }
  598 + }
  599 +
  600 + public static Object post(String url, Object obj) {
  601 + if (okHttpClient == null) {
  602 +
  603 + okHttpClient = getOkClient();
529 } 604 }
530 -  
531 String token = SecurityUtils.getLoginUser().getToken(); 605 String token = SecurityUtils.getLoginUser().getToken();
532 -  
533 - if(token.contains("durable:")){  
534 - token = token.replace("durable:", "Bearer durable:auth:token:");  
535 - }else{  
536 - token = "Bearer auth:token:"+ token;  
537 - }  
538 -  
539 - String param = JSON.toJSON(obj).toString();  
540 -  
541 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
542 -  
543 - Request request = new Request.Builder().url(remote+url).addHeader("Authorization",token ).post(body).build();  
544 -  
545 - try {  
546 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
547 - String result = response.body().string();  
548 -  
549 - if(result != null){  
550 - JSONObject json = JSON.parseObject(result);  
551 - if(json.getInteger("code") == 200){  
552 - return json.get("result");  
553 - }  
554 -  
555 - }else{  
556 - return null;  
557 - }  
558 -  
559 - }catch (Exception e) {  
560 - e.printStackTrace();  
561 - return null;  
562 - }  
563 -  
564 - return null; 606 +
  607 + if (token.contains("durable:")) {
  608 + token = token.replace("durable:", "Bearer durable:auth:token:");
  609 + } else {
  610 + token = "Bearer auth:token:" + token;
  611 + }
  612 +
  613 + String param = JSON.toJSON(obj).toString();
  614 +
  615 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  616 +
  617 + Request request = new Request.Builder().url(remote + url).addHeader("Authorization", token).post(body).build();
  618 +
  619 + try {
  620 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  621 + String result = response.body().string();
  622 +
  623 + if (result != null) {
  624 + JSONObject json = JSON.parseObject(result);
  625 + if (json.getInteger("code") == 200) {
  626 + return json.get("result");
  627 + }
  628 +
  629 + } else {
  630 + return null;
  631 + }
  632 +
  633 + } catch (Exception e) {
  634 + e.printStackTrace();
  635 + return null;
  636 + }
  637 +
  638 + return null;
565 } 639 }
566 640
567 - public static Object get(String url,Map<String,String> obj){  
568 - if(okHttpClient == null){  
569 - okHttpClient = new OkHttpClient.Builder()  
570 - .connectTimeout(20, TimeUnit.SECONDS)  
571 - .writeTimeout(20, TimeUnit.SECONDS)  
572 - .readTimeout(30, TimeUnit.SECONDS)  
573 - .build(); 641 + public static Object get(String url, Map<String, String> obj) {
  642 + if (okHttpClient == null) {
  643 + okHttpClient = getOkClient();
574 } 644 }
575 - 645 +
576 String token = SecurityUtils.getLoginUser().getToken(); 646 String token = SecurityUtils.getLoginUser().getToken();
577 647
578 -  
579 - if(token.contains("durable:")){  
580 - token = token.replace("durable:", "Bearer durable:auth:token:");  
581 - }else{  
582 - token = "Bearer auth:token:"+ token; 648 + if (token.contains("durable:")) {
  649 + token = token.replace("durable:", "Bearer durable:auth:token:");
  650 + } else {
  651 + token = "Bearer auth:token:" + token;
583 } 652 }
584 -  
585 - String params = "";  
586 -  
587 -  
588 - if(obj != null){  
589 -  
590 - params += "?";  
591 -  
592 - for(String key:obj.keySet()){  
593 - params += key + "=" + obj.get(key) + "&";  
594 - }  
595 -  
596 - params = params.substring(0,params.length()-1);  
597 - }  
598 -  
599 -  
600 - url += params;  
601 -  
602 - Request request = new Request.Builder().url(remote+url).addHeader("Authorization",token ).get().build();  
603 -  
604 - try {  
605 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
606 - String result = response.body().string();  
607 -  
608 - if(result != null){  
609 - JSONObject json = JSON.parseObject(result);  
610 - if("success".equals(json.getString("message"))){  
611 - return json.get("result");  
612 - }  
613 - }else{  
614 - return null;  
615 - }  
616 -  
617 - }catch (Exception e) {  
618 - e.printStackTrace();  
619 - return null;  
620 - }  
621 -  
622 - return null; 653 +
  654 + String params = "";
  655 +
  656 + if (obj != null) {
  657 +
  658 + params += "?";
  659 +
  660 + for (String key : obj.keySet()) {
  661 + params += key + "=" + obj.get(key) + "&";
  662 + }
  663 +
  664 + params = params.substring(0, params.length() - 1);
  665 + }
  666 +
  667 + url += params;
  668 +
  669 + Request request = new Request.Builder().url(remote + url).addHeader("Authorization", token).get().build();
  670 +
  671 + try {
  672 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  673 + String result = response.body().string();
  674 +
  675 + if (result != null) {
  676 + JSONObject json = JSON.parseObject(result);
  677 + if ("success".equals(json.getString("message"))) {
  678 + return json.get("result");
  679 + }
  680 + } else {
  681 + return null;
  682 + }
  683 +
  684 + } catch (Exception e) {
  685 + e.printStackTrace();
  686 + return null;
  687 + }
  688 +
  689 + return null;
623 } 690 }
624 - public static Object post(String url,Object obj,String token){  
625 - if(okHttpClient == null){  
626 - okHttpClient = new OkHttpClient.Builder()  
627 - .connectTimeout(20, TimeUnit.SECONDS)  
628 - .writeTimeout(20, TimeUnit.SECONDS)  
629 - .readTimeout(30, TimeUnit.SECONDS)  
630 - .build();  
631 - }  
632 -  
633 - token = "Bearer "+ token;  
634 -  
635 - String param = JSON.toJSON(obj).toString();  
636 -  
637 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
638 -  
639 - Request request = new Request.Builder().url(remote+url).addHeader("Authorization",token ).post(body).build();  
640 -  
641 - try {  
642 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
643 - String result = response.body().string();  
644 -  
645 - if(result != null){  
646 - JSONObject json = JSON.parseObject(result);  
647 - if(json.getInteger("code") == 200){  
648 - return json.get("result");  
649 - }  
650 -  
651 - }else{  
652 - return null;  
653 - }  
654 -  
655 - }catch (Exception e) {  
656 - e.printStackTrace();  
657 - return null;  
658 - }  
659 -  
660 - return null; 691 +
  692 + public static Object post(String url, Object obj, String token) {
  693 + if (okHttpClient == null) {
  694 +
  695 + okHttpClient = getOkClient();
  696 + }
  697 +
  698 + token = "Bearer " + token;
  699 +
  700 + String param = JSON.toJSON(obj).toString();
  701 +
  702 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  703 +
  704 + Request request = new Request.Builder().url(remote + url).addHeader("Authorization", token).post(body).build();
  705 +
  706 + try {
  707 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  708 + String result = response.body().string();
  709 +
  710 + if (result != null) {
  711 + JSONObject json = JSON.parseObject(result);
  712 + if (json.getInteger("code") == 200) {
  713 + return json.get("result");
  714 + }
  715 +
  716 + } else {
  717 + return null;
  718 + }
  719 +
  720 + } catch (Exception e) {
  721 + e.printStackTrace();
  722 + return null;
  723 + }
  724 +
  725 + return null;
661 } 726 }
662 727
663 - public static Object get(String url,Map<String,String> obj,String token){  
664 - if(okHttpClient == null){  
665 - okHttpClient = new OkHttpClient.Builder()  
666 - .connectTimeout(20, TimeUnit.SECONDS)  
667 - .writeTimeout(20, TimeUnit.SECONDS)  
668 - .readTimeout(30, TimeUnit.SECONDS)  
669 - .build(); 728 + public static OkHttpClient getOkClient() {
  729 + X509TrustManager x509TrustManager = null;
  730 + try {
  731 + File file = new File("src/main/resources/183.66.242.6.crt");
  732 + x509TrustManager = trustManagerForCertificates(new FileInputStream(file));
  733 + } catch (FileNotFoundException e) {
  734 + // TODO Auto-generated catch block
  735 + e.printStackTrace();
  736 + } catch (GeneralSecurityException e) {
  737 + // TODO Auto-generated catch blockxiashuo
  738 + e.printStackTrace();
670 } 739 }
  740 +
  741 + okHttpClient = new OkHttpClient.Builder().sslSocketFactory(createSSLSocketFactory(), x509TrustManager)
  742 + .connectTimeout(20, TimeUnit.SECONDS).writeTimeout(20, TimeUnit.SECONDS)
  743 + .readTimeout(30, TimeUnit.SECONDS).build();
671 744
672 - token = "Bearer "+ token;  
673 - String params = "";  
674 -  
675 -  
676 - if(obj != null){  
677 -  
678 - params += "?";  
679 -  
680 - for(String key:obj.keySet()){  
681 - params += key + "=" + obj.get(key) + "&";  
682 - }  
683 -  
684 - params = params.substring(0,params.length()-1);  
685 - }  
686 -  
687 -  
688 - url += params;  
689 -  
690 - Request request = new Request.Builder().url(remote+url).addHeader("Authorization",token ).get().build();  
691 -  
692 - try {  
693 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
694 - String result = response.body().string();  
695 -  
696 - if(result != null){  
697 - JSONObject json = JSON.parseObject(result);  
698 - if("success".equals(json.getString("message"))){  
699 - return json.get("result");  
700 - }  
701 - }else{  
702 - return null;  
703 - }  
704 -  
705 - }catch (Exception e) {  
706 - e.printStackTrace();  
707 - return null; 745 + return okHttpClient;
  746 + }
  747 +
  748 + public static Object get(String url, Map<String, String> obj, String token) {
  749 + if (okHttpClient == null) {
  750 +
  751 +
  752 + okHttpClient = getOkClient();
  753 + }
  754 +
  755 + token = "Bearer " + token;
  756 + String params = "";
  757 +
  758 + if (obj != null) {
  759 +
  760 + params += "?";
  761 +
  762 + for (String key : obj.keySet()) {
  763 + params += key + "=" + obj.get(key) + "&";
  764 + }
  765 +
  766 + params = params.substring(0, params.length() - 1);
  767 + }
  768 +
  769 + url += params;
  770 +
  771 + Request request = new Request.Builder().url(remote + url).addHeader("Authorization", token).get().build();
  772 +
  773 + try {
  774 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  775 + String result = response.body().string();
  776 +
  777 + if (result != null) {
  778 + JSONObject json = JSON.parseObject(result);
  779 + if ("success".equals(json.getString("message"))) {
  780 + return json.get("result");
  781 + }
  782 + } else {
  783 + return null;
  784 + }
  785 +
  786 + } catch (Exception e) {
  787 + e.printStackTrace();
  788 + return null;
708 } 789 }
709 790
710 return null; 791 return null;
711 } 792 }
712 - public static JSONObject getBasevehicleInfo(String id,String token) {  
713 - JSONObject turckList=null;  
714 - Object object = get(BasevehicleInfo + id,null,token);  
715 793
716 - if(object != null){ 794 + public static JSONObject getBasevehicleInfo(String id, String token) {
  795 + JSONObject turckList = null;
  796 + Object object = get(BasevehicleInfo + id, null, token);
  797 +
  798 + if (object != null) {
717 turckList = JSON.parseObject(object.toString()); 799 turckList = JSON.parseObject(object.toString());
718 return turckList; 800 return turckList;
719 } 801 }
@@ -722,338 +804,287 @@ public class RemoteServerUtils { @@ -722,338 +804,287 @@ public class RemoteServerUtils {
722 } 804 }
723 805
724 public static JSONArray getDriverList(String token) { 806 public static JSONArray getDriverList(String token) {
725 -  
726 - if(okHttpClient == null){  
727 - okHttpClient = new OkHttpClient.Builder()  
728 - .connectTimeout(20, TimeUnit.SECONDS)  
729 - .writeTimeout(20, TimeUnit.SECONDS)  
730 - .readTimeout(30, TimeUnit.SECONDS)  
731 - .build();  
732 - }  
733 -  
734 - token = "Bearer "+ token;  
735 -  
736 - String param = JSON.toJSON(new HashMap<>()).toString();  
737 -  
738 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
739 -  
740 - Request request = new Request.Builder().url(remote+DriverListPath).addHeader("Authorization",token ).post(body).build();  
741 -  
742 - try {  
743 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
744 - String result = response.body().string();  
745 -  
746 - if(result != null){  
747 - JSONObject json = JSON.parseObject(result);  
748 - return json.getJSONArray("list");  
749 -  
750 - }else{  
751 - return null;  
752 - }  
753 -  
754 - }catch (Exception e) {  
755 - e.printStackTrace();  
756 - return null; 807 +
  808 + if (okHttpClient == null) {
  809 + okHttpClient = getOkClient();
  810 + }
  811 +
  812 + token = "Bearer " + token;
  813 +
  814 + String param = JSON.toJSON(new HashMap<>()).toString();
  815 +
  816 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  817 +
  818 + Request request = new Request.Builder().url(remote + DriverListPath).addHeader("Authorization", token)
  819 + .post(body).build();
  820 +
  821 + try {
  822 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  823 + String result = response.body().string();
  824 +
  825 + if (result != null) {
  826 + JSONObject json = JSON.parseObject(result);
  827 + return json.getJSONArray("list");
  828 +
  829 + } else {
  830 + return null;
  831 + }
  832 +
  833 + } catch (Exception e) {
  834 + e.printStackTrace();
  835 + return null;
757 } 836 }
758 } 837 }
759 -  
760 838
761 -  
762 static String upUrl = "https://cszgf.tyykj.com:37251/"; 839 static String upUrl = "https://cszgf.tyykj.com:37251/";
763 -  
764 - public static boolean updateUpCase(Map map){  
765 - if(okHttpClient == null){  
766 - okHttpClient = new OkHttpClient.Builder()  
767 - .connectTimeout(20, TimeUnit.SECONDS)  
768 - .writeTimeout(20, TimeUnit.SECONDS)  
769 - .readTimeout(30, TimeUnit.SECONDS)  
770 - .build(); 840 +
  841 + public static boolean updateUpCase(Map map) {
  842 + if (okHttpClient == null) {
  843 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  844 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
771 } 845 }
772 -  
773 -  
774 - String param = JSON.toJSON(map).toString();  
775 -  
776 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
777 -  
778 - Request request = new Request.Builder().url(upUrl + "api/thirdApi/query/callback").addHeader("Authorization",getUpUser()).post(body).build();  
779 -  
780 - okhttp3.Response response;  
781 - String result;  
782 - try {  
783 - response = okHttpClient.newCall(request).execute();  
784 -  
785 - result = response.body().string();  
786 - JSONObject json = JSON.parseObject(result);  
787 - if(json.getBoolean("success")){  
788 - return json.getBoolean("success");  
789 - }  
790 - } catch (IOException e) {  
791 - // TODO Auto-generated catch block  
792 - e.printStackTrace(); 846 +
  847 + String param = JSON.toJSON(map).toString();
  848 +
  849 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  850 +
  851 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/query/callback")
  852 + .addHeader("Authorization", getUpUser()).post(body).build();
  853 +
  854 + okhttp3.Response response;
  855 + String result;
  856 + try {
  857 + response = okHttpClient.newCall(request).execute();
  858 +
  859 + result = response.body().string();
  860 + JSONObject json = JSON.parseObject(result);
  861 + if (json.getBoolean("success")) {
  862 + return json.getBoolean("success");
793 } 863 }
794 -  
795 - return false;  
796 - 864 + } catch (IOException e) {
  865 + // TODO Auto-generated catch block
  866 + e.printStackTrace();
  867 + }
  868 +
  869 + return false;
  870 +
797 } 871 }
798 -  
799 - public static String getUpUser(){  
800 - if(okHttpClient == null){  
801 - okHttpClient = new OkHttpClient.Builder()  
802 - .connectTimeout(20, TimeUnit.SECONDS)  
803 - .writeTimeout(20, TimeUnit.SECONDS)  
804 - .readTimeout(30, TimeUnit.SECONDS)  
805 - .build(); 872 +
  873 + public static String getUpUser() {
  874 + if (okHttpClient == null) {
  875 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  876 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
806 } 877 }
807 -  
808 - 878 +
809 Map map = new HashMap<>(); 879 Map map = new HashMap<>();
810 880
811 map.put("userName", "市渣土管理系统"); 881 map.put("userName", "市渣土管理系统");
812 map.put("password", "u2nuQKePryLy6ccJywKCCQ=="); 882 map.put("password", "u2nuQKePryLy6ccJywKCCQ==");
813 - String param = JSON.toJSON(map).toString();  
814 -  
815 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
816 -  
817 - Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/token").post(body).build();  
818 -  
819 -  
820 - try {  
821 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
822 - String result = response.body().string();  
823 -  
824 - if(result != null){  
825 - JSONObject json = JSON.parseObject(result);  
826 - if(json.getBoolean("success")){  
827 - return json.getString("data");  
828 - }  
829 - }else{  
830 - return null;  
831 - }  
832 -  
833 - }catch (Exception e) {  
834 - e.printStackTrace();  
835 - return null; 883 + String param = JSON.toJSON(map).toString();
  884 +
  885 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  886 +
  887 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/token").post(body).build();
  888 +
  889 + try {
  890 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  891 + String result = response.body().string();
  892 +
  893 + if (result != null) {
  894 + JSONObject json = JSON.parseObject(result);
  895 + if (json.getBoolean("success")) {
  896 + return json.getString("data");
  897 + }
  898 + } else {
  899 + return null;
  900 + }
  901 +
  902 + } catch (Exception e) {
  903 + e.printStackTrace();
  904 + return null;
836 } 905 }
837 return null; 906 return null;
838 } 907 }
839 - 908 +
840 public static JSONArray getUpArea() { 909 public static JSONArray getUpArea() {
841 - if(okHttpClient == null){  
842 - okHttpClient = new OkHttpClient.Builder()  
843 - .connectTimeout(20, TimeUnit.SECONDS)  
844 - .writeTimeout(20, TimeUnit.SECONDS)  
845 - .readTimeout(30, TimeUnit.SECONDS)  
846 - .build(); 910 + if (okHttpClient == null) {
  911 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  912 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
847 } 913 }
848 -  
849 - 914 +
850 Map map = new HashMap<>(); 915 Map map = new HashMap<>();
851 -  
852 -  
853 - String param = JSON.toJSON(map).toString();  
854 -  
855 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
856 -  
857 - Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/areaList").addHeader("Authorization",getUpUser()).post(body).build();  
858 -  
859 -  
860 - try {  
861 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
862 - String result = response.body().string();  
863 -  
864 - if(result != null){  
865 - JSONObject json = JSON.parseObject(result);  
866 - if( json.getBoolean("success")){  
867 - return json.getJSONArray("data");  
868 - }  
869 - }  
870 -  
871 - }catch (Exception e) {  
872 - e.printStackTrace();  
873 -  
874 - }  
875 - return null;  
876 - }  
877 -  
878 916
  917 + String param = JSON.toJSON(map).toString();
  918 +
  919 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  920 +
  921 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/areaList")
  922 + .addHeader("Authorization", getUpUser()).post(body).build();
  923 +
  924 + try {
  925 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  926 + String result = response.body().string();
  927 +
  928 + if (result != null) {
  929 + JSONObject json = JSON.parseObject(result);
  930 + if (json.getBoolean("success")) {
  931 + return json.getJSONArray("data");
  932 + }
  933 + }
  934 +
  935 + } catch (Exception e) {
  936 + e.printStackTrace();
  937 +
  938 + }
  939 + return null;
  940 + }
879 941
880 public static boolean replyUpCase(Map params) { 942 public static boolean replyUpCase(Map params) {
881 - if(okHttpClient == null){  
882 - okHttpClient = new OkHttpClient.Builder()  
883 - .connectTimeout(20, TimeUnit.SECONDS)  
884 - .writeTimeout(20, TimeUnit.SECONDS)  
885 - .readTimeout(30, TimeUnit.SECONDS)  
886 - .build(); 943 + if (okHttpClient == null) {
  944 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  945 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
887 } 946 }
888 -  
889 - 947 +
890 Map map = new HashMap<>(); 948 Map map = new HashMap<>();
891 -  
892 -  
893 - String param = JSON.toJSON(params).toString();  
894 -  
895 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
896 -  
897 - Request request = new Request.Builder().url(upUrl + "api/thirdApi/push/handleResult").addHeader("Authorization",getUpUser()).post(body).build();  
898 -  
899 -  
900 - try {  
901 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
902 - String result = response.body().string();  
903 -  
904 - if(result != null){  
905 - JSONObject json = JSON.parseObject(result);  
906 - return json.getBoolean("success");  
907 - }  
908 -  
909 - }catch (Exception e) {  
910 - e.printStackTrace();  
911 -  
912 - }  
913 - return false; 949 +
  950 + String param = JSON.toJSON(params).toString();
  951 +
  952 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  953 +
  954 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/push/handleResult")
  955 + .addHeader("Authorization", getUpUser()).post(body).build();
  956 +
  957 + try {
  958 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  959 + String result = response.body().string();
  960 +
  961 + if (result != null) {
  962 + JSONObject json = JSON.parseObject(result);
  963 + return json.getBoolean("success");
  964 + }
  965 +
  966 + } catch (Exception e) {
  967 + e.printStackTrace();
  968 +
  969 + }
  970 + return false;
914 } 971 }
915 972
916 -  
917 public static boolean insertUpCase(Map params) { 973 public static boolean insertUpCase(Map params) {
918 - if(okHttpClient == null){  
919 - okHttpClient = new OkHttpClient.Builder()  
920 - .connectTimeout(20, TimeUnit.SECONDS)  
921 - .writeTimeout(20, TimeUnit.SECONDS)  
922 - .readTimeout(30, TimeUnit.SECONDS)  
923 - .build(); 974 + if (okHttpClient == null) {
  975 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  976 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
924 } 977 }
925 -  
926 - 978 +
927 Map map = new HashMap<>(); 979 Map map = new HashMap<>();
928 -  
929 -  
930 - String param = JSON.toJSON(params).toString();  
931 -  
932 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
933 -  
934 - Request request = new Request.Builder().url(upUrl + "api/thirdApi/push/acceptEvt").addHeader("Authorization",getUpUser()).post(body).build();  
935 -  
936 -  
937 - try {  
938 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
939 - String result = response.body().string();  
940 -  
941 - if(result != null){  
942 - JSONObject json = JSON.parseObject(result);  
943 - return json.getBoolean("success");  
944 - }  
945 -  
946 - }catch (Exception e) {  
947 - e.printStackTrace();  
948 -  
949 - }  
950 - return false;  
951 - }  
952 -  
953 -  
954 980
  981 + String param = JSON.toJSON(params).toString();
  982 +
  983 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  984 +
  985 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/push/acceptEvt")
  986 + .addHeader("Authorization", getUpUser()).post(body).build();
  987 +
  988 + try {
  989 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  990 + String result = response.body().string();
  991 +
  992 + if (result != null) {
  993 + JSONObject json = JSON.parseObject(result);
  994 + return json.getBoolean("success");
  995 + }
  996 +
  997 + } catch (Exception e) {
  998 + e.printStackTrace();
  999 +
  1000 + }
  1001 + return false;
  1002 + }
955 1003
956 public static JSONObject getUpClass() { 1004 public static JSONObject getUpClass() {
957 - if(okHttpClient == null){  
958 - okHttpClient = new OkHttpClient.Builder()  
959 - .connectTimeout(20, TimeUnit.SECONDS)  
960 - .writeTimeout(20, TimeUnit.SECONDS)  
961 - .readTimeout(30, TimeUnit.SECONDS)  
962 - .build(); 1005 + if (okHttpClient == null) {
  1006 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  1007 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
963 } 1008 }
964 -  
965 - 1009 +
966 Map map = new HashMap<>(); 1010 Map map = new HashMap<>();
967 1011
968 - map.put("industryType", "01");  
969 -  
970 - String param = JSON.toJSON(map).toString();  
971 -  
972 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
973 -  
974 - Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/classList").addHeader("Authorization",getUpUser()).post(body).build();  
975 -  
976 -  
977 - try {  
978 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
979 - String result = response.body().string();  
980 -  
981 - if(result != null){  
982 - JSONObject json = JSON.parseObject(result);  
983 - if(json.getBoolean("success")){  
984 -  
985 - for(Object object : json.getJSONArray("data")){  
986 - JSONObject jsonObj = (JSONObject) object;  
987 -  
988 -  
989 - if(jsonObj.getString("name").equals("")){  
990 -  
991 - }  
992 -  
993 -  
994 - }  
995 -  
996 -  
997 - }  
998 - }else{  
999 - return null;  
1000 - }  
1001 -  
1002 - }catch (Exception e) {  
1003 - e.printStackTrace();  
1004 - return null; 1012 + map.put("industryType", "01");
  1013 +
  1014 + String param = JSON.toJSON(map).toString();
  1015 +
  1016 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  1017 +
  1018 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/basic/classList")
  1019 + .addHeader("Authorization", getUpUser()).post(body).build();
  1020 +
  1021 + try {
  1022 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  1023 + String result = response.body().string();
  1024 +
  1025 + if (result != null) {
  1026 + JSONObject json = JSON.parseObject(result);
  1027 + if (json.getBoolean("success")) {
  1028 +
  1029 + for (Object object : json.getJSONArray("data")) {
  1030 + JSONObject jsonObj = (JSONObject) object;
  1031 +
  1032 + if (jsonObj.getString("name").equals("")) {
  1033 +
  1034 + }
  1035 +
  1036 + }
  1037 +
  1038 + }
  1039 + } else {
  1040 + return null;
  1041 + }
  1042 +
  1043 + } catch (Exception e) {
  1044 + e.printStackTrace();
  1045 + return null;
1005 } 1046 }
1006 return null; 1047 return null;
1007 } 1048 }
1008 -  
1009 - public static JSONArray getCaseList(){  
1010 - if(okHttpClient == null){  
1011 - okHttpClient = new OkHttpClient.Builder()  
1012 - .connectTimeout(20, TimeUnit.SECONDS)  
1013 - .writeTimeout(20, TimeUnit.SECONDS)  
1014 - .readTimeout(30, TimeUnit.SECONDS)  
1015 - .build(); 1049 +
  1050 + public static JSONArray getCaseList() {
  1051 + if (okHttpClient == null) {
  1052 + okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS)
  1053 + .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build();
1016 } 1054 }
1017 -  
1018 - 1055 +
1019 Map map = new HashMap<>(); 1056 Map map = new HashMap<>();
1020 -  
1021 -  
1022 - String param = JSON.toJSON(map).toString();  
1023 -  
1024 - RequestBody body = RequestBody.create(MediaType.parse("application/json"), param );  
1025 -  
1026 - Request request = new Request.Builder().url(upUrl + "api/thirdApi/query/dispatchEvtList").addHeader("Authorization",getUpUser()).post(body).build();  
1027 -  
1028 -  
1029 - try {  
1030 - okhttp3.Response response = okHttpClient.newCall(request).execute();  
1031 - String result = response.body().string();  
1032 -  
1033 - if(result != null){  
1034 - JSONObject json = JSON.parseObject(result);  
1035 - if(json.getBoolean("success")){  
1036 - return json.getJSONArray("data");  
1037 - }  
1038 - }else{  
1039 - return null;  
1040 - }  
1041 -  
1042 - }catch (Exception e) {  
1043 - e.printStackTrace();  
1044 - return null; 1057 +
  1058 + String param = JSON.toJSON(map).toString();
  1059 +
  1060 + RequestBody body = RequestBody.create(MediaType.parse("application/json"), param);
  1061 +
  1062 + Request request = new Request.Builder().url(upUrl + "api/thirdApi/query/dispatchEvtList")
  1063 + .addHeader("Authorization", getUpUser()).post(body).build();
  1064 +
  1065 + try {
  1066 + okhttp3.Response response = okHttpClient.newCall(request).execute();
  1067 + String result = response.body().string();
  1068 +
  1069 + if (result != null) {
  1070 + JSONObject json = JSON.parseObject(result);
  1071 + if (json.getBoolean("success")) {
  1072 + return json.getJSONArray("data");
  1073 + }
  1074 + } else {
  1075 + return null;
  1076 + }
  1077 +
  1078 + } catch (Exception e) {
  1079 + e.printStackTrace();
  1080 + return null;
1045 } 1081 }
1046 return null; 1082 return null;
1047 } 1083 }
1048 -  
1049 1084
1050 public static Object getAuth(String token) { 1085 public static Object getAuth(String token) {
1051 -  
1052 - return get(GETAUTH, null,token.replace("Bearer ", ""));  
1053 - }  
1054 -  
1055 -  
1056 -  
1057 1086
  1087 + return get(GETAUTH, null, token.replace("Bearer ", ""));
  1088 + }
1058 1089
1059 } 1090 }
trash-framework/src/main/java/com/trash/framework/config/SecurityConfig.java
@@ -112,11 +112,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter @@ -112,11 +112,11 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
112 .antMatchers("/common/download**").anonymous() 112 .antMatchers("/common/download**").anonymous()
113 .antMatchers("/common/download/resource**").anonymous() 113 .antMatchers("/common/download/resource**").anonymous()
114 .antMatchers("/business/threestep/download/**").anonymous() 114 .antMatchers("/business/threestep/download/**").anonymous()
115 - .antMatchers("/swagger-ui.html").anonymous()  
116 - .antMatchers("/swagger-resources/**").anonymous() 115 +// .antMatchers("/swagger-ui.html").anonymous()
  116 +// .antMatchers("/swagger-resources/**").anonymous()
  117 +// .antMatchers("/*/api-docs").anonymous()
  118 +// .antMatchers("/druid/**").anonymous()
117 .antMatchers("/webjars/**").anonymous() 119 .antMatchers("/webjars/**").anonymous()
118 - .antMatchers("/*/api-docs").anonymous()  
119 - .antMatchers("/druid/**").anonymous()  
120 .antMatchers("/user/login").anonymous() 120 .antMatchers("/user/login").anonymous()
121 .antMatchers("/user/send/verify").anonymous() 121 .antMatchers("/user/send/verify").anonymous()
122 // .antMatchers("/user/logout").anonymous() 122 // .antMatchers("/user/logout").anonymous()
trash-framework/src/main/java/com/trash/framework/web/service/SysLoginService.java
@@ -120,11 +120,7 @@ public class SysLoginService @@ -120,11 +120,7 @@ public class SysLoginService
120 120
121 public LoginUser loginByRemote(String token) 121 public LoginUser loginByRemote(String token)
122 { 122 {
123 - OkHttpClient okHttpClient = new OkHttpClient.Builder()  
124 - .connectTimeout(20, TimeUnit.SECONDS)  
125 - .writeTimeout(20, TimeUnit.SECONDS)  
126 - .readTimeout(30, TimeUnit.SECONDS)  
127 - .build(); 123 + OkHttpClient okHttpClient = RemoteServerUtils.getOkClient();
128 124
129 JSONObject userJson = null; 125 JSONObject userJson = null;
130 126
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
@@ -187,6 +187,14 @@ public class DriverTask { @@ -187,6 +187,14 @@ public class DriverTask {
187 paramsMap.put("type_" + i + "_timeout", arr[i * 3]); 187 paramsMap.put("type_" + i + "_timeout", arr[i * 3]);
188 paramsMap.put("type_" + i + "_season", arr[i * 3 + 1]); 188 paramsMap.put("type_" + i + "_season", arr[i * 3 + 1]);
189 paramsMap.put("type_" + i + "_pect", arr[i * 3 + 2]); 189 paramsMap.put("type_" + i + "_pect", arr[i * 3 + 2]);
  190 + }
  191 +
  192 + JSONArray areas = redisCache.getCacheObject("areaList");
  193 + Map<String, String> area = new HashMap<>();
  194 +
  195 + for (Object object : areas) {
  196 + JSONObject json = (JSONObject) object;
  197 + area.put(json.getString("code"), json.getString("name"));
190 } 198 }
191 199
192 try{ 200 try{
@@ -247,7 +255,7 @@ public class DriverTask { @@ -247,7 +255,7 @@ public class DriverTask {
247 logs = logs.subList(0, (int) (logs.size() * pect)); 255 logs = logs.subList(0, (int) (logs.size() * pect));
248 256
249 for(CaseOffline l:logs){ 257 for(CaseOffline l:logs){
250 - insertData(l.getId() + "", "电子交办案卷:" + l.getSiteName(), type, "治理事务部", l.getLocationDec()); 258 + insertData(l.getId() + "", "电子交办案卷:" + l.getSiteName(), type, "治理事务部", area.get(l.getPlace()));
251 } 259 }
252 260
253 }catch(Exception e){ 261 }catch(Exception e){
@@ -287,18 +295,12 @@ public class DriverTask { @@ -287,18 +295,12 @@ public class DriverTask {
287 295
288 296
289 297
290 - JSONArray areas = redisCache.getCacheObject("areaList");  
291 298
292 Gson g = new Gson(); 299 Gson g = new Gson();
293 300
294 JSONArray array; 301 JSONArray array;
295 302
296 - Map<String, String> area = new HashMap<>();  
297 303
298 - for (Object object : areas) {  
299 - JSONObject json = (JSONObject) object;  
300 - area.put(json.getString("code"), json.getString("name"));  
301 - }  
302 304
303 array = redisCache.getCacheObject("truckList");// 车辆 305 array = redisCache.getCacheObject("truckList");// 车辆
304 if (array != null && array.size() > 0) { 306 if (array != null && array.size() > 0) {
trash-ui/dist.zip
No preview for this file type
trash-ui/server.key 0 → 100644
  1 +-----BEGIN RSA PRIVATE KEY-----
  2 +MIIEpAIBAAKCAQEAtJJlknsT/HvJ3/Ig9bR3DEbKupffarbTfmzqK2tjLQWTUWfO
  3 +nrpT+mCTCQ7PstEY4RqfOqCxjGgq4h2CugR6ioLjg032x0gK5jKXabyOQXlI1FaO
  4 +Sr5ZYo0r8IEnFplIKA3DGZEqDDrUYgEZmJI8kznTIyPq5nXjMoopMF8Gymc/IyjI
  5 +lR359PTnoNLpNMWOKD5DvEn6Pb6JJidMHEGlAmLSVezAKdKFBcL7gyobv5C8OGcS
  6 +rMvqr9ZqBRcxjXjPcSkZuBm4T0HL6YAxWSpQCNvrOPhgeR0rJcdqDdJX7SG4XpC/
  7 +pF2gE53iEqgayobLQnLYe42uog1lk9m344jwdQIDAQABAoIBAQCdwtHvOozpqJVl
  8 +jTvyr2rbVPZGM+5EY9s/t5SXvsj1Ssu88b75ur0oITwVS9V222yrLwEyzbaRf2kI
  9 +CNRwBP2zCkwQKguTbIPpPwY+oTiAR6Czs7O55bhefAyJoa0u91itdeig680axkNM
  10 +JL3iKNG3p2uqZfUSyKhpPYBi/IMITdiDOw6EzPJYgB9QLVnslanzxoKnHpkLvxTG
  11 +vZlW6RqDyFov/orF8BsZ6bV/Qc+QLPk9CjvjYVoiTzrymgVviowfR9MtJpwFMr5F
  12 +Q0DpL22XXZX2Qhcr3rHYqi1h3ohqez9pIqyMo9vaIySHOZQ1qWnya4PaUAy4jDOb
  13 +VpMsY255AoGBANqiCGDSTUfbVw2wNpecbvWi6QJm1CiX5Dk3p/w+F9b8XFpjXl6l
  14 +yfVM3xNbSNOgPZW8FuORWPFIi7GR8GbrJZMe5i0dwvJtj0NFh25EO14ygt+dOmRz
  15 +KJQCXzUWIasmbiCj2ul9Ce8C8ttkcn4mz9NsFfYwyjncvocpWdj9l8cDAoGBANNv
  16 +DogKzPGipDW8p5ysF8s5cLtkvtRYyAFy2td9FAZRe5c74tfsX52r8EtM1x62TIAH
  17 +0caoXDpeVbjziUKuoR8uIIpO6g9ga3TQ7Nm9IWsvdVc9h3e+pMscqimqJ5M+Blwz
  18 +avCdsvUT7W0gjNENRsikbuacnmw6fRbXi9CdEjUnAoGBAIy/LwGVoSaXL62iOSLV
  19 +FCGR5MslA4O2dLfY+o3KM3K1N4cA3Wm09RSzjhBZ/cIvMDZKxblugoGiIDwKJWc8
  20 +Dg5uH+P/etaybT3zbsIvrsBvaA0onMS51e+ir0PvoXEa5l6g3XbehhyWG13dhk9s
  21 +EPKcbG727djeINHGbw7gAmudAoGAH2MwNA/uZryvRe7wrvh5O8kWLCuDjMB1SInF
  22 +ZRIDZAC6qTPRtB45/40jyfnpQXzslGEUyjn6HwwcC63TpZuI/bj6Sa33XzsAGMJf
  23 +Nt+101SjRcUzlBowGprxw+enolsl1JApgvjWNT21FGstnGctJ+IJOKDtf8GbCkYL
  24 +UnfO2ScCgYBZeT+5v1e2PssloAUeFCWsZBCOChLVMcQ8gvZqRoPmB8IiI5kV0acI
  25 +za9T0hWsCWrsJ8vuD/XSUljaRvk6nq9Y2tBn13KdITdqFu7zRCLpAy8LbiErF4Rm
  26 +DSpL3IyYX1B/fzuUclCwp1sm4GIeSA1slxqCbqxRhcJ5wpJuO99W6A==
  27 +-----END RSA PRIVATE KEY-----
trash-ui/server.pem 0 → 100644
  1 +-----BEGIN CERTIFICATE-----
  2 +MIIEhjCCAm6gAwIBAgICEREwDQYJKoZIhvcNAQELBQAwbTELMAkGA1UEBhMCQ04x
  3 +DjAMBgNVBAgMBUh1bmFuMREwDwYDVQQHDAhDaGFuZ3NoYTERMA8GA1UECgwIU3Ry
  4 +ZWFtYXgxETAPBgNVBAsMCFN0cmVhbWF4MRUwEwYDVQQDDAwxODMuNjYuMjQyLjYw
  5 +HhcNMjQwMTA5MDcyNDU0WhcNMjQwMjA4MDcyNDU0WjBtMQswCQYDVQQGEwJDTjEO
  6 +MAwGA1UECAwFSHVuYW4xETAPBgNVBAcMCENoYW5nc2hhMREwDwYDVQQKDAhTdHJl
  7 +YW1heDERMA8GA1UECwwIU3RyZWFtYXgxFTATBgNVBAMMDDE4My42Ni4yNDIuNjCC
  8 +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALSSZZJ7E/x7yd/yIPW0dwxG
  9 +yrqX32q2035s6itrYy0Fk1Fnzp66U/pgkwkOz7LRGOEanzqgsYxoKuIdgroEeoqC
  10 +44NN9sdICuYyl2m8jkF5SNRWjkq+WWKNK/CBJxaZSCgNwxmRKgw61GIBGZiSPJM5
  11 +0yMj6uZ14zKKKTBfBspnPyMoyJUd+fT056DS6TTFjig+Q7xJ+j2+iSYnTBxBpQJi
  12 +0lXswCnShQXC+4MqG7+QvDhnEqzL6q/WagUXMY14z3EpGbgZuE9By+mAMVkqUAjb
  13 +6zj4YHkdKyXHag3SV+0huF6Qv6RdoBOd4hKoGsqGy0Jy2HuNrqINZZPZt+OI8HUC
  14 +AwEAAaMwMC4wFwYDVR0RBBAwDoIAhwS3QvIGhwQKHhkdMBMGA1UdJQQMMAoGCCsG
  15 +AQUFBwMBMA0GCSqGSIb3DQEBCwUAA4ICAQAxSefkJ5hXC/GB4lok98T2e/T8a4ve
  16 +j91/flFsE5A5MGdqi+Hj6Xpg+3uPuI/X17DRm8Zlofnyr4O6aHfYJNob75cn6OUF
  17 +HRi7MV24BY8fjLE0lYMaC51vdg5WDftoGDwHcVfRcVI1MFgNibBVIiYh+3RyhC7c
  18 ++WxhL6UJF1xrN5KCSHe1mGcZjwee4REcmKd1m5nZNQJAhCINeEEVQyHwrN1RYhn8
  19 +aeHEdrN+qrLCCWpURyGQt+8+mhAkwMTt3WcyW67eq9IPfGL6J2z0V/gpCGZy9vhO
  20 +GB3zonFazIeaGYJZXAg82ZHcVBNYh23XC6zqcSuvWigW6IVhStEImky7WFxG4M7y
  21 +0uASmoTjbozkzwhblHBl1D3VodGJAYD4zSzMe0ZcCiaMGshHsK7x7wLwHywFwdFI
  22 +yg5PpVISBosZE4YdI/F/3Dylft6lShO3uVqyX/alYcdHlJRaDVpVuJLFBT5r08BD
  23 +LP/PJkFUayFyVq08X+Zn9n3zHvFbZqloA9dt9BCSYm6Ucl+JttdwufllbPeCqYnP
  24 +KsFtaiBRmDUHLX83AHnvO4XaGKbQcUMqCTQmTJrhTw20lo8uTaugWmahPi11b+LK
  25 +8BaqXUJucNzEUC37IWH0SgbWl75m9Frlvezsrl50NAL+7/aOEgxXen6mJAexBSON
  26 +16BJ5xHG9whbPw==
  27 +-----END CERTIFICATE-----
trash-ui/src/api/business/track.js
@@ -44,6 +44,19 @@ export function addTrack(data) { @@ -44,6 +44,19 @@ export function addTrack(data) {
44 }) 44 })
45 } 45 }
46 46
  47 +export function getTables(query) {
  48 + return request({
  49 + url: '/business/track/getTables',
  50 + method: 'get',
  51 + params: query
  52 + })
  53 +}
  54 +export function getAllDate() {
  55 + return request({
  56 + url: '/business/track/getAllDate',
  57 + method: 'get'
  58 + })
  59 +}
47 // 修改跟踪监督 60 // 修改跟踪监督
48 export function updateTrack(data) { 61 export function updateTrack(data) {
49 return request({ 62 return request({
trash-ui/src/api/trackTable.js 0 → 100644
  1 +import {
  2 + listTrack,
  3 + getTrack,
  4 + delTrack,
  5 + addTrack,
  6 + updateTrack,
  7 + exportTrack,
  8 + getAllDate,
  9 + getTables,
  10 +} from "@/api/business/track";
  11 +
  12 +import {
  13 + getArea,
  14 +} from "@/api/dict";
  15 +
  16 +import companyInfo from "@/views/activiti/task/companyInfo";
  17 +
  18 +import logisticsInfo from "@/views/office/logistics/logisticsInfo";
  19 +
  20 +import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
  21 +import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
  22 +
  23 +import {historyFromDataByTime} from '@/api/activiti/historyFormdata'
  24 +
  25 +export default {
  26 + name: "Track",
  27 + components: {
  28 + companyInfo,
  29 + logisticsInfo,
  30 + violationCaseFileInfo,
  31 + caseOfflineInfo
  32 + },
  33 + data() {
  34 + return {
  35 + // 遮罩层
  36 + loading: true,
  37 + // 选中数组
  38 + ids: [],
  39 + // 非单个禁用
  40 + single: true,
  41 + // 非多个禁用
  42 + multiple: true,
  43 + // 显示搜索条件
  44 + showSearch: true,
  45 + // 总条数
  46 + total: 0,
  47 + // 跟踪监督表格数据
  48 + trackList: [],
  49 + // 弹出层标题
  50 + title: "",
  51 + // 是否显示弹出层
  52 + open: false,
  53 + info0: false,
  54 + info1: false,
  55 + info2: false,
  56 + info3: false,
  57 + settings: null,
  58 + // 查询参数
  59 + queryParams: {
  60 + pageNum: 1,
  61 + pageSize: 10,
  62 + type: null,
  63 + title: null,
  64 + place: null,
  65 + status: null,
  66 + objectId: null,
  67 + type: null
  68 + },
  69 + // 表单参数
  70 + form: {},
  71 + seasons:[],
  72 + areas: [],
  73 + years:[],
  74 + tableList:[],
  75 + activeName:"first"
  76 + };
  77 + },
  78 + created() {
  79 +
  80 + getAllDate().then(res=>{
  81 + this.seasons = res.data.season;
  82 + this.years = res.data.year;
  83 + });
  84 +
  85 + getArea().then(res => {
  86 + this.areas = res.result;
  87 + });
  88 +
  89 + this.getList();
  90 + },
  91 + methods: {
  92 + printBody(tag){
  93 +
  94 + let body = document.body;
  95 +
  96 + document.body.innerHTML = document.getElementById(tag).innerHTML;
  97 +
  98 + window.print();
  99 +
  100 + window.location.reload();
  101 + },
  102 +
  103 + showErrorTable(obj){
  104 + this.object = obj;
  105 +
  106 +
  107 + let data = {
  108 + createTime:obj.createTime,
  109 + updateTime:obj.updateTime,
  110 + businessKey:this.workflowType[obj.type] +":"+obj.id,
  111 + }
  112 +
  113 + historyFromDataByTime(data).then(res=>{
  114 + this.formData = res.data;
  115 +
  116 + this.errorTableShow = true;
  117 + });
  118 +
  119 + },
  120 + showTable(obj){
  121 + this.object = obj;
  122 + let data = {
  123 + createTime:obj.createTime,
  124 + updateTime:obj.updateTime,
  125 + businessKey:"workflow_supervision:" + obj.id
  126 + }
  127 +
  128 + historyFromDataByTime(data).then(res=>{
  129 + this.formData = res.data;
  130 + this.tableShow = true;
  131 + });
  132 +
  133 + },
  134 + getInfo(type, objectId, id,obj) {
  135 + this.object = obj;
  136 + this.objectId = objectId;
  137 + this.id = id;
  138 + this.infoDialog = true;
  139 +
  140 + if (type == 0) {
  141 + this.objectType = 2;
  142 + this.info0 = true;
  143 + } else if (type == 1) {
  144 + this.objectType = 3;
  145 + this.info0 = true;
  146 + } else if (type == 2) {
  147 + this.objectType = 0;
  148 + this.info0 = true;
  149 + } else if (type == 3) {
  150 + this.objectType = 4;
  151 + this.info0 = true;
  152 + } else if (type == 4) {
  153 + this.objectType = 1;
  154 + this.info0 = true;
  155 + } else if (type == 5) {
  156 + this.info1 = true;
  157 + } else if (type == 6) {
  158 +
  159 + this.info2 = true;
  160 + } else if (type == 7) {
  161 + this.info3 = true;
  162 +
  163 + }
  164 +
  165 + },
  166 + getStatusName(value){
  167 + if(value == 0){
  168 + return "已提交";
  169 + }else if(value == 1){
  170 + return "通过";
  171 + }else if(value == 2){
  172 + return "审批驳回";
  173 + }else if(value == 3){
  174 + return "督办中";
  175 + }else if(value == 4){
  176 + return "已回复";
  177 + }else if(value == 5){
  178 + return "督办异常-驳回";
  179 + }
  180 + },
  181 + dialogClose() {
  182 +
  183 + this.infoDialog = false;
  184 + this.info0 = false;
  185 + this.info1 = false;
  186 + this.info2 = false;
  187 + this.info3 = false;
  188 + this.getList();
  189 +
  190 + },
  191 + update(state) {
  192 + let data = {
  193 + id: this.id,
  194 + status: state
  195 + };
  196 + if(state == 3){
  197 + data.title = this.form.title;
  198 + data.endTime = this.form.endTime;
  199 + }
  200 +
  201 + updateTrack(data).then(res => {
  202 + if (res.code == 200) {
  203 + this.$message(res.message);
  204 + this.infoDialog = false;
  205 + this.errorDialog = false;
  206 +
  207 + this.getList();
  208 + }
  209 + });
  210 + },
  211 +
  212 + saveSettings() {
  213 + saveSettings(this.settings).then(res => {
  214 + if (res.code == 200) {
  215 +
  216 + this.$message("保存成功");
  217 + }
  218 + this.settingsOpen = false;
  219 + });
  220 + },
  221 + /** 查询跟踪监督列表 */
  222 + getList() {
  223 + this.loading = true;
  224 + listTrack(this.queryParams).then(response => {
  225 + this.trackList = response.rows;
  226 + this.total = response.total;
  227 + this.loading = false;
  228 + });
  229 +
  230 + getTables(this.queryParams).then(res=>{
  231 + this.tableList = res.data;
  232 +
  233 + for(let i in this.tableList){
  234 + if(this.tableList[i].type == 0){
  235 + this.tableList[i].type = "工地"
  236 + }
  237 + if(this.tableList[i].type == 1){
  238 + this.tableList[i].type = "消纳场"
  239 + }
  240 + if(this.tableList[i].type == 2){
  241 + this.tableList[i].type = "企业"
  242 + }
  243 + if(this.tableList[i].type == 3){
  244 + this.tableList[i].type = "合同"
  245 + }
  246 + if(this.tableList[i].type == 4){
  247 + this.tableList[i].type = "车辆"
  248 + }
  249 + if(this.tableList[i].type == 5){
  250 + this.tableList[i].type = "后勤管理"
  251 + }
  252 + if(this.tableList[i].type == 6){
  253 + this.tableList[i].type = "交办案卷"
  254 + }
  255 + if(this.tableList[i].type == 7){
  256 + this.tableList[i].type = "违规案卷"
  257 + }
  258 +
  259 + }
  260 +
  261 + });
  262 + },
  263 + // 取消按钮
  264 + cancel() {
  265 + this.open = false;
  266 + this.reset();
  267 + },
  268 + // 表单重置
  269 + reset() {
  270 + this.form = {
  271 + id: null,
  272 + type: null,
  273 + title: null,
  274 + dept: null,
  275 + place: null,
  276 + createBy: null,
  277 + createTime: null,
  278 + updateTime: null,
  279 + updateBy: null,
  280 + attach: null,
  281 + status: 0,
  282 + objectId: null
  283 + };
  284 + this.resetForm("form");
  285 + },
  286 + /** 搜索按钮操作 */
  287 + handleQuery() {
  288 + this.queryParams.pageNum = 1;
  289 + this.getList();
  290 + },
  291 + /** 重置按钮操作 */
  292 + resetQuery() {
  293 + this.resetForm("queryForm");
  294 + this.handleQuery();
  295 + },
  296 +
  297 + handleSelect(value) {
  298 + if (value == 99) {
  299 + getSettings().then(response => {
  300 + this.settings = response.data;
  301 + this.settingsOpen = true;
  302 + });
  303 + return;
  304 + }
  305 +
  306 +
  307 + this.queryParams.type = value;
  308 + this.getList();
  309 +
  310 + },
  311 +
  312 + // 多选框选中数据
  313 + handleSelectionChange(selection) {
  314 + this.ids = selection.map(item => item.id)
  315 + this.single = selection.length !== 1
  316 + this.multiple = !selection.length
  317 + },
  318 + /** 新增按钮操作 */
  319 + handleAdd() {
  320 + this.reset();
  321 + this.open = true;
  322 + this.title = "添加跟踪监督";
  323 + },
  324 + /** 修改按钮操作 */
  325 + handleUpdate(row) {
  326 + this.reset();
  327 + const id = row.id || this.ids
  328 + getTrack(id).then(response => {
  329 + this.form = response.data;
  330 + this.open = true;
  331 + this.title = "修改跟踪监督";
  332 + });
  333 + },
  334 + /** 提交按钮 */
  335 + submitForm() {
  336 + this.$refs["form"].validate(valid => {
  337 + if (valid) {
  338 + if (this.form.id != null) {
  339 + updateTrack(this.form).then(response => {
  340 + this.msgSuccess("修改成功");
  341 + this.open = false;
  342 + this.getList();
  343 + });
  344 + } else {
  345 + addTrack(this.form).then(response => {
  346 + this.msgSuccess("新增成功");
  347 + this.open = false;
  348 + this.getList();
  349 + });
  350 + }
  351 + }
  352 + });
  353 + },
  354 + /** 删除按钮操作 */
  355 + handleDelete(row) {
  356 + const ids = row.id || this.ids;
  357 + this.$confirm('是否确认删除跟踪监督编号为"' + ids + '"的数据项?', "警告", {
  358 + confirmButtonText: "确定",
  359 + cancelButtonText: "取消",
  360 + type: "warning"
  361 + }).then(function() {
  362 + return delTrack(ids);
  363 + }).then(() => {
  364 + this.getList();
  365 + this.msgSuccess("删除成功");
  366 + })
  367 + },
  368 + /** 导出按钮操作 */
  369 + handleExport() {
  370 + const queryParams = this.queryParams;
  371 + this.$confirm('是否确认导出所有跟踪监督数据项?', "警告", {
  372 + confirmButtonText: "确定",
  373 + cancelButtonText: "取消",
  374 + type: "warning"
  375 + }).then(function() {
  376 + return exportTrack(queryParams);
  377 + }).then(response => {
  378 + this.download(response.msg);
  379 + })
  380 + }
  381 + }
  382 +};
trash-ui/src/layout/index.vue
1 <template> 1 <template>
  2 + <div :class="classObj" class="app-wrapper">
  3 + <sidebar class="sidebar-container" />
  4 + <div :class="{ hasTagsView: false }" class="main-container">
  5 + <tags-view v-if="needTagsView" />
2 <app-main /> 6 <app-main />
  7 +
  8 + </div>
  9 + </div>
3 </template> 10 </template>
4 11
5 <script> 12 <script>
6 import RightPanel from '@/components/RightPanel' 13 import RightPanel from '@/components/RightPanel'
  14 +import { mapState } from 'vuex'
7 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' 15 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
8 import ResizeMixin from './mixin/ResizeHandler' 16 import ResizeMixin from './mixin/ResizeHandler'
9 -import { mapState } from 'vuex'  
10 17
11 export default { 18 export default {
12 name: 'Layout', 19 name: 'Layout',
@@ -45,45 +52,56 @@ export default { @@ -45,45 +52,56 @@ export default {
45 </script> 52 </script>
46 53
47 <style lang="scss" scoped> 54 <style lang="scss" scoped>
48 - @import "~@/assets/styles/mixin.scss";  
49 - @import "~@/assets/styles/variables.scss"; 55 +@import "~@/assets/styles/mixin.scss";
  56 +@import "~@/assets/styles/variables.scss";
50 57
51 - .app-wrapper {  
52 - @include clearfix;  
53 - position: relative;  
54 - height: 100%;  
55 - width: 100%;  
56 -  
57 - &.mobile.openSidebar {  
58 - position: fixed;  
59 - top: 0;  
60 - }  
61 - } 58 +.app-wrapper {
  59 + @include clearfix;
  60 + position: relative;
  61 + height: 100%;
  62 + width: 100%;
62 63
63 - .drawer-bg {  
64 - background: #000;  
65 - opacity: 0.3;  
66 - width: 100%;  
67 - top: 0;  
68 - height: 100%;  
69 - position: absolute;  
70 - z-index: 999;  
71 - }  
72 -  
73 - .fixed-header { 64 + &.mobile.openSidebar {
74 position: fixed; 65 position: fixed;
75 top: 0; 66 top: 0;
76 - right: 0;  
77 - z-index: 9;  
78 - width: calc(100% - #{$sideBarWidth});  
79 - transition: width 0.28s;  
80 } 67 }
  68 +}
81 69
82 - .hideSidebar .fixed-header {  
83 - width: calc(100% - 54px)  
84 - } 70 +.drawer-bg {
  71 + background: #000;
  72 + opacity: 0.3;
  73 + width: 100%;
  74 + top: 0;
  75 + height: 100%;
  76 + position: absolute;
  77 + z-index: 999;
  78 +}
85 79
86 - .mobile .fixed-header {  
87 - width: 100%;  
88 - } 80 +.fixed-header {
  81 + position: fixed;
  82 + top: 0;
  83 + right: 0;
  84 + z-index: 9;
  85 + width: calc(100% - #{$sideBarWidth});
  86 + transition: width 0.28s;
  87 +}
  88 +
  89 +.hideSidebar .fixed-header {
  90 + width: calc(100% - 54px)
  91 +}
  92 +
  93 +.mobile .fixed-header {
  94 + width: 100%;
  95 +}
  96 +
  97 +.preview figure {
  98 + float: left;
  99 + width: 30%;
  100 + height: calc(30vw - 0px);
  101 + margin: 1.5%;
  102 +}
  103 +
  104 +.preview figure img {
  105 + width: 400px;
  106 +}
89 </style> 107 </style>
trash-ui/src/layout/index33.vue renamed to trash-ui/src/layout/index4.vue
1 <template> 1 <template>
2 - <div :class="classObj" class="app-wrapper">  
3 - <sidebar class="sidebar-container" />  
4 - <div :class="{ hasTagsView: false }" class="main-container">  
5 - <tags-view v-if="needTagsView" />  
6 <app-main /> 2 <app-main />
7 -  
8 - </div>  
9 - </div>  
10 </template> 3 </template>
11 4
12 <script> 5 <script>
13 import RightPanel from '@/components/RightPanel' 6 import RightPanel from '@/components/RightPanel'
14 -import { mapState } from 'vuex'  
15 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' 7 import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
16 import ResizeMixin from './mixin/ResizeHandler' 8 import ResizeMixin from './mixin/ResizeHandler'
  9 +import { mapState } from 'vuex'
17 10
18 export default { 11 export default {
19 name: 'Layout', 12 name: 'Layout',
@@ -52,56 +45,45 @@ export default { @@ -52,56 +45,45 @@ export default {
52 </script> 45 </script>
53 46
54 <style lang="scss" scoped> 47 <style lang="scss" scoped>
55 -@import "~@/assets/styles/mixin.scss";  
56 -@import "~@/assets/styles/variables.scss"; 48 + @import "~@/assets/styles/mixin.scss";
  49 + @import "~@/assets/styles/variables.scss";
57 50
58 -.app-wrapper {  
59 - @include clearfix;  
60 - position: relative;  
61 - height: 100%;  
62 - width: 100%; 51 + .app-wrapper {
  52 + @include clearfix;
  53 + position: relative;
  54 + height: 100%;
  55 + width: 100%;
63 56
64 - &.mobile.openSidebar {  
65 - position: fixed;  
66 - top: 0; 57 + &.mobile.openSidebar {
  58 + position: fixed;
  59 + top: 0;
  60 + }
67 } 61 }
68 -}  
69 -  
70 -.drawer-bg {  
71 - background: #000;  
72 - opacity: 0.3;  
73 - width: 100%;  
74 - top: 0;  
75 - height: 100%;  
76 - position: absolute;  
77 - z-index: 999;  
78 -}  
79 -  
80 -.fixed-header {  
81 - position: fixed;  
82 - top: 0;  
83 - right: 0;  
84 - z-index: 9;  
85 - width: calc(100% - #{$sideBarWidth});  
86 - transition: width 0.28s;  
87 -}  
88 62
89 -.hideSidebar .fixed-header {  
90 - width: calc(100% - 54px)  
91 -} 63 + .drawer-bg {
  64 + background: #000;
  65 + opacity: 0.3;
  66 + width: 100%;
  67 + top: 0;
  68 + height: 100%;
  69 + position: absolute;
  70 + z-index: 999;
  71 + }
92 72
93 -.mobile .fixed-header {  
94 - width: 100%;  
95 -} 73 + .fixed-header {
  74 + position: fixed;
  75 + top: 0;
  76 + right: 0;
  77 + z-index: 9;
  78 + width: calc(100% - #{$sideBarWidth});
  79 + transition: width 0.28s;
  80 + }
96 81
97 -.preview figure {  
98 - float: left;  
99 - width: 30%;  
100 - height: calc(30vw - 0px);  
101 - margin: 1.5%;  
102 -} 82 + .hideSidebar .fixed-header {
  83 + width: calc(100% - 54px)
  84 + }
103 85
104 -.preview figure img {  
105 - width: 400px;  
106 -} 86 + .mobile .fixed-header {
  87 + width: 100%;
  88 + }
107 </style> 89 </style>
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 = "https://183.66.242.6:14601"
  46 +// Vue.prototype.remoteFrame = "https://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/permission.js
@@ -16,7 +16,6 @@ const whiteList = [&#39;/login&#39;, &#39;/auth-redirect&#39;, &#39;/bind&#39;, &#39;/register&#39;] @@ -16,7 +16,6 @@ const whiteList = [&#39;/login&#39;, &#39;/auth-redirect&#39;, &#39;/bind&#39;, &#39;/register&#39;]
16 router.beforeEach((to, from, next) => { 16 router.beforeEach((to, from, next) => {
17 NProgress.start() 17 NProgress.start()
18 var token = getToken(); 18 var token = getToken();
19 -  
20 if(to.query.token && token && to.query.token.indexOf(token) == -1){ 19 if(to.query.token && token && to.query.token.indexOf(token) == -1){
21 removeToken(); 20 removeToken();
22 token = null; 21 token = null;
trash-ui/src/router/index.js
@@ -205,7 +205,13 @@ export const constantRoutes = [ @@ -205,7 +205,13 @@ export const constantRoutes = [
205 component: (resolve) => require(['@/views/business/track'], resolve), 205 component: (resolve) => require(['@/views/business/track'], resolve),
206 name: '跟踪监督', 206 name: '跟踪监督',
207 meta: { title: '跟踪监督' } 207 meta: { title: '跟踪监督' }
208 - }, 208 + },
  209 + {
  210 + path: 'trackTable',
  211 + component: (resolve) => require(['@/views/business/track/trackTable'], resolve),
  212 + name: '纪检报表',
  213 + meta: { title: '纪检报表' }
  214 + },
209 { 215 {
210 path: 'supervision/threestep', 216 path: 'supervision/threestep',
211 component: (resolve) => require(['@/views/business/threestep'], resolve), 217 component: (resolve) => require(['@/views/business/threestep'], resolve),
trash-ui/src/views/business/track/trackTable.vue 0 → 100644
  1 +<template>
  2 + <div class="app-container">
  3 +
  4 + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  5 + <el-form-item label="年份" prop="year">
  6 + <el-select v-model="queryParams.year" placeholder="请选择年份 " size="small">
  7 + <el-option v-for="item in years" :label="item" :value="item" />
  8 + </el-select>
  9 + </el-form-item>
  10 + <el-form-item label="季度" prop="season">
  11 + <el-select v-model="queryParams.season" placeholder="请选择季度 " size="small">
  12 + <el-option v-for="item in seasons" :label="item" :value="item" />
  13 + </el-select>
  14 + </el-form-item>
  15 + <el-form-item label="所属区域" prop="place">
  16 + <el-select v-model="queryParams.place" placeholder="请选择所属区域 " size="small">
  17 + <el-option v-for="item in areas" :label="item.name" :value="item.name" />
  18 + </el-select>
  19 + </el-form-item>
  20 + <el-form-item label="督办项目" prop="type">
  21 + <el-select v-model="queryParams.type" placeholder="督办项目" clearable size="small">
  22 + <el-option value="0" label="工地" />
  23 + <el-option value="1" label="消纳场"/>
  24 + <el-option value="2" label="企业"/>
  25 + <el-option value="3" label="合同"/>
  26 + <el-option value="4" label="车辆"/>
  27 + <el-option value="5" label="后勤管理"/>
  28 + <el-option value="6" label="交办案卷" />
  29 + <el-option value="7" label="违规案卷"/>
  30 + </el-select>
  31 +
  32 + </el-form-item>
  33 + <el-form-item>
  34 + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  35 + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  36 + </el-form-item>
  37 + </el-form>
  38 + <!--
  39 + <el-row :gutter="10" class="mb8">
  40 + <el-col :span="1.5">
  41 + <el-button
  42 + type="warning"
  43 + icon="el-icon-download"
  44 + size="mini"
  45 + @click="handleExport"
  46 + v-hasPermi="['workflow:track:export']"
  47 + >导出</el-button>
  48 + </el-col>
  49 + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  50 + </el-row>
  51 + -->
  52 + <el-tabs v-model="activeName">
  53 + <el-tab-pane label="督办统计" name="first">
  54 + <el-table v-loading="loading" :data="tableList" >
  55 + <el-table-column label="督办项目" prop="type" align="center" width="200"/>
  56 + <el-table-column label="总数" align="center" prop="count" >
  57 + <template slot-scope="scope">
  58 + <span>{{ !scope.row.count ? 0 : scope.row.count }}</span>
  59 + </template>
  60 + </el-table-column>
  61 + <el-table-column label="审批中" align="center" prop="status0" >
  62 + <template slot-scope="scope">
  63 + <span>{{ !scope.row.status0 ? 0 : scope.row.status0 }}</span>
  64 + </template>
  65 + </el-table-column>
  66 + <el-table-column label="审批完成" align="center" prop="status1" >
  67 + <template slot-scope="scope">
  68 + <span>{{ !scope.row.status1 ? 0 : scope.row.status1 }}</span>
  69 + </template>
  70 + </el-table-column>
  71 + <el-table-column label="审批驳回" align="center" prop="status2" >
  72 + <template slot-scope="scope">
  73 + <span>{{ !scope.row.status2 ? 0 : scope.row.status2 }}</span>
  74 + </template>
  75 + </el-table-column>
  76 + <el-table-column label="异常审批中" align="center" prop="status3" >
  77 + <template slot-scope="scope">
  78 + <span>{{ !scope.row.status3 ? 0 : scope.row.status3 }}</span>
  79 + </template>
  80 + </el-table-column>
  81 + <el-table-column label="异常审批完成" align="center" prop="status4" >
  82 + <template slot-scope="scope">
  83 + <span>{{ !scope.row.status4 ? 0 : scope.row.status4 }}</span>
  84 + </template>
  85 + </el-table-column>
  86 + <el-table-column label="异常审批" align="center" prop="status5" >
  87 + <template slot-scope="scope">
  88 + <span>{{ !scope.row.status5 ? 0 : scope.row.status5 }}</span>
  89 + </template>
  90 + </el-table-column>
  91 + </el-table>
  92 +
  93 +</el-tab-pane>
  94 + <el-tab-pane label="督办历史" name="second">
  95 + <el-table v-loading="loading" :data="trackList" >
  96 + <el-table-column label="序号" align="center" type="index" />
  97 + <el-table-column label="督查事项" align="center" prop="title" />
  98 + <el-table-column label="所属区域" align="center" prop="place" />
  99 + <el-table-column label="生成时间" align="center" prop="createTime" width="180">
  100 + <template slot-scope="scope">
  101 + <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
  102 + </template>
  103 + </el-table-column>
  104 + <el-table-column label="督察时间" align="center" prop="updateTime" width="180">
  105 + <template slot-scope="scope">
  106 + <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
  107 + </template>
  108 + </el-table-column>
  109 + <el-table-column label="督察结果" align="center" prop="status" >
  110 + <template slot-scope="scope">
  111 + <span>
  112 + {{ getStatusName(scope.row.status)}}
  113 + </span>
  114 + <el-button v-if="scope.row.status == 1" @click="showTable(scope.row)">督查情况表</el-button>
  115 + <el-button v-if="scope.row.status == 4" @click="showErrorTable(scope.row)">整改交办单</el-button>
  116 + </template>
  117 + </el-table-column>
  118 + </el-table>
  119 +
  120 + <pagination
  121 + v-show="total>0"
  122 + :total="total"
  123 + :page.sync="queryParams.pageNum"
  124 + :limit.sync="queryParams.pageSize"
  125 + @pagination="getList"
  126 + />
  127 +</el-tab-pane>
  128 + </el-tabs>
  129 + <!-- 添加或修改跟踪监督对话框
  130 + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
  131 + <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  132 + <el-form-item label="类型 0工地 1消纳场 2企业 3合同 4车 5后勤管理 6电子交办案卷 7违规案卷" prop="type">
  133 + <el-select v-model="form.type" placeholder="请选择类型 0工地 1消纳场 2企业 3合同 4车 5后勤管理 6电子交办案卷 7违规案卷">
  134 + <el-option label="请选择字典生成" value="" />
  135 + </el-select>
  136 + </el-form-item>
  137 + <el-form-item label="督查事项" prop="title">
  138 + <el-input v-model="form.title" type="textarea" placeholder="请输入内容" />
  139 + </el-form-item>
  140 + <el-form-item label="部门" prop="dept">
  141 + <el-input v-model="form.dept" placeholder="请输入部门" />
  142 + </el-form-item>
  143 + <el-form-item label="所属区域" prop="place">
  144 + <el-input v-model="form.place" placeholder="请输入所属区域" />
  145 + </el-form-item>
  146 + <el-form-item label="所属区域" prop="attach">
  147 + <el-input v-model="form.attach" placeholder="请输入所属区域" />
  148 + </el-form-item>
  149 + <el-form-item label="审批状态 0审批中 1审批通过 2审批驳回 3异常审批 4异常通过 5异常驳回">
  150 + <el-radio-group v-model="form.status">
  151 + <el-radio label="1">请选择字典生成</el-radio>
  152 + </el-radio-group>
  153 + </el-form-item>
  154 + <el-form-item label="基础数据ID" prop="objectId">
  155 + <el-input v-model="form.objectId" placeholder="请输入基础数据ID" />
  156 + </el-form-item>
  157 + </el-form>
  158 + <div slot="footer" class="dialog-footer">
  159 + <el-button type="primary" @click="submitForm">确 定</el-button>
  160 + <el-button @click="cancel">取 消</el-button>
  161 + </div>
  162 + </el-dialog>-->
  163 + </div>
  164 +</template>
  165 +
  166 +
  167 +
  168 +<script src="../../../api/trackTable.js" />
  169 +
  170 +<style>
  171 + .bd_padding{
  172 + font-size: 14px;
  173 + padding:10px;
  174 + }
  175 +
  176 + .bd_right {
  177 + border-right: 1px solid black;
  178 + }
  179 +
  180 + .bd_left {
  181 + border-left: 1px solid black;
  182 + }
  183 +
  184 + .bd_top {
  185 + border-top: 1px solid black;
  186 + }
  187 +
  188 + .bd_bottom {
  189 + border-bottom: 1px solid black;
  190 + }
  191 +</style>
trash-ui/src/views/business/truckActivate/index.vue
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 <el-table-column label="工地名称" align="center" prop="construction" /> 82 <el-table-column label="工地名称" align="center" prop="construction" />
83 <el-table-column label="车牌号" align="center" prop="licensePlate" /> 83 <el-table-column label="车牌号" align="center" prop="licensePlate" />
84 <el-table-column label="运输企业" align="center" prop="company" /> 84 <el-table-column label="运输企业" align="center" prop="company" />
85 - <el-table-column label="处理场所" align="center" prop="earthsite" /> 85 + <el-table-column label="处理场所" align="center" prop="earthName" />
86 <el-table-column label="激活时间" align="center" prop="activateTime" width="180"> 86 <el-table-column label="激活时间" align="center" prop="activateTime" width="180">
87 <template slot-scope="scope"> 87 <template slot-scope="scope">
88 <span>{{ parseTime(scope.row.activateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> 88 <span>{{ parseTime(scope.row.activateTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
trash-ui/vue.config.js
@@ -41,13 +41,14 @@ module.exports = { @@ -41,13 +41,14 @@ module.exports = {
41 } 41 }
42 }, 42 },
43 ['/api']: { 43 ['/api']: {
44 - target: `http://183.66.242.6:14601`, 44 + target: `https://183.66.242.6:14601`,
45 // target: `http://175.6.47.84:8008`, 45 // target: `http://175.6.47.84:8008`,
46 changeOrigin: true, 46 changeOrigin: true,
47 } 47 }
48 48
49 }, 49 },
50 - disableHostCheck: true 50 + disableHostCheck: true,
  51 + https: true,
51 }, 52 },
52 configureWebpack: { 53 configureWebpack: {
53 name: name, 54 name: name,
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionTrackController.java
@@ -5,6 +5,7 @@ import java.io.FileInputStream; @@ -5,6 +5,7 @@ import java.io.FileInputStream;
5 import java.io.FileNotFoundException; 5 import java.io.FileNotFoundException;
6 import java.io.FileOutputStream; 6 import java.io.FileOutputStream;
7 import java.io.IOException; 7 import java.io.IOException;
  8 +import java.util.ArrayList;
8 import java.util.HashMap; 9 import java.util.HashMap;
9 import java.util.List; 10 import java.util.List;
10 import java.util.Map; 11 import java.util.Map;
@@ -24,6 +25,7 @@ import com.trash.common.core.controller.BaseController; @@ -24,6 +25,7 @@ import com.trash.common.core.controller.BaseController;
24 import com.trash.common.core.domain.AjaxResult; 25 import com.trash.common.core.domain.AjaxResult;
25 import com.trash.common.enums.BusinessType; 26 import com.trash.common.enums.BusinessType;
26 import com.trash.business.domain.SupervisionTrack; 27 import com.trash.business.domain.SupervisionTrack;
  28 +import com.trash.business.mapper.SupervisionTrackMapper;
27 import com.trash.business.service.ISupervisionTrackService; 29 import com.trash.business.service.ISupervisionTrackService;
28 import com.trash.common.utils.poi.ExcelUtil; 30 import com.trash.common.utils.poi.ExcelUtil;
29 import com.trash.common.core.page.TableDataInfo; 31 import com.trash.common.core.page.TableDataInfo;
@@ -41,6 +43,8 @@ public class SupervisionTrackController extends BaseController @@ -41,6 +43,8 @@ public class SupervisionTrackController extends BaseController
41 @Autowired 43 @Autowired
42 private ISupervisionTrackService supervisionTrackService; 44 private ISupervisionTrackService supervisionTrackService;
43 45
  46 + @Autowired
  47 + private SupervisionTrackMapper mapper;
44 /** 48 /**
45 * 查询跟踪监督列表 49 * 查询跟踪监督列表
46 */ 50 */
@@ -51,6 +55,44 @@ public class SupervisionTrackController extends BaseController @@ -51,6 +55,44 @@ public class SupervisionTrackController extends BaseController
51 List<SupervisionTrack> list = supervisionTrackService.selectSupervisionTrackList(supervisionTrack); 55 List<SupervisionTrack> list = supervisionTrackService.selectSupervisionTrackList(supervisionTrack);
52 return getDataTable(list); 56 return getDataTable(list);
53 } 57 }
  58 +
  59 + @GetMapping("/getAllDate")
  60 + public AjaxResult getAllDate(SupervisionTrack supervisionTrack)
  61 + {
  62 + startPage();
  63 + List<Map<String,String>> list = mapper.getAllDate();
  64 +
  65 + Map<String,List<String>> data = new HashMap<>();
  66 +
  67 + data.put("year", new ArrayList<String>());
  68 + data.put("season", new ArrayList<String>());
  69 +
  70 + for(Map<String,String> map : list){
  71 + String y = map.get("month").split("-")[0];
  72 + String m = map.get("month").split("-")[1];
  73 +
  74 + int season = (int)Math.ceil(Double.parseDouble(m) / 3);
  75 +
  76 + if(data.get("year").indexOf(y) == -1){
  77 + data.get("year").add(y);
  78 + }
  79 +
  80 + if(data.get("season").indexOf(y + "第" + season + "季度") == -1){
  81 + data.get("season").add(y + "第" + season + "季度");
  82 + }
  83 + }
  84 +
  85 + return AjaxResult.success(data);
  86 + }
  87 +
  88 + @GetMapping("/getTables")
  89 + public AjaxResult getTables(SupervisionTrack supervisionTrack)
  90 + {
  91 + List<Map<String,String>> list = mapper.getTables(supervisionTrack);
  92 +
  93 +
  94 + return AjaxResult.success(list);
  95 + }
54 96
55 /** 97 /**
56 * 查询跟踪监督列表 98 * 查询跟踪监督列表
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionTrack.java
@@ -44,9 +44,38 @@ public class SupervisionTrack extends BaseEntity @@ -44,9 +44,38 @@ public class SupervisionTrack extends BaseEntity
44 @Excel(name = "基础数据ID") 44 @Excel(name = "基础数据ID")
45 private String objectId; 45 private String objectId;
46 46
  47 + String year;
  48 +
  49 + String season;
  50 +
47 String endTime; 51 String endTime;
  52 +
48 53
49 - @Override 54 + public String getYear() {
  55 + return year;
  56 + }
  57 +
  58 + public void setYear(String year) {
  59 + this.year = year;
  60 + }
  61 +
  62 + public String getSeason() {
  63 + return season;
  64 + }
  65 +
  66 + public void setSeason(String season) {
  67 +
  68 + String[] arr = season.replace("第", "-").replace("季度", "").split("-");
  69 +
  70 + String year = arr[0];
  71 + int s = Integer.parseInt(arr[1]);
  72 +
  73 + String b = " STR_TO_DATE('" + year +"-"+ ((s-1)*3 +1) +"'," + "'%Y-%m')" + " and STR_TO_DATE('" + year +"-"+ (s*3) +"'," + "'%Y-%m')";
  74 +
  75 + this.season = b;
  76 + }
  77 +
  78 + @Override
50 public String getEndTime() { 79 public String getEndTime() {
51 // TODO Auto-generated method stub 80 // TODO Auto-generated method stub
52 return super.getEndTime(); 81 return super.getEndTime();
trash-workFlow/src/main/java/com/trash/business/mapper/SupervisionTrackMapper.java
1 package com.trash.business.mapper; 1 package com.trash.business.mapper;
2 2
3 import java.util.List; 3 import java.util.List;
  4 +import java.util.Map;
  5 +
4 import com.trash.business.domain.SupervisionTrack; 6 import com.trash.business.domain.SupervisionTrack;
5 7
6 /** 8 /**
@@ -58,4 +60,9 @@ public interface SupervisionTrackMapper @@ -58,4 +60,9 @@ public interface SupervisionTrackMapper
58 * @return 结果 60 * @return 结果
59 */ 61 */
60 int deleteSupervisionTrackByIds(Long[] ids); 62 int deleteSupervisionTrackByIds(Long[] ids);
  63 +
  64 + List<Map<String, String>> getAllDate();
  65 +
  66 + List<Map<String, String>> getTables(SupervisionTrack supervisionTrack);
  67 +
61 } 68 }
trash-workFlow/src/main/java/com/trash/caseOffline/domain/CaseOffline.java
@@ -98,8 +98,30 @@ public class CaseOffline extends BaseEntity @@ -98,8 +98,30 @@ public class CaseOffline extends BaseEntity
98 98
99 private List<String> names; 99 private List<String> names;
100 100
  101 +
  102 + private List<String> cArea;
  103 +
  104 + private List<String> eArea;
  105 +
101 106
102 - public List<String> getNames() { 107 +
  108 + public List<String> getcArea() {
  109 + return cArea;
  110 + }
  111 +
  112 + public void setcArea(List<String> cArea) {
  113 + this.cArea = cArea;
  114 + }
  115 +
  116 + public List<String> geteArea() {
  117 + return eArea;
  118 + }
  119 +
  120 + public void seteArea(List<String> eArea) {
  121 + this.eArea = eArea;
  122 + }
  123 +
  124 + public List<String> getNames() {
103 return names; 125 return names;
104 } 126 }
105 127
trash-workFlow/src/main/java/com/trash/caseOffline/service/impl/CaseOfflineServiceImpl.java
@@ -88,20 +88,33 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService @@ -88,20 +88,33 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService
88 JSONArray earthList = redisCache.getCacheObject("earthSitesList"); 88 JSONArray earthList = redisCache.getCacheObject("earthSitesList");
89 JSONArray construList = redisCache.getCacheObject("constructionList"); 89 JSONArray construList = redisCache.getCacheObject("constructionList");
90 90
91 - for(Object obj:earthList){  
92 - JSONObject jsonObject = (JSONObject) obj;  
93 - if(eLish.indexOf(jsonObject.getString("id")) > -1 || eArea.indexOf(jsonObject.getString("areaCode"))> -10){  
94 - names.add(jsonObject.getString("name")); 91 + if(cArea.size() > 0){
  92 +
  93 + caseOffline.setcArea(cArea);
  94 +
  95 + }else{
  96 +
  97 + for(Object obj:construList){
  98 + JSONObject jsonObject = (JSONObject) obj;
  99 + if(cLish.indexOf(jsonObject.getString("id")) > -1){
  100 + names.add(jsonObject.getString("name"));
  101 + }
95 } 102 }
  103 +
96 } 104 }
97 - for(Object obj:construList){  
98 - JSONObject jsonObject = (JSONObject) obj;  
99 - if(cLish.indexOf(jsonObject.getString("id")) > -1 || cArea.indexOf(jsonObject.getString("areaCode"))> -1){  
100 - names.add(jsonObject.getString("name")); 105 + if(eArea.size() > 0){
  106 + caseOffline.seteArea(eArea);
  107 + }else{
  108 + for(Object obj:earthList){
  109 + JSONObject jsonObject = (JSONObject) obj;
  110 + if(eLish.indexOf(jsonObject.getString("id")) > -1){
  111 + names.add(jsonObject.getString("name"));
  112 + }
101 } 113 }
102 } 114 }
103 115
104 - if(names.size() == 0){ 116 +
  117 + if(names.size() == 0 && cArea.size() == 0 && eArea.size() == 0){
105 return list; 118 return list;
106 }else{ 119 }else{
107 caseOffline.setNames(names); 120 caseOffline.setNames(names);
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
@@ -47,14 +47,17 @@ public class ViolationCaseFile extends BaseEntity @@ -47,14 +47,17 @@ public class ViolationCaseFile extends BaseEntity
47 private String violationType; 47 private String violationType;
48 48
49 /** 违规等级 */ 49 /** 违规等级 */
  50 + @Excel(name = "违规等级")
50 private String violationGrade; 51 private String violationGrade;
51 52
52 53
53 54
54 /** 企业名称 */ 55 /** 企业名称 */
  56 + @Excel(name = "企业名称")
55 private String companyName; 57 private String companyName;
56 58
57 /** 违规描述 */ 59 /** 违规描述 */
  60 + @Excel(name = "违规描述")
58 private String describe; 61 private String describe;
59 62
60 /** 推送对象 */ 63 /** 推送对象 */
@@ -69,12 +72,14 @@ public class ViolationCaseFile extends BaseEntity @@ -69,12 +72,14 @@ public class ViolationCaseFile extends BaseEntity
69 private Integer status; 72 private Integer status;
70 73
71 /** 接收人 */ 74 /** 接收人 */
  75 + @Excel(name = "接收人")
72 private String receive; 76 private String receive;
73 77
74 /** 接收状态 */ 78 /** 接收状态 */
75 private Integer receiveStatus; 79 private Integer receiveStatus;
76 80
77 /** 阅览人 */ 81 /** 阅览人 */
  82 + @Excel(name = "发送人")
78 private String readBy; 83 private String readBy;
79 84
80 /** 阅览时间 */ 85 /** 阅览时间 */
trash-workFlow/src/main/resources/mapper/SupervisionTrackMapper.xml
@@ -31,9 +31,90 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -31,9 +31,90 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
31 <if test="place != null and place != ''"> and place = #{place}</if> 31 <if test="place != null and place != ''"> and place = #{place}</if>
32 <if test="status != null "> and status = #{status}</if> 32 <if test="status != null "> and status = #{status}</if>
33 <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if> 33 <if test="objectId != null and objectId != ''"> and object_id = #{objectId}</if>
  34 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  35 + <if test="season != null"> and create_time BETWEEN ${season}</if>
34 </where> 36 </where>
35 </select> 37 </select>
36 38
  39 + <select id="getTables" parameterType="SupervisionTrack" resultType="java.util.HashMap">
  40 +
  41 + select * from (select type,count(*) as 'count' from supervision_track
  42 + <where>
  43 + <if test="place != null and place != ''"> and place = #{place}</if>
  44 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  45 + <if test="season != null"> and create_time BETWEEN ${season}</if>
  46 + </where>
  47 + GROUP BY type) a
  48 + left JOIN (
  49 + select type,count(*) as 'status0' from supervision_track
  50 + <where>
  51 + status = 0
  52 + <if test="place != null and place != ''"> and place = #{place}</if>
  53 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  54 + <if test="season != null"> and create_time BETWEEN ${season}</if>
  55 + </where>
  56 + GROUP BY type) b
  57 + on b.type = a.type
  58 + left JOIN (
  59 + select type,count(*) as 'status1' from supervision_track
  60 +
  61 + <where>
  62 + status = 1
  63 + <if test="place != null and place != ''"> and place = #{place}</if>
  64 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  65 + <if test="season != null"> and create_time BETWEEN ${season}</if>
  66 + </where>
  67 +
  68 + GROUP BY type) c
  69 + on c.type = a.type
  70 + left JOIN (
  71 + select type,count(*) as 'status2' from supervision_track
  72 + <where>
  73 + status = 2
  74 + <if test="place != null and place != ''"> and place = #{place}</if>
  75 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  76 + <if test="season != null"> and create_time BETWEEN ${season}</if>
  77 + </where>
  78 + GROUP BY type) d
  79 + on c.type = d.type
  80 + left JOIN (
  81 + select type,count(*) as 'status3' from supervision_track
  82 + <where>
  83 + status = 3
  84 + <if test="place != null and place != ''"> and place = #{place}</if>
  85 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  86 + <if test="season != null"> and create_time BETWEEN ${season}</if>
  87 + </where>
  88 + GROUP BY type) e
  89 + on b.type = a.type
  90 + left JOIN (
  91 + select type,count(*) as 'status4' from supervision_track
  92 + <where>
  93 + status = 4
  94 + <if test="place != null and place != ''"> and place = #{place}</if>
  95 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  96 + <if test="season != null"> and create_time BETWEEN ${season}</if>
  97 + </where>
  98 + GROUP BY type) f
  99 + on c.type = a.type
  100 + left JOIN (
  101 + select type,count(*) as 'status5' from supervision_track
  102 + <where>
  103 + status = 5
  104 + <if test="place != null and place != ''"> and place = #{place}</if>
  105 + <if test="year != null "> and DATE_FORMAT(create_time ,"%Y") = #{year}</if>
  106 + <if test="season != null"> and create_time BETWEEN ${season}</if>
  107 + </where>
  108 + GROUP BY type) g
  109 + on c.type = d.type
  110 +
  111 + </select>
  112 +
  113 +
  114 +
  115 +
  116 +
  117 +
37 <select id="selectSupervisionTrackById" parameterType="Long" resultMap="SupervisionTrackResult"> 118 <select id="selectSupervisionTrackById" parameterType="Long" resultMap="SupervisionTrackResult">
38 <include refid="selectSupervisionTrackVo"/> 119 <include refid="selectSupervisionTrackVo"/>
39 where id = #{id} 120 where id = #{id}
@@ -78,6 +159,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -78,6 +159,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
78 </trim> 159 </trim>
79 where id = #{id} 160 where id = #{id}
80 </update> 161 </update>
  162 +
  163 + <select id="getAllDate" resultType="java.util.HashMap">
  164 + select DATE_FORMAT(create_time , "%Y") as 'year',DATE_FORMAT(create_time , "%Y-%m") as 'month' from supervision_track GROUP BY DATE_FORMAT(create_time , "%Y-%m");
  165 + </select>
  166 +
81 167
82 <delete id="deleteSupervisionTrackById" parameterType="Long"> 168 <delete id="deleteSupervisionTrackById" parameterType="Long">
83 delete from supervision_track where id = #{id} 169 delete from supervision_track where id = #{id}
trash-workFlow/src/main/resources/mapper/caseOffline/CaseOfflineMapper.xml
@@ -37,12 +37,41 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -37,12 +37,41 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
37 <if test="type != null and type != ''"> and type = #{type}</if> 37 <if test="type != null and type != ''"> and type = #{type}</if>
38 <if test="place != null and place != ''"> and place = #{place}</if> 38 <if test="place != null and place != ''"> and place = #{place}</if>
39 <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if> 39 <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if>
40 - <if test="names != null "> 40 + <if test="names != null and names.size() > 0">
41 and site_name in 41 and site_name in
42 <foreach item="name" collection="names" open="(" separator="," close=")"> 42 <foreach item="name" collection="names" open="(" separator="," close=")">
43 #{name} 43 #{name}
44 </foreach> 44 </foreach>
45 </if> 45 </if>
  46 + <if test="cArea != null and cArea.size() > 0 and eArea != null and eArea.size() > 0">
  47 + and 1 = 1 and ((place in
  48 + <foreach item="name" collection="cArea" open="(" separator="," close=")">
  49 + #{name}
  50 + </foreach>
  51 + and site_type = 0)
  52 + or (place in
  53 + <foreach item="name" collection="eArea" open="(" separator="," close=")">
  54 + #{name}
  55 + </foreach>
  56 + and site_type = 1
  57 + )
  58 + )
  59 + </if>
  60 + <if test="cArea != null and cArea.size() > 0 and (eArea == null or eArea.size() == 0)">
  61 + and place in
  62 + <foreach item="name" collection="cArea" open="(" separator="," close=")">
  63 + #{name}
  64 + </foreach>
  65 + and site_type = 0
  66 +
  67 + </if>
  68 + <if test="eArea != null and eArea.size() > 0 and (cArea == null or cArea.size() == 0)">
  69 + and place in
  70 + <foreach item="name" collection="cArea" open="(" separator="," close=")">
  71 + #{name}
  72 + </foreach>
  73 + and site_type = 1
  74 + </if>
46 75
47 <if test="createTime != null "> and create_time > #{createTime}</if> 76 <if test="createTime != null "> and create_time > #{createTime}</if>
48 </where> 77 </where>