Commit 358d6e0079d27f7c715cdd812022d85975fa7db6
1 parent
f9ee74ad
m
Showing
24 changed files
with
300 additions
and
162 deletions
trash-common/src/main/java/com/trash/common/utils/RemoteServerUtils.java
| @@ -32,6 +32,7 @@ import javax.net.ssl.X509TrustManager; | @@ -32,6 +32,7 @@ import javax.net.ssl.X509TrustManager; | ||
| 32 | import com.alibaba.fastjson.JSON; | 32 | import com.alibaba.fastjson.JSON; |
| 33 | import com.alibaba.fastjson.JSONArray; | 33 | import com.alibaba.fastjson.JSONArray; |
| 34 | import com.alibaba.fastjson.JSONObject; | 34 | import com.alibaba.fastjson.JSONObject; |
| 35 | +import com.trash.common.utils.spring.SpringUtils; | ||
| 35 | import com.trash.common.utils.util.PostSms; | 36 | import com.trash.common.utils.util.PostSms; |
| 36 | import com.trash.common.utils.vo.mt.JsonSmsSend; | 37 | import com.trash.common.utils.vo.mt.JsonSmsSend; |
| 37 | import com.trash.common.utils.vo.mt.Mobile; | 38 | import com.trash.common.utils.vo.mt.Mobile; |
| @@ -930,7 +931,7 @@ public class RemoteServerUtils { | @@ -930,7 +931,7 @@ public class RemoteServerUtils { | ||
| 930 | Map map = new HashMap<>(); | 931 | Map map = new HashMap<>(); |
| 931 | 932 | ||
| 932 | map.put("userName", "市渣土管理系统"); | 933 | map.put("userName", "市渣土管理系统"); |
| 933 | - map.put("password", "u2nuQKePryLy6ccJywKCCQ=="); | 934 | + map.put("password", "mwcfVIiTfWttBJL02O+CGw=="); |
| 934 | String param = JSON.toJSON(map).toString(); | 935 | String param = JSON.toJSON(map).toString(); |
| 935 | 936 | ||
| 936 | RequestBody body = RequestBody.create(MediaType.parse("application/json"), param); | 937 | RequestBody body = RequestBody.create(MediaType.parse("application/json"), param); |
| @@ -1246,7 +1247,7 @@ public class RemoteServerUtils { | @@ -1246,7 +1247,7 @@ public class RemoteServerUtils { | ||
| 1246 | okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS) | 1247 | okHttpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS) |
| 1247 | .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build(); | 1248 | .writeTimeout(20, TimeUnit.SECONDS).readTimeout(30, TimeUnit.SECONDS).build(); |
| 1248 | } | 1249 | } |
| 1249 | - | 1250 | + |
| 1250 | Map map = new HashMap<>(); | 1251 | Map map = new HashMap<>(); |
| 1251 | 1252 | ||
| 1252 | String param = JSON.toJSON(map).toString(); | 1253 | String param = JSON.toJSON(map).toString(); |
| @@ -1280,6 +1281,8 @@ public class RemoteServerUtils { | @@ -1280,6 +1281,8 @@ public class RemoteServerUtils { | ||
| 1280 | 1281 | ||
| 1281 | return get(GETAUTH, null, token.replace("Bearer ", "")); | 1282 | return get(GETAUTH, null, token.replace("Bearer ", "")); |
| 1282 | } | 1283 | } |
| 1284 | + | ||
| 1285 | + | ||
| 1283 | 1286 | ||
| 1284 | 1287 | ||
| 1285 | 1288 |
trash-framework/src/main/java/com/trash/framework/web/service/SysLoginService.java
| 1 | package com.trash.framework.web.service; | 1 | package com.trash.framework.web.service; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | -import java.util.HashMap; | ||
| 5 | import java.util.HashSet; | 4 | import java.util.HashSet; |
| 6 | import java.util.List; | 5 | import java.util.List; |
| 7 | -import java.util.Map; | ||
| 8 | import java.util.Set; | 6 | import java.util.Set; |
| 9 | -import java.util.concurrent.TimeUnit; | ||
| 10 | 7 | ||
| 11 | import javax.annotation.Resource; | 8 | import javax.annotation.Resource; |
| 12 | 9 | ||
| 13 | -import org.apache.commons.collections4.iterators.ArrayListIterator; | ||
| 14 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 15 | import org.springframework.security.authentication.AuthenticationManager; | 11 | import org.springframework.security.authentication.AuthenticationManager; |
| 16 | import org.springframework.security.authentication.BadCredentialsException; | 12 | import org.springframework.security.authentication.BadCredentialsException; |
| @@ -23,7 +19,6 @@ import org.springframework.stereotype.Component; | @@ -23,7 +19,6 @@ import org.springframework.stereotype.Component; | ||
| 23 | import com.alibaba.fastjson.JSON; | 19 | import com.alibaba.fastjson.JSON; |
| 24 | import com.alibaba.fastjson.JSONArray; | 20 | import com.alibaba.fastjson.JSONArray; |
| 25 | import com.alibaba.fastjson.JSONObject; | 21 | import com.alibaba.fastjson.JSONObject; |
| 26 | -import com.trash.common.config.trashConfig; | ||
| 27 | import com.trash.common.constant.Constants; | 22 | import com.trash.common.constant.Constants; |
| 28 | import com.trash.common.core.domain.entity.SysDept; | 23 | import com.trash.common.core.domain.entity.SysDept; |
| 29 | import com.trash.common.core.domain.entity.SysRole; | 24 | import com.trash.common.core.domain.entity.SysRole; |
| @@ -36,9 +31,9 @@ import com.trash.common.exception.user.CaptchaExpireException; | @@ -36,9 +31,9 @@ import com.trash.common.exception.user.CaptchaExpireException; | ||
| 36 | import com.trash.common.exception.user.UserPasswordNotMatchException; | 31 | import com.trash.common.exception.user.UserPasswordNotMatchException; |
| 37 | import com.trash.common.utils.MessageUtils; | 32 | import com.trash.common.utils.MessageUtils; |
| 38 | import com.trash.common.utils.RemoteServerUtils; | 33 | import com.trash.common.utils.RemoteServerUtils; |
| 39 | -import com.trash.common.utils.SecurityUtils; | ||
| 40 | import com.trash.framework.manager.AsyncManager; | 34 | import com.trash.framework.manager.AsyncManager; |
| 41 | import com.trash.framework.manager.factory.AsyncFactory; | 35 | import com.trash.framework.manager.factory.AsyncFactory; |
| 36 | +import com.trash.system.mapper.SysTempMapper; | ||
| 42 | 37 | ||
| 43 | import okhttp3.OkHttpClient; | 38 | import okhttp3.OkHttpClient; |
| 44 | import okhttp3.Request; | 39 | import okhttp3.Request; |
| @@ -62,6 +57,9 @@ public class SysLoginService | @@ -62,6 +57,9 @@ public class SysLoginService | ||
| 62 | 57 | ||
| 63 | @Autowired | 58 | @Autowired |
| 64 | UserDetailsService UserDetailsService; | 59 | UserDetailsService UserDetailsService; |
| 60 | + | ||
| 61 | + @Autowired | ||
| 62 | + SysTempMapper tempMapper; | ||
| 65 | 63 | ||
| 66 | /** | 64 | /** |
| 67 | * 登录验证 | 65 | * 登录验证 |
| @@ -180,7 +178,7 @@ public class SysLoginService | @@ -180,7 +178,7 @@ public class SysLoginService | ||
| 180 | 178 | ||
| 181 | for(Object obj:userJson.getJSONArray("userIdentityList")){ | 179 | for(Object obj:userJson.getJSONArray("userIdentityList")){ |
| 182 | 180 | ||
| 183 | - JSONObject uId = (JSONObject)obj; | 181 | + JSONObject uId = (JSONObject)obj; |
| 184 | 182 | ||
| 185 | poStrings.add(uId.getString("postType")); | 183 | poStrings.add(uId.getString("postType")); |
| 186 | 184 | ||
| @@ -202,22 +200,28 @@ public class SysLoginService | @@ -202,22 +200,28 @@ public class SysLoginService | ||
| 202 | 200 | ||
| 203 | } | 201 | } |
| 204 | 202 | ||
| 205 | - | ||
| 206 | JSONArray compnayList = redisCache.getCacheObject("companyList"); | 203 | JSONArray compnayList = redisCache.getCacheObject("companyList"); |
| 207 | 204 | ||
| 208 | - | ||
| 209 | - for(Object obj:compnayList){ | ||
| 210 | - JSONObject con = (JSONObject) obj; | ||
| 211 | - | ||
| 212 | - if(con.getString("abbreviation").equals(user.getUserName().replace("公司", ""))){ | ||
| 213 | - user.setCompanyName(con.getString("name")); | ||
| 214 | - user.setUserName(con.getString("abbreviation")); | ||
| 215 | - user.setNickName(con.getString("abbreviation")); | ||
| 216 | - break; | ||
| 217 | - } | ||
| 218 | - | 205 | + if(compnayList == null){ |
| 206 | + | ||
| 207 | + compnayList = JSONArray.parseArray(tempMapper.getLocalData("companyList")); | ||
| 219 | } | 208 | } |
| 209 | + for(Object obj:compnayList){ | ||
| 210 | + JSONObject con = (JSONObject)(obj); | ||
| 211 | + | ||
| 212 | + | ||
| 213 | + if(con.getString("abbreviation").equals(user.getUserName().replace("公司", ""))){ | ||
| 214 | + user.setCompanyName(con.getString("name")); | ||
| 215 | + user.setUserName(con.getString("abbreviation")); | ||
| 216 | + user.setNickName(con.getString("abbreviation")); | ||
| 217 | + break; | ||
| 218 | + } | ||
| 219 | + | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + | ||
| 220 | 223 | ||
| 224 | + | ||
| 221 | 225 | ||
| 222 | JSONArray jsonArray = (JSONArray)RemoteServerUtils.getAuth(token); | 226 | JSONArray jsonArray = (JSONArray)RemoteServerUtils.getAuth(token); |
| 223 | if(jsonArray != null){ | 227 | if(jsonArray != null){ |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
| 1 | package com.trash.garbage.service.impl; | 1 | package com.trash.garbage.service.impl; |
| 2 | 2 | ||
| 3 | -import cn.hutool.core.collection.CollectionUtil; | ||
| 4 | -import cn.hutool.http.HttpUtil; | 3 | +import java.security.spec.AlgorithmParameterSpec; |
| 4 | +import java.util.ArrayList; | ||
| 5 | +import java.util.Arrays; | ||
| 6 | +import java.util.HashSet; | ||
| 7 | +import java.util.List; | ||
| 8 | +import java.util.Objects; | ||
| 9 | +import java.util.Set; | ||
| 10 | +import java.util.concurrent.TimeUnit; | ||
| 11 | + | ||
| 12 | +import javax.annotation.Resource; | ||
| 13 | +import javax.crypto.Cipher; | ||
| 14 | +import javax.crypto.spec.IvParameterSpec; | ||
| 15 | +import javax.crypto.spec.SecretKeySpec; | ||
| 16 | +import javax.servlet.http.HttpServletRequest; | ||
| 17 | + | ||
| 18 | +import org.apache.commons.codec.binary.Base64; | ||
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 20 | +import org.springframework.security.core.authority.SimpleGrantedAuthority; | ||
| 21 | +import org.springframework.security.core.userdetails.UsernameNotFoundException; | ||
| 22 | +import org.springframework.stereotype.Service; | ||
| 23 | +import org.springframework.transaction.annotation.Transactional; | ||
| 24 | + | ||
| 5 | import com.alibaba.fastjson.JSONObject; | 25 | import com.alibaba.fastjson.JSONObject; |
| 6 | import com.aliyuncs.exceptions.ClientException; | 26 | import com.aliyuncs.exceptions.ClientException; |
| 7 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 27 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| @@ -25,6 +45,7 @@ import com.trash.garbage.custom.BizException; | @@ -25,6 +45,7 @@ import com.trash.garbage.custom.BizException; | ||
| 25 | import com.trash.garbage.global.GlobalRedisProperties; | 45 | import com.trash.garbage.global.GlobalRedisProperties; |
| 26 | import com.trash.garbage.global.GlobalStatus; | 46 | import com.trash.garbage.global.GlobalStatus; |
| 27 | import com.trash.garbage.global.ResultCode; | 47 | import com.trash.garbage.global.ResultCode; |
| 48 | +import com.trash.garbage.mapper.GarUserMapper; | ||
| 28 | import com.trash.garbage.pojo.domain.GarAddress; | 49 | import com.trash.garbage.pojo.domain.GarAddress; |
| 29 | import com.trash.garbage.pojo.domain.GarUser; | 50 | import com.trash.garbage.pojo.domain.GarUser; |
| 30 | import com.trash.garbage.pojo.dto.AddressDto; | 51 | import com.trash.garbage.pojo.dto.AddressDto; |
| @@ -32,23 +53,11 @@ import com.trash.garbage.pojo.dto.LoginDto; | @@ -32,23 +53,11 @@ import com.trash.garbage.pojo.dto.LoginDto; | ||
| 32 | import com.trash.garbage.pojo.vo.LoginVo; | 53 | import com.trash.garbage.pojo.vo.LoginVo; |
| 33 | import com.trash.garbage.service.GarAddressService; | 54 | import com.trash.garbage.service.GarAddressService; |
| 34 | import com.trash.garbage.service.GarUserService; | 55 | import com.trash.garbage.service.GarUserService; |
| 35 | -import com.trash.garbage.mapper.GarUserMapper; | ||
| 36 | -import com.trash.garbage.utils.*; | ||
| 37 | -import org.apache.commons.codec.binary.Base64; | ||
| 38 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 39 | -import org.springframework.security.core.authority.SimpleGrantedAuthority; | ||
| 40 | -import org.springframework.security.core.userdetails.UsernameNotFoundException; | ||
| 41 | -import org.springframework.stereotype.Service; | ||
| 42 | -import org.springframework.transaction.annotation.Transactional; | 56 | +import com.trash.garbage.utils.JwtUtils; |
| 57 | +import com.trash.garbage.utils.ValidateCodeUtil; | ||
| 43 | 58 | ||
| 44 | -import javax.annotation.Resource; | ||
| 45 | -import javax.crypto.Cipher; | ||
| 46 | -import javax.crypto.spec.IvParameterSpec; | ||
| 47 | -import javax.crypto.spec.SecretKeySpec; | ||
| 48 | -import javax.servlet.http.HttpServletRequest; | ||
| 49 | -import java.security.spec.AlgorithmParameterSpec; | ||
| 50 | -import java.util.*; | ||
| 51 | -import java.util.concurrent.TimeUnit; | 59 | +import cn.hutool.core.collection.CollectionUtil; |
| 60 | +import cn.hutool.http.HttpUtil; | ||
| 52 | 61 | ||
| 53 | /** | 62 | /** |
| 54 | * @author 20412 | 63 | * @author 20412 |
trash-generator/src/main/java/com/trash/generator/service/GenTableServiceImpl.java
| @@ -407,7 +407,7 @@ public class GenTableServiceImpl implements IGenTableService | @@ -407,7 +407,7 @@ public class GenTableServiceImpl implements IGenTableService | ||
| 407 | */ | 407 | */ |
| 408 | public void setTableFromOptions(GenTable genTable) | 408 | public void setTableFromOptions(GenTable genTable) |
| 409 | { | 409 | { |
| 410 | - JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions()); | 410 | + JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions()); |
| 411 | if (StringUtils.isNotNull(paramsObj)) | 411 | if (StringUtils.isNotNull(paramsObj)) |
| 412 | { | 412 | { |
| 413 | String treeCode = paramsObj.getString(GenConstants.TREE_CODE); | 413 | String treeCode = paramsObj.getString(GenConstants.TREE_CODE); |
trash-quartz/pom.xml
| @@ -38,7 +38,10 @@ | @@ -38,7 +38,10 @@ | ||
| 38 | <groupId>com.trash</groupId> | 38 | <groupId>com.trash</groupId> |
| 39 | <artifactId>trash-activiti</artifactId> | 39 | <artifactId>trash-activiti</artifactId> |
| 40 | </dependency> | 40 | </dependency> |
| 41 | - | 41 | + <dependency> |
| 42 | + <groupId>com.trash</groupId> | ||
| 43 | + <artifactId>trash-system</artifactId> | ||
| 44 | + </dependency> | ||
| 42 | <dependency> | 45 | <dependency> |
| 43 | <groupId>com.trash</groupId> | 46 | <groupId>com.trash</groupId> |
| 44 | <artifactId>trash-workflow</artifactId> | 47 | <artifactId>trash-workflow</artifactId> |
trash-quartz/src/main/java/com/trash/quartz/task/DriverTask.java
| @@ -15,17 +15,13 @@ import java.util.Map; | @@ -15,17 +15,13 @@ import java.util.Map; | ||
| 15 | import java.util.concurrent.TimeUnit; | 15 | import java.util.concurrent.TimeUnit; |
| 16 | import java.util.stream.Collectors; | 16 | import java.util.stream.Collectors; |
| 17 | 17 | ||
| 18 | -import javax.swing.Spring; | ||
| 19 | - | ||
| 20 | import org.springframework.beans.BeansException; | 18 | import org.springframework.beans.BeansException; |
| 21 | import org.springframework.beans.factory.annotation.Autowired; | 19 | import org.springframework.beans.factory.annotation.Autowired; |
| 22 | import org.springframework.stereotype.Component; | 20 | import org.springframework.stereotype.Component; |
| 23 | -import org.springframework.web.multipart.MultipartFile; | ||
| 24 | 21 | ||
| 25 | import com.alibaba.fastjson.JSONArray; | 22 | import com.alibaba.fastjson.JSONArray; |
| 26 | import com.alibaba.fastjson.JSONObject; | 23 | import com.alibaba.fastjson.JSONObject; |
| 27 | import com.google.gson.Gson; | 24 | import com.google.gson.Gson; |
| 28 | -import com.google.gson.JsonObject; | ||
| 29 | import com.google.gson.reflect.TypeToken; | 25 | import com.google.gson.reflect.TypeToken; |
| 30 | import com.trash.activiti.service.IActTaskService; | 26 | import com.trash.activiti.service.IActTaskService; |
| 31 | import com.trash.business.domain.CompanyCredit; | 27 | import com.trash.business.domain.CompanyCredit; |
| @@ -48,13 +44,10 @@ import com.trash.casefile.kafka.Consumer; | @@ -48,13 +44,10 @@ import com.trash.casefile.kafka.Consumer; | ||
| 48 | import com.trash.casefile.mapper.KafkaCompensationMapper; | 44 | import com.trash.casefile.mapper.KafkaCompensationMapper; |
| 49 | import com.trash.casefile.mapper.ReplyApprovalProcessMapper; | 45 | import com.trash.casefile.mapper.ReplyApprovalProcessMapper; |
| 50 | import com.trash.casefile.mapper.ViolationCaseFileMapper; | 46 | import com.trash.casefile.mapper.ViolationCaseFileMapper; |
| 51 | -import com.trash.casefile.service.IViolationCaseFileService; | ||
| 52 | import com.trash.common.config.trashConfig; | 47 | import com.trash.common.config.trashConfig; |
| 53 | import com.trash.common.core.redis.RedisCache; | 48 | import com.trash.common.core.redis.RedisCache; |
| 54 | import com.trash.common.utils.LogUtils; | 49 | import com.trash.common.utils.LogUtils; |
| 55 | import com.trash.common.utils.RemoteServerUtils; | 50 | import com.trash.common.utils.RemoteServerUtils; |
| 56 | -import com.trash.common.utils.SecurityUtils; | ||
| 57 | -import com.trash.common.utils.file.FileUploadUtils; | ||
| 58 | import com.trash.common.utils.spring.SpringUtils; | 51 | import com.trash.common.utils.spring.SpringUtils; |
| 59 | import com.trash.common.utils.util.PostSms; | 52 | import com.trash.common.utils.util.PostSms; |
| 60 | import com.trash.common.utils.vo.mt.JsonSmsSend; | 53 | import com.trash.common.utils.vo.mt.JsonSmsSend; |
| @@ -63,6 +56,7 @@ import com.trash.office.domain.LogisticsManagement; | @@ -63,6 +56,7 @@ import com.trash.office.domain.LogisticsManagement; | ||
| 63 | import com.trash.office.domain.UploadFile; | 56 | import com.trash.office.domain.UploadFile; |
| 64 | import com.trash.office.mapper.LogisticsManagementMapper; | 57 | import com.trash.office.mapper.LogisticsManagementMapper; |
| 65 | import com.trash.office.mapper.UploadFileMapper; | 58 | import com.trash.office.mapper.UploadFileMapper; |
| 59 | +import com.trash.system.mapper.SysTempMapper; | ||
| 66 | import com.trash.workflow.service.IWorkflowService; | 60 | import com.trash.workflow.service.IWorkflowService; |
| 67 | 61 | ||
| 68 | /** | 62 | /** |
| @@ -84,7 +78,18 @@ public class DriverTask { | @@ -84,7 +78,18 @@ public class DriverTask { | ||
| 84 | private RedisCache redisCache; | 78 | private RedisCache redisCache; |
| 85 | 79 | ||
| 86 | public void getUpCase() { | 80 | public void getUpCase() { |
| 87 | - JSONArray array = RemoteServerUtils.getCaseList(); | 81 | + JSONArray array = null; |
| 82 | + try{ | ||
| 83 | + array = RemoteServerUtils.getCaseList(); | ||
| 84 | + }catch(Exception e){ | ||
| 85 | + e.printStackTrace(); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + if(array == null){ | ||
| 89 | + System.out.print("综管数据无法获取!"); | ||
| 90 | + return; | ||
| 91 | + } | ||
| 92 | + | ||
| 88 | Map map = new HashMap<>(); | 93 | Map map = new HashMap<>(); |
| 89 | List<String> ids = new ArrayList<String>(); | 94 | List<String> ids = new ArrayList<String>(); |
| 90 | 95 | ||
| @@ -130,7 +135,20 @@ public class DriverTask { | @@ -130,7 +135,20 @@ public class DriverTask { | ||
| 130 | 135 | ||
| 131 | getCaseStateIntoDB("/api/thirdApi/query/superviseList", "supUser", "supDesc", "supTime", "Q4"); | 136 | getCaseStateIntoDB("/api/thirdApi/query/superviseList", "supUser", "supDesc", "supTime", "Q4"); |
| 132 | 137 | ||
| 133 | - JSONArray array = RemoteServerUtils.getUpCaseResult(); | 138 | + JSONArray array = null; |
| 139 | + | ||
| 140 | + try{ | ||
| 141 | + array = RemoteServerUtils.getUpCaseResult(); | ||
| 142 | + }catch(Exception e){ | ||
| 143 | + e.printStackTrace(); | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + if(array == null){ | ||
| 147 | + System.out.print("综管数据无法获取!"); | ||
| 148 | + return; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + | ||
| 134 | Map map = new HashMap<>(); | 152 | Map map = new HashMap<>(); |
| 135 | List<String> ids = new ArrayList<String>(); | 153 | List<String> ids = new ArrayList<String>(); |
| 136 | 154 | ||
| @@ -938,7 +956,10 @@ public class DriverTask { | @@ -938,7 +956,10 @@ public class DriverTask { | ||
| 938 | map.put("size", 99999); | 956 | map.put("size", 99999); |
| 939 | map.put("page", 1); | 957 | map.put("page", 1); |
| 940 | JSONArray jsonArray = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); | 958 | JSONArray jsonArray = RemoteServerUtils.getCompanyList(map, trashConfig.getToken()); |
| 959 | + | ||
| 941 | if (jsonArray != null) { | 960 | if (jsonArray != null) { |
| 961 | + SpringUtils.getBean(SysTempMapper.class).delLocalData("companyList"); | ||
| 962 | + SpringUtils.getBean(SysTempMapper.class).setLocalData("companyList",jsonArray.toString()); | ||
| 942 | redisCache.setCacheObject("companyList", jsonArray, 1,TimeUnit.DAYS); | 963 | redisCache.setCacheObject("companyList", jsonArray, 1,TimeUnit.DAYS); |
| 943 | } | 964 | } |
| 944 | } | 965 | } |
| @@ -954,6 +975,9 @@ public class DriverTask { | @@ -954,6 +975,9 @@ public class DriverTask { | ||
| 954 | map.put("auditStatus", 1); | 975 | map.put("auditStatus", 1); |
| 955 | JSONArray jsonArray = RemoteServerUtils.getContractList(map, trashConfig.getToken()); | 976 | JSONArray jsonArray = RemoteServerUtils.getContractList(map, trashConfig.getToken()); |
| 956 | if (jsonArray != null) { | 977 | if (jsonArray != null) { |
| 978 | + | ||
| 979 | + SpringUtils.getBean(SysTempMapper.class).delLocalData("contractList"); | ||
| 980 | + SpringUtils.getBean(SysTempMapper.class).setLocalData("contractList",jsonArray.toString()); | ||
| 957 | redisCache.setCacheObject("contractList", jsonArray, 1,TimeUnit.DAYS); | 981 | redisCache.setCacheObject("contractList", jsonArray, 1,TimeUnit.DAYS); |
| 958 | } | 982 | } |
| 959 | } | 983 | } |
| @@ -970,11 +994,15 @@ public class DriverTask { | @@ -970,11 +994,15 @@ public class DriverTask { | ||
| 970 | map.put("page", 1); | 994 | map.put("page", 1); |
| 971 | JSONArray jsonArray = RemoteServerUtils.getConstructionList(map, trashConfig.getToken()); | 995 | JSONArray jsonArray = RemoteServerUtils.getConstructionList(map, trashConfig.getToken()); |
| 972 | if (jsonArray != null) { | 996 | if (jsonArray != null) { |
| 997 | + SpringUtils.getBean(SysTempMapper.class).delLocalData("constructionList"); | ||
| 998 | + SpringUtils.getBean(SysTempMapper.class).setLocalData("constructionList",jsonArray.toString()); | ||
| 973 | redisCache.setCacheObject("constructionList", jsonArray, 1,TimeUnit.DAYS); | 999 | redisCache.setCacheObject("constructionList", jsonArray, 1,TimeUnit.DAYS); |
| 974 | } | 1000 | } |
| 975 | 1001 | ||
| 976 | jsonArray = RemoteServerUtils.getConstructionLedgerList(map, trashConfig.getToken()); | 1002 | jsonArray = RemoteServerUtils.getConstructionLedgerList(map, trashConfig.getToken()); |
| 977 | if (jsonArray != null) { | 1003 | if (jsonArray != null) { |
| 1004 | + SpringUtils.getBean(SysTempMapper.class).delLocalData("constructionLedgerList"); | ||
| 1005 | + SpringUtils.getBean(SysTempMapper.class).setLocalData("constructionLedgerList",jsonArray.toString()); | ||
| 978 | redisCache.setCacheObject("constructionLedgerList", jsonArray, 1,TimeUnit.DAYS); | 1006 | redisCache.setCacheObject("constructionLedgerList", jsonArray, 1,TimeUnit.DAYS); |
| 979 | } | 1007 | } |
| 980 | } | 1008 | } |
| @@ -991,6 +1019,8 @@ public class DriverTask { | @@ -991,6 +1019,8 @@ public class DriverTask { | ||
| 991 | map.put("page", 1); | 1019 | map.put("page", 1); |
| 992 | JSONArray jsonArray = RemoteServerUtils.getEarthSitesList(map, trashConfig.getToken()); | 1020 | JSONArray jsonArray = RemoteServerUtils.getEarthSitesList(map, trashConfig.getToken()); |
| 993 | if (jsonArray != null) { | 1021 | if (jsonArray != null) { |
| 1022 | + SpringUtils.getBean(SysTempMapper.class).delLocalData("earthSitesList"); | ||
| 1023 | + SpringUtils.getBean(SysTempMapper.class).setLocalData("earthSitesList",jsonArray.toString()); | ||
| 994 | redisCache.setCacheObject("earthSitesList", jsonArray, 1,TimeUnit.DAYS); | 1024 | redisCache.setCacheObject("earthSitesList", jsonArray, 1,TimeUnit.DAYS); |
| 995 | } | 1025 | } |
| 996 | } | 1026 | } |
| @@ -1009,6 +1039,8 @@ public class DriverTask { | @@ -1009,6 +1039,8 @@ public class DriverTask { | ||
| 1009 | 1039 | ||
| 1010 | JSONArray jsonArray = RemoteServerUtils.getTruckList(map, trashConfig.getToken()); | 1040 | JSONArray jsonArray = RemoteServerUtils.getTruckList(map, trashConfig.getToken()); |
| 1011 | if (jsonArray != null) { | 1041 | if (jsonArray != null) { |
| 1042 | + SpringUtils.getBean(SysTempMapper.class).delLocalData("truckList"); | ||
| 1043 | + SpringUtils.getBean(SysTempMapper.class).setLocalData("truckList",jsonArray.toString()); | ||
| 1012 | redisCache.setCacheObject("truckList", jsonArray, 1,TimeUnit.DAYS); | 1044 | redisCache.setCacheObject("truckList", jsonArray, 1,TimeUnit.DAYS); |
| 1013 | } | 1045 | } |
| 1014 | } | 1046 | } |
| @@ -1025,6 +1057,8 @@ public class DriverTask { | @@ -1025,6 +1057,8 @@ public class DriverTask { | ||
| 1025 | map.put("page", 1); | 1057 | map.put("page", 1); |
| 1026 | JSONArray jsonArray = RemoteServerUtils.getAreas(trashConfig.getToken()); | 1058 | JSONArray jsonArray = RemoteServerUtils.getAreas(trashConfig.getToken()); |
| 1027 | if (jsonArray != null) { | 1059 | if (jsonArray != null) { |
| 1060 | + SpringUtils.getBean(SysTempMapper.class).delLocalData("areaList"); | ||
| 1061 | + SpringUtils.getBean(SysTempMapper.class).setLocalData("areaList",jsonArray.toString()); | ||
| 1028 | redisCache.setCacheObject("areaList", jsonArray, 1,TimeUnit.DAYS); | 1062 | redisCache.setCacheObject("areaList", jsonArray, 1,TimeUnit.DAYS); |
| 1029 | } | 1063 | } |
| 1030 | } | 1064 | } |
trash-system/src/main/java/com/trash/system/mapper/SysTempMapper.java
0 → 100644
| 1 | +package com.trash.system.mapper; | ||
| 2 | + | ||
| 3 | +import org.apache.ibatis.annotations.Param; | ||
| 4 | + | ||
| 5 | +public interface SysTempMapper { | ||
| 6 | + | ||
| 7 | + public String getPhoneNumber(@Param("type")String type ,@Param("checkpoint") String checkpoint); | ||
| 8 | + | ||
| 9 | + | ||
| 10 | + public String getLocalData(@Param("type")String type); | ||
| 11 | + | ||
| 12 | + | ||
| 13 | + public String delLocalData(@Param("type")String type); | ||
| 14 | + | ||
| 15 | + public String setLocalData(@Param("type")String type,@Param("data") String json); | ||
| 16 | + | ||
| 17 | + | ||
| 18 | +} |
trash-system/src/main/resources/mapper/system/SysTempMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | +"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.trash.system.mapper.SysTempMapper"> | ||
| 6 | + | ||
| 7 | + <select id="getPhoneNumber" parameterType="String" resultType="java.lang.String"> | ||
| 8 | + select number from sms where checkpoint = #{checkpoint} and type = #{type} | ||
| 9 | + </select> | ||
| 10 | + | ||
| 11 | + | ||
| 12 | + <select id="getLocalData" parameterType="String" resultType="java.lang.String"> | ||
| 13 | + select json from temp where type = #{type} | ||
| 14 | + </select> | ||
| 15 | + | ||
| 16 | + <select id="setLocalData" parameterType="String" resultType="java.lang.String"> | ||
| 17 | + insert INTO temp(type,json) values(#{type},#{data}); | ||
| 18 | + </select> | ||
| 19 | + | ||
| 20 | + <select id="delLocalData" parameterType="String" resultType="java.lang.String"> | ||
| 21 | + delete from temp where type = #{type} | ||
| 22 | + </select> | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +</mapper> | ||
| 0 | \ No newline at end of file | 26 | \ No newline at end of file |
trash-workFlow/src/main/java/com/trash/business/controller/ConstructionCreditController.java
| @@ -5,7 +5,6 @@ import java.util.Date; | @@ -5,7 +5,6 @@ import java.util.Date; | ||
| 5 | import java.util.List; | 5 | import java.util.List; |
| 6 | 6 | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 9 | import org.springframework.web.bind.annotation.DeleteMapping; | 8 | import org.springframework.web.bind.annotation.DeleteMapping; |
| 10 | import org.springframework.web.bind.annotation.GetMapping; | 9 | import org.springframework.web.bind.annotation.GetMapping; |
| 11 | import org.springframework.web.bind.annotation.PathVariable; | 10 | import org.springframework.web.bind.annotation.PathVariable; |
| @@ -15,9 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody; | @@ -15,9 +14,6 @@ import org.springframework.web.bind.annotation.RequestBody; | ||
| 15 | import org.springframework.web.bind.annotation.RequestMapping; | 14 | import org.springframework.web.bind.annotation.RequestMapping; |
| 16 | import org.springframework.web.bind.annotation.RestController; | 15 | import org.springframework.web.bind.annotation.RestController; |
| 17 | 16 | ||
| 18 | -import com.alibaba.fastjson.JSONArray; | ||
| 19 | -import com.alibaba.fastjson.JSONObject; | ||
| 20 | -import com.trash.business.domain.CompanyCredit; | ||
| 21 | import com.trash.business.domain.ConstructionCredit; | 17 | import com.trash.business.domain.ConstructionCredit; |
| 22 | import com.trash.business.service.IConstructionCreditService; | 18 | import com.trash.business.service.IConstructionCreditService; |
| 23 | import com.trash.common.annotation.Log; | 19 | import com.trash.common.annotation.Log; |
| @@ -25,7 +21,6 @@ import com.trash.common.annotation.RepeatSubmit; | @@ -25,7 +21,6 @@ import com.trash.common.annotation.RepeatSubmit; | ||
| 25 | import com.trash.common.core.controller.BaseController; | 21 | import com.trash.common.core.controller.BaseController; |
| 26 | import com.trash.common.core.domain.AjaxResult; | 22 | import com.trash.common.core.domain.AjaxResult; |
| 27 | import com.trash.common.core.page.TableDataInfo; | 23 | import com.trash.common.core.page.TableDataInfo; |
| 28 | -import com.trash.common.core.redis.RedisCache; | ||
| 29 | import com.trash.common.enums.BusinessType; | 24 | import com.trash.common.enums.BusinessType; |
| 30 | import com.trash.common.utils.SecurityUtils; | 25 | import com.trash.common.utils.SecurityUtils; |
| 31 | import com.trash.common.utils.poi.ExcelUtil; | 26 | import com.trash.common.utils.poi.ExcelUtil; |
trash-workFlow/src/main/java/com/trash/business/controller/EarthsitesCreditController.java
| @@ -4,30 +4,26 @@ import java.util.ArrayList; | @@ -4,30 +4,26 @@ import java.util.ArrayList; | ||
| 4 | import java.util.Date; | 4 | import java.util.Date; |
| 5 | import java.util.List; | 5 | import java.util.List; |
| 6 | 6 | ||
| 7 | -import com.alibaba.fastjson.JSONArray; | ||
| 8 | -import com.alibaba.fastjson.JSONObject; | ||
| 9 | -import com.trash.business.domain.ConstructionCredit; | ||
| 10 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 11 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | +import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 12 | import org.springframework.web.bind.annotation.GetMapping; | 9 | import org.springframework.web.bind.annotation.GetMapping; |
| 10 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 13 | import org.springframework.web.bind.annotation.PostMapping; | 11 | import org.springframework.web.bind.annotation.PostMapping; |
| 14 | import org.springframework.web.bind.annotation.PutMapping; | 12 | import org.springframework.web.bind.annotation.PutMapping; |
| 15 | -import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 16 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 17 | import org.springframework.web.bind.annotation.RequestBody; | 13 | import org.springframework.web.bind.annotation.RequestBody; |
| 18 | import org.springframework.web.bind.annotation.RequestMapping; | 14 | import org.springframework.web.bind.annotation.RequestMapping; |
| 19 | import org.springframework.web.bind.annotation.RestController; | 15 | import org.springframework.web.bind.annotation.RestController; |
| 16 | + | ||
| 17 | +import com.trash.business.domain.EarthsitesCredit; | ||
| 18 | +import com.trash.business.service.IEarthsitesCreditService; | ||
| 20 | import com.trash.common.annotation.Log; | 19 | import com.trash.common.annotation.Log; |
| 21 | import com.trash.common.annotation.RepeatSubmit; | 20 | import com.trash.common.annotation.RepeatSubmit; |
| 22 | import com.trash.common.core.controller.BaseController; | 21 | import com.trash.common.core.controller.BaseController; |
| 23 | import com.trash.common.core.domain.AjaxResult; | 22 | import com.trash.common.core.domain.AjaxResult; |
| 23 | +import com.trash.common.core.page.TableDataInfo; | ||
| 24 | import com.trash.common.enums.BusinessType; | 24 | import com.trash.common.enums.BusinessType; |
| 25 | -import com.trash.business.domain.EarthsitesCredit; | ||
| 26 | -import com.trash.business.service.IEarthsitesCreditService; | ||
| 27 | import com.trash.common.utils.SecurityUtils; | 25 | import com.trash.common.utils.SecurityUtils; |
| 28 | import com.trash.common.utils.poi.ExcelUtil; | 26 | import com.trash.common.utils.poi.ExcelUtil; |
| 29 | -import com.trash.common.core.page.TableDataInfo; | ||
| 30 | -import com.trash.common.core.redis.RedisCache; | ||
| 31 | 27 | ||
| 32 | /** | 28 | /** |
| 33 | * 处理场所失信Controller | 29 | * 处理场所失信Controller |
trash-workFlow/src/main/java/com/trash/business/controller/SupervisionThreestepController.java
| @@ -3,6 +3,7 @@ package com.trash.business.controller; | @@ -3,6 +3,7 @@ package com.trash.business.controller; | ||
| 3 | import java.io.File; | 3 | import java.io.File; |
| 4 | import java.io.FileInputStream; | 4 | import java.io.FileInputStream; |
| 5 | import java.io.IOException; | 5 | import java.io.IOException; |
| 6 | +import java.text.SimpleDateFormat; | ||
| 6 | import java.util.ArrayList; | 7 | import java.util.ArrayList; |
| 7 | import java.util.Date; | 8 | import java.util.Date; |
| 8 | import java.util.HashMap; | 9 | import java.util.HashMap; |
| @@ -13,42 +14,41 @@ import java.util.concurrent.TimeUnit; | @@ -13,42 +14,41 @@ import java.util.concurrent.TimeUnit; | ||
| 13 | import javax.servlet.http.HttpServletRequest; | 14 | import javax.servlet.http.HttpServletRequest; |
| 14 | import javax.servlet.http.HttpServletResponse; | 15 | import javax.servlet.http.HttpServletResponse; |
| 15 | 16 | ||
| 16 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 17 | -import org.springframework.util.Base64Utils; | ||
| 18 | import org.springframework.beans.factory.annotation.Autowired; | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | +import org.springframework.util.Base64Utils; | ||
| 19 | +import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 19 | import org.springframework.web.bind.annotation.GetMapping; | 20 | import org.springframework.web.bind.annotation.GetMapping; |
| 21 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 20 | import org.springframework.web.bind.annotation.PostMapping; | 22 | import org.springframework.web.bind.annotation.PostMapping; |
| 21 | import org.springframework.web.bind.annotation.PutMapping; | 23 | import org.springframework.web.bind.annotation.PutMapping; |
| 22 | -import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 23 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 24 | import org.springframework.web.bind.annotation.RequestBody; | 24 | import org.springframework.web.bind.annotation.RequestBody; |
| 25 | import org.springframework.web.bind.annotation.RequestMapping; | 25 | import org.springframework.web.bind.annotation.RequestMapping; |
| 26 | import org.springframework.web.bind.annotation.RequestParam; | 26 | import org.springframework.web.bind.annotation.RequestParam; |
| 27 | import org.springframework.web.bind.annotation.RestController; | 27 | import org.springframework.web.bind.annotation.RestController; |
| 28 | import org.springframework.web.multipart.MultipartFile; | 28 | import org.springframework.web.multipart.MultipartFile; |
| 29 | 29 | ||
| 30 | -import com.trash.common.annotation.Log; | ||
| 31 | -import com.trash.common.annotation.RepeatSubmit; | ||
| 32 | -import com.trash.common.config.trashConfig; | ||
| 33 | -import com.trash.common.core.controller.BaseController; | ||
| 34 | -import com.trash.common.core.domain.AjaxResult; | ||
| 35 | -import com.trash.common.enums.BusinessType; | ||
| 36 | -import com.alibaba.fastjson.JSON; | ||
| 37 | import com.alibaba.fastjson.JSONArray; | 30 | import com.alibaba.fastjson.JSONArray; |
| 38 | import com.alibaba.fastjson.JSONObject; | 31 | import com.alibaba.fastjson.JSONObject; |
| 39 | import com.trash.business.domain.SupervisionThreestep; | 32 | import com.trash.business.domain.SupervisionThreestep; |
| 40 | import com.trash.business.domain.SupervisionThreestepWithWorkArea; | 33 | import com.trash.business.domain.SupervisionThreestepWithWorkArea; |
| 41 | import com.trash.business.domain.dayWork; | 34 | import com.trash.business.domain.dayWork; |
| 35 | +import com.trash.business.mapper.SupervisionThreestepMapper; | ||
| 42 | import com.trash.business.service.ISupervisionThreestepService; | 36 | import com.trash.business.service.ISupervisionThreestepService; |
| 43 | -import com.trash.common.utils.RemoteServerUtils; | ||
| 44 | -import com.trash.common.utils.SecurityUtils; | ||
| 45 | -import com.trash.common.utils.StringUtils; | ||
| 46 | -import com.trash.common.utils.file.FileUtils; | ||
| 47 | -import com.trash.common.utils.poi.ExcelUtil; | 37 | +import com.trash.common.annotation.Log; |
| 38 | +import com.trash.common.annotation.RepeatSubmit; | ||
| 39 | +import com.trash.common.config.trashConfig; | ||
| 40 | +import com.trash.common.core.controller.BaseController; | ||
| 41 | +import com.trash.common.core.domain.AjaxResult; | ||
| 48 | import com.trash.common.core.page.PageDomain; | 42 | import com.trash.common.core.page.PageDomain; |
| 49 | import com.trash.common.core.page.TableDataInfo; | 43 | import com.trash.common.core.page.TableDataInfo; |
| 50 | import com.trash.common.core.page.TableSupport; | 44 | import com.trash.common.core.page.TableSupport; |
| 51 | import com.trash.common.core.redis.RedisCache; | 45 | import com.trash.common.core.redis.RedisCache; |
| 46 | +import com.trash.common.enums.BusinessType; | ||
| 47 | +import com.trash.common.utils.RemoteServerUtils; | ||
| 48 | +import com.trash.common.utils.file.FileUtils; | ||
| 49 | +import com.trash.common.utils.poi.ExcelUtil; | ||
| 50 | +import com.trash.common.utils.spring.SpringUtils; | ||
| 51 | +import com.trash.system.mapper.SysTempMapper; | ||
| 52 | 52 | ||
| 53 | /** | 53 | /** |
| 54 | * 三查机制Controller | 54 | * 三查机制Controller |
| @@ -63,6 +63,8 @@ public class SupervisionThreestepController extends BaseController { | @@ -63,6 +63,8 @@ public class SupervisionThreestepController extends BaseController { | ||
| 63 | private ISupervisionThreestepService supervisionThreestepService; | 63 | private ISupervisionThreestepService supervisionThreestepService; |
| 64 | 64 | ||
| 65 | @Autowired | 65 | @Autowired |
| 66 | + private SupervisionThreestepMapper mapper; | ||
| 67 | + @Autowired | ||
| 66 | RedisCache redisCache; | 68 | RedisCache redisCache; |
| 67 | 69 | ||
| 68 | /** | 70 | /** |
| @@ -87,8 +89,38 @@ public class SupervisionThreestepController extends BaseController { | @@ -87,8 +89,38 @@ public class SupervisionThreestepController extends BaseController { | ||
| 87 | @PostMapping("/getByObjects") | 89 | @PostMapping("/getByObjects") |
| 88 | public AjaxResult getLists(@RequestBody SupervisionThreestep supervisionThreestep) { | 90 | public AjaxResult getLists(@RequestBody SupervisionThreestep supervisionThreestep) { |
| 89 | AjaxResult ajaxResult = AjaxResult.success(); | 91 | AjaxResult ajaxResult = AjaxResult.success(); |
| 92 | + | ||
| 93 | + if (supervisionThreestep.getWorkStartTime() == null) { | ||
| 94 | + String start, end; | ||
| 95 | + | ||
| 96 | + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 97 | + SimpleDateFormat dateTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 98 | + Date date = new Date(); | ||
| 99 | + | ||
| 100 | + if (new Date().getHours() < 8) { | ||
| 101 | + end = yearFomat.format(date); | ||
| 102 | + date.setDate(date.getDate() - 1); | ||
| 103 | + start = yearFomat.format(date); | ||
| 104 | + } else { | ||
| 105 | + start = yearFomat.format(date); | ||
| 106 | + date.setDate(date.getDate() + 1); | ||
| 107 | + end = yearFomat.format(date); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + end += " 8:00:00"; | ||
| 111 | + start += " 8:00:00"; | ||
| 112 | + | ||
| 113 | + try { | ||
| 114 | + supervisionThreestep.setWorkStartTime(dateTime.parse(start)); | ||
| 115 | + supervisionThreestep.setWorkEndTime(dateTime.parse(end)); | ||
| 116 | + } catch (Exception e) { | ||
| 117 | + // TODO Auto-generated catch block | ||
| 118 | + e.printStackTrace(); | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + | ||
| 90 | try { | 122 | try { |
| 91 | - ajaxResult.put("result", supervisionThreestepService.selectSupervisionThreestepList(supervisionThreestep)); | 123 | + ajaxResult.put("result", mapper.selectSupervisionThreestepList(supervisionThreestep)); |
| 92 | } catch (Exception e) { | 124 | } catch (Exception e) { |
| 93 | e.printStackTrace(); | 125 | e.printStackTrace(); |
| 94 | } | 126 | } |
| @@ -119,7 +151,7 @@ public class SupervisionThreestepController extends BaseController { | @@ -119,7 +151,7 @@ public class SupervisionThreestepController extends BaseController { | ||
| 119 | JSONArray areas = redisCache.getCacheObject("areas"); | 151 | JSONArray areas = redisCache.getCacheObject("areas"); |
| 120 | 152 | ||
| 121 | if (areas == null) { | 153 | if (areas == null) { |
| 122 | - areas = RemoteServerUtils.getAreas(); | 154 | + areas = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("areas")); |
| 123 | redisCache.setCacheObject("areas", areas); | 155 | redisCache.setCacheObject("areas", areas); |
| 124 | } | 156 | } |
| 125 | 157 | ||
| @@ -249,10 +281,7 @@ public class SupervisionThreestepController extends BaseController { | @@ -249,10 +281,7 @@ public class SupervisionThreestepController extends BaseController { | ||
| 249 | 281 | ||
| 250 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); | 282 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); |
| 251 | if (constructionList == null) { | 283 | 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); | 284 | + constructionList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionLedgerList")); |
| 256 | if (constructionList != null) { | 285 | if (constructionList != null) { |
| 257 | redisCache.setCacheObject("constructionLedgerList", constructionList, 60, TimeUnit.MINUTES); | 286 | redisCache.setCacheObject("constructionLedgerList", constructionList, 60, TimeUnit.MINUTES); |
| 258 | } | 287 | } |
trash-workFlow/src/main/java/com/trash/business/controller/TruckActivateController.java
| 1 | package com.trash.business.controller; | 1 | package com.trash.business.controller; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | -import java.util.HashMap; | ||
| 5 | import java.util.List; | 4 | import java.util.List; |
| 6 | -import java.util.Map; | ||
| 7 | 5 | ||
| 8 | -import org.springframework.security.access.prepost.PreAuthorize; | ||
| 9 | -import org.apache.commons.collections4.map.HashedMap; | ||
| 10 | -import org.apache.tomcat.jni.Mmap; | ||
| 11 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | +import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 12 | import org.springframework.web.bind.annotation.GetMapping; | 8 | import org.springframework.web.bind.annotation.GetMapping; |
| 9 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 13 | import org.springframework.web.bind.annotation.PostMapping; | 10 | import org.springframework.web.bind.annotation.PostMapping; |
| 14 | import org.springframework.web.bind.annotation.PutMapping; | 11 | import org.springframework.web.bind.annotation.PutMapping; |
| 15 | -import org.springframework.web.bind.annotation.DeleteMapping; | ||
| 16 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 17 | import org.springframework.web.bind.annotation.RequestBody; | 12 | import org.springframework.web.bind.annotation.RequestBody; |
| 18 | import org.springframework.web.bind.annotation.RequestMapping; | 13 | import org.springframework.web.bind.annotation.RequestMapping; |
| 19 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 20 | -import com.trash.common.annotation.Log; | ||
| 21 | -import com.trash.common.annotation.RepeatSubmit; | ||
| 22 | -import com.trash.common.core.controller.BaseController; | ||
| 23 | -import com.trash.common.core.domain.AjaxResult; | ||
| 24 | -import com.trash.common.enums.BusinessType; | ||
| 25 | -import com.alibaba.fastjson.JSONArray; | ||
| 26 | -import com.alibaba.fastjson.JSONObject; | ||
| 27 | -import com.trash.business.domain.SupervisionThreestep; | 15 | + |
| 28 | import com.trash.business.domain.TruckActivate; | 16 | import com.trash.business.domain.TruckActivate; |
| 29 | import com.trash.business.domain.TruckActivateInfo; | 17 | import com.trash.business.domain.TruckActivateInfo; |
| 30 | -import com.trash.business.mapper.SupervisionThreestepMapper; | ||
| 31 | import com.trash.business.mapper.TruckActivateMapper; | 18 | import com.trash.business.mapper.TruckActivateMapper; |
| 32 | import com.trash.business.service.ISupervisionThreestepService; | 19 | import com.trash.business.service.ISupervisionThreestepService; |
| 33 | import com.trash.business.service.ITruckActivateService; | 20 | import com.trash.business.service.ITruckActivateService; |
| 34 | -import com.trash.common.utils.RemoteServerUtils; | ||
| 35 | -import com.trash.common.utils.SecurityUtils; | ||
| 36 | -import com.trash.common.utils.poi.ExcelUtil; | 21 | +import com.trash.common.annotation.Log; |
| 22 | +import com.trash.common.annotation.RepeatSubmit; | ||
| 23 | +import com.trash.common.core.controller.BaseController; | ||
| 24 | +import com.trash.common.core.domain.AjaxResult; | ||
| 37 | import com.trash.common.core.page.TableDataInfo; | 25 | import com.trash.common.core.page.TableDataInfo; |
| 38 | import com.trash.common.core.redis.RedisCache; | 26 | import com.trash.common.core.redis.RedisCache; |
| 27 | +import com.trash.common.enums.BusinessType; | ||
| 28 | +import com.trash.common.utils.poi.ExcelUtil; | ||
| 39 | 29 | ||
| 40 | /** | 30 | /** |
| 41 | * 车辆激活Controller | 31 | * 车辆激活Controller |
trash-workFlow/src/main/java/com/trash/business/mapper/SmsMapper.java
| @@ -8,14 +8,11 @@ import java.util.List; | @@ -8,14 +8,11 @@ import java.util.List; | ||
| 8 | import java.util.Map; | 8 | import java.util.Map; |
| 9 | import java.util.Set; | 9 | import java.util.Set; |
| 10 | 10 | ||
| 11 | -/** | ||
| 12 | - * 汇讯数码科技(深圳)有限公司 | ||
| 13 | - * 创建日期:2020/10/23-15:47 | ||
| 14 | - * 版本 开发者 日期 | ||
| 15 | - * 1.0 Danny 2020/10/23 | ||
| 16 | - */ | ||
| 17 | public interface SmsMapper { | 11 | public interface SmsMapper { |
| 18 | 12 | ||
| 19 | public String getPhoneNumber(@Param("type")String type ,@Param("checkpoint") String checkpoint); | 13 | public String getPhoneNumber(@Param("type")String type ,@Param("checkpoint") String checkpoint); |
| 14 | + | ||
| 15 | + | ||
| 16 | + public String getLocalData(@Param("type")String type); | ||
| 20 | 17 | ||
| 21 | } | 18 | } |
trash-workFlow/src/main/java/com/trash/business/service/impl/CompanyCreditServiceImpl.java
| @@ -24,7 +24,6 @@ import com.trash.common.utils.SecurityUtils; | @@ -24,7 +24,6 @@ import com.trash.common.utils.SecurityUtils; | ||
| 24 | import com.trash.common.utils.util.PostSms; | 24 | import com.trash.common.utils.util.PostSms; |
| 25 | import com.trash.common.utils.vo.mt.JsonSmsSend; | 25 | import com.trash.common.utils.vo.mt.JsonSmsSend; |
| 26 | import com.trash.common.utils.vo.mt.Mobile; | 26 | import com.trash.common.utils.vo.mt.Mobile; |
| 27 | -import com.trash.common.utils.vo.mt.SendSms; | ||
| 28 | 27 | ||
| 29 | /** | 28 | /** |
| 30 | * 企业失信Service业务层处理 | 29 | * 企业失信Service业务层处理 |
trash-workFlow/src/main/java/com/trash/business/service/impl/ConstructionCreditServiceImpl.java
| @@ -12,7 +12,6 @@ import org.springframework.transaction.annotation.Transactional; | @@ -12,7 +12,6 @@ import org.springframework.transaction.annotation.Transactional; | ||
| 12 | 12 | ||
| 13 | import com.alibaba.fastjson.JSONArray; | 13 | import com.alibaba.fastjson.JSONArray; |
| 14 | import com.alibaba.fastjson.JSONObject; | 14 | import com.alibaba.fastjson.JSONObject; |
| 15 | -import com.trash.business.domain.CompanyCredit; | ||
| 16 | import com.trash.business.domain.ConstructionCredit; | 15 | import com.trash.business.domain.ConstructionCredit; |
| 17 | import com.trash.business.mapper.ConstructionCreditMapper; | 16 | import com.trash.business.mapper.ConstructionCreditMapper; |
| 18 | import com.trash.business.mapper.SmsMapper; | 17 | import com.trash.business.mapper.SmsMapper; |
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
| @@ -31,6 +31,8 @@ import com.trash.common.utils.DateUtils; | @@ -31,6 +31,8 @@ import com.trash.common.utils.DateUtils; | ||
| 31 | import com.trash.common.utils.RemoteServerUtils; | 31 | import com.trash.common.utils.RemoteServerUtils; |
| 32 | import com.trash.common.utils.SecurityUtils; | 32 | import com.trash.common.utils.SecurityUtils; |
| 33 | import com.trash.common.utils.file.FileUploadUtils; | 33 | import com.trash.common.utils.file.FileUploadUtils; |
| 34 | +import com.trash.common.utils.spring.SpringUtils; | ||
| 35 | +import com.trash.system.mapper.SysTempMapper; | ||
| 34 | import com.trash.workflow.service.IWorkflowService; | 36 | import com.trash.workflow.service.IWorkflowService; |
| 35 | 37 | ||
| 36 | import net.sf.jsqlparser.expression.DateTimeLiteralExpression.DateTime; | 38 | import net.sf.jsqlparser.expression.DateTimeLiteralExpression.DateTime; |
| @@ -129,14 +131,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -129,14 +131,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 129 | List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); | 131 | List<String> eArea = SecurityUtils.getLoginUser().getUser().getEarthAreas(); |
| 130 | List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); | 132 | List<String> cArea = SecurityUtils.getLoginUser().getUser().getConAreas(); |
| 131 | 133 | ||
| 132 | - | ||
| 133 | - | ||
| 134 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); | 134 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); |
| 135 | if (constructionList == null) { | 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); | 136 | + constructionList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionLedgerList")); |
| 140 | if (constructionList != null) { | 137 | if (constructionList != null) { |
| 141 | redisCache.setCacheObject("constructionLedgerList", constructionList, 1, TimeUnit.DAYS); | 138 | redisCache.setCacheObject("constructionLedgerList", constructionList, 1, TimeUnit.DAYS); |
| 142 | } | 139 | } |
| @@ -182,10 +179,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -182,10 +179,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 182 | JSONArray jsonArray = redis.getCacheObject("earthSitesList"); | 179 | JSONArray jsonArray = redis.getCacheObject("earthSitesList"); |
| 183 | 180 | ||
| 184 | if(jsonArray == null){ | 181 | if(jsonArray == null){ |
| 185 | - Map<String, Object> map = new HashMap<>(); | ||
| 186 | - map.put("size", 99999); | ||
| 187 | - map.put("page", 1); | ||
| 188 | - jsonArray = RemoteServerUtils.getEarthSitesList(map); | 182 | + jsonArray = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("earthSitesList")); |
| 189 | if (jsonArray != null) { | 183 | if (jsonArray != null) { |
| 190 | redisCache.setCacheObject("earthSitesList", jsonArray, 1,TimeUnit.DAYS); | 184 | redisCache.setCacheObject("earthSitesList", jsonArray, 1,TimeUnit.DAYS); |
| 191 | } | 185 | } |
| @@ -320,23 +314,17 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -320,23 +314,17 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 320 | 314 | ||
| 321 | JSONArray contracts = redisCache.getCacheObject("contractList"); | 315 | JSONArray contracts = redisCache.getCacheObject("contractList"); |
| 322 | if (contracts == null) { | 316 | if (contracts == null) { |
| 323 | - Map param = new HashMap<>(); | ||
| 324 | 317 | ||
| 325 | - param.put("page", 1); | ||
| 326 | - param.put("size", 99999); | ||
| 327 | - param.put("contractStatus", 1); | ||
| 328 | - param.put("auditStatus", 1); | ||
| 329 | - | ||
| 330 | - contracts = RemoteServerUtils.getContractList(param); | ||
| 331 | - redisCache.setCacheObject("contractList", contracts); | 318 | + contracts = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("contractList")); |
| 319 | + if(contracts != null){ | ||
| 320 | + redisCache.setCacheObject("contractList", contracts); | ||
| 321 | + } | ||
| 332 | } | 322 | } |
| 333 | 323 | ||
| 334 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); | 324 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); |
| 335 | if (constructionList == null) { | 325 | if (constructionList == null) { |
| 336 | - Map<String, Object> map = new HashMap<>(); | ||
| 337 | - map.put("size", 99999); | ||
| 338 | - map.put("page", 1); | ||
| 339 | - constructionList = RemoteServerUtils.getConstructionLedgerList(map); | 326 | + |
| 327 | + constructionList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionLedgerList")); | ||
| 340 | if (constructionList != null) { | 328 | if (constructionList != null) { |
| 341 | redisCache.setCacheObject("constructionLedgerList", constructionList, 1, TimeUnit.DAYS); | 329 | redisCache.setCacheObject("constructionLedgerList", constructionList, 1, TimeUnit.DAYS); |
| 342 | } | 330 | } |
| @@ -349,7 +337,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -349,7 +337,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 349 | String areaCode = ""; | 337 | String areaCode = ""; |
| 350 | 338 | ||
| 351 | if (areas == null) { | 339 | if (areas == null) { |
| 352 | - areas = RemoteServerUtils.getAreas(); | 340 | + areas = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("areas")); |
| 353 | redisCache.setCacheObject("areas", areas); | 341 | redisCache.setCacheObject("areas", areas); |
| 354 | } | 342 | } |
| 355 | 343 | ||
| @@ -715,10 +703,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -715,10 +703,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 715 | JSONArray array = redisCache.getCacheObject("constructionList"); | 703 | JSONArray array = redisCache.getCacheObject("constructionList"); |
| 716 | 704 | ||
| 717 | if(array == null){ | 705 | if(array == null){ |
| 718 | - Map<String, Object> map = new HashMap<>(); | ||
| 719 | - map.put("size", 99999); | ||
| 720 | - map.put("page", 1); | ||
| 721 | - array = RemoteServerUtils.getConstructionList(map); | 706 | + array = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); |
| 722 | if(array != null){ | 707 | if(array != null){ |
| 723 | redisCache.setCacheObject("constructionList", array,1,TimeUnit.DAYS); | 708 | redisCache.setCacheObject("constructionList", array,1,TimeUnit.DAYS); |
| 724 | } | 709 | } |
| @@ -1135,14 +1120,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | @@ -1135,14 +1120,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer | ||
| 1135 | JSONArray contracts = redisCache.getCacheObject("contractList"); | 1120 | JSONArray contracts = redisCache.getCacheObject("contractList"); |
| 1136 | 1121 | ||
| 1137 | if (contracts == null) { | 1122 | if (contracts == null) { |
| 1138 | - Map param = new HashMap<>(); | ||
| 1139 | - | ||
| 1140 | - param.put("page", 1); | ||
| 1141 | - param.put("size", 99999); | ||
| 1142 | - param.put("contractStatus", 1); | ||
| 1143 | - param.put("auditStatus", 1); | ||
| 1144 | - | ||
| 1145 | - contracts = RemoteServerUtils.getContractList(param, token); | 1123 | + contracts = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("contractList")); |
| 1146 | redisCache.setCacheObject("contractList", contracts); | 1124 | redisCache.setCacheObject("contractList", contracts); |
| 1147 | } | 1125 | } |
| 1148 | 1126 |
trash-workFlow/src/main/java/com/trash/business/service/impl/ThreestepHistoryServiceImpl.java
| @@ -24,6 +24,8 @@ import com.trash.common.core.redis.RedisCache; | @@ -24,6 +24,8 @@ import com.trash.common.core.redis.RedisCache; | ||
| 24 | import com.trash.common.utils.DateUtils; | 24 | import com.trash.common.utils.DateUtils; |
| 25 | import com.trash.common.utils.RemoteServerUtils; | 25 | import com.trash.common.utils.RemoteServerUtils; |
| 26 | import com.trash.common.utils.SecurityUtils; | 26 | import com.trash.common.utils.SecurityUtils; |
| 27 | +import com.trash.common.utils.spring.SpringUtils; | ||
| 28 | +import com.trash.system.mapper.SysTempMapper; | ||
| 27 | 29 | ||
| 28 | /** | 30 | /** |
| 29 | * 开停工Service业务层处理 | 31 | * 开停工Service业务层处理 |
| @@ -70,10 +72,8 @@ public class ThreestepHistoryServiceImpl implements IThreestepHistoryService | @@ -70,10 +72,8 @@ public class ThreestepHistoryServiceImpl implements IThreestepHistoryService | ||
| 70 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); | 72 | JSONArray constructionList = redisCache.getCacheObject("constructionLedgerList"); |
| 71 | List<String> ids = redisCache.getCacheObject("constructionIds"); | 73 | List<String> ids = redisCache.getCacheObject("constructionIds"); |
| 72 | if (constructionList == null || ids == null) { | 74 | 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); | 75 | + |
| 76 | + constructionList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionLedgerList")); | ||
| 77 | if (constructionList != null) { | 77 | if (constructionList != null) { |
| 78 | ids = new ArrayList(); | 78 | ids = new ArrayList(); |
| 79 | 79 |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
| @@ -13,6 +13,8 @@ import com.trash.common.core.redis.RedisCache; | @@ -13,6 +13,8 @@ import com.trash.common.core.redis.RedisCache; | ||
| 13 | import com.trash.common.utils.DateUtils; | 13 | import com.trash.common.utils.DateUtils; |
| 14 | import com.trash.common.utils.RemoteServerUtils; | 14 | import com.trash.common.utils.RemoteServerUtils; |
| 15 | import com.trash.common.utils.SecurityUtils; | 15 | import com.trash.common.utils.SecurityUtils; |
| 16 | +import com.trash.common.utils.spring.SpringUtils; | ||
| 17 | +import com.trash.system.mapper.SysTempMapper; | ||
| 16 | 18 | ||
| 17 | import org.apache.commons.lang3.time.DateFormatUtils; | 19 | import org.apache.commons.lang3.time.DateFormatUtils; |
| 18 | import org.springframework.beans.factory.annotation.Autowired; | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -88,6 +90,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | @@ -88,6 +90,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | ||
| 88 | 90 | ||
| 89 | if(areas.size() > 0) { | 91 | if(areas.size() > 0) { |
| 90 | JSONArray array = redis.getCacheObject("companyList"); | 92 | JSONArray array = redis.getCacheObject("companyList"); |
| 93 | + if(array == null) | ||
| 94 | + array = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 91 | if(array != null) { | 95 | if(array != null) { |
| 92 | for(Object obj:array) { | 96 | for(Object obj:array) { |
| 93 | JSONObject json = (JSONObject)obj; | 97 | JSONObject json = (JSONObject)obj; |
| @@ -106,7 +110,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | @@ -106,7 +110,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | ||
| 106 | if (companys.size() > 0) { | 110 | if (companys.size() > 0) { |
| 107 | 111 | ||
| 108 | JSONArray jsonArray = redis.getCacheObject("truckList"); | 112 | JSONArray jsonArray = redis.getCacheObject("truckList"); |
| 109 | - | 113 | + if(jsonArray == null) |
| 114 | + jsonArray = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("truckList")); | ||
| 110 | for (Object obj : jsonArray) { | 115 | for (Object obj : jsonArray) { |
| 111 | JSONObject json = (JSONObject) obj; | 116 | JSONObject json = (JSONObject) obj; |
| 112 | if (companys.indexOf(json.getString("companyID")) > -1) { | 117 | if (companys.indexOf(json.getString("companyID")) > -1) { |
| @@ -448,10 +453,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | @@ -448,10 +453,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { | ||
| 448 | JSONArray contracts = redis.getCacheObject("contractList"); | 453 | JSONArray contracts = redis.getCacheObject("contractList"); |
| 449 | 454 | ||
| 450 | if (contracts == null) { | 455 | if (contracts == null) { |
| 451 | - param.put("page", 1); | ||
| 452 | - param.put("size", 99999); | ||
| 453 | 456 | ||
| 454 | - contracts = RemoteServerUtils.getContractList(param); | 457 | + contracts = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("contractList")); |
| 455 | redis.setCacheObject("contractList", contracts); | 458 | redis.setCacheObject("contractList", contracts); |
| 456 | } | 459 | } |
| 457 | 460 |
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckCreditServiceImpl.java
| @@ -20,9 +20,11 @@ import com.trash.business.service.ITruckCreditService; | @@ -20,9 +20,11 @@ import com.trash.business.service.ITruckCreditService; | ||
| 20 | import com.trash.common.core.redis.RedisCache; | 20 | import com.trash.common.core.redis.RedisCache; |
| 21 | import com.trash.common.utils.RemoteServerUtils; | 21 | import com.trash.common.utils.RemoteServerUtils; |
| 22 | import com.trash.common.utils.SecurityUtils; | 22 | import com.trash.common.utils.SecurityUtils; |
| 23 | +import com.trash.common.utils.spring.SpringUtils; | ||
| 23 | import com.trash.common.utils.util.PostSms; | 24 | import com.trash.common.utils.util.PostSms; |
| 24 | import com.trash.common.utils.vo.mt.JsonSmsSend; | 25 | import com.trash.common.utils.vo.mt.JsonSmsSend; |
| 25 | import com.trash.common.utils.vo.mt.Mobile; | 26 | import com.trash.common.utils.vo.mt.Mobile; |
| 27 | +import com.trash.system.mapper.SysTempMapper; | ||
| 26 | 28 | ||
| 27 | /** | 29 | /** |
| 28 | * 车辆失信Service业务层处理 | 30 | * 车辆失信Service业务层处理 |
| @@ -69,6 +71,8 @@ public class TruckCreditServiceImpl implements ITruckCreditService | @@ -69,6 +71,8 @@ public class TruckCreditServiceImpl implements ITruckCreditService | ||
| 69 | 71 | ||
| 70 | if(areas.size() > 0) { | 72 | if(areas.size() > 0) { |
| 71 | JSONArray array = redisCache.getCacheObject("companyList"); | 73 | JSONArray array = redisCache.getCacheObject("companyList"); |
| 74 | + if(array == null) | ||
| 75 | + array = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 72 | if(array != null) { | 76 | if(array != null) { |
| 73 | for(Object obj:array) { | 77 | for(Object obj:array) { |
| 74 | JSONObject json = (JSONObject)obj; | 78 | JSONObject json = (JSONObject)obj; |
| @@ -90,7 +94,8 @@ public class TruckCreditServiceImpl implements ITruckCreditService | @@ -90,7 +94,8 @@ public class TruckCreditServiceImpl implements ITruckCreditService | ||
| 90 | if(companys.size() > 0){ | 94 | if(companys.size() > 0){ |
| 91 | 95 | ||
| 92 | JSONArray jsonArray = redisCache.getCacheObject("truckList"); | 96 | JSONArray jsonArray = redisCache.getCacheObject("truckList"); |
| 93 | - | 97 | + if(jsonArray == null) |
| 98 | + jsonArray = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("truckList")); | ||
| 94 | for(Object obj:jsonArray){ | 99 | for(Object obj:jsonArray){ |
| 95 | JSONObject json = (JSONObject) obj; | 100 | JSONObject json = (JSONObject) obj; |
| 96 | if(companys.indexOf(json.getString("companyID")) > -1){ | 101 | if(companys.indexOf(json.getString("companyID")) > -1){ |
| @@ -141,7 +146,9 @@ public class TruckCreditServiceImpl implements ITruckCreditService | @@ -141,7 +146,9 @@ public class TruckCreditServiceImpl implements ITruckCreditService | ||
| 141 | 146 | ||
| 142 | 147 | ||
| 143 | JSONArray array = redisCache.getCacheObject("companyList"); | 148 | JSONArray array = redisCache.getCacheObject("companyList"); |
| 144 | - | 149 | + |
| 150 | + if(array == null) | ||
| 151 | + array = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 145 | String number = null; | 152 | String number = null; |
| 146 | for(Object obj:array){ | 153 | for(Object obj:array){ |
| 147 | JSONObject json = (JSONObject)obj; | 154 | JSONObject json = (JSONObject)obj; |
| @@ -258,6 +265,9 @@ public class TruckCreditServiceImpl implements ITruckCreditService | @@ -258,6 +265,9 @@ public class TruckCreditServiceImpl implements ITruckCreditService | ||
| 258 | 265 | ||
| 259 | if(areas.size() > 0) { | 266 | if(areas.size() > 0) { |
| 260 | JSONArray array = redisCache.getCacheObject("companyList"); | 267 | JSONArray array = redisCache.getCacheObject("companyList"); |
| 268 | + | ||
| 269 | + if(array == null) | ||
| 270 | + array = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 261 | if(array != null) { | 271 | if(array != null) { |
| 262 | for(Object obj:array) { | 272 | for(Object obj:array) { |
| 263 | JSONObject json = (JSONObject)obj; | 273 | JSONObject json = (JSONObject)obj; |
trash-workFlow/src/main/java/com/trash/caseOffline/service/impl/CaseOfflineServiceImpl.java
| @@ -13,6 +13,7 @@ import com.trash.common.utils.DateUtils; | @@ -13,6 +13,7 @@ import com.trash.common.utils.DateUtils; | ||
| 13 | import com.trash.common.utils.RemoteServerUtils; | 13 | import com.trash.common.utils.RemoteServerUtils; |
| 14 | import com.trash.common.utils.SecurityUtils; | 14 | import com.trash.common.utils.SecurityUtils; |
| 15 | import com.trash.common.utils.spring.SpringUtils; | 15 | import com.trash.common.utils.spring.SpringUtils; |
| 16 | +import com.trash.system.mapper.SysTempMapper; | ||
| 16 | import com.trash.system.service.ISysDictTypeService; | 17 | import com.trash.system.service.ISysDictTypeService; |
| 17 | import com.trash.workflow.service.IWorkflowService; | 18 | import com.trash.workflow.service.IWorkflowService; |
| 18 | 19 | ||
| @@ -92,6 +93,15 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | @@ -92,6 +93,15 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService | ||
| 92 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); | 93 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); |
| 93 | JSONArray construList = redisCache.getCacheObject("constructionList"); | 94 | JSONArray construList = redisCache.getCacheObject("constructionList"); |
| 94 | 95 | ||
| 96 | + | ||
| 97 | + if(earthList == null){ | ||
| 98 | + earthList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("earthSitesList")); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + if(construList == null){ | ||
| 102 | + construList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); | ||
| 103 | + } | ||
| 104 | + | ||
| 95 | if(caseOffline.status1 != null){ | 105 | if(caseOffline.status1 != null){ |
| 96 | if(caseOffline.status1.equals("0")){ | 106 | if(caseOffline.status1.equals("0")){ |
| 97 | caseOffline.status1 = " and advice1 is null"; | 107 | caseOffline.status1 = " and advice1 is null"; |
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
| @@ -16,6 +16,8 @@ import org.springframework.web.multipart.MultipartFile; | @@ -16,6 +16,8 @@ import org.springframework.web.multipart.MultipartFile; | ||
| 16 | 16 | ||
| 17 | import com.alibaba.fastjson.JSONArray; | 17 | import com.alibaba.fastjson.JSONArray; |
| 18 | import com.alibaba.fastjson.JSONObject; | 18 | import com.alibaba.fastjson.JSONObject; |
| 19 | +import com.google.gson.Gson; | ||
| 20 | +import com.google.gson.JsonArray; | ||
| 19 | import com.trash.casefile.domain.ViolationCaseFile; | 21 | import com.trash.casefile.domain.ViolationCaseFile; |
| 20 | import com.trash.casefile.domain.vo.ViolationCaseFileVo; | 22 | import com.trash.casefile.domain.vo.ViolationCaseFileVo; |
| 21 | import com.trash.casefile.mapper.ViolationCaseFileMapper; | 23 | import com.trash.casefile.mapper.ViolationCaseFileMapper; |
| @@ -31,6 +33,7 @@ import com.trash.common.utils.file.FileUploadUtils; | @@ -31,6 +33,7 @@ import com.trash.common.utils.file.FileUploadUtils; | ||
| 31 | import com.trash.common.utils.spring.SpringUtils; | 33 | import com.trash.common.utils.spring.SpringUtils; |
| 32 | import com.trash.office.domain.UploadFile; | 34 | import com.trash.office.domain.UploadFile; |
| 33 | import com.trash.office.mapper.UploadFileMapper; | 35 | import com.trash.office.mapper.UploadFileMapper; |
| 36 | +import com.trash.system.mapper.SysTempMapper; | ||
| 34 | import com.trash.system.service.ISysDictTypeService; | 37 | import com.trash.system.service.ISysDictTypeService; |
| 35 | import com.trash.workflow.service.IWorkflowService; | 38 | import com.trash.workflow.service.IWorkflowService; |
| 36 | 39 | ||
| @@ -175,6 +178,17 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService { | @@ -175,6 +178,17 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService { | ||
| 175 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); | 178 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); |
| 176 | JSONArray construList = redisCache.getCacheObject("constructionList"); | 179 | JSONArray construList = redisCache.getCacheObject("constructionList"); |
| 177 | JSONArray companyList = redisCache.getCacheObject("companyList"); | 180 | JSONArray companyList = redisCache.getCacheObject("companyList"); |
| 181 | + | ||
| 182 | + | ||
| 183 | + if(construList == null){ | ||
| 184 | + construList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); | ||
| 185 | + } | ||
| 186 | + if(earthList == null){ | ||
| 187 | + earthList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("earthSitesList")); | ||
| 188 | + } | ||
| 189 | + if(companyList == null){ | ||
| 190 | + companyList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 191 | + } | ||
| 178 | 192 | ||
| 179 | for (Object obj : companyList) { | 193 | for (Object obj : companyList) { |
| 180 | JSONObject jsonObject = (JSONObject) obj; | 194 | JSONObject jsonObject = (JSONObject) obj; |
| @@ -264,6 +278,9 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService { | @@ -264,6 +278,9 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService { | ||
| 264 | // 判断公司是否为空,如果不为空则查询公司简称 | 278 | // 判断公司是否为空,如果不为空则查询公司简称 |
| 265 | if (StringUtils.isNotEmpty(violationCaseFile.getCompanyName())) { | 279 | if (StringUtils.isNotEmpty(violationCaseFile.getCompanyName())) { |
| 266 | JSONArray companyList = redisCache.getCacheObject("companyList"); | 280 | JSONArray companyList = redisCache.getCacheObject("companyList"); |
| 281 | + if(companyList==null){ | ||
| 282 | + companyList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 283 | + } | ||
| 267 | for (Object o : companyList) { | 284 | for (Object o : companyList) { |
| 268 | JSONObject jo = (JSONObject) o; | 285 | JSONObject jo = (JSONObject) o; |
| 269 | if (violationCaseFile.getCompanyName().equals(jo.getString("name"))) { | 286 | if (violationCaseFile.getCompanyName().equals(jo.getString("name"))) { |
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
| @@ -29,6 +29,7 @@ import com.trash.common.utils.file.FileUploadUtils; | @@ -29,6 +29,7 @@ import com.trash.common.utils.file.FileUploadUtils; | ||
| 29 | import com.trash.common.utils.spring.SpringUtils; | 29 | import com.trash.common.utils.spring.SpringUtils; |
| 30 | import com.trash.office.domain.UploadFile; | 30 | import com.trash.office.domain.UploadFile; |
| 31 | import com.trash.office.mapper.UploadFileMapper; | 31 | import com.trash.office.mapper.UploadFileMapper; |
| 32 | +import com.trash.system.mapper.SysTempMapper; | ||
| 32 | import com.trash.system.service.ISysDictTypeService; | 33 | import com.trash.system.service.ISysDictTypeService; |
| 33 | import com.trash.workflow.service.IWorkflowService; | 34 | import com.trash.workflow.service.IWorkflowService; |
| 34 | 35 | ||
| @@ -120,8 +121,18 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | @@ -120,8 +121,18 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | ||
| 120 | 121 | ||
| 121 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); | 122 | JSONArray earthList = redisCache.getCacheObject("earthSitesList"); |
| 122 | JSONArray construList = redisCache.getCacheObject("constructionList"); | 123 | JSONArray construList = redisCache.getCacheObject("constructionList"); |
| 123 | - | ||
| 124 | JSONArray companyList = redisCache.getCacheObject("companyList"); | 124 | JSONArray companyList = redisCache.getCacheObject("companyList"); |
| 125 | + | ||
| 126 | + if(construList == null){ | ||
| 127 | + construList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("constructionList")); | ||
| 128 | + } | ||
| 129 | + if(earthList == null){ | ||
| 130 | + earthList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("earthSitesList")); | ||
| 131 | + } | ||
| 132 | + if(companyList == null){ | ||
| 133 | + companyList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 134 | + } | ||
| 135 | + | ||
| 125 | 136 | ||
| 126 | List<String> companyAreas = SecurityUtils.getLoginUser().getUser().getCompanyAreas(); | 137 | List<String> companyAreas = SecurityUtils.getLoginUser().getUser().getCompanyAreas(); |
| 127 | List<String> companyIds = SecurityUtils.getLoginUser().getUser().getCompanyIds(); | 138 | List<String> companyIds = SecurityUtils.getLoginUser().getUser().getCompanyIds(); |
| @@ -224,6 +235,10 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | @@ -224,6 +235,10 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning | ||
| 224 | // 判断公司是否为空,如果不为空则查询公司简称 | 235 | // 判断公司是否为空,如果不为空则查询公司简称 |
| 225 | if (StringUtils.isNotEmpty(violationWarningInformation.getCompanyName())) { | 236 | if (StringUtils.isNotEmpty(violationWarningInformation.getCompanyName())) { |
| 226 | JSONArray companyList = redisCache.getCacheObject("companyList"); | 237 | JSONArray companyList = redisCache.getCacheObject("companyList"); |
| 238 | + | ||
| 239 | + if(companyList == null){ | ||
| 240 | + companyList = JSONArray.parseArray(SpringUtils.getBean(SysTempMapper.class).getLocalData("companyList")); | ||
| 241 | + } | ||
| 227 | for (Object o : companyList) { | 242 | for (Object o : companyList) { |
| 228 | JSONObject jo = (JSONObject) o; | 243 | JSONObject jo = (JSONObject) o; |
| 229 | if (violationWarningInformation.getCompanyName().equals(jo.getString("name"))) { | 244 | if (violationWarningInformation.getCompanyName().equals(jo.getString("name"))) { |
trash-workFlow/src/main/java/com/trash/workflow/service/impl/WorkflowServiceImpl.java
| @@ -286,8 +286,7 @@ public class WorkflowServiceImpl implements IWorkflowService { | @@ -286,8 +286,7 @@ public class WorkflowServiceImpl implements IWorkflowService { | ||
| 286 | if(areas == null){ | 286 | if(areas == null){ |
| 287 | areas = RemoteServerUtils.getAreas(); | 287 | areas = RemoteServerUtils.getAreas(); |
| 288 | redisCache.setCacheObject("areas", areas); | 288 | redisCache.setCacheObject("areas", areas); |
| 289 | - } | ||
| 290 | - | 289 | + } |
| 291 | 290 | ||
| 292 | for(Object obj : areas){ | 291 | for(Object obj : areas){ |
| 293 | JSONObject jsonObject = (JSONObject) obj; | 292 | JSONObject jsonObject = (JSONObject) obj; |
trash-workFlow/src/main/resources/mapper/SmsMapper.xml
| @@ -8,4 +8,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -8,4 +8,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 8 | select number from sms where checkpoint = #{checkpoint} and type = #{type} | 8 | select number from sms where checkpoint = #{checkpoint} and type = #{type} |
| 9 | </select> | 9 | </select> |
| 10 | 10 | ||
| 11 | + | ||
| 12 | + <select id="getLocalData" parameterType="String" resultType="java.lang.String"> | ||
| 13 | + select json from temp where type = #{type} | ||
| 14 | + </select> | ||
| 15 | + | ||
| 11 | </mapper> | 16 | </mapper> |
| 12 | \ No newline at end of file | 17 | \ No newline at end of file |