Commit ad84fa064b7513500599f7c48eb5004660e68200

Authored by youxiw2000
1 parent 132a9741

m

Showing 69 changed files with 2506 additions and 1471 deletions
trash-activiti/src/main/java/com/trash/activiti/mapper/ActReDeploymentMapper.java
@@ -32,4 +32,8 @@ public interface ActReDeploymentMapper { @@ -32,4 +32,8 @@ public interface ActReDeploymentMapper {
32 32
33 public List<String> selectHistTitles(String name); 33 public List<String> selectHistTitles(String name);
34 34
  35 + public String getPhoneNumber(@Param("type")String type ,@Param("checkpoint") String checkpoint);
  36 +
  37 + public String getCaseTypeName(@Param("type")String type ,@Param("id") String id);
  38 +
35 } 39 }
trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
@@ -4,20 +4,13 @@ import java.text.ParseException; @@ -4,20 +4,13 @@ import java.text.ParseException;
4 import java.text.SimpleDateFormat; 4 import java.text.SimpleDateFormat;
5 import java.util.ArrayList; 5 import java.util.ArrayList;
6 import java.util.Comparator; 6 import java.util.Comparator;
7 -import java.util.Date;  
8 import java.util.HashMap; 7 import java.util.HashMap;
9 import java.util.HashSet; 8 import java.util.HashSet;
10 import java.util.List; 9 import java.util.List;
11 import java.util.Map; 10 import java.util.Map;
12 import java.util.Set; 11 import java.util.Set;
13 -import java.util.concurrent.BlockingQueue;  
14 -import java.util.concurrent.TimeUnit;  
15 -import java.util.stream.Collector;  
16 import java.util.stream.Collectors; 12 import java.util.stream.Collectors;
17 13
18 -import javax.validation.constraints.Null;  
19 -  
20 -import com.trash.common.utils.StringUtils;  
21 import org.activiti.api.runtime.shared.identity.UserGroupManager; 14 import org.activiti.api.runtime.shared.identity.UserGroupManager;
22 import org.activiti.api.runtime.shared.query.Pageable; 15 import org.activiti.api.runtime.shared.query.Pageable;
23 import org.activiti.api.runtime.shared.security.SecurityManager; 16 import org.activiti.api.runtime.shared.security.SecurityManager;
@@ -33,18 +26,13 @@ import org.activiti.engine.RuntimeService; @@ -33,18 +26,13 @@ import org.activiti.engine.RuntimeService;
33 import org.activiti.engine.TaskService; 26 import org.activiti.engine.TaskService;
34 import org.activiti.engine.history.HistoricProcessInstance; 27 import org.activiti.engine.history.HistoricProcessInstance;
35 import org.activiti.engine.history.HistoricProcessInstanceQuery; 28 import org.activiti.engine.history.HistoricProcessInstanceQuery;
36 -import org.activiti.engine.query.QueryProperty;  
37 import org.activiti.engine.runtime.ProcessInstance; 29 import org.activiti.engine.runtime.ProcessInstance;
38 import org.activiti.engine.runtime.ProcessInstanceQuery; 30 import org.activiti.engine.runtime.ProcessInstanceQuery;
39 import org.activiti.engine.task.IdentityLink; 31 import org.activiti.engine.task.IdentityLink;
40 import org.apache.commons.collections4.map.HashedMap; 32 import org.apache.commons.collections4.map.HashedMap;
41 import org.springframework.beans.factory.annotation.Autowired; 33 import org.springframework.beans.factory.annotation.Autowired;
42 -import org.springframework.data.redis.cache.RedisCacheManager;  
43 import org.springframework.stereotype.Service; 34 import org.springframework.stereotype.Service;
44 35
45 -import com.alibaba.fastjson.JSON;  
46 -import com.alibaba.fastjson.JSONArray;  
47 -import com.alibaba.fastjson.JSONObject;  
48 import com.github.pagehelper.Page; 36 import com.github.pagehelper.Page;
49 import com.trash.activiti.domain.ActWorkflowFormData; 37 import com.trash.activiti.domain.ActWorkflowFormData;
50 import com.trash.activiti.domain.dto.ActTaskDTO; 38 import com.trash.activiti.domain.dto.ActTaskDTO;
@@ -56,12 +44,12 @@ import com.trash.activiti.service.IActWorkflowFormDataService; @@ -56,12 +44,12 @@ import com.trash.activiti.service.IActWorkflowFormDataService;
56 import com.trash.activiti.service.myTaskService; 44 import com.trash.activiti.service.myTaskService;
57 import com.trash.common.core.page.PageDomain; 45 import com.trash.common.core.page.PageDomain;
58 import com.trash.common.core.redis.RedisCache; 46 import com.trash.common.core.redis.RedisCache;
59 -import com.trash.common.utils.RemoteServerUtils;  
60 import com.trash.common.utils.SecurityUtils; 47 import com.trash.common.utils.SecurityUtils;
61 import com.trash.common.utils.ServletUtils; 48 import com.trash.common.utils.ServletUtils;
62 -import com.trash.common.utils.spring.SpringUtils;  
63 -  
64 -import io.jsonwebtoken.lang.Strings; 49 +import com.trash.common.utils.StringUtils;
  50 +import com.trash.common.utils.util.PostSms;
  51 +import com.trash.common.utils.vo.mt.JsonSmsSend;
  52 +import com.trash.common.utils.vo.mt.Mobile;
65 53
66 @Service 54 @Service
67 public class ActTaskServiceImpl implements IActTaskService { 55 public class ActTaskServiceImpl implements IActTaskService {
@@ -451,10 +439,64 @@ public class ActTaskServiceImpl implements IActTaskService { @@ -451,10 +439,64 @@ public class ActTaskServiceImpl implements IActTaskService {
451 439
452 if (desc != null) 440 if (desc != null)
453 updateThreesetpTask(processInstance, desc); 441 updateThreesetpTask(processInstance, desc);
  442 +
  443 + checkPostSMS(processInstance,task);
454 444
455 // ๅ†™ๅ…ฅๆ•ฐๆฎๅบ“ 445 // ๅ†™ๅ…ฅๆ•ฐๆฎๅบ“
456 return actWorkflowFormDataService.insertActWorkflowFormDatas(acwfds); 446 return actWorkflowFormDataService.insertActWorkflowFormDatas(acwfds);
457 } 447 }
  448 +
  449 +
  450 +
  451 + private void checkPostSMS(ProcessInstance processInstance,Task task){
  452 +
  453 + String key = processInstance.getProcessDefinitionKey();
  454 +
  455 +
  456 + org.activiti.engine.task.Task tasks =taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
  457 +
  458 + if(tasks != null){
  459 +
  460 + List<Mobile> mobileList=new ArrayList<Mobile>();
  461 +
  462 +
  463 + String number = actMapper.getPhoneNumber(key,task.getName());
  464 +
  465 +
  466 + if(number != null){
  467 + String smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅทฅไฝœๆ้†’๏ผšๆ‚จๆœ‰ๆ–ฐ็š„ๅทฅไฝœๆต็จ‹๏ผŒ่ฏทๅŠๆ—ถๅค„็†ใ€‚";
  468 + Mobile mobile=new Mobile();
  469 + mobile.setMobile(number);
  470 + mobileList.add(mobile);
  471 +
  472 + if(key.equals("workflow_caseoffline")){
  473 +
  474 + String dname = actMapper.getCaseTypeName("case_offline_type",processInstance.getBusinessKey().split(":")[1]);
  475 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๆกˆๅทๆ้†’๏ผšๆœ‰ไธ€ๆก"+ dname +"็š„ๆกˆๅท๏ผŒ่ฏทๅŠๆ—ถๅค„็†ใ€‚";
  476 + }
  477 +
  478 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  479 + if(jsonSmsSend!=null){
  480 + if(jsonSmsSend.getState()==0){
  481 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  482 + }else{
  483 + System.out.println(jsonSmsSend.getMessage());
  484 + }
  485 + }else{
  486 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  487 + }
  488 + }
  489 +
  490 + }
  491 +
  492 +
  493 +
  494 +
  495 +
  496 +
  497 + System.out.println("ๅˆคๆ–ญๆ˜ฏๅฆๅ‘็Ÿญไฟก!");
  498 +
  499 + }
458 500
459 private void updateThreesetpTask(ProcessInstance processInstance, String placeCode) { 501 private void updateThreesetpTask(ProcessInstance processInstance, String placeCode) {
460 502
trash-activiti/src/main/java/com/trash/activiti/service/impl/FormHistoryDataServiceImpl.java
@@ -69,7 +69,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService { @@ -69,7 +69,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
69 69
70 70
71 afw.setControlName("ๅฎกๆ‰น"); 71 afw.setControlName("ๅฎกๆ‰น");
72 - afw.setControlValue("ๅพ…ๅฎกๆ‰น"); 72 + afw.setControlValue("ๅพ…ๅค„็†");
73 afw.setTaskNodeName(tasks.get(0).getName()); 73 afw.setTaskNodeName(tasks.get(0).getName());
74 afw.setCreateBy(tasks.get(0).getName()); 74 afw.setCreateBy(tasks.get(0).getName());
75 afw.setCreateName(tasks.get(0).getName()); 75 afw.setCreateName(tasks.get(0).getName());
@@ -85,7 +85,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService { @@ -85,7 +85,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
85 85
86 86
87 afw.setControlName("ๅฎกๆ‰น"); 87 afw.setControlName("ๅฎกๆ‰น");
88 - afw.setControlValue("ๅพ…ๅฎกๆ‰น"); 88 + afw.setControlValue("ๅพ…ๅค„็†");
89 afw.setTaskNodeName(tasks.get(0).getName()); 89 afw.setTaskNodeName(tasks.get(0).getName());
90 afw.setCreateBy(tasks.get(0).getName()); 90 afw.setCreateBy(tasks.get(0).getName());
91 afw.setCreateName(tasks.get(0).getName()); 91 afw.setCreateName(tasks.get(0).getName());
@@ -110,7 +110,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService { @@ -110,7 +110,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
110 110
111 111
112 afw.setControlName("ๅฎกๆ‰น"); 112 afw.setControlName("ๅฎกๆ‰น");
113 - afw.setControlValue("ๅพ…ๅฎกๆ‰น"); 113 + afw.setControlValue("ๅพ…ๅค„็†");
114 afw.setTaskNodeName(tasks.get(0).getName()); 114 afw.setTaskNodeName(tasks.get(0).getName());
115 afw.setCreateBy(tasks.get(0).getName()); 115 afw.setCreateBy(tasks.get(0).getName());
116 afw.setCreateName(tasks.get(0).getName()); 116 afw.setCreateName(tasks.get(0).getName());
@@ -126,7 +126,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService { @@ -126,7 +126,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
126 126
127 127
128 afw.setControlName("ๅฎกๆ‰น"); 128 afw.setControlName("ๅฎกๆ‰น");
129 - afw.setControlValue("ๅพ…ๅฎกๆ‰น"); 129 + afw.setControlValue("ๅพ…ๅค„็†");
130 afw.setTaskNodeName(tasks.get(0).getName()); 130 afw.setTaskNodeName(tasks.get(0).getName());
131 afw.setCreateBy(tasks.get(0).getName()); 131 afw.setCreateBy(tasks.get(0).getName());
132 afw.setCreateName(tasks.get(0).getName()); 132 afw.setCreateName(tasks.get(0).getName());
@@ -148,7 +148,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService { @@ -148,7 +148,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
148 148
149 149
150 afw.setControlName("ๅฎกๆ‰น"); 150 afw.setControlName("ๅฎกๆ‰น");
151 - afw.setControlValue("ๅพ…ๅฎกๆ‰น"); 151 + afw.setControlValue("ๅพ…ๅค„็†");
152 afw.setTaskNodeName(tasks.get(0).getName()); 152 afw.setTaskNodeName(tasks.get(0).getName());
153 afw.setCreateBy(tasks.get(0).getName()); 153 afw.setCreateBy(tasks.get(0).getName());
154 afw.setCreateName(tasks.get(0).getName()); 154 afw.setCreateName(tasks.get(0).getName());
trash-activiti/src/main/resources/mapper/activiti/ActReDeploymentMapper.xml
@@ -39,6 +39,17 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -39,6 +39,17 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
39 </select> 39 </select>
40 40
41 41
  42 + <select id="getCaseTypeName" parameterType="String" resultType="java.lang.String">
  43 + select dict_label from sys_dict_data where dict_type = #{type} and dict_value = (
  44 + select type from case_offline where id = #{id}
  45 + )
  46 + </select>
  47 +
  48 +
  49 + <select id="getPhoneNumber" parameterType="String" resultType="java.lang.String">
  50 + select number from sms where checkpoint = #{checkpoint} and type = #{type}
  51 + </select>
  52 +
42 <select id="selectTitles" parameterType="String" resultType="java.lang.String"> 53 <select id="selectTitles" parameterType="String" resultType="java.lang.String">
43 select DISTINCT title from workflow 54 select DISTINCT title from workflow
44 <where> 55 <where>
trash-common/src/main/java/com/trash/common/utils/DictUtils.java
@@ -2,6 +2,7 @@ package com.trash.common.utils; @@ -2,6 +2,7 @@ package com.trash.common.utils;
2 2
3 import java.util.Collection; 3 import java.util.Collection;
4 import java.util.List; 4 import java.util.List;
  5 +import java.util.concurrent.TimeUnit;
5 6
6 import com.trash.common.constant.Constants; 7 import com.trash.common.constant.Constants;
7 import com.trash.common.core.domain.entity.SysDictData; 8 import com.trash.common.core.domain.entity.SysDictData;
@@ -28,7 +29,7 @@ public class DictUtils @@ -28,7 +29,7 @@ public class DictUtils
28 */ 29 */
29 public static void setDictCache(String key, List<SysDictData> dictDatas) 30 public static void setDictCache(String key, List<SysDictData> dictDatas)
30 { 31 {
31 - SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), dictDatas); 32 + SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), dictDatas,5,TimeUnit.MINUTES);
32 } 33 }
33 34
34 /** 35 /**
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
@@ -32,6 +32,9 @@ import javax.net.ssl.X509TrustManager; @@ -32,6 +32,9 @@ import javax.net.ssl.X509TrustManager;
32 import com.alibaba.fastjson.JSON; 32 import com.alibaba.fastjson.JSON;
33 import com.alibaba.fastjson.JSONArray; 33 import com.alibaba.fastjson.JSONArray;
34 import com.alibaba.fastjson.JSONObject; 34 import com.alibaba.fastjson.JSONObject;
  35 +import com.trash.common.utils.util.PostSms;
  36 +import com.trash.common.utils.vo.mt.JsonSmsSend;
  37 +import com.trash.common.utils.vo.mt.Mobile;
35 38
36 import okhttp3.MediaType; 39 import okhttp3.MediaType;
37 import okhttp3.OkHttpClient; 40 import okhttp3.OkHttpClient;
@@ -65,6 +68,7 @@ public class RemoteServerUtils { @@ -65,6 +68,7 @@ public class RemoteServerUtils {
65 public static String constructionLicenseById = "/api/siteservice/cs/constructionsites/"; 68 public static String constructionLicenseById = "/api/siteservice/cs/constructionsites/";
66 69
67 public static String ConstructionList = "/api/siteservice/cs/constructionsites/search"; 70 public static String ConstructionList = "/api/siteservice/cs/constructionsites/search";
  71 + public static String ConstructionLedgerList = "/api/siteservice/cs/constructionsites/ledger/list";
68 72
69 public static String UpdateConstruction = "/api/siteservice/cs/constructionsites/status"; 73 public static String UpdateConstruction = "/api/siteservice/cs/constructionsites/status";
70 74
@@ -153,6 +157,18 @@ public class RemoteServerUtils { @@ -153,6 +157,18 @@ public class RemoteServerUtils {
153 157
154 return list; 158 return list;
155 } 159 }
  160 +
  161 + public static JSONArray getConstructionLedgerList(Map map) {
  162 + JSONArray list = null;
  163 + Object object = post(ConstructionLedgerList, map);
  164 +
  165 + if (object != null) {
  166 + JSONObject jsonObject = JSON.parseObject(object.toString());
  167 + list = jsonObject.getJSONArray("list");
  168 + }
  169 +
  170 + return list;
  171 + }
156 172
157 public static JSONArray getConstructionList(Map map) { 173 public static JSONArray getConstructionList(Map map) {
158 JSONArray list = null; 174 JSONArray list = null;
@@ -804,6 +820,27 @@ public class RemoteServerUtils { @@ -804,6 +820,27 @@ public class RemoteServerUtils {
804 820
805 return turckList; 821 return turckList;
806 } 822 }
  823 +
  824 +
  825 + public static JSONArray getDriverList() {
  826 +
  827 + try {
  828 + Map map = new HashMap<>();
  829 + Object result = get(DriverListPath, null);
  830 +
  831 + if (result != null) {
  832 + JSONObject json = JSON.parseObject(result.toString());
  833 + return json.getJSONArray("list");
  834 +
  835 + } else {
  836 + return null;
  837 + }
  838 +
  839 + } catch (Exception e) {
  840 + e.printStackTrace();
  841 + return null;
  842 + }
  843 + }
807 844
808 public static JSONArray getDriverList(String token) { 845 public static JSONArray getDriverList(String token) {
809 846
@@ -1231,7 +1268,7 @@ public class RemoteServerUtils { @@ -1231,7 +1268,7 @@ public class RemoteServerUtils {
1231 1268
1232 return get(GETAUTH, null, token.replace("Bearer ", "")); 1269 return get(GETAUTH, null, token.replace("Bearer ", ""));
1233 } 1270 }
1234 -  
1235 - 1271 +
  1272 +
1236 1273
1237 } 1274 }
trash-common/src/main/java/com/trash/common/utils/SmsSend.java
@@ -17,7 +17,7 @@ public class SmsSend { @@ -17,7 +17,7 @@ public class SmsSend {
17 try{ 17 try{
18 //ๅ‘้€ 18 //ๅ‘้€
19 Mobile mobile=new Mobile(); 19 Mobile mobile=new Mobile();
20 - mobile.setMobile("13800009999"); 20 + mobile.setMobile("15201713620");
21 List<Mobile> mobileList=new ArrayList<Mobile>(); 21 List<Mobile> mobileList=new ArrayList<Mobile>();
22 mobileList.add(mobile); 22 mobileList.add(mobile);
23 //ๆ›ดๆ–ฐๆไบคไฟกๆฏ 23 //ๆ›ดๆ–ฐๆไบคไฟกๆฏ
trash-common/src/main/java/com/trash/common/utils/util/SmsConf.java
@@ -8,8 +8,8 @@ public class SmsConf { @@ -8,8 +8,8 @@ public class SmsConf {
8 public static String queyrbalanceUrl = "http://172.31.253.178:5050/ims/sms/queryBalance";//ๆŸฅ่ฏขๅ‘้€่ƒฝๅŠ›ๅœฐๅ€ 8 public static String queyrbalanceUrl = "http://172.31.253.178:5050/ims/sms/queryBalance";//ๆŸฅ่ฏขๅ‘้€่ƒฝๅŠ›ๅœฐๅ€
9 public static String smsMoUrl = "http://172.31.253.178:9090/ims/sms/queryMo";//ๅ–ไธŠ่กŒๅœฐๅ€ 9 public static String smsMoUrl = "http://172.31.253.178:9090/ims/sms/queryMo";//ๅ–ไธŠ่กŒๅœฐๅ€
10 public static String smsRptUrl = "http://172.31.253.178:9090/ims/sms/queryRpt";//ๅ–ๅ›žๆ‰งๅœฐๅ€ 10 public static String smsRptUrl = "http://172.31.253.178:9090/ims/sms/queryRpt";//ๅ–ๅ›žๆ‰งๅœฐๅ€
11 - public static String smsUserName="่ดฆๆˆทๅ";//่ดฆๆˆทๅ  
12 - public static String smsPasswd="่ดฆๅทๅฏ†็ ";//่ดฆๅทๅฏ†็  11 + public static String smsUserName="cssjzljzhjgpt";//่ดฆๆˆทๅ
  12 + public static String smsPasswd="jfQrxC@21";//่ดฆๅทๅฏ†็ 
13 13
14 14
15 15
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
@@ -56,6 +56,9 @@ import com.trash.common.utils.RemoteServerUtils; @@ -56,6 +56,9 @@ import com.trash.common.utils.RemoteServerUtils;
56 import com.trash.common.utils.SecurityUtils; 56 import com.trash.common.utils.SecurityUtils;
57 import com.trash.common.utils.file.FileUploadUtils; 57 import com.trash.common.utils.file.FileUploadUtils;
58 import com.trash.common.utils.spring.SpringUtils; 58 import com.trash.common.utils.spring.SpringUtils;
  59 +import com.trash.common.utils.util.PostSms;
  60 +import com.trash.common.utils.vo.mt.JsonSmsSend;
  61 +import com.trash.common.utils.vo.mt.Mobile;
59 import com.trash.office.domain.LogisticsManagement; 62 import com.trash.office.domain.LogisticsManagement;
60 import com.trash.office.domain.UploadFile; 63 import com.trash.office.domain.UploadFile;
61 import com.trash.office.mapper.LogisticsManagementMapper; 64 import com.trash.office.mapper.LogisticsManagementMapper;
@@ -79,160 +82,150 @@ public class DriverTask { @@ -79,160 +82,150 @@ public class DriverTask {
79 82
80 @Autowired 83 @Autowired
81 private RedisCache redisCache; 84 private RedisCache redisCache;
82 -  
83 - public void getUpCase(){ 85 +
  86 + public void getUpCase() {
84 JSONArray array = RemoteServerUtils.getCaseList(); 87 JSONArray array = RemoteServerUtils.getCaseList();
85 Map map = new HashMap<>(); 88 Map map = new HashMap<>();
86 List<String> ids = new ArrayList<String>(); 89 List<String> ids = new ArrayList<String>();
87 -  
88 - if(array != null && array.size() > 0){  
89 - for(Object object:array){ 90 +
  91 + if (array != null && array.size() > 0) {
  92 + for (Object object : array) {
90 JSONObject json = (JSONObject) object; 93 JSONObject json = (JSONObject) object;
91 try { 94 try {
92 - ViolationCaseFile caseFile = new ViolationCaseFile(json);  
93 -  
94 - 95 + ViolationCaseFile caseFile = new ViolationCaseFile(json);
  96 +
95 for (Object fileObj : json.getJSONArray("attchList")) { 97 for (Object fileObj : json.getJSONArray("attchList")) {
96 -  
97 - JSONObject fileJSON = (JSONObject)fileObj;  
98 - UploadFile uploadFile = new UploadFile();  
99 - uploadFile.setTableName("violation_case_file");  
100 - uploadFile.setTableNumber(caseFile.getId().toString());  
101 - uploadFile.setFileName(fileJSON.getString("attchFileName"));  
102 - uploadFile.setFilePath(fileJSON.getString("attchFilePath"));  
103 -  
104 - SpringUtils.getBean(UploadFileMapper.class).insertUploadFile(uploadFile);  
105 - }  
106 -  
107 - 98 +
  99 + JSONObject fileJSON = (JSONObject) fileObj;
  100 + UploadFile uploadFile = new UploadFile();
  101 + uploadFile.setTableName("violation_case_file");
  102 + uploadFile.setTableNumber(caseFile.getId().toString());
  103 + uploadFile.setFileName(fileJSON.getString("attchFileName"));
  104 + uploadFile.setFilePath(fileJSON.getString("attchFilePath"));
  105 +
  106 + SpringUtils.getBean(UploadFileMapper.class).insertUploadFile(uploadFile);
  107 + }
  108 +
108 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile); 109 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile);
109 -  
110 110
111 ids.add(caseFile.getId()); 111 ids.add(caseFile.getId());
112 - 112 +
113 } catch (BeansException e) { 113 } catch (BeansException e) {
114 // TODO Auto-generated catch block 114 // TODO Auto-generated catch block
115 e.printStackTrace(); 115 e.printStackTrace();
116 } 116 }
117 - 117 +
118 } 118 }
119 - 119 +
120 map.put("taskIds", ids); 120 map.put("taskIds", ids);
121 map.put("taskType", "Q2"); 121 map.put("taskType", "Q2");
122 RemoteServerUtils.updateUpCase(map); 122 RemoteServerUtils.updateUpCase(map);
123 } 123 }
124 -  
125 -  
126 - 124 +
127 } 125 }
128 -  
129 - public void getUpCaseState(){  
130 126
131 -  
132 -  
133 - getCaseStateIntoDB("/api/thirdApi/query/urgeList","urgeUser","urgeDesc","urgeTime","Q5");  
134 -  
135 - getCaseStateIntoDB("/api/thirdApi/query/superviseList","supUser","supDesc","supTime","Q4");  
136 -  
137 - 127 + public void getUpCaseState() {
  128 +
  129 + getCaseStateIntoDB("/api/thirdApi/query/urgeList", "urgeUser", "urgeDesc", "urgeTime", "Q5");
  130 +
  131 + getCaseStateIntoDB("/api/thirdApi/query/superviseList", "supUser", "supDesc", "supTime", "Q4");
  132 +
138 JSONArray array = RemoteServerUtils.getUpCaseResult(); 133 JSONArray array = RemoteServerUtils.getUpCaseResult();
139 Map map = new HashMap<>(); 134 Map map = new HashMap<>();
140 List<String> ids = new ArrayList<String>(); 135 List<String> ids = new ArrayList<String>();
141 -  
142 - if(array != null && array.size() > 0){  
143 - for(Object object:array){ 136 +
  137 + if (array != null && array.size() > 0) {
  138 + for (Object object : array) {
144 JSONObject json = (JSONObject) object; 139 JSONObject json = (JSONObject) object;
145 -  
146 - ViolationCaseFile casefile = SpringUtils.getBean(ViolationCaseFileMapper.class).selectViolationCaseFileById(json.getString("thirdCaseId"));  
147 -  
148 - if(casefile == null){ 140 +
  141 + ViolationCaseFile casefile = SpringUtils.getBean(ViolationCaseFileMapper.class)
  142 + .selectViolationCaseFileById(json.getString("thirdCaseId"));
  143 +
  144 + if (casefile == null) {
149 continue; 145 continue;
150 - }else{  
151 -  
152 - Date d = new Date(json.getString("reportTime"));  
153 - 146 + } else {
  147 +
  148 + Date d = new Date(json.getString("reportTime"));
  149 +
154 ids.add(json.getString("acceptId")); 150 ids.add(json.getString("acceptId"));
155 - 151 +
156 ReplyApprovalProcess rap = new ReplyApprovalProcess(); 152 ReplyApprovalProcess rap = new ReplyApprovalProcess();
157 - rap.setTableName("workflow_casefile:"+json.getString("thirdCaseId")); 153 + rap.setTableName("workflow_casefile:" + json.getString("thirdCaseId"));
158 rap.setReplyPeople("็ปผ็ฎกๆœ"); 154 rap.setReplyPeople("็ปผ็ฎกๆœ");
159 rap.setReply(json.getString("replyContent")); 155 rap.setReply(json.getString("replyContent"));
160 rap.setReplyTime(new Date(json.getString("handleTime"))); 156 rap.setReplyTime(new Date(json.getString("handleTime")));
161 - 157 +
162 JSONArray images = json.getJSONArray("attchList"); 158 JSONArray images = json.getJSONArray("attchList");
163 String path = ""; 159 String path = "";
164 - try{  
165 - for(Object obj:images){ 160 + try {
  161 + for (Object obj : images) {
166 JSONObject img = (JSONObject) obj; 162 JSONObject img = (JSONObject) obj;
167 path += img.getString("attchFilePath") + ","; 163 path += img.getString("attchFilePath") + ",";
168 } 164 }
169 - }catch(Exception e){ 165 + } catch (Exception e) {
170 e.printStackTrace(); 166 e.printStackTrace();
171 } 167 }
172 - rap.setReplyImg(path.substring(0, path.length()-1)); 168 + rap.setReplyImg(path.substring(0, path.length() - 1));
173 } 169 }
174 } 170 }
175 171
176 -  
177 map.put("taskIds", ids); 172 map.put("taskIds", ids);
178 map.put("taskType", "Q1"); 173 map.put("taskType", "Q1");
179 RemoteServerUtils.updateUpCase(map); 174 RemoteServerUtils.updateUpCase(map);
180 } 175 }
181 -  
182 176
183 -  
184 } 177 }
185 178
186 - private void getCaseStateIntoDB(String url,String arg0,String arg1,String arg2,String type) {  
187 - try{  
188 - 179 + private void getCaseStateIntoDB(String url, String arg0, String arg1, String arg2, String type) {
  180 + try {
  181 +
189 JSONArray array = RemoteServerUtils.getUpCaseState(url); 182 JSONArray array = RemoteServerUtils.getUpCaseState(url);
190 Map map = new HashMap<>(); 183 Map map = new HashMap<>();
191 List<String> ids = new ArrayList<String>(); 184 List<String> ids = new ArrayList<String>();
192 -  
193 - if(array != null && array.size() > 0){ 185 +
  186 + if (array != null && array.size() > 0) {
194 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 187 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
195 - for(Object object:array){ 188 + for (Object object : array) {
196 JSONObject json = (JSONObject) object; 189 JSONObject json = (JSONObject) object;
197 - 190 +
198 ViolationCaseFile caseFile = new ViolationCaseFile(); 191 ViolationCaseFile caseFile = new ViolationCaseFile();
199 - 192 +
200 caseFile.setNumber(json.getString("evtId")); 193 caseFile.setNumber(json.getString("evtId"));
201 -  
202 - List<ViolationCaseFile> list = SpringUtils.getBean(ViolationCaseFileMapper.class).selectViolationCaseFileList(caseFile);  
203 -  
204 - if(list.size() == 0){ 194 +
  195 + List<ViolationCaseFile> list = SpringUtils.getBean(ViolationCaseFileMapper.class)
  196 + .selectViolationCaseFileList(caseFile);
  197 +
  198 + if (list.size() == 0) {
205 continue; 199 continue;
206 } 200 }
207 - 201 +
208 ReplyApprovalProcess rap = new ReplyApprovalProcess(); 202 ReplyApprovalProcess rap = new ReplyApprovalProcess();
209 - rap.setTableName("workflow_casefile:"+list.get(0).getId()); 203 + rap.setTableName("workflow_casefile:" + list.get(0).getId());
210 rap.setReplyPeople(json.getString(arg0)); 204 rap.setReplyPeople(json.getString(arg0));
211 rap.setReply(json.getString(arg1)); 205 rap.setReply(json.getString(arg1));
212 try { 206 try {
213 rap.setReplyTime(sdf.parse(json.getString(arg2))); 207 rap.setReplyTime(sdf.parse(json.getString(arg2)));
214 } catch (ParseException e) { 208 } catch (ParseException e) {
215 - 209 +
216 rap.setReplyTime(new Date()); 210 rap.setReplyTime(new Date());
217 - 211 +
218 e.printStackTrace(); 212 e.printStackTrace();
219 } 213 }
220 - 214 +
221 SpringUtils.getBean(ReplyApprovalProcessMapper.class).insertReplyApprovalProcess(rap); 215 SpringUtils.getBean(ReplyApprovalProcessMapper.class).insertReplyApprovalProcess(rap);
222 - 216 +
223 ids.add(json.getString("taskId")); 217 ids.add(json.getString("taskId"));
224 } 218 }
225 - 219 +
226 map.put("taskIds", ids); 220 map.put("taskIds", ids);
227 map.put("taskType", type); 221 map.put("taskType", type);
228 RemoteServerUtils.updateUpCase(map); 222 RemoteServerUtils.updateUpCase(map);
229 } 223 }
230 -  
231 - }catch(Exception e){  
232 - e.printStackTrace();  
233 - } 224 +
  225 + } catch (Exception e) {
  226 + e.printStackTrace();
  227 + }
234 } 228 }
235 -  
236 229
237 Map<String, String> paramsMap = new HashMap<String, String>(); 230 Map<String, String> paramsMap = new HashMap<String, String>();
238 231
@@ -280,8 +273,8 @@ public class DriverTask { @@ -280,8 +273,8 @@ public class DriverTask {
280 paramsMap.put("type_" + i + "_timeout", arr[i * 3]); 273 paramsMap.put("type_" + i + "_timeout", arr[i * 3]);
281 paramsMap.put("type_" + i + "_season", arr[i * 3 + 1]); 274 paramsMap.put("type_" + i + "_season", arr[i * 3 + 1]);
282 paramsMap.put("type_" + i + "_pect", arr[i * 3 + 2]); 275 paramsMap.put("type_" + i + "_pect", arr[i * 3 + 2]);
283 - }  
284 - 276 + }
  277 +
285 JSONArray areas = redisCache.getCacheObject("areaList"); 278 JSONArray areas = redisCache.getCacheObject("areaList");
286 Map<String, String> area = new HashMap<>(); 279 Map<String, String> area = new HashMap<>();
287 280
@@ -289,112 +282,109 @@ public class DriverTask { @@ -289,112 +282,109 @@ public class DriverTask {
289 JSONObject json = (JSONObject) object; 282 JSONObject json = (JSONObject) object;
290 area.put(json.getString("code"), json.getString("name")); 283 area.put(json.getString("code"), json.getString("name"));
291 } 284 }
292 -  
293 - try{ 285 +
  286 + try {
294 287
295 int type = 5; 288 int type = 5;
296 - LogisticsManagement logisticsManagement= new LogisticsManagement();  
297 - 289 + LogisticsManagement logisticsManagement = new LogisticsManagement();
  290 +
298 Date d = new Date(); 291 Date d = new Date();
299 - 292 +
300 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3)); 293 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
301 d.setDate(0); 294 d.setDate(0);
302 d.setHours(23); 295 d.setHours(23);
303 d.setMinutes(59); 296 d.setMinutes(59);
304 d.setSeconds(59); 297 d.setSeconds(59);
305 - 298 +
306 logisticsManagement.setCreateTime(d); 299 logisticsManagement.setCreateTime(d);
307 -  
308 - List<LogisticsManagement> logs = SpringUtils.getBean(LogisticsManagementMapper.class).selectLogisticsManagementList(logisticsManagement);  
309 - 300 +
  301 + List<LogisticsManagement> logs = SpringUtils.getBean(LogisticsManagementMapper.class)
  302 + .selectLogisticsManagementList(logisticsManagement);
  303 +
310 Collections.shuffle(logs); 304 Collections.shuffle(logs);
311 305
312 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100; 306 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
313 307
314 logs = logs.subList(0, (int) (logs.size() * pect)); 308 logs = logs.subList(0, (int) (logs.size() * pect));
315 -  
316 - for(LogisticsManagement l:logs){  
317 -  
318 - String title =(l.getType().equals("0") ? "็”จ็ซ ็”ณ่ฏท" : l.getType().equals("1") ? "็‰ฉๅ“็”ณ่ฏท" : "้‡‡่ดญ็”ณ่ฏท");  
319 - 309 +
  310 + for (LogisticsManagement l : logs) {
  311 +
  312 + String title = (l.getType().equals("0") ? "็”จ็ซ ็”ณ่ฏท" : l.getType().equals("1") ? "็‰ฉๅ“็”ณ่ฏท" : "้‡‡่ดญ็”ณ่ฏท");
  313 +
320 insertData(l.getId() + "", title, type, "็ปผๅˆ็ฎก็†้ƒจ", l.getDeptName()); 314 insertData(l.getId() + "", title, type, "็ปผๅˆ็ฎก็†้ƒจ", l.getDeptName());
321 } 315 }
322 -  
323 - }catch(Exception e){ 316 +
  317 + } catch (Exception e) {
324 e.printStackTrace(); 318 e.printStackTrace();
325 } 319 }
326 -  
327 - try{ 320 +
  321 + try {
328 322
329 int type = 6; 323 int type = 6;
330 - CaseOffline caseOffline= new CaseOffline();  
331 - 324 + CaseOffline caseOffline = new CaseOffline();
  325 +
332 Date d = new Date(); 326 Date d = new Date();
333 - 327 +
334 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3)); 328 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
335 d.setDate(0); 329 d.setDate(0);
336 d.setHours(23); 330 d.setHours(23);
337 d.setMinutes(59); 331 d.setMinutes(59);
338 d.setSeconds(59); 332 d.setSeconds(59);
339 - 333 +
340 caseOffline.setCreateTime(d); 334 caseOffline.setCreateTime(d);
341 - 335 +
342 List<CaseOffline> logs = SpringUtils.getBean(CaseOfflineMapper.class).selectCaseOfflineList(caseOffline); 336 List<CaseOffline> logs = SpringUtils.getBean(CaseOfflineMapper.class).selectCaseOfflineList(caseOffline);
343 - 337 +
344 Collections.shuffle(logs); 338 Collections.shuffle(logs);
345 339
346 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100; 340 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
347 341
348 logs = logs.subList(0, (int) (logs.size() * pect)); 342 logs = logs.subList(0, (int) (logs.size() * pect));
349 -  
350 - for(CaseOffline l:logs){ 343 +
  344 + for (CaseOffline l : logs) {
351 insertData(l.getId() + "", "็”ตๅญไบคๅŠžๆกˆๅท:" + l.getSiteName(), type, "ๆฒป็†ไบ‹ๅŠก้ƒจ", area.get(l.getPlace())); 345 insertData(l.getId() + "", "็”ตๅญไบคๅŠžๆกˆๅท:" + l.getSiteName(), type, "ๆฒป็†ไบ‹ๅŠก้ƒจ", area.get(l.getPlace()));
352 } 346 }
353 -  
354 - }catch(Exception e){ 347 +
  348 + } catch (Exception e) {
355 e.printStackTrace(); 349 e.printStackTrace();
356 } 350 }
357 -  
358 - try{ 351 +
  352 + try {
359 353
360 int type = 7; 354 int type = 7;
361 - ViolationCaseFile caseOffline= new ViolationCaseFile();  
362 - 355 + ViolationCaseFile caseOffline = new ViolationCaseFile();
  356 +
363 Date d = new Date(); 357 Date d = new Date();
364 - 358 +
365 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3)); 359 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
366 d.setDate(0); 360 d.setDate(0);
367 d.setHours(23); 361 d.setHours(23);
368 d.setMinutes(59); 362 d.setMinutes(59);
369 d.setSeconds(59); 363 d.setSeconds(59);
370 - 364 +
371 caseOffline.setCreateTime(d); 365 caseOffline.setCreateTime(d);
372 -  
373 - List<ViolationCaseFile> logs = SpringUtils.getBean(ViolationCaseFileMapper.class).selectViolationCaseFileList(caseOffline);  
374 - 366 +
  367 + List<ViolationCaseFile> logs = SpringUtils.getBean(ViolationCaseFileMapper.class)
  368 + .selectViolationCaseFileList(caseOffline);
  369 +
375 Collections.shuffle(logs); 370 Collections.shuffle(logs);
376 371
377 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100; 372 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
378 373
379 logs = logs.subList(0, (int) (logs.size() * pect)); 374 logs = logs.subList(0, (int) (logs.size() * pect));
380 -  
381 - for(ViolationCaseFile l:logs){ 375 +
  376 + for (ViolationCaseFile l : logs) {
382 insertData(l.getId() + "", "่ฟ่ง„ๆกˆๅท:" + l.getProjectName(), type, "็ง‘ๆŠ€ไฟกๆฏ้ƒจ", l.getOwningRegion()); 377 insertData(l.getId() + "", "่ฟ่ง„ๆกˆๅท:" + l.getProjectName(), type, "็ง‘ๆŠ€ไฟกๆฏ้ƒจ", l.getOwningRegion());
383 } 378 }
384 -  
385 - }catch(Exception e){ 379 +
  380 + } catch (Exception e) {
386 e.printStackTrace(); 381 e.printStackTrace();
387 } 382 }
388 -  
389 -  
390 -  
391 383
392 Gson g = new Gson(); 384 Gson g = new Gson();
393 385
394 JSONArray array; 386 JSONArray array;
395 387
396 -  
397 -  
398 array = redisCache.getCacheObject("truckList");// ่ฝฆ่พ† 388 array = redisCache.getCacheObject("truckList");// ่ฝฆ่พ†
399 if (array != null && array.size() > 0) { 389 if (array != null && array.size() > 0) {
400 390
@@ -485,49 +475,48 @@ public class DriverTask { @@ -485,49 +475,48 @@ public class DriverTask {
485 } 475 }
486 } 476 }
487 } 477 }
488 -  
489 - 478 +
490 } 479 }
491 480
492 public List ShuffleData(Gson g, JSONArray array, int type) { 481 public List ShuffleData(Gson g, JSONArray array, int type) {
493 List<JSONObject> list = g.fromJson(array.toJSONString(), new TypeToken<List<JSONObject>>() { 482 List<JSONObject> list = g.fromJson(array.toJSONString(), new TypeToken<List<JSONObject>>() {
494 }.getType()); 483 }.getType());
495 - 484 +
496 Date d = new Date(); 485 Date d = new Date();
497 - 486 +
498 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3)); 487 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
499 d.setDate(0); 488 d.setDate(0);
500 d.setHours(23); 489 d.setHours(23);
501 d.setMinutes(59); 490 d.setMinutes(59);
502 d.setSeconds(59); 491 d.setSeconds(59);
503 -  
504 - try{  
505 - list = list.parallelStream().filter(p->{ 492 +
  493 + try {
  494 + list = list.parallelStream().filter(p -> {
506 495
507 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 496 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
508 String editTime = p.getString("editedAt"); 497 String editTime = p.getString("editedAt");
509 String createdTime = p.getString("createdAt"); 498 String createdTime = p.getString("createdAt");
510 long newTime = 0; 499 long newTime = 0;
511 - try{  
512 - if(editTime == null){  
513 - if(createdTime == null){ 500 + try {
  501 + if (editTime == null) {
  502 + if (createdTime == null) {
514 return false; 503 return false;
515 - }else{ 504 + } else {
516 newTime = simpleDateFormat.parse(p.getString("createdAt")).getTime(); 505 newTime = simpleDateFormat.parse(p.getString("createdAt")).getTime();
517 } 506 }
518 - }else{ 507 + } else {
519 newTime = simpleDateFormat.parse(p.getString("editedAt")).getTime(); 508 newTime = simpleDateFormat.parse(p.getString("editedAt")).getTime();
520 } 509 }
521 - }catch(Exception e){ 510 + } catch (Exception e) {
522 e.printStackTrace(); 511 e.printStackTrace();
523 } 512 }
524 return d.getTime() < newTime; 513 return d.getTime() < newTime;
525 -  
526 - }).collect(Collectors.toList());  
527 - }catch(Exception e){ 514 +
  515 + }).collect(Collectors.toList());
  516 + } catch (Exception e) {
528 e.printStackTrace(); 517 e.printStackTrace();
529 } 518 }
530 - 519 +
531 Collections.shuffle(list); 520 Collections.shuffle(list);
532 521
533 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100; 522 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
@@ -669,7 +658,7 @@ public class DriverTask { @@ -669,7 +658,7 @@ public class DriverTask {
669 658
670 listParam.add(param); 659 listParam.add(param);
671 660
672 - SpringUtils.getBean(ITruckCreditService.class).insertTruckCredit(truckCredit); 661 + SpringUtils.getBean(ITruckCreditService.class).insertTruckCredit(truckCredit, 0);
673 } 662 }
674 } catch (BeansException e) { 663 } catch (BeansException e) {
675 // TODO Auto-generated catch block 664 // TODO Auto-generated catch block
@@ -747,6 +736,156 @@ public class DriverTask { @@ -747,6 +736,156 @@ public class DriverTask {
747 for (CompanyCredit c : companyList) { 736 for (CompanyCredit c : companyList) {
748 SpringUtils.getBean(ICompanyCreditService.class).updateRemoteCompanyAndTruck(c, TOKEN); 737 SpringUtils.getBean(ICompanyCreditService.class).updateRemoteCompanyAndTruck(c, TOKEN);
749 } 738 }
  739 +
  740 + try {
  741 + checkToSendSMS(); // ๆฃ€ๆŸฅ้ฉพ้ฉถๅ‘˜ไฟก็”จ
  742 + } catch (Exception e) {
  743 + e.printStackTrace();
  744 + }
  745 +
  746 + }
  747 +
  748 + private void checkToSendSMS() {
  749 + if (RemoteServerUtils.remote == null) {
  750 + RemoteServerUtils.remote = trashConfig.getRemotePath();
  751 + }
  752 +
  753 +
  754 + Map<String, Object> map = new HashMap<>();
  755 + map.put("size", 99999);
  756 + map.put("page", 1);
  757 + JSONArray cList = redisCache.getCacheObject("constructionList");
  758 + if(cList == null){
  759 + cList = RemoteServerUtils.getConstructionList(map, trashConfig.getToken());
  760 + redisCache.setCacheObject("constructionList", cList,60,TimeUnit.MINUTES);
  761 + }
  762 +
  763 + JSONArray eList = redisCache.getCacheObject("earthSitesList");
  764 + if(eList == null){
  765 + eList = RemoteServerUtils.getEarthSitesList(map, trashConfig.getToken());
  766 + redisCache.setCacheObject("earthSitesList", cList,60,TimeUnit.MINUTES);
  767 + }
  768 +
  769 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  770 + long now = 0;
  771 + try {
  772 + now = sdf.parse(sdf.format(new Date())).getTime();
  773 + } catch (ParseException e1) {
  774 + // TODO Auto-generated catch block
  775 + e1.printStackTrace();
  776 + }
  777 +
  778 + if(cList != null){
  779 + for(Object obj:cList){
  780 + try{
  781 +
  782 + JSONObject json = (JSONObject) obj;
  783 + long endTime = 0;
  784 + try {
  785 + now = sdf.parse(sdf.format(new Date())).getTime();
  786 + endTime = sdf.parse(json.getString("effectiveEnd")).getTime();
  787 + } catch (ParseException e) {
  788 + // TODO Auto-generated catch block
  789 + e.printStackTrace();
  790 + }
  791 +
  792 + // 1 * 60 ๅˆ† 60 ๆ—ถ 24
  793 +
  794 + if((endTime - now) == 15*1000*60*60*24){
  795 + List<Mobile> mobileList = new ArrayList<>();
  796 +
  797 +
  798 +// String p = json.getString("constructionCompanyPhone");
  799 +// if(p != null){
  800 +// Mobile mobile=new Mobile();
  801 +// mobile.setMobile(p);
  802 +// mobileList.add(mobile);
  803 +// }
  804 +//
  805 +// String p1 = json.getString("projectnCompanyPhone");
  806 +// if(p1 != null){
  807 +// Mobile mobile2=new Mobile();
  808 +// mobile2.setMobile(p1);
  809 +// mobileList.add(mobile2);
  810 +// }
  811 +
  812 + Mobile mobile2=new Mobile();
  813 + mobile2.setMobile("19520553054");
  814 + mobileList.add(mobile2);
  815 +
  816 + String smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅˆฐๆœŸๆ้†’๏ผš"+json.getString("name")+"ๅฐ†ไบŽ"+json.getString("effectiveEnd")+"ๅˆฐๆœŸ๏ผˆๆˆชๆญขๆ—ฅ๏ผ‰๏ผŒ่ฏทๅœจๅˆฐๆœŸๆ—ฅๅ‰ๅŠๆ—ถๅŠž็†็›ธๅ…ณๆ‰‹็ปญใ€‚";
  817 +
  818 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  819 + if(jsonSmsSend!=null){
  820 + if(jsonSmsSend.getState()==0){
  821 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  822 + }else{
  823 + System.out.println(jsonSmsSend.getMessage());
  824 + }
  825 + }else{
  826 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  827 + }
  828 + }
  829 +
  830 +
  831 + } catch (Exception e) {
  832 + // TODO Auto-generated catch block
  833 + e.printStackTrace();
  834 + }
  835 + }
  836 +
  837 + }
  838 +
  839 + if(eList != null){
  840 + for(Object obj:eList){
  841 + try{
  842 +
  843 +
  844 + JSONObject json = (JSONObject) obj;
  845 + long endTime = 0;
  846 + try {
  847 + endTime = sdf.parse(json.getString("effectiveEnd")).getTime();
  848 + } catch (ParseException e) {
  849 + // TODO Auto-generated catch block
  850 + e.printStackTrace();
  851 + }
  852 + if((endTime - now) == 15*1000*60*60*24){
  853 + List<Mobile> mobileList = new ArrayList<>();
  854 + String p = json.getString("principalPhoneNo");
  855 + if(p != null){
  856 +// Mobile mobile=new Mobile();
  857 +// mobile.setMobile(p);
  858 +// mobileList.add(mobile);
  859 +
  860 + Mobile mobile2=new Mobile();
  861 + mobile2.setMobile("19520553054");
  862 + mobileList.add(mobile2);
  863 +
  864 + String smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅˆฐๆœŸๆ้†’๏ผš"+json.getString("name")+"ๅฐ†ไบŽ"+json.getString("effectiveEnd")+"ๅˆฐๆœŸ๏ผˆๆˆชๆญขๆ—ฅ๏ผ‰๏ผŒ่ฏทๅœจๅˆฐๆœŸๆ—ฅๅ‰ๅŠๆ—ถๅŠž็†็›ธๅ…ณๆ‰‹็ปญใ€‚";
  865 +
  866 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  867 + if(jsonSmsSend!=null){
  868 + if(jsonSmsSend.getState()==0){
  869 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  870 + }else{
  871 + System.out.println(jsonSmsSend.getMessage());
  872 + }
  873 + }else{
  874 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  875 + }
  876 + }
  877 + }
  878 +
  879 +
  880 +
  881 + }catch(Exception e){
  882 + e.printStackTrace();
  883 + }
  884 + }
  885 + }
  886 +
  887 +
  888 +
750 } 889 }
751 890
752 public void checkAllTask() { 891 public void checkAllTask() {
@@ -804,8 +943,8 @@ public class DriverTask { @@ -804,8 +943,8 @@ public class DriverTask {
804 map.put("size", 99999); 943 map.put("size", 99999);
805 map.put("page", 1); 944 map.put("page", 1);
806 JSONArray jsonArray = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); 945 JSONArray jsonArray = RemoteServerUtils.getCompanyList(map, trashConfig.getToken());
807 - if(jsonArray != null){  
808 - redisCache.setCacheObject("companyList", jsonArray,60,TimeUnit.MINUTES); 946 + if (jsonArray != null) {
  947 + redisCache.setCacheObject("companyList", jsonArray, 60, TimeUnit.MINUTES);
809 } 948 }
810 } 949 }
811 950
@@ -819,8 +958,8 @@ public class DriverTask { @@ -819,8 +958,8 @@ public class DriverTask {
819 map.put("contractStatus", 1); 958 map.put("contractStatus", 1);
820 map.put("auditStatus", 1); 959 map.put("auditStatus", 1);
821 JSONArray jsonArray = RemoteServerUtils.getContractList(map, trashConfig.getToken()); 960 JSONArray jsonArray = RemoteServerUtils.getContractList(map, trashConfig.getToken());
822 - if(jsonArray != null){  
823 - redisCache.setCacheObject("contractList", jsonArray,60,TimeUnit.MINUTES); 961 + if (jsonArray != null) {
  962 + redisCache.setCacheObject("contractList", jsonArray, 60, TimeUnit.MINUTES);
824 } 963 }
825 } 964 }
826 965
@@ -835,8 +974,8 @@ public class DriverTask { @@ -835,8 +974,8 @@ public class DriverTask {
835 map.put("size", 99999); 974 map.put("size", 99999);
836 map.put("page", 1); 975 map.put("page", 1);
837 JSONArray jsonArray = RemoteServerUtils.getConstructionList(map, trashConfig.getToken()); 976 JSONArray jsonArray = RemoteServerUtils.getConstructionList(map, trashConfig.getToken());
838 - if(jsonArray != null){  
839 - redisCache.setCacheObject("constructionList", jsonArray,60,TimeUnit.MINUTES); 977 + if (jsonArray != null) {
  978 + redisCache.setCacheObject("constructionList", jsonArray, 60, TimeUnit.MINUTES);
840 } 979 }
841 } 980 }
842 981
@@ -851,8 +990,8 @@ public class DriverTask { @@ -851,8 +990,8 @@ public class DriverTask {
851 map.put("size", 99999); 990 map.put("size", 99999);
852 map.put("page", 1); 991 map.put("page", 1);
853 JSONArray jsonArray = RemoteServerUtils.getEarthSitesList(map, trashConfig.getToken()); 992 JSONArray jsonArray = RemoteServerUtils.getEarthSitesList(map, trashConfig.getToken());
854 - if(jsonArray != null){  
855 - redisCache.setCacheObject("earthSitesList", jsonArray,60,TimeUnit.MINUTES); 993 + if (jsonArray != null) {
  994 + redisCache.setCacheObject("earthSitesList", jsonArray, 60, TimeUnit.MINUTES);
856 } 995 }
857 } 996 }
858 997
@@ -869,8 +1008,8 @@ public class DriverTask { @@ -869,8 +1008,8 @@ public class DriverTask {
869 map.put("page", 1); 1008 map.put("page", 1);
870 1009
871 JSONArray jsonArray = RemoteServerUtils.getTruckList(map, trashConfig.getToken()); 1010 JSONArray jsonArray = RemoteServerUtils.getTruckList(map, trashConfig.getToken());
872 - if(jsonArray != null){  
873 - redisCache.setCacheObject("truckList", jsonArray,60,TimeUnit.MINUTES); 1011 + if (jsonArray != null) {
  1012 + redisCache.setCacheObject("truckList", jsonArray, 60, TimeUnit.MINUTES);
874 } 1013 }
875 } 1014 }
876 1015
@@ -885,8 +1024,8 @@ public class DriverTask { @@ -885,8 +1024,8 @@ public class DriverTask {
885 map.put("size", 99999); 1024 map.put("size", 99999);
886 map.put("page", 1); 1025 map.put("page", 1);
887 JSONArray jsonArray = RemoteServerUtils.getAreas(trashConfig.getToken()); 1026 JSONArray jsonArray = RemoteServerUtils.getAreas(trashConfig.getToken());
888 - if(jsonArray != null){  
889 - redisCache.setCacheObject("areaList", jsonArray,60,TimeUnit.MINUTES); 1027 + if (jsonArray != null) {
  1028 + redisCache.setCacheObject("areaList", jsonArray, 60, TimeUnit.MINUTES);
890 } 1029 }
891 } 1030 }
892 } 1031 }
trash-system/src/main/java/com/trash/system/service/impl/SysDictTypeServiceImpl.java
@@ -81,7 +81,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService @@ -81,7 +81,7 @@ public class SysDictTypeServiceImpl implements ISysDictTypeService
81 { 81 {
82 return dictDatas; 82 return dictDatas;
83 } 83 }
84 - dictDatas = dictDataMapper.selectDictDataByType(dictType); 84 + dictDatas = dictDataMapper.selectDictDataByType(dictType);
85 if (StringUtils.isNotEmpty(dictDatas)) 85 if (StringUtils.isNotEmpty(dictDatas))
86 { 86 {
87 DictUtils.setDictCache(dictType, dictDatas); 87 DictUtils.setDictCache(dictType, dictDatas);
trash-ui/dist.7z
No preview for this file type
trash-ui/src/api/caseOfflineInfo.js
1 import {getAdviceList, getCaseOffline} from "@/api/caseOffline/caseOffline"; 1 import {getAdviceList, getCaseOffline} from "@/api/caseOffline/caseOffline";
2 import {getArea,} from "@/api/dict"; 2 import {getArea,} from "@/api/dict";
3 3
4 - 4 +import {listData} from "@/api/system/dict/data"
5 import {getToken} from "@/utils/auth"; 5 import {getToken} from "@/utils/auth";
6 import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess"; 6 import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
7 7
@@ -48,16 +48,6 @@ export default { @@ -48,16 +48,6 @@ export default {
48 // ่กจๅ•ๆ ก้ชŒ 48 // ่กจๅ•ๆ ก้ชŒ
49 rules: {}, 49 rules: {},
50 caseType: [ 50 caseType: [
51 - {code: 7, name: "ๆ— ่ฎธๅฏๆถˆ็บณ๏ผˆๅทฅ๏ผ‰"},  
52 - {code: 8, name: "ๆ— ่ฎธๅฏๆถˆ็บณ๏ผˆๆถˆ๏ผ‰"},  
53 - {code: 9, name: "ไฝฟ็”จ้žไธ“็”จ่ฝฆ่พ†"},  
54 - {code: 0, name: "ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐ๏ผˆๅซๅค„็†ๅœบๆ‰€๏ผ‰็š„ๆธฃๅœŸ่ฟ่พ“่ฝฆ่พ†ๅ‡บๅœบ่ฝฆ่บซไธๆด๏ผŒ่ฝฆ่ฝฎๅธฆๆณฅ"},  
55 - {code: 1, name: "ๆœชๆด—่ฝฆๅ‡บๅœบๆˆ–่€…ๅ‡บๅœบๆธ…ๆดไธๅฝปๅบ•"},  
56 - {code: 2, name: "ๆธฃๅœŸ่ฟ่พ“่ฝฆ่พ†่ดง็ฎฑ้กถ็›–ๆœชๆŒ‰่ง„ๅฎšๅ…ณ้—ญๅˆฐไฝๆˆ–ๆœชๆŒ‰่ง„ๅฎšๅ’Œๆ ‡ๅ‡†่ฃ…่ฝฝๆธฃๅœŸๅ‡บๅœบ"},  
57 - {code: 3, name: "้žๆ ธๅ‡†่ฝฆ่พ†่ฟ›ๅ…ฅๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐ่ฟ่พ“ๆธฃๅœŸ"},  
58 - {code: 4, name: "ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐๆœชๆŒ‰่ง„ๅฎšๆ—ถ้—ดๅผ€ๅœๅทฅ"},  
59 - {code: 5, name: "ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐๆด—่ฝฆ่ฎพๆ–ฝ็ญ‰็ ดๆŸใ€ๆœชๆญฃๅธธไฝฟ็”จๅŠๆŽชๆ–ฝไธๅˆฐไฝ็š„"},  
60 - {code: 6, name: "ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐใ€ๅค„็†ๅœบๆ‰€(ๅซๅ›žๅกซๅœบ๏ผ‰ๅ‡บๅ…ฅๅฃไธคไพง50็ฑณ่Œƒๅ›ดๅ†…ๅ‡บ็ŽฐๆธฃๅœŸๆฑกๆŸ“ใ€ๆฑกๆฐดๅค–ๆŽ’็ญ‰็Žฐ่ฑก"},  
61 ], 51 ],
62 fileList: [], 52 fileList: [],
63 areas: [], 53 areas: [],
@@ -89,7 +79,12 @@ export default { @@ -89,7 +79,12 @@ export default {
89 replyApprovalProcessList:[], 79 replyApprovalProcessList:[],
90 }; 80 };
91 }, 81 },
92 - created() { 82 + created() {
  83 + listData({dictType:"case_offline_type"}).then(res=>{
  84 + this.caseType = res.rows;
  85 +
  86 + });
  87 +
93 let id = this.businessKey.split(":"); 88 let id = this.businessKey.split(":");
94 89
95 if (id.length == 2) { 90 if (id.length == 2) {
@@ -104,7 +99,8 @@ export default { @@ -104,7 +99,8 @@ export default {
104 this.replyApprovalProcessList = response.rows; 99 this.replyApprovalProcessList = response.rows;
105 }); 100 });
106 }, 101 },
107 - methods: { 102 + methods: {
  103 +
108 getSite(item) { 104 getSite(item) {
109 this.form.objectId = item.id; 105 this.form.objectId = item.id;
110 }, 106 },
@@ -120,8 +116,8 @@ export default { @@ -120,8 +116,8 @@ export default {
120 }, 116 },
121 getCaseType(type) { 117 getCaseType(type) {
122 for (let i in this.caseType) { 118 for (let i in this.caseType) {
123 - if (this.caseType[i].code == Number(type))  
124 - return this.caseType[i].name 119 + if (this.caseType[i].dictValue == Number(type))
  120 + return this.caseType[i].dictLabel
125 } 121 }
126 }, 122 },
127 123
trash-ui/src/api/caseoffline.js
1 import { listCaseOffline, getCaseOffline, delCaseOffline, addCaseOffline, updateCaseOffline, exportCaseOffline } from "@/api/caseOffline/caseOffline"; 1 import { listCaseOffline, getCaseOffline, delCaseOffline, addCaseOffline, updateCaseOffline, exportCaseOffline } from "@/api/caseOffline/caseOffline";
2 2
3 -  
4 import h5Info from "@/views/h5/caseOffline/caseOfflineInfo"; 3 import h5Info from "@/views/h5/caseOffline/caseOfflineInfo";
5 -  
6 import h5Page from '@/views/h5/Pagination'; 4 import h5Page from '@/views/h5/Pagination';
  5 +import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
7 6
8 -  
9 -  
10 - import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";  
11 import { 7 import {
12 getArea, 8 getArea,
13 earthsitesList, 9 earthsitesList,
14 constructionsitesList, 10 constructionsitesList,
  11 + truckList,
15 getDict, 12 getDict,
16 } from "@/api/dict"; 13 } from "@/api/dict";
17 import { 14 import {
18 getThreestep, 15 getThreestep,
19 } from "@/api/business/threestep"; 16 } from "@/api/business/threestep";
  17 +
  18 + import {listData} from "@/api/system/dict/data"
20 19
21 import { 20 import {
22 getToken 21 getToken
@@ -66,18 +65,7 @@ export default { @@ -66,18 +65,7 @@ export default {
66 // ่กจๅ•ๆ ก้ชŒ 65 // ่กจๅ•ๆ ก้ชŒ
67 rules: { 66 rules: {
68 }, 67 },
69 - caseType:[  
70 - {code: 7, name: "ๆ— ่ฎธๅฏๆถˆ็บณ๏ผˆๅทฅ๏ผ‰"},  
71 - {code: 8, name: "ๆ— ่ฎธๅฏๆถˆ็บณ๏ผˆๆถˆ๏ผ‰"},  
72 - {code: 9, name: "ไฝฟ็”จ้žไธ“็”จ่ฝฆ่พ†"},  
73 - {code:0,name:"ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐ๏ผˆๅซๅค„็†ๅœบๆ‰€๏ผ‰็š„ๆธฃๅœŸ่ฟ่พ“่ฝฆ่พ†ๅ‡บๅœบ่ฝฆ่บซไธๆด๏ผŒ่ฝฆ่ฝฎๅธฆๆณฅ"},  
74 - {code:1,name:"ๆœชๆด—่ฝฆๅ‡บๅœบๆˆ–่€…ๅ‡บๅœบๆธ…ๆดไธๅฝปๅบ•"},  
75 - {code:2,name:"ๆธฃๅœŸ่ฟ่พ“่ฝฆ่พ†่ดง็ฎฑ้กถ็›–ๆœชๆŒ‰่ง„ๅฎšๅ…ณ้—ญๅˆฐไฝๆˆ–ๆœชๆŒ‰่ง„ๅฎšๅ’Œๆ ‡ๅ‡†่ฃ…่ฝฝๆธฃๅœŸๅ‡บๅœบ"},  
76 - {code:3,name:"้žๆ ธๅ‡†่ฝฆ่พ†่ฟ›ๅ…ฅๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐ่ฟ่พ“ๆธฃๅœŸ"},  
77 - {code:4,name:"ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐๆœชๆŒ‰่ง„ๅฎšๆ—ถ้—ดๅผ€ๅœๅทฅ"},  
78 - {code:5,name:"ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐๆด—่ฝฆ่ฎพๆ–ฝ็ญ‰็ ดๆŸใ€ๆœชๆญฃๅธธไฝฟ็”จๅŠๆŽชๆ–ฝไธๅˆฐไฝ็š„"},  
79 - {code:6,name:"ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐใ€ๅค„็†ๅœบๆ‰€(ๅซๅ›žๅกซๅœบ๏ผ‰ๅ‡บๅ…ฅๅฃไธคไพง50็ฑณ่Œƒๅ›ดๅ†…ๅ‡บ็ŽฐๆธฃๅœŸๆฑกๆŸ“ใ€ๆฑกๆฐดๅค–ๆŽ’็ญ‰็Žฐ่ฑก"},  
80 - ], 68 + caseType:null,
81 fileList:[], 69 fileList:[],
82 areas: [], 70 areas: [],
83 upload: { 71 upload: {
@@ -105,9 +93,15 @@ export default { @@ -105,9 +93,15 @@ export default {
105 } 93 }
106 }; 94 };
107 }, 95 },
108 - created() { 96 + created() {
  97 +
  98 + listData({dictType:"case_offline_type"}).then(res=>{
  99 + this.caseType = res.rows;
  100 +
  101 + });
109 this.getList(); 102 this.getList();
110 103
  104 +
111 if(window.location.search){ 105 if(window.location.search){
112 let businessKey = window.location.search.split("=")[1]; 106 let businessKey = window.location.search.split("=")[1];
113 if(window.location.search.split("=")[0] == "?businessKey"){ 107 if(window.location.search.split("=")[0] == "?businessKey"){
@@ -131,8 +125,6 @@ export default { @@ -131,8 +125,6 @@ export default {
131 125
132 } 126 }
133 127
134 -  
135 -  
136 constructionsitesList(this.remoteQueryData).then(res => { 128 constructionsitesList(this.remoteQueryData).then(res => {
137 this.data[0]= res.result.list; 129 this.data[0]= res.result.list;
138 }); 130 });
@@ -141,9 +133,51 @@ export default { @@ -141,9 +133,51 @@ export default {
141 this.data[1]= res.result.list; 133 this.data[1]= res.result.list;
142 }); 134 });
143 }, 135 },
144 - methods: { 136 + methods: {
  137 + androidPrint(){
  138 +
  139 + let id = this.businessKey.split(":");
  140 +
  141 + if (id.length == 2) {
  142 + id = id[1];
  143 + }
  144 + getCaseOffline(id).then(response => {
  145 + let data = response.data;
  146 +
  147 + var title ="็”ตๅญไบคๅŠžๅ•";
  148 + var content ={
  149 + "ไบคๅŠžๆ—ถ้—ด": data.createTime,
  150 + "ๆกˆๅท็ฑปๅž‹":this.getCaseType(data.type),
  151 + "ๆ‰€ๅฑžๅŒบๅŸŸ": this.getAreaName(data.place),
  152 + "็ฑปๅž‹":this.siteType == 0 ? "ๅทฅๅœฐ" : "ๅค„็†ๅœบๆ‰€",
  153 + "ๅทฅๅœฐๅ็งฐ": data.siteName,
  154 + "้—ฎ้ข˜ๆ่ฟฐ":data.caseDec,
  155 + "ไฝ็ฝฎๆ่ฟฐ": data.number,
  156 + "ๆกˆๅท็ผ–ๅท": data.locationDec,
  157 + "้‡‡้›†ไบบ":data.createBy,};//ๅฐ† content ๅฏน่ฑก่ฝฌๆขไธบๅญ—็ฌฆไธฒ
  158 + var contentStr=JSON.stringify(content);// ่ฐƒ็”จๅฎ‰ๅ“็ซฏๆ–นๆณ•๏ผŒๅนถไผ ้€’ๅ‚ๆ•ฐ
  159 +
  160 + window.JsInterface.print(title,contentStr)
  161 +
  162 + });
  163 + },
  164 + getStatus(item){
  165 + if(item.advice4){
  166 + return "็ป“ๆกˆๅญ˜ๆกฃ";
  167 + }
  168 + if(!item.advice1){
  169 + return "ๆœชๅ›žๅค";
  170 + }
  171 + if(!item.advice4 && !item.advice3){
  172 + return "ๅทฒๅ›žๅค";
  173 + }
  174 + if(!item.advice4 && item.advice3){
  175 + return "ๅฎกๆ ธไธญ";
  176 + }
  177 + },
145 getSite(item){ 178 getSite(item){
146 this.remoteQueryData.name = item; 179 this.remoteQueryData.name = item;
  180 + this.form.siteName = item;
147 if(this.form.siteType == 0){ 181 if(this.form.siteType == 0){
148 constructionsitesList(this.remoteQueryData).then(res => { 182 constructionsitesList(this.remoteQueryData).then(res => {
149 this.data[0]= res.result.list; 183 this.data[0]= res.result.list;
@@ -152,8 +186,10 @@ export default { @@ -152,8 +186,10 @@ export default {
152 this.form.objectId = res.result.list[i].id; 186 this.form.objectId = res.result.list[i].id;
153 } 187 }
154 } 188 }
  189 +
  190 + this.$forceUpdate();
155 }); 191 });
156 - }else{ 192 + }else if(this.form.siteType == 1){
157 earthsitesList(this.remoteQueryData).then(res => { 193 earthsitesList(this.remoteQueryData).then(res => {
158 this.data[1]= res.result.list; 194 this.data[1]= res.result.list;
159 for(let i in res.result.list){ 195 for(let i in res.result.list){
@@ -161,9 +197,40 @@ export default { @@ -161,9 +197,40 @@ export default {
161 this.form.objectId = res.result.list[i].id; 197 this.form.objectId = res.result.list[i].id;
162 } 198 }
163 } 199 }
  200 +
  201 + this.$forceUpdate();
164 }); 202 });
165 - } 203 + }else if(this.form.siteType == 2){
  204 +
  205 + let query = {
  206 + 'page':1,
  207 + 'size':9999,
  208 + 'dishonestState':0,
  209 + 'valid':0,
  210 + 'licenseplateNo':this.remoteQueryData.name
  211 + }
  212 + truckList(query).then(res => {
  213 +
  214 + let trucks = [];
  215 +
  216 + for(let i in res.result.list){
  217 +
  218 + let t = {
  219 + 'name':res.result.list[i].licenseplateNo
  220 + }
  221 +
  222 + trucks.push(t);
  223 +
  224 + if(res.result.list[i].licenseplateNo == item){
  225 + this.form.objectId = res.result.list[i].id;
  226 + }
  227 + }
  228 +
  229 + this.data[2]= trucks;
166 230
  231 + this.$forceUpdate();
  232 + });
  233 + }
167 234
168 235
169 236
@@ -171,7 +238,7 @@ export default { @@ -171,7 +238,7 @@ export default {
171 /** ๆŸฅ่ฏข็บฟไธ‹ไบคๅŠžๆกˆๅทๅˆ—่กจ */ 238 /** ๆŸฅ่ฏข็บฟไธ‹ไบคๅŠžๆกˆๅทๅˆ—่กจ */
172 getList() { 239 getList() {
173 this.loading = true; 240 this.loading = true;
174 - 241 +
175 if(this.queryParams.createTime){ 242 if(this.queryParams.createTime){
176 this.queryParams.startTime = this.queryParams.createTime[0]; 243 this.queryParams.startTime = this.queryParams.createTime[0];
177 this.queryParams.endTime = this.queryParams.createTime[1]; 244 this.queryParams.endTime = this.queryParams.createTime[1];
@@ -263,10 +330,8 @@ export default { @@ -263,10 +330,8 @@ export default {
263 }, 330 },
264 getCaseType(type){ 331 getCaseType(type){
265 for(let i in this.caseType){ 332 for(let i in this.caseType){
266 -  
267 -  
268 - if(this.caseType[i].code==type)  
269 - return this.caseType[i].name 333 + if(this.caseType[i].dictValue==type)
  334 + return this.caseType[i].dictLabel
270 } 335 }
271 }, 336 },
272 /** ๆ–ฐๅขžๆŒ‰้’ฎๆ“ไฝœ */ 337 /** ๆ–ฐๅขžๆŒ‰้’ฎๆ“ไฝœ */
@@ -332,13 +397,13 @@ export default { @@ -332,13 +397,13 @@ export default {
332 this.queryParams.startTime = this.queryParams.createTime[0]; 397 this.queryParams.startTime = this.queryParams.createTime[0];
333 this.queryParams.endTime = this.queryParams.createTime[1]; 398 this.queryParams.endTime = this.queryParams.createTime[1];
334 } 399 }
335 - 400 +
336 const query = {}; 401 const query = {};
337 - 402 +
338 for(var i in this.queryParams){ 403 for(var i in this.queryParams){
339 query[i] = this.queryParams[i]; 404 query[i] = this.queryParams[i];
340 } 405 }
341 - 406 +
342 query.createTime = null; 407 query.createTime = null;
343 this.$confirm('ๆ˜ฏๅฆ็กฎ่ฎคๅฏผๅ‡บๆ‰€ๆœ‰็บฟไธ‹ไบคๅŠžๆกˆๅทๆ•ฐๆฎ้กน?', "่ญฆๅ‘Š", { 408 this.$confirm('ๆ˜ฏๅฆ็กฎ่ฎคๅฏผๅ‡บๆ‰€ๆœ‰็บฟไธ‹ไบคๅŠžๆกˆๅทๆ•ฐๆฎ้กน?', "่ญฆๅ‘Š", {
344 confirmButtonText: "็กฎๅฎš", 409 confirmButtonText: "็กฎๅฎš",
trash-ui/src/api/dayWorkReport.js
@@ -252,6 +252,9 @@ export default { @@ -252,6 +252,9 @@ export default {
252 createTime: list[i].createTime, 252 createTime: list[i].createTime,
253 selfCheckTime: list[i].selfCheckTime, 253 selfCheckTime: list[i].selfCheckTime,
254 place: list[i].place, 254 place: list[i].place,
  255 + workAreaCodeName: list[i].workAreaCodeName,
  256 + siteInvestmentTypeName: list[i].siteInvestmentTypeName,
  257 + address: list[i].address,
255 status: list[i].status, 258 status: list[i].status,
256 ename: list[i].ename, 259 ename: list[i].ename,
257 eplace: list[i].eplace, 260 eplace: list[i].eplace,
@@ -427,7 +430,8 @@ export default { @@ -427,7 +430,8 @@ export default {
427 this.queryParams.subReason = null; 430 this.queryParams.subReason = null;
428 this.queryParams.place = null; 431 this.queryParams.place = null;
429 this.queryParams.earthsitesName = null; 432 this.queryParams.earthsitesName = null;
430 - this.queryParams.name = null; 433 + this.queryParams.name = null;
  434 + this.queryParams.workAreaCodeName = null;
431 435
432 this.resetForm("queryForm"); 436 this.resetForm("queryForm");
433 }, 437 },
trash-ui/src/api/track.js
@@ -13,7 +13,7 @@ import companyInfo from &quot;@/views/activiti/task/companyInfo&quot;; @@ -13,7 +13,7 @@ import companyInfo from &quot;@/views/activiti/task/companyInfo&quot;;
13 13
14 import logisticsInfo from "@/views/office/logistics/logisticsInfo"; 14 import logisticsInfo from "@/views/office/logistics/logisticsInfo";
15 15
16 -import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"; 16 +import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
17 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo"; 17 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
18 18
19 import {historyFromDataByTime} from '@/api/activiti/historyFormdata' 19 import {historyFromDataByTime} from '@/api/activiti/historyFormdata'
trash-ui/src/api/trackTable.js
@@ -17,7 +17,7 @@ import companyInfo from &quot;@/views/activiti/task/companyInfo&quot;; @@ -17,7 +17,7 @@ import companyInfo from &quot;@/views/activiti/task/companyInfo&quot;;
17 17
18 import logisticsInfo from "@/views/office/logistics/logisticsInfo"; 18 import logisticsInfo from "@/views/office/logistics/logisticsInfo";
19 19
20 -import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"; 20 +import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
21 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo"; 21 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
22 22
23 import {historyFromDataByTime} from '@/api/activiti/historyFormdata' 23 import {historyFromDataByTime} from '@/api/activiti/historyFormdata'
trash-ui/src/api/truck_active.js
@@ -122,6 +122,9 @@ export default { @@ -122,6 +122,9 @@ export default {
122 if(arr[j].split("=")[0] == "objValue"){ 122 if(arr[j].split("=")[0] == "objValue"){
123 this.queryParams.construction = arr[j].split("=")[1]; 123 this.queryParams.construction = arr[j].split("=")[1];
124 } 124 }
  125 + if(arr[j].split("=")[0] == "siteId"){
  126 + this.queryParams.constructionId = arr[j].split("=")[1];
  127 + }
125 } 128 }
126 } 129 }
127 130
trash-ui/src/api/vio_casefile.js
@@ -8,7 +8,7 @@ import { @@ -8,7 +8,7 @@ import {
8 deleteUpCase, 8 deleteUpCase,
9 delayUpCase, 9 delayUpCase,
10 } from "@/api/casefile/violationCaseFile"; 10 } from "@/api/casefile/violationCaseFile";
11 -import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo"; 11 +import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
12 12
13 import h5Info from "@/views/h5/task/violationCaseFileInfo"; 13 import h5Info from "@/views/h5/task/violationCaseFileInfo";
14 import h5Page from "@/views/h5/Pagination"; 14 import h5Page from "@/views/h5/Pagination";
@@ -82,36 +82,7 @@ export default { @@ -82,36 +82,7 @@ export default {
82 {required: true, message: "ๅฟ…ๅกซ", trigger: "blur"} 82 {required: true, message: "ๅฟ…ๅกซ", trigger: "blur"}
83 ], 83 ],
84 }, 84 },
85 - caseType: [{code: 0, name: "่ฟ›ๅ…ฅ้žไธ“็”จ่ฝฆ่พ†"},  
86 - {code: 1, name: "ๆ— ่ฎธๅฏๆ‰‹็ปญ๏ผˆๅทฅ๏ผ‰"},  
87 - {code: 2, name: "ๆ— ่ฎธๅฏๆ‰‹็ปญ๏ผˆๆถˆ๏ผ‰"},  
88 - {code: 3, name: "้ป„ๅœŸ่ฆ†็›–ๆƒ…ๅ†ต"},  
89 - {code: 4, name: "ๅ‡บๅ…ฅๅฃ่ทฏ้ขๆฑกๆŸ“"},  
90 - {code: 5, name: "ๅ‡บๅ…ฅๅฃ้“่ทฏ็กฌๅŒ–"},  
91 - {code: 6, name: "่ฝฆ่พ†ๅ†ฒๆด—ๆ˜ฏๅฆๅˆฐไฝ"},  
92 - {code: 7, name: "้›พ็‚ฎๆœบๆ˜ฏๅฆๆญฃๅธธๅผ€ๅฏ"},  
93 - {code: 8, name: "ไฝฟ็”จ้žไธ“็”จ่ฝฆ่ฟ่พ“"},  
94 - {code: 9, name: "็›‘ๆŽง็‚นไฝๆœชๅฏนๅ‡†"},  
95 - {code: 10, name: "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš"},  
96 - {code: 11, name: "ๅทฅๅœฐ้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ"},  
97 - {code: 12, name: "ๅทฅๅœฐ้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅทฅๅœฐ"},  
98 - {code: 13, name: "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŒ‰ๆ—ถ้—ดไฝœไธš"},  
99 - {code: 14, name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš"},  
100 - {code: 15, name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ"},  
101 - {code: 16, name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅค„็†ๅœบๆ‰€"},  
102 - {code: 17, name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๅˆฐๆŒ‡ๅฎš็š„ๅค„็†ๅœบๆ‰€ไฝœไธš"},  
103 - {code: 18, name: "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ๏ผˆๅทฅ๏ผ‰"},  
104 - {code: 19, name: "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ๏ผˆๆถˆ๏ผ‰"},  
105 - {code: 20, name: "ๆœชๆฟ€ๆดป่ฝฆ่พ†ไฝœไธš"},  
106 - {code: 21, name: "ๆœชๆ ธๅ‡†ไฝœไธš่ฝฆ่พ†ไฝœไธš"},  
107 - {code: 22, name: "ๆœชๆŒ‰็บฟ่ทฏ่กŒ้ฉถ"},  
108 - {code: 23, name: "้—ฏ็ฆ่กŒ้ฉถ"},  
109 - {code: 24, name: "ๅคฑไฟก่ฝฆ่พ†ไฝœไธš"},  
110 - {code: 25, name: "ๅซๆ˜Ÿๅฎšไฝๅผ‚ๅธธ"},  
111 - {code: 26, name: "่ถ…้€Ÿๆ้†’"},  
112 - {code: 27, name: "ๅ…ถไป–3"},  
113 - {code: 28, name: "ๅ…ถไป–4"},  
114 - {code: 29, name: "ๅ…ถไป–5"}], 85 + caseType: [],
115 projectNameList: {}, 86 projectNameList: {},
116 isLoading: false, 87 isLoading: false,
117 fileEntityList: [], 88 fileEntityList: [],
@@ -166,7 +137,12 @@ export default { @@ -166,7 +137,12 @@ export default {
166 137
167 } 138 }
168 }, 139 },
169 - created() { 140 + created() {
  141 + this.listData({dictType:"vio_casefile"}).then(res=>{
  142 + this.caseType = res.rows;
  143 + });
  144 +
  145 +
170 getArea().then(res => { 146 getArea().then(res => {
171 this.areas = res.result; 147 this.areas = res.result;
172 }); 148 });
@@ -222,6 +198,37 @@ export default { @@ -222,6 +198,37 @@ export default {
222 this.getList(); 198 this.getList();
223 }, 199 },
224 methods: { 200 methods: {
  201 + getAreaName(code){
  202 + for(let i in this.areas){
  203 + if(this.areas[i].code == code){
  204 + this.form.owningRegion = this.areas[i].name;
  205 + this.form.place = this.areas[i].code ;
  206 + break;
  207 + }
  208 + }
  209 + },
  210 + getCaseStatus(item){
  211 + if(item.status == 1){
  212 + return "็ป“ๆกˆๅญ˜ๆกฃ";
  213 + }
  214 + if(!item.readBy){
  215 + return "ๆœชๅ›žๅค";
  216 + }
  217 + if(item.status1 && Number(item.status1) == 1){
  218 + return "ๅทฒๅ›žๅค";
  219 + }
  220 + if(item.status1 && Number(item.status1) > 1){
  221 + return "ๅพ…ๅฎกๆ ธ";
  222 + }
  223 + },
  224 + getCaseType(type){
  225 + for(let i in this.caseType){
  226 + if(this.caseType[i].dictValue == type){
  227 + return this.caseType[i].dictLabel;
  228 + }
  229 + }
  230 + return type;
  231 + },
225 openFunction(obj,idx){ 232 openFunction(obj,idx){
226 this.object = obj; 233 this.object = obj;
227 if(idx == 1){ 234 if(idx == 1){
@@ -233,7 +240,6 @@ export default { @@ -233,7 +240,6 @@ export default {
233 } 240 }
234 }, 241 },
235 deleteUpCase(){ 242 deleteUpCase(){
236 - debugger;  
237 if(!this.form.describe){ 243 if(!this.form.describe){
238 this.$message("่ฏทๅกซๅ†™็†็”ฑ!"); 244 this.$message("่ฏทๅกซๅ†™็†็”ฑ!");
239 return; 245 return;
@@ -593,8 +599,15 @@ export default { @@ -593,8 +599,15 @@ export default {
593 599
594 let companyName = formData.companyName ? formData.companyName : ""; 600 let companyName = formData.companyName ? formData.companyName : "";
595 let projectName = formData.projectName ? formData.projectName : ""; 601 let projectName = formData.projectName ? formData.projectName : "";
596 -  
597 - this.form.describe = code + companyName + "ๅœจ" + projectName + "ๅ‡บ็Žฐ" + formData.violationType; 602 +
  603 + for(let i in this.caseType){
  604 + if(this.caseType[i].dictValue == formData.violationType){
  605 + this.form.describe = code + companyName + "ๅœจ" + projectName + "ๅ‡บ็Žฐ" + this.caseType[i].dictLabel;
  606 + break;
  607 + }
  608 + }
  609 +
  610 +
598 this.rules.companyName = null; 611 this.rules.companyName = null;
599 this.rules.projectName = null; 612 this.rules.projectName = null;
600 } 613 }
trash-ui/src/api/vio_casefile_info.js
@@ -31,10 +31,20 @@ export default { @@ -31,10 +31,20 @@ export default {
31 } 31 }
32 }, 32 },
33 created() { 33 created() {
34 - 34 + this.listData({dictType:"vio_casefile"}).then(res=>{
  35 + this.caseType = res.rows;
  36 + });
35 this.init(); 37 this.init();
36 }, 38 },
37 methods: { 39 methods: {
  40 + getCaseType(type){
  41 + for(let i in this.caseType){
  42 + if(this.caseType[i].dictValue == type){
  43 + return this.caseType[i].dictLabel;
  44 + }
  45 + }
  46 + return type;
  47 + },
38 submit(){ 48 submit(){
39 let postData = {}; 49 let postData = {};
40 50
@@ -42,13 +52,13 @@ export default { @@ -42,13 +52,13 @@ export default {
42 postData.replyImg = this.form.replyImg + ""; 52 postData.replyImg = this.form.replyImg + "";
43 postData.reply = this.form.reply; 53 postData.reply = this.form.reply;
44 54
45 - 55 +
46 addReplyApprovalProcess(postData).then(res => { 56 addReplyApprovalProcess(postData).then(res => {
47 this.videoSrc1 = []; 57 this.videoSrc1 = [];
48 this.slides1 = []; 58 this.slides1 = [];
49 - 59 +
50 updateViolationCaseFile({id: this.form.id,status:1}).then(res => { 60 updateViolationCaseFile({id: this.form.id,status:1}).then(res => {
51 - 61 +
52 }) 62 })
53 }); 63 });
54 }, 64 },
@@ -66,16 +76,16 @@ export default { @@ -66,16 +76,16 @@ export default {
66 let files = JSON.stringify(response.data.uploadFiles); 76 let files = JSON.stringify(response.data.uploadFiles);
67 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name")); 77 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
68 this.fileEntityList.map(item => { 78 this.fileEntityList.map(item => {
69 -  
70 - 79 +
  80 +
71 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1) { 81 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1) {
72 if(item.url.startsWith("https:")){ 82 if(item.url.startsWith("https:")){
73 this.slide1.push(item.url); 83 this.slide1.push(item.url);
74 }else{ 84 }else{
75 this.slide1.push(process.env.VUE_APP_BASE_API + item.url); 85 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
76 } 86 }
77 -  
78 - 87 +
  88 +
79 } 89 }
80 if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) { 90 if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) {
81 if(item.url.startsWith("https:")){ 91 if(item.url.startsWith("https:")){
trash-ui/src/api/vio_warning_info.js
@@ -35,6 +35,14 @@ export default { @@ -35,6 +35,14 @@ export default {
35 this.init(); 35 this.init();
36 }, 36 },
37 methods: { 37 methods: {
  38 + getCaseType(type){
  39 + for(let i in this.caseType){
  40 + if(this.caseType[i].dictValue == type){
  41 + return this.caseType[i].dictLabel;
  42 + }
  43 + }
  44 + return type;
  45 + },
38 init() { 46 init() {
39 let id = this.idInfo.split(":"); 47 let id = this.idInfo.split(":");
40 48
trash-ui/src/api/warningInfo.js
@@ -7,12 +7,13 @@ import { @@ -7,12 +7,13 @@ import {
7 exportViolationWarningInformation 7 exportViolationWarningInformation
8 } from "@/api/casefile/violationWarningInformation"; 8 } from "@/api/casefile/violationWarningInformation";
9 9
10 -import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo"; 10 +import violationWarningInformationInfo from "@/views/h5/task/violationWarningInformationInfo";
11 11
12 12
13 import h5Page from '@/views/h5/Pagination'; 13 import h5Page from '@/views/h5/Pagination';
14 import h5Info from "@/views/h5/task/violationWarningInformationInfo"; 14 import h5Info from "@/views/h5/task/violationWarningInformationInfo";
15 15
  16 +import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
16 17
17 import { 18 import {
18 earthsitesList, 19 earthsitesList,
@@ -104,74 +105,8 @@ export default { @@ -104,74 +105,8 @@ export default {
104 trigger: "blur" 105 trigger: "blur"
105 }], 106 }],
106 }, 107 },
107 - caseType: [{  
108 - code: 0,  
109 - name: "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš"  
110 - },  
111 - {  
112 - code: 1,  
113 - name: "ๅทฅๅœฐ้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ"  
114 - },  
115 - {  
116 - code: 2,  
117 - name: "ๅทฅๅœฐ้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅทฅๅœฐ"  
118 - },  
119 - {  
120 - code: 3,  
121 - name: "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŒ‰ๆ—ถ้—ดไฝœไธš"  
122 - },  
123 - {  
124 - code: 4,  
125 - name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš"  
126 - },  
127 - {  
128 - code: 5,  
129 - name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ"  
130 - },  
131 - {  
132 - code: 6,  
133 - name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅค„็†ๅœบๆ‰€"  
134 - },  
135 - {  
136 - code: 7,  
137 - name: "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๅˆฐๆŒ‡ๅฎš็š„ๅค„็†ๅœบๆ‰€ไฝœไธš"  
138 - },  
139 - {  
140 - code: 8,  
141 - name: "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๅทฅ)"  
142 - },  
143 - {  
144 - code: 9,  
145 - name: "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๆถˆ)"  
146 - },  
147 - {  
148 - code: 10,  
149 - name: "ๆœชๆฟ€ๆดป่ฝฆ่พ†ไฝœไธš"  
150 - },  
151 - {  
152 - code: 11,  
153 - name: "ๆœชๆ ธๅ‡†ไฝœไธš่ฝฆ่พ†ไฝœไธš"  
154 - },  
155 - {  
156 - code: 12,  
157 - name: "ๆœชๆŒ‰็บฟ่ทฏ่กŒ้ฉถ"  
158 - },  
159 - {  
160 - code: 13,  
161 - name: "้—ฏ็ฆ่กŒ้ฉถ"  
162 - },  
163 - {  
164 - code: 14,  
165 - name: "ๅคฑไฟก่ฝฆ่พ†ไฝœไธš"  
166 - },  
167 - {  
168 - code: 15,  
169 - name: "ๅซๆ˜Ÿๅฎšไฝๅผ‚ๅธธ"  
170 - },  
171 - {  
172 - code: 16,  
173 - name: "่ถ…้€Ÿๆ้†’"  
174 - } 108 + caseType: [
  109 +
175 ], 110 ],
176 projectNameList: {}, 111 projectNameList: {},
177 isLoading: false, 112 isLoading: false,
@@ -217,7 +152,11 @@ export default { @@ -217,7 +152,11 @@ export default {
217 152
218 } 153 }
219 }, 154 },
220 - created() { 155 + created() {
  156 + this.listData({dictType:"vio_warning"}).then(res=>{
  157 + this.caseType = res.rows;
  158 + });
  159 +
221 getAreaList().then(res => { 160 getAreaList().then(res => {
222 this.areas = res.data; 161 this.areas = res.data;
223 }); 162 });
@@ -236,7 +175,7 @@ export default { @@ -236,7 +175,7 @@ export default {
236 getCompanyList(this.remoteQueryData).then(res => { 175 getCompanyList(this.remoteQueryData).then(res => {
237 this.companyList = res.data; 176 this.companyList = res.data;
238 }); 177 });
239 - debugger; 178 +
240 if(window.location.search){ 179 if(window.location.search){
241 let params = window.location.search.replace("?",""); 180 let params = window.location.search.replace("?","");
242 let arr = params.split("&"); 181 let arr = params.split("&");
@@ -271,12 +210,41 @@ export default { @@ -271,12 +210,41 @@ export default {
271 210
272 this.getList(); 211 this.getList();
273 }, 212 },
274 - methods: { 213 + methods: {
  214 + getCaseStatus(item){
  215 + if(item.status == 1){
  216 + return "็ป“ๆกˆๅญ˜ๆกฃ";
  217 + }
  218 + if(!item.readBy){
  219 + return "ๆœชๅ›žๅค";
  220 + }
  221 + if(item.status1 && Number(item.status1) == 1){
  222 + return "ๅทฒๅ›žๅค";
  223 + }
  224 + if(item.status1 && Number(item.status1) > 1){
  225 + return "ๅพ…ๅฎกๆ ธ";
  226 + }
  227 + },
  228 + getAreaName(code){
  229 + for(let i in this.areas){
  230 + if(this.areas[i].code == code){
  231 + this.form.owningRegion = this.areas[i].name;
  232 + this.form.place = this.areas[i].code ;
  233 + break;
  234 + }
  235 + }
  236 + },
275 selectArea(item) { 237 selectArea(item) {
276 -  
277 this.form.owningRegion = item.name; 238 this.form.owningRegion = item.name;
278 -  
279 - }, 239 + },
  240 + getCaseType(type){
  241 + for(let i in this.caseType){
  242 + if(this.caseType[i].dictValue == type){
  243 + return this.caseType[i].dictLabel;
  244 + }
  245 + }
  246 + return type;
  247 + },
280 /** ๆŸฅ่ฏข่ฟ่ง„้ข„่ญฆไฟกๆฏๅˆ—่กจ */ 248 /** ๆŸฅ่ฏข่ฟ่ง„้ข„่ญฆไฟกๆฏๅˆ—่กจ */
281 getList() { 249 getList() {
282 this.loading = true; 250 this.loading = true;
@@ -628,9 +596,14 @@ export default { @@ -628,9 +596,14 @@ export default {
628 596
629 let companyName = formData.companyName ? formData.companyName : ""; 597 let companyName = formData.companyName ? formData.companyName : "";
630 let projectName = formData.projectName ? formData.projectName : ""; 598 let projectName = formData.projectName ? formData.projectName : "";
631 -  
632 - this.form.describe = code + companyName + "ๅœจ" + projectName + "ๅ‡บ็Žฐ" + formData.violationType;  
633 - 599 +
  600 + for(let i in this.caseType){
  601 + if(this.caseType[i].dictValue == formData.violationType){
  602 + this.form.describe = code + companyName + "ๅœจ" + projectName + "ๅ‡บ็Žฐ" + this.caseType[i].dictLabel;
  603 + break;
  604 + }
  605 + }
  606 +
634 this.rules.companyName = null; 607 this.rules.companyName = null;
635 this.rules.projectName = null; 608 this.rules.projectName = null;
636 } 609 }
trash-ui/src/layout/index.vue
1 <template> 1 <template>
2 <div :class="classObj" class="app-wrapper"> 2 <div :class="classObj" class="app-wrapper">
3 - <sidebar class="sidebar-container" />  
4 - <div :class="{ hasTagsView: false }" class="main-container">  
5 - <tags-view v-if="needTagsView" />  
6 <app-main /> 3 <app-main />
7 -  
8 - </div>  
9 </div> 4 </div>
10 </template> 5 </template>
11 6
@@ -146,4 +141,3 @@ export default { @@ -146,4 +141,3 @@ export default {
146 width: 100%; 141 width: 100%;
147 } 142 }
148 </style> 143 </style>
149 -  
trash-ui/src/layout/inde3x.vue renamed to trash-ui/src/layout/index3.vue
trash-ui/src/main.js
@@ -17,7 +17,8 @@ import permission from &#39;./directive/permission&#39; @@ -17,7 +17,8 @@ import permission from &#39;./directive/permission&#39;
17 17
18 import './assets/icons' // icon 18 import './assets/icons' // icon
19 import './permission' // permission control 19 import './permission' // permission control
20 -import { getDicts } from "@/api/system/dict/data"; 20 +import { getDicts,listData } from "@/api/system/dict/data";
  21 +
21 import { checkPermi } from "@/utils/permission"; 22 import { checkPermi } from "@/utils/permission";
22 import { getConfigKey } from "@/api/system/config"; 23 import { getConfigKey } from "@/api/system/config";
23 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree,parseStatus } from "@/utils/trash"; 24 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree,parseStatus } from "@/utils/trash";
@@ -27,6 +28,7 @@ import RightToolbar from &quot;@/components/RightToolbar&quot; @@ -27,6 +28,7 @@ import RightToolbar from &quot;@/components/RightToolbar&quot;
27 28
28 // ๅ…จๅฑ€ๆ–นๆณ•ๆŒ‚่ฝฝ 29 // ๅ…จๅฑ€ๆ–นๆณ•ๆŒ‚่ฝฝ
29 Vue.prototype.getDicts = getDicts 30 Vue.prototype.getDicts = getDicts
  31 +Vue.prototype.listData = listData
30 Vue.prototype.getConfigKey = getConfigKey 32 Vue.prototype.getConfigKey = getConfigKey
31 Vue.prototype.parseTime = parseTime 33 Vue.prototype.parseTime = parseTime
32 Vue.prototype.resetForm = resetForm 34 Vue.prototype.resetForm = resetForm
trash-ui/src/views/activiti/task/index.vue
@@ -654,8 +654,8 @@ @@ -654,8 +654,8 @@
654 import logisticsInfo from "@/views/office/logistics/logisticsInfo"; 654 import logisticsInfo from "@/views/office/logistics/logisticsInfo";
655 import handleInfo from "@/views/office/handle/handleInfo"; 655 import handleInfo from "@/views/office/handle/handleInfo";
656 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo"; 656 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
657 - import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";  
658 - import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo"; 657 + import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
  658 + import violationWarningInformationInfo from "@/views/h5/task/violationWarningInformationInfo";
659 import supervisionInfo from "@/views/activiti/task/SupervisionInfo"; 659 import supervisionInfo from "@/views/activiti/task/SupervisionInfo";
660 import companyInfo from "@/views/activiti/task/companyInfo"; 660 import companyInfo from "@/views/activiti/task/companyInfo";
661 import driverInfo from "@/views/activiti/task/driverInfo"; 661 import driverInfo from "@/views/activiti/task/driverInfo";
trash-ui/src/views/activiti/taskhistory/index.vue
@@ -192,8 +192,8 @@ import contractInfo from &quot;@/views/activiti/task/contractInfo&quot;; @@ -192,8 +192,8 @@ import contractInfo from &quot;@/views/activiti/task/contractInfo&quot;;
192 import logisticsInfo from "@/views/office/logistics/logisticsInfo"; 192 import logisticsInfo from "@/views/office/logistics/logisticsInfo";
193 import handleInfo from "@/views/office/handle/handleInfo"; 193 import handleInfo from "@/views/office/handle/handleInfo";
194 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo"; 194 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
195 -import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";  
196 -import violationWarningInformationInfo from "@/views/casefile/violationWarningInformation/violationWarningInformationInfo"; 195 +import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
  196 +import violationWarningInformationInfo from "@/views/h5/task/violationWarningInformationInfo";
197 import supervisionInfo from "../task/SupervisionInfo"; 197 import supervisionInfo from "../task/SupervisionInfo";
198 198
199 import companyInfo from "@/views/activiti/task/companyInfo"; 199 import companyInfo from "@/views/activiti/task/companyInfo";
trash-ui/src/views/business/dayWorkReport/index.vue
@@ -46,15 +46,24 @@ @@ -46,15 +46,24 @@
46 <el-option v-for="item in enames" :label="item" :value="item" /> 46 <el-option v-for="item in enames" :label="item" :value="item" />
47 </el-select> 47 </el-select>
48 </el-form-item> 48 </el-form-item>
49 - </el-col>  
50 - <el-col :span="6"> 49 + </el-col>
  50 +
  51 + <el-col :span="4">
  52 + <el-form-item label="ไฝœไธšๅŒบๅŸŸ" >
  53 + <el-select v-model="queryParams.workAreaCodeName" placeholder="ไฝœไธšๅŒบๅŸŸ " size="small">
  54 + <el-option label="ไธญๅฟƒๅŒบๅŸŸ" value="ไธญๅฟƒๅŒบๅŸŸ" />
  55 + <el-option label="ๅค–็ŽฏๅŒบๅŸŸ" value="ๅค–็ŽฏๅŒบๅŸŸ" />
  56 + </el-select>
  57 + </el-form-item>
  58 + </el-col>
  59 + <el-col :span="4">
51 <el-form-item label="ๅทฅๅœฐๅŒบๅฑž" > 60 <el-form-item label="ๅทฅๅœฐๅŒบๅฑž" >
52 <el-select v-model="queryParams.place" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small"> 61 <el-select v-model="queryParams.place" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small">
53 <el-option v-for="item in areas" :label="item.name" :value="item.code" /> 62 <el-option v-for="item in areas" :label="item.name" :value="item.code" />
54 </el-select> 63 </el-select>
55 </el-form-item> 64 </el-form-item>
56 </el-col> 65 </el-col>
57 - <el-col :span="6"> 66 + <el-col :span="4">
58 <el-form-item label="ๅค„็†ๅœบๆ‰€ๅŒบๅฑž" > 67 <el-form-item label="ๅค„็†ๅœบๆ‰€ๅŒบๅฑž" >
59 <el-select v-model="queryParams.subReason" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small"> 68 <el-select v-model="queryParams.subReason" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small">
60 <el-option v-for="item in areas" :label="item.name" :value="item.name" /> 69 <el-option v-for="item in areas" :label="item.name" :value="item.name" />
@@ -63,7 +72,7 @@ @@ -63,7 +72,7 @@
63 </el-col> 72 </el-col>
64 </el-row> 73 </el-row>
65 <el-row v-if="this.queryParams.his > 1"> 74 <el-row v-if="this.queryParams.his > 1">
66 - <el-col :span="6"> 75 + <el-col :span="4">
67 <el-form-item label="ๅ็งฐ" > 76 <el-form-item label="ๅ็งฐ" >
68 <!-- <el-input v-model="queryParams.name" placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" size="small" /> --> 77 <!-- <el-input v-model="queryParams.name" placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" size="small" /> -->
69 78
@@ -73,12 +82,21 @@ @@ -73,12 +82,21 @@
73 </el-form-item> 82 </el-form-item>
74 </el-col> 83 </el-col>
75 84
76 - <el-col :span="6"> 85 + <el-col :span="4">
77 <el-form-item label="ๅŒบๅฑž" > 86 <el-form-item label="ๅŒบๅฑž" >
78 <el-select v-model="queryParams.place" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small"> 87 <el-select v-model="queryParams.place" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small">
79 <el-option v-for="item in areas" :label="item.name" :value="item.code" /> 88 <el-option v-for="item in areas" :label="item.name" :value="item.code" />
80 </el-select> 89 </el-select>
81 </el-form-item> 90 </el-form-item>
  91 +
  92 + </el-col>
  93 + <el-col :span="4" v-if="this.queryParams.his == 2">
  94 + <el-form-item label="ไฝœไธšๅŒบๅŸŸ" >
  95 + <el-select v-model="queryParams.workAreaCodeName" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small">
  96 + <el-option label="ไธญๅฟƒๅŒบๅŸŸ" value="ไธญๅฟƒๅŒบๅŸŸ" />
  97 + <el-option label="ๅค–็ŽฏๅŒบๅŸŸ" value="ๅค–็ŽฏๅŒบๅŸŸ" />
  98 + </el-select>
  99 + </el-form-item>
82 </el-col> 100 </el-col>
83 </el-row> 101 </el-row>
84 <el-row> 102 <el-row>
@@ -126,8 +144,9 @@ @@ -126,8 +144,9 @@
126 144
127 </el-table-column> 145 </el-table-column>
128 <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="place" /> 146 <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="place" />
  147 + <el-table-column label="ไฝœไธšๅŒบๅŸŸ" align="center" prop="workAreaCodeName" />
129 <el-table-column label="ๅทฅๅœฐๆŠฅๅทฅ" align="center" prop="status" /> 148 <el-table-column label="ๅทฅๅœฐๆŠฅๅทฅ" align="center" prop="status" />
130 - <el-table-column label="็”ณ่ฏทๆŠฅๅทฅๆ—ถ้—ด" align="center" prop="selfCheckTime" width="180"/> 149 + <el-table-column label="ๅทกๆŸฅ้€š่ฟ‡ๆ—ถ้—ด" align="center" prop="selfCheckTime" width="180"/>
131 <el-table-column label="ๅค„็†ๅœบๆ‰€ๅ็งฐ" align="center" prop="ename" > 150 <el-table-column label="ๅค„็†ๅœบๆ‰€ๅ็งฐ" align="center" prop="ename" >
132 <template slot-scope="scope"> 151 <template slot-scope="scope">
133 <a @click="getInfo(scope.row,1);">{{ scope.row.ename}}</a> 152 <a @click="getInfo(scope.row,1);">{{ scope.row.ename}}</a>
@@ -136,7 +155,7 @@ @@ -136,7 +155,7 @@
136 </el-table-column> 155 </el-table-column>
137 <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="eplace" /> 156 <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="eplace" />
138 <el-table-column label="ๅค„็†ๅœบๆ‰€ๆŠฅๅทฅ" align="center" prop="estatus" /> 157 <el-table-column label="ๅค„็†ๅœบๆ‰€ๆŠฅๅทฅ" align="center" prop="estatus" />
139 - <el-table-column label="็”ณ่ฏทๆŠฅๅทฅๆ—ถ้—ด" align="center" prop="eselfCheckTime" width="180"/> 158 + <el-table-column label="ๅทกๆŸฅ้€š่ฟ‡ๆ—ถ้—ด" align="center" prop="eselfCheckTime" width="180"/>
140 <el-table-column label="ๅค‡ๆณจ" align="center" prop="descript"/> 159 <el-table-column label="ๅค‡ๆณจ" align="center" prop="descript"/>
141 </el-table> 160 </el-table>
142 161
@@ -152,7 +171,8 @@ @@ -152,7 +171,8 @@
152 171
153 <el-table-column label="็ฎก่พ–ๅŒบ" align="center" prop="place"> 172 <el-table-column label="็ฎก่พ–ๅŒบ" align="center" prop="place">
154 </el-table-column> 173 </el-table-column>
155 - 174 + <el-table-column label="ไฝœไธšๅŒบๅŸŸ" align="center" prop="workAreaCodeName" v-show="queryParams.his == 2 ">
  175 + </el-table-column>
156 <el-table-column label="่‡ชๆŸฅๆ—ถ้—ด" align="center" prop="selfCheckTime" width="180"> 176 <el-table-column label="่‡ชๆŸฅๆ—ถ้—ด" align="center" prop="selfCheckTime" width="180">
157 <template slot-scope="scope"> 177 <template slot-scope="scope">
158 <span>{{scope.row.selfCheckTime}}</span> 178 <span>{{scope.row.selfCheckTime}}</span>
trash-ui/src/views/business/threeHistory/index.vue
@@ -15,6 +15,12 @@ @@ -15,6 +15,12 @@
15 <el-option v-for="item in areas" :label="item.name" :value="item.name" /> 15 <el-option v-for="item in areas" :label="item.name" :value="item.name" />
16 </el-select> 16 </el-select>
17 </el-form-item> 17 </el-form-item>
  18 + <el-form-item label="ไฝœไธšๅŒบๅŸŸ" v-if="this.type==0">
  19 + <el-select v-model="queryParams.workAreaCodeName" placeholder="ๅทฅๅœฐๆ‰€ๅฑžๅŒบๅŸŸ " size="small">
  20 + <el-option label="ไธญๅฟƒๅŒบๅŸŸ" value="ไธญๅฟƒๅŒบๅŸŸ" />
  21 + <el-option label="ๅค–็ŽฏๅŒบๅŸŸ" value="ๅค–็ŽฏๅŒบๅŸŸ" />
  22 + </el-select>
  23 + </el-form-item>
18 <el-form-item> 24 <el-form-item>
19 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button> 25 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button>
20 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">้‡็ฝฎ</el-button> 26 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">้‡็ฝฎ</el-button>
@@ -53,7 +59,8 @@ @@ -53,7 +59,8 @@
53 <el-table-column label="ๅบๅท" align="center" type="index" /> 59 <el-table-column label="ๅบๅท" align="center" type="index" />
54 <el-table-column :label="pageLabel" align="center" prop="name" /> 60 <el-table-column :label="pageLabel" align="center" prop="name" />
55 <el-table-column :label="pageType" align="center" prop="projectType" /> 61 <el-table-column :label="pageType" align="center" prop="projectType" />
56 - <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="place" /> 62 + <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="place" />
  63 + <el-table-column label="ไฝœไธšๅŒบๅŸŸ" align="center" prop="workAreaCodeName" v-if="this.type==0"/>
57 <el-table-column label="ๆ“ไฝœๆ—ถ้—ด" align="center" prop="createTime" /> 64 <el-table-column label="ๆ“ไฝœๆ—ถ้—ด" align="center" prop="createTime" />
58 <el-table-column label="ๆ“ไฝœไบบ" align="center" prop="createBy" /> 65 <el-table-column label="ๆ“ไฝœไบบ" align="center" prop="createBy" />
59 <el-table-column label="็Šถๆ€" align="center" prop="status"> 66 <el-table-column label="็Šถๆ€" align="center" prop="status">
@@ -210,6 +217,7 @@ export default { @@ -210,6 +217,7 @@ export default {
210 this.threeHistoryList = response.rows; 217 this.threeHistoryList = response.rows;
211 this.total = response.total; 218 this.total = response.total;
212 this.loading = false; 219 this.loading = false;
  220 + this.$forceUpdate();
213 }); 221 });
214 }, 222 },
215 // ๅ–ๆถˆๆŒ‰้’ฎ 223 // ๅ–ๆถˆๆŒ‰้’ฎ
trash-ui/src/views/business/threestep/index.vue
@@ -190,7 +190,8 @@ @@ -190,7 +190,8 @@
190 <el-input v-model="form.img0" type="hidden"></el-input> 190 <el-input v-model="form.img0" type="hidden"></el-input>
191 <p v-for="(img,index) in form.img0">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(0,img)" style="color:red"> x</a></p> 191 <p v-for="(img,index) in form.img0">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(0,img)" style="color:red"> x</a></p>
192 </el-col> 192 </el-col>
193 - <el-col :span="6"> 193 + <el-col :span="6">
  194 + <span style="color: red;">*</span>
194 <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">ๆด—่ฝฆๅนณๅฐ็…ง็‰‡</a> 195 <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">ๆด—่ฝฆๅนณๅฐ็…ง็‰‡</a>
195 <br/> 196 <br/>
196 <el-image v-for="item in slides[1]" 197 <el-image v-for="item in slides[1]"
trash-ui/src/views/caseOffline/caseOffline/index.vue
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type"> 4 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type">
5 <el-select v-model="queryParams.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹" size="small"> 5 <el-select v-model="queryParams.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹" size="small">
6 - <el-option v-for="item in caseType" :label="item.name" :value="item.code"/> 6 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue"/>
7 </el-select> 7 </el-select>
8 </el-form-item> 8 </el-form-item>
9 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place"> 9 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place">
@@ -17,6 +17,14 @@ @@ -17,6 +17,14 @@
17 value-format="yyyy-MM-dd HH:mm:ss" 17 value-format="yyyy-MM-dd HH:mm:ss"
18 end-placeholder="็ป“ๆŸๆ—ฅๆœŸ"> 18 end-placeholder="็ป“ๆŸๆ—ฅๆœŸ">
19 </el-date-picker> 19 </el-date-picker>
  20 + </el-form-item>
  21 + <el-form-item label="็Šถๆ€" prop="status1">
  22 + <el-select v-model="queryParams.status1" placeholder="็Šถๆ€" size="small">
  23 + <el-option label="ๆœชๅ›žๅค" value="0"/>
  24 + <el-option label="ๅทฒๅ›žๅค" value="1"/>
  25 + <el-option label="ๅฎกๆ ธไธญ" value="2"/>
  26 + <el-option label="็ป“ๆกˆๅญ˜ๆกฃ" value="3"/>
  27 + </el-select>
20 </el-form-item> 28 </el-form-item>
21 <el-form-item> 29 <el-form-item>
22 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button> 30 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button>
@@ -54,7 +62,14 @@ @@ -54,7 +62,14 @@
54 <el-table-column label="ๆกˆๅท็ฑปๅž‹" align="center" prop="type"/> 62 <el-table-column label="ๆกˆๅท็ฑปๅž‹" align="center" prop="type"/>
55 <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="place"/> 63 <el-table-column label="ๆ‰€ๅฑžๅŒบๅŸŸ" align="center" prop="place"/>
56 <el-table-column label="ๆ—ถ้—ด" align="center" prop="createTime" width="180"> 64 <el-table-column label="ๆ—ถ้—ด" align="center" prop="createTime" width="180">
57 - </el-table-column> 65 + </el-table-column>
  66 +
  67 + <el-table-column label="็Šถๆ€" align="center">
  68 + <template slot-scope="scope">
  69 + <span>{{getStatus(scope.row)}}</span>
  70 + </template>
  71 + </el-table-column>
  72 +
58 <el-table-column label="ๆ“ไฝœ" align="center" class-name="small-padding fixed-width"> 73 <el-table-column label="ๆ“ไฝœ" align="center" class-name="small-padding fixed-width">
59 <template slot-scope="scope"> 74 <template slot-scope="scope">
60 <el-button 75 <el-button
@@ -81,7 +96,7 @@ @@ -81,7 +96,7 @@
81 <el-form ref="form" :model="form" :rules="rules" label-width="80px"> 96 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
82 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type"> 97 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type">
83 <el-select v-model="form.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹"> 98 <el-select v-model="form.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹">
84 - <el-option v-for="item in caseType" :label="item.name" :value="item.code"/> 99 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue"/>
85 </el-select> 100 </el-select>
86 </el-form-item> 101 </el-form-item>
87 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place"> 102 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place">
@@ -93,13 +108,14 @@ @@ -93,13 +108,14 @@
93 <el-select v-model="form.siteType" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹"> 108 <el-select v-model="form.siteType" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹">
94 <el-option label="ๅทฅๅœฐ" value="0"/> 109 <el-option label="ๅทฅๅœฐ" value="0"/>
95 <el-option label="ๅค„็†ๅœบๆ‰€" value="1"/> 110 <el-option label="ๅค„็†ๅœบๆ‰€" value="1"/>
  111 + <el-option label="่ฝฆ่พ†" value="2"/>
96 </el-select> 112 </el-select>
97 </el-form-item> 113 </el-form-item>
98 - <el-form-item :label="form.siteType==0?'ๅทฅๅœฐๅ็งฐ':'ๅค„็†ๅœบๆ‰€ๅ็งฐ'" prop="siteName"> 114 + <el-form-item :label="form.siteType==0?'ๅทฅๅœฐๅ็งฐ':form.siteType==1?'ๅค„็†ๅœบๆ‰€ๅ็งฐ':'่ฝฆ็‰Œๅท'" prop="siteName">
99 <el-select 115 <el-select
100 :popper-append-to-body="false" class="product-style" 116 :popper-append-to-body="false" class="product-style"
101 v-model="form.siteName" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹" 117 v-model="form.siteName" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹"
102 - allow-create filterable @change="getSite"> 118 + allow-create filterable :filter-method="getSite">
103 <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" :title="item.name"/> 119 <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" :title="item.name"/>
104 </el-select> 120 </el-select>
105 </el-form-item> 121 </el-form-item>
trash-ui/src/views/casefile/violationCaseFile/index.vue
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 </el-form-item> 10 </el-form-item>
11 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType"> 11 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
12 <el-select v-model="queryParams.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" size="small"> 12 <el-select v-model="queryParams.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" size="small">
13 - <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> 13 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
14 </el-select> 14 </el-select>
15 </el-form-item> 15 </el-form-item>
16 16
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 </el-form-item> 33 </el-form-item>
34 34
35 <el-form-item label="ๆ—ฅๆœŸ" prop="createTime"> 35 <el-form-item label="ๆ—ฅๆœŸ" prop="createTime">
36 - <el-date-picker size="small" 36 + <el-date-picker size="small"
37 v-model="queryParams.createTime" type="datetimerange" 37 v-model="queryParams.createTime" type="datetimerange"
38 start-placeholder="ๅผ€ๅง‹ๆ—ฅๆœŸ" 38 start-placeholder="ๅผ€ๅง‹ๆ—ฅๆœŸ"
39 value-format="yyyy-MM-dd HH:mm:ss" 39 value-format="yyyy-MM-dd HH:mm:ss"
@@ -45,6 +45,14 @@ @@ -45,6 +45,14 @@
45 <el-option label="ๅนณๅฐๆ•ฐๆฎ" value="0" /> 45 <el-option label="ๅนณๅฐๆ•ฐๆฎ" value="0" />
46 <el-option label="็ปผ็ฎกๆ•ฐๆฎ" value="1" /> 46 <el-option label="็ปผ็ฎกๆ•ฐๆฎ" value="1" />
47 </el-select> 47 </el-select>
  48 + </el-form-item>
  49 + <el-form-item label="็Šถๆ€" prop="status1">
  50 + <el-select v-model="queryParams.status1" placeholder="็Šถๆ€" size="small">
  51 + <el-option label="ๆœชๅ›žๅค" value="0"/>
  52 + <el-option label="ๅทฒๅ›žๅค" value="1"/>
  53 + <el-option label="ๅฎกๆ ธไธญ" value="2"/>
  54 + <el-option label="็ป“ๆกˆๅญ˜ๆกฃ" value="3"/>
  55 + </el-select>
48 </el-form-item> 56 </el-form-item>
49 <el-form-item> 57 <el-form-item>
50 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button> 58 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button>
@@ -98,9 +106,19 @@ @@ -98,9 +106,19 @@
98 <span>{{scope.row.violationObjectType == 0 ? "ๅทฅๅœฐ" :scope.row.violationObjectType == 1 ?"ๅค„็†ๅœบๆ‰€":"ไผไธš"}}</span> 106 <span>{{scope.row.violationObjectType == 0 ? "ๅทฅๅœฐ" :scope.row.violationObjectType == 1 ?"ๅค„็†ๅœบๆ‰€":"ไผไธš"}}</span>
99 </template> 107 </template>
100 </el-table-column> 108 </el-table-column>
101 - <el-table-column label="่ฟ่ง„็ฑปๅž‹" align="center" prop="violationType" /> 109 + <el-table-column label="่ฟ่ง„็ฑปๅž‹" align="center" prop="violationType">
  110 + <template slot-scope="scope">
  111 + <span>{{getCaseType(scope.row.violationType)}}</span>
  112 + </template>
  113 +
  114 + </el-table-column>
102 <el-table-column label="ๆ—ฅๆœŸ" align="center" prop="createTime"> 115 <el-table-column label="ๆ—ฅๆœŸ" align="center" prop="createTime">
103 - </el-table-column> 116 + </el-table-column>
  117 + <el-table-column label="็Šถๆ€" align="center" prop="status1">
  118 + <template slot-scope="scope">
  119 + <span>{{getCaseStatus(scope.row)}}</span>
  120 + </template>
  121 + </el-table-column>
104 <el-table-column label="ๆ“ไฝœ" align="center" class-name="small-padding fixed-width"> 122 <el-table-column label="ๆ“ไฝœ" align="center" class-name="small-padding fixed-width">
105 <template slot-scope="scope"> 123 <template slot-scope="scope">
106 <el-button 124 <el-button
@@ -211,7 +229,7 @@ @@ -211,7 +229,7 @@
211 <el-col :span="11"> 229 <el-col :span="11">
212 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType"> 230 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
213 <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;"> 231 <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;">
214 - <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> 232 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
215 </el-select> 233 </el-select>
216 </el-form-item> 234 </el-form-item>
217 </el-col> 235 </el-col>
@@ -232,7 +250,9 @@ @@ -232,7 +250,9 @@
232 :filterable="true" 250 :filterable="true"
233 :loading="isLoading" placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" style="width: 100%;" 251 :loading="isLoading" placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" style="width: 100%;"
234 :filter-method="getRemoteDate"> 252 :filter-method="getRemoteDate">
235 - <el-option v-for="item in projectNameList[form.violationObjectType]" :key="item.name" :label="item.name" :value="item.name" :title="item.name"></el-option> 253 + <el-option v-for="item in projectNameList[form.violationObjectType]"
  254 + :key="item.name" :label="item.name" :value="item.name" :title="item.name"
  255 + @click.native="getAreaName(item.areaCode)"></el-option>
236 </el-select> 256 </el-select>
237 </el-form-item> 257 </el-form-item>
238 </el-col> 258 </el-col>
trash-ui/src/views/casefile/violationCaseFile/violationCaseFileInfo.vue deleted 100644 โ†’ 0
1 -<template>  
2 - <el-form ref="form" :model="form" label-width="115px">  
3 - <el-row :gutter="2">  
4 - <el-col :span="11">  
5 - <el-form-item label="ๆกˆๅท็ผ–ๅท" prop="number">  
6 - <el-input v-model="form.number" placeholder="่ฏท่พ“ๅ…ฅๆกˆๅท็ผ–ๅท" :disabled="true"/>  
7 - </el-form-item>  
8 - </el-col>  
9 - <el-col :span="11">  
10 - <el-form-item label="่ฟ่ง„ๅฏน่ฑก็ฑปๅž‹" prop="violationObjectType">  
11 - <el-select v-model="form.violationObjectType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„ๅฏน่ฑก็ฑปๅž‹" style="width: 100%;"  
12 - :disabled="true">  
13 - <el-option label="ๅทฅๅœฐ" value="0"/>  
14 - <el-option label="ๅค„็†ๅœบๆ‰€" value="1"/>  
15 - <el-option label="ไผไธš" value="2"/>  
16 - </el-select>  
17 - </el-form-item>  
18 - </el-col>  
19 - </el-row>  
20 - <el-row :gutter="2">  
21 - <el-col :span="11">  
22 - <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="owningRegion">  
23 - <el-select v-model="form.owningRegion" placeholder="่ฏท่พ“ๅ…ฅๆ‰€ๅฑžๅŒบๅŸŸ" style="width: 100%;" :disabled="true">  
24 - <el-option label="ๅŒบๅŸŸ1" value="ๅŒบๅŸŸ1"/>  
25 - <el-option label="ๅŒบๅŸŸ2" value="ๅŒบๅŸŸ2"/>  
26 - </el-select>  
27 - </el-form-item>  
28 - </el-col>  
29 - <el-col :span="11">  
30 - <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">  
31 - <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;" :disabled="true">  
32 - <el-option label="่ฟ่ง„1" value="่ฟ่ง„1"/>  
33 - <el-option label="่ฟ่ง„2" value="่ฟ่ง„2"/>  
34 - </el-select>  
35 - </el-form-item>  
36 - </el-col>  
37 - </el-row>  
38 - <el-row :gutter="2">  
39 - <el-col :span="11">  
40 - <el-form-item label="่ฟ่ง„็ญ‰็บง" prop="violationGrade">  
41 - <el-select v-model="form.violationGrade" placeholder="่ฏท้€‰ๆ‹ฉไผไธšๅ็งฐ" style="width: 100%;" :disabled="true">  
42 - <el-option label="ไธ€่ˆฌ็ฑป" value="ไธ€่ˆฌ็ฑป"/>  
43 - <el-option label="้‡็‚น็ฑป" value="้‡็‚น็ฑป"/>  
44 - </el-select>  
45 - </el-form-item>  
46 - </el-col>  
47 - <el-col :span="11">  
48 - <el-form-item label="้กน็›ฎๅ็งฐ" prop="projectName">  
49 - <el-select v-model="form.projectName" :disabled="true" style="width: 100%;">  
50 -  
51 - </el-select>  
52 - </el-form-item>  
53 - </el-col>  
54 - </el-row>  
55 - <el-row :gutter="2">  
56 - <el-col :span="11">  
57 - <el-form-item label="ไผไธšๅ็งฐ" prop="companyName">  
58 - <el-select v-model="form.companyName" :disabled="true" style="width: 100%;">  
59 - </el-select>  
60 - </el-form-item>  
61 - </el-col>  
62 - <el-col :span="11">  
63 - <el-form-item label="ๅ‘้€ๆ—ถ้—ด" prop="createTime">  
64 - <el-input :value="form.createTime" :disabled="true"/>  
65 - </el-form-item>  
66 - </el-col>  
67 - </el-row>  
68 - <el-row :gutter="2">  
69 - <el-col :span="11">  
70 - <el-form-item label="ๅ‘้€ไบบ" prop="createBy">  
71 - <el-input :value="form.createBy" :disabled="true"/>  
72 - </el-form-item>  
73 - </el-col>  
74 - <el-col :span="11">  
75 - <el-form-item label="ๆŽฅๆ”ถไบบ" prop="receive">  
76 - <el-input :value="form.readBy" :disabled="true"/>  
77 - </el-form-item>  
78 - </el-col>  
79 - </el-row>  
80 - <el-row :gutter="2">  
81 - <el-col :span="11">  
82 - <el-form-item label="้˜…่ฏปๆ—ถ้—ด" prop="createBy">  
83 - <el-input :value="form.readTime" :disabled="true"/>  
84 - </el-form-item>  
85 - </el-col>  
86 - </el-row>  
87 - <el-row>  
88 - <el-col :span="22">  
89 - <el-form-item label="่ฟ่ง„ๆ่ฟฐ" prop="describe">  
90 - <el-input v-model="form.describe" type="textarea" placeholder="่ฏท่พ“ๅ…ฅๅ†…ๅฎน" :row="4" :disabled="true"/>  
91 - </el-form-item>  
92 - </el-col>  
93 - </el-row>  
94 - <el-form-item label="ๆŽจ้€ๅฏน่ฑก">  
95 - <el-radio-group v-model="form.sendObject" :disabled="true">  
96 - <el-radio label="ๅŒบ็ฎก็†้ƒจ้—จ">ๅŒบ็ฎก็†้ƒจ้—จ</el-radio>  
97 - <el-radio label="่ฟ่พ“ไผไธš">่ฟ่พ“ไผไธš</el-radio>  
98 - </el-radio-group>  
99 - </el-form-item>  
100 - <el-row>  
101 - <el-col :offset="3">  
102 - <el-button type="primary" @click="open = true">ๆŸฅ็œ‹้™„ไปถ({{ fileEntityList.length }})</el-button>  
103 - </el-col>  
104 - </el-row>  
105 - <el-table :data="replyApprovalProcessList" v-if="entryType==0">  
106 - <el-table-column property="replyPeople" label="ๆ“ไฝœไบบ" header-align="center" align="center"></el-table-column>  
107 - <el-table-column property="reply" label="ๆ„่ง" header-align="center" align="center"></el-table-column>  
108 - <el-table-column property="replyTime" label="ๆ“ไฝœๆ—ถ้—ด" header-align="center" align="center"></el-table-column>  
109 - <el-table-column property="replyImg" label="ๅ›พ็‰‡้ข„่งˆ" header-align="center" align="center">  
110 - <template slot-scope="scope">  
111 - <el-button  
112 - size="mini"  
113 - type="text"  
114 - icon="el-icon-view"  
115 - @click="openImage(scope.row.replyImg)"  
116 - v-if="scope.row.replyImg!=null && scope.row.replyImg!='undefined'"  
117 - v-hasPermi="['casefile:violationWarningInformation:view']"  
118 - >ๆŸฅ็œ‹  
119 - </el-button>  
120 - <span v-if="scope.row.replyImg==null || scope.row.replyImg=='undefined'">ๆš‚ๆ— </span>  
121 - </template>  
122 - </el-table-column>  
123 - </el-table>  
124 - <el-dialog title="ๆŸฅ็œ‹้™„ไปถ" :visible.sync="open" append-to-body>  
125 - <el-image v-for="item in slide1"  
126 - style="width: 150px; height: 100px; margin: 5px;"  
127 - :src="item"  
128 - :preview-src-list="slide1"  
129 - :z-index="2000">  
130 - </el-image>  
131 - <div style="display: inline-block;margin: 5px;position: relative; width: 150px;height: 100px;overflow:hidden;" v-for="item in videoSrc" >  
132 - <video width="100%" controls="controls" height="100%" :src="item"></video>  
133 - </div>  
134 - <el-table :data="fileEntityList">  
135 - <el-table-column property="name" label="้™„ไปถๅ็งฐ" header-align="center" align="center"></el-table-column>  
136 - <el-table-column label="ๆ“ไฝœ" class-name="small-padding fixed-width" header-align="center" align="center">  
137 - <template slot-scope="scope">  
138 - <el-button  
139 - size="small" type="success"  
140 - icon="el-icon-download"  
141 - @click="downloadFA(scope.row)"  
142 - v-hasPermi="['office:management:edit']"  
143 - v-if="form.id!=null"  
144 - round>ไธ‹่ฝฝ  
145 - </el-button>  
146 - </template>  
147 - </el-table-column>  
148 - </el-table>  
149 - <div slot="footer" class="dialog-footer">  
150 - <el-button @click="open = false">ๅ– ๆถˆ</el-button>  
151 - </div>  
152 - </el-dialog>  
153 - <el-dialog title="้ข„่งˆ" :visible.sync="openImg" append-to-body v-if="entryType==0" width="300px">  
154 - <div v-for="item in img" style="border: 1px black solid;text-align: center;">  
155 -  
156 - <el-image style="width: 250px; height: 250px; margin: 5px;"  
157 - v-if="item.indexOf('.jpg')>-1||item.indexOf('.png')>-1||item.indexOf('.jpeg')>-1||item.indexOf('.gif')>-1"  
158 - :src="showFile(item)"  
159 - :preview-src-list="[showFile(item)]"  
160 - :z-index="2000">  
161 - </el-image>  
162 - <div style="display: inline-block;margin: 5px;position: relative; width: 250px;height: 250px;overflow:hidden;" v-if="item.indexOf('.mp4')>-1||item.indexOf('.avi')>-1">  
163 - <video width="100%" controls="controls" height="100%" :src="showFile(item)"></video>  
164 - </div>  
165 - <a @click="downloadFile(item);" style="color: blue;"> ไธ‹่ฝฝ: {{ item.split("/")[item.split("/").length - 1] }} </a>  
166 - </div>  
167 - </el-dialog>  
168 - </el-form>  
169 -</template>  
170 -  
171 -<script src="@/api/vio_casefile_info">  
172 -</script>  
173 -  
174 -<style scoped>  
175 -  
176 -</style>  
trash-ui/src/views/casefile/violationWarningInformation/index.vue
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 </el-form-item> 15 </el-form-item>
16 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType"> 16 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
17 <el-select v-model="queryParams.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" clearable size="small"> 17 <el-select v-model="queryParams.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" clearable size="small">
18 - <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> 18 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
19 </el-select> 19 </el-select>
20 </el-form-item> 20 </el-form-item>
21 <el-form-item label="่ฟ่ง„ๅฏน่ฑก" prop="projectName"> 21 <el-form-item label="่ฟ่ง„ๅฏน่ฑก" prop="projectName">
@@ -33,6 +33,14 @@ @@ -33,6 +33,14 @@
33 value-format="yyyy-MM-dd HH:mm:ss" 33 value-format="yyyy-MM-dd HH:mm:ss"
34 end-placeholder="็ป“ๆŸๆ—ฅๆœŸ"> 34 end-placeholder="็ป“ๆŸๆ—ฅๆœŸ">
35 </el-date-picker> 35 </el-date-picker>
  36 + </el-form-item>
  37 + <el-form-item label="็Šถๆ€" prop="status1">
  38 + <el-select v-model="queryParams.status1" placeholder="็Šถๆ€" size="small">
  39 + <el-option label="ๆœชๅ›žๅค" value="0"/>
  40 + <el-option label="ๅทฒๅ›žๅค" value="1"/>
  41 + <el-option label="ๅฎกๆ ธไธญ" value="2"/>
  42 + <el-option label="็ป“ๆกˆๅญ˜ๆกฃ" value="3"/>
  43 + </el-select>
36 </el-form-item> 44 </el-form-item>
37 <el-form-item> 45 <el-form-item>
38 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button> 46 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">ๆœ็ดข</el-button>
@@ -84,8 +92,17 @@ @@ -84,8 +92,17 @@
84 <span>{{scope.row.violationObjectType == 0 ? "ๅทฅๅœฐ" :scope.row.violationObjectType == 1 ?"ๅค„็†ๅœบๆ‰€":"ไผไธš"}}</span> 92 <span>{{scope.row.violationObjectType == 0 ? "ๅทฅๅœฐ" :scope.row.violationObjectType == 1 ?"ๅค„็†ๅœบๆ‰€":"ไผไธš"}}</span>
85 </template> 93 </template>
86 </el-table-column> 94 </el-table-column>
87 - <el-table-column label="่ฟ่ง„็ฑปๅž‹" align="center" prop="violationType" /> 95 + <el-table-column label="่ฟ่ง„็ฑปๅž‹" align="center" prop="violationType">
  96 + <template slot-scope="scope">
  97 + <span>{{getCaseType(scope.row.violationType)}}</span>
  98 + </template>
  99 + </el-table-column>
88 <el-table-column label="ๆ—ฅๆœŸ" align="center" prop="createTime"/> 100 <el-table-column label="ๆ—ฅๆœŸ" align="center" prop="createTime"/>
  101 + <el-table-column label="็Šถๆ€" align="center" prop="status1">
  102 + <template slot-scope="scope">
  103 + <span>{{getCaseStatus(scope.row)}}</span>
  104 + </template>
  105 + </el-table-column>
89 <el-table-column label="ๆ“ไฝœ" align="center" class-name="small-padding fixed-width"> 106 <el-table-column label="ๆ“ไฝœ" align="center" class-name="small-padding fixed-width">
90 <template slot-scope="scope"> 107 <template slot-scope="scope">
91 <el-button 108 <el-button
@@ -151,7 +168,7 @@ @@ -151,7 +168,7 @@
151 <el-col :span="11"> 168 <el-col :span="11">
152 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType"> 169 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
153 <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;"> 170 <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;">
154 - <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> 171 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
155 </el-select> 172 </el-select>
156 </el-form-item> 173 </el-form-item>
157 </el-col> 174 </el-col>
@@ -170,7 +187,7 @@ @@ -170,7 +187,7 @@
170 <el-select v-model="form.projectName" :filterable="true" 187 <el-select v-model="form.projectName" :filterable="true"
171 :remote-method="projectNameLoadOptions" :loading="isLoading" placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" style="width: 100%;"> 188 :remote-method="projectNameLoadOptions" :loading="isLoading" placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" style="width: 100%;">
172 <el-option v-for="item in projectNameList[form.violationObjectType]" 189 <el-option v-for="item in projectNameList[form.violationObjectType]"
173 - :label="item.name" :value="item.name" :title="item.name"></el-option> 190 + :label="item.name" :value="item.name" :title="item.name" @click.native="getAreaName(item.areaCode)"></el-option>
174 </el-select> 191 </el-select>
175 </el-form-item> 192 </el-form-item>
176 </el-col> 193 </el-col>
trash-ui/src/views/h5/caseOffline/caseOfflineInfo.vue
1 <template> 1 <template>
2 -  
3 <div> 2 <div>
4 <el-form ref="form" :model="form" :rules="rules" label-width="80px"> 3 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  4 +
5 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type"> 5 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type">
6 <el-input v-model="form.type" type="textarea" :rows="3" disabled /> 6 <el-input v-model="form.type" type="textarea" :rows="3" disabled />
7 </el-form-item> 7 </el-form-item>
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 </el-table> 48 </el-table>
49 49
50 50
51 - </el-form> 51 + </el-form>
52 <el-dialog title="" :visible.sync="showPic" append-to-body width="400px"> 52 <el-dialog title="" :visible.sync="showPic" append-to-body width="400px">
53 <img :src="picImage" width="100%" height="400px" /> 53 <img :src="picImage" width="100%" height="400px" />
54 </el-dialog> 54 </el-dialog>
trash-ui/src/views/h5/caseOffline/index.vue
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type"> 4 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type">
5 <el-select v-model="queryParams.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹" size="small"> 5 <el-select v-model="queryParams.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹" size="small">
6 - <el-option v-for="item in caseType" :label="item.name" :value="item.code" /> 6 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
7 </el-select> 7 </el-select>
8 </el-form-item> 8 </el-form-item>
9 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place"> 9 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place">
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 <el-form ref="form" :model="form" :rules="rules" label-width="80px"> 80 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
81 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type"> 81 <el-form-item label="ๆกˆๅท็ฑปๅž‹" prop="type">
82 <el-select v-model="form.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹"> 82 <el-select v-model="form.type" placeholder="่ฏท้€‰ๆ‹ฉๆกˆๅท็ฑปๅž‹">
83 - <el-option v-for="item in caseType" :label="item.name" :value="item.code" /> 83 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
84 </el-select> 84 </el-select>
85 </el-form-item> 85 </el-form-item>
86 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place"> 86 <el-form-item label="ๆ‰€ๅฑžๅŒบๅŸŸ" prop="place">
@@ -92,10 +92,12 @@ @@ -92,10 +92,12 @@
92 <el-select v-model="form.siteType" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹"> 92 <el-select v-model="form.siteType" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹">
93 <el-option label="ๅทฅๅœฐ" value="0" /> 93 <el-option label="ๅทฅๅœฐ" value="0" />
94 <el-option label="ๅค„็†ๅœบๆ‰€" value="1" /> 94 <el-option label="ๅค„็†ๅœบๆ‰€" value="1" />
  95 + <el-option label="่ฝฆ่พ†" value="2" />
95 </el-select> 96 </el-select>
96 </el-form-item> 97 </el-form-item>
97 - <el-form-item :label="form.siteType==0?'ๅทฅๅœฐๅ็งฐ':'ๅค„็†ๅœบๆ‰€ๅ็งฐ'" prop="siteName">  
98 - <el-select v-model="form.siteName" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹" allow-create filterable @change="getSite"> 98 + <el-form-item :label="form.siteType==0?'ๅทฅๅœฐๅ็งฐ':form.siteType==1?'ๅค„็†ๅœบๆ‰€ๅ็งฐ':'่ฝฆ็‰Œๅท'" prop="siteName">
  99 + <el-select v-model="form.siteName" placeholder="่ฏท้€‰ๆ‹ฉ็ฑปๅž‹" allow-create filterable
  100 + :filter-method="getSite">
99 <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" /> 101 <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" />
100 </el-select> 102 </el-select>
101 </el-form-item> 103 </el-form-item>
@@ -124,6 +126,8 @@ @@ -124,6 +126,8 @@
124 126
125 127
126 <el-dialog title="ๆŸฅ็œ‹่ฏฆๆƒ…" :visible.sync="open2" width="300px" append-to-body> 128 <el-dialog title="ๆŸฅ็œ‹่ฏฆๆƒ…" :visible.sync="open2" width="300px" append-to-body>
  129 +
  130 + <el-button @click="androidPrint();">ๆ‰“ๅฐ</el-button>
127 <h5Info :businessKey="businessKey" v-if="open2" /> 131 <h5Info :businessKey="businessKey" v-if="open2" />
128 <div slot="footer" class="dialog-footer"> 132 <div slot="footer" class="dialog-footer">
129 <el-button @click="cancel">ๅ– ๆถˆ</el-button> 133 <el-button @click="cancel">ๅ– ๆถˆ</el-button>
trash-ui/src/views/h5/task/violationCaseFileInfo.vue
@@ -21,11 +21,8 @@ @@ -21,11 +21,8 @@
21 </el-select> 21 </el-select>
22 </el-form-item> 22 </el-form-item>
23 23
24 - <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">  
25 - <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;" :disabled="true">  
26 - <el-option label="่ฟ่ง„1" value="่ฟ่ง„1" />  
27 - <el-option label="่ฟ่ง„2" value="่ฟ่ง„2" />  
28 - </el-select> 24 + <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
  25 + <el-input :value="getCaseType(form.violationType)" :disabled="true"/>
29 </el-form-item> 26 </el-form-item>
30 27
31 28
trash-ui/src/views/h5/task/violationWarningInformationInfo.vue
@@ -19,9 +19,8 @@ @@ -19,9 +19,8 @@
19 </el-select> 19 </el-select>
20 </el-form-item> 20 </el-form-item>
21 21
22 - <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">  
23 - <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;" :disabled="true">  
24 - </el-select> 22 + <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
  23 + <el-input :value="getCaseType(form.violationType)" :disabled="true"/>
25 </el-form-item> 24 </el-form-item>
26 25
27 26
trash-ui/src/views/h5/threestep/index.vue
@@ -150,7 +150,8 @@ @@ -150,7 +150,8 @@
150 <el-input v-model="form.img0" type="hidden"></el-input> 150 <el-input v-model="form.img0" type="hidden"></el-input>
151 <p v-for="(img,index) in form.img0">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(0,img)" style="color:red"> x</a></p> 151 <p v-for="(img,index) in form.img0">{{img.split("/")[img.split("/").length -1]}}<a @click="removeImage(0,img)" style="color:red"> x</a></p>
152 </el-col> 152 </el-col>
153 - <el-col :span="12"> 153 + <el-col :span="12">
  154 + <span style="color: red;">*</span>
154 <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">ๆด—่ฝฆๅนณๅฐ็…ง็‰‡</a> 155 <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">ๆด—่ฝฆๅนณๅฐ็…ง็‰‡</a>
155 <el-image v-for="item in slides[1]" 156 <el-image v-for="item in slides[1]"
156 style="width: 100px; height: 100px; margin: 5px;" 157 style="width: 100px; height: 100px; margin: 5px;"
trash-ui/src/views/h5/violationCaseFile/index.vue
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 </el-form-item> 10 </el-form-item>
11 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType"> 11 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
12 <el-select v-model="queryParams.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" size="small"> 12 <el-select v-model="queryParams.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" size="small">
13 - <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> 13 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
14 </el-select> 14 </el-select>
15 </el-form-item> 15 </el-form-item>
16 16
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 > 51 >
52 <el-row class="card_row"> 52 <el-row class="card_row">
53 <el-col :span="24" class="card_grid"> 53 <el-col :span="24" class="card_grid">
54 - <div class="card_title" style="font-weight: bold;">่ฟ่ง„็ฑปๅž‹:{{item.violationType}}</div> 54 + <div class="card_title" style="font-weight: bold;">่ฟ่ง„็ฑปๅž‹:{{getCaseType(item.violationType)}}</div>
55 </el-col> 55 </el-col>
56 </el-row> 56 </el-row>
57 <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;"> 57 <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;">
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 <el-col :span="11"> 123 <el-col :span="11">
124 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType"> 124 <el-form-item label="่ฟ่ง„็ฑปๅž‹" prop="violationType">
125 <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;"> 125 <el-select v-model="form.violationType" placeholder="่ฏท้€‰ๆ‹ฉ่ฟ่ง„็ฑปๅž‹" style="width: 100%;">
126 - <el-option v-for="item in caseType" :label="item.name" :value="item.name" /> 126 + <el-option v-for="item in caseType" :label="item.dictLabel" :value="item.dictValue" />
127 </el-select> 127 </el-select>
128 </el-form-item> 128 </el-form-item>
129 </el-col> 129 </el-col>
@@ -139,7 +139,7 @@ @@ -139,7 +139,7 @@
139 </el-col> 139 </el-col>
140 <el-col :span="11"> 140 <el-col :span="11">
141 <el-form-item label="่ฟ่ง„ๅฏน่ฑก" prop="projectName"> 141 <el-form-item label="่ฟ่ง„ๅฏน่ฑก" prop="projectName">
142 - <el-select v-model="form.projectName" :filterable="true" 142 + <el-select v-model="form.projectName" :filterable="true"
143 placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" style="width: 100%;" @change="getRemoteDate"> 143 placeholder="่ฏท่พ“ๅ…ฅ้กน็›ฎๅ็งฐ" style="width: 100%;" @change="getRemoteDate">
144 <el-option v-for="item in data" :key="item.name" :label="item.name" :value="item.name" 144 <el-option v-for="item in data" :key="item.name" :label="item.name" :value="item.name"
145 v-if="form.place == item.areaCode" /> 145 v-if="form.place == item.areaCode" />
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
@@ -8,6 +8,7 @@ import java.util.Date; @@ -8,6 +8,7 @@ import java.util.Date;
8 import java.util.HashMap; 8 import java.util.HashMap;
9 import java.util.List; 9 import java.util.List;
10 import java.util.Map; 10 import java.util.Map;
  11 +import java.util.concurrent.TimeUnit;
11 12
12 import javax.servlet.http.HttpServletRequest; 13 import javax.servlet.http.HttpServletRequest;
13 import javax.servlet.http.HttpServletResponse; 14 import javax.servlet.http.HttpServletResponse;
@@ -36,6 +37,7 @@ import com.alibaba.fastjson.JSON; @@ -36,6 +37,7 @@ import com.alibaba.fastjson.JSON;
36 import com.alibaba.fastjson.JSONArray; 37 import com.alibaba.fastjson.JSONArray;
37 import com.alibaba.fastjson.JSONObject; 38 import com.alibaba.fastjson.JSONObject;
38 import com.trash.business.domain.SupervisionThreestep; 39 import com.trash.business.domain.SupervisionThreestep;
  40 +import com.trash.business.domain.SupervisionThreestepWithWorkArea;
39 import com.trash.business.domain.dayWork; 41 import com.trash.business.domain.dayWork;
40 import com.trash.business.service.ISupervisionThreestepService; 42 import com.trash.business.service.ISupervisionThreestepService;
41 import com.trash.common.utils.RemoteServerUtils; 43 import com.trash.common.utils.RemoteServerUtils;
@@ -56,359 +58,373 @@ import com.trash.common.core.redis.RedisCache; @@ -56,359 +58,373 @@ import com.trash.common.core.redis.RedisCache;
56 */ 58 */
57 @RestController 59 @RestController
58 @RequestMapping("/business/threestep") 60 @RequestMapping("/business/threestep")
59 -public class SupervisionThreestepController extends BaseController  
60 -{  
61 - @Autowired  
62 - private ISupervisionThreestepService supervisionThreestepService;  
63 -  
64 - @Autowired  
65 - RedisCache redisCache;  
66 -  
67 - /**  
68 - * ๆŸฅ่ฏขไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ  
69 - */  
70 - @GetMapping("/list")  
71 - public TableDataInfo list(SupervisionThreestep supervisionThreestep)  
72 - {  
73 - startPage();  
74 -  
75 -  
76 - List<SupervisionThreestep> list = supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep);  
77 - return getDataTable(list);  
78 - }  
79 -  
80 - @PostMapping("/list")  
81 - public AjaxResult postList(@RequestBody SupervisionThreestep supervisionThreestep)  
82 - {  
83 -  
84 - SupervisionThreestep list = supervisionThreestepService.getSupervisionThreestepInfo(supervisionThreestep);  
85 - return AjaxResult.success(list);  
86 - }  
87 -  
88 - @PostMapping("/getByObjects")  
89 - public AjaxResult getLists(@RequestBody SupervisionThreestep supervisionThreestep)  
90 - {  
91 - AjaxResult ajaxResult = AjaxResult.success();  
92 - try {  
93 - ajaxResult.put("result", supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep)); 61 +public class SupervisionThreestepController extends BaseController {
  62 + @Autowired
  63 + private ISupervisionThreestepService supervisionThreestepService;
  64 +
  65 + @Autowired
  66 + RedisCache redisCache;
  67 +
  68 + /**
  69 + * ๆŸฅ่ฏขไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ
  70 + */
  71 + @GetMapping("/list")
  72 + public TableDataInfo list(SupervisionThreestep supervisionThreestep) {
  73 + startPage();
  74 +
  75 + List<SupervisionThreestep> list = supervisionThreestepService
  76 + .selectSupervisionThreestepList(supervisionThreestep);
  77 + return getDataTable(list);
  78 + }
  79 +
  80 + @PostMapping("/list")
  81 + public AjaxResult postList(@RequestBody SupervisionThreestep supervisionThreestep) {
  82 +
  83 + SupervisionThreestep list = supervisionThreestepService.getSupervisionThreestepInfo(supervisionThreestep);
  84 + return AjaxResult.success(list);
  85 + }
  86 +
  87 + @PostMapping("/getByObjects")
  88 + public AjaxResult getLists(@RequestBody SupervisionThreestep supervisionThreestep) {
  89 + AjaxResult ajaxResult = AjaxResult.success();
  90 + try {
  91 + ajaxResult.put("result", supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep));
94 } catch (Exception e) { 92 } catch (Exception e) {
95 e.printStackTrace(); 93 e.printStackTrace();
96 } 94 }
97 -  
98 - return ajaxResult;  
99 -  
100 - }  
101 -  
102 - String[] outside = {"้•ฟๆฒ™ๅŽฟ", "ๆœ›ๅŸŽๅŒบ", "ๆต้˜ณๅธ‚", "ๅฎไนกๅธ‚", "ๆ ชๆดฒๅธ‚", "ๆน˜ๆฝญๅธ‚", "ๆฑฉ็ฝ—ๅธ‚", "ๆน˜้˜ดๅŽฟ"};  
103 -  
104 - /**  
105 - * ๆŸฅ่ฏขไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ  
106 - */  
107 - @GetMapping("/dayWorkList")  
108 - public TableDataInfo dayWorkList(SupervisionThreestep supervisionThreestep)  
109 - {  
110 -// startPage();  
111 - PageDomain pageDomain = TableSupport.buildPageRequest();  
112 - Integer pageNum = pageDomain.getPageNum();  
113 - Integer pageSize = pageDomain.getPageSize();  
114 -  
115 - if("430100".equals(supervisionThreestep.getPlace())){  
116 - supervisionThreestep.setPlace(null);  
117 - }  
118 - if("้•ฟๆฒ™ๅธ‚".equals(supervisionThreestep.getSubReason())){  
119 - supervisionThreestep.setSubReason(null);  
120 - }  
121 -  
122 - JSONArray areas = redisCache.getCacheObject("areas");  
123 -  
124 - if(areas == null){  
125 - areas = RemoteServerUtils.getAreas();  
126 - redisCache.setCacheObject("areas", areas);  
127 - }  
128 -  
129 - List<Map<String,String>> list = supervisionThreestepService.selectDayWorkList(supervisionThreestep);  
130 -  
131 - int count = 0;  
132 - int count1 = 0;  
133 - String place = "้•ฟๆฒ™ๅธ‚";  
134 - String place1 = "้•ฟๆฒ™ๅธ‚";  
135 - String string = "ไปŠๆ—ฅ";  
136 -  
137 - if(supervisionThreestep.getSubReason()!=null){  
138 -  
139 - place1 = supervisionThreestep.getSubReason();  
140 - }  
141 -  
142 - if(supervisionThreestep.getHis().equals("1")){  
143 - string = "";  
144 - }  
145 -  
146 -  
147 - List<String> names = new ArrayList<>();  
148 - List<String> enames = new ArrayList<>();  
149 -  
150 - for(Map<String, String> m:list){  
151 -  
152 - if(names.indexOf(m.get("name")) == -1){  
153 -  
154 - names.add(m.get("name"));  
155 - }  
156 -  
157 - if(enames.indexOf(m.get("ename")) == -1){  
158 -  
159 - enames.add(m.get("ename"));  
160 - }  
161 -  
162 -  
163 - for(Object object:areas){  
164 - JSONObject area = (JSONObject)object;  
165 -  
166 - if(supervisionThreestep.getPlace() != null){  
167 - if(supervisionThreestep.getPlace().equals(area.get("code").toString())){  
168 - place = area.get("name").toString();  
169 - }  
170 - }  
171 -  
172 - if( area.get("code").toString().equals( m.get("place"))){  
173 - m.put("place", area.get("name").toString());  
174 - }  
175 - if( area.get("code").toString().equals( m.get("eplace"))){  
176 - m.put("eplace", area.get("name").toString());  
177 - }  
178 - }  
179 -  
180 - for(String out:outside){  
181 - if(out.equals(m.get("eplace"))){  
182 - if(m.get("status").equals("ๅผ€ๅทฅ")){  
183 - m.put("estatus", "ๅผ€ๅทฅ");  
184 - m.put("eselfCheckTime", m.get("selfCheckTime"));  
185 - }  
186 -  
187 - }  
188 - }  
189 -  
190 - if(m.get("status").equals("ๅผ€ๅทฅ")){  
191 - count += 1;  
192 - }  
193 - if(m.get("estatus").equals("ๅผ€ๅทฅ")){  
194 - count1 += 1;  
195 - }  
196 - }  
197 -  
198 - TableDataInfo info = getDataTable(list);  
199 -  
200 - if(list.size() > (pageNum)*pageSize){  
201 - list = list.subList((pageNum -1)*pageSize, (pageNum)*pageSize);  
202 - }else{  
203 - list = list.subList((pageNum -1)*pageSize, list.size());  
204 - }  
205 -  
206 - info.setRows(list);  
207 -  
208 - info.setNames(names);  
209 - info.setEnames(enames);  
210 -  
211 - info.setMsg(string + place+"ๅทฅๅœฐๅผ€ๅทฅๆ•ฐ้‡" + count + " " + place1+"ๅค„็†ๅœบๆ‰€ๅผ€ๅทฅๆ•ฐ้‡" + count1);  
212 -  
213 - return info;  
214 - }  
215 -  
216 -  
217 - @PostMapping("/exportDayWorkHistoryList")  
218 - public AjaxResult exportDayWorkHistoryList(@RequestBody List<dayWork> list)  
219 - {  
220 -  
221 - ExcelUtil<dayWork> util = new ExcelUtil<dayWork>(dayWork.class);  
222 - return util.exportExcel(list, "ๅކๅฒๅผ€ๅทฅๆŠฅ่กจ");  
223 -  
224 - }  
225 -  
226 - @PostMapping("/exportDayWorkList")  
227 - public AjaxResult exportDayWorkList(@RequestBody List<dayWork> list)  
228 - {  
229 - ExcelUtil<dayWork> util = new ExcelUtil<dayWork>(dayWork.class);  
230 - return util.exportExcel(list, "ๆ—ฅๅผ€ๅทฅๆŠฅ่กจ");  
231 - }  
232 -  
233 -  
234 - @PostMapping("/todayDataList")  
235 - public List<SupervisionThreestep> todayDataList(@RequestBody SupervisionThreestep supervisionThreestep)  
236 - {  
237 - return supervisionThreestepService.selectTodayDataList(supervisionThreestep);  
238 - }  
239 -  
240 -  
241 -  
242 - /**  
243 - * ๆŸฅ่ฏขไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ  
244 - */  
245 - @PostMapping("/dayWorkList")  
246 - public AjaxResult days(@RequestBody SupervisionThreestep supervisionThreestep)  
247 - {  
248 - List<Map> list= supervisionThreestepService.selectDayWorkListByType(supervisionThreestep);  
249 - AjaxResult result = AjaxResult.success(list);  
250 - result.put("result", AjaxResult.success(list).get("data"));  
251 - result.put("data", null);  
252 - return result;  
253 - }  
254 -  
255 - /**  
256 - * ๅฏผๅ‡บไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ  
257 - */  
258 - @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.EXPORT)  
259 - @GetMapping("/export")  
260 - public AjaxResult export(SupervisionThreestep supervisionThreestep)  
261 - {  
262 - List<SupervisionThreestep> list = supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep);  
263 -  
264 -  
265 -  
266 - for(int i = 0;i<list.size();i++){  
267 - list.get(i).setId((long)i+1);  
268 - }  
269 -  
270 - JSONArray array = RemoteServerUtils.getAreas();  
271 -  
272 - for(Object object :array){  
273 - JSONObject jsonObject = (JSONObject)object;  
274 - for(SupervisionThreestep sThreestep : list){  
275 - if(jsonObject.getString("code").equals(sThreestep.getPlace())){  
276 - sThreestep.setPlace(jsonObject.getString("name"));  
277 - }  
278 - }  
279 - }  
280 - List<String> withOut = new ArrayList<String>();  
281 - String str ="ๆŠฅๅทฅๆŠฝๆŸฅ";  
282 - if(supervisionThreestep.getStatus() == null){  
283 - withOut.add("checkEndTime");  
284 - str ="ๆŠฅๅทฅ่‡ชๆŸฅ";  
285 - }  
286 -  
287 -  
288 - ExcelUtil<SupervisionThreestep> util = new ExcelUtil<SupervisionThreestep>(SupervisionThreestep.class);  
289 -  
290 - return util.exportExcel(list, str,withOut);  
291 - }  
292 -  
293 - /**  
294 - * ่Žทๅ–ไธ‰ๆŸฅๆœบๅˆถ่ฏฆ็ป†ไฟกๆฏ  
295 - */  
296 - @GetMapping(value = "/{id}")  
297 - public AjaxResult getInfo(@PathVariable("id") Long id)  
298 - {  
299 - return AjaxResult.success(supervisionThreestepService.selectSupervisionThreestepById(id));  
300 - }  
301 -  
302 - @GetMapping(value = "names")  
303 - public List<String> names(SupervisionThreestep supervisionThreestep)  
304 - {  
305 - return supervisionThreestepService.getNames(supervisionThreestep);  
306 - }  
307 - /**  
308 - * ๆ–ฐๅขžไธ‰ๆŸฅๆœบๅˆถ  
309 - */  
310 - @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.INSERT)  
311 - @PostMapping  
312 - @RepeatSubmit  
313 - public AjaxResult add(@RequestBody SupervisionThreestep supervisionThreestep)  
314 - {  
315 -  
316 - int i = supervisionThreestepService.insertSupervisionThreestep(supervisionThreestep);  
317 -  
318 - if(i==-1){  
319 - return AjaxResult.error("ๆ— ๆณ•้‡ๅคๆŠฅๅทฅ");  
320 - }  
321 - if(i==-2){  
322 - return AjaxResult.error("ๅฝ“ๅ‰ๆ—ถ้—ดๆ— ๆณ•ๆŠฅๅทฅ");  
323 - }  
324 -  
325 - if(i==-3){  
326 - return AjaxResult.error("้กน็›ฎๅทฒ่ถ…ๆœŸ!");  
327 - }  
328 - if(i==-4){  
329 - return AjaxResult.error("ๆŠฅๅทฅๆ•ฐๆฎๅผ‚ๅธธ,่ฏทๅˆทๆ–ฐ้กต้ข้‡ๆ–ฐๆไบค!");  
330 - }  
331 -  
332 - return toAjax(i);  
333 - }  
334 -  
335 - /**  
336 - * ไฟฎๆ”นไธ‰ๆŸฅๆœบๅˆถ  
337 - */  
338 - @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.UPDATE)  
339 - @PutMapping  
340 - public AjaxResult edit(@RequestBody SupervisionThreestep supervisionThreestep)  
341 - {  
342 - return toAjax(supervisionThreestepService.updateSupervisionThreestep(supervisionThreestep));  
343 - }  
344 -  
345 - @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.UPDATE)  
346 - @PostMapping(value="/active")  
347 - public AjaxResult active(@RequestBody SupervisionThreestep supervisionThreestep)  
348 - {  
349 -  
350 - supervisionThreestep.setCheckTime(new Date());  
351 - return toAjax(supervisionThreestepService.activeSupervisionThreestep(supervisionThreestep));  
352 - }  
353 -  
354 - /**  
355 - * ๅˆ ้™คไธ‰ๆŸฅๆœบๅˆถ  
356 - */  
357 - @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.DELETE) 95 +
  96 + return ajaxResult;
  97 +
  98 + }
  99 +
  100 + String[] outside = { "้•ฟๆฒ™ๅŽฟ", "ๆœ›ๅŸŽๅŒบ", "ๆต้˜ณๅธ‚", "ๅฎไนกๅธ‚", "ๆ ชๆดฒๅธ‚", "ๆน˜ๆฝญๅธ‚", "ๆฑฉ็ฝ—ๅธ‚", "ๆน˜้˜ดๅŽฟ" };
  101 +
  102 + /**
  103 + * ๆŸฅ่ฏขไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ
  104 + */
  105 + @GetMapping("/dayWorkList")
  106 + public TableDataInfo dayWorkList(SupervisionThreestep supervisionThreestep) {
  107 + // startPage();
  108 + PageDomain pageDomain = TableSupport.buildPageRequest();
  109 + Integer pageNum = pageDomain.getPageNum();
  110 + Integer pageSize = pageDomain.getPageSize();
  111 +
  112 + if ("430100".equals(supervisionThreestep.getPlace())) {
  113 + supervisionThreestep.setPlace(null);
  114 + }
  115 + if ("้•ฟๆฒ™ๅธ‚".equals(supervisionThreestep.getSubReason())) {
  116 + supervisionThreestep.setSubReason(null);
  117 + }
  118 +
  119 + JSONArray areas = redisCache.getCacheObject("areas");
  120 +
  121 + if (areas == null) {
  122 + areas = RemoteServerUtils.getAreas();
  123 + redisCache.setCacheObject("areas", areas);
  124 + }
  125 +
  126 + List<Map<String, String>> list = supervisionThreestepService.selectDayWorkList(supervisionThreestep);
  127 +
  128 + int count = 0;
  129 + int count1 = 0;
  130 + String place = "้•ฟๆฒ™ๅธ‚";
  131 + String place1 = "้•ฟๆฒ™ๅธ‚";
  132 + String string = "ไปŠๆ—ฅ";
  133 +
  134 + if (supervisionThreestep.getSubReason() != null) {
  135 +
  136 + place1 = supervisionThreestep.getSubReason();
  137 + }
  138 +
  139 + if (supervisionThreestep.getHis().equals("1")) {
  140 + string = "";
  141 + }
  142 +
  143 + List<String> names = new ArrayList<>();
  144 + List<String> enames = new ArrayList<>();
  145 +
  146 + for (Map<String, String> m : list) {
  147 +
  148 + if (names.indexOf(m.get("name")) == -1) {
  149 +
  150 + names.add(m.get("name"));
  151 + }
  152 +
  153 + if (enames.indexOf(m.get("ename")) == -1) {
  154 +
  155 + enames.add(m.get("ename"));
  156 + }
  157 +
  158 + for (Object object : areas) {
  159 + JSONObject area = (JSONObject) object;
  160 +
  161 + if (supervisionThreestep.getPlace() != null) {
  162 + if (supervisionThreestep.getPlace().equals(area.get("code").toString())) {
  163 + place = area.get("name").toString();
  164 + }
  165 + }
  166 +
  167 + if (area.get("code").toString().equals(m.get("place"))) {
  168 + m.put("place", area.get("name").toString());
  169 + }
  170 + if (area.get("code").toString().equals(m.get("eplace"))) {
  171 + m.put("eplace", area.get("name").toString());
  172 + }
  173 + }
  174 +
  175 + for (String out : outside) {
  176 + if (out.equals(m.get("eplace"))) {
  177 + if (m.get("status").equals("ๅผ€ๅทฅ")) {
  178 + m.put("estatus", "ๅผ€ๅทฅ");
  179 + m.put("eselfCheckTime", m.get("selfCheckTime"));
  180 + }
  181 +
  182 + }
  183 + }
  184 +
  185 + if (m.get("status").equals("ๅผ€ๅทฅ")) {
  186 + count += 1;
  187 + }
  188 + if (m.get("estatus").equals("ๅผ€ๅทฅ")) {
  189 + count1 += 1;
  190 + }
  191 + }
  192 +
  193 + TableDataInfo info = getDataTable(list);
  194 +
  195 + if (list.size() > (pageNum) * pageSize) {
  196 + list = list.subList((pageNum - 1) * pageSize, (pageNum) * pageSize);
  197 + } else {
  198 + list = list.subList((pageNum - 1) * pageSize, list.size());
  199 + }
  200 +
  201 + info.setRows(list);
  202 +
  203 + info.setNames(names);
  204 + info.setEnames(enames);
  205 +
  206 + info.setMsg(string + place + "ๅทฅๅœฐๅผ€ๅทฅๆ•ฐ้‡" + count + " " + place1 + "ๅค„็†ๅœบๆ‰€ๅผ€ๅทฅๆ•ฐ้‡" + count1);
  207 +
  208 + return info;
  209 + }
  210 +
  211 + @PostMapping("/exportDayWorkHistoryList")
  212 + public AjaxResult exportDayWorkHistoryList(@RequestBody List<dayWork> list) {
  213 + ExcelUtil<dayWork> util = new ExcelUtil<dayWork>(dayWork.class);
  214 + return util.exportExcel(list, "ๅކๅฒๅผ€ๅทฅๆŠฅ่กจ");
  215 + }
  216 +
  217 + @PostMapping("/exportDayWorkList")
  218 + public AjaxResult exportDayWorkList(@RequestBody List<dayWork> list) {
  219 + ExcelUtil<dayWork> util = new ExcelUtil<dayWork>(dayWork.class);
  220 + return util.exportExcel(list, "ๆ—ฅๅผ€ๅทฅๆŠฅ่กจ");
  221 + }
  222 +
  223 + @PostMapping("/todayDataList")
  224 + public List<SupervisionThreestep> todayDataList(@RequestBody SupervisionThreestep supervisionThreestep) {
  225 + return supervisionThreestepService.selectTodayDataList(supervisionThreestep);
  226 + }
  227 +
  228 + /**
  229 + * ๆŸฅ่ฏขไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ
  230 + */
  231 + @PostMapping("/dayWorkList")
  232 + public AjaxResult days(@RequestBody SupervisionThreestep supervisionThreestep) {
  233 + List<Map> list = supervisionThreestepService.selectDayWorkListByType(supervisionThreestep);
  234 + AjaxResult result = AjaxResult.success(list);
  235 + result.put("result", AjaxResult.success(list).get("data"));
  236 + result.put("data", null);
  237 + return result;
  238 + }
  239 +
  240 + /**
  241 + * ๅฏผๅ‡บไธ‰ๆŸฅๆœบๅˆถๅˆ—่กจ
  242 + */
  243 + @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.EXPORT)
  244 + @GetMapping("/export")
  245 + public AjaxResult export(SupervisionThreestep supervisionThreestep) {
  246 + List<SupervisionThreestep> list = supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep);
  247 +
  248 + JSONArray array = RemoteServerUtils.getAreas();
  249 +
  250 + JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList");
  251 + if (constructionList == null) {
  252 + Map<String, Object> map = new HashMap<>();
  253 + map.put("size", 99999);
  254 + map.put("page", 1);
  255 + constructionList = RemoteServerUtils.getConstructionLedgerList(map);
  256 + if (constructionList != null) {
  257 + redisCache.setCacheObject("constructionLedgerList", constructionList, 60, TimeUnit.MINUTES);
  258 + }
  259 + }
  260 +
  261 + for (int i = 0; i < list.size(); i++) {
  262 + List<String> objIds = new ArrayList<String>();
  263 + for(Object obj:constructionList){
  264 + objIds.add(((JSONObject)obj).getString("id"));
  265 + }
  266 + list.get(i).setWorkAreaCodeName(((JSONObject)constructionList.get(objIds.indexOf(list.get(i).getObjectId()))).getString("workAreaCodeName"));
  267 +
  268 + list.get(i).setId((long) i + 1);
  269 +
  270 + for (Object object : array) {
  271 + JSONObject jsonObject = (JSONObject) object;
  272 + if (jsonObject.getString("code").equals(list.get(i).getPlace())) {
  273 + list.get(i).setPlace(jsonObject.getString("name"));
  274 + }
  275 + }
  276 +
  277 + }
  278 +
  279 + List<String> withOut = new ArrayList<String>();
  280 +
  281 + if (supervisionThreestep.getHis() != null && supervisionThreestep.getHis().equals("2")) {
  282 + List<SupervisionThreestepWithWorkArea> list2 = new ArrayList<>();
  283 +
  284 + for(SupervisionThreestep t:list){
  285 +
  286 + SupervisionThreestepWithWorkArea s = new SupervisionThreestepWithWorkArea();
  287 + s.setId(t.getId());
  288 + s.setBeginTime(t.getBeginTime());
  289 + s.setCheckEndTime(t.getCheckEndTime());
  290 + s.setStatus(t.getStatus());
  291 + s.setCheckTime(t.getCheckTime());
  292 + s.setName(t.getName());
  293 + s.setType(t.getType());
  294 + s.setPlace(t.getPlace());
  295 + s.setSelfCheckTime(t.getSelfCheckTime());
  296 + s.setWorkAreaCodeName(t.getWorkAreaCodeName());
  297 +
  298 + list2.add(s);
  299 + }
  300 +
  301 +
  302 + ExcelUtil<SupervisionThreestepWithWorkArea> util = new ExcelUtil<SupervisionThreestepWithWorkArea>(SupervisionThreestepWithWorkArea.class);
  303 +
  304 + return util.exportExcel(list2, "ๆŠฅๅทฅ่ฎฐๅฝ•", withOut);
  305 + }
  306 +
  307 + String str = "ๆŠฅๅทฅๆŠฝๆŸฅ";
  308 + if (supervisionThreestep.getStatus() == null) {
  309 + withOut.add("checkEndTime");
  310 + str = "ๆŠฅๅทฅ่‡ชๆŸฅ";
  311 + }
  312 +
  313 +
  314 +
  315 + ExcelUtil<SupervisionThreestep> util = new ExcelUtil<SupervisionThreestep>(SupervisionThreestep.class);
  316 +
  317 + return util.exportExcel(list, str, withOut);
  318 + }
  319 +
  320 + /**
  321 + * ่Žทๅ–ไธ‰ๆŸฅๆœบๅˆถ่ฏฆ็ป†ไฟกๆฏ
  322 + */
  323 + @GetMapping(value = "/{id}")
  324 + public AjaxResult getInfo(@PathVariable("id") Long id) {
  325 + return AjaxResult.success(supervisionThreestepService.selectSupervisionThreestepById(id));
  326 + }
  327 +
  328 + @GetMapping(value = "names")
  329 + public List<String> names(SupervisionThreestep supervisionThreestep) {
  330 + return supervisionThreestepService.getNames(supervisionThreestep);
  331 + }
  332 +
  333 + /**
  334 + * ๆ–ฐๅขžไธ‰ๆŸฅๆœบๅˆถ
  335 + */
  336 + @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.INSERT)
  337 + @PostMapping
  338 + @RepeatSubmit
  339 + public AjaxResult add(@RequestBody SupervisionThreestep supervisionThreestep) {
  340 +
  341 + int i = supervisionThreestepService.insertSupervisionThreestep(supervisionThreestep);
  342 +
  343 + if (i == -1) {
  344 + return AjaxResult.error("ๆ— ๆณ•้‡ๅคๆŠฅๅทฅ");
  345 + }
  346 + if (i == -2) {
  347 + return AjaxResult.error("ๅฝ“ๅ‰ๆ—ถ้—ดๆ— ๆณ•ๆŠฅๅทฅ");
  348 + }
  349 +
  350 + if (i == -3) {
  351 + return AjaxResult.error("้กน็›ฎๅทฒ่ถ…ๆœŸ!");
  352 + }
  353 + if (i == -4) {
  354 + return AjaxResult.error("ๆŠฅๅทฅๆ•ฐๆฎๅผ‚ๅธธ,่ฏทๅˆทๆ–ฐ้กต้ข้‡ๆ–ฐๆไบค!");
  355 + }
  356 +
  357 + return toAjax(i);
  358 + }
  359 +
  360 + /**
  361 + * ไฟฎๆ”นไธ‰ๆŸฅๆœบๅˆถ
  362 + */
  363 + @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.UPDATE)
  364 + @PutMapping
  365 + public AjaxResult edit(@RequestBody SupervisionThreestep supervisionThreestep) {
  366 + return toAjax(supervisionThreestepService.updateSupervisionThreestep(supervisionThreestep));
  367 + }
  368 +
  369 + @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.UPDATE)
  370 + @PostMapping(value = "/active")
  371 + public AjaxResult active(@RequestBody SupervisionThreestep supervisionThreestep) {
  372 +
  373 + supervisionThreestep.setCheckTime(new Date());
  374 + return toAjax(supervisionThreestepService.activeSupervisionThreestep(supervisionThreestep));
  375 + }
  376 +
  377 + /**
  378 + * ๅˆ ้™คไธ‰ๆŸฅๆœบๅˆถ
  379 + */
  380 + @Log(title = "ไธ‰ๆŸฅๆœบๅˆถ", businessType = BusinessType.DELETE)
358 @DeleteMapping("/{ids}") 381 @DeleteMapping("/{ids}")
359 - public AjaxResult remove(@PathVariable Long[] ids)  
360 - {  
361 - return toAjax(supervisionThreestepService.deleteSupervisionThreestepByIds(ids));  
362 - }  
363 -  
364 - @RequestMapping(value = "/upload")  
365 - public String upload(@RequestParam("file") MultipartFile file) throws IOException {  
366 - return supervisionThreestepService.upload(file);  
367 - }  
368 -  
369 -  
370 - @RequestMapping(value = "/download")  
371 - public void download(@RequestParam("path") String path,HttpServletResponse response, HttpServletRequest request) throws IOException {  
372 - try  
373 - {  
374 - String realFileName = path.split("/")[path.split("/").length-1];  
375 - String filePath = trashConfig.getUploadPath() + path.replace("/profile/upload", "");  
376 -  
377 - response.setCharacterEncoding("utf-8");  
378 - response.setContentType("multipart/form-data");  
379 - response.setHeader("Content-Disposition","attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName));  
380 - FileUtils.writeBytes(filePath, response.getOutputStream());  
381 -  
382 - }  
383 - catch (Exception e)  
384 - {  
385 - e.printStackTrace();  
386 - }  
387 - }  
388 -  
389 - @RequestMapping(value = "/getBase64")  
390 - public String getBase64(@RequestParam("path") String path) throws IOException {  
391 - try  
392 - {  
393 - String realFileName = path.split("/")[path.split("/").length-1];  
394 - String filePath = trashConfig.getUploadPath() + path.replace("/profile/upload", "");  
395 -  
396 - File file = new File(filePath);  
397 -  
398 -  
399 - FileInputStream fileInputStream = new FileInputStream(file);  
400 -  
401 - byte[] bytes = new byte[fileInputStream.available()];  
402 -  
403 - fileInputStream.read(bytes);  
404 -  
405 - return Base64Utils.encodeToString(bytes);  
406 -  
407 - }  
408 - catch (Exception e)  
409 - {  
410 - e.printStackTrace();  
411 - }  
412 - return null;  
413 - } 382 + public AjaxResult remove(@PathVariable Long[] ids) {
  383 + return toAjax(supervisionThreestepService.deleteSupervisionThreestepByIds(ids));
  384 + }
  385 +
  386 + @RequestMapping(value = "/upload")
  387 + public String upload(@RequestParam("file") MultipartFile file) throws IOException {
  388 + return supervisionThreestepService.upload(file);
  389 + }
  390 +
  391 + @RequestMapping(value = "/download")
  392 + public void download(@RequestParam("path") String path, HttpServletResponse response, HttpServletRequest request)
  393 + throws IOException {
  394 + try {
  395 + String realFileName = path.split("/")[path.split("/").length - 1];
  396 + String filePath = trashConfig.getUploadPath() + path.replace("/profile/upload", "");
  397 +
  398 + response.setCharacterEncoding("utf-8");
  399 + response.setContentType("multipart/form-data");
  400 + response.setHeader("Content-Disposition",
  401 + "attachment;fileName=" + FileUtils.setFileDownloadHeader(request, realFileName));
  402 + FileUtils.writeBytes(filePath, response.getOutputStream());
  403 +
  404 + } catch (Exception e) {
  405 + e.printStackTrace();
  406 + }
  407 + }
  408 +
  409 + @RequestMapping(value = "/getBase64")
  410 + public String getBase64(@RequestParam("path") String path) throws IOException {
  411 + try {
  412 + String realFileName = path.split("/")[path.split("/").length - 1];
  413 + String filePath = trashConfig.getUploadPath() + path.replace("/profile/upload", "");
  414 +
  415 + File file = new File(filePath);
  416 +
  417 + FileInputStream fileInputStream = new FileInputStream(file);
  418 +
  419 + byte[] bytes = new byte[fileInputStream.available()];
  420 +
  421 + fileInputStream.read(bytes);
  422 +
  423 + return Base64Utils.encodeToString(bytes);
  424 +
  425 + } catch (Exception e) {
  426 + e.printStackTrace();
  427 + }
  428 + return null;
  429 + }
414 } 430 }
trash-workFlow/src/main/java/com/trash/business/controller/TruckCreditController.java
@@ -120,7 +120,7 @@ public class TruckCreditController extends BaseController @@ -120,7 +120,7 @@ public class TruckCreditController extends BaseController
120 { 120 {
121 truckCredit.setCreateBy(SecurityUtils.getUsername()); 121 truckCredit.setCreateBy(SecurityUtils.getUsername());
122 truckCredit.setTime(new Date()); 122 truckCredit.setTime(new Date());
123 - return toAjax(truckCreditService.insertTruckCredit(truckCredit)); 123 + return toAjax(truckCreditService.insertTruckCredit(truckCredit,0));
124 } 124 }
125 125
126 /** 126 /**
@@ -130,7 +130,7 @@ public class TruckCreditController extends BaseController @@ -130,7 +130,7 @@ public class TruckCreditController extends BaseController
130 @PutMapping 130 @PutMapping
131 public AjaxResult edit(@RequestBody TruckCredit truckCredit) 131 public AjaxResult edit(@RequestBody TruckCredit truckCredit)
132 { 132 {
133 - return toAjax(truckCreditService.updateTruckCredit(truckCredit)); 133 + return toAjax(truckCreditService.updateTruckCredit(truckCredit,0));
134 } 134 }
135 135
136 /** 136 /**
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionThreestep.java
@@ -76,6 +76,8 @@ public class SupervisionThreestep extends BaseEntity @@ -76,6 +76,8 @@ public class SupervisionThreestep extends BaseEntity
76 /** ่ฟ่พ“่ฝฆ่พ† */ 76 /** ่ฟ่พ“่ฝฆ่พ† */
77 private String companyTrucks; 77 private String companyTrucks;
78 78
  79 + private String workAreaCodeName;
  80 +
79 private String img0; 81 private String img0;
80 82
81 private String img1; 83 private String img1;
@@ -145,6 +147,16 @@ public class SupervisionThreestep extends BaseEntity @@ -145,6 +147,16 @@ public class SupervisionThreestep extends BaseEntity
145 147
146 private String his; 148 private String his;
147 149
  150 +
  151 +
  152 + public String getWorkAreaCodeName() {
  153 + return workAreaCodeName;
  154 + }
  155 +
  156 + public void setWorkAreaCodeName(String workAreaCodeName) {
  157 + this.workAreaCodeName = workAreaCodeName;
  158 + }
  159 +
148 private List<String> ids; 160 private List<String> ids;
149 161
150 162
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionThreestepWithWorkArea.java 0 โ†’ 100644
  1 +package com.trash.business.domain;
  2 +
  3 +import java.util.Date;
  4 +import java.util.List;
  5 +
  6 +import com.alibaba.druid.sql.visitor.functions.If;
  7 +import com.fasterxml.jackson.annotation.JsonFormat;
  8 +import org.apache.commons.lang3.builder.ToStringBuilder;
  9 +import org.apache.commons.lang3.builder.ToStringStyle;
  10 +import com.trash.common.annotation.Excel;
  11 +import com.trash.common.core.domain.BaseEntity;
  12 +
  13 +/**
  14 + * ไธ‰ๆŸฅๆœบๅˆถๅฏน่ฑก supervision_threestep
  15 + *
  16 + * @author trash
  17 + * @date 2023-04-24
  18 + */
  19 +public class SupervisionThreestepWithWorkArea extends BaseEntity
  20 +{
  21 + /**
  22 + *
  23 + */
  24 + private static final long serialVersionUID = 1L;
  25 +
  26 + /** ๅบๅท */
  27 + @Excel(name = "ๅบๅท")
  28 + private Long id;
  29 +
  30 + /** ้กน็›ฎ็ฑปๅž‹ ๅค„็†ๅœบๆ‰€/ๅทฅๅœฐ */
  31 + @Excel(name = "้กน็›ฎ็ฑปๅž‹",readConverterExp = "0=ๅทฅๅœฐ,1=ๅค„็†ๅœบๆ‰€")
  32 + private Long type;
  33 +
  34 + /** ๅทฅๅœฐๅ็งฐ */
  35 + @Excel(name = "้กน็›ฎๅ็งฐ")
  36 + private String name;
  37 + /** ็ฎก่พ–ๅŒบ */
  38 + @Excel(name = "็ฎก่พ–ๅŒบ")
  39 + private String place;
  40 +
  41 + /** ่‡ชๆŸฅๆ—ถ้—ด */
  42 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  43 + @Excel(name = "่‡ชๆŸฅๆ—ถ้—ด", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
  44 + private Date selfCheckTime;
  45 +
  46 + /** ๆฃ€ๆŸฅๆ—ถ้—ด */
  47 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  48 + @Excel(name = "ๅทกๆŸฅๆ—ถ้—ด", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
  49 + private Date checkTime;
  50 +
  51 +
  52 + /** ๆฃ€ๆŸฅๆ—ถ้—ด */
  53 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  54 + @Excel(name = "ๆŠฝๆŸฅๆ—ถ้—ด", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
  55 + private Date checkEndTime;
  56 +
  57 +
  58 + @Excel(name = "ๆŠฅๅทฅ็Šถๆ€",readConverterExp = "0=ๅพ…ๅทกๆŸฅ,1=ๅทกๆŸฅ้€š่ฟ‡,2=ๅทกๆŸฅ้ฉณๅ›ž,3=ๅœๅทฅ")
  59 + private Long status;
  60 +
  61 +
  62 + @Excel(name = "ๅทฅไฝœๅŒบๅŸŸ")
  63 + private String workAreaCodeName;
  64 +
  65 +
  66 +
  67 + public String getWorkAreaCodeName() {
  68 + return workAreaCodeName;
  69 + }
  70 +
  71 + public void setWorkAreaCodeName(String workAreaCodeName) {
  72 + this.workAreaCodeName = workAreaCodeName;
  73 + }
  74 +
  75 + private List<String> ids;
  76 +
  77 +
  78 +
  79 +
  80 + public List<String> getIds() {
  81 + return ids;
  82 + }
  83 +
  84 + public void setIds(List<String> ids) {
  85 + this.ids = ids;
  86 + }
  87 +
  88 +
  89 +
  90 + public Date getCheckEndTime() {
  91 + return checkEndTime;
  92 + }
  93 +
  94 + public void setCheckEndTime(Date checkEndTime) {
  95 + this.checkEndTime = checkEndTime;
  96 + }
  97 +
  98 + public Long getStatus() {
  99 + return status;
  100 + }
  101 +
  102 + public void setStatus(Long status) {
  103 + this.status = status;
  104 + }
  105 +
  106 + /** ็Žฐๅœบ่ดŸ่ดฃไบบ */
  107 + private String person;
  108 +
  109 + /** ็”ต่ฏ */
  110 + private String phone;
  111 +
  112 +
  113 +
  114 + private String createBy;
  115 +
  116 +
  117 + public void setId(Long id)
  118 + {
  119 + this.id = id;
  120 + }
  121 +
  122 + public Long getId()
  123 + {
  124 + return id;
  125 + }
  126 + public void setName(String name)
  127 + {
  128 + this.name = name;
  129 + }
  130 +
  131 + public String getName()
  132 + {
  133 + return name;
  134 + }
  135 + public void setType(Long type)
  136 + {
  137 + this.type = type;
  138 + }
  139 +
  140 + public Long getType()
  141 + {
  142 + return type;
  143 + }
  144 + public void setPlace(String place)
  145 + {
  146 + this.place = place;
  147 + }
  148 +
  149 + public String getPlace()
  150 + {
  151 + return place;
  152 + }
  153 + public void setSelfCheckTime(Date selfCheckTime)
  154 + {
  155 + this.selfCheckTime = selfCheckTime;
  156 + }
  157 +
  158 + public Date getSelfCheckTime()
  159 + {
  160 + return selfCheckTime;
  161 + }
  162 + public void setCheckTime(Date checkTime)
  163 + {
  164 + this.checkTime = checkTime;
  165 + }
  166 +
  167 + public Date getCheckTime()
  168 + {
  169 + return checkTime;
  170 + }
  171 +
  172 + public void setPerson(String person)
  173 + {
  174 + this.person = person;
  175 + }
  176 +
  177 + public String getPerson()
  178 + {
  179 + return person;
  180 + }
  181 + public void setPhone(String phone)
  182 + {
  183 + this.phone = phone;
  184 + }
  185 +
  186 + public String getPhone()
  187 + {
  188 + return phone;
  189 + }
  190 +
  191 +
  192 +
  193 + public String getCreateBy() {
  194 + return createBy;
  195 + }
  196 +
  197 + public void setCreateBy(String create_by) {
  198 + this.createBy = create_by;
  199 + }
  200 +
  201 +}
trash-workFlow/src/main/java/com/trash/business/domain/ThreestepHistory.java
@@ -34,6 +34,10 @@ public class ThreestepHistory extends BaseEntity @@ -34,6 +34,10 @@ public class ThreestepHistory extends BaseEntity
34 /** ๆ‰€ๅฑžๅŒบๅŸŸ */ 34 /** ๆ‰€ๅฑžๅŒบๅŸŸ */
35 @Excel(name = "ๆ‰€ๅฑžๅŒบๅŸŸ") 35 @Excel(name = "ๆ‰€ๅฑžๅŒบๅŸŸ")
36 private String place; 36 private String place;
  37 +
  38 + /** ๆ‰€ๅฑžๅŒบๅŸŸ */
  39 + @Excel(name = "ๅทฅไฝœๅŒบๅŸŸ")
  40 + private String workAreaCodeName;
37 41
38 42
39 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 43 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@@ -71,7 +75,17 @@ public class ThreestepHistory extends BaseEntity @@ -71,7 +75,17 @@ public class ThreestepHistory extends BaseEntity
71 @Excel(name = "่”็ณปๆ–นๅผ ") 75 @Excel(name = "่”็ณปๆ–นๅผ ")
72 private String person1Number; 76 private String person1Number;
73 77
74 - public Date getCreateTime() { 78 +
  79 +
  80 + public String getWorkAreaCodeName() {
  81 + return workAreaCodeName;
  82 + }
  83 +
  84 + public void setWorkAreaCodeName(String workAreaCodeName) {
  85 + this.workAreaCodeName = workAreaCodeName;
  86 + }
  87 +
  88 + public Date getCreateTime() {
75 return createTime; 89 return createTime;
76 } 90 }
77 91
trash-workFlow/src/main/java/com/trash/business/domain/dayWork.java
@@ -43,6 +43,16 @@ public class dayWork extends BaseEntity @@ -43,6 +43,16 @@ public class dayWork extends BaseEntity
43 /** ็ฎก่พ–ๅŒบ */ 43 /** ็ฎก่พ–ๅŒบ */
44 @Excel(name = "ๆ‰€ๅฑžๅŒบๅŸŸ") 44 @Excel(name = "ๆ‰€ๅฑžๅŒบๅŸŸ")
45 private String eplace; 45 private String eplace;
  46 +
  47 + /** ็ฎก่พ–ๅŒบ */
  48 + @Excel(name = "ไฝœไธšๅŒบๅŸŸ")
  49 + private String workAreaCodeName;
  50 +
  51 + @Excel(name = "ๆŠ•่ต„็ฑปๅž‹")
  52 + private String siteInvestmentTypeName;
  53 +
  54 + @Excel(name = "ๆ–ฝๅทฅๅœฐๅ€")
  55 + private String address;
46 56
47 @Excel(name = "ๅผ€ๅทฅ็Šถๆ€") 57 @Excel(name = "ๅผ€ๅทฅ็Šถๆ€")
48 private String estatus; 58 private String estatus;
@@ -54,6 +64,31 @@ public class dayWork extends BaseEntity @@ -54,6 +64,31 @@ public class dayWork extends BaseEntity
54 @Excel(name = "ๅค‡ๆณจ") 64 @Excel(name = "ๅค‡ๆณจ")
55 private String descript; 65 private String descript;
56 66
  67 +
  68 +
  69 + public String getWorkAreaCodeName() {
  70 + return workAreaCodeName;
  71 + }
  72 +
  73 + public void setWorkAreaCodeName(String workAreaCodeName) {
  74 + this.workAreaCodeName = workAreaCodeName;
  75 + }
  76 +
  77 + public String getSiteInvestmentTypeName() {
  78 + return siteInvestmentTypeName;
  79 + }
  80 +
  81 + public void setSiteInvestmentTypeName(String siteInvestmentTypeName) {
  82 + this.siteInvestmentTypeName = siteInvestmentTypeName;
  83 + }
  84 +
  85 + public String getAddress() {
  86 + return address;
  87 + }
  88 +
  89 + public void setAddress(String address) {
  90 + this.address = address;
  91 + }
57 92
58 public String getName() { 93 public String getName() {
59 return name; 94 return name;
trash-workFlow/src/main/java/com/trash/business/mapper/SmsMapper.java 0 โ†’ 100644
  1 +package com.trash.business.mapper;
  2 +
  3 +import org.apache.ibatis.annotations.Param;
  4 +
  5 +import com.trash.activiti.domain.vo.ActReDeploymentVO;
  6 +
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +import java.util.Set;
  10 +
  11 +/**
  12 + * ๆฑ‡่ฎฏๆ•ฐ็ ็ง‘ๆŠ€(ๆทฑๅœณ)ๆœ‰้™ๅ…ฌๅธ
  13 + * ๅˆ›ๅปบๆ—ฅๆœŸ:2020/10/23-15:47
  14 + * ็‰ˆๆœฌ ๅผ€ๅ‘่€… ๆ—ฅๆœŸ
  15 + * 1.0 Danny 2020/10/23
  16 + */
  17 +public interface SmsMapper {
  18 +
  19 + public String getPhoneNumber(@Param("type")String type ,@Param("checkpoint") String checkpoint);
  20 +
  21 +}
trash-workFlow/src/main/java/com/trash/business/service/IConstructionCreditService.java
@@ -2,7 +2,9 @@ package com.trash.business.service; @@ -2,7 +2,9 @@ package com.trash.business.service;
2 2
3 import java.util.List; 3 import java.util.List;
4 4
  5 +import com.alibaba.fastjson.JSONArray;
5 import com.trash.business.domain.ConstructionCredit; 6 import com.trash.business.domain.ConstructionCredit;
  7 +import com.trash.business.mapper.SmsMapper;
6 8
7 /** 9 /**
8 * ไธ‰ๆŸฅๆœบๅˆถServiceๆŽฅๅฃ 10 * ไธ‰ๆŸฅๆœบๅˆถServiceๆŽฅๅฃ
@@ -65,4 +67,6 @@ public interface IConstructionCreditService @@ -65,4 +67,6 @@ public interface IConstructionCreditService
65 List<String> getPlaces(ConstructionCredit constructionCredit); 67 List<String> getPlaces(ConstructionCredit constructionCredit);
66 68
67 List<ConstructionCredit> selectConstructionCreditHistory(ConstructionCredit constructionCredit); 69 List<ConstructionCredit> selectConstructionCreditHistory(ConstructionCredit constructionCredit);
  70 +
  71 + void sendCreditSMS(String objectId , String name,String reason,long lost,JSONArray array,String smsType,SmsMapper smsMapper,String phone,String phone1);
68 } 72 }
trash-workFlow/src/main/java/com/trash/business/service/ITruckCreditService.java
@@ -28,7 +28,7 @@ public interface ITruckCreditService { @@ -28,7 +28,7 @@ public interface ITruckCreditService {
28 * @param truckCredit ่ฝฆ่พ†ๅคฑไฟก 28 * @param truckCredit ่ฝฆ่พ†ๅคฑไฟก
29 * @return ็ป“ๆžœ 29 * @return ็ป“ๆžœ
30 */ 30 */
31 - int insertTruckCredit(TruckCredit truckCredit); 31 + int insertTruckCredit(TruckCredit truckCredit,int isCompany);
32 32
33 /** 33 /**
34 * ไฟฎๆ”น่ฝฆ่พ†ๅคฑไฟก 34 * ไฟฎๆ”น่ฝฆ่พ†ๅคฑไฟก
@@ -36,7 +36,7 @@ public interface ITruckCreditService { @@ -36,7 +36,7 @@ public interface ITruckCreditService {
36 * @param truckCredit ่ฝฆ่พ†ๅคฑไฟก 36 * @param truckCredit ่ฝฆ่พ†ๅคฑไฟก
37 * @return ็ป“ๆžœ 37 * @return ็ป“ๆžœ
38 */ 38 */
39 - int updateTruckCredit(TruckCredit truckCredit); 39 + int updateTruckCredit(TruckCredit truckCredit,int i);
40 40
41 /** 41 /**
42 * ๅˆ ้™ค่ฝฆ่พ†ๅคฑไฟก 42 * ๅˆ ้™ค่ฝฆ่พ†ๅคฑไฟก
trash-workFlow/src/main/java/com/trash/business/service/impl/CompanyCreditServiceImpl.java
@@ -21,6 +21,9 @@ import com.trash.business.service.ITruckCreditService; @@ -21,6 +21,9 @@ import com.trash.business.service.ITruckCreditService;
21 import com.trash.common.core.redis.RedisCache; 21 import com.trash.common.core.redis.RedisCache;
22 import com.trash.common.utils.RemoteServerUtils; 22 import com.trash.common.utils.RemoteServerUtils;
23 import com.trash.common.utils.SecurityUtils; 23 import com.trash.common.utils.SecurityUtils;
  24 +import com.trash.common.utils.util.PostSms;
  25 +import com.trash.common.utils.vo.mt.JsonSmsSend;
  26 +import com.trash.common.utils.vo.mt.Mobile;
24 27
25 /** 28 /**
26 * ไผไธšๅคฑไฟกServiceไธšๅŠกๅฑ‚ๅค„็† 29 * ไผไธšๅคฑไฟกServiceไธšๅŠกๅฑ‚ๅค„็†
@@ -130,7 +133,9 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService { @@ -130,7 +133,9 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
130 } 133 }
131 134
132 updateRemoteCompanyAndTruck(companyCredit, token); 135 updateRemoteCompanyAndTruck(companyCredit, token);
133 - 136 +
  137 +
  138 +
134 return; 139 return;
135 } 140 }
136 141
@@ -138,7 +143,51 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService { @@ -138,7 +143,51 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
138 public void updateRemoteCompanyAndTruck(CompanyCredit companyCredit, String token) { 143 public void updateRemoteCompanyAndTruck(CompanyCredit companyCredit, String token) {
139 long credit = companyCredit.getLostCredit(); 144 long credit = companyCredit.getLostCredit();
140 String companyId = companyCredit.getObjectId(); 145 String companyId = companyCredit.getObjectId();
  146 +
  147 + JSONArray array = redisCache.getCacheObject("companyList");
  148 +
  149 + String number = null;
  150 + for(Object obj:array){
  151 + JSONObject json = (JSONObject)obj;
  152 + if(companyId.equals(json.getString("id"))){
  153 + number = json.getString("principalPhoneNo"); //ไผไธšๅฎ‰ๅ…จ่ดŸ่ดฃไบบ
  154 + break;
  155 + }
  156 + }
  157 +
  158 + List<Mobile> mobileList=new ArrayList<Mobile>();
141 159
  160 +
  161 + //TODO...test
  162 + number = "19520553054"; //LPF!
  163 +
  164 +
  165 + if(number != null){
  166 + Mobile mobile=new Mobile();
  167 + mobile.setMobile(number);
  168 + mobileList.add(mobile);
  169 +
  170 + String smsString = "";
  171 + if(companyCredit.getLostCredit() == 1){
  172 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟกๆ้†’๏ผš"+companyCredit.getName()+"ๅ› "+companyCredit.getReason()+"ๅŽŸๅ› ๏ผŒ่ขซ็บณๅ…ฅๅคฑไฟกๅๅ•๏ผŒๅฐ†ๅฝฑๅ“ๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏทๅŠๆ—ถๅค„็†ใ€‚";
  173 + }else{
  174 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟก่งฃ้™คๆ้†’๏ผš"+companyCredit.getName()+"็Žฐๅทฒ่งฃ้™คๅคฑไฟก๏ผŒๅฏไปฅ่ฟ›่กŒๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏท็Ÿฅๆ‚‰ใ€‚";
  175 + }
  176 +
  177 +
  178 +
  179 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  180 + if(jsonSmsSend!=null){
  181 + if(jsonSmsSend.getState()==0){
  182 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  183 + }else{
  184 + System.out.println(jsonSmsSend.getMessage());
  185 + }
  186 + }else{
  187 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  188 + }
  189 + }
  190 +
142 List<Map> cpcList = new ArrayList<>(); 191 List<Map> cpcList = new ArrayList<>();
143 Map cpc = new HashedMap<>(); 192 Map cpc = new HashedMap<>();
144 cpc.put("dishonestState", credit); 193 cpc.put("dishonestState", credit);
@@ -181,7 +230,7 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService { @@ -181,7 +230,7 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
181 if (credit == 0 && (data.getCreateType() != null && data.getCreateType() == 1)) { 230 if (credit == 0 && (data.getCreateType() != null && data.getCreateType() == 1)) {
182 data.setLostCredit(credit); 231 data.setLostCredit(credit);
183 data.setReason("ๅ…ฌๅธๅคฑไฟกๆขๅค"); 232 data.setReason("ๅ…ฌๅธๅคฑไฟกๆขๅค");
184 - truckService.updateTruckCredit(data); 233 + truckService.updateTruckCredit(data,1);
185 Map upParam = new HashedMap<>(); 234 Map upParam = new HashedMap<>();
186 upParam.put("creditStatus", credit); 235 upParam.put("creditStatus", credit);
187 upParam.put("id", truckId); 236 upParam.put("id", truckId);
@@ -218,7 +267,7 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService { @@ -218,7 +267,7 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
218 267
219 data.setObjectId(truckId); 268 data.setObjectId(truckId);
220 269
221 - truckService.insertTruckCredit(data); 270 + truckService.insertTruckCredit(data,1);
222 271
223 Map upParam = new HashedMap<>(); 272 Map upParam = new HashedMap<>();
224 upParam.put("creditStatus", credit); 273 upParam.put("creditStatus", credit);
trash-workFlow/src/main/java/com/trash/business/service/impl/ConstructionCreditServiceImpl.java
@@ -15,10 +15,14 @@ import com.alibaba.fastjson.JSONObject; @@ -15,10 +15,14 @@ import com.alibaba.fastjson.JSONObject;
15 import com.trash.business.domain.CompanyCredit; 15 import com.trash.business.domain.CompanyCredit;
16 import com.trash.business.domain.ConstructionCredit; 16 import com.trash.business.domain.ConstructionCredit;
17 import com.trash.business.mapper.ConstructionCreditMapper; 17 import com.trash.business.mapper.ConstructionCreditMapper;
  18 +import com.trash.business.mapper.SmsMapper;
18 import com.trash.business.service.IConstructionCreditService; 19 import com.trash.business.service.IConstructionCreditService;
19 import com.trash.common.core.redis.RedisCache; 20 import com.trash.common.core.redis.RedisCache;
20 import com.trash.common.utils.RemoteServerUtils; 21 import com.trash.common.utils.RemoteServerUtils;
21 import com.trash.common.utils.SecurityUtils; 22 import com.trash.common.utils.SecurityUtils;
  23 +import com.trash.common.utils.util.PostSms;
  24 +import com.trash.common.utils.vo.mt.JsonSmsSend;
  25 +import com.trash.common.utils.vo.mt.Mobile;
22 26
23 /** 27 /**
24 * ไธ‰ๆŸฅๆœบๅˆถServiceไธšๅŠกๅฑ‚ๅค„็† 28 * ไธ‰ๆŸฅๆœบๅˆถServiceไธšๅŠกๅฑ‚ๅค„็†
@@ -31,7 +35,10 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService @@ -31,7 +35,10 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService
31 { 35 {
32 @Autowired 36 @Autowired
33 private ConstructionCreditMapper constructionCreditMapper; 37 private ConstructionCreditMapper constructionCreditMapper;
34 - 38 +
  39 + @Autowired
  40 + SmsMapper smsMapper;
  41 +
35 42
36 @Autowired 43 @Autowired
37 RedisCache redis; 44 RedisCache redis;
@@ -134,7 +141,6 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService @@ -134,7 +141,6 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService
134 public int insertConstructionCredit(ConstructionCredit constructionCredit) 141 public int insertConstructionCredit(ConstructionCredit constructionCredit)
135 { 142 {
136 143
137 -  
138 List<Map> map = new ArrayList<Map>(); 144 List<Map> map = new ArrayList<Map>();
139 145
140 ConstructionCredit cc = new ConstructionCredit(); 146 ConstructionCredit cc = new ConstructionCredit();
@@ -150,19 +156,137 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService @@ -150,19 +156,137 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService
150 if(old.size() > 0){ 156 if(old.size() > 0){
151 i = 1; 157 i = 1;
152 }else{ 158 }else{
153 -  
154 - Map param = new HashMap();  
155 - param.put("objectId", constructionCredit.getObjectId());  
156 - param.put("creditStatus", constructionCredit.getLostCredit());  
157 - map.add(param);  
158 -  
159 - RemoteServerUtils.updateConstationCreditAndStatus(map);  
160 i = constructionCreditMapper.insertConstructionCredit(constructionCredit); 159 i = constructionCreditMapper.insertConstructionCredit(constructionCredit);
161 } 160 }
  161 +
  162 +
  163 + Map param = new HashMap();
  164 + param.put("objectId", constructionCredit.getObjectId());
  165 + param.put("creditStatus", constructionCredit.getLostCredit());
  166 + map.add(param);
  167 + RemoteServerUtils.updateConstationCreditAndStatus(map);
  168 +
  169 + JSONArray array = redis.getCacheObject("constructionList");
  170 +
  171 + sendCreditSMS(constructionCredit.getObjectId(),
  172 + constructionCredit.getName(),constructionCredit.getReason(),
  173 + constructionCredit.getLostCredit(),array,"credit",smsMapper,"constructionCompanyPhone","projectnCompanyPhone");
162 174
163 return i; 175 return i;
164 } 176 }
  177 +
  178 +
  179 +
  180 +
  181 + public void sendCreditSMS(String objectId , String name,String reason,long lost,JSONArray array,String smsType,SmsMapper smsMapper,String phone,String phone1) {
  182 +
  183 + String number = null;
  184 + List<Mobile> mobileList=new ArrayList<Mobile>();
  185 + String areaCode = null;
  186 +
  187 + for(Object obj:array){
  188 + JSONObject json = (JSONObject)obj;
  189 + if(objectId.equals(json.getString("id"))){
  190 +
  191 + areaCode = json.getString("areaCode");
  192 +
  193 + String p = json.getString(phone);
  194 + if(p!=null){
  195 + Mobile mobile=new Mobile();
  196 + mobile.setMobile(p);
  197 + mobileList.add(mobile);
  198 + }
  199 +
  200 + if(phone1!=null){
  201 + String p1 = json.getString(phone1);
  202 + if(p1 != null){
  203 + Mobile mobile2=new Mobile();
  204 + mobile2.setMobile(p1);
  205 + mobileList.add(mobile2);
  206 + }
  207 + }
  208 +
  209 +
  210 + break;
  211 + }
  212 + }
  213 +
  214 +
  215 +
  216 + mobileList.clear();
  217 +
  218 + //TODO...test
  219 + number = "19520553054"; //LPF!
  220 + Mobile mobile=new Mobile();
  221 + mobile.setMobile(number);
  222 + mobileList.add(mobile);
  223 +
  224 + if(number != null){
  225 +
  226 + String smsString = "";
  227 + if(lost == 1){
  228 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟกๆ้†’๏ผš"+name+"ๅ› "+reason+"ๅŽŸๅ› ๏ผŒ่ขซ็บณๅ…ฅๅคฑไฟกๅๅ•๏ผŒๅฐ†ๅฝฑๅ“ๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏทๅŠๆ—ถๅค„็†ใ€‚";
  229 + }else{
  230 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟก่งฃ้™คๆ้†’๏ผš"+name+"็Žฐๅทฒ่งฃ้™คๅคฑไฟก๏ผŒๅฏไปฅ่ฟ›่กŒๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏท็Ÿฅๆ‚‰ใ€‚";
  231 + }
  232 +
  233 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  234 + if(jsonSmsSend!=null){
  235 + if(jsonSmsSend.getState()==0){
  236 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  237 + }else{
  238 + System.out.println(jsonSmsSend.getMessage());
  239 + }
  240 + }else{
  241 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  242 + }
  243 + }
  244 +
  245 + number = smsMapper.getPhoneNumber(smsType, areaCode);
  246 +
  247 + if(number!=null){
  248 + String[] nums = number.split(",");
  249 +
  250 + for(String string:nums){
  251 + mobile=new Mobile();
  252 + mobile.setMobile(number);
  253 + mobileList.add(mobile);
  254 + }
165 255
  256 + }
  257 +
  258 +
  259 + mobileList.clear();
  260 +
  261 + //TODO...test
  262 + number = "19520553054"; //LPF!
  263 + mobile=new Mobile();
  264 + mobile.setMobile(number);
  265 + mobileList.add(mobile);
  266 +
  267 + if(mobileList.size() > 0){
  268 +
  269 + String smsString = "";
  270 + if(lost == 1){
  271 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟกๆ้†’๏ผš"+name+"ๅ› "+reason+"ๅŽŸๅ› ๏ผŒ่ขซ็บณๅ…ฅๅคฑไฟกๅๅ•๏ผŒๅฐ†ๅฝฑๅ“ๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏทๅŠ ๅผบ็›‘็ฎกใ€‚";
  272 + }else{
  273 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟก่งฃ้™คๆ้†’๏ผšไฝ ่พ–ๅŒบๅ†…"+name+"็Žฐๅทฒ่งฃ้™คๅคฑไฟก๏ผŒๅฏไปฅ่ฟ›่กŒๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏท็Ÿฅๆ‚‰ใ€‚";
  274 + }
  275 +
  276 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  277 + if(jsonSmsSend!=null){
  278 + if(jsonSmsSend.getState()==0){
  279 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  280 + }else{
  281 + System.out.println(jsonSmsSend.getMessage());
  282 + }
  283 + }else{
  284 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  285 + }
  286 + }
  287 +
  288 + }
  289 +
166 /** 290 /**
167 * ไฟฎๆ”นไธ‰ๆŸฅๆœบๅˆถ 291 * ไฟฎๆ”นไธ‰ๆŸฅๆœบๅˆถ
168 * 292 *
trash-workFlow/src/main/java/com/trash/business/service/impl/DriverCreditServiceImpl.java
@@ -19,6 +19,9 @@ import com.trash.common.config.trashConfig; @@ -19,6 +19,9 @@ import com.trash.common.config.trashConfig;
19 import com.trash.common.core.redis.RedisCache; 19 import com.trash.common.core.redis.RedisCache;
20 import com.trash.common.utils.RemoteServerUtils; 20 import com.trash.common.utils.RemoteServerUtils;
21 import com.trash.common.utils.SecurityUtils; 21 import com.trash.common.utils.SecurityUtils;
  22 +import com.trash.common.utils.util.PostSms;
  23 +import com.trash.common.utils.vo.mt.JsonSmsSend;
  24 +import com.trash.common.utils.vo.mt.Mobile;
22 25
23 import org.springframework.transaction.annotation.Transactional; 26 import org.springframework.transaction.annotation.Transactional;
24 27
@@ -33,6 +36,9 @@ public class DriverCreditServiceImpl implements IDriverCreditService @@ -33,6 +36,9 @@ public class DriverCreditServiceImpl implements IDriverCreditService
33 { 36 {
34 @Autowired 37 @Autowired
35 private DriverCreditMapper driverCreditMapper; 38 private DriverCreditMapper driverCreditMapper;
  39 +
  40 + @Autowired
  41 + RedisCache redisCache;
36 42
37 /** 43 /**
38 * ๆŸฅ่ฏข้ฉพ้ฉถๅ‘˜ๅคฑไฟก 44 * ๆŸฅ่ฏข้ฉพ้ฉถๅ‘˜ๅคฑไฟก
@@ -65,7 +71,7 @@ public class DriverCreditServiceImpl implements IDriverCreditService @@ -65,7 +71,7 @@ public class DriverCreditServiceImpl implements IDriverCreditService
65 List<DriverCredit> list = new ArrayList<>(); 71 List<DriverCredit> list = new ArrayList<>();
66 72
67 List<String> companys = SecurityUtils.getLoginUser().getUser().getCompanyIds(); 73 List<String> companys = SecurityUtils.getLoginUser().getUser().getCompanyIds();
68 -List<String> areas = SecurityUtils.getLoginUser().getUser().getCompanyAreas(); 74 + List<String> areas = SecurityUtils.getLoginUser().getUser().getCompanyAreas();
69 75
70 76
71 if(areas.size() > 0) { 77 if(areas.size() > 0) {
@@ -133,6 +139,69 @@ List&lt;String&gt; areas = SecurityUtils.getLoginUser().getUser().getCompanyAreas(); @@ -133,6 +139,69 @@ List&lt;String&gt; areas = SecurityUtils.getLoginUser().getUser().getCompanyAreas();
133 i = driverCreditMapper.insertDriverCredit(driverCredit); 139 i = driverCreditMapper.insertDriverCredit(driverCredit);
134 } 140 }
135 141
  142 + JSONArray array = redisCache.getCacheObject("companyList");
  143 +
  144 +
  145 + JSONArray drivers = RemoteServerUtils.getDriverList();
  146 + String companyId = null;
  147 +
  148 + for(Object obj:drivers){
  149 +
  150 + JSONObject json = (JSONObject)obj;
  151 + if(json.getString("id").equals(driverCredit.getObjectId())){
  152 + companyId = json.getString("companyId");
  153 + }
  154 + }
  155 +
  156 + if(companyId != null){
  157 + String number = null;
  158 + for(Object obj:array){
  159 + JSONObject json = (JSONObject)obj;
  160 + if(companyId.equals(json.getString("id"))){
  161 + number = json.getString("principalPhoneNo"); //ไผไธšๅฎ‰ๅ…จ่ดŸ่ดฃไบบ
  162 + break;
  163 + }
  164 + }
  165 +
  166 + List<Mobile> mobileList=new ArrayList<Mobile>();
  167 +
  168 +
  169 + //TODO...test
  170 + number = "19520553054"; //LPF!
  171 +
  172 +
  173 + if(number != null){
  174 + Mobile mobile=new Mobile();
  175 + mobile.setMobile(number);
  176 + mobileList.add(mobile);
  177 +
  178 + String smsString = "";
  179 + if(driverCredit.getLostCredit() == 1){
  180 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟกๆ้†’๏ผš"+driverCredit.getName()+"ๅ› "+driverCredit.getReason()+"ๅŽŸๅ› ๏ผŒ่ขซ็บณๅ…ฅๅคฑไฟกๅๅ•๏ผŒๅฐ†ๅฝฑๅ“ๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏทๅŠๆ—ถๅค„็†ใ€‚";
  181 + }else{
  182 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟก่งฃ้™คๆ้†’๏ผš"+driverCredit.getName()+"็Žฐๅทฒ่งฃ้™คๅคฑไฟก๏ผŒๅฏไปฅ่ฟ›่กŒๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏท็Ÿฅๆ‚‰ใ€‚";
  183 + }
  184 +
  185 +
  186 +
  187 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  188 + if(jsonSmsSend!=null){
  189 + if(jsonSmsSend.getState()==0){
  190 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  191 + }else{
  192 + System.out.println(jsonSmsSend.getMessage());
  193 + }
  194 + }else{
  195 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  196 + }
  197 + }
  198 + }
  199 +
  200 +
  201 +
  202 +
  203 +
  204 +
136 // sentDataToRemoteServer(driverCredit); 205 // sentDataToRemoteServer(driverCredit);
137 206
138 return i; 207 return i;
trash-workFlow/src/main/java/com/trash/business/service/impl/EarthsitesCreditServiceImpl.java
@@ -9,11 +9,13 @@ import java.util.Map; @@ -9,11 +9,13 @@ import java.util.Map;
9 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
10 import org.springframework.stereotype.Service; 10 import org.springframework.stereotype.Service;
11 import com.trash.business.mapper.EarthsitesCreditMapper; 11 import com.trash.business.mapper.EarthsitesCreditMapper;
  12 +import com.trash.business.mapper.SmsMapper;
12 import com.trash.business.mapper.TruckCreditMapper; 13 import com.trash.business.mapper.TruckCreditMapper;
13 import com.alibaba.fastjson.JSONArray; 14 import com.alibaba.fastjson.JSONArray;
14 import com.alibaba.fastjson.JSONObject; 15 import com.alibaba.fastjson.JSONObject;
15 import com.trash.business.domain.ConstructionCredit; 16 import com.trash.business.domain.ConstructionCredit;
16 import com.trash.business.domain.EarthsitesCredit; 17 import com.trash.business.domain.EarthsitesCredit;
  18 +import com.trash.business.service.IConstructionCreditService;
17 import com.trash.business.service.IEarthsitesCreditService; 19 import com.trash.business.service.IEarthsitesCreditService;
18 import com.trash.common.core.redis.RedisCache; 20 import com.trash.common.core.redis.RedisCache;
19 import com.trash.common.utils.RemoteServerUtils; 21 import com.trash.common.utils.RemoteServerUtils;
@@ -31,6 +33,13 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService @@ -31,6 +33,13 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService
31 @Autowired 33 @Autowired
32 private EarthsitesCreditMapper earthsitesCreditMapper; 34 private EarthsitesCreditMapper earthsitesCreditMapper;
33 35
  36 +
  37 + @Autowired
  38 + private IConstructionCreditService smsServer;
  39 +
  40 + @Autowired
  41 + SmsMapper smsMapper;
  42 +
34 @Autowired 43 @Autowired
35 RedisCache redis; 44 RedisCache redis;
36 /** 45 /**
@@ -114,16 +123,21 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService @@ -114,16 +123,21 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService
114 i = 1; 123 i = 1;
115 }else{ 124 }else{
116 125
117 - Map param = new HashMap();  
118 - param.put("objectId", earthsitesCredit.getObjectId());  
119 - param.put("creditStatus", earthsitesCredit.getLostCredit());  
120 - map.add(param);  
121 -  
122 - RemoteServerUtils.updateEarthSitesCreditAndStatus(map);  
123 -  
124 i = earthsitesCreditMapper.insertEarthsitesCredit(earthsitesCredit); 126 i = earthsitesCreditMapper.insertEarthsitesCredit(earthsitesCredit);
125 } 127 }
126 128
  129 + Map param = new HashMap();
  130 + param.put("objectId", earthsitesCredit.getObjectId());
  131 + param.put("creditStatus", earthsitesCredit.getLostCredit());
  132 + map.add(param);
  133 +
  134 + RemoteServerUtils.updateEarthSitesCreditAndStatus(map);
  135 +
  136 + JSONArray array = redis.getCacheObject("earthSitesList");
  137 +
  138 + smsServer.sendCreditSMS(earthsitesCredit.getObjectId() , earthsitesCredit.getName(),earthsitesCredit.getReason(),
  139 + earthsitesCredit.getLostCredit(),array,"credit",smsMapper,"principalPhoneNo",null);;
  140 +
127 return i; 141 return i;
128 } 142 }
129 143
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
@@ -8,6 +8,7 @@ import java.util.Date; @@ -8,6 +8,7 @@ import java.util.Date;
8 import java.util.HashMap; 8 import java.util.HashMap;
9 import java.util.List; 9 import java.util.List;
10 import java.util.Map; 10 import java.util.Map;
  11 +import java.util.concurrent.TimeUnit;
11 12
12 import org.apache.commons.collections4.map.HashedMap; 13 import org.apache.commons.collections4.map.HashedMap;
13 import org.springframework.beans.factory.annotation.Autowired; 14 import org.springframework.beans.factory.annotation.Autowired;
@@ -122,56 +123,96 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -122,56 +123,96 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
122 } 123 }
123 } 124 }
124 125
125 - 126 + List<String> ids = new ArrayList<>();
126 127
127 - List<String> ids = new ArrayList<>(); 128 + List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList();
  129 + List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas();
  130 + List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas();
128 131
129 - List<String> eLish = SecurityUtils.getLoginUser().getUser().getEarthList();  
130 - List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas();  
131 - List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas();  
132 -  
133 - for(String str:SecurityUtils.getLoginUser().getUser().getConList()){  
134 - ids.add(str);  
135 - }  
136 -  
137 - if(SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0){  
138 -  
139 -  
140 - JSONArray jsonArray = redis.getCacheObject("constructionList");  
141 -  
142 - for(Object obj:jsonArray){  
143 - JSONObject json = (JSONObject) obj;  
144 - if(cArea.indexOf(json.getString("areaCode")) > -1){  
145 - ids.add(json.getString("id"));  
146 - }  
147 - }  
148 - }  
149 -  
150 - for(String str:eLish){  
151 - ids.add(str); 132 +
  133 +
  134 + JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList");
  135 + if (constructionList == null) {
  136 + Map<String, Object> map = new HashMap<>();
  137 + map.put("size", 99999);
  138 + map.put("page", 1);
  139 + constructionList = RemoteServerUtils.getConstructionLedgerList(map);
  140 + if (constructionList != null) {
  141 + redisCache.setCacheObject("constructionLedgerList", constructionList, 60, TimeUnit.MINUTES);
  142 + }
  143 + }
  144 +
  145 + if (supervisionThreestep.getWorkAreaCodeName() != null) {
  146 + JSONArray tempList = new JSONArray();
  147 + for (Object obj : constructionList) {
  148 + JSONObject json = (JSONObject) obj;
  149 + if(!json.getString("workAreaCodeName").equals(supervisionThreestep.getWorkAreaCodeName())){
  150 + continue;
152 } 151 }
153 152
154 - if(eArea.size() > 0){  
155 -  
156 - JSONArray jsonArray = redis.getCacheObject("earthSitesList");  
157 -  
158 - for(Object obj:jsonArray){  
159 - JSONObject json = (JSONObject) obj;  
160 - if(eArea.indexOf(json.getString("areaCode")) > -1){  
161 - ids.add(json.getString("id"));  
162 - }  
163 - } 153 + tempList.add(json);
  154 + if(SecurityUtils.getLoginUser().getUser().getConList().indexOf(json.getString("id")) > -1){
  155 + ids.add(json.getString("id"));
164 } 156 }
165 -  
166 - supervisionThreestep.setIds(ids);  
167 -  
168 - if(ids.size() == 0){  
169 - return list;  
170 - }  
171 - 157 + }
  158 + constructionList = tempList;
  159 + }else{
  160 + ids.addAll(SecurityUtils.getLoginUser().getUser().getConList());
  161 + }
  162 +
  163 +
  164 +
  165 + if (SecurityUtils.getLoginUser().getUser().getConAreas().size() > 0) {
  166 +
  167 + for (Object obj : constructionList) {
  168 + JSONObject json = (JSONObject) obj;
  169 + if (cArea.indexOf(json.getString("areaCode")) > -1) {
  170 +
  171 + ids.add(json.getString("id"));
  172 + }
  173 + }
  174 + }
  175 +
  176 + for (String str : eLish) {
  177 + ids.add(str);
  178 + }
  179 +
  180 + if (eArea.size() > 0) {
  181 +
  182 + JSONArray jsonArray = redis.getCacheObject("earthSitesList");
  183 +
  184 + for (Object obj : jsonArray) {
  185 + JSONObject json = (JSONObject) obj;
  186 + if (eArea.indexOf(json.getString("areaCode")) > -1) {
  187 + ids.add(json.getString("id"));
  188 + }
  189 + }
  190 + }
  191 +
  192 + supervisionThreestep.setIds(ids);
  193 +
  194 + if (ids.size() == 0) {
  195 + return list;
  196 + }
  197 +
172 list = supervisionThreestepMapper.selectSupervisionThreestepList(supervisionThreestep); 198 list = supervisionThreestepMapper.selectSupervisionThreestepList(supervisionThreestep);
  199 + if (supervisionThreestep.getHis() != null && supervisionThreestep.getHis().equals("2")) {
  200 +
  201 + for (SupervisionThreestep t : list) {
  202 + for (Object constObj : constructionList) {
  203 + JSONObject constJSON = (JSONObject) constObj;
  204 +
  205 + if (t.getObjectId().equals(constJSON.getString("id"))) {
  206 + t.setWorkAreaCodeName(constJSON.getString("workAreaCodeName"));
  207 + break;
  208 + }
  209 + }
  210 + }
  211 + }
  212 +
173 213
174 return list; 214 return list;
  215 +
175 } 216 }
176 217
177 @Override 218 @Override
@@ -223,7 +264,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -223,7 +264,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
223 return supervisionThreestepMapper.getNames(supervisionThreestep); 264 return supervisionThreestepMapper.getNames(supervisionThreestep);
224 } 265 }
225 266
226 -  
227 String[] outside = { "้•ฟๆฒ™ๅŽฟ", "ๆœ›ๅŸŽๅŒบ", "ๆต้˜ณๅธ‚", "ๅฎไนกๅธ‚", "ๆ ชๆดฒๅธ‚", "ๆน˜ๆฝญๅธ‚", "ๆฑฉ็ฝ—ๅธ‚", "ๆน˜้˜ดๅŽฟ" }; 267 String[] outside = { "้•ฟๆฒ™ๅŽฟ", "ๆœ›ๅŸŽๅŒบ", "ๆต้˜ณๅธ‚", "ๅฎไนกๅธ‚", "ๆ ชๆดฒๅธ‚", "ๆน˜ๆฝญๅธ‚", "ๆฑฉ็ฝ—ๅธ‚", "ๆน˜้˜ดๅŽฟ" };
228 268
229 @SuppressWarnings("unchecked") 269 @SuppressWarnings("unchecked")
@@ -269,7 +309,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -269,7 +309,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
269 } 309 }
270 310
271 JSONArray contracts = redisCache.getCacheObject("contractList"); 311 JSONArray contracts = redisCache.getCacheObject("contractList");
272 -  
273 if (contracts == null) { 312 if (contracts == null) {
274 Map param = new HashMap<>(); 313 Map param = new HashMap<>();
275 314
@@ -282,6 +321,17 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -282,6 +321,17 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
282 redisCache.setCacheObject("contractList", contracts); 321 redisCache.setCacheObject("contractList", contracts);
283 } 322 }
284 323
  324 + JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList");
  325 + if (constructionList == null) {
  326 + Map<String, Object> map = new HashMap<>();
  327 + map.put("size", 99999);
  328 + map.put("page", 1);
  329 + constructionList = RemoteServerUtils.getConstructionLedgerList(map);
  330 + if (constructionList != null) {
  331 + redisCache.setCacheObject("constructionLedgerList", constructionList, 60, TimeUnit.MINUTES);
  332 + }
  333 + }
  334 +
285 JSONArray areas = redisCache.getCacheObject("areas"); 335 JSONArray areas = redisCache.getCacheObject("areas");
286 336
287 String place = null, eplace = null, name = null, ename = null; 337 String place = null, eplace = null, name = null, ename = null;
@@ -409,6 +459,20 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -409,6 +459,20 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
409 map.put("createTime", yearFomat.format(s.getCreateTime())); 459 map.put("createTime", yearFomat.format(s.getCreateTime()));
410 map.put("name", s.getName()); 460 map.put("name", s.getName());
411 map.put("place", s.getPlace()); 461 map.put("place", s.getPlace());
  462 +
  463 + for (Object constObj : constructionList) {
  464 + JSONObject constJSON = (JSONObject) constObj;
  465 +
  466 + if (!s.getObjectId().equals(constJSON.getString("id")))
  467 + continue;
  468 + else {
  469 + map.put("address", constJSON.getString("address"));
  470 + map.put("siteInvestmentTypeName", constJSON.getString("siteInvestmentTypeName"));
  471 + map.put("workAreaCodeName", constJSON.getString("workAreaCodeName"));
  472 + break;
  473 + }
  474 + }
  475 +
412 map.put("status", "ๅผ€ๅทฅ"); 476 map.put("status", "ๅผ€ๅทฅ");
413 map.put("selfCheckTime", dateTime.format(s.getSelfCheckTime())); 477 map.put("selfCheckTime", dateTime.format(s.getSelfCheckTime()));
414 map.put("objectId", s.getObjectId()); 478 map.put("objectId", s.getObjectId());
@@ -452,6 +516,18 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -452,6 +516,18 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
452 map.put("createTime", yearFomat.format(s.getCreateTime())); 516 map.put("createTime", yearFomat.format(s.getCreateTime()));
453 map.put("name", s.getName()); 517 map.put("name", s.getName());
454 map.put("place", s.getPlace()); 518 map.put("place", s.getPlace());
  519 + for (Object constObj : constructionList) {
  520 + JSONObject constJSON = (JSONObject) constObj;
  521 +
  522 + if (!s.getObjectId().equals(constJSON.getString("id")))
  523 + continue;
  524 + else {
  525 + map.put("address", constJSON.getString("address"));
  526 + map.put("siteInvestmentTypeName", constJSON.getString("siteInvestmentTypeName"));
  527 + map.put("workAreaCodeName", constJSON.getString("workAreaCodeName"));
  528 + break;
  529 + }
  530 + }
455 map.put("status", "ๅผ€ๅทฅ"); 531 map.put("status", "ๅผ€ๅทฅ");
456 map.put("selfCheckTime", dateTime.format(s.getSelfCheckTime())); 532 map.put("selfCheckTime", dateTime.format(s.getSelfCheckTime()));
457 map.put("objectId", s.getObjectId()); 533 map.put("objectId", s.getObjectId());
@@ -488,12 +564,19 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -488,12 +564,19 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
488 eplace = supervisionThreestep.getSubReason(); 564 eplace = supervisionThreestep.getSubReason();
489 } 565 }
490 566
  567 + String workAreaCodeName = supervisionThreestep.getWorkAreaCodeName();
  568 +
491 for (Map<String, String> map : list) { 569 for (Map<String, String> map : list) {
492 if (place != null) { 570 if (place != null) {
493 if (!place.equals(map.get("place"))) { 571 if (!place.equals(map.get("place"))) {
494 continue; 572 continue;
495 } 573 }
496 } 574 }
  575 + if (workAreaCodeName != null) {
  576 + if (!workAreaCodeName.equals(map.get("workAreaCodeName"))) {
  577 + continue;
  578 + }
  579 + }
497 if (eplace != null) { 580 if (eplace != null) {
498 if (!eplace.equals(map.get("eplace"))) { 581 if (!eplace.equals(map.get("eplace"))) {
499 continue; 582 continue;
@@ -519,15 +602,13 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -519,15 +602,13 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
519 602
520 @Override 603 @Override
521 public List<Map> selectDayWorkListByType(SupervisionThreestep supervisionThreestep) { 604 public List<Map> selectDayWorkListByType(SupervisionThreestep supervisionThreestep) {
522 -  
523 605
524 Date date = new Date(); 606 Date date = new Date();
525 SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd"); 607 SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
526 SimpleDateFormat dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 608 SimpleDateFormat dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
527 - if(supervisionThreestep.getWorkStartTime() == null){ 609 + if (supervisionThreestep.getWorkStartTime() == null) {
528 String start, end; 610 String start, end;
529 -  
530 - 611 +
531 if (new Date().getHours() < 8) { 612 if (new Date().getHours() < 8) {
532 end = yearFomat.format(date); 613 end = yearFomat.format(date);
533 date.setDate(date.getDate() - 1); 614 date.setDate(date.getDate() - 1);
@@ -537,10 +618,10 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -537,10 +618,10 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
537 date.setDate(date.getDate() + 1); 618 date.setDate(date.getDate() + 1);
538 end = yearFomat.format(date); 619 end = yearFomat.format(date);
539 } 620 }
540 - 621 +
541 end += " 4:00:00"; 622 end += " 4:00:00";
542 start += " 8:00:00"; 623 start += " 8:00:00";
543 - 624 +
544 try { 625 try {
545 supervisionThreestep.setWorkStartTime(dateTime.parse(start)); 626 supervisionThreestep.setWorkStartTime(dateTime.parse(start));
546 supervisionThreestep.setWorkEndTime(dateTime.parse(end)); 627 supervisionThreestep.setWorkEndTime(dateTime.parse(end));
@@ -614,47 +695,47 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -614,47 +695,47 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
614 } 695 }
615 696
616 List<SupervisionThreestep> data = new ArrayList<>(); 697 List<SupervisionThreestep> data = new ArrayList<>();
617 - 698 +
618 String companyName = SecurityUtils.getLoginUser().getUser().getCompanyName(); 699 String companyName = SecurityUtils.getLoginUser().getUser().getCompanyName();
619 -  
620 -  
621 - 700 +
622 List<SupervisionThreestep> threesteps = supervisionThreestepMapper.selectTodayDataList(supervisionThreestep); 701 List<SupervisionThreestep> threesteps = supervisionThreestepMapper.selectTodayDataList(supervisionThreestep);
623 -  
624 - if(companyName != null){  
625 -  
626 - JSONArray array = redisCache.getCacheObject("constructionList");  
627 -  
628 - for(SupervisionThreestep three:threesteps){  
629 - for(Object obj:array){  
630 - JSONObject con = (JSONObject) obj;  
631 - if(three.getObjectId().equals(con.getString("id"))){  
632 -  
633 - if(con.getString("transportCompany") != null && con.getString("transportCompany").equals(companyName)){  
634 -  
635 - data.add(three);  
636 -  
637 - continue;  
638 - }  
639 -  
640 - JSONArray array2 = RemoteServerUtils.getUnitetransport(con.getString("id"));  
641 -  
642 - for(Object comObj:array2){  
643 - JSONObject company = (JSONObject) comObj;  
644 -  
645 - if(company.getString("companyName") != null && company.getString("companyName").equals(companyName)){  
646 -  
647 - data.add(three);  
648 - break;  
649 - }  
650 - }  
651 - }  
652 - }  
653 - }  
654 - return data; 702 +
  703 + if (companyName != null) {
  704 +
  705 + JSONArray array = redisCache.getCacheObject("constructionList");
  706 +
  707 + for (SupervisionThreestep three : threesteps) {
  708 + for (Object obj : array) {
  709 + JSONObject con = (JSONObject) obj;
  710 + if (three.getObjectId().equals(con.getString("id"))) {
  711 +
  712 + if (con.getString("transportCompany") != null
  713 + && con.getString("transportCompany").equals(companyName)) {
  714 +
  715 + data.add(three);
  716 +
  717 + continue;
  718 + }
  719 +
  720 + JSONArray array2 = RemoteServerUtils.getUnitetransport(con.getString("id"));
  721 +
  722 + for (Object comObj : array2) {
  723 + JSONObject company = (JSONObject) comObj;
  724 +
  725 + if (company.getString("companyName") != null
  726 + && company.getString("companyName").equals(companyName)) {
  727 +
  728 + data.add(three);
  729 + break;
  730 + }
  731 + }
  732 + }
  733 + }
  734 + }
  735 + return data;
655 } 736 }
656 -  
657 - return threesteps; 737 +
  738 + return threesteps;
658 } 739 }
659 740
660 /** 741 /**
@@ -710,49 +791,52 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -710,49 +791,52 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
710 791
711 return -1; 792 return -1;
712 } 793 }
713 -  
714 - if(supervisionThreestep.getType() == 0){  
715 - 794 +
  795 + if (supervisionThreestep.getType() == 0) {
  796 +
716 Object object = RemoteServerUtils.getConstructionLicenseById(supervisionThreestep.getObjectId()); 797 Object object = RemoteServerUtils.getConstructionLicenseById(supervisionThreestep.getObjectId());
717 -  
718 - if(object != null){  
719 - JSONObject jsonObject =(JSONObject) object;  
720 - 798 +
  799 + if (object != null) {
  800 + JSONObject jsonObject = (JSONObject) object;
  801 +
721 long time = new Date().getTime(); 802 long time = new Date().getTime();
722 - 803 +
723 try { 804 try {
724 - if(dateTime.parse(jsonObject.get("effectiveFrom").toString() + " 00:00:00").getTime() > time || dateTime.parse(jsonObject.get("effectiveEnd").toString()+ " 23:59:59").getTime() < time){ 805 + if (dateTime.parse(jsonObject.get("effectiveFrom").toString() + " 00:00:00").getTime() > time
  806 + || dateTime.parse(jsonObject.get("effectiveEnd").toString() + " 23:59:59")
  807 + .getTime() < time) {
725 return -3; 808 return -3;
726 } 809 }
727 } catch (ParseException e) { 810 } catch (ParseException e) {
728 e.printStackTrace(); 811 e.printStackTrace();
729 } 812 }
730 - }else{ 813 + } else {
731 return -4; 814 return -4;
732 } 815 }
733 -  
734 - }else{ 816 +
  817 + } else {
735 Object object = RemoteServerUtils.getEarthSitesInfo(supervisionThreestep.getObjectId()); 818 Object object = RemoteServerUtils.getEarthSitesInfo(supervisionThreestep.getObjectId());
736 -  
737 - if(object != null){  
738 - JSONObject jsonObject =(JSONObject)((JSONObject) object).getJSONObject("site");  
739 - 819 +
  820 + if (object != null) {
  821 + JSONObject jsonObject = (JSONObject) ((JSONObject) object).getJSONObject("site");
  822 +
740 long time = new Date().getTime(); 823 long time = new Date().getTime();
741 - 824 +
742 try { 825 try {
743 - if(dateTime.parse(jsonObject.get("effectiveFrom").toString()+ " 00:00:00").getTime() > time || dateTime.parse(jsonObject.get("effectiveEnd").toString()+ " 23:59:59").getTime() < time){ 826 + if (dateTime.parse(jsonObject.get("effectiveFrom").toString() + " 00:00:00").getTime() > time
  827 + || dateTime.parse(jsonObject.get("effectiveEnd").toString() + " 23:59:59")
  828 + .getTime() < time) {
744 return -3; 829 return -3;
745 } 830 }
746 } catch (ParseException e) { 831 } catch (ParseException e) {
747 e.printStackTrace(); 832 e.printStackTrace();
748 } 833 }
749 -  
750 - }else{ 834 +
  835 + } else {
751 return -4; 836 return -4;
752 } 837 }
753 - 838 +
754 } 839 }
755 -  
756 840
757 supervisionThreestep.setCreateTime(DateUtils.getNowDate()); 841 supervisionThreestep.setCreateTime(DateUtils.getNowDate());
758 supervisionThreestep.setSelfCheckTime(DateUtils.getNowDate()); 842 supervisionThreestep.setSelfCheckTime(DateUtils.getNowDate());
@@ -904,12 +988,11 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer @@ -904,12 +988,11 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
904 truckActivate.setStatus(0L); 988 truckActivate.setStatus(0L);
905 truckActivate.setActivateStatus("0"); 989 truckActivate.setActivateStatus("0");
906 List<TruckActivate> taList = null; 990 List<TruckActivate> taList = null;
907 - try{ 991 + try {
908 taList = truckActivateMapper.selectTruckActivateList(truckActivate); 992 taList = truckActivateMapper.selectTruckActivateList(truckActivate);
909 - }catch(Exception e){ 993 + } catch (Exception e) {
910 e.printStackTrace(); 994 e.printStackTrace();
911 } 995 }
912 -  
913 996
914 for (TruckActivate ta : taList) { 997 for (TruckActivate ta : taList) {
915 unActiveTruck += ta.getObjectId() + ","; 998 unActiveTruck += ta.getObjectId() + ",";
trash-workFlow/src/main/java/com/trash/business/service/impl/ThreestepHistoryServiceImpl.java
1 package com.trash.business.service.impl; 1 package com.trash.business.service.impl;
2 2
3 import java.text.SimpleDateFormat; 3 import java.text.SimpleDateFormat;
  4 +import java.util.ArrayList;
4 import java.util.Date; 5 import java.util.Date;
  6 +import java.util.HashMap;
5 import java.util.List; 7 import java.util.List;
  8 +import java.util.Map;
  9 +import java.util.concurrent.TimeUnit;
6 10
7 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.stereotype.Service; 12 import org.springframework.stereotype.Service;
9 import org.springframework.transaction.annotation.Transactional; 13 import org.springframework.transaction.annotation.Transactional;
10 14
  15 +import com.alibaba.fastjson.JSONArray;
11 import com.alibaba.fastjson.JSONObject; 16 import com.alibaba.fastjson.JSONObject;
12 import com.trash.business.domain.SupervisionThreestep; 17 import com.trash.business.domain.SupervisionThreestep;
13 import com.trash.business.domain.ThreestepHistory; 18 import com.trash.business.domain.ThreestepHistory;
@@ -15,6 +20,7 @@ import com.trash.business.mapper.SupervisionThreestepMapper; @@ -15,6 +20,7 @@ import com.trash.business.mapper.SupervisionThreestepMapper;
15 import com.trash.business.mapper.ThreestepHistoryMapper; 20 import com.trash.business.mapper.ThreestepHistoryMapper;
16 import com.trash.business.service.ISupervisionThreestepService; 21 import com.trash.business.service.ISupervisionThreestepService;
17 import com.trash.business.service.IThreestepHistoryService; 22 import com.trash.business.service.IThreestepHistoryService;
  23 +import com.trash.common.core.redis.RedisCache;
18 import com.trash.common.utils.DateUtils; 24 import com.trash.common.utils.DateUtils;
19 import com.trash.common.utils.RemoteServerUtils; 25 import com.trash.common.utils.RemoteServerUtils;
20 import com.trash.common.utils.SecurityUtils; 26 import com.trash.common.utils.SecurityUtils;
@@ -31,10 +37,11 @@ public class ThreestepHistoryServiceImpl implements IThreestepHistoryService @@ -31,10 +37,11 @@ public class ThreestepHistoryServiceImpl implements IThreestepHistoryService
31 @Autowired 37 @Autowired
32 private ThreestepHistoryMapper threestepHistoryMapper; 38 private ThreestepHistoryMapper threestepHistoryMapper;
33 39
34 -  
35 @Autowired 40 @Autowired
36 private SupervisionThreestepMapper threestepMapper; 41 private SupervisionThreestepMapper threestepMapper;
37 - 42 +
  43 + @Autowired
  44 + RedisCache redisCache;
38 /** 45 /**
39 * ๆŸฅ่ฏขๅผ€ๅœๅทฅ 46 * ๆŸฅ่ฏขๅผ€ๅœๅทฅ
40 * 47 *
@@ -55,8 +62,39 @@ public class ThreestepHistoryServiceImpl implements IThreestepHistoryService @@ -55,8 +62,39 @@ public class ThreestepHistoryServiceImpl implements IThreestepHistoryService
55 */ 62 */
56 @Override 63 @Override
57 public List<ThreestepHistory> selectThreestepHistoryList(ThreestepHistory threestepHistory) 64 public List<ThreestepHistory> selectThreestepHistoryList(ThreestepHistory threestepHistory)
58 - {  
59 - return threestepHistoryMapper.selectThreestepHistoryList(threestepHistory); 65 + {
  66 +
  67 +
  68 + List<ThreestepHistory> list = threestepHistoryMapper.selectThreestepHistoryList(threestepHistory);
  69 +
  70 + JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList");
  71 + List<String> ids = redisCache.getCacheObject("constructionIds");
  72 + if (constructionList == null || ids == null) {
  73 + Map<String, Object> map = new HashMap<>();
  74 + map.put("size", 99999);
  75 + map.put("page", 1);
  76 + constructionList = RemoteServerUtils.getConstructionLedgerList(map);
  77 + if (constructionList != null) {
  78 + ids = new ArrayList();
  79 +
  80 + for(Object object : constructionList){
  81 + JSONObject jsonObject = (JSONObject) object;
  82 + ids.add(jsonObject.getString("id"));
  83 + }
  84 +
  85 + redisCache.setCacheObject("constructionIds", ids, 60, TimeUnit.MINUTES);
  86 + redisCache.setCacheObject("constructionLedgerList", constructionList, 60, TimeUnit.MINUTES);
  87 + }
  88 + }
  89 +
  90 + if(threestepHistory.getType() == 0){
  91 + for(ThreestepHistory th:list){
  92 + if(ids.indexOf(th.getObjectId()) > -1)
  93 + th.setWorkAreaCodeName(((JSONObject)constructionList.get(ids.indexOf(th.getObjectId()))).getString("workAreaCodeName"));
  94 + }
  95 + }
  96 +
  97 + return list;
60 } 98 }
61 99
62 /** 100 /**
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckCreditServiceImpl.java
@@ -20,6 +20,9 @@ import com.trash.business.service.ITruckCreditService; @@ -20,6 +20,9 @@ import com.trash.business.service.ITruckCreditService;
20 import com.trash.common.core.redis.RedisCache; 20 import com.trash.common.core.redis.RedisCache;
21 import com.trash.common.utils.RemoteServerUtils; 21 import com.trash.common.utils.RemoteServerUtils;
22 import com.trash.common.utils.SecurityUtils; 22 import com.trash.common.utils.SecurityUtils;
  23 +import com.trash.common.utils.util.PostSms;
  24 +import com.trash.common.utils.vo.mt.JsonSmsSend;
  25 +import com.trash.common.utils.vo.mt.Mobile;
23 26
24 /** 27 /**
25 * ่ฝฆ่พ†ๅคฑไฟกServiceไธšๅŠกๅฑ‚ๅค„็† 28 * ่ฝฆ่พ†ๅคฑไฟกServiceไธšๅŠกๅฑ‚ๅค„็†
@@ -110,10 +113,11 @@ public class TruckCreditServiceImpl implements ITruckCreditService @@ -110,10 +113,11 @@ public class TruckCreditServiceImpl implements ITruckCreditService
110 * ๆ–ฐๅขž่ฝฆ่พ†ๅคฑไฟก 113 * ๆ–ฐๅขž่ฝฆ่พ†ๅคฑไฟก
111 * 114 *
112 * @param truckCredit ่ฝฆ่พ†ๅคฑไฟก 115 * @param truckCredit ่ฝฆ่พ†ๅคฑไฟก
  116 + * @param isCompany
113 * @return ็ป“ๆžœ 117 * @return ็ป“ๆžœ
114 */ 118 */
115 @Override 119 @Override
116 - public int insertTruckCredit(TruckCredit truckCredit) 120 + public int insertTruckCredit(TruckCredit truckCredit, int isCompany)
117 { 121 {
118 122
119 int i; 123 int i;
@@ -132,11 +136,60 @@ public class TruckCreditServiceImpl implements ITruckCreditService @@ -132,11 +136,60 @@ public class TruckCreditServiceImpl implements ITruckCreditService
132 cc.setTime(new Date()); 136 cc.setTime(new Date());
133 i = truckCreditMapper.insertTruckCredit(truckCredit); 137 i = truckCreditMapper.insertTruckCredit(truckCredit);
134 } 138 }
135 - 139 +
  140 + if(isCompany == 0){
  141 +
  142 +
  143 + JSONArray array = redisCache.getCacheObject("companyList");
  144 +
  145 + String number = null;
  146 + for(Object obj:array){
  147 + JSONObject json = (JSONObject)obj;
  148 + if(truckCredit.getCompanyId().equals(json.getString("name"))){
  149 + number = json.getString("principalPhoneNo"); //ไผไธšๅฎ‰ๅ…จ่ดŸ่ดฃไบบ
  150 + break;
  151 + }
  152 + }
  153 +
  154 + List<Mobile> mobileList=new ArrayList<Mobile>();
  155 +
  156 +
  157 + //TODO...test
  158 + number = "19520553054"; //LPF!
  159 +
  160 +
  161 + if(number != null){
  162 + Mobile mobile=new Mobile();
  163 + mobile.setMobile(number);
  164 + mobileList.add(mobile);
  165 +
  166 + String smsString = "";
  167 + if(truckCredit.getLostCredit() == 1){
  168 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟกๆ้†’๏ผš"+truckCredit.getLicensePlate()+"ๅ› "+truckCredit.getReason()+"ๅŽŸๅ› ๏ผŒ่ขซ็บณๅ…ฅๅคฑไฟกๅๅ•๏ผŒๅฐ†ๅฝฑๅ“ๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏทๅŠๆ—ถๅค„็†ใ€‚";
  169 + }else{
  170 + smsString = "ใ€้•ฟๆฒ™ๆธฃ็ฎกใ€‘ๅคฑไฟก่งฃ้™คๆ้†’๏ผš"+truckCredit.getLicensePlate()+"็Žฐๅทฒ่งฃ้™คๅคฑไฟก๏ผŒๅฏไปฅ่ฟ›่กŒๆธฃๅœŸไธšๅŠกๅŠž็†๏ผŒ่ฏท็Ÿฅๆ‚‰ใ€‚";
  171 + }
  172 +
  173 +
  174 +
  175 + JsonSmsSend jsonSmsSend= PostSms.sendSms(mobileList,smsString);
  176 + if(jsonSmsSend!=null){
  177 + if(jsonSmsSend.getState()==0){
  178 + System.out.println("ๅ‘้€ๆˆๅŠŸ");
  179 + }else{
  180 + System.out.println(jsonSmsSend.getMessage());
  181 + }
  182 + }else{
  183 + System.out.println("ๅ‘้€่ฟ”ๅ›ž็ฉบ");
  184 + }
  185 + }
  186 + }
136 return i; 187 return i;
137 } 188 }
138 189
139 190
  191 +
  192 +
140 /** 193 /**
141 * ไฟฎๆ”น่ฝฆ่พ†ๅคฑไฟก 194 * ไฟฎๆ”น่ฝฆ่พ†ๅคฑไฟก
142 * 195 *
@@ -145,7 +198,7 @@ public class TruckCreditServiceImpl implements ITruckCreditService @@ -145,7 +198,7 @@ public class TruckCreditServiceImpl implements ITruckCreditService
145 */ 198 */
146 @Override 199 @Override
147 @Transactional 200 @Transactional
148 - public int updateTruckCredit(TruckCredit truckCredit) 201 + public int updateTruckCredit(TruckCredit truckCredit,int i)
149 { 202 {
150 TruckCredit cc = null; 203 TruckCredit cc = null;
151 if(truckCredit.getObjectId() != null){ 204 if(truckCredit.getObjectId() != null){
@@ -176,7 +229,7 @@ public class TruckCreditServiceImpl implements ITruckCreditService @@ -176,7 +229,7 @@ public class TruckCreditServiceImpl implements ITruckCreditService
176 229
177 RemoteServerUtils.updateTruckList(listParam); 230 RemoteServerUtils.updateTruckList(listParam);
178 231
179 - return insertTruckCredit(cc); 232 + return insertTruckCredit(cc,i);
180 233
181 } catch (Exception e) { 234 } catch (Exception e) {
182 235
trash-workFlow/src/main/java/com/trash/caseOffline/controller/CaseOfflineController.java
1 package com.trash.caseOffline.controller; 1 package com.trash.caseOffline.controller;
2 2
3 -import java.util.HashMap;  
4 import java.util.List; 3 import java.util.List;
5 -import java.util.Map;  
6 4
7 -import org.springframework.security.access.prepost.PreAuthorize;  
8 import org.springframework.beans.factory.annotation.Autowired; 5 import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.web.bind.annotation.DeleteMapping;
9 import org.springframework.web.bind.annotation.GetMapping; 7 import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.PathVariable;
10 import org.springframework.web.bind.annotation.PostMapping; 9 import org.springframework.web.bind.annotation.PostMapping;
11 import org.springframework.web.bind.annotation.PutMapping; 10 import org.springframework.web.bind.annotation.PutMapping;
12 -import org.springframework.web.bind.annotation.DeleteMapping;  
13 -import org.springframework.web.bind.annotation.PathVariable;  
14 import org.springframework.web.bind.annotation.RequestBody; 11 import org.springframework.web.bind.annotation.RequestBody;
15 import org.springframework.web.bind.annotation.RequestMapping; 12 import org.springframework.web.bind.annotation.RequestMapping;
16 import org.springframework.web.bind.annotation.RestController; 13 import org.springframework.web.bind.annotation.RestController;
  14 +
  15 +import com.alibaba.fastjson.JSONArray;
  16 +import com.alibaba.fastjson.JSONObject;
  17 +import com.trash.caseOffline.domain.CaseOffline;
  18 +import com.trash.caseOffline.service.ICaseOfflineService;
17 import com.trash.common.annotation.Log; 19 import com.trash.common.annotation.Log;
18 import com.trash.common.annotation.RepeatSubmit; 20 import com.trash.common.annotation.RepeatSubmit;
19 import com.trash.common.core.controller.BaseController; 21 import com.trash.common.core.controller.BaseController;
20 import com.trash.common.core.domain.AjaxResult; 22 import com.trash.common.core.domain.AjaxResult;
  23 +import com.trash.common.core.domain.entity.SysDictData;
  24 +import com.trash.common.core.page.TableDataInfo;
  25 +import com.trash.common.core.redis.RedisCache;
21 import com.trash.common.enums.BusinessType; 26 import com.trash.common.enums.BusinessType;
22 -import com.alibaba.fastjson.JSONArray;  
23 -import com.alibaba.fastjson.JSONObject;  
24 -import com.trash.caseOffline.domain.CaseOffline;  
25 -import com.trash.caseOffline.service.ICaseOfflineService;  
26 -import com.trash.casefile.domain.ViolationWarningInformation;  
27 import com.trash.common.utils.RemoteServerUtils; 27 import com.trash.common.utils.RemoteServerUtils;
28 -import com.trash.common.utils.SecurityUtils;  
29 import com.trash.common.utils.poi.ExcelUtil; 28 import com.trash.common.utils.poi.ExcelUtil;
30 -import com.trash.common.core.page.TableDataInfo;  
31 -import com.trash.common.core.redis.RedisCache; 29 +import com.trash.common.utils.spring.SpringUtils;
  30 +import com.trash.system.service.ISysDictTypeService;
32 31
33 /** 32 /**
34 * ็บฟไธ‹ไบคๅŠžๆกˆๅทController 33 * ็บฟไธ‹ไบคๅŠžๆกˆๅทController
@@ -54,11 +53,9 @@ public class CaseOfflineController extends BaseController @@ -54,11 +53,9 @@ public class CaseOfflineController extends BaseController
54 { 53 {
55 startPage(); 54 startPage();
56 55
57 -  
58 -  
59 return getDataTable(caseOfflineService.selectCaseOfflineList(caseOffline)); 56 return getDataTable(caseOfflineService.selectCaseOfflineList(caseOffline));
60 } 57 }
61 - 58 +
62 /** 59 /**
63 * ๅฏผๅ‡บ็บฟไธ‹ไบคๅŠžๆกˆๅทๅˆ—่กจ 60 * ๅฏผๅ‡บ็บฟไธ‹ไบคๅŠžๆกˆๅทๅˆ—่กจ
64 */ 61 */
@@ -67,9 +64,28 @@ public class CaseOfflineController extends BaseController @@ -67,9 +64,28 @@ public class CaseOfflineController extends BaseController
67 public AjaxResult export(CaseOffline caseOffline) 64 public AjaxResult export(CaseOffline caseOffline)
68 { 65 {
69 List<CaseOffline> list = caseOfflineService.selectCaseOfflineList(caseOffline); 66 List<CaseOffline> list = caseOfflineService.selectCaseOfflineList(caseOffline);
  67 +
  68 + List<SysDictData> dicts = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("case_offline_type");
  69 +
70 70
71 for(int i = 0;i<list.size();i++){ 71 for(int i = 0;i<list.size();i++){
72 list.get(i).setId((long)i+1); 72 list.get(i).setId((long)i+1);
  73 + for(SysDictData d:dicts){
  74 + if(d.getDictValue().equals(list.get(i).getType())){
  75 + list.get(i).setType(d.getDictLabel());
  76 + break;
  77 + }
  78 + }
  79 + if (list.get(i).advice4 != null) {
  80 + list.get(i).status1 = "็ป“ๆกˆๅญ˜ๆกฃ";
  81 + }else if (list.get(i).advice1 == null) {
  82 + list.get(i).status1 = "ๆœชๅ›žๅค";
  83 + }else if (list.get(i).advice4 == null && list.get(i).advice3 == null) {
  84 + list.get(i).status1 = "ๅทฒๅ›žๅค";
  85 + }else if (list.get(i).advice4 == null && list.get(i).advice3 != null) {
  86 + list.get(i).status1 = "ๅฎกๆ ธไธญ";
  87 + }
  88 +
73 } 89 }
74 JSONArray areas = RemoteServerUtils.getAreas(); 90 JSONArray areas = RemoteServerUtils.getAreas();
75 91
trash-workFlow/src/main/java/com/trash/caseOffline/domain/CaseOffline.java
@@ -15,97 +15,101 @@ import com.trash.common.core.domain.BaseEntity; @@ -15,97 +15,101 @@ import com.trash.common.core.domain.BaseEntity;
15 * @author trash 15 * @author trash
16 * @date 2023-05-16 16 * @date 2023-05-16
17 */ 17 */
18 -public class CaseOffline extends BaseEntity  
19 -{  
20 - private static final long serialVersionUID = 1L;  
21 -  
22 - /** ๅบๅท */  
23 - @Excel(name = "ๅบๅท")  
24 - private Long id;  
25 -  
26 - /** ๆกˆๅท็ผ–ๅท */  
27 - @Excel(name = "ๆกˆๅท็ผ–ๅท")  
28 - private String number;  
29 -  
30 - /** ๆกˆๅท็ฑปๅž‹ */  
31 - @Excel(name = "ๆกˆๅท็ฑปๅž‹",readConverterExp = "0=ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐ๏ผˆๅซๅค„็†ๅœบๆ‰€๏ผ‰็š„ๆธฃๅœŸ่ฟ่พ“่ฝฆ่พ†ๅ‡บๅœบ่ฝฆ่บซไธๆด๏ผŒ"  
32 - + "่ฝฆ่ฝฎๅธฆๆณฅ,1=ๆœชๆด—่ฝฆๅ‡บๅœบๆˆ–่€…ๅ‡บๅœบๆธ…ๆดไธๅฝปๅบ•,2=ๆธฃๅœŸ่ฟ่พ“่ฝฆ่พ†่ดง็ฎฑ้กถ็›–ๆœชๆŒ‰่ง„ๅฎšๅ…ณ้—ญๅˆฐไฝๆˆ–ๆœชๆŒ‰่ง„ๅฎšๅ’Œๆ ‡ๅ‡†่ฃ…่ฝฝๆธฃๅœŸๅ‡บๅœบ,"  
33 - + "3=้žๆ ธๅ‡†่ฝฆ่พ†่ฟ›ๅ…ฅๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐ่ฟ่พ“ๆธฃๅœŸ,4=ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐๆœชๆŒ‰่ง„ๅฎšๆ—ถ้—ดๅผ€ๅœๅทฅ,"  
34 - + "5=ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐๆด—่ฝฆ่ฎพๆ–ฝ็ญ‰็ ดๆŸใ€ๆœชๆญฃๅธธไฝฟ็”จๅŠๆŽชๆ–ฝไธๅˆฐไฝ็š„,6=ๆธฃๅœŸๅค„็ฝฎๅทฅๅœฐใ€ๅค„็†ๅœบๆ‰€(ๅซๅ›žๅกซๅœบ๏ผ‰ๅ‡บๅ…ฅๅฃไธคไพง50็ฑณ่Œƒๅ›ดๅ†…ๅ‡บ็ŽฐๆธฃๅœŸๆฑกๆŸ“ใ€ๆฑกๆฐดๅค–ๆŽ’็ญ‰็Žฐ่ฑก"  
35 - + "7=ๆ— ่ฎธๅฏๆถˆ็บณ๏ผˆๅทฅ๏ผ‰,8=ๆ— ่ฎธๅฏๆถˆ็บณ๏ผˆๆถˆ๏ผ‰,9=ไฝฟ็”จ้žไธ“็”จ่ฝฆ่พ†")  
36 - private String type;  
37 -  
38 -  
39 -  
40 - /** ๅ็งฐ */  
41 - @Excel(name = "ๅœบ็ซ™ๅ็งฐ")  
42 - private String siteName;  
43 -  
44 - /** ไฝ็ฝฎๆ่ฟฐ */  
45 - @Excel(name = "ไฝ็ฝฎๆ่ฟฐ")  
46 - private String locationDec;  
47 -  
48 - /** ้—ฎ้ข˜ๆ่ฟฐ */  
49 - @Excel(name = "้—ฎ้ข˜ๆ่ฟฐ")  
50 - private String caseDec;  
51 -  
52 - /** ๅฎกๆ‰น็Šถๆ€ */  
53 - private Long status;  
54 -  
55 - /** ๆ‰€ๅฑžๅŒบๅŸŸ */  
56 - @Excel(name = "ๆ‰€ๅฑžๅŒบๅŸŸ")  
57 - private String place;  
58 -  
59 - /** ็ฑปๅž‹ */  
60 - @Excel(name = "ๅœบ็ซ™็ฑปๅž‹็ผ–ๅท" ,readConverterExp = "0=ๅทฅๅœฐ,1=ๅค„็†ๅœบๆ‰€")  
61 - private Long siteType;  
62 -  
63 - /** ๅŸบ็ก€ๆ•ฐๆฎID */  
64 - private String objectId;  
65 -  
66 - /** ๅฎกๆ‰นๆ„่ง */  
67 - private String advice1;  
68 -  
69 - /** ๅฎกๆ‰นๆ„่ง */  
70 - private String advice2;  
71 -  
72 - /** ๅคฑไฟกๆ—ถ้—ด */  
73 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
74 - private Date advice2Time;  
75 -  
76 - /** ๅฎกๆ‰นๆ„่ง */  
77 - private String advice3;  
78 - /** ๅคฑไฟกๆ—ถ้—ด */  
79 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
80 - private Date advice3Time;  
81 -  
82 - /** ๅฎกๆ‰นๆ„่ง */  
83 - private String advice4;  
84 - /** ๅคฑไฟกๆ—ถ้—ด */  
85 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
86 - private Date advice4Time;  
87 -  
88 - /** ๅฎกๆ‰นๆ„่ง */  
89 - private String attach;  
90 -  
91 - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")  
92 - @Excel(name = "ๆ—ฅๆœŸ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")  
93 - private Date createTime;  
94 -  
95 - private String startTime;  
96 -  
97 - private String endTime;  
98 -  
99 - private List<String> names;  
100 -  
101 -  
102 - private List<String> cArea;  
103 -  
104 - private List<String> eArea;  
105 -  
106 -  
107 -  
108 - public List<String> getcArea() { 18 +public class CaseOffline extends BaseEntity {
  19 + private static final long serialVersionUID = 1L;
  20 +
  21 + /** ๅบๅท */
  22 + @Excel(name = "ๅบๅท")
  23 + private Long id;
  24 +
  25 + /** ๆกˆๅท็ผ–ๅท */
  26 + @Excel(name = "ๆกˆๅท็ผ–ๅท")
  27 + private String number;
  28 +
  29 + /** ๆกˆๅท็ฑปๅž‹ */
  30 + @Excel(name = "ๆกˆๅท็ฑปๅž‹")
  31 + private String type;
  32 +
  33 + /** ๅ็งฐ */
  34 + @Excel(name = "ๅœบ็ซ™ๅ็งฐ")
  35 + private String siteName;
  36 +
  37 + /** ไฝ็ฝฎๆ่ฟฐ */
  38 + @Excel(name = "ไฝ็ฝฎๆ่ฟฐ")
  39 + private String locationDec;
  40 +
  41 + /** ้—ฎ้ข˜ๆ่ฟฐ */
  42 + @Excel(name = "้—ฎ้ข˜ๆ่ฟฐ")
  43 + private String caseDec;
  44 +
  45 + /** ๅฎกๆ‰น็Šถๆ€ */
  46 + private Long status;
  47 +
  48 + /** ๆ‰€ๅฑžๅŒบๅŸŸ */
  49 + @Excel(name = "ๆ‰€ๅฑžๅŒบๅŸŸ")
  50 + private String place;
  51 +
  52 + /** ็ฑปๅž‹ */
  53 + @Excel(name = "ๅœบ็ซ™็ฑปๅž‹็ผ–ๅท", readConverterExp = "0=ๅทฅๅœฐ,1=ๅค„็†ๅœบๆ‰€ , 2=่ฝฆ่พ†")
  54 + private Long siteType;
  55 +
  56 + /** ็ฑปๅž‹ */
  57 + @Excel(name = "็Šถๆ€")
  58 + public String status1;
  59 +
  60 + /** ๅŸบ็ก€ๆ•ฐๆฎID */
  61 + private String objectId;
  62 +
  63 + /** ๅฎกๆ‰นๆ„่ง */
  64 + public String advice1;
  65 +
  66 + /** ๅฎกๆ‰นๆ„่ง */
  67 + public String advice2;
  68 +
  69 + /** ๅคฑไฟกๆ—ถ้—ด */
  70 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  71 + private Date advice2Time;
  72 +
  73 + /** ๅฎกๆ‰นๆ„่ง */
  74 + public String advice3;
  75 + /** ๅคฑไฟกๆ—ถ้—ด */
  76 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  77 + private Date advice3Time;
  78 +
  79 + /** ๅฎกๆ‰นๆ„่ง */
  80 + public String advice4;
  81 + /** ๅคฑไฟกๆ—ถ้—ด */
  82 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  83 + private Date advice4Time;
  84 +
  85 + /** ๅฎกๆ‰นๆ„่ง */
  86 + private String attach;
  87 +
  88 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  89 + @Excel(name = "ๆ—ฅๆœŸ", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
  90 + private Date createTime;
  91 +
  92 + private String startTime;
  93 +
  94 + private String endTime;
  95 +
  96 + private List<String> names;
  97 +
  98 + private List<String> cArea;
  99 +
  100 + private List<String> eArea;
  101 +
  102 +
  103 +
  104 + public String getStatus1() {
  105 + return status1;
  106 + }
  107 +
  108 + public void setStatus1(String status1) {
  109 + this.status1 = status1;
  110 + }
  111 +
  112 + public List<String> getcArea() {
109 return cArea; 113 return cArea;
110 } 114 }
111 115
@@ -128,8 +132,8 @@ public class CaseOffline extends BaseEntity @@ -128,8 +132,8 @@ public class CaseOffline extends BaseEntity
128 public void setNames(List<String> names) { 132 public void setNames(List<String> names) {
129 this.names = names; 133 this.names = names;
130 } 134 }
131 -  
132 - public String getStartTime() { 135 +
  136 + public String getStartTime() {
133 return startTime; 137 return startTime;
134 } 138 }
135 139
@@ -137,18 +141,17 @@ public class CaseOffline extends BaseEntity @@ -137,18 +141,17 @@ public class CaseOffline extends BaseEntity
137 this.startTime = startTime; 141 this.startTime = startTime;
138 } 142 }
139 143
140 - @Override 144 + @Override
141 public String getEndTime() { 145 public String getEndTime() {
142 return endTime; 146 return endTime;
143 - } 147 + }
144 148
145 - @Override 149 + @Override
146 public void setEndTime(String endTime) { 150 public void setEndTime(String endTime) {
147 this.endTime = endTime; 151 this.endTime = endTime;
148 } 152 }
149 -  
150 153
151 - public Date getCreateTime() { 154 + public Date getCreateTime() {
152 return createTime; 155 return createTime;
153 } 156 }
154 157
@@ -188,152 +191,126 @@ public class CaseOffline extends BaseEntity @@ -188,152 +191,126 @@ public class CaseOffline extends BaseEntity
188 this.attach = attach; 191 this.attach = attach;
189 } 192 }
190 193
191 - public void setId(Long id)  
192 - {  
193 - this.id = id;  
194 - }  
195 -  
196 - public Long getId()  
197 - {  
198 - return id;  
199 - }  
200 - public void setType(String type)  
201 - {  
202 - this.type = type;  
203 - }  
204 -  
205 - public String getType()  
206 - {  
207 - return type;  
208 - }  
209 - public void setSiteName(String siteName)  
210 - {  
211 - this.siteName = siteName;  
212 - }  
213 -  
214 - public String getSiteName()  
215 - {  
216 - return siteName;  
217 - }  
218 - public void setLocationDec(String locationDec)  
219 - {  
220 - this.locationDec = locationDec;  
221 - }  
222 -  
223 - public String getLocationDec()  
224 - {  
225 - return locationDec;  
226 - }  
227 - public void setCaseDec(String caseDec)  
228 - {  
229 - this.caseDec = caseDec;  
230 - }  
231 -  
232 - public String getCaseDec()  
233 - {  
234 - return caseDec;  
235 - }  
236 - public void setStatus(Long status)  
237 - {  
238 - this.status = status;  
239 - }  
240 -  
241 - public Long getStatus()  
242 - {  
243 - return status;  
244 - }  
245 - public void setPlace(String place)  
246 - {  
247 - this.place = place;  
248 - }  
249 -  
250 - public String getPlace()  
251 - {  
252 - return place;  
253 - }  
254 - public void setNumber(String number)  
255 - {  
256 - this.number = number;  
257 - }  
258 -  
259 - public String getNumber()  
260 - {  
261 - return number;  
262 - }  
263 - public void setSiteType(Long siteType)  
264 - {  
265 - this.siteType = siteType;  
266 - }  
267 -  
268 - public Long getSiteType()  
269 - {  
270 - return siteType;  
271 - }  
272 - public void setObjectId(String objectId)  
273 - {  
274 - this.objectId = objectId;  
275 - }  
276 -  
277 - public String getObjectId()  
278 - {  
279 - return objectId;  
280 - }  
281 - public void setAdvice1(String advice1)  
282 - {  
283 - this.advice1 = advice1;  
284 - }  
285 -  
286 - public String getAdvice1()  
287 - {  
288 - return advice1;  
289 - }  
290 - public void setAdvice2(String advice2)  
291 - {  
292 - this.advice2 = advice2;  
293 - }  
294 -  
295 - public String getAdvice2()  
296 - {  
297 - return advice2;  
298 - }  
299 - public void setAdvice3(String advice3)  
300 - {  
301 - this.advice3 = advice3;  
302 - }  
303 -  
304 - public String getAdvice3()  
305 - {  
306 - return advice3;  
307 - }  
308 - public void setAdvice4(String advice4)  
309 - {  
310 - this.advice4 = advice4;  
311 - }  
312 -  
313 - public String getAdvice4()  
314 - {  
315 - return advice4;  
316 - }  
317 -  
318 - @Override  
319 - public String toString() {  
320 - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)  
321 - .append("id", getId())  
322 - .append("type", getType())  
323 - .append("siteName", getSiteName())  
324 - .append("locationDec", getLocationDec())  
325 - .append("caseDec", getCaseDec())  
326 - .append("status", getStatus())  
327 - .append("place", getPlace())  
328 - .append("number", getNumber())  
329 - .append("siteType", getSiteType())  
330 - .append("objectId", getObjectId())  
331 - .append("createTime", getCreateTime())  
332 - .append("createBy", getCreateBy())  
333 - .append("advice1", getAdvice1())  
334 - .append("advice2", getAdvice2())  
335 - .append("advice3", getAdvice3())  
336 - .append("advice4", getAdvice4())  
337 - .toString();  
338 - } 194 + public void setId(Long id) {
  195 + this.id = id;
  196 + }
  197 +
  198 + public Long getId() {
  199 + return id;
  200 + }
  201 +
  202 + public void setType(String type) {
  203 + this.type = type;
  204 + }
  205 +
  206 + public String getType() {
  207 + return type;
  208 + }
  209 +
  210 + public void setSiteName(String siteName) {
  211 + this.siteName = siteName;
  212 + }
  213 +
  214 + public String getSiteName() {
  215 + return siteName;
  216 + }
  217 +
  218 + public void setLocationDec(String locationDec) {
  219 + this.locationDec = locationDec;
  220 + }
  221 +
  222 + public String getLocationDec() {
  223 + return locationDec;
  224 + }
  225 +
  226 + public void setCaseDec(String caseDec) {
  227 + this.caseDec = caseDec;
  228 + }
  229 +
  230 + public String getCaseDec() {
  231 + return caseDec;
  232 + }
  233 +
  234 + public void setStatus(Long status) {
  235 + this.status = status;
  236 + }
  237 +
  238 + public Long getStatus() {
  239 + return status;
  240 + }
  241 +
  242 + public void setPlace(String place) {
  243 + this.place = place;
  244 + }
  245 +
  246 + public String getPlace() {
  247 + return place;
  248 + }
  249 +
  250 + public void setNumber(String number) {
  251 + this.number = number;
  252 + }
  253 +
  254 + public String getNumber() {
  255 + return number;
  256 + }
  257 +
  258 + public void setSiteType(Long siteType) {
  259 + this.siteType = siteType;
  260 + }
  261 +
  262 + public Long getSiteType() {
  263 + return siteType;
  264 + }
  265 +
  266 + public void setObjectId(String objectId) {
  267 + this.objectId = objectId;
  268 + }
  269 +
  270 + public String getObjectId() {
  271 + return objectId;
  272 + }
  273 +
  274 + public void setAdvice1(String advice1) {
  275 + this.advice1 = advice1;
  276 + }
  277 +
  278 + public String getAdvice1() {
  279 + return advice1;
  280 + }
  281 +
  282 + public void setAdvice2(String advice2) {
  283 + this.advice2 = advice2;
  284 + }
  285 +
  286 + public String getAdvice2() {
  287 + return advice2;
  288 + }
  289 +
  290 + public void setAdvice3(String advice3) {
  291 + this.advice3 = advice3;
  292 + }
  293 +
  294 + public String getAdvice3() {
  295 + return advice3;
  296 + }
  297 +
  298 + public void setAdvice4(String advice4) {
  299 + this.advice4 = advice4;
  300 + }
  301 +
  302 + public String getAdvice4() {
  303 + return advice4;
  304 + }
  305 +
  306 + @Override
  307 + public String toString() {
  308 + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId()).append("type", getType())
  309 + .append("siteName", getSiteName()).append("locationDec", getLocationDec())
  310 + .append("caseDec", getCaseDec()).append("status", getStatus()).append("place", getPlace())
  311 + .append("number", getNumber()).append("siteType", getSiteType()).append("objectId", getObjectId())
  312 + .append("createTime", getCreateTime()).append("createBy", getCreateBy()).append("advice1", getAdvice1())
  313 + .append("advice2", getAdvice2()).append("advice3", getAdvice3()).append("advice4", getAdvice4())
  314 + .toString();
  315 + }
339 } 316 }
trash-workFlow/src/main/java/com/trash/caseOffline/service/impl/CaseOfflineServiceImpl.java
@@ -2,14 +2,18 @@ package com.trash.caseOffline.service.impl; @@ -2,14 +2,18 @@ package com.trash.caseOffline.service.impl;
2 2
3 import java.text.SimpleDateFormat; 3 import java.text.SimpleDateFormat;
4 import java.util.ArrayList; 4 import java.util.ArrayList;
  5 +import java.util.Date;
5 import java.util.HashMap; 6 import java.util.HashMap;
6 import java.util.List; 7 import java.util.List;
7 import java.util.Map; 8 import java.util.Map;
8 9
  10 +import com.trash.common.core.domain.entity.SysDictData;
9 import com.trash.common.core.redis.RedisCache; 11 import com.trash.common.core.redis.RedisCache;
10 import com.trash.common.utils.DateUtils; 12 import com.trash.common.utils.DateUtils;
11 import com.trash.common.utils.RemoteServerUtils; 13 import com.trash.common.utils.RemoteServerUtils;
12 import com.trash.common.utils.SecurityUtils; 14 import com.trash.common.utils.SecurityUtils;
  15 +import com.trash.common.utils.spring.SpringUtils;
  16 +import com.trash.system.service.ISysDictTypeService;
13 import com.trash.workflow.service.IWorkflowService; 17 import com.trash.workflow.service.IWorkflowService;
14 18
15 import org.springframework.beans.factory.annotation.Autowired; 19 import org.springframework.beans.factory.annotation.Autowired;
@@ -88,10 +92,20 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService @@ -88,10 +92,20 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService
88 JSONArray earthList = redisCache.getCacheObject("earthSitesList"); 92 JSONArray earthList = redisCache.getCacheObject("earthSitesList");
89 JSONArray construList = redisCache.getCacheObject("constructionList"); 93 JSONArray construList = redisCache.getCacheObject("constructionList");
90 94
  95 + if(caseOffline.status1 != null){
  96 + if(caseOffline.status1.equals("0")){
  97 + caseOffline.status1 = " and advice1 is null";
  98 + }else if(caseOffline.status1.equals("1")){
  99 + caseOffline.status1 = " and advice1 is not null and advice3 is null";
  100 + }else if(caseOffline.status1.equals("2")){
  101 + caseOffline.status1 = " and advice3 is not null and advice4 is null";
  102 + }else if(caseOffline.status1.equals("3")){
  103 + caseOffline.status1 = " and advice4 is not null";
  104 + }
  105 + }
  106 +
91 if(cArea.size() > 0){ 107 if(cArea.size() > 0){
92 -  
93 caseOffline.setcArea(cArea); 108 caseOffline.setcArea(cArea);
94 -  
95 }else{ 109 }else{
96 110
97 for(Object obj:construList){ 111 for(Object obj:construList){
@@ -149,8 +163,10 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService @@ -149,8 +163,10 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService
149 { 163 {
150 caseOffline.setCreateTime(DateUtils.getNowDate()); 164 caseOffline.setCreateTime(DateUtils.getNowDate());
151 caseOffline.setCreateBy(SecurityUtils.getUsername()); 165 caseOffline.setCreateBy(SecurityUtils.getUsername());
  166 +
  167 + List<SysDictData> caseType = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("case_offline_type");
152 168
153 - if(caseOffline.getObjectId() != null && Integer.parseInt(caseOffline.getType()) < 7){ 169 + if(caseOffline.getObjectId() != null){
154 JSONArray areas = redisCache.getCacheObject("areas"); 170 JSONArray areas = redisCache.getCacheObject("areas");
155 171
156 if(areas == null){ 172 if(areas == null){
@@ -178,21 +194,33 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService @@ -178,21 +194,33 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService
178 credit.setObjectId(caseOffline.getObjectId()); 194 credit.setObjectId(caseOffline.getObjectId());
179 credit.setLostCredit(1L); 195 credit.setLostCredit(1L);
180 credit.setName(caseOffline.getSiteName()); 196 credit.setName(caseOffline.getSiteName());
181 - credit.setReason(typeName[Integer.parseInt(caseOffline.getType())]); 197 +
  198 + for(SysDictData d:caseType){
  199 + if(caseOffline.getType().equals(d.getDictValue())){
  200 + credit.setReason(d.getDictLabel());
  201 + break;
  202 + }
  203 + }
  204 +
182 credit.setPlace(placeName); 205 credit.setPlace(placeName);
183 credit.setType(object.getString("cargoIdName")); 206 credit.setType(object.getString("cargoIdName"));
  207 + credit.setTime(new Date());
184 constructionCredit.insertConstructionCredit(credit); 208 constructionCredit.insertConstructionCredit(credit);
185 }else if(caseOffline.getSiteType() == 1){ 209 }else if(caseOffline.getSiteType() == 1){
186 EarthsitesCredit credit = new EarthsitesCredit(); 210 EarthsitesCredit credit = new EarthsitesCredit();
187 -  
188 JSONObject object = RemoteServerUtils.getEarthSitesInfo(caseOffline.getObjectId()); 211 JSONObject object = RemoteServerUtils.getEarthSitesInfo(caseOffline.getObjectId());
189 -  
190 credit.setObjectId(caseOffline.getObjectId()); 212 credit.setObjectId(caseOffline.getObjectId());
191 credit.setLostCredit(1L); 213 credit.setLostCredit(1L);
192 credit.setName(caseOffline.getSiteName()); 214 credit.setName(caseOffline.getSiteName());
193 - credit.setReason(typeName[Integer.parseInt(caseOffline.getType())]); 215 + for(SysDictData d:caseType){
  216 + if(caseOffline.getType().equals(d.getDictValue())){
  217 + credit.setReason(d.getDictLabel());
  218 + break;
  219 + }
  220 + }
194 credit.setPlace(placeName); 221 credit.setPlace(placeName);
195 credit.setType(object.getString("typeName")); 222 credit.setType(object.getString("typeName"));
  223 + credit.setTime(new Date());
196 224
197 earthsitesCredit.insertEarthsitesCredit(credit); 225 earthsitesCredit.insertEarthsitesCredit(credit);
198 } 226 }
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationCaseFileController.java
@@ -15,6 +15,8 @@ import com.trash.casefile.domain.vo.ViolationCaseFileVo; @@ -15,6 +15,8 @@ import com.trash.casefile.domain.vo.ViolationCaseFileVo;
15 import com.trash.casefile.domain.vo.ViolationWarningInformationVo; 15 import com.trash.casefile.domain.vo.ViolationWarningInformationVo;
16 import com.trash.casefile.mapper.ReplyApprovalProcessMapper; 16 import com.trash.casefile.mapper.ReplyApprovalProcessMapper;
17 import com.trash.office.domain.UploadFile; 17 import com.trash.office.domain.UploadFile;
  18 +import com.trash.system.service.ISysDictTypeService;
  19 +
18 import org.springframework.security.access.prepost.PreAuthorize; 20 import org.springframework.security.access.prepost.PreAuthorize;
19 import org.springframework.beans.factory.annotation.Autowired; 21 import org.springframework.beans.factory.annotation.Autowired;
20 import org.springframework.web.bind.annotation.*; 22 import org.springframework.web.bind.annotation.*;
@@ -22,15 +24,18 @@ import com.trash.common.annotation.Log; @@ -22,15 +24,18 @@ import com.trash.common.annotation.Log;
22 import com.trash.common.annotation.RepeatSubmit; 24 import com.trash.common.annotation.RepeatSubmit;
23 import com.trash.common.core.controller.BaseController; 25 import com.trash.common.core.controller.BaseController;
24 import com.trash.common.core.domain.AjaxResult; 26 import com.trash.common.core.domain.AjaxResult;
  27 +import com.trash.common.core.domain.entity.SysDictData;
25 import com.trash.common.enums.BusinessType; 28 import com.trash.common.enums.BusinessType;
26 import com.trash.caseOffline.domain.CaseOffline; 29 import com.trash.caseOffline.domain.CaseOffline;
27 import com.trash.casefile.domain.ReplyApprovalProcess; 30 import com.trash.casefile.domain.ReplyApprovalProcess;
28 import com.trash.casefile.domain.ViolationCaseFile; 31 import com.trash.casefile.domain.ViolationCaseFile;
29 import com.trash.casefile.service.IViolationCaseFileService; 32 import com.trash.casefile.service.IViolationCaseFileService;
30 import com.trash.common.utils.DateUtils; 33 import com.trash.common.utils.DateUtils;
  34 +import com.trash.common.utils.DictUtils;
31 import com.trash.common.utils.RemoteServerUtils; 35 import com.trash.common.utils.RemoteServerUtils;
32 import com.trash.common.utils.SecurityUtils; 36 import com.trash.common.utils.SecurityUtils;
33 import com.trash.common.utils.poi.ExcelUtil; 37 import com.trash.common.utils.poi.ExcelUtil;
  38 +import com.trash.common.utils.spring.SpringUtils;
34 import com.trash.common.core.page.TableDataInfo; 39 import com.trash.common.core.page.TableDataInfo;
35 import com.trash.common.core.redis.RedisCache; 40 import com.trash.common.core.redis.RedisCache;
36 41
@@ -69,9 +74,29 @@ public class ViolationCaseFileController extends BaseController { @@ -69,9 +74,29 @@ public class ViolationCaseFileController extends BaseController {
69 @GetMapping("/export") 74 @GetMapping("/export")
70 public AjaxResult export(ViolationCaseFile violationCaseFile) { 75 public AjaxResult export(ViolationCaseFile violationCaseFile) {
71 List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileList(violationCaseFile); 76 List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileList(violationCaseFile);
  77 +
72 78
  79 + List<SysDictData> caseType = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("vio_casefile");
  80 +
73 for (int i = 0; i < list.size(); i++) { 81 for (int i = 0; i < list.size(); i++) {
74 list.get(i).setId((i + 1)+""); 82 list.get(i).setId((i + 1)+"");
  83 +
  84 + for(SysDictData d:caseType){
  85 + if(d.getDictValue().equals(list.get(i).getViolationType())){
  86 + list.get(i).setViolationType(d.getDictLabel());
  87 + break;
  88 + }
  89 + }
  90 +
  91 + if(list.get(i).getStatus() == 1){
  92 + list.get(i).status1 = "็ป“ๆกˆๅญ˜ๆกฃ";
  93 + }else if(list.get(i).getReadBy() == null || list.get(i).getReadBy().isEmpty()){
  94 + list.get(i).status1 = "ๆœชๅ›žๅค";
  95 + }else if(list.get(i).status1!= null && Integer.parseInt(list.get(i).status1) == 1){
  96 + list.get(i).status1 = "ๅทฒๅ›žๅค";
  97 + }else if(list.get(i).status1 != null && Integer.parseInt(list.get(i).status1) > 1){
  98 + list.get(i).status1 = "ๅพ…ๅฎกๆ ธ";
  99 + }
75 } 100 }
76 ExcelUtil<ViolationCaseFile> util = new ExcelUtil<ViolationCaseFile>(ViolationCaseFile.class); 101 ExcelUtil<ViolationCaseFile> util = new ExcelUtil<ViolationCaseFile>(ViolationCaseFile.class);
77 return util.exportExcel(list, "ๅนณๅฐ่ฟ่ง„ๆกˆๅทๆ•ฐๆฎ"); 102 return util.exportExcel(list, "ๅนณๅฐ่ฟ่ง„ๆกˆๅทๆ•ฐๆฎ");
@@ -185,11 +210,6 @@ public class ViolationCaseFileController extends BaseController { @@ -185,11 +210,6 @@ public class ViolationCaseFileController extends BaseController {
185 } 210 }
186 } 211 }
187 212
188 - String[] caseType = { "่ฟ›ๅ…ฅ้žไธ“็”จ่ฝฆ่พ†", "ๆ— ่ฎธๅฏๆ‰‹็ปญ๏ผˆๅทฅ๏ผ‰", "ๆ— ่ฎธๅฏๆ‰‹็ปญ๏ผˆๆถˆ๏ผ‰", "้ป„ๅœŸ่ฆ†็›–ๆƒ…ๅ†ต", "ๅ‡บๅ…ฅๅฃ่ทฏ้ขๆฑกๆŸ“", "ๅ‡บๅ…ฅๅฃ้“่ทฏ็กฌๅŒ–", "่ฝฆ่พ†ๅ†ฒๆด—ๆ˜ฏๅฆๅˆฐไฝ", "้›พ็‚ฎๆœบๆ˜ฏๅฆๆญฃๅธธๅผ€ๅฏ",  
189 - "ไฝฟ็”จ้žไธ“็”จ่ฝฆ่ฟ่พ“", "็›‘ๆŽง็‚นไฝๆœชๅฏนๅ‡†", "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš", "ๅทฅๅœฐ้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ", "ๅทฅๅœฐ้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅทฅๅœฐ", "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŒ‰ๆ—ถ้—ดไฝœไธš",  
190 - "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš", "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ", "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅค„็†ๅœบๆ‰€","ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๅˆฐๆŒ‡ๅฎš็š„ๅค„็†ๅœบๆ‰€ไฝœไธš", "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ๏ผˆๅทฅ๏ผ‰", "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ๏ผˆๆถˆ๏ผ‰",  
191 - "ๆœชๆฟ€ๆดป่ฝฆ่พ†ไฝœไธš", "ๆœชๆ ธๅ‡†ไฝœไธš่ฝฆ่พ†ไฝœไธš", "ๆœชๆŒ‰็บฟ่ทฏ่กŒ้ฉถ", "้—ฏ็ฆ่กŒ้ฉถ", "ๅคฑไฟก่ฝฆ่พ†ไฝœไธš", "ๅซๆ˜Ÿๅฎšไฝๅผ‚ๅธธ",  
192 - "่ถ…้€Ÿๆ้†’", "ๅ…ถไป–3", "ๅ…ถไป–4", "ๅ…ถไป–5" };  
193 213
194 @GetMapping(value = "/caseTable") 214 @GetMapping(value = "/caseTable")
195 public AjaxResult getTable(String owningRegion, String startDate, String endDate,String violationObjectType) { 215 public AjaxResult getTable(String owningRegion, String startDate, String endDate,String violationObjectType) {
@@ -201,18 +221,20 @@ public class ViolationCaseFileController extends BaseController { @@ -201,18 +221,20 @@ public class ViolationCaseFileController extends BaseController {
201 221
202 List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileListByTable(owningRegion, 222 List<ViolationCaseFile> list = violationCaseFileService.selectViolationCaseFileListByTable(owningRegion,
203 startDate, endDate,violationObjectType); 223 startDate, endDate,violationObjectType);
  224 +
  225 + List<SysDictData> caseType = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("vio_casefile");
204 226
205 - for (String type : caseType) { 227 + for (SysDictData type : caseType) {
206 228
207 HashMap<String, String> map = new HashMap<>(); 229 HashMap<String, String> map = new HashMap<>();
208 230
209 - map.put("type", type); 231 + map.put("type", type.getDictLabel());
210 232
211 int count = 0; 233 int count = 0;
212 int repCount = 0; 234 int repCount = 0;
213 235
214 for (ViolationCaseFile file : list) { 236 for (ViolationCaseFile file : list) {
215 - if (type.equals(file.getViolationType())) { 237 + if (type.getDictValue().equals(file.getViolationType())) {
216 count += 1; 238 count += 1;
217 if (file.getReadBy() != null && !file.getReadBy().isEmpty()) { 239 if (file.getReadBy() != null && !file.getReadBy().isEmpty()) {
218 repCount += 1; 240 repCount += 1;
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationWarningInformationController.java
@@ -19,6 +19,8 @@ import com.trash.common.utils.SecurityUtils; @@ -19,6 +19,8 @@ import com.trash.common.utils.SecurityUtils;
19 import com.trash.office.domain.LeaveApplication; 19 import com.trash.office.domain.LeaveApplication;
20 import com.trash.office.domain.UploadFile; 20 import com.trash.office.domain.UploadFile;
21 import com.trash.office.domain.vo.LeaveApplicationVo; 21 import com.trash.office.domain.vo.LeaveApplicationVo;
  22 +import com.trash.system.service.ISysDictTypeService;
  23 +
22 import org.springframework.security.access.prepost.PreAuthorize; 24 import org.springframework.security.access.prepost.PreAuthorize;
23 import org.springframework.beans.factory.annotation.Autowired; 25 import org.springframework.beans.factory.annotation.Autowired;
24 import org.springframework.web.bind.annotation.*; 26 import org.springframework.web.bind.annotation.*;
@@ -26,10 +28,12 @@ import com.trash.common.annotation.Log; @@ -26,10 +28,12 @@ import com.trash.common.annotation.Log;
26 import com.trash.common.annotation.RepeatSubmit; 28 import com.trash.common.annotation.RepeatSubmit;
27 import com.trash.common.core.controller.BaseController; 29 import com.trash.common.core.controller.BaseController;
28 import com.trash.common.core.domain.AjaxResult; 30 import com.trash.common.core.domain.AjaxResult;
  31 +import com.trash.common.core.domain.entity.SysDictData;
29 import com.trash.common.enums.BusinessType; 32 import com.trash.common.enums.BusinessType;
30 import com.trash.casefile.domain.ViolationWarningInformation; 33 import com.trash.casefile.domain.ViolationWarningInformation;
31 import com.trash.casefile.service.IViolationWarningInformationService; 34 import com.trash.casefile.service.IViolationWarningInformationService;
32 import com.trash.common.utils.poi.ExcelUtil; 35 import com.trash.common.utils.poi.ExcelUtil;
  36 +import com.trash.common.utils.spring.SpringUtils;
33 import com.trash.common.core.page.TableDataInfo; 37 import com.trash.common.core.page.TableDataInfo;
34 import com.trash.common.core.redis.RedisCache; 38 import com.trash.common.core.redis.RedisCache;
35 39
@@ -70,9 +74,29 @@ public class ViolationWarningInformationController extends BaseController @@ -70,9 +74,29 @@ public class ViolationWarningInformationController extends BaseController
70 public AjaxResult export(ViolationWarningInformation violationWarningInformation) 74 public AjaxResult export(ViolationWarningInformation violationWarningInformation)
71 { 75 {
72 List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationList(violationWarningInformation); 76 List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationList(violationWarningInformation);
  77 +
  78 + List<SysDictData> caseType = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("vio_warning");
73 79
  80 +
74 for(int i = 0;i<list.size();i++){ 81 for(int i = 0;i<list.size();i++){
75 list.get(i).setId((long)i+1); 82 list.get(i).setId((long)i+1);
  83 +
  84 + if(list.get(i).getStatus() == 1){
  85 + list.get(i).status1 = "็ป“ๆกˆๅญ˜ๆกฃ";
  86 + }else if(list.get(i).getReadBy() == null){
  87 + list.get(i).status1 = "ๆœชๅ›žๅค";
  88 + }else if(list.get(i).status1!= null && Integer.parseInt(list.get(i).status1) == 1){
  89 + list.get(i).status1 = "ๅทฒๅ›žๅค";
  90 + }else if(list.get(i).status1 != null && Integer.parseInt(list.get(i).status1) > 1){
  91 + list.get(i).status1 = "ๅพ…ๅฎกๆ ธ";
  92 + }
  93 + for(SysDictData d:caseType){
  94 + if(d.getDictValue().equals(list.get(i).getViolationType())){
  95 + list.get(i).setViolationType(d.getDictLabel());
  96 + break;
  97 + }
  98 + }
  99 +
76 } 100 }
77 ExcelUtil<ViolationWarningInformation> util = new ExcelUtil<ViolationWarningInformation>(ViolationWarningInformation.class); 101 ExcelUtil<ViolationWarningInformation> util = new ExcelUtil<ViolationWarningInformation>(ViolationWarningInformation.class);
78 return util.exportExcel(list, "่ฟ่ง„้ข„่ญฆไฟกๆฏ"); 102 return util.exportExcel(list, "่ฟ่ง„้ข„่ญฆไฟกๆฏ");
@@ -141,11 +165,6 @@ public class ViolationWarningInformationController extends BaseController @@ -141,11 +165,6 @@ public class ViolationWarningInformationController extends BaseController
141 { 165 {
142 return AjaxResult.success(violationWarningInformationService.getEVTable(violationWarningInformation)); 166 return AjaxResult.success(violationWarningInformationService.getEVTable(violationWarningInformation));
143 } 167 }
144 -  
145 - String[] caseType = {"ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš", "ๅทฅๅœฐ้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ", "ๅทฅๅœฐ้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅทฅๅœฐ", "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŒ‰ๆ—ถ้—ดไฝœไธš",  
146 - "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš", "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ", "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅค„็†ๅœบๆ‰€", "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๅˆฐๆŒ‡ๅฎš็š„ๅค„็†ๅœบๆ‰€ไฝœไธš",  
147 - "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๅทฅ)", "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๆถˆ)", "ๆœชๆฟ€ๆดป่ฝฆ่พ†ไฝœไธš", "ๆœชๆ ธๅ‡†ไฝœไธš่ฝฆ่พ†ไฝœไธš", "ๆœชๆŒ‰็บฟ่ทฏ่กŒ้ฉถ",  
148 - "้—ฏ็ฆ่กŒ้ฉถ", "ๅคฑไฟก่ฝฆ่พ†ไฝœไธš", "ๅซๆ˜Ÿๅฎšไฝๅผ‚ๅธธ","่ถ…้€Ÿๆ้†’"};  
149 168
150 @GetMapping(value = "/caseTable") 169 @GetMapping(value = "/caseTable")
151 public AjaxResult getTable(String owningRegion,String startDate,String endDate,String violationObjectType){ 170 public AjaxResult getTable(String owningRegion,String startDate,String endDate,String violationObjectType){
@@ -155,18 +174,21 @@ public class ViolationWarningInformationController extends BaseController @@ -155,18 +174,21 @@ public class ViolationWarningInformationController extends BaseController
155 owningRegion = ""; 174 owningRegion = "";
156 } 175 }
157 List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationListByTable(owningRegion,startDate,endDate,violationObjectType); 176 List<ViolationWarningInformation> list = violationWarningInformationService.selectViolationWarningInformationListByTable(owningRegion,startDate,endDate,violationObjectType);
  177 +
158 178
159 - for(String type:caseType){ 179 + List<SysDictData> caseType = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("vio_warning");
  180 +
  181 + for(SysDictData type:caseType){
160 182
161 HashMap<String, String> map = new HashMap<>(); 183 HashMap<String, String> map = new HashMap<>();
162 184
163 - map.put("type", type); 185 + map.put("type", type.getDictLabel());
164 186
165 int count = 0; 187 int count = 0;
166 int repCount = 0; 188 int repCount = 0;
167 189
168 for(ViolationWarningInformation file:list){ 190 for(ViolationWarningInformation file:list){
169 - if(type.equals(file.getViolationType())){ 191 + if(type.getDictValue().equals(file.getViolationType())){
170 count +=1; 192 count +=1;
171 if(file.getReadBy() != null && !file.getReadBy().isEmpty()){ 193 if(file.getReadBy() != null && !file.getReadBy().isEmpty()){
172 repCount += 1; 194 repCount += 1;
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationCaseFile.java
@@ -43,7 +43,7 @@ public class ViolationCaseFile extends BaseEntity @@ -43,7 +43,7 @@ public class ViolationCaseFile extends BaseEntity
43 43
44 44
45 /** ่ฟ่ง„็ฑปๅž‹ */ 45 /** ่ฟ่ง„็ฑปๅž‹ */
46 - @Excel(name = "่ฟ่ง„็ฑปๅž‹") 46 + @Excel(name = "่ฟ่ง„็ฑปๅž‹" ,dictType="vio_casefile")
47 private String violationType; 47 private String violationType;
48 48
49 /** ่ฟ่ง„็ญ‰็บง */ 49 /** ่ฟ่ง„็ญ‰็บง */
@@ -102,11 +102,21 @@ public class ViolationCaseFile extends BaseEntity @@ -102,11 +102,21 @@ public class ViolationCaseFile extends BaseEntity
102 102
103 @Excel(name = "ๅ‘้€ไบบ") 103 @Excel(name = "ๅ‘้€ไบบ")
104 private String createBy; 104 private String createBy;
  105 +
  106 + @Excel(name = "็Šถๆ€")
  107 + public String status1;
105 108
106 109
107 110
108 -  
109 - public String getCreateBy() { 111 + public String getStatus1() {
  112 + return status1;
  113 + }
  114 +
  115 + public void setStatus1(String status1) {
  116 + this.status1 = status1;
  117 + }
  118 +
  119 + public String getCreateBy() {
110 return createBy; 120 return createBy;
111 } 121 }
112 122
trash-workFlow/src/main/java/com/trash/casefile/domain/ViolationWarningInformation.java
@@ -114,7 +114,18 @@ public class ViolationWarningInformation extends BaseEntity { @@ -114,7 +114,18 @@ public class ViolationWarningInformation extends BaseEntity {
114 @Excel(name = "้˜…่ฏปๆ—ถ้—ด", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") 114 @Excel(name = "้˜…่ฏปๆ—ถ้—ด", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
115 private Date readTime; 115 private Date readTime;
116 116
117 - private String abbreviation; 117 + @Excel(name = "็Šถๆ€")
  118 + public String status1;
  119 +
  120 + public String getStatus1() {
  121 + return status1;
  122 + }
  123 +
  124 + public void setStatus1(String status1) {
  125 + this.status1 = status1;
  126 + }
  127 +
  128 + private String abbreviation;
118 129
119 private String startTime; 130 private String startTime;
120 131
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
@@ -60,12 +60,6 @@ public class Consumer { @@ -60,12 +60,6 @@ public class Consumer {
60 60
61 public void autoViolationWarning(String data,String id) throws InterruptedException, IOException { 61 public void autoViolationWarning(String data,String id) throws InterruptedException, IOException {
62 62
63 - String[] code = {"44030020=ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš", "44030021=ๅทฅๅœฐ้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ", "44030022=ๅทฅๅœฐ้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅทฅๅœฐ", "44030023=ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŒ‰ๆ—ถ้—ดไฝœไธš",  
64 - "44030024=ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš", "44030025=ๅค„็†ๅœบๆ‰€้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ", "44030026=ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅค„็†ๅœบๆ‰€", "44030027=ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๅˆฐๆŒ‡ๅฎš็š„ๅค„็†ๅœบๆ‰€ไฝœไธš",  
65 - "44030028=็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๅทฅ)", "44030029=็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๆถˆ)", "44030030=ๆœชๆฟ€ๆดป่ฝฆ่พ†ไฝœไธš", "44030031=ๆœชๆ ธๅ‡†ไฝœไธš่ฝฆ่พ†ไฝœไธš", "44030032=ๆœชๆŒ‰็บฟ่ทฏ่กŒ้ฉถ",  
66 - "44030033=้—ฏ็ฆ่กŒ้ฉถ", "44030034=ๅคฑไฟก่ฝฆ่พ†ไฝœไธš", "44030035=ๅซๆ˜Ÿๅฎšไฝๅผ‚ๅธธ", "44030036=่ถ…้€Ÿๆ้†’"};  
67 -  
68 -  
69 JSONObject jsonObject = JSONObject.parseObject(data); 63 JSONObject jsonObject = JSONObject.parseObject(data);
70 //ๆŠฅ่ญฆๆ—ถ้—ด 64 //ๆŠฅ่ญฆๆ—ถ้—ด
71 Date alarmTime = new Date(jsonObject.getLong("alarmTime")*1000L); 65 Date alarmTime = new Date(jsonObject.getLong("alarmTime")*1000L);
@@ -127,7 +121,7 @@ public class Consumer { @@ -127,7 +121,7 @@ public class Consumer {
127 //ๅ…ฌๅธๅ็งฐ 121 //ๅ…ฌๅธๅ็งฐ
128 violationWarningInformation.setCompanyName(jsonObject.getString("enterpriseName")); 122 violationWarningInformation.setCompanyName(jsonObject.getString("enterpriseName"));
129 //่ฟ่ง„็ฑปๅž‹ 123 //่ฟ่ง„็ฑปๅž‹
130 - violationWarningInformation.setViolationType(jsonObject.getString("alarmName")); 124 + violationWarningInformation.setViolationType(violationTypeCode);
131 //ๅ‘้€ไบบ 125 //ๅ‘้€ไบบ
132 violationWarningInformation.setCreateBy("้•ฟๆฒ™ๅธ‚ๅปบ็ญ‘ๅžƒๅœพๆ™บๆ…ง็›‘็ฎกๅนณๅฐ"); 126 violationWarningInformation.setCreateBy("้•ฟๆฒ™ๅธ‚ๅปบ็ญ‘ๅžƒๅœพๆ™บๆ…ง็›‘็ฎกๅนณๅฐ");
133 //ๆŽจ้€ๅฏน่ฑก 127 //ๆŽจ้€ๅฏน่ฑก
@@ -145,11 +139,11 @@ public class Consumer { @@ -145,11 +139,11 @@ public class Consumer {
145 if(!StringUtils.isEmpty(describe44030020)){ 139 if(!StringUtils.isEmpty(describe44030020)){
146 describe44030020 = describe44030020 + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 140 describe44030020 = describe44030020 + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
147 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 141 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
148 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 142 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
149 }else{ 143 }else{
150 describe44030020 = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 144 describe44030020 = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
151 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 145 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
152 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 146 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
153 } 147 }
154 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท 148 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท
155 if(count44030020==5){ 149 if(count44030020==5){
@@ -190,11 +184,11 @@ public class Consumer { @@ -190,11 +184,11 @@ public class Consumer {
190 if(!StringUtils.isEmpty(describe44030023)){ 184 if(!StringUtils.isEmpty(describe44030023)){
191 describe44030023 = describe44030023 + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 185 describe44030023 = describe44030023 + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
192 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 186 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
193 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 187 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
194 }else{ 188 }else{
195 describe44030023 = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 189 describe44030023 = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
196 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 190 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
197 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 191 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
198 } 192 }
199 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท 193 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท
200 if(count44030023==5&&isTimeWithinRange(alarmTimeString,transportEndTime,endTime)){ 194 if(count44030023==5&&isTimeWithinRange(alarmTimeString,transportEndTime,endTime)){
@@ -211,11 +205,11 @@ public class Consumer { @@ -211,11 +205,11 @@ public class Consumer {
211 if(!StringUtils.isEmpty(describeE)){ 205 if(!StringUtils.isEmpty(describeE)){
212 describeE = describeE + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 206 describeE = describeE + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
213 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 207 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
214 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 208 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
215 }else{ 209 }else{
216 describeE = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 210 describeE = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
217 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 211 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
218 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 212 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
219 } 213 }
220 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท 214 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท
221 if(countE==5&&isTimeWithinRange(alarmTimeString,startTime,transportStartTime)){ 215 if(countE==5&&isTimeWithinRange(alarmTimeString,startTime,transportStartTime)){
@@ -258,7 +252,7 @@ public class Consumer { @@ -258,7 +252,7 @@ public class Consumer {
258 violationWarningInformation.setProjectName(jsonObject.getString("siteName")); 252 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
259 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 253 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
260 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 254 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
261 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 255 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
262 violationWarningInformation.setCreateTime(alarmTime); 256 violationWarningInformation.setCreateTime(alarmTime);
263 violationWarningInformation.setDescribe(describe); 257 violationWarningInformation.setDescribe(describe);
264 // ไธšๅŠก้€ป่พ‘ 258 // ไธšๅŠก้€ป่พ‘
@@ -273,11 +267,11 @@ public class Consumer { @@ -273,11 +267,11 @@ public class Consumer {
273 if(!StringUtils.isEmpty(describe44030024)){ 267 if(!StringUtils.isEmpty(describe44030024)){
274 describe44030024 = describe44030024 + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 268 describe44030024 = describe44030024 + ";\n" + DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
275 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 269 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
276 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 270 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
277 }else{ 271 }else{
278 describe44030024 = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 272 describe44030024 = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
279 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 273 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
280 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 274 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
281 } 275 }
282 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท 276 //ๆŠฅ่ญฆๆฌกๆ•ฐ็ญ‰ไบŽ5ๆŽจ้€ๆกˆๅท
283 if(count44030024==5){ 277 if(count44030024==5){
@@ -306,7 +300,7 @@ public class Consumer { @@ -306,7 +300,7 @@ public class Consumer {
306 violationWarningInformation.setProjectName(jsonObject.getString("siteName")); 300 violationWarningInformation.setProjectName(jsonObject.getString("siteName"));
307 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 301 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
308 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 302 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
309 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 303 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
310 violationWarningInformation.setCreateTime(alarmTime); 304 violationWarningInformation.setCreateTime(alarmTime);
311 violationWarningInformation.setDescribe(describe); 305 violationWarningInformation.setDescribe(describe);
312 // ไธšๅŠก้€ป่พ‘ 306 // ไธšๅŠก้€ป่พ‘
@@ -318,7 +312,7 @@ public class Consumer { @@ -318,7 +312,7 @@ public class Consumer {
318 violationWarningInformation.setProjectName(siteName); 312 violationWarningInformation.setProjectName(siteName);
319 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 313 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
320 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" + 314 + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅœจ" +
321 - jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 315 + jsonObject.get("siteName") + "ๅ‡บ็Žฐ" + violationType;
322 violationWarningInformation.setCreateTime(alarmTime); 316 violationWarningInformation.setCreateTime(alarmTime);
323 violationWarningInformation.setDescribe(describe); 317 violationWarningInformation.setDescribe(describe);
324 // ไธšๅŠก้€ป่พ‘ 318 // ไธšๅŠก้€ป่พ‘
@@ -329,7 +323,7 @@ public class Consumer { @@ -329,7 +323,7 @@ public class Consumer {
329 violationWarningInformation.setSendObject("ๅŒบ็ฎก็†้ƒจ้—จ"); 323 violationWarningInformation.setSendObject("ๅŒบ็ฎก็†้ƒจ้—จ");
330 violationWarningInformation.setProjectName(siteName); 324 violationWarningInformation.setProjectName(siteName);
331 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 325 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
332 - + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 326 + + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅ‡บ็Žฐ" + violationType;
333 //่ฎพ็ฝฎๅ…ฌๅธ็ฎ€็งฐ 327 //่ฎพ็ฝฎๅ…ฌๅธ็ฎ€็งฐ
334 for(Object o:company1){ 328 for(Object o:company1){
335 JSONObject jo = (JSONObject) o; 329 JSONObject jo = (JSONObject) o;
@@ -349,7 +343,7 @@ public class Consumer { @@ -349,7 +343,7 @@ public class Consumer {
349 violationWarningInformation.setViolationObjectType("2"); 343 violationWarningInformation.setViolationObjectType("2");
350 violationWarningInformation.setSendObject("่ฟ่พ“ไผไธš"); 344 violationWarningInformation.setSendObject("่ฟ่พ“ไผไธš");
351 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " " 345 describe = DateFormatUtils.format(alarmTime, "yyyy/MM/dd HH:mm:ss") + " "
352 - + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅ‡บ็Žฐ" + violationWarningInformation.getViolationType(); 346 + + violationWarningInformation.getCompanyName() + " " + jsonObject.get("licenseplateNo") + "ๅ‡บ็Žฐ" + violationType;
353 //่ฎพ็ฝฎๅ…ฌๅธ็ฎ€็งฐ 347 //่ฎพ็ฝฎๅ…ฌๅธ็ฎ€็งฐ
354 for(Object o:company1){ 348 for(Object o:company1){
355 JSONObject jo = (JSONObject) o; 349 JSONObject jo = (JSONObject) o;
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
@@ -20,14 +20,18 @@ import com.trash.casefile.domain.ViolationCaseFile; @@ -20,14 +20,18 @@ import com.trash.casefile.domain.ViolationCaseFile;
20 import com.trash.casefile.domain.vo.ViolationCaseFileVo; 20 import com.trash.casefile.domain.vo.ViolationCaseFileVo;
21 import com.trash.casefile.mapper.ViolationCaseFileMapper; 21 import com.trash.casefile.mapper.ViolationCaseFileMapper;
22 import com.trash.casefile.service.IViolationCaseFileService; 22 import com.trash.casefile.service.IViolationCaseFileService;
  23 +import com.trash.common.core.domain.entity.SysDictData;
23 import com.trash.common.core.redis.RedisCache; 24 import com.trash.common.core.redis.RedisCache;
24 import com.trash.common.utils.DateUtils; 25 import com.trash.common.utils.DateUtils;
  26 +import com.trash.common.utils.DictUtils;
25 import com.trash.common.utils.RemoteServerUtils; 27 import com.trash.common.utils.RemoteServerUtils;
26 import com.trash.common.utils.SecurityUtils; 28 import com.trash.common.utils.SecurityUtils;
27 import com.trash.common.utils.StringUtils; 29 import com.trash.common.utils.StringUtils;
28 import com.trash.common.utils.file.FileUploadUtils; 30 import com.trash.common.utils.file.FileUploadUtils;
  31 +import com.trash.common.utils.spring.SpringUtils;
29 import com.trash.office.domain.UploadFile; 32 import com.trash.office.domain.UploadFile;
30 import com.trash.office.mapper.UploadFileMapper; 33 import com.trash.office.mapper.UploadFileMapper;
  34 +import com.trash.system.service.ISysDictTypeService;
31 import com.trash.workflow.service.IWorkflowService; 35 import com.trash.workflow.service.IWorkflowService;
32 36
33 /** 37 /**
@@ -84,6 +88,18 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -84,6 +88,18 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
84 return violationCaseFileMapper.selectViolationCaseFileList(violationCaseFile); 88 return violationCaseFileMapper.selectViolationCaseFileList(violationCaseFile);
85 } 89 }
86 90
  91 + if(violationCaseFile.getStatus1() != null){
  92 + if(violationCaseFile.getStatus1().equals("0")){
  93 + violationCaseFile.setStatus1(" and (read_by is null or read_by = '')");
  94 + }else if(violationCaseFile.getStatus1().equals("1")){
  95 + violationCaseFile.setStatus1(" and status1 = 1 and status = 0");
  96 + }else if(violationCaseFile.getStatus1().equals("2")){
  97 + violationCaseFile.setStatus1(" and status1 > 1 and status = 0");
  98 + }else if(violationCaseFile.getStatus1().equals("3")){
  99 + violationCaseFile.setStatus1(" and status = 1");
  100 + }
  101 + }
  102 +
87 List<ViolationCaseFile> list = new ArrayList<>(); 103 List<ViolationCaseFile> list = new ArrayList<>();
88 JSONArray areas = redisCache.getCacheObject("areas"); 104 JSONArray areas = redisCache.getCacheObject("areas");
89 105
@@ -143,24 +159,24 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService @@ -143,24 +159,24 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
143 } 159 }
144 160
145 161
146 - String cString = "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš,ๅทฅๅœฐ้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ,ๅทฅๅœฐ้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅทฅๅœฐ,ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŒ‰ๆ—ถ้—ดไฝœไธš,";  
147 - String eString = "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš,ๅค„็†ๅœบๆ‰€้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ,ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅค„็†ๅœบๆ‰€,ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๅˆฐๆŒ‡ๅฎš็š„ๅค„็†ๅœบๆ‰€ไฝœไธš";  
148 - String tString = "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๅทฅ),็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๆถˆ),ๆœชๆฟ€ๆดป่ฝฆ่พ†ไฝœไธš,ๆœชๆ ธๅ‡†ไฝœไธš่ฝฆ่พ†ไฝœไธš,ๆœชๆŒ‰็บฟ่ทฏ่กŒ้ฉถ,้—ฏ็ฆ่กŒ้ฉถ,ๅคฑไฟก่ฝฆ่พ†ไฝœไธš,ๅซๆ˜Ÿๅฎšไฝๅผ‚ๅธธ,่ถ…้€Ÿๆ้†’";  
149 162
150 @Override 163 @Override
151 public List<ViolationCaseFile> selectViolationCaseFileListByTable(String owningRegion,String startDate,String endDate,String violationObjectType) 164 public List<ViolationCaseFile> selectViolationCaseFileListByTable(String owningRegion,String startDate,String endDate,String violationObjectType)
152 { 165 {
153 166
  167 + List<SysDictData> dicts = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("vio_casefile");
154 168
155 - List<ViolationCaseFile> list = violationCaseFileMapper.selectViolationCaseFileListByTable(owningRegion,startDate,endDate,violationObjectType); 169 + List<ViolationCaseFile> list = violationCaseFileMapper.selectViolationCaseFileListByTable(owningRegion,startDate,endDate,violationObjectType);
156 170
  171 +
157 if(violationObjectType != null && !violationObjectType.isEmpty()){ 172 if(violationObjectType != null && !violationObjectType.isEmpty()){
158 List<ViolationCaseFile> newList = new ArrayList<>(); 173 List<ViolationCaseFile> newList = new ArrayList<>();
159 for(ViolationCaseFile v:list){ 174 for(ViolationCaseFile v:list){
160 - if(violationObjectType.equals("0") && cString.contains(v.getViolationType())  
161 - || (violationObjectType.equals("1") && eString.contains(v.getViolationType()))  
162 - || (violationObjectType.equals("2") && tString.contains(v.getViolationType()))){ 175 + for(SysDictData d:dicts){
  176 + if(d.getDictValue().contains(v.getViolationType()) && violationObjectType.equals(d.getCssClass())){
163 newList.add(v); 177 newList.add(v);
  178 + break;
  179 + }
164 } 180 }
165 } 181 }
166 return newList; 182 return newList;
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
@@ -18,14 +18,18 @@ import java.util.stream.Collectors; @@ -18,14 +18,18 @@ import java.util.stream.Collectors;
18 import com.alibaba.fastjson.JSONArray; 18 import com.alibaba.fastjson.JSONArray;
19 import com.alibaba.fastjson.JSONObject; 19 import com.alibaba.fastjson.JSONObject;
20 import com.trash.casefile.domain.vo.ViolationWarningInformationVo; 20 import com.trash.casefile.domain.vo.ViolationWarningInformationVo;
  21 +import com.trash.common.core.domain.entity.SysDictData;
21 import com.trash.common.core.redis.RedisCache; 22 import com.trash.common.core.redis.RedisCache;
22 import com.trash.common.utils.DateUtils; 23 import com.trash.common.utils.DateUtils;
  24 +import com.trash.common.utils.DictUtils;
23 import com.trash.common.utils.RemoteServerUtils; 25 import com.trash.common.utils.RemoteServerUtils;
24 import com.trash.common.utils.SecurityUtils; 26 import com.trash.common.utils.SecurityUtils;
25 import com.trash.common.utils.StringUtils; 27 import com.trash.common.utils.StringUtils;
26 import com.trash.common.utils.file.FileUploadUtils; 28 import com.trash.common.utils.file.FileUploadUtils;
  29 +import com.trash.common.utils.spring.SpringUtils;
27 import com.trash.office.domain.UploadFile; 30 import com.trash.office.domain.UploadFile;
28 import com.trash.office.mapper.UploadFileMapper; 31 import com.trash.office.mapper.UploadFileMapper;
  32 +import com.trash.system.service.ISysDictTypeService;
29 import com.trash.workflow.service.IWorkflowService; 33 import com.trash.workflow.service.IWorkflowService;
30 34
31 import org.apache.ibatis.javassist.expr.NewArray; 35 import org.apache.ibatis.javassist.expr.NewArray;
@@ -94,7 +98,19 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -94,7 +98,19 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
94 98
95 List<ViolationWarningInformation> list = new ArrayList<>(); 99 List<ViolationWarningInformation> list = new ArrayList<>();
96 JSONArray areas = redisCache.getCacheObject("areas"); 100 JSONArray areas = redisCache.getCacheObject("areas");
97 - 101 +
  102 + if(violationWarningInformation.getStatus1() != null){
  103 + if(violationWarningInformation.getStatus1().equals("0")){
  104 + violationWarningInformation.setStatus1(" and read_by is null");
  105 + }else if(violationWarningInformation.getStatus1().equals("1")){
  106 + violationWarningInformation.setStatus1(" and status1 = 1 and status = 0");
  107 + }else if(violationWarningInformation.getStatus1().equals("2")){
  108 + violationWarningInformation.setStatus1(" and status1 > 1 and status = 0");
  109 + }else if(violationWarningInformation.getStatus1().equals("3")){
  110 + violationWarningInformation.setStatus1(" and status = 1");
  111 + }
  112 + }
  113 +
98 List<String> names = new ArrayList<>(); 114 List<String> names = new ArrayList<>();
99 115
100 List<String> cLish = SecurityUtils.getLoginUser().getUser().getConList(); 116 List<String> cLish = SecurityUtils.getLoginUser().getUser().getConList();
@@ -137,28 +153,30 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -137,28 +153,30 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
137 } else { 153 } else {
138 violationWarningInformation.setNames(names); 154 violationWarningInformation.setNames(names);
139 } 155 }
140 -  
141 - return violationWarningInformationMapper.selectViolationWarningInformationList(violationWarningInformation); 156 + list = violationWarningInformationMapper.selectViolationWarningInformationList(violationWarningInformation);
  157 + return list;
142 } 158 }
143 159
144 160
145 - String cString = "ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš,ๅทฅๅœฐ้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ,ๅทฅๅœฐ้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅทฅๅœฐ,ๅทฅๅœฐ้ข„่ญฆ-ๆœชๆŒ‰ๆ—ถ้—ดไฝœไธš,";  
146 - String eString = "ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๆŠฅๅผ€ๅทฅไฝœไธš,ๅค„็†ๅœบๆ‰€้ข„่ญฆ-่ง†้ข‘่ฎพๅค‡็ฆป็บฟ่ถ…ๆ—ถๆŠฅ่ญฆ,ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ไธ‰ๆ— ่ฝฆ่พ†่ฟ›ๅ…ฅๅค„็†ๅœบๆ‰€,ๅค„็†ๅœบๆ‰€้ข„่ญฆ-ๆœชๅˆฐๆŒ‡ๅฎš็š„ๅค„็†ๅœบๆ‰€ไฝœไธš";  
147 - String tString = "็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๅทฅ),็ฆป็บฟ่ฟ่พ“ๆŠฅ่ญฆ(ๆถˆ),ๆœชๆฟ€ๆดป่ฝฆ่พ†ไฝœไธš,ๆœชๆ ธๅ‡†ไฝœไธš่ฝฆ่พ†ไฝœไธš,ๆœชๆŒ‰็บฟ่ทฏ่กŒ้ฉถ,้—ฏ็ฆ่กŒ้ฉถ,ๅคฑไฟก่ฝฆ่พ†ไฝœไธš,ๅซๆ˜Ÿๅฎšไฝๅผ‚ๅธธ,่ถ…้€Ÿๆ้†’";  
148 - 161 +
149 @Override 162 @Override
150 public List<ViolationWarningInformation> selectViolationWarningInformationListByTable(String owningRegion,String startDate, String endDate,String violationObjectType) { 163 public List<ViolationWarningInformation> selectViolationWarningInformationListByTable(String owningRegion,String startDate, String endDate,String violationObjectType) {
151 164
152 165
153 List<ViolationWarningInformation> list = violationWarningInformationMapper.selectViolationWarningInformationListByTable(owningRegion, startDate,endDate,violationObjectType); 166 List<ViolationWarningInformation> list = violationWarningInformationMapper.selectViolationWarningInformationListByTable(owningRegion, startDate,endDate,violationObjectType);
154 167
  168 +
  169 + List<SysDictData> dicts = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("vio_warning");
  170 +
155 if(violationObjectType != null && !violationObjectType.isEmpty()){ 171 if(violationObjectType != null && !violationObjectType.isEmpty()){
  172 +
156 List<ViolationWarningInformation> newList = new ArrayList<>(); 173 List<ViolationWarningInformation> newList = new ArrayList<>();
157 for(ViolationWarningInformation v:list){ 174 for(ViolationWarningInformation v:list){
158 - if(violationObjectType.equals("0") && cString.contains(v.getViolationType())  
159 - || (violationObjectType.equals("1") && eString.contains(v.getViolationType()))  
160 - || (violationObjectType.equals("2") && tString.contains(v.getViolationType()))){ 175 + for(SysDictData d:dicts){
  176 + if(d.getDictValue().contains(v.getViolationType()) && violationObjectType.equals(d.getCssClass())){
161 newList.add(v); 177 newList.add(v);
  178 + break;
  179 + }
162 } 180 }
163 } 181 }
164 return newList; 182 return newList;
@@ -250,24 +268,14 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -250,24 +268,14 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
250 } 268 }
251 269
252 try { 270 try {
253 -  
254 - Map map = null;  
255 - try {  
256 - map = redisCache.getCacheMap("warningParam");  
257 - } catch (Exception e) {  
258 - e.printStackTrace();  
259 - }  
260 -  
261 - if (map == null || map.size() == 0) {  
262 - map = getTypeToRedis();  
263 - }  
264 -  
265 - if (map != null && map.get(violationWarningInformation.getViolationType()) != null  
266 - && map.get(violationWarningInformation.getViolationType()).equals("0")) {  
267 - System.out.println(violationWarningInformation.getViolationType() + " "  
268 - + map.get(violationWarningInformation.getViolationType()));  
269 - return result; 271 + List<SysDictData> dicts = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("vio_warning");
  272 +
  273 + for(SysDictData d:dicts){
  274 + if(d.getDictValue().contains(violationWarningInformation.getViolationType()) && d.getListClass().equals("0")){
  275 + return result;
  276 + }
270 } 277 }
  278 +
271 } catch (Exception e) { 279 } catch (Exception e) {
272 e.printStackTrace(); 280 e.printStackTrace();
273 } 281 }
@@ -281,44 +289,6 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning @@ -281,44 +289,6 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
281 return result; 289 return result;
282 } 290 }
283 291
284 - public Map getTypeToRedis() {  
285 -  
286 - File file = new File("d:/warningParam.txt");  
287 -  
288 - Map map = null;  
289 -  
290 - try {  
291 - BufferedReader fReader = new BufferedReader(new FileReader(file));  
292 -  
293 - String result = null;  
294 - map = new HashMap<>();  
295 - while (true) {  
296 - try {  
297 - result = fReader.readLine();  
298 -  
299 - if (result == null) {  
300 - break;  
301 - }  
302 -  
303 - map.put(result.split(" ")[0], result.split(" ")[1]);  
304 -  
305 - System.out.println(result.split(" ")[0] + "," + result.split(" ")[1]);  
306 -  
307 - } catch (Exception e) {  
308 - e.printStackTrace();  
309 - }  
310 -  
311 - }  
312 -  
313 - redisCache.setCacheObject("warningParam", map, 15, TimeUnit.MINUTES);  
314 -  
315 - return map;  
316 - } catch (FileNotFoundException e) {  
317 - // TODO Auto-generated catch block  
318 - e.printStackTrace();  
319 - }  
320 - return null;  
321 - }  
322 292
323 /** 293 /**
324 * ไฟฎๆ”น่ฟ่ง„้ข„่ญฆไฟกๆฏ 294 * ไฟฎๆ”น่ฟ่ง„้ข„่ญฆไฟกๆฏ
trash-workFlow/src/main/resources/mapper/SmsMapper.xml 0 โ†’ 100644
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper
  3 +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4 +"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5 +<mapper namespace="com.trash.activiti.mapper.SmsMapper">
  6 +
  7 + <select id="getPhoneNumber" parameterType="String" resultType="java.lang.String">
  8 + select number from sms where checkpoint = #{checkpoint} and type = #{type}
  9 + </select>
  10 +
  11 +</mapper>
0 \ No newline at end of file 12 \ No newline at end of file
trash-workFlow/src/main/resources/mapper/caseOffline/CaseOfflineMapper.xml
@@ -34,6 +34,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -34,6 +34,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
34 <select id="selectCaseOfflineList" parameterType="CaseOffline" resultMap="CaseOfflineResult"> 34 <select id="selectCaseOfflineList" parameterType="CaseOffline" resultMap="CaseOfflineResult">
35 <include refid="selectCaseOfflineVo"/> 35 <include refid="selectCaseOfflineVo"/>
36 <where> 36 <where>
  37 + <if test="status1 != null "> ${status1}</if>
37 <if test="type != null and type != ''"> and type = #{type}</if> 38 <if test="type != null and type != ''"> and type = #{type}</if>
38 <if test="place != null and place != ''"> and place = #{place}</if> 39 <if test="place != null and place != ''"> and place = #{place}</if>
39 <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if> 40 <if test="startTime != null "> and create_time between #{startTime} and #{endTime}</if>
@@ -72,8 +73,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -72,8 +73,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
72 </foreach> 73 </foreach>
73 and site_type = 1 74 and site_type = 1
74 </if> 75 </if>
75 -  
76 <if test="createTime != null "> and create_time > #{createTime}</if> 76 <if test="createTime != null "> and create_time > #{createTime}</if>
  77 +
77 </where> 78 </where>
78 </select> 79 </select>
79 80
trash-workFlow/src/main/resources/mapper/casefile/ViolationCaseFileMapper.xml
@@ -26,6 +26,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -26,6 +26,8 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
26 <result property="readTime" column="read_time" /> 26 <result property="readTime" column="read_time" />
27 <result property="abbreviation" column="abbreviation" /> 27 <result property="abbreviation" column="abbreviation" />
28 <result property="needUpload" column="need_upload" /> 28 <result property="needUpload" column="need_upload" />
  29 + <result property="status1" column="status1" />
  30 +
29 31
30 </resultMap> 32 </resultMap>
31 33
@@ -34,8 +36,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -34,8 +36,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
34 </sql> 36 </sql>
35 37
36 <select id="selectViolationCaseFileList" parameterType="violationCaseFile" resultMap="violationCaseFileResult"> 38 <select id="selectViolationCaseFileList" parameterType="violationCaseFile" resultMap="violationCaseFileResult">
37 - <include refid="selectViolationCaseFileVo"/>  
38 - <where> 39 + select a.*,c.status1 from casefile_violation a
  40 + left join (select b.table_name,count(*) status1 from reply_approval_process b where table_name like "%workflow_casefile%"
  41 + GROUP BY b.table_name,b.reply_people) c
  42 + on CONCAT("workflow_casefile:",a.id) = c.table_name
  43 + <where>
39 <if test="number != null and number != ''"> and number = #{number}</if> 44 <if test="number != null and number != ''"> and number = #{number}</if>
40 <if test="violationObjectType != null and violationObjectType != ''"> and violation_object_type = #{violationObjectType}</if> 45 <if test="violationObjectType != null and violationObjectType != ''"> and violation_object_type = #{violationObjectType}</if>
41 <if test="owningRegion != null and owningRegion != ''"> and owning_region like concat('%', #{owningRegion}, '%')</if> 46 <if test="owningRegion != null and owningRegion != ''"> and owning_region like concat('%', #{owningRegion}, '%')</if>
@@ -64,7 +69,9 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -64,7 +69,9 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
64 <if test="needUpload == 1 "> 69 <if test="needUpload == 1 ">
65 and need_upload = 1 70 and need_upload = 1
66 </if> 71 </if>
67 - 72 + <if test="status1 != null ">
  73 + ${status1}
  74 + </if>
68 </where> 75 </where>
69 order by create_time desc 76 order by create_time desc
70 </select> 77 </select>
trash-workFlow/src/main/resources/mapper/casefile/ViolationWarningInformationMapper.xml
@@ -24,6 +24,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -24,6 +24,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
24 <result property="receiveStatus" column="receive_status" /> 24 <result property="receiveStatus" column="receive_status" />
25 <result property="readBy" column="read_by" /> 25 <result property="readBy" column="read_by" />
26 <result property="readTime" column="read_time" /> 26 <result property="readTime" column="read_time" />
  27 + <result property="status1" column="status1" />
27 </resultMap> 28 </resultMap>
28 29
29 <sql id="selectViolationWarningInformationVo"> 30 <sql id="selectViolationWarningInformationVo">
@@ -31,7 +32,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -31,7 +32,11 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
31 </sql> 32 </sql>
32 33
33 <select id="selectViolationWarningInformationList" parameterType="ViolationWarningInformation" resultMap="ViolationWarningInformationResult"> 34 <select id="selectViolationWarningInformationList" parameterType="ViolationWarningInformation" resultMap="ViolationWarningInformationResult">
34 - <include refid="selectViolationWarningInformationVo"/> 35 + select a.*,c.status1
  36 + from casefile_violation_warning_information a
  37 + left join (select b.table_name,count(*) status1 from reply_approval_process b where table_name like "%violation_warning%"
  38 + GROUP BY b.table_name,b.reply_people) c
  39 + on CONCAT("violation_warning:",a.id) = c.table_name
35 <where> 40 <where>
36 <if test="number != null and number != ''"> and `number` = #{number}</if> 41 <if test="number != null and number != ''"> and `number` = #{number}</if>
37 <if test="violationObjectType != null and violationObjectType != ''"> and violation_object_type = #{violationObjectType}</if> 42 <if test="violationObjectType != null and violationObjectType != ''"> and violation_object_type = #{violationObjectType}</if>
@@ -48,6 +53,9 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -48,6 +53,9 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
48 #{name} 53 #{name}
49 </foreach> 54 </foreach>
50 </if> 55 </if>
  56 + <if test="status1 != null ">
  57 + ${status1}
  58 + </if>
51 </where> 59 </where>
52 order by create_time desc 60 order by create_time desc
53 </select> 61 </select>