Commit 16e960836888dd5a39d99d971870951e0aa7fa4b

Authored by youxiw2000
1 parent 0808b760

m

trash-ui/src/api/truck_active.js
... ... @@ -408,7 +408,7 @@ export default {
408 408 }
409 409  
410 410 addTruckActivate(data).then(response => {
411   - this.msgSuccess(response.message);
  411 + this.msgSuccess("操作成功," + response.message);
412 412 this.open = false;
413 413 this.getList();
414 414 });
... ...
trash-ui/src/api/vio_casefile.js
... ... @@ -93,10 +93,10 @@ export default {
93 93 {code: 11, name: "工地预警-视频设备离线超时报警"},
94 94 {code: 12, name: "工地预警-三无车辆进入工地"},
95 95 {code: 13, name: "工地预警-未按时间作业"},
96   - {code: 14, name: "处理场所预警-未报开工作业"},
97   - {code: 15, name: "处理场所预警-视频设备离线超时报警"},
98   - {code: 16, name: "处理场所预警-三无车辆进入处理场所"},
99   - {code: 17, name: "处理场所预警-未到指定的处理场所作业"},
  96 + {code: 14, name: "未报开工作业"},
  97 + {code: 15, name: "视频设备离线超时报警"},
  98 + {code: 16, name: "三无车辆进入处理场所"},
  99 + {code: 17, name: "未到指定的处理场所作业"},
100 100 {code: 18, name: "离线运输报警(工)"},
101 101 {code: 19, name: "离线运输报警(消)"},
102 102 {code: 20, name: "未激活车辆作业"},
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/DriverCreditServiceImpl.java
... ... @@ -16,6 +16,7 @@ import com.trash.business.domain.DriverCredit;
16 16 import com.trash.business.domain.EarthsitesCredit;
17 17 import com.trash.business.service.IDriverCreditService;
18 18 import com.trash.common.config.trashConfig;
  19 +import com.trash.common.core.redis.RedisCache;
19 20 import com.trash.common.utils.RemoteServerUtils;
20 21 import com.trash.common.utils.SecurityUtils;
21 22  
... ... @@ -53,6 +54,9 @@ public class DriverCreditServiceImpl implements IDriverCreditService
53 54 */
54 55 @Autowired
55 56 private trashConfig trashConfig;
  57 +
  58 + @Autowired
  59 + RedisCache redis;
56 60  
57 61 @Override
58 62 public List<DriverCredit> selectDriverCreditList(DriverCredit driverCredit)
... ... @@ -61,7 +65,20 @@ public class DriverCreditServiceImpl implements IDriverCreditService
61 65 List<DriverCredit> list = new ArrayList<>();
62 66  
63 67 List<String> companys = SecurityUtils.getLoginUser().getUser().getCompanyIds();
64   -
  68 +List<String> areas = SecurityUtils.getLoginUser().getUser().getCompanyAreas();
  69 +
  70 +
  71 + if(areas.size() > 0) {
  72 + JSONArray array = redis.getCacheObject("companyList");
  73 + if(array != null) {
  74 + for(Object obj:array) {
  75 + JSONObject json = (JSONObject)obj;
  76 + if(areas.indexOf(json.getString("areaCode")) > -1) {
  77 + companys.add(json.getString("id"));
  78 + }
  79 + }
  80 + }
  81 + }
65 82  
66 83 if (companys.size() > 0) {
67 84  
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
... ... @@ -849,8 +849,13 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
849 849 TruckActivate truckActivate = new TruckActivate();
850 850 truckActivate.setStatus(0L);
851 851 truckActivate.setActivateStatus("0");
852   -
853   - List<TruckActivate> taList = truckActivateMapper.selectTruckActivateList(truckActivate);
  852 + List<TruckActivate> taList = null;
  853 + try{
  854 + taList = truckActivateMapper.selectTruckActivateList(truckActivate);
  855 + }catch(Exception e){
  856 + e.printStackTrace();
  857 + }
  858 +
854 859  
855 860 for (TruckActivate ta : taList) {
856 861 unActiveTruck += ta.getObjectId() + ",";
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
... ... @@ -193,7 +193,7 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
193 193 String[] objs = truckActivate.getObjectId().split(",");
194 194 String[] nos = truckActivate.getLicensePlate().split(",");
195 195  
196   - List<TruckActivate> oldDates = truckActivateMapper.selectTodayTruckByObjIds(objs);
  196 + List<TruckActivate> oldDatas = truckActivateMapper.selectTodayTruckByObjIds(objs);
197 197  
198 198 JSONObject construction = RemoteServerUtils.getConstructionLicenseById(truckActivate.getConstructionId());
199 199  
... ... @@ -222,25 +222,30 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
222 222  
223 223 active.setCreateTime(DateUtils.getNowDate());
224 224  
225   - TruckActivate oldDate = null;
  225 + TruckActivate oldData = null;
226 226  
227   - for (int j = 0; j < oldDates.size(); j++) {
228   - if (objs[i].equals(oldDates.get(j).getObjectId())) {
229   - oldDate = oldDates.get(j);
  227 + for (int j = 0; j < oldDatas.size(); j++) {
  228 + if (objs[i].equals(oldDatas.get(j).getObjectId())) {
  229 + oldData = oldDatas.get(j);
  230 + break;
230 231 }
231 232 }
232 233  
233   - if (oldDate != null) {
  234 + if (oldData != null) {
  235 +
  236 + if(oldData.getConstructionId().equals(truckActivate.getConstructionId())){
  237 + continue;
  238 + }
234 239  
235   - if (oldDate.getCreateCount() > 1) {
  240 + if (oldData.getCreateCount() > 1) {
236 241 errorMessage += nos[i] + " ";
237 242 continue;
238 243 }
239 244  
240 245 SupervisionThreestep threestep = new SupervisionThreestep();
241 246  
242   - threestep.setName(oldDate.getConstruction());
243   - threestep.setObjectId(oldDate.getConstructionId());
  247 + threestep.setName(oldData.getConstruction());
  248 + threestep.setObjectId(oldData.getConstructionId());
244 249  
245 250 try {
246 251 threestep.setWorkStartTime(DateUtils.parseDate(start));
... ... @@ -291,7 +296,7 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
291 296  
292 297 threestep.setId(threeId);
293 298  
294   - trucks = trucks.replace(oldDate.getObjectId(), "").replace(",,", ",");
  299 + trucks = trucks.replace(oldData.getObjectId(), "").replace(",,", ",");
295 300  
296 301 if (trucks.length() == 1) {
297 302 trucks = "";
... ... @@ -303,8 +308,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
303 308 threestepMapper.updateSupervisionThreestep(threestep);
304 309 }
305 310  
306   - active.setId(oldDate.getId());// 更新已有车辆激活数据
307   - active.setCreateCount(oldDate.getCreateCount() + 1);
  311 + active.setId(oldData.getId());// 更新已有车辆激活数据
  312 + active.setCreateCount(oldData.getCreateCount() + 1);
308 313 successMessage += nos[i] + " ";
309 314 truckActivateMapper.updateTruckActivate(active);
310 315 continue;
... ...
trash-workFlow/src/main/java/com/trash/caseOffline/service/impl/CaseOfflineServiceImpl.java
... ... @@ -90,13 +90,13 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService
90 90  
91 91 for(Object obj:earthList){
92 92 JSONObject jsonObject = (JSONObject) obj;
93   - if(eLish.indexOf(jsonObject.getString("id")) > 0 || eArea.indexOf(jsonObject.getString("areaCode"))> 0){
  93 + if(eLish.indexOf(jsonObject.getString("id")) > -1 || eArea.indexOf(jsonObject.getString("areaCode"))> -10){
94 94 names.add(jsonObject.getString("name"));
95 95 }
96 96 }
97 97 for(Object obj:construList){
98 98 JSONObject jsonObject = (JSONObject) obj;
99   - if(cLish.indexOf(jsonObject.getString("id")) > 0 || cArea.indexOf(jsonObject.getString("areaCode"))> 0){
  99 + if(cLish.indexOf(jsonObject.getString("id")) > -1 || cArea.indexOf(jsonObject.getString("areaCode"))> -1){
100 100 names.add(jsonObject.getString("name"));
101 101 }
102 102 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationCaseFileServiceImpl.java
... ... @@ -98,13 +98,13 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
98 98  
99 99 for(Object obj:earthList){
100 100 JSONObject jsonObject = (JSONObject) obj;
101   - if(eLish.indexOf(jsonObject.getString("id")) > 0 || eArea.indexOf(jsonObject.getString("areaCode"))> 0){
  101 + if(eLish.indexOf(jsonObject.getString("id")) > -1 || eArea.indexOf(jsonObject.getString("areaCode"))> -1){
102 102 names.add(jsonObject.getString("name"));
103 103 }
104 104 }
105 105 for(Object obj:construList){
106 106 JSONObject jsonObject = (JSONObject) obj;
107   - if(cLish.indexOf(jsonObject.getString("id")) > 0 || cArea.indexOf(jsonObject.getString("areaCode"))> 0){
  107 + if(cLish.indexOf(jsonObject.getString("id")) > -1 || cArea.indexOf(jsonObject.getString("areaCode"))> -1){
108 108 names.add(jsonObject.getString("name"));
109 109 }
110 110 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/service/impl/ViolationWarningInformationServiceImpl.java
... ... @@ -97,13 +97,13 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
97 97  
98 98 for(Object obj:earthList){
99 99 JSONObject jsonObject = (JSONObject) obj;
100   - if(eLish.indexOf(jsonObject.getString("id")) > 0 || eArea.indexOf(jsonObject.getString("areaCode"))> 0){
  100 + if(eLish.indexOf(jsonObject.getString("id")) > -1 || eArea.indexOf(jsonObject.getString("areaCode"))> -1){
101 101 names.add(jsonObject.getString("name"));
102 102 }
103 103 }
104 104 for(Object obj:construList){
105 105 JSONObject jsonObject = (JSONObject) obj;
106   - if(cLish.indexOf(jsonObject.getString("id")) > 0 || cArea.indexOf(jsonObject.getString("areaCode"))> 0){
  106 + if(cLish.indexOf(jsonObject.getString("id")) > -1 || cArea.indexOf(jsonObject.getString("areaCode"))> -1){
107 107 names.add(jsonObject.getString("name"));
108 108 }
109 109 }
... ...
trash-workFlow/src/main/resources/mapper/TruckActivateMapper.xml
... ... @@ -58,7 +58,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
58 58 <if test="activateStatus == 1 "> and activate_time is not null</if>
59 59 <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if>
60 60  
61   - <if test="cIds.size() > 0 and ids.size() > 0">and (
  61 + <if test="cIds != null and ids != null and cIds.size() > 0 and ids.size() > 0">and (
62 62 construction_id in
63 63 <foreach item="id" collection="cIds" open="(" separator="," close=")">
64 64 #{id}
... ... @@ -70,13 +70,13 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
70 70 )
71 71  
72 72 </if>
73   - <if test="cIds.size() > 0 and ids.size() == 0">
  73 + <if test="cIds != null and ids != null and cIds.size() > 0 and ids.size() == 0">
74 74 and construction_id in
75 75 <foreach item="id" collection="cIds" open="(" separator="," close=")">
76 76 #{id}
77 77 </foreach>
78 78 </if>
79   - <if test="cIds.size() == 0 and ids.size() > 0">
  79 + <if test="cIds != null and ids != null and cIds.size() == 0 and ids.size() > 0">
80 80 and object_id in
81 81 <foreach item="id" collection="ids" open="(" separator="," close=")">
82 82 #{id}
... ...