Commit 16e960836888dd5a39d99d971870951e0aa7fa4b

Authored by youxiw2000
1 parent 0808b760

m

trash-ui/src/api/truck_active.js
@@ -408,7 +408,7 @@ export default { @@ -408,7 +408,7 @@ export default {
408 } 408 }
409 409
410 addTruckActivate(data).then(response => { 410 addTruckActivate(data).then(response => {
411 - this.msgSuccess(response.message); 411 + this.msgSuccess("操作成功," + response.message);
412 this.open = false; 412 this.open = false;
413 this.getList(); 413 this.getList();
414 }); 414 });
trash-ui/src/api/vio_casefile.js
@@ -93,10 +93,10 @@ export default { @@ -93,10 +93,10 @@ export default {
93 {code: 11, name: "工地预警-视频设备离线超时报警"}, 93 {code: 11, name: "工地预警-视频设备离线超时报警"},
94 {code: 12, name: "工地预警-三无车辆进入工地"}, 94 {code: 12, name: "工地预警-三无车辆进入工地"},
95 {code: 13, name: "工地预警-未按时间作业"}, 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 {code: 18, name: "离线运输报警(工)"}, 100 {code: 18, name: "离线运输报警(工)"},
101 {code: 19, name: "离线运输报警(消)"}, 101 {code: 19, name: "离线运输报警(消)"},
102 {code: 20, name: "未激活车辆作业"}, 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,6 +16,7 @@ import com.trash.business.domain.DriverCredit;
16 import com.trash.business.domain.EarthsitesCredit; 16 import com.trash.business.domain.EarthsitesCredit;
17 import com.trash.business.service.IDriverCreditService; 17 import com.trash.business.service.IDriverCreditService;
18 import com.trash.common.config.trashConfig; 18 import com.trash.common.config.trashConfig;
  19 +import com.trash.common.core.redis.RedisCache;
19 import com.trash.common.utils.RemoteServerUtils; 20 import com.trash.common.utils.RemoteServerUtils;
20 import com.trash.common.utils.SecurityUtils; 21 import com.trash.common.utils.SecurityUtils;
21 22
@@ -53,6 +54,9 @@ public class DriverCreditServiceImpl implements IDriverCreditService @@ -53,6 +54,9 @@ public class DriverCreditServiceImpl implements IDriverCreditService
53 */ 54 */
54 @Autowired 55 @Autowired
55 private trashConfig trashConfig; 56 private trashConfig trashConfig;
  57 +
  58 + @Autowired
  59 + RedisCache redis;
56 60
57 @Override 61 @Override
58 public List<DriverCredit> selectDriverCreditList(DriverCredit driverCredit) 62 public List<DriverCredit> selectDriverCreditList(DriverCredit driverCredit)
@@ -61,7 +65,20 @@ public class DriverCreditServiceImpl implements IDriverCreditService @@ -61,7 +65,20 @@ public class DriverCreditServiceImpl implements IDriverCreditService
61 List<DriverCredit> list = new ArrayList<>(); 65 List<DriverCredit> list = new ArrayList<>();
62 66
63 List<String> companys = SecurityUtils.getLoginUser().getUser().getCompanyIds(); 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 if (companys.size() > 0) { 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,8 +849,13 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
849 TruckActivate truckActivate = new TruckActivate(); 849 TruckActivate truckActivate = new TruckActivate();
850 truckActivate.setStatus(0L); 850 truckActivate.setStatus(0L);
851 truckActivate.setActivateStatus("0"); 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 for (TruckActivate ta : taList) { 860 for (TruckActivate ta : taList) {
856 unActiveTruck += ta.getObjectId() + ","; 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,7 +193,7 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
193 String[] objs = truckActivate.getObjectId().split(","); 193 String[] objs = truckActivate.getObjectId().split(",");
194 String[] nos = truckActivate.getLicensePlate().split(","); 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 JSONObject construction = RemoteServerUtils.getConstructionLicenseById(truckActivate.getConstructionId()); 198 JSONObject construction = RemoteServerUtils.getConstructionLicenseById(truckActivate.getConstructionId());
199 199
@@ -222,25 +222,30 @@ public class TruckActivateServiceImpl implements ITruckActivateService { @@ -222,25 +222,30 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
222 222
223 active.setCreateTime(DateUtils.getNowDate()); 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 errorMessage += nos[i] + " "; 241 errorMessage += nos[i] + " ";
237 continue; 242 continue;
238 } 243 }
239 244
240 SupervisionThreestep threestep = new SupervisionThreestep(); 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 try { 250 try {
246 threestep.setWorkStartTime(DateUtils.parseDate(start)); 251 threestep.setWorkStartTime(DateUtils.parseDate(start));
@@ -291,7 +296,7 @@ public class TruckActivateServiceImpl implements ITruckActivateService { @@ -291,7 +296,7 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
291 296
292 threestep.setId(threeId); 297 threestep.setId(threeId);
293 298
294 - trucks = trucks.replace(oldDate.getObjectId(), "").replace(",,", ","); 299 + trucks = trucks.replace(oldData.getObjectId(), "").replace(",,", ",");
295 300
296 if (trucks.length() == 1) { 301 if (trucks.length() == 1) {
297 trucks = ""; 302 trucks = "";
@@ -303,8 +308,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService { @@ -303,8 +308,8 @@ public class TruckActivateServiceImpl implements ITruckActivateService {
303 threestepMapper.updateSupervisionThreestep(threestep); 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 successMessage += nos[i] + " "; 313 successMessage += nos[i] + " ";
309 truckActivateMapper.updateTruckActivate(active); 314 truckActivateMapper.updateTruckActivate(active);
310 continue; 315 continue;
trash-workFlow/src/main/java/com/trash/caseOffline/service/impl/CaseOfflineServiceImpl.java
@@ -90,13 +90,13 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService @@ -90,13 +90,13 @@ public class CaseOfflineServiceImpl implements ICaseOfflineService
90 90
91 for(Object obj:earthList){ 91 for(Object obj:earthList){
92 JSONObject jsonObject = (JSONObject) obj; 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 names.add(jsonObject.getString("name")); 94 names.add(jsonObject.getString("name"));
95 } 95 }
96 } 96 }
97 for(Object obj:construList){ 97 for(Object obj:construList){
98 JSONObject jsonObject = (JSONObject) obj; 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 names.add(jsonObject.getString("name")); 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,13 +98,13 @@ public class ViolationCaseFileServiceImpl implements IViolationCaseFileService
98 98
99 for(Object obj:earthList){ 99 for(Object obj:earthList){
100 JSONObject jsonObject = (JSONObject) obj; 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 names.add(jsonObject.getString("name")); 102 names.add(jsonObject.getString("name"));
103 } 103 }
104 } 104 }
105 for(Object obj:construList){ 105 for(Object obj:construList){
106 JSONObject jsonObject = (JSONObject) obj; 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 names.add(jsonObject.getString("name")); 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,13 +97,13 @@ public class ViolationWarningInformationServiceImpl implements IViolationWarning
97 97
98 for(Object obj:earthList){ 98 for(Object obj:earthList){
99 JSONObject jsonObject = (JSONObject) obj; 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 names.add(jsonObject.getString("name")); 101 names.add(jsonObject.getString("name"));
102 } 102 }
103 } 103 }
104 for(Object obj:construList){ 104 for(Object obj:construList){
105 JSONObject jsonObject = (JSONObject) obj; 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 names.add(jsonObject.getString("name")); 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,7 +58,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
58 <if test="activateStatus == 1 "> and activate_time is not null</if> 58 <if test="activateStatus == 1 "> and activate_time is not null</if>
59 <if test="createTime != null "> and DATE_FORMAT(create_time,("%y%m%d")) = DATE_FORMAT(#{createTime},("%y%m%d"))</if> 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 construction_id in 62 construction_id in
63 <foreach item="id" collection="cIds" open="(" separator="," close=")"> 63 <foreach item="id" collection="cIds" open="(" separator="," close=")">
64 #{id} 64 #{id}
@@ -70,13 +70,13 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot; @@ -70,13 +70,13 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
70 ) 70 )
71 71
72 </if> 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 and construction_id in 74 and construction_id in
75 <foreach item="id" collection="cIds" open="(" separator="," close=")"> 75 <foreach item="id" collection="cIds" open="(" separator="," close=")">
76 #{id} 76 #{id}
77 </foreach> 77 </foreach>
78 </if> 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 and object_id in 80 and object_id in
81 <foreach item="id" collection="ids" open="(" separator="," close=")"> 81 <foreach item="id" collection="ids" open="(" separator="," close=")">
82 #{id} 82 #{id}