Commit 9db73edac13ad94b9f4422a81ea769afa564ca7d

Authored by youxiw2000
1 parent 315e50eb

m

trash-activiti/src/main/java/com/trash/activiti/service/impl/ActTaskServiceImpl.java
... ... @@ -339,7 +339,7 @@ public class ActTaskServiceImpl implements IActTaskService {
339 339  
340 340 Set<String> idString = new HashSet<String>();
341 341 for (ProcessInstance pi : processInstanceList) {
342   - idString.add(pi.getBusinessKey());
  342 + idString.add(pi.getId());
343 343 }
344 344  
345 345 List<Map<String, Object>> maps = actMapper.selectWorkByIds(idString);
... ...
trash-activiti/src/main/java/com/trash/activiti/service/impl/FormHistoryDataServiceImpl.java
... ... @@ -42,19 +42,13 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
42 42 @Override
43 43 public List<ActWorkflowFormData> historyDataShow(String businessKey) {
44 44 List<ActWorkflowFormData> returnHistoryFromDataDTOS=new ArrayList<>();
  45 + List<ActWorkflowFormData> actWorkflowFormData=new ArrayList<>();
45 46  
46 47 List<Task> tasks = null;
47   -
48   - if(businessKey.contains("constructsite")){
49   - String id = businessKey.split(":")[1];
50   - tasks =taskService.createTaskQuery().processInstanceBusinessKey("workflow_constructsite_edit:" + id).list();
51   - tasks.addAll(taskService.createTaskQuery().processInstanceBusinessKey("workflow_constructsite:" + id).list());
52   - }else{
53 48  
54   - tasks =taskService.createTaskQuery().processInstanceBusinessKey(businessKey).list();
55   - }
56 49  
57   -
  50 +
  51 + tasks =taskService.createTaskQuery().processInstanceBusinessKey(businessKey).list();
58 52  
59 53 if(tasks.size() > 0){
60 54  
... ... @@ -71,7 +65,21 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
71 65 returnHistoryFromDataDTOS.add(afw);
72 66 }
73 67  
74   - List<ActWorkflowFormData> actWorkflowFormData = actWorkflowFormDataService.selectActWorkflowFormDataByBusinessKey(businessKey);
  68 +
  69 + if(businessKey.contains("constructsite")){
  70 + String id = businessKey.split(":")[1];
  71 +
  72 + actWorkflowFormData.addAll( actWorkflowFormDataService.selectActWorkflowFormDataByBusinessKey( "workflow_constructsite:" + id));
  73 +
  74 + actWorkflowFormData = actWorkflowFormDataService.selectActWorkflowFormDataByBusinessKey("workflow_constructsite_edit:" + id);
  75 +
  76 +
  77 + }else{
  78 +
  79 + actWorkflowFormData = actWorkflowFormDataService.selectActWorkflowFormDataByBusinessKey(businessKey);
  80 + }
  81 +
  82 +
75 83  
76 84 for(int i =0;i<actWorkflowFormData.size();i++){
77 85 if(i == actWorkflowFormData.size()-1){
... ... @@ -108,9 +116,8 @@ public class FormHistoryDataServiceImpl implements IFormHistoryDataService {
108 116 // returnHistoryFromDataDTOS.add(returnHistoryFromDataDTO);
109 117 // }
110 118 // );
111   -// returnHistoryFromDataDTOS = returnHistoryFromDataDTOS.stream().sorted((x, y) -> x.getCreateTime().compareTo(y.getCreateTime())).collect(Collectors.toList());
112 119  
113   -
  120 + returnHistoryFromDataDTOS = returnHistoryFromDataDTOS.stream().sorted((y,x) -> x.getCreateTime().compareTo(y.getCreateTime())).collect(Collectors.toList());
114 121  
115 122  
116 123 return returnHistoryFromDataDTOS;
... ...
trash-daily/src/main/java/com/trash/information_sharing/controller/InformationSharingController.java
... ... @@ -36,7 +36,7 @@ public class InformationSharingController extends BaseController
36 36 public TableDataInfo list(InformationSharing informationSharing)
37 37 {
38 38 startPage();
39   - informationSharing.setCreateBy(SecurityUtils.getUsername());
  39 +// informationSharing.setCreateBy(SecurityUtils.getUsername());
40 40 List<InformationSharing> list = informationSharingService.selectInformationSharingList(informationSharing);
41 41 return getDataTable(list);
42 42 }
... ...
trash-daily/src/main/java/com/trash/report/controller/WorkReportController.java
... ... @@ -37,7 +37,7 @@ public class WorkReportController extends BaseController
37 37 public TableDataInfo list(WorkReport workReport)
38 38 {
39 39 startPage();
40   - workReport.setCreateBy(SecurityUtils.getUsername());
  40 +// workReport.setCreateBy(SecurityUtils.getUsername());
41 41 List<WorkReport> list = workReportService.selectWorkReportList(workReport);
42 42 return getDataTable(list);
43 43 }
... ...
trash-daily/src/main/java/com/trash/situation/controller/DailySituationController.java
... ... @@ -37,7 +37,7 @@ public class DailySituationController extends BaseController
37 37 public TableDataInfo list(DailySituation dailySituation)
38 38 {
39 39 startPage();
40   - dailySituation.setCreateBy(SecurityUtils.getUsername());
  40 +// dailySituation.setCreateBy(SecurityUtils.getUsername());
41 41 List<DailySituation> list = dailySituationService.selectDailySituationList(dailySituation);
42 42 return getDataTable(list);
43 43 }
... ...
trash-daily/src/main/java/com/trash/toollist/controller/DailyToolListController.java
... ... @@ -37,7 +37,7 @@ public class DailyToolListController extends BaseController
37 37 public TableDataInfo list(DailyToolList dailyToolList)
38 38 {
39 39 startPage();
40   - dailyToolList.setCreateBy(SecurityUtils.getUsername());
  40 +// dailyToolList.setCreateBy(SecurityUtils.getUsername());
41 41 List<DailyToolList> list = dailyToolListService.selectDailyToolListList(dailyToolList);
42 42 return getDataTable(list);
43 43 }
... ...
trash-ui/dist.rar
No preview for this file type
trash-ui/src/api/taskmethod.js
... ... @@ -369,13 +369,13 @@ export default {
369 369 }
370 370 }
371 371  
372   - if (this.taskName == "勘察科员") {
  372 + if (this.taskName.indexOf("科员") > -1) {
373 373 query.idx = 0;
374 374 query.sign1Text = text;
375   - } else if (this.taskName == "堪察部长") {
  375 + } else if (this.taskName.indexOf("部长") > -1) {
376 376 query.idx = 1;
377 377 query.sign2Text = text;
378   - } else if (this.taskName == "堪察分管领导") {
  378 + } else if (this.taskName.indexOf("分管领导") > -1) {
379 379 query.idx = 2;
380 380 query.sign3Text = text
381 381 } else if (this.taskName == "中心负责人") {
... ...
trash-ui/src/api/vio_casefile.js
... ... @@ -103,7 +103,7 @@ export default {
103 103 {code: 22, name: "未按线路行驶"},
104 104 {code: 23, name: "闯禁行驶"},
105 105 {code: 24, name: "失信车辆作业"},
106   - {code: 25, name: "其他1"},
  106 + {code: 25, name: "卫星定位异常"},
107 107 {code: 26, name: "其他2"},
108 108 {code: 27, name: "其他3"},
109 109 {code: 28, name: "其他4"},
... ...
trash-ui/src/layout/index3.vue renamed to trash-ui/src/layout/index44.vue
trash-ui/src/views/h5/task/handleInfo.vue
... ... @@ -137,7 +137,7 @@ export default {
137 137 depts:[
138 138 {
139 139 "code": 1,
140   - "name": "勘部"
  140 + "name": "勘部"
141 141 },
142 142 {
143 143 "code": 2,
... ...
trash-ui/src/views/office/handle/handleInfo.vue
... ... @@ -145,7 +145,7 @@ export default {
145 145 depts:[
146 146 {
147 147 "code": 1,
148   - "name": "勘部"
  148 + "name": "勘部"
149 149 },
150 150 {
151 151 "code": 2,
... ...
trash-workFlow/src/main/java/com/trash/business/domain/SupervisionThreestep.java
... ... @@ -140,8 +140,20 @@ public class SupervisionThreestep extends BaseEntity
140 140  
141 141  
142 142 private String his;
  143 +
  144 + private String[] ids;
  145 +
  146 +
143 147  
144 148  
  149 + public String[] getIds() {
  150 + return ids;
  151 + }
  152 +
  153 + public void setIds(String[] ids) {
  154 + this.ids = ids;
  155 + }
  156 +
145 157 public String getHis() {
146 158 return his;
147 159 }
... ...
trash-workFlow/src/main/java/com/trash/business/mapper/TruckActivateMapper.java
... ... @@ -65,11 +65,13 @@ public interface TruckActivateMapper
65 65  
66 66 public void endAllTurckUnActive();
67 67  
68   - public TruckActivate selectTodayTruckActivateByObjId(String objId);
  68 + public List<TruckActivate> selectTodayTruckActivateByObjId(String objId);
69 69  
70 70 public TruckActivate selectTodayTruckByObjId(String objId);
71 71  
72   - public Map<String,String> getConractByObjectId(TruckActivate turck);
  72 + public TruckActivate getConractByObjectId(TruckActivate turck);
73 73  
74 74 public List<TruckActivate> getActivedTruckList(TruckActivate truckActivate);
  75 +
  76 + public List<TruckActivate> selectTodayTruckByObjIds(String[] objs);
75 77 }
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/SupervisionThreestepServiceImpl.java
... ... @@ -55,10 +55,6 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
55 55 TruckActivateMapper truckActivateMapper;
56 56  
57 57  
58   -
59   - SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
60   - SimpleDateFormat timeFomat = new SimpleDateFormat("HH:mm:SS");
61   -
62 58 /**
63 59 * 查询三查机制
64 60 *
... ... @@ -83,6 +79,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
83 79 if (supervisionThreestep.getWorkStartTime() == null && supervisionThreestep.getStatus() == null) {
84 80 String start, end;
85 81  
  82 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
86 83 Date date = new Date();
87 84  
88 85 if (new Date().getHours() < 8) {
... ... @@ -132,6 +129,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
132 129 if (supervisionThreestep.getWorkStartTime() == null && supervisionThreestep.getStatus() == null) {
133 130 String start, end;
134 131  
  132 +
  133 +
  134 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
135 135 Date date = new Date();
136 136  
137 137 if (new Date().getHours() < 8) {
... ... @@ -185,9 +185,13 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
185 185 @SuppressWarnings("unchecked")
186 186 @Override
187 187 public List<Map<String,String>> selectDayWorkList(SupervisionThreestep supervisionThreestep) {
188   - if (supervisionThreestep.getWorkStartTime() == null) {
  188 +
  189 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
  190 + if (supervisionThreestep.getWorkStartTime() == null) {
189 191 String start, end;
190 192  
  193 +
  194 +
191 195 Date date = new Date();
192 196  
193 197 if (new Date().getHours() < 8) {
... ... @@ -513,6 +517,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
513 517 @Override
514 518 public List<Map> selectDayWorkListByType(SupervisionThreestep supervisionThreestep) {
515 519  
  520 +
  521 +
  522 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
516 523 String start, end;
517 524  
518 525 Date date = new Date();
... ... @@ -557,15 +564,12 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
557 564 }
558 565 }
559 566  
560   - List<String> idStrings = new ArrayList<String>();
561   - if(m.get("company_trucks") != null){
562   - for(String objId : m.get("company_trucks").toString().split(",")){
563   - TruckActivate truck = truckActivateMapper.selectTodayTruckActivateByObjId(objId);
564   - if(truck != null){
565   - idStrings.add(objId);
566   - }
567   - }
568   - }
  567 + List<String> idStrings = new ArrayList<String>();
  568 + List<TruckActivate> trucks = truckActivateMapper.selectTodayTruckActivateByObjId(m.get("id").toString());
  569 + for(TruckActivate truck:trucks){
  570 + idStrings.add(truck.getObjectId());
  571 + }
  572 +
569 573 m.put("vehicleIdList", idStrings);
570 574  
571 575 list.add(m);
... ... @@ -581,6 +585,7 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
581 585 public List<SupervisionThreestep> selectTodayDataList(SupervisionThreestep supervisionThreestep){
582 586  
583 587  
  588 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
584 589 if(supervisionThreestep.getWorkStartTime() == null){
585 590 String start, end;
586 591  
... ... @@ -623,6 +628,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
623 628 @Transactional
624 629 public int insertSupervisionThreestep(SupervisionThreestep supervisionThreestep) {
625 630  
  631 +
  632 +
  633 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
626 634 if (supervisionThreestep.getId() != null) {
627 635 supervisionThreestepMapper.deleteSupervisionThreestepById(supervisionThreestep.getId());
628 636 }
... ... @@ -696,6 +704,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
696 704  
697 705 int j = supervisionThreestepMapper.updateSupervisionThreestep(supervisionThreestep);
698 706  
  707 +
  708 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
  709 +
699 710 supervisionThreestep = supervisionThreestepMapper.selectSupervisionThreestepById(supervisionThreestep.getId());
700 711  
701 712  
... ... @@ -916,6 +927,9 @@ public class SupervisionThreestepServiceImpl implements ISupervisionThreestepSer
916 927 public void updateTodayData(String token){
917 928  
918 929  
  930 +
  931 + SimpleDateFormat yearFomat = new SimpleDateFormat("yyyy-MM-dd");
  932 +
919 933 SupervisionThreestep supervisionThreestep = new SupervisionThreestep();
920 934  
921 935 String start, end;
... ...
trash-workFlow/src/main/java/com/trash/business/service/impl/TruckActivateServiceImpl.java
... ... @@ -110,6 +110,10 @@ public class TruckActivateServiceImpl implements ITruckActivateService
110 110 String[] objs = truckActivate.getObjectId().split(",");
111 111 String[] nos = truckActivate.getLicensePlate().split(",");
112 112  
  113 +
  114 + List<TruckActivate> oldDates = truckActivateMapper.selectTodayTruckByObjIds(objs);
  115 +
  116 +
113 117 for(int i =0 ;i<objs.length;i++){
114 118  
115 119 TruckActivate active = new TruckActivate();
... ... @@ -124,8 +128,14 @@ public class TruckActivateServiceImpl implements ITruckActivateService
124 128  
125 129 active.setCreateTime(DateUtils.getNowDate());
126 130  
127   - TruckActivate oldDate = truckActivateMapper.selectTodayTruckByObjId(active.getObjectId());
128   -
  131 +
  132 + TruckActivate oldDate = null;
  133 +
  134 + for(int j =0;j<oldDates.size();j++){
  135 + if(objs[i].equals( oldDates.get(j).getObjectId())){
  136 + oldDate = oldDates.get(j);
  137 + }
  138 + }
129 139  
130 140  
131 141 if(oldDate != null){
... ... @@ -336,13 +346,14 @@ public class TruckActivateServiceImpl implements ITruckActivateService
336 346 }
337 347 }
338 348  
339   - Map<String,String> m = truckActivateMapper.getConractByObjectId(turck);
  349 + TruckActivate truck = truckActivateMapper.getConractByObjectId(turck);
  350 +
  351 + if(truck == null)return null;
340 352  
341 353 Map param = new HashMap<>();
342 354  
343 355 List<String> ids =new ArrayList<>();
344 356  
345   - if(m == null)return null;
346 357  
347 358  
348 359 JSONArray contracts = redis.getCacheObject("contractList");
... ... @@ -359,31 +370,43 @@ public class TruckActivateServiceImpl implements ITruckActivateService
359 370 for(Object obj :contracts){
360 371 JSONObject jsonObject = (JSONObject)obj;
361 372  
362   - if(m.get("object_id").equals(jsonObject.getString("constructionSiteID"))){
  373 + if(truck.getConstructionId().equals(jsonObject.getString("constructionSiteID"))){
363 374 array.add(obj);
364 375 }
365 376 }
366 377  
367   - if(array == null || m.size() == 0){
  378 + if(array.size() == 0){
368 379 return null;
369 380 }
370 381  
  382 + String eids = "";
  383 +
371 384 for(Object object:array){
372   -
  385 +
373 386 JSONObject jsonObject = (JSONObject) object;
374   -
375   - threestep.setObjectId(jsonObject.getString("earthSiteID"));
376   - threestep.setType(1L);
377   - threestep.setStatus(1L);
378   - List<SupervisionThreestep> list = threestepMapper.selectSupervisionThreestepList(threestep);
379   -
380   -
381   -
382   - if(list.size() == 1){
383   - conractIds += jsonObject.getString("id") + ",";
  387 +
  388 + eids += jsonObject.getString("earthSiteID") + ",";
  389 + }
  390 +
  391 + threestep.setIds(eids.split(","));
  392 + threestep.setType(1L);
  393 + threestep.setStatus(1L);
  394 +
  395 + List<SupervisionThreestep> list = threestepMapper.selectSupervisionThreestepList(threestep);
  396 +
  397 + for(SupervisionThreestep three:list){
  398 + for(Object object:array){
  399 + JSONObject jsonObject = (JSONObject) object;
  400 + if(jsonObject.getString("earthSiteID").equals((three.getObjectId()))){
  401 + conractIds += jsonObject.getString("id") + ",";
  402 + break;
  403 + }
384 404 }
  405 +
385 406 }
386 407  
  408 +
  409 +
387 410 if(conractIds.length() == 0){
388 411 return conractIds;
389 412 }
... ...
trash-workFlow/src/main/java/com/trash/casefile/controller/ViolationCaseFileController.java
... ... @@ -126,7 +126,7 @@ public class ViolationCaseFileController extends BaseController
126 126 String[] caseType = {"进入非专用车辆","无许可手续(工)","无许可手续(消)","黄土覆盖情况","出入口路面污染","出入口道路硬化","车辆冲洗是否到位",
127 127 "雾炮机是否正常开启","使用费专用车运输","监控点位未对准","未报开工作业","视频设备离线超时报警","三无车辆进入工地","未按时间作业",
128 128 "未报开工作业","视频设备离线超时报警","三无车辆进入消纳场","未到指定的消纳场作业","离线运输报警(工)","离线运输报警(消)","未激活车辆作业",
129   - "未核准作业车辆作业","未按线路行驶","闯禁行驶","失信车辆作业","其他1","其他2","其他3","其他4","其他5"};
  129 + "未核准作业车辆作业","未按线路行驶","闯禁行驶","失信车辆作业","卫星定位异常","其他2","其他3","其他4","其他5"};
130 130  
131 131 @GetMapping(value = "/caseTable")
132 132 public AjaxResult getTable(String owningRegion,String startDate,String endDate){
... ...
trash-workFlow/src/main/java/com/trash/casefile/kafka/Consumer.java
... ... @@ -63,6 +63,8 @@ public class Consumer {
63 63 "44030028=离线运输报警(工)", "44030029=离线运输报警(消)", "44030030=未激活车辆作业", "44030031=未核准作业车辆作业", "44030032=未按线路行驶",
64 64 "44030033=闯禁行驶", "44030034=失信车辆作业"};
65 65  
  66 + //卫星定位异常
  67 +
66 68 JSONObject jsonObject = JSONObject.parseObject(data);
67 69 //报警时间
68 70 Date alarmTime = new Date(jsonObject.getLong("alarmTime")*1000L);
... ...
trash-workFlow/src/main/resources/mapper/SupervisionThreestepMapper.xml
... ... @@ -135,6 +135,14 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
135 135 <if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
136 136 <if test="workStartTime != null"> and self_check_time BETWEEN #{workStartTime} and
137 137 #{workEndTime}</if>
  138 +
  139 + <if test="ids != null">
  140 + and object_id in
  141 + <foreach item="id" collection="ids" open="(" separator=","
  142 + close=")">
  143 + #{id}
  144 + </foreach>
  145 + </if>
138 146 </where>
139 147 ORDER BY create_time desc
140 148 </select>
... ...
trash-workFlow/src/main/resources/mapper/TruckActivateMapper.xml
... ... @@ -66,21 +66,17 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
66 66 </where>
67 67 </select>
68 68  
69   - <select id="getConractByObjectId" parameterType="TruckActivate" resultType="java.util.HashMap">
70   - select three.* from(
71   - select id, company, license_plate, time, construction, status,
  69 + <select id="getConractByObjectId" parameterType="TruckActivate" resultMap="TruckActivateResult">
  70 + select id, company,construction_id, license_plate, time, construction, status,
72 71 earthsite, object_id, create_by, create_type, activate_time, create_time
73 72 from truck_activate
74 73 where
75 74 object_id = #{objectId} and
76   - activate_time between #{startTime} and #{endTime}) truck
77   - LEFT JOIN (select * from supervision_threestep WHERE company_trucks LIKE CONCAT("%",#{objectId},"%")
78   - and
79   - check_time between #{startTime} and #{endTime}
80   - ) three
81   - on
82   - truck.construction = three.name
  75 + activate_time between #{startTime} and #{endTime}
83 76 </select>
  77 +
  78 +
  79 +
84 80  
85 81 <select id="selectTodayTruckByObjId" parameterType="String" resultMap="TruckActivateResult">
86 82 <include refid="selectTruckActivateVo"/>
... ... @@ -95,7 +91,7 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
95 91  
96 92 <select id="selectTodayTruckActivateByObjId" parameterType="String" resultMap="TruckActivateResult">
97 93 <include refid="selectTruckActivateVo"/>
98   - where object_id = #{objId} and activate_time is not null and status = 0
  94 + where construction_id = #{objId} and activate_time is not null and status = 0
99 95 </select>
100 96  
101 97  
... ... @@ -173,9 +169,15 @@ PUBLIC &quot;-//mybatis.org//DTD Mapper 3.0//EN&quot;
173 169  
174 170 <delete id="deleteTruckActivateByIds" parameterType="String">
175 171 delete from truck_activate where id in
176   - <foreach item="id" collection="array" open="(" separator="," close=")">
  172 +
  173 + </delete>
  174 +
  175 + <select id="selectTodayTruckByObjIds" parameterType="String" resultMap="TruckActivateResult">
  176 + <include refid="selectTruckActivateVo"/>
  177 + where status = 0 and object_id in
  178 + <foreach item="id" collection="array" open="(" separator="," close=")">
177 179 #{id}
178 180 </foreach>
179   - </delete>
  181 + </select>
180 182  
181 183 </mapper>
182 184 \ No newline at end of file
... ...