Commit 8fb9f115ccd9c6f00e66e68294b1d0e786232956

Authored by youxiw2000
1 parent 26dfe208

m

Showing 24 changed files with 496 additions and 391 deletions
trash-activiti/src/main/java/com/trash/activiti/domain/dto/ActTaskDTO.java
... ... @@ -70,8 +70,9 @@ public class ActTaskDTO
70 70 public ActTaskDTO() {
71 71 }
72 72  
73   - public ActTaskDTO(ProcessInstance processInstance, Map<String, Object> map,ActWorkflowFormData from) {
  73 + public ActTaskDTO(ProcessInstance processInstance, Map<String, Object> map,ActWorkflowFormData from,org.activiti.engine.task.Task task) {
74 74 this.id = processInstance.getId();
  75 + this.name = task.getName();
75 76 this.instanceName = processInstance.getName();
76 77 this.definitionKey= processInstance.getProcessDefinitionKey();
77 78 this.businessKey= processInstance.getBusinessKey();
... ... @@ -86,6 +87,9 @@ public class ActTaskDTO
86 87 } catch (Exception e) {
87 88 e.printStackTrace();
88 89 }
  90 +
  91 +
  92 + getPrevNext(task);
89 93 }
90 94  
91 95 public ActTaskDTO(HistoricProcessInstance processInstance, Map<String, Object> map) {
... ... @@ -129,6 +133,84 @@ public class ActTaskDTO
129 133  
130 134 }
131 135  
  136 + private void getPrevNext(org.activiti.engine.task.Task et) {
  137 +
  138 +
  139 + long date = new Date().getTime();
  140 + RedisCache cache = SpringUtils.getBean(RedisCache.class);
  141 +
  142 + String exeId = et.getExecutionId();
  143 +
  144 +
  145 + Map<String, Object> params= cache.getCacheMap(exeId);
  146 +
  147 + if(params == null || params.size() == 0){
  148 + params= SpringUtils.getBean(RuntimeService.class).getVariables(exeId);
  149 + cache.setCacheMap(exeId, params);
  150 + }
  151 +
  152 + String route = null;
  153 + String index = null;
  154 +
  155 + String key = this.businessKey.split(":")[0];
  156 +
  157 +
  158 + if(params.get("route")!=null){
  159 + route = params.get("route").toString();
  160 + key += "route"+route;
  161 + }
  162 + if(params.get("index") != null){
  163 + index = params.get("index").toString();
  164 + key += "index"+index;
  165 + }
  166 +
  167 + List<String> list = cache.getCacheList(key);
  168 + if(list.size() > 0){
  169 +
  170 + if(list.indexOf(et.getName())>0){
  171 + this.prev = list.get(list.indexOf(et.getName())-1);
  172 + }
  173 + if(list.size() > (list.indexOf(et.getName())+1)){
  174 + this.next = list.get(list.indexOf(et.getName())+1);
  175 + }
  176 + return;
  177 + }
  178 +
  179 +
  180 + BpmnModel model = SpringUtils.getBean(RepositoryService.class).getBpmnModel(et.getProcessDefinitionId());
  181 + List<org.activiti.bpmn.model.Process> processes = model.getProcesses();
  182 +
  183 + List<String> modelList = null;
  184 +
  185 + for(org.activiti.bpmn.model.Process p:processes){
  186 + Collection<FlowElement> flows = p.getFlowElements();
  187 +
  188 + for(FlowElement f:flows){
  189 + if(f instanceof StartEvent){
  190 +
  191 +
  192 + modelList = getRouteList((StartEvent)f,route,index);
  193 +
  194 +
  195 + break;
  196 +
  197 + }
  198 +
  199 + }
  200 + }
  201 +
  202 +
  203 + cache.setCacheList(key, modelList);
  204 +
  205 + if(modelList.indexOf(et.getName())>0){
  206 + this.prev = modelList.get(modelList.indexOf(et.getName())-1);
  207 + }
  208 + if(modelList.size() > (modelList.indexOf(et.getName())+1)){
  209 + this.next = modelList.get(modelList.indexOf(et.getName())+1);
  210 + }
  211 +
  212 + }
  213 +
