Commit ad84fa064b7513500599f7c48eb5004660e68200

Authored by youxiw2000
1 parent 132a9741

m

Showing 56 changed files with 2059 additions and 1101 deletions

Too many changes to show.

To preserve performance only 56 of 69 files are displayed.

trash-activiti/src/main/java/com/trash/activiti/mapper/ActReDeploymentMapper.java
... ... @@ -32,4 +32,8 @@ public interface ActReDeploymentMapper {
32 32  
33 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 4 import java.text.SimpleDateFormat;
5 5 import java.util.ArrayList;
6 6 import java.util.Comparator;
7   -import java.util.Date;
8 7 import java.util.HashMap;
9 8 import java.util.HashSet;
10 9 import java.util.List;
11 10 import java.util.Map;
12 11 import java.util.Set;
13   -import java.util.concurrent.BlockingQueue;
14   -import java.util.concurrent.TimeUnit;
15   -import java.util.stream.Collector;
16 12 import java.util.stream.Collectors;
17 13  
18   -import javax.validation.constraints.Null;
19   -
20   -import com.trash.common.utils.StringUtils;
21 14 import org.activiti.api.runtime.shared.identity.UserGroupManager;
22 15 import org.activiti.api.runtime.shared.query.Pageable;
23 16 import org.activiti.api.runtime.shared.security.SecurityManager;
... ... @@ -33,18 +26,13 @@ import org.activiti.engine.RuntimeService;
33 26 import org.activiti.engine.TaskService;
34 27 import org.activiti.engine.history.HistoricProcessInstance;
35 28 import org.activiti.engine.history.HistoricProcessInstanceQuery;
36   -import org.activiti.engine.query.QueryProperty;
37 29 import org.activiti.engine.runtime.ProcessInstance;
38 30 import org.activiti.engine.runtime.ProcessInstanceQuery;
39 31 import org.activiti.engine.task.IdentityLink;
40 32 import org.apache.commons.collections4.map.HashedMap;
41 33 import org.springframework.beans.factory.annotation.Autowired;
42   -import org.springframework.data.redis.cache.RedisCacheManager;
43 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 36 import com.github.pagehelper.Page;
49 37 import com.trash.activiti.domain.ActWorkflowFormData;
50 38 import com.trash.activiti.domain.dto.ActTaskDTO;
... ... @@ -56,12 +44,12 @@ import com.trash.activiti.service.IActWorkflowFormDataService;
56 44 import com.trash.activiti.service.myTaskService;
57 45 import com.trash.common.core.page.PageDomain;
58 46 import com.trash.common.core.redis.RedisCache;
59   -import com.trash.common.utils.RemoteServerUtils;
60 47 import com.trash.common.utils.SecurityUtils;
61 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 54 @Service
67 55 public class ActTaskServiceImpl implements IActTaskService {
... ... @@ -451,10 +439,64 @@ public class ActTaskServiceImpl implements IActTaskService {
451 439  
452 440 if (desc != null)
453 441 updateThreesetpTask(processInstance, desc);
  442 +
  443 + checkPostSMS(processInstance,task);
454 444  
455 445 // 写入数据库
456 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 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 69  
70 70  
71 71 afw.setControlName("审批");
72   - afw.setControlValue("待审批");
  72 + afw.setControlValue("待处理");
73 73 afw.setTaskNodeName(tasks.get(0).getName());
74 74 afw.setCreateBy(tasks.get(0).getName());
75 75 afw.setCreateName(tasks.get(0).getName());
... ... @@ -85,7 +85,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
85 85  
86 86  
87 87 afw.setControlName("审批");
88   - afw.setControlValue("待审批");
  88 + afw.setControlValue("待处理");
89 89 afw.setTaskNodeName(tasks.get(0).getName());
90 90 afw.setCreateBy(tasks.get(0).getName());
91 91 afw.setCreateName(tasks.get(0).getName());
... ... @@ -110,7 +110,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
110 110  
111 111  
112 112 afw.setControlName("审批");
113   - afw.setControlValue("待审批");
  113 + afw.setControlValue("待处理");
114 114 afw.setTaskNodeName(tasks.get(0).getName());
115 115 afw.setCreateBy(tasks.get(0).getName());
116 116 afw.setCreateName(tasks.get(0).getName());
... ... @@ -126,7 +126,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
126 126  
127 127  
128 128 afw.setControlName("审批");
129   - afw.setControlValue("待审批");
  129 + afw.setControlValue("待处理");
130 130 afw.setTaskNodeName(tasks.get(0).getName());
131 131 afw.setCreateBy(tasks.get(0).getName());
132 132 afw.setCreateName(tasks.get(0).getName());
... ... @@ -148,7 +148,7 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
148 148  
149 149  
150 150 afw.setControlName("审批");
151   - afw.setControlValue("待审批");
  151 + afw.setControlValue("待处理");
152 152 afw.setTaskNodeName(tasks.get(0).getName());
153 153 afw.setCreateBy(tasks.get(0).getName());
154 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 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 53 <select id="selectTitles" parameterType="String" resultType="java.lang.String">
43 54 select DISTINCT title from workflow
44 55 <where>
... ...
trash-common/src/main/java/com/trash/common/utils/DictUtils.java
... ... @@ -2,6 +2,7 @@ package com.trash.common.utils;
2 2  
3 3 import java.util.Collection;
4 4 import java.util.List;
  5 +import java.util.concurrent.TimeUnit;
5 6  
6 7 import com.trash.common.constant.Constants;
7 8 import com.trash.common.core.domain.entity.SysDictData;
... ... @@ -28,7 +29,7 @@ public class DictUtils
28 29 */
29 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 32 import com.alibaba.fastjson.JSON;
33 33 import com.alibaba.fastjson.JSONArray;
34 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 39 import okhttp3.MediaType;
37 40 import okhttp3.OkHttpClient;
... ... @@ -65,6 +68,7 @@ public class RemoteServerUtils {
65 68 public static String constructionLicenseById = "/api/siteservice/cs/constructionsites/";
66 69  
67 70 public static String ConstructionList = "/api/siteservice/cs/constructionsites/search";
  71 + public static String ConstructionLedgerList = "/api/siteservice/cs/constructionsites/ledger/list";
68 72  
69 73 public static String UpdateConstruction = "/api/siteservice/cs/constructionsites/status";
70 74  
... ... @@ -153,6 +157,18 @@ public class RemoteServerUtils {
153 157  
154 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 173 public static JSONArray getConstructionList(Map map) {
158 174 JSONArray list = null;
... ... @@ -804,6 +820,27 @@ public class RemoteServerUtils {
804 820  
805 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 845 public static JSONArray getDriverList(String token) {
809 846  
... ... @@ -1231,7 +1268,7 @@ public class RemoteServerUtils {
1231 1268  
1232 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 17 try{
18 18 //发送
19 19 Mobile mobile=new Mobile();
20   - mobile.setMobile("13800009999");
  20 + mobile.setMobile("15201713620");
21 21 List<Mobile> mobileList=new ArrayList<Mobile>();
22 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 public static String queyrbalanceUrl = "http://172.31.253.178:5050/ims/sms/queryBalance";//查询发送能力地址
9 9 public static String smsMoUrl = "http://172.31.253.178:9090/ims/sms/queryMo";//取上行地址
10 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 56 import com.trash.common.utils.SecurityUtils;
57 57 import com.trash.common.utils.file.FileUploadUtils;
58 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 62 import com.trash.office.domain.LogisticsManagement;
60 63 import com.trash.office.domain.UploadFile;
61 64 import com.trash.office.mapper.LogisticsManagementMapper;
... ... @@ -79,160 +82,150 @@ public class DriverTask {
79 82  
80 83 @Autowired
81 84 private RedisCache redisCache;
82   -
83   - public void getUpCase(){
  85 +
  86 + public void getUpCase() {
84 87 JSONArray array = RemoteServerUtils.getCaseList();
85 88 Map map = new HashMap<>();
86 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 93 JSONObject json = (JSONObject) object;
91 94 try {
92   - ViolationCaseFile caseFile = new ViolationCaseFile(json);
93   -
94   -
  95 + ViolationCaseFile caseFile = new ViolationCaseFile(json);
  96 +
95 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 109 SpringUtils.getBean(ViolationCaseFileMapper.class).insertViolationCaseFile(caseFile);
109   -
110 110  
111 111 ids.add(caseFile.getId());
112   -
  112 +
113 113 } catch (BeansException e) {
114 114 // TODO Auto-generated catch block
115 115 e.printStackTrace();
116 116 }
117   -
  117 +
118 118 }
119   -
  119 +
120 120 map.put("taskIds", ids);
121 121 map.put("taskType", "Q2");
122 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 133 JSONArray array = RemoteServerUtils.getUpCaseResult();
139 134 Map map = new HashMap<>();
140 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 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 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 150 ids.add(json.getString("acceptId"));
155   -
  151 +
156 152 ReplyApprovalProcess rap = new ReplyApprovalProcess();
157   - rap.setTableName("workflow_casefile:"+json.getString("thirdCaseId"));
  153 + rap.setTableName("workflow_casefile:" + json.getString("thirdCaseId"));
158 154 rap.setReplyPeople("综管服");
159 155 rap.setReply(json.getString("replyContent"));
160 156 rap.setReplyTime(new Date(json.getString("handleTime")));
161   -
  157 +
162 158 JSONArray images = json.getJSONArray("attchList");
163 159 String path = "";
164   - try{
165   - for(Object obj:images){
  160 + try {
  161 + for (Object obj : images) {
166 162 JSONObject img = (JSONObject) obj;
167 163 path += img.getString("attchFilePath") + ",";
168 164 }
169   - }catch(Exception e){
  165 + } catch (Exception e) {
170 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 172 map.put("taskIds", ids);
178 173 map.put("taskType", "Q1");
179 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 182 JSONArray array = RemoteServerUtils.getUpCaseState(url);
190 183 Map map = new HashMap<>();
191 184 List<String> ids = new ArrayList<String>();
192   -
193   - if(array != null && array.size() > 0){
  185 +
  186 + if (array != null && array.size() > 0) {
194 187 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
195   - for(Object object:array){
  188 + for (Object object : array) {
196 189 JSONObject json = (JSONObject) object;
197   -
  190 +
198 191 ViolationCaseFile caseFile = new ViolationCaseFile();
199   -
  192 +
200 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 199 continue;
206 200 }
207   -
  201 +
208 202 ReplyApprovalProcess rap = new ReplyApprovalProcess();
209   - rap.setTableName("workflow_casefile:"+list.get(0).getId());
  203 + rap.setTableName("workflow_casefile:" + list.get(0).getId());
210 204 rap.setReplyPeople(json.getString(arg0));
211 205 rap.setReply(json.getString(arg1));
212 206 try {
213 207 rap.setReplyTime(sdf.parse(json.getString(arg2)));
214 208 } catch (ParseException e) {
215   -
  209 +
216 210 rap.setReplyTime(new Date());
217   -
  211 +
218 212 e.printStackTrace();
219 213 }
220   -
  214 +
221 215 SpringUtils.getBean(ReplyApprovalProcessMapper.class).insertReplyApprovalProcess(rap);
222   -
  216 +
223 217 ids.add(json.getString("taskId"));
224 218 }
225   -
  219 +
226 220 map.put("taskIds", ids);
227 221 map.put("taskType", type);
228 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 230 Map<String, String> paramsMap = new HashMap<String, String>();
238 231  
... ... @@ -280,8 +273,8 @@ public class DriverTask {
280 273 paramsMap.put("type_" + i + "_timeout", arr[i * 3]);
281 274 paramsMap.put("type_" + i + "_season", arr[i * 3 + 1]);
282 275 paramsMap.put("type_" + i + "_pect", arr[i * 3 + 2]);
283   - }
284   -
  276 + }
  277 +
285 278 JSONArray areas = redisCache.getCacheObject("areaList");
286 279 Map<String, String> area = new HashMap<>();
287 280  
... ... @@ -289,112 +282,109 @@ public class DriverTask {
289 282 JSONObject json = (JSONObject) object;
290 283 area.put(json.getString("code"), json.getString("name"));
291 284 }
292   -
293   - try{
  285 +
  286 + try {
294 287  
295 288 int type = 5;
296   - LogisticsManagement logisticsManagement= new LogisticsManagement();
297   -
  289 + LogisticsManagement logisticsManagement = new LogisticsManagement();
  290 +
298 291 Date d = new Date();
299   -
  292 +
300 293 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
301 294 d.setDate(0);
302 295 d.setHours(23);
303 296 d.setMinutes(59);
304 297 d.setSeconds(59);
305   -
  298 +
306 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 304 Collections.shuffle(logs);
311 305  
312 306 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
313 307  
314 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 314 insertData(l.getId() + "", title, type, "综合管理部", l.getDeptName());
321 315 }
322   -
323   - }catch(Exception e){
  316 +
  317 + } catch (Exception e) {
324 318 e.printStackTrace();
325 319 }
326   -
327   - try{
  320 +
  321 + try {
328 322  
329 323 int type = 6;
330   - CaseOffline caseOffline= new CaseOffline();
331   -
  324 + CaseOffline caseOffline = new CaseOffline();
  325 +
332 326 Date d = new Date();
333   -
  327 +
334 328 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
335 329 d.setDate(0);
336 330 d.setHours(23);
337 331 d.setMinutes(59);
338 332 d.setSeconds(59);
339   -
  333 +
340 334 caseOffline.setCreateTime(d);
341   -
  335 +
342 336 List<CaseOffline> logs = SpringUtils.getBean(CaseOfflineMapper.class).selectCaseOfflineList(caseOffline);
343   -
  337 +
344 338 Collections.shuffle(logs);
345 339  
346 340 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
347 341  
348 342 logs = logs.subList(0, (int) (logs.size() * pect));
349   -
350   - for(CaseOffline l:logs){
  343 +
  344 + for (CaseOffline l : logs) {
351 345 insertData(l.getId() + "", "电子交办案卷:" + l.getSiteName(), type, "治理事务部", area.get(l.getPlace()));
352 346 }
353   -
354   - }catch(Exception e){
  347 +
  348 + } catch (Exception e) {
355 349 e.printStackTrace();
356 350 }
357   -
358   - try{
  351 +
  352 + try {
359 353  
360 354 int type = 7;
361   - ViolationCaseFile caseOffline= new ViolationCaseFile();
362   -
  355 + ViolationCaseFile caseOffline = new ViolationCaseFile();
  356 +
363 357 Date d = new Date();
364   -
  358 +
365 359 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
366 360 d.setDate(0);
367 361 d.setHours(23);
368 362 d.setMinutes(59);
369 363 d.setSeconds(59);
370   -
  364 +
371 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 370 Collections.shuffle(logs);
376 371  
377 372 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
378 373  
379 374 logs = logs.subList(0, (int) (logs.size() * pect));
380   -
381   - for(ViolationCaseFile l:logs){
  375 +
  376 + for (ViolationCaseFile l : logs) {
382 377 insertData(l.getId() + "", "违规案卷:" + l.getProjectName(), type, "科技信息部", l.getOwningRegion());
383 378 }
384   -
385   - }catch(Exception e){
  379 +
  380 + } catch (Exception e) {
386 381 e.printStackTrace();
387 382 }
388   -
389   -
390   -
391 383  
392 384 Gson g = new Gson();
393 385  
394 386 JSONArray array;
395 387  
396   -
397   -
398 388 array = redisCache.getCacheObject("truckList");// 车辆
399 389 if (array != null && array.size() > 0) {
400 390  
... ... @@ -485,49 +475,48 @@ public class DriverTask {
485 475 }
486 476 }
487 477 }
488   -
489   -
  478 +
490 479 }
491 480  
492 481 public List ShuffleData(Gson g, JSONArray array, int type) {
493 482 List<JSONObject> list = g.fromJson(array.toJSONString(), new TypeToken<List<JSONObject>>() {
494 483 }.getType());
495   -
  484 +
496 485 Date d = new Date();
497   -
  486 +
498 487 d.setMonth(d.getMonth() - (Integer.parseInt(paramsMap.get("type_" + type + "_season")) * 3));
499 488 d.setDate(0);
500 489 d.setHours(23);
501 490 d.setMinutes(59);
502 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 496 SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
508 497 String editTime = p.getString("editedAt");
509 498 String createdTime = p.getString("createdAt");
510 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 503 return false;
515   - }else{
  504 + } else {
516 505 newTime = simpleDateFormat.parse(p.getString("createdAt")).getTime();
517 506 }
518   - }else{
  507 + } else {
519 508 newTime = simpleDateFormat.parse(p.getString("editedAt")).getTime();
520 509 }
521   - }catch(Exception e){
  510 + } catch (Exception e) {
522 511 e.printStackTrace();
523 512 }
524 513 return d.getTime() < newTime;
525   -
526   - }).collect(Collectors.toList());
527   - }catch(Exception e){
  514 +
  515 + }).collect(Collectors.toList());
  516 + } catch (Exception e) {
528 517 e.printStackTrace();
529 518 }
530   -
  519 +
531 520 Collections.shuffle(list);
532 521  
533 522 double pect = Double.parseDouble(paramsMap.get("type_" + type + "_pect")) / 100;
... ... @@ -669,7 +658,7 @@ public class DriverTask {
669 658  
670 659 listParam.add(param);
671 660  
672   - SpringUtils.getBean(ITruckCreditService.class).insertTruckCredit(truckCredit);
  661 + SpringUtils.getBean(ITruckCreditService.class).insertTruckCredit(truckCredit, 0);
673 662 }
674 663 } catch (BeansException e) {
675 664 // TODO Auto-generated catch block
... ... @@ -747,6 +736,156 @@ public class DriverTask {
747 736 for (CompanyCredit c : companyList) {
748 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 891 public void checkAllTask() {
... ... @@ -804,8 +943,8 @@ public class DriverTask {
804 943 map.put("size", 99999);
805 944 map.put("page", 1);
806 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 958 map.put("contractStatus", 1);
820 959 map.put("auditStatus", 1);
821 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 974 map.put("size", 99999);
836 975 map.put("page", 1);
837 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 990 map.put("size", 99999);
852 991 map.put("page", 1);
853 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 1008 map.put("page", 1);
870 1009  
871 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 1024 map.put("size", 99999);
886 1025 map.put("page", 1);
887 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 81 {
82 82 return dictDatas;
83 83 }
84   - dictDatas = dictDataMapper.selectDictDataByType(dictType);
  84 + dictDatas = dictDataMapper.selectDictDataByType(dictType);
85 85 if (StringUtils.isNotEmpty(dictDatas))
86 86 {
87 87 DictUtils.setDictCache(dictType, dictDatas);
... ...
trash-ui/dist.7z
No preview for this file type
trash-ui/src/api/caseOfflineInfo.js
1 1 import {getAdviceList, getCaseOffline} from "@/api/caseOffline/caseOffline";
2 2 import {getArea,} from "@/api/dict";
3 3  
4   -
  4 +import {listData} from "@/api/system/dict/data"
5 5 import {getToken} from "@/utils/auth";
6 6 import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
7 7  
... ... @@ -48,16 +48,6 @@ export default {
48 48 // 表单校验
49 49 rules: {},
50 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 52 fileList: [],
63 53 areas: [],
... ... @@ -89,7 +79,12 @@ export default {
89 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 88 let id = this.businessKey.split(":");
94 89  
95 90 if (id.length == 2) {
... ... @@ -104,7 +99,8 @@ export default {
104 99 this.replyApprovalProcessList = response.rows;
105 100 });
106 101 },
107   - methods: {
  102 + methods: {
  103 +
108 104 getSite(item) {
109 105 this.form.objectId = item.id;
110 106 },
... ... @@ -120,8 +116,8 @@ export default {
120 116 },
121 117 getCaseType(type) {
122 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 1 import { listCaseOffline, getCaseOffline, delCaseOffline, addCaseOffline, updateCaseOffline, exportCaseOffline } from "@/api/caseOffline/caseOffline";
2 2  
3   -
4 3 import h5Info from "@/views/h5/caseOffline/caseOfflineInfo";
5   -
6 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 7 import {
12 8 getArea,
13 9 earthsitesList,
14 10 constructionsitesList,
  11 + truckList,
15 12 getDict,
16 13 } from "@/api/dict";
17 14 import {
18 15 getThreestep,
19 16 } from "@/api/business/threestep";
  17 +
  18 + import {listData} from "@/api/system/dict/data"
20 19  
21 20 import {
22 21 getToken
... ... @@ -66,18 +65,7 @@ export default {
66 65 // 表单校验
67 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 69 fileList:[],
82 70 areas: [],
83 71 upload: {
... ... @@ -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 102 this.getList();
110 103  
  104 +
111 105 if(window.location.search){
112 106 let businessKey = window.location.search.split("=")[1];
113 107 if(window.location.search.split("=")[0] == "?businessKey"){
... ... @@ -131,8 +125,6 @@ export default {
131 125  
132 126 }
133 127  
134   -
135   -
136 128 constructionsitesList(this.remoteQueryData).then(res => {
137 129 this.data[0]= res.result.list;
138 130 });
... ... @@ -141,9 +133,51 @@ export default {
141 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 178 getSite(item){
146 179 this.remoteQueryData.name = item;
  180 + this.form.siteName = item;
147 181 if(this.form.siteType == 0){
148 182 constructionsitesList(this.remoteQueryData).then(res => {
149 183 this.data[0]= res.result.list;
... ... @@ -152,8 +186,10 @@ export default {
152 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 193 earthsitesList(this.remoteQueryData).then(res => {
158 194 this.data[1]= res.result.list;
159 195 for(let i in res.result.list){
... ... @@ -161,9 +197,40 @@ export default {
161 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 238 /** 查询线下交办案卷列表 */
172 239 getList() {
173 240 this.loading = true;
174   -
  241 +
175 242 if(this.queryParams.createTime){
176 243 this.queryParams.startTime = this.queryParams.createTime[0];
177 244 this.queryParams.endTime = this.queryParams.createTime[1];
... ... @@ -263,10 +330,8 @@ export default {
263 330 },
264 331 getCaseType(type){
265 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 397 this.queryParams.startTime = this.queryParams.createTime[0];
333 398 this.queryParams.endTime = this.queryParams.createTime[1];
334 399 }
335   -
  400 +
336 401 const query = {};
337   -
  402 +
338 403 for(var i in this.queryParams){
339 404 query[i] = this.queryParams[i];
340 405 }
341   -
  406 +
342 407 query.createTime = null;
343 408 this.$confirm('是否确认导出所有线下交办案卷数据项?', "警告", {
344 409 confirmButtonText: "确定",
... ...
trash-ui/src/api/dayWorkReport.js
... ... @@ -252,6 +252,9 @@ export default {
252 252 createTime: list[i].createTime,
253 253 selfCheckTime: list[i].selfCheckTime,
254 254 place: list[i].place,
  255 + workAreaCodeName: list[i].workAreaCodeName,
  256 + siteInvestmentTypeName: list[i].siteInvestmentTypeName,
  257 + address: list[i].address,
255 258 status: list[i].status,
256 259 ename: list[i].ename,
257 260 eplace: list[i].eplace,
... ... @@ -427,7 +430,8 @@ export default {
427 430 this.queryParams.subReason = null;
428 431 this.queryParams.place = null;
429 432 this.queryParams.earthsitesName = null;
430   - this.queryParams.name = null;
  433 + this.queryParams.name = null;
  434 + this.queryParams.workAreaCodeName = null;
431 435  
432 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 13  
14 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 17 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
18 18  
19 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 17  
18 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 21 import caseOfflineInfo from "@/views/caseOffline/caseOffline/caseOfflineInfo";
22 22  
23 23 import {historyFromDataByTime} from '@/api/activiti/historyFormdata'
... ...
trash-ui/src/api/truck_active.js
... ... @@ -122,6 +122,9 @@ export default {
122 122 if(arr[j].split("=")[0] == "objValue"){
123 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 8 deleteUpCase,
9 9 delayUpCase,
10 10 } from "@/api/casefile/violationCaseFile";
11   -import violationCaseFileInfo from "@/views/casefile/violationCaseFile/violationCaseFileInfo";
  11 +import violationCaseFileInfo from "@/views/h5/task/violationCaseFileInfo";
12 12  
13 13 import h5Info from "@/views/h5/task/violationCaseFileInfo";
14 14 import h5Page from "@/views/h5/Pagination";
... ... @@ -82,36 +82,7 @@ export default {
82 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 86 projectNameList: {},
116 87 isLoading: false,
117 88 fileEntityList: [],
... ... @@ -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 146 getArea().then(res => {
171 147 this.areas = res.result;
172 148 });
... ... @@ -222,6 +198,37 @@ export default {
222 198 this.getList();
223 199 },
224 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 232 openFunction(obj,idx){
226 233 this.object = obj;
227 234 if(idx == 1){
... ... @@ -233,7 +240,6 @@ export default {
233 240 }
234 241 },
235 242 deleteUpCase(){
236   - debugger;
237 243 if(!this.form.describe){
238 244 this.$message("请填写理由!");
239 245 return;
... ... @@ -593,8 +599,15 @@ export default {
593 599  
594 600 let companyName = formData.companyName ? formData.companyName : "";
595 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 611 this.rules.companyName = null;
599 612 this.rules.projectName = null;
600 613 }
... ...
trash-ui/src/api/vio_casefile_info.js
... ... @@ -31,10 +31,20 @@ export default {
31 31 }
32 32 },
33 33 created() {
34   -
  34 + this.listData({dictType:"vio_casefile"}).then(res=>{
  35 + this.caseType = res.rows;
  36 + });
35 37 this.init();
36 38 },
37 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 48 submit(){
39 49 let postData = {};
40 50  
... ... @@ -42,13 +52,13 @@ export default {
42 52 postData.replyImg = this.form.replyImg + "";
43 53 postData.reply = this.form.reply;
44 54  
45   -
  55 +
46 56 addReplyApprovalProcess(postData).then(res => {
47 57 this.videoSrc1 = [];
48 58 this.slides1 = [];
49   -
  59 +
50 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 76 let files = JSON.stringify(response.data.uploadFiles);
67 77 this.fileEntityList = JSON.parse(files.replaceAll("filePath", "url").replaceAll("fileName", "name"));
68 78 this.fileEntityList.map(item => {
69   -
70   -
  79 +
  80 +
71 81 if (item.name.indexOf(".jpg") > -1 || item.name.indexOf(".png") > -1 || item.name.indexOf(".jpeg") > -1) {
72 82 if(item.url.startsWith("https:")){
73 83 this.slide1.push(item.url);
74 84 }else{
75 85 this.slide1.push(process.env.VUE_APP_BASE_API + item.url);
76 86 }
77   -
78   -
  87 +
  88 +
79 89 }
80 90 if (item.name.indexOf(".mp4") > -1 || item.name.indexOf(".avi") > -1) {
81 91 if(item.url.startsWith("https:")){
... ...
trash-ui/src/api/vio_warning_info.js
... ... @@ -35,6 +35,14 @@ export default {
35 35 this.init();
36 36 },
37 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 46 init() {
39 47 let id = this.idInfo.split(":");
40 48  
... ...
trash-ui/src/api/warningInfo.js
... ... @@ -7,12 +7,13 @@ import {
7 7 exportViolationWarningInformation
8 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 13 import h5Page from '@/views/h5/Pagination';
14 14 import h5Info from "@/views/h5/task/violationWarningInformationInfo";
15 15  
  16 +import {listReplyApprovalProcess} from "@/api/casefile/replyApprovalProcess";
16 17  
17 18 import {
18 19 earthsitesList,
... ... @@ -104,74 +105,8 @@ export default {
104 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 111 projectNameList: {},
177 112 isLoading: false,
... ... @@ -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 160 getAreaList().then(res => {
222 161 this.areas = res.data;
223 162 });
... ... @@ -236,7 +175,7 @@ export default {
236 175 getCompanyList(this.remoteQueryData).then(res => {
237 176 this.companyList = res.data;
238 177 });
239   - debugger;
  178 +
240 179 if(window.location.search){
241 180 let params = window.location.search.replace("?","");
242 181 let arr = params.split("&");
... ... @@ -271,12 +210,41 @@ export default {
271 210  
272 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 237 selectArea(item) {
276   -
277 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 249 getList() {
282 250 this.loading = true;
... ... @@ -628,9 +596,14 @@ export default {
628 596  
629 597 let companyName = formData.companyName ? formData.companyName : "";
630 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 607 this.rules.companyName = null;
635 608 this.rules.projectName = null;
636 609 }
... ...
trash-ui/src/layout/index.vue
1 1 <template>
2 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 3 <app-main />
7   -
8   - </div>
9 4 </div>
10 5 </template>
11 6  
... ... @@ -146,4 +141,3 @@ export default {
146 141 width: 100%;
147 142 }
148 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 17  
18 18 import './assets/icons' // icon
19 19 import './permission' // permission control
20   -import { getDicts } from "@/api/system/dict/data";
  20 +import { getDicts,listData } from "@/api/system/dict/data";
  21 +
21 22 import { checkPermi } from "@/utils/permission";
22 23 import { getConfigKey } from "@/api/system/config";
23 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 28  
28 29 // 全局方法挂载
29 30 Vue.prototype.getDicts = getDicts
  31 +Vue.prototype.listData = listData
30 32 Vue.prototype.getConfigKey = getConfigKey
31 33 Vue.prototype.parseTime = parseTime
32 34 Vue.prototype.resetForm = resetForm
... ...
trash-ui/src/views/activiti/task/index.vue
... ... @@ -654,8 +654,8 @@
654 654 import logisticsInfo from "@/views/office/logistics/logisticsInfo";
655 655 import handleInfo from "@/views/office/handle/handleInfo";
656 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 659 import supervisionInfo from "@/views/activiti/task/SupervisionInfo";
660 660 import companyInfo from "@/views/activiti/task/companyInfo";
661 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 192 import logisticsInfo from "@/views/office/logistics/logisticsInfo";
193 193 import handleInfo from "@/views/office/handle/handleInfo";
194 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 197 import supervisionInfo from "../task/SupervisionInfo";
198 198  
199 199 import companyInfo from "@/views/activiti/task/companyInfo";
... ...
trash-ui/src/views/business/dayWorkReport/index.vue
... ... @@ -46,15 +46,24 @@
46 46 <el-option v-for="item in enames" :label="item" :value="item" />
47 47 </el-select>
48 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 60 <el-form-item label="工地区属" >
52 61 <el-select v-model="queryParams.place" placeholder="工地所属区域 " size="small">
53 62 <el-option v-for="item in areas" :label="item.name" :value="item.code" />
54 63 </el-select>
55 64 </el-form-item>
56 65 </el-col>
57   - <el-col :span="6">
  66 + <el-col :span="4">
58 67 <el-form-item label="处理场所区属" >
59 68 <el-select v-model="queryParams.subReason" placeholder="工地所属区域 " size="small">
60 69 <el-option v-for="item in areas" :label="item.name" :value="item.name" />
... ... @@ -63,7 +72,7 @@
63 72 </el-col>
64 73 </el-row>
65 74 <el-row v-if="this.queryParams.his > 1">
66   - <el-col :span="6">
  75 + <el-col :span="4">
67 76 <el-form-item label="名称" >
68 77 <!-- <el-input v-model="queryParams.name" placeholder="请输入项目名称" size="small" /> -->
69 78  
... ... @@ -73,12 +82,21 @@
73 82 </el-form-item>
74 83 </el-col>
75 84  
76   - <el-col :span="6">
  85 + <el-col :span="4">
77 86 <el-form-item label="区属" >
78 87 <el-select v-model="queryParams.place" placeholder="工地所属区域 " size="small">
79 88 <el-option v-for="item in areas" :label="item.name" :value="item.code" />
80 89 </el-select>
81 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 100 </el-col>
83 101 </el-row>
84 102 <el-row>
... ... @@ -126,8 +144,9 @@
126 144  
127 145 </el-table-column>
128 146 <el-table-column label="所属区域" align="center" prop="place" />
  147 + <el-table-column label="作业区域" align="center" prop="workAreaCodeName" />
129 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 150 <el-table-column label="处理场所名称" align="center" prop="ename" >
132 151 <template slot-scope="scope">
133 152 <a @click="getInfo(scope.row,1);">{{ scope.row.ename}}</a>
... ... @@ -136,7 +155,7 @@
136 155 </el-table-column>
137 156 <el-table-column label="所属区域" align="center" prop="eplace" />
138 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 159 <el-table-column label="备注" align="center" prop="descript"/>
141 160 </el-table>
142 161  
... ... @@ -152,7 +171,8 @@
152 171  
153 172 <el-table-column label="管辖区" align="center" prop="place">
154 173 </el-table-column>
155   -
  174 + <el-table-column label="作业区域" align="center" prop="workAreaCodeName" v-show="queryParams.his == 2 ">
  175 + </el-table-column>
156 176 <el-table-column label="自查时间" align="center" prop="selfCheckTime" width="180">
157 177 <template slot-scope="scope">
158 178 <span>{{scope.row.selfCheckTime}}</span>
... ...
trash-ui/src/views/business/threeHistory/index.vue
... ... @@ -15,6 +15,12 @@
15 15 <el-option v-for="item in areas" :label="item.name" :value="item.name" />
16 16 </el-select>
17 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 24 <el-form-item>
19 25 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
20 26 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
... ... @@ -53,7 +59,8 @@
53 59 <el-table-column label="序号" align="center" type="index" />
54 60 <el-table-column :label="pageLabel" align="center" prop="name" />
55 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 64 <el-table-column label="操作时间" align="center" prop="createTime" />
58 65 <el-table-column label="操作人" align="center" prop="createBy" />
59 66 <el-table-column label="状态" align="center" prop="status">
... ... @@ -210,6 +217,7 @@ export default {
210 217 this.threeHistoryList = response.rows;
211 218 this.total = response.total;
212 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 190 <el-input v-model="form.img0" type="hidden"></el-input>
191 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 192 </el-col>
193   - <el-col :span="6">
  193 + <el-col :span="6">
  194 + <span style="color: red;">*</span>
194 195 <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">洗车平台照片</a>
195 196 <br/>
196 197 <el-image v-for="item in slides[1]"
... ...
trash-ui/src/views/caseOffline/caseOffline/index.vue
... ... @@ -3,7 +3,7 @@
3 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 4 <el-form-item label="案卷类型" prop="type">
5 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 7 </el-select>
8 8 </el-form-item>
9 9 <el-form-item label="所属区域" prop="place">
... ... @@ -17,6 +17,14 @@
17 17 value-format="yyyy-MM-dd HH:mm:ss"
18 18 end-placeholder="结束日期">
19 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 28 </el-form-item>
21 29 <el-form-item>
22 30 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
... ... @@ -54,7 +62,14 @@
54 62 <el-table-column label="案卷类型" align="center" prop="type"/>
55 63 <el-table-column label="所属区域" align="center" prop="place"/>
56 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 73 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
59 74 <template slot-scope="scope">
60 75 <el-button
... ... @@ -81,7 +96,7 @@
81 96 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
82 97 <el-form-item label="案卷类型" prop="type">
83 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 100 </el-select>
86 101 </el-form-item>
87 102 <el-form-item label="所属区域" prop="place">
... ... @@ -93,13 +108,14 @@
93 108 <el-select v-model="form.siteType" placeholder="请选择类型">
94 109 <el-option label="工地" value="0"/>
95 110 <el-option label="处理场所" value="1"/>
  111 + <el-option label="车辆" value="2"/>
96 112 </el-select>
97 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 115 <el-select
100 116 :popper-append-to-body="false" class="product-style"
101 117 v-model="form.siteName" placeholder="请选择类型"
102   - allow-create filterable @change="getSite">
  118 + allow-create filterable :filter-method="getSite">
103 119 <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" :title="item.name"/>
104 120 </el-select>
105 121 </el-form-item>
... ...
trash-ui/src/views/casefile/violationCaseFile/index.vue
... ... @@ -10,7 +10,7 @@
10 10 </el-form-item>
11 11 <el-form-item label="违规类型" prop="violationType">
12 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 14 </el-select>
15 15 </el-form-item>
16 16  
... ... @@ -33,7 +33,7 @@
33 33 </el-form-item>
34 34  
35 35 <el-form-item label="日期" prop="createTime">
36   - <el-date-picker size="small"
  36 + <el-date-picker size="small"
37 37 v-model="queryParams.createTime" type="datetimerange"
38 38 start-placeholder="开始日期"
39 39 value-format="yyyy-MM-dd HH:mm:ss"
... ... @@ -45,6 +45,14 @@
45 45 <el-option label="平台数据" value="0" />
46 46 <el-option label="综管数据" value="1" />
47 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 56 </el-form-item>
49 57 <el-form-item>
50 58 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
... ... @@ -98,9 +106,19 @@
98 106 <span>{{scope.row.violationObjectType == 0 ? "工地" :scope.row.violationObjectType == 1 ?"处理场所":"企业"}}</span>
99 107 </template>
100 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 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 122 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
105 123 <template slot-scope="scope">
106 124 <el-button
... ... @@ -211,7 +229,7 @@
211 229 <el-col :span="11">
212 230 <el-form-item label="违规类型" prop="violationType">
213 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 233 </el-select>
216 234 </el-form-item>
217 235 </el-col>
... ... @@ -232,7 +250,9 @@
232 250 :filterable="true"
233 251 :loading="isLoading" placeholder="请输入项目名称" style="width: 100%;"
234 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 256 </el-select>
237 257 </el-form-item>
238 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 15 </el-form-item>
16 16 <el-form-item label="违规类型" prop="violationType">
17 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 19 </el-select>
20 20 </el-form-item>
21 21 <el-form-item label="违规对象" prop="projectName">
... ... @@ -33,6 +33,14 @@
33 33 value-format="yyyy-MM-dd HH:mm:ss"
34 34 end-placeholder="结束日期">
35 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 44 </el-form-item>
37 45 <el-form-item>
38 46 <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
... ... @@ -84,8 +92,17 @@
84 92 <span>{{scope.row.violationObjectType == 0 ? "工地" :scope.row.violationObjectType == 1 ?"处理场所":"企业"}}</span>
85 93 </template>
86 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 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 106 <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
90 107 <template slot-scope="scope">
91 108 <el-button
... ... @@ -151,7 +168,7 @@
151 168 <el-col :span="11">
152 169 <el-form-item label="违规类型" prop="violationType">
153 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 172 </el-select>
156 173 </el-form-item>
157 174 </el-col>
... ... @@ -170,7 +187,7 @@
170 187 <el-select v-model="form.projectName" :filterable="true"
171 188 :remote-method="projectNameLoadOptions" :loading="isLoading" placeholder="请输入项目名称" style="width: 100%;">
172 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 191 </el-select>
175 192 </el-form-item>
176 193 </el-col>
... ...
trash-ui/src/views/h5/caseOffline/caseOfflineInfo.vue
1 1 <template>
2   -
3 2 <div>
4 3 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  4 +
5 5 <el-form-item label="案卷类型" prop="type">
6 6 <el-input v-model="form.type" type="textarea" :rows="3" disabled />
7 7 </el-form-item>
... ... @@ -48,7 +48,7 @@
48 48 </el-table>
49 49  
50 50  
51   - </el-form>
  51 + </el-form>
52 52 <el-dialog title="" :visible.sync="showPic" append-to-body width="400px">
53 53 <img :src="picImage" width="100%" height="400px" />
54 54 </el-dialog>
... ...
trash-ui/src/views/h5/caseOffline/index.vue
... ... @@ -3,7 +3,7 @@
3 3 <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
4 4 <el-form-item label="案卷类型" prop="type">
5 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 7 </el-select>
8 8 </el-form-item>
9 9 <el-form-item label="所属区域" prop="place">
... ... @@ -80,7 +80,7 @@
80 80 <el-form ref="form" :model="form" :rules="rules" label-width="80px">
81 81 <el-form-item label="案卷类型" prop="type">
82 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 84 </el-select>
85 85 </el-form-item>
86 86 <el-form-item label="所属区域" prop="place">
... ... @@ -92,10 +92,12 @@
92 92 <el-select v-model="form.siteType" placeholder="请选择类型">
93 93 <el-option label="工地" value="0" />
94 94 <el-option label="处理场所" value="1" />
  95 + <el-option label="车辆" value="2" />
95 96 </el-select>
96 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 101 <el-option v-for="item in data[form.siteType]" :label="item.name" :value="item.name" />
100 102 </el-select>
101 103 </el-form-item>
... ... @@ -124,6 +126,8 @@
124 126  
125 127  
126 128 <el-dialog title="查看详情" :visible.sync="open2" width="300px" append-to-body>
  129 +
  130 + <el-button @click="androidPrint();">打印</el-button>
127 131 <h5Info :businessKey="businessKey" v-if="open2" />
128 132 <div slot="footer" class="dialog-footer">
129 133 <el-button @click="cancel">取 消</el-button>
... ...
trash-ui/src/views/h5/task/violationCaseFileInfo.vue
... ... @@ -21,11 +21,8 @@
21 21 </el-select>
22 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 26 </el-form-item>
30 27  
31 28  
... ...
trash-ui/src/views/h5/task/violationWarningInformationInfo.vue
... ... @@ -19,9 +19,8 @@
19 19 </el-select>
20 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 24 </el-form-item>
26 25  
27 26  
... ...
trash-ui/src/views/h5/threestep/index.vue
... ... @@ -150,7 +150,8 @@
150 150 <el-input v-model="form.img0" type="hidden"></el-input>
151 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 152 </el-col>
153   - <el-col :span="12">
  153 + <el-col :span="12">
  154 + <span style="color: red;">*</span>
154 155 <a style="color:blue;font-size: 12px;" @click="showFileUpload(1)">洗车平台照片</a>
155 156 <el-image v-for="item in slides[1]"
156 157 style="width: 100px; height: 100px; margin: 5px;"
... ...
trash-ui/src/views/h5/violationCaseFile/index.vue
... ... @@ -10,7 +10,7 @@
10 10 </el-form-item>
11 11 <el-form-item label="违规类型" prop="violationType">
12 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 14 </el-select>
15 15 </el-form-item>
16 16  
... ... @@ -51,7 +51,7 @@
51 51 >
52 52 <el-row class="card_row">
53 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 55 </el-col>
56 56 </el-row>
57 57 <el-row class="card_row" style="margin-top:10px;margin-bottom:10px;">
... ... @@ -123,7 +123,7 @@
123 123 <el-col :span="11">
124 124 <el-form-item label="违规类型" prop="violationType">
125 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 127 </el-select>
128 128 </el-form-item>
129 129 </el-col>
... ... @@ -139,7 +139,7 @@
139 139 </el-col>
140 140 <el-col :span="11">
141 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 143 placeholder="请输入项目名称" style="width: 100%;" @change="getRemoteDate">
144 144 <el-option v-for="item in data" :key="item.name" :label="item.name" :value="item.name"
145 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 8 import java.util.HashMap;
9 9 import java.util.List;
10 10 import java.util.Map;
  11 +import java.util.concurrent.TimeUnit;
11 12  
12 13 import javax.servlet.http.HttpServletRequest;
13 14 import javax.servlet.http.HttpServletResponse;
... ... @@ -36,6 +37,7 @@ import com.alibaba.fastjson.JSON;
36 37 import com.alibaba.fastjson.JSONArray;
37 38 import com.alibaba.fastjson.JSONObject;
38 39 import com.trash.business.domain.SupervisionThreestep;
  40 +import com.trash.business.domain.SupervisionThreestepWithWorkArea;
39 41 import com.trash.business.domain.dayWork;
40 42 import com.trash.business.service.ISupervisionThreestepService;
41 43 import com.trash.common.utils.RemoteServerUtils;
... ... @@ -56,359 +58,373 @@ import com.trash.common.core.redis.RedisCache;
56 58 */
57 59 @RestController
58 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 92 } catch (Exception e) {
95 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 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 120 {
121 121 truckCredit.setCreateBy(SecurityUtils.getUsername());
122 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 130 @PutMapping
131 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 76 /** 运输车辆 */
77 77 private String companyTrucks;
78 78  
  79 + private String workAreaCodeName;
  80 +
79 81 private String img0;
80 82  
81 83 private String img1;
... ... @@ -145,6 +147,16 @@ public class SupervisionThreestep extends BaseEntity
145 147  
146 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 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 34 /** 所属区域 */
35 35 @Excel(name = "所属区域")
36 36 private String place;
  37 +
  38 + /** 所属区域 */
  39 + @Excel(name = "工作区域")
  40 + private String workAreaCodeName;
37 41  
38 42  
39 43 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
... ... @@ -71,7 +75,17 @@ public class ThreestepHistory extends BaseEntity
71 75 @Excel(name = "联系方式 ")
72 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 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 43 /** 管辖区 */
44 44 @Excel(name = "所属区域")
45 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 57 @Excel(name = "开工状态")
48 58 private String estatus;
... ... @@ -54,6 +64,31 @@ public class dayWork extends BaseEntity
54 64 @Excel(name = "备注")
55 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 93 public String getName() {
59 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 2  
3 3 import java.util.List;
4 4  
  5 +import com.alibaba.fastjson.JSONArray;
5 6 import com.trash.business.domain.ConstructionCredit;
  7 +import com.trash.business.mapper.SmsMapper;
6 8  
7 9 /**
8 10 * 三查机制Service接口
... ... @@ -65,4 +67,6 @@ public interface IConstructionCreditService
65 67 List<String> getPlaces(ConstructionCredit constructionCredit);
66 68  
67 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 28 * @param truckCredit 车辆失信
29 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 36 * @param truckCredit 车辆失信
37 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 21 import com.trash.common.core.redis.RedisCache;
22 22 import com.trash.common.utils.RemoteServerUtils;
23 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 29 * 企业失信Service业务层处理
... ... @@ -130,7 +133,9 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
130 133 }
131 134  
132 135 updateRemoteCompanyAndTruck(companyCredit, token);
133   -
  136 +
  137 +
  138 +
134 139 return;
135 140 }
136 141  
... ... @@ -138,7 +143,51 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
138 143 public void updateRemoteCompanyAndTruck(CompanyCredit companyCredit, String token) {
139 144 long credit = companyCredit.getLostCredit();
140 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 191 List<Map> cpcList = new ArrayList<>();
143 192 Map cpc = new HashedMap<>();
144 193 cpc.put("dishonestState", credit);
... ... @@ -181,7 +230,7 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
181 230 if (credit == 0 && (data.getCreateType() != null && data.getCreateType() == 1)) {
182 231 data.setLostCredit(credit);
183 232 data.setReason("公司失信恢复");
184   - truckService.updateTruckCredit(data);
  233 + truckService.updateTruckCredit(data,1);
185 234 Map upParam = new HashedMap<>();
186 235 upParam.put("creditStatus", credit);
187 236 upParam.put("id", truckId);
... ... @@ -218,7 +267,7 @@ public class CompanyCreditServiceImpl implements ICompanyCreditService {
218 267  
219 268 data.setObjectId(truckId);
220 269  
221   - truckService.insertTruckCredit(data);
  270 + truckService.insertTruckCredit(data,1);
222 271  
223 272 Map upParam = new HashedMap<>();
224 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 15 import com.trash.business.domain.CompanyCredit;
16 16 import com.trash.business.domain.ConstructionCredit;
17 17 import com.trash.business.mapper.ConstructionCreditMapper;
  18 +import com.trash.business.mapper.SmsMapper;
18 19 import com.trash.business.service.IConstructionCreditService;
19 20 import com.trash.common.core.redis.RedisCache;
20 21 import com.trash.common.utils.RemoteServerUtils;
21 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 28 * 三查机制Service业务层处理
... ... @@ -31,7 +35,10 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService
31 35 {
32 36 @Autowired
33 37 private ConstructionCreditMapper constructionCreditMapper;
34   -
  38 +
  39 + @Autowired
  40 + SmsMapper smsMapper;
  41 +
35 42  
36 43 @Autowired
37 44 RedisCache redis;
... ... @@ -134,7 +141,6 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService
134 141 public int insertConstructionCredit(ConstructionCredit constructionCredit)
135 142 {
136 143  
137   -
138 144 List<Map> map = new ArrayList<Map>();
139 145  
140 146 ConstructionCredit cc = new ConstructionCredit();
... ... @@ -150,19 +156,137 @@ public class ConstructionCreditServiceImpl implements IConstructionCreditService
150 156 if(old.size() > 0){
151 157 i = 1;
152 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 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 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 19 import com.trash.common.core.redis.RedisCache;
20 20 import com.trash.common.utils.RemoteServerUtils;
21 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 26 import org.springframework.transaction.annotation.Transactional;
24 27  
... ... @@ -33,6 +36,9 @@ public class DriverCreditServiceImpl implements IDriverCreditService
33 36 {
34 37 @Autowired
35 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 71 List<DriverCredit> list = new ArrayList<>();
66 72  
67 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 77 if(areas.size() > 0) {
... ... @@ -133,6 +139,69 @@ List&lt;String&gt; areas = SecurityUtils.getLoginUser().getUser().getCompanyAreas();
133 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 205 // sentDataToRemoteServer(driverCredit);
137 206  
138 207 return i;
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/EarthsitesCreditServiceImpl.java
... ... @@ -9,11 +9,13 @@ import java.util.Map;
9 9 import org.springframework.beans.factory.annotation.Autowired;
10 10 import org.springframework.stereotype.Service;
11 11 import com.trash.business.mapper.EarthsitesCreditMapper;
  12 +import com.trash.business.mapper.SmsMapper;
12 13 import com.trash.business.mapper.TruckCreditMapper;
13 14 import com.alibaba.fastjson.JSONArray;
14 15 import com.alibaba.fastjson.JSONObject;
15 16 import com.trash.business.domain.ConstructionCredit;
16 17 import com.trash.business.domain.EarthsitesCredit;
  18 +import com.trash.business.service.IConstructionCreditService;
17 19 import com.trash.business.service.IEarthsitesCreditService;
18 20 import com.trash.common.core.redis.RedisCache;
19 21 import com.trash.common.utils.RemoteServerUtils;
... ... @@ -31,6 +33,13 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService
31 33 @Autowired
32 34 private EarthsitesCreditMapper earthsitesCreditMapper;
33 35  
  36 +
  37 + @Autowired
  38 + private IConstructionCreditService smsServer;
  39 +
  40 + @Autowired
  41 + SmsMapper smsMapper;
  42 +
34 43 @Autowired
35 44 RedisCache redis;
36 45 /**
... ... @@ -114,16 +123,21 @@ public class EarthsitesCreditServiceImpl implements IEarthsitesCreditService
114 123 i = 1;
115 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 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 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 8 import java.util.HashMap;
9 9 import java.util.List;
10 10 import java.util.Map;
  11 +import java.util.concurrent.TimeUnit;
11 12  
12 13 import org.apache.commons.collections4.map.HashedMap;
13 14 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -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 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 214 return list;
  215 +
175 216 }
176 217  
177 218 @Override
... ... @@ -223,7 +264,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
223 264 return supervisionThreestepMapper.getNames(supervisionThreestep);
224 265 }
225 266  
226   -
227 267 String[] outside = { "长沙县", "望城区", "浏阳市", "宁乡市", "株洲市", "湘潭市", "汩罗市", "湘阴县" };
228 268  
229 269 @SuppressWarnings("unchecked")
... ... @@ -269,7 +309,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
269 309 }
270 310  
271 311 JSONArray contracts = redisCache.getCacheObject("contractList");
272   -
273 312 if (contracts == null) {
274 313 Map param = new HashMap<>();
275 314  
... ... @@ -282,6 +321,17 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
282 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 335 JSONArray areas = redisCache.getCacheObject("areas");
286 336  
287 337 String place = null, eplace = null, name = null, ename = null;
... ... @@ -409,6 +459,20 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
409 459 map.put("createTime", yearFomat.format(s.getCreateTime()));
410 460 map.put("name", s.getName());
411 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 476 map.put("status", "开工");
413 477 map.put("selfCheckTime", dateTime.format(s.getSelfCheckTime()));
414 478 map.put("objectId", s.getObjectId());
... ... @@ -452,6 +516,18 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
452 516 map.put("createTime", yearFomat.format(s.getCreateTime()));
453 517 map.put("name", s.getName());
454 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 531 map.put("status", "开工");
456 532 map.put("selfCheckTime", dateTime.format(s.getSelfCheckTime()));
457 533 map.put("objectId", s.getObjectId());
... ... @@ -488,12 +564,19 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
488 564 eplace = supervisionThreestep.getSubReason();
489 565 }
490 566  
  567 + String workAreaCodeName = supervisionThreestep.getWorkAreaCodeName();
  568 +
491 569 for (Map<String, String> map : list) {
492 570 if (place != null) {
493 571 if (!place.equals(map.get("place"))) {
494 572 continue;
495 573 }
496 574 }
  575 + if (workAreaCodeName != null) {
  576 + if (!workAreaCodeName.equals(map.get("workAreaCodeName"))) {
  577 + continue;
  578 + }
  579 + }
497 580 if (eplace != null) {
498 581 if (!eplace.equals(map.get("eplace"))) {
499 582 continue;
... ... @@ -519,15 +602,13 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
519 602  
520 603 @Override
521 604 public List<Map> selectDayWorkListByType(SupervisionThreestep supervisionThreestep) {
522   -
523 605  
524 606 Date date = new Date();
525 607 SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
526 608 SimpleDateFormat dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
527   - if(supervisionThreestep.getWorkStartTime() == null){
  609 + if (supervisionThreestep.getWorkStartTime() == null) {
528 610 String start, end;
529   -
530   -
  611 +
531 612 if (new Date().getHours() < 8) {
532 613 end = yearFomat.format(date);
533 614 date.setDate(date.getDate() - 1);
... ... @@ -537,10 +618,10 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
537 618 date.setDate(date.getDate() + 1);
538 619 end = yearFomat.format(date);
539 620 }
540   -
  621 +
541 622 end += " 4:00:00";
542 623 start += " 8:00:00";
543   -
  624 +
544 625 try {
545 626 supervisionThreestep.setWorkStartTime(dateTime.parse(start));
546 627 supervisionThreestep.setWorkEndTime(dateTime.parse(end));
... ... @@ -614,47 +695,47 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
614 695 }
615 696  
616 697 List<SupervisionThreestep> data = new ArrayList<>();
617   -
  698 +
618 699 String companyName = SecurityUtils.getLoginUser().getUser().getCompanyName();
619   -
620   -
621   -
  700 +
622 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 791  
711 792 return -1;
712 793 }
713   -
714   - if(supervisionThreestep.getType() == 0){
715   -
  794 +
  795 + if (supervisionThreestep.getType() == 0) {
  796 +
716 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 802 long time = new Date().getTime();
722   -
  803 +
723 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 808 return -3;
726 809 }
727 810 } catch (ParseException e) {
728 811 e.printStackTrace();
729 812 }
730   - }else{
  813 + } else {
731 814 return -4;
732 815 }
733   -
734   - }else{
  816 +
  817 + } else {
735 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 823 long time = new Date().getTime();
741   -
  824 +
742 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 829 return -3;
745 830 }
746 831 } catch (ParseException e) {
747 832 e.printStackTrace();
748 833 }
749   -
750   - }else{
  834 +
  835 + } else {
751 836 return -4;
752 837 }
753   -
  838 +
754 839 }
755   -
756 840  
757 841 supervisionThreestep.setCreateTime(DateUtils.getNowDate());
758 842 supervisionThreestep.setSelfCheckTime(DateUtils.getNowDate());
... ... @@ -904,12 +988,11 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
904 988 truckActivate.setStatus(0L);
905 989 truckActivate.setActivateStatus("0");
906 990 List<TruckActivate> taList = null;
907   - try{
  991 + try {
908 992 taList = truckActivateMapper.selectTruckActivateList(truckActivate);
909   - }catch(Exception e){
  993 + } catch (Exception e) {
910 994 e.printStackTrace();
911 995 }
912   -
913 996  
914 997 for (TruckActivate ta : taList) {
915 998 unActiveTruck += ta.getObjectId() + ",";
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/ThreestepHistoryServiceImpl.java
1 1 package com.trash.business.service.impl;
2 2  
3 3 import java.text.SimpleDateFormat;
  4 +import java.util.ArrayList;
4 5 import java.util.Date;
  6 +import java.util.HashMap;
5 7 import java.util.List;
  8 +import java.util.Map;
  9 +import java.util.concurrent.TimeUnit;
6 10  
7 11 import org.springframework.beans.factory.annotation.Autowired;
8 12 import org.springframework.stereotype.Service;
9 13 import org.springframework.transaction.annotation.Transactional;
10 14  
  15 +import com.alibaba.fastjson.JSONArray;
11 16 import com.alibaba.fastjson.JSONObject;
12 17 import com.trash.business.domain.SupervisionThreestep;
13 18 import com.trash.business.domain.ThreestepHistory;
... ... @@ -15,6 +20,7 @@ import com.trash.business.mapper.SupervisionThreestepMapper;
15 20 import com.trash.business.mapper.ThreestepHistoryMapper;
16 21 import com.trash.business.service.ISupervisionThreestepService;
17 22 import com.trash.business.service.IThreestepHistoryService;
  23 +import com.trash.common.core.redis.RedisCache;
18 24 import com.trash.common.utils.DateUtils;
19 25 import com.trash.common.utils.RemoteServerUtils;
20 26 import com.trash.common.utils.SecurityUtils;
... ... @@ -31,10 +37,11 @@ public class ThreestepHistoryServiceImpl implements IThreestepHistoryService
31 37 @Autowired
32 38 private ThreestepHistoryMapper threestepHistoryMapper;
33 39  
34   -
35 40 @Autowired
36 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 62 */
56 63 @Override
57 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 20 import com.trash.common.core.redis.RedisCache;
21 21 import com.trash.common.utils.RemoteServerUtils;
22 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 28 * 车辆失信Service业务层处理
... ... @@ -110,10 +113,11 @@ public class TruckCreditServiceImpl implements ITruckCreditService
110 113 * 新增车辆失信
111 114 *
112 115 * @param truckCredit 车辆失信
  116 + * @param isCompany
113 117 * @return 结果
114 118 */
115 119 @Override
116   - public int insertTruckCredit(TruckCredit truckCredit)
  120 + public int insertTruckCredit(TruckCredit truckCredit, int isCompany)
117 121 {
118 122  
119 123 int i;
... ... @@ -132,11 +136,60 @@ public class TruckCreditServiceImpl implements ITruckCreditService
132 136 cc.setTime(new Date());
133 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 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 198 */
146 199 @Override
147 200 @Transactional
148   - public int updateTruckCredit(TruckCredit truckCredit)
  201 + public int updateTruckCredit(TruckCredit truckCredit,int i)
149 202 {
150 203 TruckCredit cc = null;
151 204 if(truckCredit.getObjectId() != null){
... ... @@ -176,7 +229,7 @@ public class TruckCreditServiceImpl implements ITruckCreditService
176 229  
177 230 RemoteServerUtils.updateTruckList(listParam);
178 231  
179   - return insertTruckCredit(cc);
  232 + return insertTruckCredit(cc,i);
180 233  
181 234 } catch (Exception e) {
182 235  
... ...
trash-workFlow/src/main/java/com/trash/caseOffline/controller/CaseOfflineController.java
1 1 package com.trash.caseOffline.controller;
2 2  
3   -import java.util.HashMap;
4 3 import java.util.List;
5   -import java.util.Map;
6 4  
7   -import org.springframework.security.access.prepost.PreAuthorize;
8 5 import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.web.bind.annotation.DeleteMapping;
9 7 import org.springframework.web.bind.annotation.GetMapping;
  8 +import org.springframework.web.bind.annotation.PathVariable;
10 9 import org.springframework.web.bind.annotation.PostMapping;
11 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 11 import org.springframework.web.bind.annotation.RequestBody;
15 12 import org.springframework.web.bind.annotation.RequestMapping;
16 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 19 import com.trash.common.annotation.Log;
18 20 import com.trash.common.annotation.RepeatSubmit;
19 21 import com.trash.common.core.controller.BaseController;
20 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 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 27 import com.trash.common.utils.RemoteServerUtils;
28   -import com.trash.common.utils.SecurityUtils;
29 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 33 * 线下交办案卷Controller
... ... @@ -54,11 +53,9 @@ public class CaseOfflineController extends BaseController
54 53 {
55 54 startPage();
56 55  
57   -
58   -
59 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 64 public AjaxResult export(CaseOffline caseOffline)
68 65 {
69 66 List<CaseOffline> list = caseOfflineService.selectCaseOfflineList(caseOffline);
  67 +
  68 + List<SysDictData> dicts = SpringUtils.getBean(ISysDictTypeService.class).selectDictDataByType("case_offline_type");
  69 +
70 70  
71 71 for(int i = 0;i<list.size();i++){
72 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 90 JSONArray areas = RemoteServerUtils.getAreas();
75 91  
... ...