Commit 95babf5e6be52763971c78241cf9c3ee33c0bb68

Authored by youxiw2000
1 parent 20a4cfa9

m

trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
... ... @@ -186,15 +186,6 @@ public class ActTaskServiceImpl implements IActTaskService {
186 186 list.setTotal(list.size());
187 187 }
188 188  
189   -
190   - list.sort(new Comparator<ActTaskDTO>() {
191   -
192   - @Override
193   - public int compare(ActTaskDTO o1, ActTaskDTO o2) {
194   - // TODO Auto-generated method stub
195   - return (int) (o2.getCreatedDate().getTime() - o1.getCreatedDate().getTime());
196   - }
197   - });
198 189  
199 190 return list;
200 191 }
... ... @@ -278,17 +269,6 @@ public class ActTaskServiceImpl implements IActTaskService {
278 269  
279 270 }
280 271  
281   -// list.sort(new Comparator<ActTaskDTO>() {
282   -//
283   -// @Override
284   -// public int compare(ActTaskDTO o1, ActTaskDTO o2) {
285   -// // TODO Auto-generated method stub
286   -// return (int) (o2.getCreatedDate().getTime() - o1.getCreatedDate().getTime());
287   -// }
288   -// });
289   -//
290   -// list.setPageNum(pageDomain.getPageNum());
291   -// list.setPageSize(pageDomain.getPageSize());
292 272  
293 273  
294 274 return list;
... ... @@ -364,6 +344,15 @@ public class ActTaskServiceImpl implements IActTaskService {
364 344 }
365 345 }
366 346  
  347 + list.sort(new Comparator<ActTaskDTO>() {
  348 +
  349 + @Override
  350 + public int compare(ActTaskDTO o1, ActTaskDTO o2) {
  351 + // TODO Auto-generated method stub
  352 + return (int) (o2.getCreatedDate().getTime() - o1.getCreatedDate().getTime());
  353 + }
  354 + });
  355 +
367 356 return list;
368 357 }
369 358  
... ...
trash-ui/dist.rar
No preview for this file type
trash-ui/src/api/vio_casefile.js
... ... @@ -210,10 +210,14 @@ export default {
210 210 getRemoteDate(value){
211 211 this.remoteQueryData.name =value;
212 212 constructionsitesList(this.remoteQueryData).then(res => {
213   - this.projectNameList["0"] = res.result.list;
  213 + this.projectNameList["0"] = res.result.list;
  214 +
  215 + this.$forceUpdate();
214 216 });
215 217 earthsitesList(this.remoteQueryData).then(res => {
216   - this.projectNameList["1"] = res.result.list;
  218 + this.projectNameList["1"] = res.result.list;
  219 +
  220 + this.$forceUpdate();
217 221 });
218 222 },
219 223 selectArea(item) {
... ... @@ -403,20 +407,6 @@ export default {
403 407 const code = `${year}${month}${day}${hour}${minute}${second}${millisecond}`;
404 408 return code;
405 409 },
406   - projectNameLoadOptions(query) {
407   - // 根据输入的关键字query异步加载选项数据
408   - this.isLoading = true
409   - setTimeout(() => {
410   - // 模拟异步加载数据
411   - const data = [
412   - {name: '项目1'},
413   - {name: '项目2'},
414   - {name: '项目3'}
415   - ].filter(item => item.name.includes(query))
416   - this.projectNameList = data
417   - this.isLoading = false
418   - }, 200)
419   - },
420 410 getCompanys(value){
421 411  
422 412 let query = {
... ...
trash-ui/src/views/casefile/violationCaseFile/index.vue
... ... @@ -177,7 +177,6 @@
177 177 <el-select
178 178 v-model="form.projectName"
179 179 :filterable="true"
180   - :remote-method="projectNameLoadOptions"
181 180 :loading="isLoading" placeholder="请输入项目名称" style="width: 100%;"
182 181 :filter-method="getRemoteDate">
183 182 <el-option v-for="item in projectNameList[form.violationObjectType]" :key="item.name" :label="item.name" :value="item.name" :title="item.name"></el-option>
... ...
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
1 1 package com.trash.casefile.service.impl;
2 2  
  3 +import java.io.BufferedReader;
  4 +import java.io.File;
  5 +import java.io.FileNotFoundException;
  6 +import java.io.FileReader;
3 7 import java.io.IOException;
  8 +import java.util.HashMap;
4 9 import java.util.List;
  10 +import java.util.Map;
  11 +import java.util.concurrent.TimeUnit;
5 12 import java.util.stream.Collectors;
6 13  
7 14 import com.alibaba.fastjson.JSONArray;
... ... @@ -131,8 +138,26 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
131 138 i = 2;
132 139 }
133 140 }
134   -
135   -
  141 +
  142 + Map map = null;
  143 + try {
  144 + map = redisCache.getCacheMap("warningParam");
  145 + } catch (Exception e) {
  146 + e.printStackTrace();
  147 + }
  148 +
  149 +
  150 + if(map == null || map.size() == 0){
  151 + map = getTypeToRedis();
  152 + }
  153 +
  154 + if(map!= null && map.get(violationWarningInformation.getViolationType()) != null &&
  155 + map.get(violationWarningInformation.getViolationType()).equals("0")){
  156 + System.out.println(violationWarningInformation.getViolationType() + " " + map.get(violationWarningInformation.getViolationType()));
  157 + return result;
  158 + }
  159 +//
  160 +
136 161 if(violationWarningInformation.getCreateBy().equals("长沙市建筑垃圾智慧监管平台")){
137 162 WorkflowService.createCaseFile1(violationWarningInformation,i,1);
138 163 }else{
... ... @@ -141,6 +166,47 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
141 166  
142 167 return result;
143 168 }
  169 +
  170 +
  171 + public Map getTypeToRedis(){
  172 +
  173 +
  174 + File file = new File("d:/warningParam.txt");
  175 +
  176 + Map map = null;
  177 +
  178 + try {
  179 + BufferedReader fReader = new BufferedReader(new FileReader(file));
  180 +
  181 + String result = null;
  182 + map = new HashMap<>();
  183 + while(true){
  184 + try {
  185 + result = fReader.readLine();
  186 +
  187 + if(result == null){
  188 + break;
  189 + }
  190 +
  191 + map.put(result.split(" ")[0], result.split(" ")[1]);
  192 +
  193 + System.out.println(result.split(" ")[0] +"," + result.split(" ")[1]);
  194 +
  195 + } catch (Exception e) {
  196 + e.printStackTrace();
  197 + }
  198 +
  199 + }
  200 +
  201 + redisCache.setCacheObject("warningParam", map,15,TimeUnit.MINUTES);
  202 +
  203 + return map;
  204 + } catch (FileNotFoundException e) {
  205 + // TODO Auto-generated catch block
  206 + e.printStackTrace();
  207 + }
  208 + return null;
  209 + }
144 210  
145 211 /**
146 212 * 修改违规预警信息
... ...