Commit c9abcb960329215b70519c888be91e52daf4c9a2
Merge branch 'dev' of 192.168.168.245:youxiw20000/trash into dev
Showing
16 changed files
with
183 additions
and
21 deletions
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
| ... | ... | @@ -47,6 +47,8 @@ public class RemoteServerUtils { |
| 47 | 47 | |
| 48 | 48 | public static String UpdateConstruction= "/api/siteservice/cs/constructionsites/status"; |
| 49 | 49 | |
| 50 | + public static String UpdateSupervision= "/api/gpsservice/cs/supervision/status/update"; | |
| 51 | + | |
| 50 | 52 | |
| 51 | 53 | public static String CompanyListRequestPath = "/api/gpsservice/cs/companies/ledger/list"; |
| 52 | 54 | |
| ... | ... | @@ -70,6 +72,18 @@ public class RemoteServerUtils { |
| 70 | 72 | return list; |
| 71 | 73 | } |
| 72 | 74 | |
| 75 | + public static JSONArray getEarthSitesList(Map map,String token){ | |
| 76 | + JSONArray list=null; | |
| 77 | + Object object = post(EarthSitesList,map,token); | |
| 78 | + | |
| 79 | + if(object != null){ | |
| 80 | + JSONObject jsonObject = JSON.parseObject(object.toString()); | |
| 81 | + list = jsonObject.getJSONArray("list"); | |
| 82 | + } | |
| 83 | + | |
| 84 | + return list; | |
| 85 | + } | |
| 86 | + | |
| 73 | 87 | public static JSONArray getConstructionList(Map map){ |
| 74 | 88 | JSONArray list=null; |
| 75 | 89 | Object object = post(ConstructionList,map); |
| ... | ... | @@ -82,6 +96,18 @@ public class RemoteServerUtils { |
| 82 | 96 | return list; |
| 83 | 97 | } |
| 84 | 98 | |
| 99 | + public static JSONArray getConstructionList(Map map,String token){ | |
| 100 | + JSONArray list=null; | |
| 101 | + Object object = post(ConstructionList,map,token); | |
| 102 | + | |
| 103 | + if(object != null){ | |
| 104 | + JSONObject jsonObject = JSON.parseObject(object.toString()); | |
| 105 | + list = jsonObject.getJSONArray("list"); | |
| 106 | + } | |
| 107 | + | |
| 108 | + return list; | |
| 109 | + } | |
| 110 | + | |
| 85 | 111 | public static JSONArray getTruckOnline(Map map){ |
| 86 | 112 | JSONArray turckList=null; |
| 87 | 113 | Object object = post(TruckStatusListRequestPath,map); |
| ... | ... | @@ -100,6 +126,12 @@ public class RemoteServerUtils { |
| 100 | 126 | |
| 101 | 127 | return object; |
| 102 | 128 | } |
| 129 | + | |
| 130 | + public static Object UpdateSupervisionStatus(List<Map> map){ | |
| 131 | + Object object = post(UpdateSupervision,map); | |
| 132 | + | |
| 133 | + return object; | |
| 134 | + } | |
| 103 | 135 | |
| 104 | 136 | public static Object updateEarthSitesCreditAndStatus(List<Map> map){ |
| 105 | 137 | JSONArray turckList=null; | ... | ... |
trash-ui/src/views/business/threestep/threestepInfo.vue
trash-ui/src/views/casefile/violationCaseFile/index.vue
trash-ui/src/views/casefile/violationWarningInformation/index.vue
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationInfo.vue
| ... | ... | @@ -83,7 +83,7 @@ |
| 83 | 83 | <el-row> |
| 84 | 84 | <el-col :span="22"> |
| 85 | 85 | <el-form-item label="违规描述" prop="describe"> |
| 86 | - <el-input v-model="form.describe" type="textarea" placeholder="请输入内容" :rows="5" :disabled="true"/> | |
| 86 | + <el-input v-model="form.describe" type="textarea" placeholder="请输入内容" :rows="5" :disabled="true"style="white-space: pre-line"/> | |
| 87 | 87 | </el-form-item> |
| 88 | 88 | </el-col> |
| 89 | 89 | </el-row> | ... | ... |
trash-ui/src/views/h5/leaveApplication/index.vue
trash-ui/src/views/h5/violationCaseFile/index.vue
trash-ui/src/views/h5/violationWarningInformation/index.vue
trash-ui/src/views/office/handle/index.vue
| ... | ... | @@ -110,18 +110,18 @@ |
| 110 | 110 | </template> |
| 111 | 111 | </el-table-column> |
| 112 | 112 | <el-table-column label="公文类" align="center"> |
| 113 | - <el-table-column label="来文单位" align="center" prop="company" show-overflow-tooltip="true"/> | |
| 113 | + <el-table-column label="来文单位" align="center" prop="company" :show-overflow-tooltip="true"/> | |
| 114 | 114 | <el-table-column label="收文时间" align="center" prop="receiveTime" width="180"> |
| 115 | 115 | <template slot-scope="scope"> |
| 116 | 116 | <span>{{ parseTime(scope.row.receiveTime, '{y}-{m}-{d}') }}</span> |
| 117 | 117 | </template> |
| 118 | 118 | </el-table-column> |
| 119 | - <el-table-column label="文件标题" align="center" prop="title" show-overflow-tooltip="true"/> | |
| 119 | + <el-table-column label="文件标题" align="center" prop="title" :show-overflow-tooltip="true"/> | |
| 120 | 120 | </el-table-column> |
| 121 | 121 | <el-table-column label="信访类" align="center"> |
| 122 | - <el-table-column label="信访单位(人)" align="center" prop="sendPerson" show-overflow-tooltip="true"/> | |
| 122 | + <el-table-column label="信访单位(人)" align="center" prop="sendPerson" :show-overflow-tooltip="true"/> | |
| 123 | 123 | <el-table-column label="信访日期" align="center" prop="sendDate" /> |
| 124 | - <el-table-column label="诉求" align="center" prop="appeal" show-overflow-tooltip="true"/> | |
| 124 | + <el-table-column label="诉求" align="center" prop="appeal" :show-overflow-tooltip="true"/> | |
| 125 | 125 | </el-table-column> |
| 126 | 126 | <el-table-column label="审批状态" align="center" prop="status"> |
| 127 | 127 | <template slot-scope="scope"> |
| ... | ... | @@ -406,8 +406,6 @@ export default { |
| 406 | 406 | this.idInfo = row.id+""; |
| 407 | 407 | this.openInfo = true; |
| 408 | 408 | this.title = "办文办事详情"; |
| 409 | - | |
| 410 | - console.log(row.type); | |
| 411 | 409 | if(row.type==0){ |
| 412 | 410 | this.businessKey = 'yuelanxuexi1'; |
| 413 | 411 | }else if(row.type==1){ |
| ... | ... | @@ -501,6 +499,7 @@ export default { |
| 501 | 499 | * 大小不超过5M |
| 502 | 500 | * */ |
| 503 | 501 | fileChange(file, fileList) { |
| 502 | + console.log(fileList) | |
| 504 | 503 | let count = 0; |
| 505 | 504 | for (let i = 0; i < fileList.length; i++) { |
| 506 | 505 | // console.log(fileList.length) |
| ... | ... | @@ -532,6 +531,7 @@ export default { |
| 532 | 531 | message: '上传文件大小不得超过5M!', |
| 533 | 532 | type: 'warning' |
| 534 | 533 | }); |
| 534 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 535 | 535 | } else { |
| 536 | 536 | //符合条件后进行添加 |
| 537 | 537 | this.fileEntityList = fileList | ... | ... |
trash-ui/src/views/office/handleAffairsCommon/index.vue
| ... | ... | @@ -5,9 +5,9 @@ |
| 5 | 5 | <el-input |
| 6 | 6 | v-model="queryParams.company" |
| 7 | 7 | placeholder="请输入来文单位" |
| 8 | - | |
| 8 | + | |
| 9 | 9 | size="small" |
| 10 | - | |
| 10 | + | |
| 11 | 11 | /> |
| 12 | 12 | </el-form-item> |
| 13 | 13 | <el-form-item label="收文时间" prop="receiveTime"> |
| ... | ... | @@ -445,6 +445,7 @@ export default { |
| 445 | 445 | message: '上传文件大小不得超过5M!', |
| 446 | 446 | type: 'warning' |
| 447 | 447 | }); |
| 448 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 448 | 449 | } else { |
| 449 | 450 | //符合条件后进行添加 |
| 450 | 451 | this.fileEntityList = fileList | ... | ... |
trash-ui/src/views/office/handleAffairsXF/index.vue
| ... | ... | @@ -5,9 +5,9 @@ |
| 5 | 5 | <el-input |
| 6 | 6 | v-model="queryParams.company" |
| 7 | 7 | placeholder="请输入信访单位(人)" |
| 8 | - | |
| 8 | + | |
| 9 | 9 | size="small" |
| 10 | - | |
| 10 | + | |
| 11 | 11 | /> |
| 12 | 12 | </el-form-item> |
| 13 | 13 | <el-form-item label="信访日期" prop="receiveDate"> |
| ... | ... | @@ -439,6 +439,7 @@ export default { |
| 439 | 439 | message: '上传文件大小不得超过5M!', |
| 440 | 440 | type: 'warning' |
| 441 | 441 | }); |
| 442 | + fileList = fileList.splice(fileList.length - 1, 1); | |
| 442 | 443 | } else { |
| 443 | 444 | //符合条件后进行添加 |
| 444 | 445 | this.fileEntityList = fileList | ... | ... |
trash-ui/src/views/office/leaveApplication/index.vue
trash-ui/src/views/office/management/index.vue
trash-workFlow/src/main/java/com/trash/casefile/controller/RemoteServerController.java
| 1 | 1 | package com.trash.casefile.controller; |
| 2 | 2 | |
| 3 | 3 | import com.alibaba.fastjson.JSONArray; |
| 4 | +import com.trash.common.config.trashConfig; | |
| 4 | 5 | import com.trash.common.core.domain.AjaxResult; |
| 5 | 6 | import com.trash.common.core.redis.RedisCache; |
| 6 | 7 | import com.trash.common.utils.RemoteServerUtils; |
| ... | ... | @@ -13,6 +14,8 @@ import java.util.HashMap; |
| 13 | 14 | import java.util.Map; |
| 14 | 15 | import java.util.concurrent.TimeUnit; |
| 15 | 16 | |
| 17 | +import static com.trash.common.utils.Threads.sleep; | |
| 18 | + | |
| 16 | 19 | @RestController |
| 17 | 20 | @RequestMapping("/remoteServer") |
| 18 | 21 | public class RemoteServerController { |
| ... | ... | @@ -20,14 +23,29 @@ public class RemoteServerController { |
| 20 | 23 | @Autowired |
| 21 | 24 | RedisCache redisCache; |
| 22 | 25 | |
| 26 | + @Autowired | |
| 27 | + trashConfig trashConfig; | |
| 28 | + | |
| 23 | 29 | @PostMapping("/getConstructionList") |
| 24 | 30 | public AjaxResult getConstructionList(){ |
| 25 | 31 | JSONArray jsonArray = redisCache.getCacheObject("constructionList"); |
| 32 | + int i = 0; | |
| 26 | 33 | if(jsonArray==null||jsonArray.size()==0){ |
| 27 | 34 | Map<String, Object> map = new HashMap<>(); |
| 28 | 35 | map.put("size",999); |
| 29 | 36 | map.put("page",1); |
| 30 | - jsonArray = RemoteServerUtils.getConstructionList(map); | |
| 37 | + while (true){ | |
| 38 | + i++; | |
| 39 | + jsonArray = RemoteServerUtils.getConstructionList(map,trashConfig.getToken()); | |
| 40 | + if(jsonArray!=null&&jsonArray.size()>0) { | |
| 41 | + break; | |
| 42 | + } | |
| 43 | + if(i==3){ | |
| 44 | + return AjaxResult.error("获取工地列表失败!!!"); | |
| 45 | + } | |
| 46 | + sleep(500); | |
| 47 | + } | |
| 48 | + | |
| 31 | 49 | if(jsonArray!=null&&jsonArray.size()>0){ |
| 32 | 50 | redisCache.setCacheObject("constructionList",jsonArray,1, TimeUnit.HOURS); |
| 33 | 51 | } |
| ... | ... | @@ -39,11 +57,23 @@ public class RemoteServerController { |
| 39 | 57 | @PostMapping("/getEarthSitesList") |
| 40 | 58 | public AjaxResult getEarthSitesList(){ |
| 41 | 59 | JSONArray jsonArray = redisCache.getCacheObject("earthSitesList"); |
| 60 | + int i = 0; | |
| 42 | 61 | if(jsonArray==null||jsonArray.size()==0){ |
| 43 | 62 | Map<String, Object> map = new HashMap<>(); |
| 44 | 63 | map.put("size",999); |
| 45 | 64 | map.put("page",1); |
| 46 | - jsonArray = RemoteServerUtils.getEarthSitesList(map); | |
| 65 | + while (true){ | |
| 66 | + i++; | |
| 67 | + jsonArray = RemoteServerUtils.getEarthSitesList(map,trashConfig.getToken()); | |
| 68 | + if(jsonArray!=null&&jsonArray.size()>0) { | |
| 69 | + break; | |
| 70 | + } | |
| 71 | + if(i==3){ | |
| 72 | + return AjaxResult.error("获取消纳场列表失败!!!"); | |
| 73 | + } | |
| 74 | + sleep(500); | |
| 75 | + } | |
| 76 | + | |
| 47 | 77 | if(jsonArray!=null&&jsonArray.size()>0) { |
| 48 | 78 | redisCache.setCacheObject("earthSitesList",jsonArray,1, TimeUnit.HOURS); |
| 49 | 79 | } |
| ... | ... | @@ -55,8 +85,20 @@ public class RemoteServerController { |
| 55 | 85 | @PostMapping("/getAreaList") |
| 56 | 86 | public AjaxResult getAreaList(){ |
| 57 | 87 | JSONArray jsonArray = redisCache.getCacheObject("areaList"); |
| 88 | + int i = 1; | |
| 58 | 89 | if(jsonArray==null||jsonArray.size()==0){ |
| 59 | - jsonArray = RemoteServerUtils.getAreas(); | |
| 90 | + while (true){ | |
| 91 | + i++; | |
| 92 | + jsonArray = RemoteServerUtils.getAreas(trashConfig.getToken()); | |
| 93 | + if(jsonArray!=null&&jsonArray.size()>0) { | |
| 94 | + break; | |
| 95 | + } | |
| 96 | + if(i==3){ | |
| 97 | + return AjaxResult.error("获取区域列表失败!!!"); | |
| 98 | + } | |
| 99 | + sleep(500); | |
| 100 | + } | |
| 101 | + | |
| 60 | 102 | if(jsonArray!=null&&jsonArray.size()>0) { |
| 61 | 103 | redisCache.setCacheObject("areaList", jsonArray, 1, TimeUnit.HOURS); |
| 62 | 104 | } |
| ... | ... | @@ -67,11 +109,22 @@ public class RemoteServerController { |
| 67 | 109 | @PostMapping("/getCompanyList") |
| 68 | 110 | public AjaxResult getCompanyList(){ |
| 69 | 111 | JSONArray jsonArray = redisCache.getCacheObject("companyList"); |
| 112 | + int i = 1; | |
| 70 | 113 | if(jsonArray==null||jsonArray.size()==0){ |
| 71 | 114 | Map<String, Object> map = new HashMap<>(); |
| 72 | 115 | map.put("size",999); |
| 73 | 116 | map.put("page",1); |
| 74 | - jsonArray = RemoteServerUtils.getCompanyList(map); | |
| 117 | + while (true){ | |
| 118 | + i++; | |
| 119 | + jsonArray = RemoteServerUtils.getCompanyList(map,trashConfig.getToken()); | |
| 120 | + if(jsonArray!=null&&jsonArray.size()>0) { | |
| 121 | + break; | |
| 122 | + } | |
| 123 | + if(i==3){ | |
| 124 | + return AjaxResult.error("获取公司列表失败!!!"); | |
| 125 | + } | |
| 126 | + sleep(500); | |
| 127 | + } | |
| 75 | 128 | if(jsonArray!=null&&jsonArray.size()>0) { |
| 76 | 129 | redisCache.setCacheObject("companyList", jsonArray, 1, TimeUnit.HOURS); |
| 77 | 130 | } | ... | ... |
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
| ... | ... | @@ -34,7 +34,7 @@ public class Consumer { |
| 34 | 34 | private IViolationWarningInformationService violationWarningInformationService; |
| 35 | 35 | |
| 36 | 36 | @KafkaListener(topics = "record_process_alarm") |
| 37 | - public void consume(@Payload String data) { | |
| 37 | + public void consume(@Payload String data) throws InterruptedException { | |
| 38 | 38 | log.info("kafka消费数据成功,data:" + data); |
| 39 | 39 | autoViolationWarning(data); |
| 40 | 40 | } |
| ... | ... | @@ -48,14 +48,26 @@ public class Consumer { |
| 48 | 48 | @Autowired |
| 49 | 49 | RedisCache redisCache; |
| 50 | 50 | |
| 51 | - public void autoViolationWarning(String data) { | |
| 51 | + public void autoViolationWarning(String data) throws InterruptedException { | |
| 52 | 52 | String[] code = {"44030020=工地预警-未报开工作业", "44030021=工地预警-视频设备离线超时报警", "44030022=工地预警-三无车辆进入工地", "44030023=工地预警未按时间作业", |
| 53 | 53 | "44030024=消纳场预警-未报开工作业", "44030025=消纳场预警-视频设备离线超时报警", "44030026=消纳场预警-三无车辆进入消纳场", "44030027=消纳场预警-未到指定的消纳场作业", |
| 54 | 54 | "44030028=离线运输报警(工)", "44030029=离线运输报警(消)", "44030030=未激活车辆作业", "44030031=未核准作业车辆作业", "44030032=未按线路行驶", |
| 55 | 55 | "44030033=闯禁行驶", "44030034=失信车辆作业"}; |
| 56 | 56 | JSONObject jsonObject = JSONObject.parseObject(data); |
| 57 | - String nowDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd"); | |
| 58 | - String tomorrowDate = DateFormatUtils.format(DateUtils.addDays(new Date(), 1), "yyyy-MM-dd"); | |
| 57 | + //q:获取当前时间 | |
| 58 | + String nowHour = DateFormatUtils.format(new Date(), "HH"); | |
| 59 | + String nowDate = null; | |
| 60 | + String tomorrowDate = null; | |
| 61 | + if(Integer.valueOf(nowHour)<8){ | |
| 62 | + nowDate = DateFormatUtils.format(DateUtils.addDays(new Date(), -1), "yyyy-MM-dd"); | |
| 63 | + tomorrowDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd"); | |
| 64 | + }else{ | |
| 65 | + nowDate = DateFormatUtils.format(new Date(), "yyyy-MM-dd"); | |
| 66 | + tomorrowDate = DateFormatUtils.format(DateUtils.addDays(new Date(), 1), "yyyy-MM-dd"); | |
| 67 | + } | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 59 | 71 | String violationType = jsonObject.getString("alarmName"); |
| 60 | 72 | if(RemoteServerUtils.remote==null){ |
| 61 | 73 | //登录 |
| ... | ... | @@ -66,10 +78,22 @@ public class Consumer { |
| 66 | 78 | JSONArray company1 = redisCache.getCacheObject("companyList"); |
| 67 | 79 | JSONObject basevehicleInfo = RemoteServerUtils.getBasevehicleInfo(jsonObject.getString("vehicleId"),trashConfig.getToken()); |
| 68 | 80 | if(company1==null){ |
| 81 | + int i = 0; | |
| 69 | 82 | Map map = new HashMap<>(); |
| 70 | 83 | map.put("size",9999); |
| 71 | 84 | map.put("page",1); |
| 72 | - company1 = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); | |
| 85 | + while (true){ | |
| 86 | + company1 = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); | |
| 87 | + if(company1!=null){ | |
| 88 | + break; | |
| 89 | + } | |
| 90 | + i++; | |
| 91 | + if(i==5){ | |
| 92 | + throw new RuntimeException("获取公司列表失败5次!!!"); | |
| 93 | + } | |
| 94 | + Thread.sleep(500); | |
| 95 | + } | |
| 96 | + | |
| 73 | 97 | redisCache.setCacheObject("companyList",company1,1, TimeUnit.HOURS); |
| 74 | 98 | } |
| 75 | 99 | ... | ... |
trash-workFlow/src/main/java/com/trash/workflow/listener/SupervisionListener.java
0 → 100644
| 1 | +package com.trash.workflow.listener; | |
| 2 | + | |
| 3 | +import com.trash.common.utils.RemoteServerUtils; | |
| 4 | +import com.trash.workflow.service.IWorkflowService; | |
| 5 | +import org.activiti.engine.delegate.DelegateExecution; | |
| 6 | +import org.activiti.engine.delegate.ExecutionListener; | |
| 7 | +import org.activiti.engine.delegate.Expression; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | + | |
| 10 | +import java.util.ArrayList; | |
| 11 | +import java.util.HashMap; | |
| 12 | +import java.util.List; | |
| 13 | +import java.util.Map; | |
| 14 | + | |
| 15 | + | |
| 16 | +public class SupervisionListener implements ExecutionListener { | |
| 17 | + | |
| 18 | + private Expression state; | |
| 19 | + | |
| 20 | + @Autowired | |
| 21 | + IWorkflowService workflowService; | |
| 22 | + | |
| 23 | + | |
| 24 | + @Override | |
| 25 | + public void notify(DelegateExecution delegateExecution) { | |
| 26 | + | |
| 27 | + List<Map> maps = new ArrayList<Map>(); | |
| 28 | + | |
| 29 | + Map map = new HashMap(); | |
| 30 | + | |
| 31 | + map.put("id", delegateExecution.getProcessInstanceBusinessKey().split(":")[1]); | |
| 32 | + map.put("supervisionResult", state.getValue(delegateExecution).toString()); | |
| 33 | + maps.add(map); | |
| 34 | + | |
| 35 | + RemoteServerUtils.UpdateSupervisionStatus(maps); | |
| 36 | + | |
| 37 | + workflowUtils.sendDataToHisTory(delegateExecution, state); | |
| 38 | + | |
| 39 | + | |
| 40 | + System.out.println("纪检督察流程状态更新 更新ID:" + delegateExecution.getProcessInstanceBusinessKey() + "状态:" + state.getValue(delegateExecution).toString()); | |
| 41 | + } | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | +} | ... | ... |