Commit 06c599be9bc98c68208b792292419387a1bab435

Authored by youxiw2000
1 parent a9012930

m

Showing 22 changed files with 431 additions and 102 deletions
trash-activiti/src/main/java/com/trash/activiti/domain/dto/ActTaskDTO.java
... ... @@ -75,7 +75,7 @@ public class ActTaskDTO
75 75 this.instanceName = processInstance.getName();
76 76 this.definitionKey= processInstance.getProcessDefinitionKey();
77 77 this.businessKey= processInstance.getBusinessKey();
78   - this.checkStatus = from.getControlValue().equals("通过") ? "0" : "1";
  78 + this.checkStatus = from.getControlValue().equals("通过") ? "1" : "2";
79 79 this.createdDate = from.getCreateTime();
80 80 try {
81 81 this.reason = map.get("reason").toString();;
... ... @@ -97,7 +97,7 @@ public class ActTaskDTO
97 97 this.checkStatus = map.get("state").toString();;
98 98 this.createdDate = timeSdf.parse(map.get("createTime").toString());
99 99 this.reason = map.get("reason").toString();;
100   - this.type = map.get("type").toString();;
  100 + this.type = map.get("type").toString();
101 101 this.createBy = map.get("create_by").toString();;
102 102 this.time = map.get("createTime").toString();
103 103 } catch (Exception e) {
... ...
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
... ... @@ -73,9 +73,23 @@ public class RemoteServerUtils {
73 73  
74 74 public static String BasevehicleInfo = "/api/gpsservice/cs/basevehicle/";
75 75  
76   -
77 76 public static String ContractList = "/api/siteservice/cs/sitecontract/ledger/list";
78 77  
  78 + public static String Unitetransport = "/api/siteservice/cs/unitetransport/bysite/";
  79 +
  80 +
  81 + public static JSONArray getUnitetransport(String id){
  82 + JSONArray list = null;
  83 + try {
  84 + list = (JSONArray)get(Unitetransport+id,null);
  85 + } catch (Exception e) {
  86 + // TODO: handle exception
  87 + }
  88 +
  89 + return list;
  90 + }
  91 +
  92 +
79 93 public static JSONArray getContractList(Map map){
80 94 JSONArray list=null;
81 95 Object object = post(ContractList,map);
... ...
trash-ui/dist.rar
No preview for this file type
trash-ui/src/main.js
... ... @@ -37,8 +37,8 @@ Vue.prototype.handleTree = handleTree
37 37 Vue.prototype.parseStatus = parseStatus
38 38 Vue.prototype.checkPer = checkPermi
39 39  
40   -// Vue.prototype.remoteFrame = "http://183.66.242.6:14601"
41   -Vue.prototype.remoteFrame = "http://175.6.47.84:8008"
  40 +Vue.prototype.remoteFrame = "http://183.66.242.6:14601"
  41 +// Vue.prototype.remoteFrame = "http://175.6.47.84:8008"
42 42  
43 43 Vue.prototype.msgSuccess = function (msg) {
44 44 this.$message({ showClose: true, message: msg, type: "success" });
... ...
trash-ui/src/views/h5/task/companyInfo.vue
... ... @@ -74,22 +74,22 @@ import store from "@/store";
74 74 let http = this.remoteFrame;
75 75  
76 76 if(this.businessType == 0){
77   - this.src = http + "/h5/#/enterpriseInfo?enterpriseId=" + id;
  77 + this.src = http + "/h5/#/enterpriseInfo?enterpriseId=" + id + "&isThird=1";
78 78 }
79 79 if(this.businessType == 1){
80   - this.src = http + "/h5/#/vehicleDetail?id=" + id;
  80 + this.src = http + "/h5/#/vehicleDetail?id=" + id + "&isThird=1";
81 81 }
82 82 if(this.businessType == 2){
83   - this.src = http + "/h5/#/constructionInfo?id="+id;
  83 + this.src = http + "/h5/#/constructionInfo?id="+id + "&isThird=1";
84 84 }
85 85 if(this.businessType == 3){
86   - this.src = http + "/h5/#/digestionSite?digestionId=" + id;
  86 + this.src = http + "/h5/#/digestionSite?digestionId=" + id + "&isThird=1";
87 87 }
88 88 if(this.businessType == 4){
89   - this.src = http + "/h5/#/contractDetail?id=" + id;
  89 + this.src = http + "/h5/#/contractDetail?id=" + id + "&isThird=1";
90 90 }
91 91 if(this.businessType == 5){
92   - this.src = http + "/h5/#/driverDetail?id=" + id;
  92 + this.src = http + "/h5/#/driverDetail?id=" + id + "&isThird=1";
93 93 }
94 94 },
95 95  
... ...
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
... ... @@ -45,6 +45,7 @@ import com.trash.common.utils.poi.ExcelUtil;
45 45 import com.trash.common.core.page.PageDomain;
46 46 import com.trash.common.core.page.TableDataInfo;
47 47 import com.trash.common.core.page.TableSupport;
  48 +import com.trash.common.core.redis.RedisCache;
48 49  
49 50 /**
50 51 * 三查机制Controller
... ... @@ -58,6 +59,9 @@ public class SupervisionThreestepController extends BaseController
58 59 {
59 60 @Autowired
60 61 private ISupervisionThreestepService supervisionThreestepService;
  62 +
  63 + @Autowired
  64 + RedisCache redisCache;
61 65  
62 66 /**
63 67 * 查询三查机制列表
... ... @@ -66,13 +70,24 @@ public class SupervisionThreestepController extends BaseController
66 70 public TableDataInfo list(SupervisionThreestep supervisionThreestep)
67 71 {
68 72 startPage();
69   - if(supervisionThreestep.getStatus() == null){
70 73 supervisionThreestep.setCreateBy(SecurityUtils.getUsername());
71   - }else{
72   - Map<String, String> map = new HashMap<String, String>();
73   - map.put("type", "CSUserDepartmentType");
74   - JSONArray depts = RemoteServerUtils.getDict(map);
75   - JSONArray areas = RemoteServerUtils.getAreas();
  74 +
  75 + JSONArray depts = redisCache.getCacheObject("CSUserDepartmentType");
  76 +
  77 + JSONArray areas = redisCache.getCacheObject("areas");
  78 +
  79 + if(areas == null){
  80 + areas = RemoteServerUtils.getAreas();
  81 + redisCache.setCacheObject("areas", areas);
  82 + }
  83 +
  84 + if(depts == null){
  85 + Map<String, String> map = new HashMap<String, String>();
  86 + map.put("type", "CSUserDepartmentType");
  87 + depts = RemoteServerUtils.getDict(map);
  88 + redisCache.setCacheObject("CSUserDepartmentType", depts);
  89 + }
  90 +
76 91  
77 92 for(Object object :depts){
78 93 JSONObject dept = (JSONObject) object;
... ... @@ -81,7 +96,7 @@ public class SupervisionThreestepController extends BaseController
81 96 for(String role:roles){
82 97 if(dept.getString("code").equals(role)){
83 98  
84   - if(dept.getString("name").equals("治理部")){
  99 + if(dept.getString("name").equals("事务中心")){
85 100 supervisionThreestep.setCreateBy(null);
86 101 break;
87 102 }
... ... @@ -99,6 +114,7 @@ public class SupervisionThreestepController extends BaseController
99 114  
100 115 supervisionThreestep.setPlace(area.getString("code"));
101 116 supervisionThreestep.setCreateBy(null);
  117 + break;
102 118 }
103 119 }
104 120 }
... ... @@ -107,7 +123,7 @@ public class SupervisionThreestepController extends BaseController
107 123 }
108 124 }
109 125 }
110   - }
  126 +
111 127  
112 128 List<SupervisionThreestep> list = supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep);
113 129 return getDataTable(list);
... ... @@ -141,7 +157,14 @@ public class SupervisionThreestepController extends BaseController
141 157 if("长沙市".equals(supervisionThreestep.getSubReason())){
142 158 supervisionThreestep.setSubReason(null);
143 159 }
144   -
  160 +
  161 + JSONArray areas = redisCache.getCacheObject("areas");
  162 +
  163 + if(areas == null){
  164 + areas = RemoteServerUtils.getAreas();
  165 + redisCache.setCacheObject("areas", areas);
  166 + }
  167 +
145 168 List<Map<String,String>> list = supervisionThreestepService.selectDayWorkList(supervisionThreestep);
146 169  
147 170 int count = 0;
... ... @@ -159,7 +182,6 @@ public class SupervisionThreestepController extends BaseController
159 182 string = "";
160 183 }
161 184  
162   - JSONArray areas = RemoteServerUtils.getAreas();
163 185  
164 186 List<String> names = new ArrayList<>();
165 187 List<String> enames = new ArrayList<>();
... ... @@ -252,9 +274,15 @@ public class SupervisionThreestepController extends BaseController
252 274 public List<SupervisionThreestep> todayDataList(@RequestBody SupervisionThreestep supervisionThreestep)
253 275 {
254 276  
255   - Map<String, String> map = new HashMap<String, String>();
256   - map.put("type", "CSUserDepartmentType");
257   - JSONArray depts = RemoteServerUtils.getDict(map);
  277 + JSONArray depts = redisCache.getCacheObject("CSUserDepartmentType");
  278 +
  279 + if(depts == null){
  280 + Map<String, String> map = new HashMap<String, String>();
  281 + map.put("type", "CSUserDepartmentType");
  282 + depts = RemoteServerUtils.getDict(map);
  283 + redisCache.setCacheObject("CSUserDepartmentType", depts);
  284 + }
  285 +
258 286  
259 287 for(Object object :depts){
260 288 JSONObject dept = (JSONObject) object;
... ... @@ -262,6 +290,15 @@ public class SupervisionThreestepController extends BaseController
262 290  
263 291 for(String role:roles){
264 292 if(dept.getString("code").equals(role)){
  293 + if(dept.getString("name").equals("事务中心")){
  294 + supervisionThreestep.setType(0L);
  295 + supervisionThreestep.setStatus(1L);
  296 +
  297 + List<SupervisionThreestep> threesteps = supervisionThreestepService.selectTodayDataList(supervisionThreestep);
  298 +
  299 + return supervisionThreestepService.selectTodayDataList(supervisionThreestep);
  300 + }
  301 +
265 302 if(dept.getString("name").contains("渣土办")){
266 303 String areaCode = dept.getString("code");
267 304 if(!areaCode.isEmpty()){
... ... @@ -279,13 +316,58 @@ public class SupervisionThreestepController extends BaseController
279 316 }
280 317 }
281 318 }
282   - supervisionThreestep.setCompanys(SecurityUtils.getUsername());
283   -
284   -
  319 +
  320 + String companyName = null;
  321 +
  322 + JSONArray compnayList = redisCache.getCacheObject("companyList");
  323 + for(Object obj:compnayList){
  324 + JSONObject con = (JSONObject) obj;
  325 +
  326 + if(con.getString("abbreviation").equals(SecurityUtils.getUsername().replace("公司", ""))){
  327 + companyName = con.getString("name");
  328 + break;
  329 + }
  330 +
  331 + }
285 332  
  333 + List<SupervisionThreestep> threesteps = supervisionThreestepService.selectTodayDataList(supervisionThreestep);
  334 +
  335 + JSONArray array = redisCache.getCacheObject("constructionList");
286 336  
287   -
288   - return supervisionThreestepService.selectTodayDataList(supervisionThreestep);
  337 + List<SupervisionThreestep> data = new ArrayList<>();
  338 +
  339 + if(companyName == null)
  340 + return data;
  341 +
  342 + for(SupervisionThreestep three:threesteps){
  343 + for(Object obj:array){
  344 + JSONObject con = (JSONObject) obj;
  345 + if(three.getObjectId().equals(con.getString("id"))){
  346 +
  347 + if(con.getString("transportCompany") != null && con.getString("transportCompany").equals(companyName)){
  348 +
  349 + data.add(three);
  350 +
  351 + continue;
  352 + }
  353 +
  354 + JSONArray array2 = RemoteServerUtils.getUnitetransport(con.getString("id"));
  355 +
  356 + for(Object comObj:array2){
  357 + JSONObject company = (JSONObject) comObj;
  358 +
  359 + if(company.getString("companyName") != null && company.getString("companyName").equals(companyName)){
  360 +
  361 + data.add(three);
  362 + break;
  363 + }
  364 + }
  365 + }
  366 + }
  367 +
  368 + }
  369 +
  370 + return data;
289 371 }
290 372  
291 373  
... ...
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
... ... @@ -33,6 +33,7 @@ import com.trash.common.utils.RemoteServerUtils;
33 33 import com.trash.common.utils.SecurityUtils;
34 34 import com.trash.common.utils.poi.ExcelUtil;
35 35 import com.trash.common.core.page.TableDataInfo;
  36 +import com.trash.common.core.redis.RedisCache;
36 37  
37 38 /**
38 39 * 车辆激活Controller
... ... @@ -52,6 +53,9 @@ public class TruckActivateController extends BaseController
52 53  
53 54 @Autowired
54 55 private TruckActivateMapper truckActivateMapper;
  56 +
  57 + @Autowired
  58 + RedisCache redisCache;
55 59 /**
56 60 * 查询车辆激活列表
57 61 */
... ... @@ -73,10 +77,10 @@ public class TruckActivateController extends BaseController
73 77 for(String role:roles){
74 78 if(dept.getString("code").equals(role)){
75 79  
76   -// if(dept.getString("name").equals("事务中心")){
77   -// list = truckActivateService.selectTruckActivateList(truckActivate);
78   -// return getDataTable(list);
79   -// }
  80 + if(dept.getString("name").equals("事务中心")){
  81 + list = truckActivateService.selectTruckActivateList(truckActivate);
  82 + return getDataTable(list);
  83 + }
80 84  
81 85 if(dept.getString("name").contains("渣土办")){
82 86 String areaCode = dept.getString("code");
... ... @@ -113,8 +117,23 @@ public class TruckActivateController extends BaseController
113 117 }
114 118 }
115 119 }
  120 + String companyName = null;
  121 +
  122 + JSONArray compnayList = redisCache.getCacheObject("companyList");
  123 + for(Object obj:compnayList){
  124 + JSONObject con = (JSONObject) obj;
  125 +
  126 + if(con.getString("abbreviation").equals(SecurityUtils.getUsername().replace("公司", ""))){
  127 + companyName = con.getString("name");
  128 + break;
  129 + }
  130 + }
116 131  
117   - truckActivate.setCompany(SecurityUtils.getUsername());
  132 + if(companyName == null){
  133 + return getDataTable(list);
  134 + }
  135 +
  136 + truckActivate.setCompany(companyName);
118 137  
119 138  
120 139 list = truckActivateService.selectTruckActivateList(truckActivate);
... ... @@ -216,8 +235,6 @@ public class TruckActivateController extends BaseController
216 235 e.printStackTrace();
217 236 }
218 237  
219   -
220   -
221 238 return ajaxResult;
222 239 }
223 240  
... ...
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionThreestep.java
... ... @@ -57,6 +57,10 @@ public class SupervisionThreestep extends BaseEntity
57 57 @Excel(name = "抽查时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
58 58 private Date checkEndTime;
59 59  
  60 +
  61 + @Excel(name = "报工状态",readConverterExp = "0=待巡查,1=巡查通过,1=巡查驳回")
  62 + private Long status;
  63 +
60 64 /** 消纳场名称 */
61 65 private String earthsitesName;
62 66  
... ... @@ -352,7 +356,7 @@ public class SupervisionThreestep extends BaseEntity
352 356 /** 电话 */
353 357 private String phone;
354 358  
355   - private Long status;
  359 +
356 360  
357 361 private String createBy;
358 362  
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
... ... @@ -222,7 +222,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
222 222 }
223 223  
224 224  
225   - JSONArray contracts = redis.getCacheObject("contractList");
  225 + JSONArray contracts = redisCache.getCacheObject("contractList");
226 226  
227 227 if(contracts == null){
228 228 Map param = new HashMap<>();
... ... @@ -234,32 +234,133 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
234 234  
235 235  
236 236 contracts = RemoteServerUtils.getContractList(param);
237   - redis.setCacheObject("contractList",contracts);
  237 + redisCache.setCacheObject("contractList",contracts);
238 238 }
239 239  
240 240  
241   - List<SupervisionThreestep> allList = supervisionThreestepMapper.selectDayWorkList(supervisionThreestep);
242   -
243   - long start = new Date().getTime();
244   -
245   - List<SupervisionThreestep> constructions = new ArrayList<>();
246   - List<SupervisionThreestep> earthsites = new ArrayList<>();
247   - JSONArray areas = RemoteServerUtils.getAreas();
  241 + JSONArray depts = redisCache.getCacheObject("CSUserDepartmentType");
  242 +
  243 + JSONArray areas = redisCache.getCacheObject("areas");
  244 +
  245 + String place = null,eplace = null,name= null,ename= null;
  246 +
  247 + String areaCode = "";
  248 +
  249 + if(areas == null){
  250 + areas = RemoteServerUtils.getAreas();
  251 + redisCache.setCacheObject("areas", areas);
  252 + }
  253 +
  254 + if(depts == null){
  255 + Map<String, String> map = new HashMap<String, String>();
  256 + map.put("type", "CSUserDepartmentType");
  257 + depts = RemoteServerUtils.getDict(map);
  258 + redisCache.setCacheObject("CSUserDepartmentType", depts);
  259 + }
  260 +
  261 +
  262 +
  263 + boolean isAdmin = false;
  264 + for(Object object :depts){
  265 + JSONObject dept = (JSONObject) object;
  266 + List<String> roles = SecurityUtils.getLoginUser().getUser().getRoleIds();
  267 +
  268 + for(String role:roles){
  269 + if(dept.getString("code").equals(role)){
  270 + if(dept.getString("name").equals("事务中心")){
  271 + supervisionThreestep.setPlace(null);
  272 + isAdmin = true;
  273 + break;
  274 + }else
  275 + if(dept.getString("name").contains("渣土办")){
  276 + areaCode = dept.getString("code");
  277 + if(!areaCode.isEmpty()){
  278 + supervisionThreestep.setPlace(areaCode);
  279 + break;
  280 + }
  281 + }
  282 + }
  283 + }
  284 + if(isAdmin){
  285 + break;
  286 + }
  287 + }
  288 +
  289 +
  290 +
  291 + List<SupervisionThreestep> allList = supervisionThreestepMapper.selectDayWorkList(supervisionThreestep);
  292 + List<SupervisionThreestep> filterList = new ArrayList<>();
  293 +
  294 + List<SupervisionThreestep> constructions = new ArrayList<>();
  295 + List<SupervisionThreestep> earthsites = new ArrayList<>();
  296 +
  297 + List<Map<String,String>> list = new ArrayList<>();
  298 +
  299 + if(!isAdmin && areaCode.isEmpty()){
  300 + String companyName = null;
  301 + JSONArray compnayList = redisCache.getCacheObject("companyList");
  302 + for(Object obj:compnayList){
  303 + JSONObject con = (JSONObject) obj;
  304 + if(con.getString("abbreviation").equals(SecurityUtils.getUsername().replace("公司", ""))){
  305 + companyName = con.getString("name");
  306 + break;
  307 + }
  308 + }
  309 +
  310 + if(companyName != null){
  311 +
  312 + JSONArray array = redisCache.getCacheObject("constructionList");
  313 +
  314 + for(SupervisionThreestep three:allList){
  315 + if(three.getType() == 1){
  316 + filterList.add(three);
  317 + continue;
  318 + }
  319 +
  320 +
  321 + for(Object obj:array){
  322 + JSONObject con = (JSONObject) obj;
  323 + if(three.getObjectId().equals(con.getString("id"))){
  324 +
  325 + if(con.getString("transportCompany") != null && con.getString("transportCompany").equals(companyName)){
  326 +
  327 + filterList.add(three);
  328 + continue;
  329 + }
  330 +
  331 + JSONArray array2 = RemoteServerUtils.getUnitetransport(con.getString("id"));
  332 +
  333 + for(Object comObj:array2){
  334 + JSONObject company = (JSONObject) comObj;
  335 +
  336 + if(company.getString("companyName") != null && company.getString("companyName").equals(companyName)){
  337 +
  338 + filterList.add(three);
  339 + break;
  340 + }
  341 + }
  342 + }
  343 + }
  344 +
  345 + }
  346 + }
  347 + }else{
  348 + filterList = allList;
  349 + }
  350 +
248 351  
249   - for(SupervisionThreestep s: allList){
250   -
251   -
  352 + for(SupervisionThreestep s: filterList){
252 353 if (s.getType() == 1) {
253 354 for(Object object:areas){
254   -
255 355 JSONObject area = (JSONObject)object;
256   -
257 356 if(s.getPlace().equals(area.getString("code"))){
258 357 s.setPlace(area.getString("name"));
259 358 }
  359 +
  360 + if(areaCode.equals(area.getString("code"))){
  361 + areaCode = area.getString("name");
  362 + }
260 363 }
261   -
262   -
263 364 }
264 365  
265 366  
... ... @@ -275,24 +376,13 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
275 376 earthsites.add(s);
276 377 }
277 378 }
278   -
279   - List<Map<String,String>> list = new ArrayList<Map<String,String>>();
280   -
281   - for(SupervisionThreestep s:constructions){
282   -
283   -
284   - for(Object object : contracts){
285   - JSONObject jsonObject = (JSONObject) object;
286 379  
287   - if(!s.getObjectId().equals(jsonObject.getString("constructionSiteID")))
288   - continue;
  380 + for(SupervisionThreestep s:constructions){
289 381  
  382 + if(supervisionThreestep.getHis().equals("1")){
290 383 for(SupervisionThreestep e:earthsites){
291 384  
292   - if(!supervisionThreestep.getHis().equals("1") && !e.getObjectId().equals(jsonObject.getString("earthSiteID")))
293   - continue;
294   -
295   - if(supervisionThreestep.getHis().equals("1") && !s.getEarthsitesId().contains(e.getObjectId()))
  385 + if(!s.getEarthsitesId().contains(e.getObjectId()))
296 386 continue;
297 387  
298 388 if(yearFomat.format(s.getCreateTime()).equals(yearFomat.format(e.getCreateTime()))){
... ... @@ -301,7 +391,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
301 391 continue;
302 392 }
303 393  
304   -
305 394 Map<String,String> map = new HashMap<String, String>();
306 395 map.put("id", s.getId() + "");
307 396 map.put("createTime", yearFomat.format(s.getCreateTime()));
... ... @@ -323,13 +412,59 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
323 412 list.add(map);
324 413 }
325 414 }
  415 + }else{
  416 + for(Object object : contracts){
  417 + JSONObject jsonObject = (JSONObject) object;
  418 +
  419 + if(!s.getObjectId().equals(jsonObject.getString("constructionSiteID")))
  420 + continue;
  421 +
  422 + for(SupervisionThreestep e:earthsites){
  423 +
  424 + if(!supervisionThreestep.getHis().equals("1") && !e.getObjectId().equals(jsonObject.getString("earthSiteID")))
  425 + continue;
  426 +
  427 + if(supervisionThreestep.getHis().equals("1") && !s.getEarthsitesId().contains(e.getObjectId()))
  428 + continue;
  429 +
  430 + if(yearFomat.format(s.getCreateTime()).equals(yearFomat.format(e.getCreateTime()))){
  431 +
  432 + if(s.getStatus() != 1 || e.getStatus() != 1){
  433 + continue;
  434 + }
  435 +
  436 + System.out.println(jsonObject.get("contractNo"));
  437 +
  438 + Map<String,String> map = new HashMap<String, String>();
  439 + map.put("id", s.getId() + "");
  440 + map.put("createTime", yearFomat.format(s.getCreateTime()));
  441 + map.put("name", s.getName());
  442 + map.put("place", s.getPlace());
  443 + map.put("status", "开工");
  444 + map.put("selfCheckTime", dateTime.format(s.getSelfCheckTime()));
  445 + map.put("objectId", s.getObjectId());
  446 + map.put("type", "");
  447 + map.put("eid", e.getObjectId());
  448 + map.put("ename", e.getName());
  449 + map.put("eplace", e.getPlace());
  450 + map.put("estatus", "开工" );
  451 + map.put("eselfCheckTime", dateTime.format(e.getSelfCheckTime()));
  452 + map.put("etype", "");
  453 +
  454 + map.put("descript", "有效开工");
  455 +
  456 + list.add(map);
  457 + }
  458 + }
  459 + }
326 460 }
  461 +
327 462 }
328 463  
329 464  
330 465 List FilterList = new ArrayList<>();
331 466  
332   - String place = null,eplace = null,name= null,ename= null;
  467 +
333 468  
334 469 if(supervisionThreestep.getPlace()!=null){
335 470 place = supervisionThreestep.getPlace();
... ... @@ -705,6 +840,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
705 840  
706 841 truckArray = unActiveTruck.split(",");
707 842  
  843 +
708 844 params.put("vehicleIds", truckArray);
709 845 params.put("page", 1);
710 846 params.put("size", 9999);
... ... @@ -803,7 +939,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
803 939 }
804 940  
805 941 @Autowired
806   - RedisCache redis;
  942 + RedisCache redisCache;
807 943  
808 944 @Override
809 945 public void updateTodayData(String token){
... ... @@ -836,7 +972,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
836 972  
837 973  
838 974  
839   - JSONArray contracts = redis.getCacheObject("contractList");
  975 + JSONArray contracts = redisCache.getCacheObject("contractList");
840 976  
841 977 if(contracts == null){
842 978 Map param = new HashMap<>();
... ... @@ -847,7 +983,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
847 983 param.put("auditStatus", 1);
848 984  
849 985 contracts = RemoteServerUtils.getContractList(param,token);
850   - redis.setCacheObject("contractList",contracts);
  986 + redisCache.setCacheObject("contractList",contracts);
851 987 }
852 988  
853 989  
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
... ... @@ -20,6 +20,7 @@ import com.trash.business.mapper.SupervisionThreestepMapper;
20 20 import com.trash.business.mapper.TruckActivateMapper;
21 21 import com.alibaba.fastjson.JSONArray;
22 22 import com.alibaba.fastjson.JSONObject;
  23 +import com.sun.jna.platform.unix.X11.XClientMessageEvent.Data;
23 24 import com.trash.business.domain.SupervisionThreestep;
24 25 import com.trash.business.domain.TruckActivate;
25 26 import com.trash.business.service.ISupervisionThreestepService;
... ... @@ -60,8 +61,6 @@ public class TruckActivateServiceImpl implements ITruckActivateService
60 61 * @return 车辆激活
61 62 */
62 63  
63   - SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
64   - SimpleDateFormat dateTimeFomat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
65 64  
66 65 @Override
67 66 public List<TruckActivate> selectTruckActivateList(TruckActivate truckActivate)
... ... @@ -84,6 +83,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService
84 83 {
85 84 String start, end;
86 85  
  86 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
  87 + SimpleDateFormat dateTimeFomat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
87 88 Date date = new Date();
88 89  
89 90 if (new Date().getHours() < 8) {
... ... @@ -281,7 +282,9 @@ public class TruckActivateServiceImpl implements ITruckActivateService
281 282 SupervisionThreestep threestep = new SupervisionThreestep();
282 283  
283 284 String conractIds = "";
284   -
  285 +
  286 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
  287 + SimpleDateFormat dateTimeFomat = new SimpleDateFormat("yyyy-MM-dd HH:mm:SS");
285 288  
286 289 turck.setObjectId(id);
287 290  
... ... @@ -309,7 +312,9 @@ public class TruckActivateServiceImpl implements ITruckActivateService
309 312 threestep.setWorkStartTime(dateTimeFomat.parse(start));
310 313 threestep.setWorkEndTime(dateTimeFomat.parse(end));
311 314 } catch (Exception e) {
312   - // TODO Auto-generated catch block
  315 +
  316 + System.out.println(date +""+ start +""+ end);
  317 +
313 318 e.printStackTrace();
314 319 }
315 320 }
... ... @@ -334,7 +339,7 @@ public class TruckActivateServiceImpl implements ITruckActivateService
334 339 }
335 340  
336 341 JSONArray array = new JSONArray();
337   - for(Object obj :array){
  342 + for(Object obj :contracts){
338 343 JSONObject jsonObject = (JSONObject)obj;
339 344  
340 345 if(m.get("object_id").equals(jsonObject.getString("constructionSiteID"))){
... ... @@ -370,7 +375,6 @@ public class TruckActivateServiceImpl implements ITruckActivateService
370 375  
371 376 @Override
372 377 public void endAllTruckUnActive() {
373   -
374 378 truckActivateMapper.endAllTurckUnActive();
375 379  
376 380 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
... ... @@ -58,13 +58,11 @@ public class Consumer {
58 58  
59 59 public void autoViolationWarning(String data,String id) throws InterruptedException, IOException {
60 60  
61   - if(1==1)
62   - return;
63   -
64 61 String[] code = {"44030020=工地预警-未报开工作业", "44030021=工地预警-视频设备离线超时报警", "44030022=工地预警-三无车辆进入工地", "44030023=工地预警-未按时间作业",
65 62 "44030024=消纳场预警-未报开工作业", "44030025=消纳场预警-视频设备离线超时报警", "44030026=消纳场预警-三无车辆进入消纳场", "44030027=消纳场预警-未到指定的消纳场作业",
66 63 "44030028=离线运输报警(工)", "44030029=离线运输报警(消)", "44030030=未激活车辆作业", "44030031=未核准作业车辆作业", "44030032=未按线路行驶",
67 64 "44030033=闯禁行驶", "44030034=失信车辆作业"};
  65 +
68 66 JSONObject jsonObject = JSONObject.parseObject(data);
69 67 //报警时间
70 68 Date alarmTime = new Date(jsonObject.getLong("alarmTime")*1000L);
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/ConractListener.java
... ... @@ -38,9 +38,9 @@ public class ConractListener implements ExecutionListener {
38 38 map.put("auditStatus", state.getValue(delegateExecution).toString());
39 39 maps.add(map);
40 40  
41   - RemoteServerUtils.updateConractStatus(maps);
  41 + Object obj = RemoteServerUtils.updateConractStatus(maps);
42 42  
43   - workflowUtils.sendDataToHisTory(delegateExecution, state);
  43 + workflowUtils.sendDataToHisTory(delegateExecution, state,String.valueOf(obj));
44 44  
45 45  
46 46 System.out.println("流程状态更新 更新ID:" + delegateExecution.getProcessInstanceBusinessKey() + "状态:" + state.getValue(delegateExecution).toString());
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/ConstructionEndListener.java
... ... @@ -40,9 +40,9 @@ public class ConstructionEndListener implements ExecutionListener {
40 40 map.put("auditStatus", state.getValue(delegateExecution).toString());
41 41 maps.add(map);
42 42  
43   - RemoteServerUtils.updateConstationCreditAndStatus(maps);
  43 + Object obj = RemoteServerUtils.updateConstationCreditAndStatus(maps);
44 44  
45   - workflowUtils.sendDataToHisTory(delegateExecution, state);
  45 + workflowUtils.sendDataToHisTory(delegateExecution, state,String.valueOf(obj));
46 46  
47 47  
48 48 System.out.println("流程状态更新 更新ID:" + delegateExecution.getProcessInstanceBusinessKey() + "状态:" + state.getValue(delegateExecution).toString());
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/EarthSitesEndStateListener.java
... ... @@ -41,9 +41,9 @@ public class EarthSitesEndStateListener implements ExecutionListener {
41 41 map.put("auditStatus", state.getValue(delegateExecution).toString());
42 42 maps.add(map);
43 43  
44   - RemoteServerUtils.updateEarthSitesCreditAndStatus(maps);
  44 + Object obj = RemoteServerUtils.updateEarthSitesCreditAndStatus(maps);
45 45  
46   - workflowUtils.sendDataToHisTory(delegateExecution, state);
  46 + workflowUtils.sendDataToHisTory(delegateExecution, state,String.valueOf(obj));
47 47  
48 48 System.out.println("流程状态更新 更新ID:" + delegateExecution.getProcessInstanceBusinessKey() + "状态:" + state.getValue(delegateExecution).toString());
49 49 }
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/SupervisionListener.java
... ... @@ -42,9 +42,9 @@ public class SupervisionListener implements ExecutionListener {
42 42  
43 43 maps.add(map);
44 44  
45   - RemoteServerUtils.UpdateSupervisionStatus(maps);
  45 + Object obj = RemoteServerUtils.UpdateSupervisionStatus(maps);
46 46  
47   - workflowUtils.sendDataToHisTory(delegateExecution, state);
  47 + workflowUtils.sendDataToHisTory(delegateExecution, state,String.valueOf(obj));
48 48  
49 49  
50 50 System.out.println("纪检督察流程状态更新 更新ID:" + delegateExecution.getProcessInstanceBusinessKey() + "状态:" + state.getValue(delegateExecution).toString());
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/SupervisionStateListener.java
... ... @@ -27,7 +27,7 @@ public class SupervisionStateListener implements ExecutionListener {
27 27  
28 28 SpringUtils.getBean(SupervisionThreestepMapper.class).updateSupervisionThreestep(supervisionThreestep);
29 29  
30   - workflowUtils.sendDataToHisTory(delegateExecution, state);
  30 + workflowUtils.sendDataToHisTory(delegateExecution, state,"true");
31 31  
32 32 }
33 33 }
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/baseDataListener.java
... ... @@ -2,6 +2,7 @@ package com.trash.workflow.listener;
2 2  
3 3 import com.trash.office.domain.Conference;
4 4 import com.trash.office.mapper.ConferenceMapper;
  5 +import com.trash.workflow.mapper.WorkflowMapper;
5 6 import com.alibaba.fastjson.JSONObject;
6 7 import com.trash.common.utils.RemoteServerUtils;
7 8 import com.trash.common.utils.SecurityUtils;
... ... @@ -89,6 +90,13 @@ public class baseDataListener implements ExecutionListener {
89 90 } catch (Exception e) {
90 91 e.printStackTrace();
91 92 }
  93 +
  94 + try {
  95 + Thread.sleep(3000);
  96 + } catch (InterruptedException e) {
  97 + // TODO Auto-generated catch block
  98 + e.printStackTrace();
  99 + }
92 100  
93 101 }
94 102  
... ... @@ -96,11 +104,8 @@ public class baseDataListener implements ExecutionListener {
96 104 }).start();
97 105 }
98 106  
99   -
100   -
101   -
102   -
103   - workflowUtils.sendDataToHisTory(delegateExecution, state);
  107 +
  108 + workflowUtils.sendDataToHisTory(delegateExecution, state,String.valueOf( object));
104 109 }
105 110  
106 111  
... ...
trash-workFlow/src/main/java/com/trash/workflow/listener/workflowUtils.java
1 1 package com.trash.workflow.listener;
2 2  
  3 +import java.util.HashMap;
  4 +import java.util.Map;
  5 +
3 6 import org.activiti.engine.delegate.DelegateExecution;
4 7 import org.activiti.engine.delegate.Expression;
5 8  
... ... @@ -9,8 +12,23 @@ import com.trash.workflow.mapper.WorkflowMapper;
9 12  
10 13 public class workflowUtils {
11 14  
12   - public static void sendDataToHisTory(DelegateExecution delegateExecution,Expression state) {
  15 + public static void sendDataToHisTory(DelegateExecution delegateExecution,Expression state,String result) {
13 16 WorkflowMapper workflowMapper = SpringUtils.getBean(WorkflowMapper.class);
  17 +
  18 +
  19 + Map data = new HashMap();
  20 +
  21 + data.put("id", delegateExecution.getProcessInstanceBusinessKey().split(":")[1]);
  22 +
  23 + data.put("type", delegateExecution.getProcessInstanceBusinessKey());
  24 +
  25 + data.put("state", state.getValue(delegateExecution));
  26 +
  27 + data.put("result",result);
  28 +
  29 + workflowMapper.insertUpdateData(data);
  30 +
  31 +
14 32  
15 33 Workflow workflow = new Workflow();
16 34  
... ... @@ -27,4 +45,8 @@ public class workflowUtils {
27 45 workflowMapper.deleteWorkflowById(delegateExecution.getProcessInstanceBusinessKey());
28 46 }
29 47  
  48 + public static void sendDataToHisTory(DelegateExecution delegateExecution, Expression state) {
  49 + sendDataToHisTory(delegateExecution,state,"null");
  50 + }
  51 +
30 52 }
... ...
trash-workFlow/src/main/java/com/trash/workflow/mapper/WorkflowMapper.java
1 1 package com.trash.workflow.mapper;
2 2  
3 3 import java.util.List;
  4 +import java.util.Map;
4 5  
5 6 import org.apache.ibatis.annotations.Param;
6 7  
... ... @@ -78,4 +79,6 @@ Workflow selectWorkflowByInstanceId(String instanceId);
78 79 */
79 80 int deleteWorkflowByIds(String[] ids);
80 81 public void deleteWorkflowByName(String str);
  82 +
  83 + void insertUpdateData(Map data);
81 84 }
... ...
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
... ... @@ -240,7 +240,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
240 240 workflow.setReason("报工自查");
241 241 workflow.setStartTime(sdf.format(supervision.getSelfCheckTime()));
242 242 workflow.setEndTime(sdf.format(supervision.getSelfCheckTime()));
243   - workflow.setType(supervision.getType() == 0 ? "工地" : "消纳场");
  243 + workflow.setType("报工审批");
244 244 workflow.setInstanceId(processInstance.getId());
245 245 workflow.setState("0");
246 246 workflow.setCreateTime(new Date());
... ... @@ -262,7 +262,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
262 262 String flowType = "workflow_casefile";
263 263 try {
264 264  
265   - if(caseFile.getOwningRegion().contains("湘江新区")){
  265 + if(index > 0 && caseFile.getOwningRegion().contains("湘江新区")){
266 266 index += 3;
267 267 }
268 268  
... ... @@ -286,7 +286,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
286 286 workflow.setReason("平台案卷");
287 287 workflow.setStartTime(sdf.format(caseFile.getCreateTime()));
288 288 workflow.setEndTime(sdf.format(caseFile.getCreateTime()));
289   - workflow.setType("案卷");
  289 + workflow.setType("违规案卷处置流程");
290 290 workflow.setInstanceId(processInstance.getId());
291 291 workflow.setState("0");
292 292 workflow.setCreateTime(new Date());
... ... @@ -317,7 +317,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
317 317 String title = "案卷号:" + caseFile.getNumber();
318 318 String flowType = "violation_warning";
319 319  
320   - if(caseFile.getOwningRegion().contains("湘江新区")){
  320 + if(index > 0 && caseFile.getOwningRegion().contains("湘江新区")){
321 321 index += 3;
322 322 }
323 323  
... ... @@ -346,7 +346,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
346 346 workflow.setReason("违规预警信息");
347 347 workflow.setStartTime(sdf.format(caseFile.getCreateTime()));
348 348 workflow.setEndTime(sdf.format(caseFile.getCreateTime()));
349   - workflow.setType("违规预警信息案卷");
  349 + workflow.setType("平台预警信息");
350 350 workflow.setInstanceId(instance.getId());
351 351 workflow.setState("0");
352 352 workflow.setCreateTime(new Date());
... ... @@ -379,7 +379,7 @@ public class WorkflowServiceImpl implements IWorkflowService {
379 379 workflow.setReason("案卷线下交办");
380 380 workflow.setStartTime(sdf.format(caseOffline.getCreateTime()));
381 381 workflow.setEndTime(sdf.format(caseOffline.getCreateTime()));
382   - workflow.setType("案卷");
  382 + workflow.setType("交办案卷");
383 383 workflow.setInstanceId(processInstance.getId());
384 384 workflow.setState("0");
385 385 workflow.setCreateTime(new Date());
... ...
trash-workFlow/src/main/resources/mapper/WorkflowMapper.xml
... ... @@ -126,6 +126,18 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
126 126 <if test="updateTime != null">#{updateTime},</if>
127 127 </trim>
128 128 </insert>
  129 +
  130 + <insert id="insertUpdateData" parameterType="Map">
  131 + insert into workflow_data(id,type,state,result,time)
  132 + values (
  133 + #{id},
  134 + #{type},
  135 + #{state},
  136 + #{result},
  137 + NOW()
  138 + )
  139 + </insert>
  140 +
129 141  
130 142 <update id="updateWorkflow" parameterType="Workflow">
131 143 update workflow
... ...
workflow_data.sql 0 → 100644
  1 +/*
  2 + Navicat Premium Data Transfer
  3 +
  4 + Source Server : rrr
  5 + Source Server Type : MySQL
  6 + Source Server Version : 100508 (10.5.8-MariaDB)
  7 + Source Host : localhost:3306
  8 + Source Schema : trash
  9 +
  10 + Target Server Type : MySQL
  11 + Target Server Version : 100508 (10.5.8-MariaDB)
  12 + File Encoding : 65001
  13 +
  14 + Date: 18/07/2023 20:14:19
  15 +*/
  16 +
  17 +SET NAMES utf8mb4;
  18 +SET FOREIGN_KEY_CHECKS = 0;
  19 +
  20 +-- ----------------------------
  21 +-- Table structure for workflow_data
  22 +-- ----------------------------
  23 +DROP TABLE IF EXISTS `workflow_data`;
  24 +CREATE TABLE `workflow_data` (
  25 + `id` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '主键ID',
  26 + `type` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '请假类型',
  27 + `result` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '标题',
  28 + `state` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态',
  29 + `time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP
  30 +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '请假' ROW_FORMAT = DYNAMIC;
  31 +
  32 +SET FOREIGN_KEY_CHECKS = 1;
... ...