132 214  
133 215 private void getPrevNext(Task task) {
134 216  
... ...
trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
... ... @@ -298,6 +298,7 @@ public class ActTaskServiceImpl implements IActTaskService {
298 298 ProcessInstanceQuery query = runtimeService.createProcessInstanceQuery().involvedUser(username);
299 299  
300 300  
  301 +
301 302 if(name != null)
302 303 query.processInstanceNameLike("%"+name+"%");
303 304  
... ... @@ -311,11 +312,18 @@ public class ActTaskServiceImpl implements IActTaskService {
311 312  
312 313 List<ProcessInstance> processInstanceList = query.list();
313 314  
  315 +
  316 +
314 317 list.setTotal(query.count());
315 318  
316 319 processInstanceList = query.listPage((pageNum-1) * pageSize,pageSize);
317 320  
318 321 if (processInstanceList.size() > 0) {
  322 +
  323 + List<String> pids = processInstanceList.parallelStream().map(p->p.getId()).collect(Collectors.toList());
  324 +
  325 + List<org.activiti.engine.task.Task> tasks = taskService.createTaskQuery().processInstanceIdIn(pids).list();
  326 +
319 327  
320 328 Set<String> idString = new HashSet<String>();
321 329 for (ProcessInstance pi : processInstanceList) {
... ... @@ -329,12 +337,13 @@ public class ActTaskServiceImpl implements IActTaskService {
329 337 for (ProcessInstance p : processInstanceList) {
330 338 try {
331 339 ActTaskDTO dto = new ActTaskDTO(p, maps.parallelStream().filter(pi -> p.getProcessInstanceId().equals(pi.get("instance_id"))).findAny().get(),
332   - dataList.parallelStream().filter(pi -> p.getBusinessKey().equals(pi.getBusinessKey())).findAny().get());
  340 + dataList.parallelStream().filter(pi -> p.getBusinessKey().equals(pi.getBusinessKey())).findAny().get(),
  341 + tasks.parallelStream().filter(t -> p.getId().equals(t.getProcessInstanceId())).findAny().get());
333 342  
334 343  
335 344 list.add(dto);
336 345 } catch (Exception e) {
337   - // TODO: handle exception
  346 + e.printStackTrace();
338 347 }
339 348 }
340 349  
... ...
trash-ui/src/api/caseOfflineInfo.js
... ... @@ -5,6 +5,7 @@ import {getArea,} from &quot;@/api/dict&quot;;
5 5 import {getToken} from "@/utils/auth";
6 6 import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
7 7  
  8 +import {historyFromData} from '@/api/activiti/historyFormdata'
8 9 export default {
9 10 name: "CaseOffline",
10 11 props: {
... ... @@ -148,7 +149,7 @@ export default {
148 149  
149 150 if (id.length == 2) {
150 151 id = id[1];
151   - }
  152 + }
152 153 getCaseOffline(id).then(response => {
153 154 this.form = response.data;
154 155 if (this.form.attach && this.form.attach != "")
... ... @@ -191,7 +192,18 @@ export default {
191 192  
192 193 }
193 194 });
194   -
  195 + if(response.data.status == 0){
  196 + historyFromData(this.workflow + ":" + id).then(response => {
  197 +
  198 + let obj = response.data[response.data.length-1];
  199 + let data = {
  200 + reply:obj.controlValue,
  201 + replyPeople:obj.createBy,
  202 + };
  203 +
  204 + this.replyApprovalProcessList.push(data);
  205 + });
  206 + }
195 207  
196 208 this.open2 = true;
197 209 });
... ...
trash-ui/src/api/caseoffline.js
... ... @@ -173,8 +173,16 @@ export default {
173 173 },
174 174 /** 查询线下交办案卷列表 */
175 175 getList() {
176   - this.loading = true;
177   - listCaseOffline(this.queryParams).then(response => {
  176 + this.loading = true;
  177 + let query = {};
  178 +
  179 + for(var i in this.queryParams){
  180 + query[i] = this.queryParams[i];
  181 + }
  182 +
  183 + query.createTime = null;
  184 +
  185 + listCaseOffline(this.query).then(response => {
178 186 this.caseOfflineList = response.rows;
179 187  
180 188 for(let i in this.caseOfflineList){
... ...
trash-ui/src/api/vio_casefile.js
... ... @@ -229,8 +229,21 @@ export default {
229 229 },
230 230 /** 查询平台违规案卷列表 */
231 231 getList() {
232   - this.loading = true;
233   - listViolationCaseFile(this.queryParams).then(response => {
  232 + this.loading = true;
  233 + if(this.queryParams.createTime){
  234 + this.queryParams.startTime = this.queryParams.createTime[0];
  235 + this.queryParams.endTime = this.queryParams.createTime[1];
  236 + }
  237 +
  238 + let query = {};
  239 +
  240 + for(var i in this.queryParams){
  241 + query[i] = this.queryParams[i];
  242 + }
  243 +
  244 + query.createTime = null;
  245 +
  246 + listViolationCaseFile(query).then(response => {
234 247 this.violationCaseFileList = response.rows;
235 248 this.total = response.total;
236 249 this.loading = false;
... ...
trash-ui/src/api/vio_casefile_info.js 0 → 100644
  1 +import {getViolationCaseFile} from "@/api/casefile/violationCaseFile";
  2 +import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
  3 +
  4 +import {historyFromData} from '@/api/activiti/historyFormdata'
  5 +export default {
  6 + name: "violationWarningInformationInfo",
  7 + props: {
  8 + businessKey: {
  9 + type: String
  10 + },
  11 + idInfo: {
  12 + type: String
  13 + },
  14 + entryType: {
  15 + type: Number
  16 + },
  17 + },
  18 + data() {
  19 + return {
  20 + form: {},
  21 + fileEntityList: [],
  22 + open: false,
  23 + replyApprovalProcessList: [],
  24 + openImg: false,
  25 + img: [],
  26 + showPic: null,
  27 + picImage: null,
  28 + slide1: [],
  29 + videoSrc: [],
  30 + }
  31 + },
  32 + created() {
  33 + let id = this.idInfo.split(":");
  34 +
  35 + if (id.length == 2) {
  36 + this.idInfo = id[1];
  37 + } else {
  38 + this.idInfo = id;
  39 + }
  40 +
  41 +
  42 + this.init();
  43 + },
  44 + methods: {
  45 + init() {
  46 + getViolationCaseFile(this.idInfo).then(response => {
  47 + this.form = response.data.violationCaseFile;
  48 + let files = JSON.stringify(response.data.uploadFiles);
  49 + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
  50 + this.fileEntityList.map(item => {
  51 + if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
  52 + this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
  53 + }
  54 + if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
  55 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  56 + }
  57 + })
  58 +
  59 + });
  60 + listReplyApprovalProcess({tableName: "workflow_casefile" + ":" + this.idInfo}).then(response => {
  61 + this.replyApprovalProcessList = response.rows;
  62 + if(this.form.status == 0){
  63 + historyFromData("workflow_casefile" + ":" + this.idInfo).then(response => {
  64 +
  65 + let obj = response.data[response.data.length-1];
  66 + let data = {
  67 + reply:obj.controlValue,
  68 + replyPeople:obj.createBy,
  69 + };
  70 +
  71 + this.replyApprovalProcessList.push(data);
  72 + });
  73 + }
  74 + });
  75 +
  76 +
  77 + },
  78 + /** 文件下载 */
  79 + downloadFA(row) {
  80 + let name = row.name;
  81 + let url = row.url;
  82 + const a = document.createElement('a')
  83 + a.setAttribute('download', name)
  84 + a.setAttribute('target', '_blank')
  85 + a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  86 + a.click()
  87 + },
  88 + openImage(path) {
  89 + this.img = [];
  90 + this.openImg = true;
  91 + let files = path.split(",");
  92 + for(let i=0;i<files.length;i++){
  93 + this.img.push(files[i]);
  94 + }
  95 + },
  96 + downloadFile(path) {
  97 + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
  98 + },
  99 + showFile(path) {
  100 + return process.env.VUE_APP_BASE_API + path;
  101 + },
  102 + }
  103 +}
0 104 \ No newline at end of file
... ...
trash-ui/src/api/vio_warning_info.js 0 → 100644
  1 +import {getViolationWarningInformation} from "@/api/casefile/violationWarningInformation";
  2 +import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
  3 +
  4 +import {historyFromData} from '@/api/activiti/historyFormdata'
  5 +
  6 +export default {
  7 + name: "violationWarningInformationInfo",
  8 + props: {
  9 + businessKey: {
  10 + type: String
  11 + },
  12 + idInfo: {
  13 + type: String
  14 + },
  15 + entryType: {
  16 + type: Number
  17 + },
  18 + },
  19 + data() {
  20 + return {
  21 + form: {},
  22 + fileEntityList: [],
  23 + open: false,
  24 + replyApprovalProcessList: [],
  25 + openImg: false,
  26 + img: [],
  27 + showPic: null,
  28 + picImage: null,
  29 + slide1: [],
  30 + videoSrc: [],
  31 + }
  32 + },
  33 + created() {
  34 + let id = this.idInfo.split(":");
  35 +
  36 + if (id.length == 2) {
  37 + this.idInfo = id[1];
  38 + } else {
  39 + this.idInfo = id;
  40 + }
  41 + this.init();
  42 + },
  43 + methods: {
  44 + init() {
  45 + getViolationWarningInformation(this.idInfo).then(response => {
  46 + this.form = response.data.violationWarningInformation;
  47 + let files = JSON.stringify(response.data.uploadFiles);
  48 + this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
  49 + this.fileEntityList.map(item => {
  50 + if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
  51 + this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
  52 + }
  53 + if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
  54 + this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
  55 + }
  56 + })
  57 +
  58 +
  59 + });
  60 +
  61 + listReplyApprovalProcess({tableName: "violation_warning" + ":" + this.idInfo}).then(response => {
  62 + this.replyApprovalProcessList = response.rows;
  63 + if(this.form.status == 0){
  64 + historyFromData("violation_warning" + ":" + this.idInfo).then(response => {
  65 +
  66 + let obj = response.data[response.data.length-1];
  67 + let data = {
  68 + reply:obj.controlValue,
  69 + replyPeople:obj.createBy,
  70 + };
  71 +
  72 + this.replyApprovalProcessList.push(data);
  73 + });
  74 + }
  75 + });
  76 +
  77 + },
  78 + /** 文件下载 */
  79 + downloadFA(row) {
  80 + let name = row.name;
  81 + let url = row.url;
  82 + const a = document.createElement('a')
  83 + a.setAttribute('download', name)
  84 + a.setAttribute('target', '_blank')
  85 + a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
  86 + a.click()
  87 + },
  88 + openImage(path) {
  89 + this.img = [];
  90 + this.openImg = true;
  91 + let files = path.split(",");
  92 + for(let i=0;i<files.length;i++){
  93 + this.img.push(files[i]);
  94 + }
  95 + },
  96 + downloadFile(path) {
  97 + window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
  98 + },
  99 + showFile(path) {
  100 + return process.env.VUE_APP_BASE_API + path;
  101 + },
  102 + }
  103 +}
0 104 \ No newline at end of file
... ...
trash-ui/src/views/activiti/task/taskCard.vue
... ... @@ -12,14 +12,14 @@
12 12 </el-col>
13 13 </el-row>
14 14  
15   - <el-row class="card_row" v-if="!task.checkStatus">
16   - <el-col :span="8" >
  15 + <el-row class="card_row" >
  16 + <el-col :span="8" v-if="task.prev">
17 17 <div >上一节点: {{task.prev}}</div>
18 18 </el-col>
19 19 <el-col :span="8" v-if="task.name">
20 20 <div >当前节点: {{task.name}}</div>
21 21 </el-col>
22   - <el-col :span="8" >
  22 + <el-col :span="8" v-if="task.next">
23 23 <div >下一节点: {{task.next}}</div>
24 24 </el-col>
25 25 </el-row>
... ...
trash-ui/src/views/caseOffline/caseOffline/index.vue
... ... @@ -12,11 +12,10 @@
12 12 </el-select>
13 13 </el-form-item>
14 14 <el-form-item label="时间" prop="createTime">
15   - <el-date-picker size="small" style="width: 200px"
16   - v-model="queryParams.createTime"
17   - type="date"
18   - value-format="yyyy-MM-dd"
19   - placeholder="选择时间">
  15 + <el-date-picker size="small" v-model="queryParams.createTime" type="datetimerange"
  16 + start-placeholder="开始日期"
  17 + value-format="yyyy-MM-dd HH:mm:ss"
  18 + end-placeholder="结束日期">
20 19 </el-date-picker>
21 20 </el-form-item>
22 21 <el-form-item>
... ... @@ -97,9 +96,9 @@
97 96 </el-select>
98 97 </el-form-item>
99 98 <el-form-item :label="form.siteType==0?'工地名称':'处理场所名称'" prop="siteName">
100   - <el-select
  99 + <el-select
101 100 :popper-append-to-body="false" class="product-style"
102   - v-model="form.siteName" placeholder="请选择类型"
  101 + v-model="form.siteName" placeholder="请选择类型"
103 102 allow-create filterable @change="getSite">
104 103 <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" :title="item.name"/>
105 104 </el-select>
... ...
trash-ui/src/views/casefile/violationCaseFile/index.vue
1 1 <template>
2 2 <div class="app-container">
3 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="105px">
4   -
  4 + <el-row>
5 5 <el-form-item label="所属区域" prop="owningRegion">
6 6 <el-select v-model="queryParams.owningRegion" placeholder="请选择所属区域" size="small">
7 7 <el-option v-for="item in areas" :label="item.name" :value="item.name" />
... ... @@ -22,28 +22,29 @@
22 22 <el-option label="企业" value="2" />
23 23 </el-select>
24 24 </el-form-item>
25   -
26   -
27   -
  25 +</el-row>
  26 + <el-row>
28 27 <el-form-item label="违规对象" prop="projectName">
29 28 <el-input
30 29 v-model="queryParams.projectName"
31 30 placeholder="请输入违规对象"
32   -
33 31 size="small"
34   -
35 32 />
36 33 </el-form-item>
37 34  
38 35 <el-form-item label="日期" prop="createTime">
39   - <el-date-picker size="small" style="width: 200px" v-model="queryParams.createTime" type="date"
40   - value-format="yyyy-MM-dd" placeholder="开始时间">
  36 + <el-date-picker size="small" v-model="queryParams.createTime" type="datetimerange"
  37 + start-placeholder="开始日期"
  38 + value-format="yyyy-MM-dd HH:mm:ss"
  39 + end-placeholder="结束日期">
41 40 </el-date-picker>
42 41 </el-form-item>
43 42 <el-form-item>
44 43 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
45 44 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
46   - </el-form-item>
  45 + </el-form-item>
  46 +
  47 + </el-row>
47 48 </el-form>
48 49  
49 50 <el-row :gutter="10" class="mb8">
... ...
trash-ui/src/views/casefile/violationCaseFile/violationCaseFileInfo.vue
... ... @@ -168,96 +168,7 @@
168 168 </el-form>
169 169 </template>
170 170  
171   -<script>
172   -import {getViolationCaseFile} from "@/api/casefile/violationCaseFile";
173   -import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
174   -
175   -export default {
176   - name: "violationWarningInformationInfo",
177   - props: {
178   - businessKey: {
179   - type: String
180   - },
181   - idInfo: {
182   - type: String
183   - },
184   - entryType: {
185   - type: Number
186   - },
187   - },
188   - data() {
189   - return {
190   - form: {},
191   - fileEntityList: [],
192   - open: false,
193   - replyApprovalProcessList: [],
194   - openImg: false,
195   - img: [],
196   - showPic: null,
197   - picImage: null,
198   - slide1: [],
199   - videoSrc: [],
200   - }
201   - },
202   - created() {
203   - let id = this.idInfo.split(":");
204   -
205   - if (id.length == 2) {
206   - this.idInfo = id[1];
207   - } else {
208   - this.idInfo = id;
209   - }
210   -
211   -
212   - this.init();
213   - },
214   - methods: {
215   - init() {
216   - getViolationCaseFile(this.idInfo).then(response => {
217   - this.form = response.data.violationCaseFile;
218   - let files = JSON.stringify(response.data.uploadFiles);
219   - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
220   - this.fileEntityList.map(item => {
221   - if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
222   - this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
223   - }
224   - if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
225   - this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
226   - }
227   - })
228   - });
229   -
230   -
231   - listReplyApprovalProcess({tableName: "workflow_casefile" + ":" + this.idInfo}).then(response => {
232   - this.replyApprovalProcessList = response.rows;
233   - });
234   - },
235   - /** 文件下载 */
236   - downloadFA(row) {
237   - let name = row.name;
238   - let url = row.url;
239   - const a = document.createElement('a')
240   - a.setAttribute('download', name)
241   - a.setAttribute('target', '_blank')
242   - a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
243   - a.click()
244   - },
245   - openImage(path) {
246   - this.img = [];
247   - this.openImg = true;
248   - let files = path.split(",");
249   - for(let i=0;i<files.length;i++){
250   - this.img.push(files[i]);
251   - }
252   - },
253   - downloadFile(path) {
254   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
255   - },
256   - showFile(path) {
257   - return process.env.VUE_APP_BASE_API + path;
258   - },
259   - }
260   -}
  171 +<script src="@/api/vio_casefile_info">
261 172 </script>
262 173  
263 174 <style scoped>
... ...
trash-ui/src/views/casefile/violationWarningInformation/index.vue
... ... @@ -28,8 +28,10 @@
28 28 />
29 29 </el-form-item>
30 30 <el-form-item label="日期" prop="createTime">
31   - <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.createTime" type="date"
32   - value-format="yyyy-MM-dd" placeholder="开始时间">
  31 + <el-date-picker size="small" v-model="queryParams.createTime" type="datetimerange"
  32 + start-placeholder="开始日期"
  33 + value-format="yyyy-MM-dd HH:mm:ss"
  34 + end-placeholder="结束日期">
33 35 </el-date-picker>
34 36 </el-form-item>
35 37 <el-form-item>
... ...
trash-ui/src/views/casefile/violationWarningInformation/violationWarningInformationInfo.vue
... ... @@ -167,93 +167,9 @@
167 167 </el-form>
168 168 </template>
169 169  
170   -<script>
171   -import {getViolationWarningInformation} from "@/api/casefile/violationWarningInformation";
172   -import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
  170 +<script src="@/api/vio_warning_info">
  171 +</script>
173 172  
174   -export default {
175   - name: "violationWarningInformationInfo",
176   - props: {
177   - businessKey: {
178   - type: String
179   - },
180   - idInfo: {
181   - type: String
182   - },
183   - entryType: {
184   - type: Number
185   - },
186   - },
187   - data() {
188   - return {
189   - form: {},
190   - fileEntityList: [],
191   - open: false,
192   - replyApprovalProcessList: [],
193   - openImg: false,
194   - img: [],
195   - showPic: null,
196   - picImage: null,
197   - slide1: [],
198   - videoSrc: [],
199   - }
200   - },
201   - created() {
202   - let id = this.idInfo.split(":");
203   -
204   - if (id.length == 2) {
205   - this.idInfo = id[1];
206   - } else {
207   - this.idInfo = id;
208   - }
209   - this.init();
210   - },
211   - methods: {
212   - init() {
213   - getViolationWarningInformation(this.idInfo).then(response => {
214   - this.form = response.data.violationWarningInformation;
215   - let files = JSON.stringify(response.data.uploadFiles);
216   - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
217   - this.fileEntityList.map(item => {
218   - if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
219   - this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
220   - }
221   - if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
222   - this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
223   - }
224   - })
225   - });
226   - listReplyApprovalProcess({tableName: "violation_warning" + ":" + this.idInfo}).then(response => {
227   - this.replyApprovalProcessList = response.rows;
228   - });
229   - },
230   - /** 文件下载 */
231   - downloadFA(row) {
232   - let name = row.name;
233   - let url = row.url;
234   - const a = document.createElement('a')
235   - a.setAttribute('download', name)
236   - a.setAttribute('target', '_blank')
237   - a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
238   - a.click()
239   - },
240   - openImage(path) {
241   - this.img = [];
242   - this.openImg = true;
243   - let files = path.split(",");
244   - for(let i=0;i<files.length;i++){
245   - this.img.push(files[i]);
246   - }
247   - },
248   - downloadFile(path) {
249   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
250   - },
251   - showFile(path) {
252   - return process.env.VUE_APP_BASE_API + path;
253   - },
254   - }
255   -}
256   -</script>
257 173  
258 174 <style scoped>
259 175  
... ...
trash-ui/src/views/h5/task/taskCard.vue
... ... @@ -6,14 +6,14 @@
6 6 <el-row class="card_row">
7 7 <div class="card_title">{{task.instanceName}}</div>
8 8 </el-row>
9   - <el-row class="card_row" v-if="!task.checkStatus">
10   - <el-col :span="24" class="card_grid">
  9 + <el-row class="card_row" >
  10 + <el-col :span="24" class="card_grid" v-if="task.prev">
11 11 <div >上一节点: {{task.prev}}</div>
12 12 </el-col>
13 13 <el-col :span="24" class="card_grid" v-if="task.name">
14 14 <div >当前节点: {{task.name}}</div>
15 15 </el-col>
16   - <el-col :span="24" class="card_grid">
  16 + <el-col :span="24" class="card_grid" v-if="task.next">
17 17 <div >下一节点: {{task.next}}</div>
18 18 </el-col>
19 19 </el-row>
... ...
trash-ui/src/views/h5/task/violationCaseFileInfo.vue
... ... @@ -144,97 +144,7 @@
144 144 </el-form>
145 145 </template>
146 146  
147   -<script>
148   -import {getViolationCaseFile} from "@/api/casefile/violationCaseFile";
149   -import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
150   -
151   -export default {
152   - name: "violationWarningInformationInfo",
153   - props: {
154   - businessKey: {
155   - type: String
156   - },
157   - idInfo: {
158   - type: String
159   - },
160   - entryType: {
161   - type: Number
162   - },
163   - },
164   - data() {
165   - return {
166   - form: {},
167   - fileEntityList: [],
168   - open: false,
169   - replyApprovalProcessList: [],
170   - openImg: false,
171   - img: [],
172   - showPic: null,
173   - picImage: null,
174   - slide1: [],
175   - videoSrc: [],
176   - }
177   - },
178   - created() {
179   - let id = this.idInfo.split(":");
180   -
181   - if (id.length == 2) {
182   - this.idInfo = id[1];
183   - } else {
184   - this.idInfo = id;
185   - }
186   -
187   -
188   - this.init();
189   - },
190   - methods: {
191   - init() {
192   - getViolationCaseFile(this.idInfo).then(response => {
193   - this.form = response.data.violationCaseFile;
194   - let files = JSON.stringify(response.data.uploadFiles);
195   - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
196   - this.fileEntityList.map(item => {
197   - if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
198   - this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
199   - }
200   - if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
201   - this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
202   - }
203   - })
204   - });
205   -
206   -
207   - listReplyApprovalProcess({tableName: "workflow_casefile" + ":" + this.idInfo}).then(response => {
208   - this.replyApprovalProcessList = response.rows;
209   - });
210   - },
211   - /** 文件下载 */
212   - downloadFA(row) {
213   - let name = row.name;
214   - let url = row.url;
215   - const a = document.createElement('a')
216   - a.setAttribute('download', name)
217   - a.setAttribute('target', '_blank')
218   - a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
219   - a.click()
220   - },
221   - openImage(path) {
222   - debugger;
223   - this.img = [];
224   - this.openImg = true;
225   - let files = path.split(",");
226   - for(let i=0;i<files.length;i++){
227   - this.img.push(files[i]);
228   - }
229   - },
230   - downloadFile(path) {
231   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
232   - },
233   - showFile(path) {
234   - return process.env.VUE_APP_BASE_API + path;
235   - },
236   - }
237   -}
  147 +<script src="@/api/vio_casefile_info">
238 148 </script>
239 149  
240 150 <style scoped>
... ...
trash-ui/src/views/h5/task/violationWarningInformationInfo.vue
... ... @@ -122,7 +122,7 @@
122 122 </el-dialog>
123 123 <el-dialog title="预览" :visible.sync="openImg" append-to-body width="300px">
124 124 <div v-for="item in img" style="border: 1px black solid;text-align: center;">
125   -
  125 +
126 126 <el-image style="width: 250px; height: 250px; margin: 5px;"
127 127 v-if="item.indexOf('.jpg')>-1||item.indexOf('.png')>-1||item.indexOf('.jpeg')>-1||item.indexOf('.gif')>-1"
128 128 :src="showFile(item)"
... ... @@ -138,93 +138,9 @@
138 138 </el-form>
139 139 </template>
140 140  
141   -<script>
142   -import {getViolationWarningInformation} from "@/api/casefile/violationWarningInformation";
143   -import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
144   -
145   -export default {
146   - name: "violationWarningInformationInfo",
147   - props: {
148   - businessKey: {
149   - type: String
150   - },
151   - idInfo: {
152   - type: String
153   - },
154   - entryType: {
155   - type: Number
156   - },
157   - },
158   - data() {
159   - return {
160   - form: {},
161   - fileEntityList: [],
162   - open: false,
163   - replyApprovalProcessList: [],
164   - openImg: false,
165   - img: [],
166   - showPic: null,
167   - picImage: null,
168   - slide1: [],
169   - videoSrc: [],
170   - }
171   - },
172   - created() {
173   - let id = this.idInfo.split(":");
174   -
175   - if (id.length == 2) {
176   - this.idInfo = id[1];
177   - } else {
178   - this.idInfo = id;
179   - }
180   - this.init();
181   - },
182   - methods: {
183   - init() {
184   - getViolationWarningInformation(this.idInfo).then(response => {
185   - this.form = response.data.violationWarningInformation;
186   - let files = JSON.stringify(response.data.uploadFiles);
187   - this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
188   - this.fileEntityList.map(item => {
189   - if (item.url.indexOf(".jpg") > -1 || item.url.indexOf(".png") > -1 || item.url.indexOf(".jpeg") > -1 || item.url.indexOf(".jpg") > -1) {
190   - this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
191   - }
192   - if (item.url.indexOf(".mp4") > -1 || item.url.indexOf(".avi") > -1) {
193   - this.videoSrc.push(process.env.VUE_APP_BASE_API + item.url);
194   - }
195   - })
196   - });
197   - listReplyApprovalProcess({tableName: "violation_warning" + ":" + this.idInfo}).then(response => {
198   - this.replyApprovalProcessList = response.rows;
199   - });
200   - },
201   - /** 文件下载 */
202   - downloadFA(row) {
203   - let name = row.name;
204   - let url = row.url;
205   - const a = document.createElement('a')
206   - a.setAttribute('download', name)
207   - a.setAttribute('target', '_blank')
208   - a.setAttribute('href', process.env.VUE_APP_BASE_API + url);
209   - a.click()
210   - },
211   - openImage(path) {
212   - this.img = [];
213   - this.openImg = true;
214   - let files = path.split(",");
215   - for(let i=0;i<files.length;i++){
216   - this.img.push(files[i]);
217   - }
218   - },
219   - downloadFile(path) {
220   - window.location.href = process.env.VUE_APP_BASE_API + "/business/threestep/download?path=" + encodeURI(path);
221   - },
222   - showFile(path) {
223   - return process.env.VUE_APP_BASE_API + path;
224   - },
225   - }
226   -}
227   -</script>
  141 +<script src="@/api/vio_warning_info">
  142 +</script>
  143 +
228 144 <style scoped>
229 145  
230 146 </style>
... ...
trash-workFlow/src/main/java/com/trash/caseOffline/domain/CaseOffline.java
... ... @@ -33,14 +33,18 @@ public class CaseOffline extends BaseEntity
33 33 + "7=无许可消纳(工),8=无许可消纳(消),9=使用非专用车辆")
34 34 private String type;
35 35  
  36 +
36 37  
37 38 /** 名称 */
  39 + @Excel(name = "场站名称")
38 40 private String siteName;
39 41  
40 42 /** 位置描述 */
  43 + @Excel(name = "位置描述")
41 44 private String locationDec;
42 45  
43 46 /** 问题描述 */
  47 + @Excel(name = "问题描述")
44 48 private String caseDec;
45 49  
46 50 /** 审批状态 */
... ... @@ -51,6 +55,7 @@ public class CaseOffline extends BaseEntity
51 55 private String place;
52 56  
53 57 /** 类型 */
  58 + @Excel(name = "场站类型编号" ,readConverterExp = "0=工地,1=处理场所")
54 59 private Long siteType;
55 60  
56 61 /** 基础数据ID */
... ... @@ -85,6 +90,27 @@ public class CaseOffline extends BaseEntity
85 90 @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
86 91 private Date createTime;
87 92  
  93 + private String startTime;
  94 +
  95 + private String endTime;
  96 +
  97 + public String getStartTime() {
  98 + return startTime;
  99 + }
  100 +
  101 + public void setStartTime(String startTime) {
  102 + this.startTime = startTime;
  103 + }
  104 +
  105 + @Override
  106 + public String getEndTime() {
  107 + return endTime;
  108 + }
  109 +
  110 + @Override
  111 + public void setEndTime(String endTime) {
  112 + this.endTime = endTime;
  113 + }
88 114  
89 115  
90 116 public Date getCreateTime() {
... ...
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
... ... @@ -78,6 +78,31 @@ public class ViolationCaseFile extends BaseEntity
78 78  
79 79 private String abbreviation;
80 80  
  81 + private String startTime;
  82 +
  83 +
  84 + private String endTime;
  85 +
  86 +
  87 +
  88 + public String getStartTime() {
  89 + return startTime;
  90 + }
  91 +
  92 + public void setStartTime(String startTime) {
  93 + this.startTime = startTime;
  94 + }
  95 +
  96 + @Override
  97 + public String getEndTime() {
  98 + return endTime;
  99 + }
  100 +
  101 + @Override
  102 + public void setEndTime(String endTime) {
  103 + this.endTime = endTime;
  104 + }
  105 +
81 106 @Override
82 107 public Date getCreateTime() {
83 108 return createTime;
... ...
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationWarningInformation.java
... ... @@ -55,6 +55,7 @@ public class ViolationWarningInformation extends BaseEntity {
55 55 /**
56 56 * 违规等级
57 57 */
  58 + @Excel(name = "违规等级")
58 59 private String violationGrade;
59 60  
60 61  
... ... @@ -62,6 +63,7 @@ public class ViolationWarningInformation extends BaseEntity {
62 63 /**
63 64 * 企业名称
64 65 */
  66 + @Excel(name = "企业名称")
65 67 private String companyName;
66 68  
67 69 @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
... ... @@ -71,6 +73,7 @@ public class ViolationWarningInformation extends BaseEntity {
71 73 /**
72 74 * 违规描述
73 75 */
  76 + @Excel(name = "违规描述")
74 77 private String describe;
75 78  
76 79 /**
... ... @@ -87,6 +90,7 @@ public class ViolationWarningInformation extends BaseEntity {
87 90 /**
88 91 * 接收人
89 92 */
  93 + @Excel(name = "接收人")
90 94 private String receive;
91 95  
92 96 /**
... ... @@ -98,16 +102,46 @@ public class ViolationWarningInformation extends BaseEntity {
98 102 * 阅览人
99 103 */
100 104 private String readBy;
101   -
  105 +
  106 +
  107 + @Excel(name = "发送人")
  108 + private String createBy;
102 109 /**
103 110 * 阅览时间
104 111 */
105 112 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  113 + @Excel(name = "阅读时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
106 114 private Date readTime;
107 115  
108 116 private String abbreviation;
109 117  
  118 + private String startTime;
  119 +
  120 +
  121 + private String endTime;
  122 +
  123 +
  124 +
  125 + public String getStartTime() {
  126 + return startTime;
  127 + }
  128 +
  129 + public void setStartTime(String startTime) {
  130 + this.startTime = startTime;
  131 + }
  132 +
  133 + @Override
  134 + public String getEndTime() {
  135 + return endTime;
  136 + }
  137 +
110 138 @Override
  139 + public void setEndTime(String endTime) {
  140 + this.endTime = endTime;
  141 + }
  142 +
  143 +
  144 + @Override
111 145 public Date getCreateTime() {
112 146 return createTime;
113 147 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
... ... @@ -330,8 +330,25 @@ public class Consumer {
330 330 violationWarningInformationService.insertViolationWarningInformation(null, violationWarningInformation);
331 331 break;
332 332 case "44030033"://闯禁行驶
  333 + violationWarningInformation.setViolationObjectType("0");
  334 + violationWarningInformation.setSendObject("区管理部门");
  335 + describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
  336 + + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "出现" + violationWarningInformation.getViolationType();
  337 + //设置公司简称
  338 + for(Object o:company1){
  339 + JSONObject jo = (JSONObject) o;
  340 + if(basevehicleInfo.getString("companyID").equals(jo.getString("id"))){
  341 + violationWarningInformation.setAbbreviation(jo.getString("abbreviation"));
  342 + }
  343 + }
  344 + violationWarningInformation.setCreateTime(alarmTime);
  345 + violationWarningInformation.setDescribe(describe);
  346 + // 业务逻辑
  347 + violationWarningInformationService.insertViolationWarningInformation(null, violationWarningInformation);
  348 + break;
  349 +
333 350 case "44030034"://失信车辆作业
334   - violationWarningInformation.setViolationObjectType("2");
  351 + violationWarningInformation.setViolationObjectType("2");
335 352 violationWarningInformation.setSendObject("运输企业");
336 353 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
337 354 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "出现" + violationWarningInformation.getViolationType();
... ...
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
... ... @@ -94,9 +94,25 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
94 94 * @param violationWarningInformation 违规预警信息
95 95 * @return 结果
96 96 */
  97 +
  98 + String innerArea = "湘江新区,芙蓉区,天心区,开福区,雨花区";
  99 + String warnString = "处理场所预警-未报开工作业、处理场所预警-视频设备离线超时报警、处理场所预警-三无车辆进入处理场所、处理场所预警-未到指定的处理场所作业";
  100 +
97 101 @Override
98 102 @Transactional
99 103 public int insertViolationWarningInformation(MultipartFile[] files,ViolationWarningInformation violationWarningInformation) throws IOException {
  104 +
  105 +
  106 + if(!innerArea.contains(violationWarningInformation.getOwningRegion()) && warnString.contains(violationWarningInformation.getViolationType())
  107 + && violationWarningInformation.getViolationObjectType() == "1") {
  108 +
  109 + log.info("不记录预警信息" + violationWarningInformation.getOwningRegion() + " " + violationWarningInformation.getViolationType());
  110 +
  111 + return 1;
  112 +
  113 + }
  114 +
  115 +
100 116 if(violationWarningInformation.getCreateTime()==null){
101 117 violationWarningInformation.setCreateTime(DateUtils.getNowDate());
102 118 }
... ...
trash-workFlow/src/main/resources/mapper/caseOffline/CaseOfflineMapper.xml
... ... @@ -36,7 +36,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
36 36 <where>
37 37 <if test="type != null and type != ''"> and type = #{type}</if>
38 38 <if test="place != null and place != ''"> and place = #{place}</if>
39   - <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) =DATE_FORMAT(#{createTime},("%y%m%d"))</if>
  39 + <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if>
40 40 </where>
41 41 </select>
42 42  
... ...
trash-workFlow/src/main/resources/mapper/casefile/ViolationCaseFileMapper.xml
... ... @@ -49,6 +49,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
49 49 <if test="readBy != null and readBy != ''"> and read_by = #{readBy}</if>
50 50 <if test="readTime != null "> and read_time = #{readTime}</if>
51 51 <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if>
  52 + <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if>
52 53 </where>
53 54 order by create_time desc
54 55 </select>
... ...
trash-workFlow/src/main/resources/mapper/casefile/ViolationWarningInformationMapper.xml
... ... @@ -41,6 +41,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
41 41 <if test="projectName != null and projectName != ''"> and project_name like concat('%', #{projectName}, '%')</if>
42 42 <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
43 43 <if test="createTime != null"> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if>
  44 + <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if>
44 45 </where>
45 46 order by create_time desc
46 47 </select>
... ...