Commit 841c9a3e6066d2b9899c7fb53f2be1a7e37ec37c
Merge branch 'lggj' of http://192.168.168.245:8888/panzhaov5/bsth_control into lggj
Showing
50 changed files
with
2709 additions
and
1159 deletions
Too many changes to show.
To preserve performance only 50 of 149 files are displayed.
src/main/java/com/bsth/Application.java
| 1 | package com.bsth; | 1 | package com.bsth; |
| 2 | 2 | ||
| 3 | import com.bsth.data.SystemParamCache; | 3 | import com.bsth.data.SystemParamCache; |
| 4 | -import com.bsth.service.SystemParamService; | ||
| 5 | import com.fasterxml.jackson.annotation.JsonInclude; | 4 | import com.fasterxml.jackson.annotation.JsonInclude; |
| 6 | import com.fasterxml.jackson.databind.ObjectMapper; | 5 | import com.fasterxml.jackson.databind.ObjectMapper; |
| 7 | import com.fasterxml.jackson.databind.SerializationFeature; | 6 | import com.fasterxml.jackson.databind.SerializationFeature; |
| @@ -23,7 +22,7 @@ import java.util.concurrent.ScheduledExecutorService; | @@ -23,7 +22,7 @@ import java.util.concurrent.ScheduledExecutorService; | ||
| 23 | @SpringBootApplication | 22 | @SpringBootApplication |
| 24 | public class Application extends SpringBootServletInitializer { | 23 | public class Application extends SpringBootServletInitializer { |
| 25 | 24 | ||
| 26 | - public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(21); | 25 | + public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(30); |
| 27 | 26 | ||
| 28 | @Autowired | 27 | @Autowired |
| 29 | private SystemParamCache systemParamCache; | 28 | private SystemParamCache systemParamCache; |
src/main/java/com/bsth/XDApplication.java
| @@ -23,6 +23,7 @@ import com.bsth.data.schedule.thread.SchedulePstThread; | @@ -23,6 +23,7 @@ import com.bsth.data.schedule.thread.SchedulePstThread; | ||
| 23 | import com.bsth.data.schedule.thread.ScheduleRefreshThread; | 23 | import com.bsth.data.schedule.thread.ScheduleRefreshThread; |
| 24 | import com.bsth.data.schedule.thread.SubmitToTrafficManage; | 24 | import com.bsth.data.schedule.thread.SubmitToTrafficManage; |
| 25 | import com.bsth.data.zndd.ZnddThread; | 25 | import com.bsth.data.zndd.ZnddThread; |
| 26 | +import com.bsth.data.zndd.ZnddTwoThread; | ||
| 26 | import com.bsth.util.DateUtils; | 27 | import com.bsth.util.DateUtils; |
| 27 | import com.bsth.util.Tools; | 28 | import com.bsth.util.Tools; |
| 28 | import org.slf4j.Logger; | 29 | import org.slf4j.Logger; |
| @@ -85,6 +86,9 @@ public class XDApplication implements CommandLineRunner { | @@ -85,6 +86,9 @@ public class XDApplication implements CommandLineRunner { | ||
| 85 | FixedEnableVerionsThread fixedEnableVerionsThread;*/ | 86 | FixedEnableVerionsThread fixedEnableVerionsThread;*/ |
| 86 | @Autowired | 87 | @Autowired |
| 87 | ZnddThread znddThread; | 88 | ZnddThread znddThread; |
| 89 | + | ||
| 90 | + @Autowired | ||
| 91 | + ZnddTwoThread ZnddtwoThread; | ||
| 88 | @Autowired | 92 | @Autowired |
| 89 | SafeDrivDataLoadThread safeDrivDataLoadThread; | 93 | SafeDrivDataLoadThread safeDrivDataLoadThread; |
| 90 | 94 | ||
| @@ -145,8 +149,9 @@ public class XDApplication implements CommandLineRunner { | @@ -145,8 +149,9 @@ public class XDApplication implements CommandLineRunner { | ||
| 145 | //dayOfSchedule.dataRecovery(); | 149 | //dayOfSchedule.dataRecovery(); |
| 146 | 150 | ||
| 147 | //智能调度 | 151 | //智能调度 |
| 148 | - sexec.scheduleWithFixedDelay(znddThread, 15, 25, TimeUnit.SECONDS); | ||
| 149 | - | 152 | + sexec.scheduleWithFixedDelay(znddThread, 30, 30, TimeUnit.SECONDS); |
| 153 | + //智能调度 | ||
| 154 | + sexec.scheduleWithFixedDelay(ZnddtwoThread, 30, 60, TimeUnit.SECONDS); | ||
| 150 | //安全驾驶 | 155 | //安全驾驶 |
| 151 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); | 156 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); |
| 152 | 157 | ||
| @@ -190,10 +195,14 @@ public class XDApplication implements CommandLineRunner { | @@ -190,10 +195,14 @@ public class XDApplication implements CommandLineRunner { | ||
| 190 | public void prodInit(){ | 195 | public void prodInit(){ |
| 191 | log.info("prodInit..."); | 196 | log.info("prodInit..."); |
| 192 | ScheduledExecutorService sexec = Application.mainServices; | 197 | ScheduledExecutorService sexec = Application.mainServices; |
| 198 | + | ||
| 199 | + | ||
| 193 | //安全驾驶 | 200 | //安全驾驶 |
| 194 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); | 201 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); |
| 195 | //智能调度 | 202 | //智能调度 |
| 196 | - sexec.scheduleWithFixedDelay(znddThread, 15, 25, TimeUnit.SECONDS); | 203 | + sexec.scheduleWithFixedDelay(znddThread, 30, 30, TimeUnit.SECONDS); |
| 204 | + //智能调度 | ||
| 205 | + sexec.scheduleWithFixedDelay(ZnddtwoThread, 30, 60, TimeUnit.SECONDS); | ||
| 197 | GpsDataLoaderThread.setFlag(-1); | 206 | GpsDataLoaderThread.setFlag(-1); |
| 198 | /** 线调业务 */ | 207 | /** 线调业务 */ |
| 199 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 | 208 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 |
| @@ -237,8 +246,11 @@ public class XDApplication implements CommandLineRunner { | @@ -237,8 +246,11 @@ public class XDApplication implements CommandLineRunner { | ||
| 237 | ScheduledExecutorService sexec = Application.mainServices; | 246 | ScheduledExecutorService sexec = Application.mainServices; |
| 238 | //安全驾驶 | 247 | //安全驾驶 |
| 239 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); | 248 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); |
| 249 | + | ||
| 240 | //智能调度 | 250 | //智能调度 |
| 241 | - sexec.scheduleWithFixedDelay(znddThread, 15, 25, TimeUnit.SECONDS); | 251 | + sexec.scheduleWithFixedDelay(znddThread, 30, 30, TimeUnit.SECONDS); |
| 252 | + //智能调度 | ||
| 253 | + sexec.scheduleWithFixedDelay(ZnddtwoThread, 30, 60, TimeUnit.SECONDS); | ||
| 242 | GpsDataLoaderThread.setFlag(-1); | 254 | GpsDataLoaderThread.setFlag(-1); |
| 243 | //dayOfSchedule.dataRecovery(); | 255 | //dayOfSchedule.dataRecovery(); |
| 244 | /** 线调业务 */ | 256 | /** 线调业务 */ |
| @@ -260,7 +272,7 @@ public class XDApplication implements CommandLineRunner { | @@ -260,7 +272,7 @@ public class XDApplication implements CommandLineRunner { | ||
| 260 | WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 | 272 | WebSocketPushQueue.start();//消息队列 -webSocket ,推送至线调web页面的 |
| 261 | 273 | ||
| 262 | /** 线调为其他程序提供的数据 --写入数据库 */ | 274 | /** 线调为其他程序提供的数据 --写入数据库 */ |
| 263 | - sexec.scheduleWithFixedDelay(fcxxUpdateThread, 160, 30, TimeUnit.SECONDS);//发车信息(发车屏、信息发布) | 275 | + //sexec.scheduleWithFixedDelay(fcxxUpdateThread, 160, 30, TimeUnit.SECONDS);//发车信息(发车屏、信息发布) |
| 264 | //线路首末班数据(网关用,班次更新时写入) | 276 | //线路首末班数据(网关用,班次更新时写入) |
| 265 | //com.bsth.data.schedule.f_a_l.FirstAndLastHandler | 277 | //com.bsth.data.schedule.f_a_l.FirstAndLastHandler |
| 266 | sexec.scheduleWithFixedDelay(schSiginUpdateDBThread, 160, 60 * 30, TimeUnit.SECONDS);//无法自动完成的班次信息(网关用,补信号) | 278 | sexec.scheduleWithFixedDelay(schSiginUpdateDBThread, 160, 60 * 30, TimeUnit.SECONDS);//无法自动完成的班次信息(网关用,补信号) |
| @@ -284,7 +296,7 @@ public class XDApplication implements CommandLineRunner { | @@ -284,7 +296,7 @@ public class XDApplication implements CommandLineRunner { | ||
| 284 | //安全驾驶 | 296 | //安全驾驶 |
| 285 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); | 297 | sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); |
| 286 | //智能调度 | 298 | //智能调度 |
| 287 | - sexec.scheduleWithFixedDelay(znddThread, 15, 30, TimeUnit.SECONDS); | 299 | + sexec.scheduleWithFixedDelay(znddThread, 15, 60, TimeUnit.SECONDS); |
| 288 | 300 | ||
| 289 | GpsDataLoaderThread.setFlag(-1); | 301 | GpsDataLoaderThread.setFlag(-1); |
| 290 | /** 线调业务 */ | 302 | /** 线调业务 */ |
src/main/java/com/bsth/controller/lg_travel/RegionConterller.java
0 → 100644
| 1 | +package com.bsth.controller.lg_travel; | ||
| 2 | + | ||
| 3 | +import com.bsth.controller.BaseController; | ||
| 4 | +import com.bsth.entity.lg_travel.Region; | ||
| 5 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | +import org.springframework.web.bind.annotation.RestController; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 区域 | ||
| 10 | + */ | ||
| 11 | + | ||
| 12 | +@RestController | ||
| 13 | +@RequestMapping("region") | ||
| 14 | +public class RegionConterller extends BaseController<Region, Long> { | ||
| 15 | + | ||
| 16 | + | ||
| 17 | +} |
src/main/java/com/bsth/controller/lg_travel/RegionLineCarConterller.java
0 → 100644
| 1 | +package com.bsth.controller.lg_travel; | ||
| 2 | + | ||
| 3 | +import com.bsth.controller.BaseController; | ||
| 4 | +import com.bsth.entity.lg_travel.RegionLineCar; | ||
| 5 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 6 | +import org.springframework.web.bind.annotation.RestController; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 区域 | ||
| 10 | + */ | ||
| 11 | + | ||
| 12 | +@RestController | ||
| 13 | +@RequestMapping("regionLineCar") | ||
| 14 | +public class RegionLineCarConterller extends BaseController<RegionLineCar, Long> { | ||
| 15 | + | ||
| 16 | + | ||
| 17 | +} |
src/main/java/com/bsth/controller/oil/JdlController.java
| @@ -2,21 +2,22 @@ package com.bsth.controller.oil; | @@ -2,21 +2,22 @@ package com.bsth.controller.oil; | ||
| 2 | 2 | ||
| 3 | import java.io.File; | 3 | import java.io.File; |
| 4 | import java.util.HashMap; | 4 | import java.util.HashMap; |
| 5 | +import java.util.List; | ||
| 5 | import java.util.Map; | 6 | import java.util.Map; |
| 6 | 7 | ||
| 8 | +import javax.servlet.http.HttpServletResponse; | ||
| 9 | + | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.web.bind.annotation.RequestMapping; | 11 | import org.springframework.web.bind.annotation.RequestMapping; |
| 9 | import org.springframework.web.bind.annotation.RequestMethod; | 12 | import org.springframework.web.bind.annotation.RequestMethod; |
| 10 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 11 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 12 | import org.springframework.web.multipart.MultipartFile; | 15 | import org.springframework.web.multipart.MultipartFile; |
| 13 | -import org.springframework.web.servlet.ModelAndView; | ||
| 14 | 16 | ||
| 15 | -import com.alibaba.fastjson.JSON; | ||
| 16 | -import com.alibaba.fastjson.JSONArray; | ||
| 17 | -import com.alibaba.fastjson.JSONObject; | ||
| 18 | import com.bsth.controller.BaseController; | 17 | import com.bsth.controller.BaseController; |
| 19 | import com.bsth.entity.oil.Jdl; | 18 | import com.bsth.entity.oil.Jdl; |
| 19 | +import com.bsth.entity.oil.JdlConnector; | ||
| 20 | +import com.bsth.entity.oil.JdlReception; | ||
| 20 | import com.bsth.service.oil.JdlService; | 21 | import com.bsth.service.oil.JdlService; |
| 21 | import com.google.common.io.Files; | 22 | import com.google.common.io.Files; |
| 22 | 23 | ||
| @@ -46,9 +47,87 @@ public class JdlController extends BaseController<Jdl, Integer> { | @@ -46,9 +47,87 @@ public class JdlController extends BaseController<Jdl, Integer> { | ||
| 46 | return "{\"result\":" + "\""+result+"\"}"; | 47 | return "{\"result\":" + "\""+result+"\"}"; |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 50 | + /** 24年12月工单更新电量导入 */ | ||
| 51 | + @RequestMapping(value = "/uploadFile_2412",method = RequestMethod.POST) | ||
| 52 | + public String uploadFile_2412(MultipartFile file, String gsbm_, String gsName, | ||
| 53 | + String fgsbm_, String fgsName, String stationName) throws Exception{ | ||
| 54 | + File newFile = new File( | ||
| 55 | + getDataImportClasspath() + File.separator + | ||
| 56 | + file.getOriginalFilename()); | ||
| 57 | + Files.write(file.getBytes(), newFile); | ||
| 58 | + | ||
| 59 | + String result = jdlService.importExcel_2412(newFile, gsbm_, gsName, fgsbm_, fgsName, stationName); | ||
| 60 | + return "{\"result\":" + "\""+result+"\"}"; | ||
| 61 | + } | ||
| 62 | + | ||
| 49 | @RequestMapping(value = "/query",method = RequestMethod.GET) | 63 | @RequestMapping(value = "/query",method = RequestMethod.GET) |
| 50 | public Map<String, Object> query(@RequestParam Map<String, Object> map) throws Exception{ | 64 | public Map<String, Object> query(@RequestParam Map<String, Object> map) throws Exception{ |
| 51 | return jdlService.query(map); | 65 | return jdlService.query(map); |
| 52 | } | 66 | } |
| 53 | 67 | ||
| 68 | + @RequestMapping(value = "/query_2412",method = RequestMethod.GET) | ||
| 69 | + public Map<String, Object> query_2412(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 70 | + return jdlService.query_2412(map); | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + @RequestMapping(value = "/queryJdlReception",method = RequestMethod.GET) | ||
| 74 | + public List<JdlReception> queryJdlReception(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 75 | + return jdlService.queryJdlReception(map); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + @RequestMapping(value = "/queryJdlReceptionBatch",method = RequestMethod.GET) | ||
| 79 | + public Map<String, Object> queryJdlReceptionBatch(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 80 | + return jdlService.queryJdlReceptionBatch(map); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + @RequestMapping(value = "/queryJdlReceptionBatchData",method = RequestMethod.GET) | ||
| 84 | + public List<JdlReception> queryJdlReceptionBatchData(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 85 | + return jdlService.queryJdlReceptionBatchData(map); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + @RequestMapping(value = "/deleteJdlReceptionBatch",method = RequestMethod.POST) | ||
| 89 | + public Map<String, Object> deleteJdlReceptionBatch(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 90 | + return jdlService.deleteJdlReceptionBatch(map); | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + @RequestMapping(value = "/updateJdlReceptionBatch",method = RequestMethod.POST) | ||
| 94 | + public Map<String, Object> updateJdlReceptionBatch(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 95 | + return jdlService.updateJdlReceptionBatch(map); | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + @RequestMapping(value = "/downloadJdlReceptionImportFile",method = RequestMethod.GET) | ||
| 99 | + public void downloadJdlReceptionImportFile(@RequestParam Map<String, Object> map, HttpServletResponse response) throws Exception{ | ||
| 100 | + jdlService.downloadJdlReceptionImportFile(map, response); | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + @RequestMapping(value = "/queryJdlConnector",method = RequestMethod.GET) | ||
| 104 | + public List<JdlConnector> queryJdlConnector(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 105 | + return jdlService.queryJdlConnector(map); | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + @RequestMapping(value = "/queryJdlConnectorById",method = RequestMethod.GET) | ||
| 109 | + public JdlConnector queryJdlConnectorById(@RequestParam int id) throws Exception{ | ||
| 110 | + return jdlService.queryJdlConnectorById(id); | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + @RequestMapping(value = "/queryJdlStationName",method = RequestMethod.GET) | ||
| 114 | + public List<String> queryJdlStationName() throws Exception{ | ||
| 115 | + return jdlService.queryJdlStationName(); | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + @RequestMapping(value = "/addJdlConnector",method = RequestMethod.POST) | ||
| 119 | + public Map<String, Object> addJdlConnector(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 120 | + return jdlService.addJdlConnector(map); | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + @RequestMapping(value = "/deleteJdlConnector",method = RequestMethod.POST) | ||
| 124 | + public Map<String, Object> deleteJdlConnector(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 125 | + return jdlService.deleteJdlConnector(map); | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + @RequestMapping(value = "/updateJdlConnector",method = RequestMethod.POST) | ||
| 129 | + public Map<String, Object> updateJdlConnector(@RequestParam Map<String, Object> map) throws Exception{ | ||
| 130 | + return jdlService.updateJdlConnector(map); | ||
| 131 | + } | ||
| 132 | + | ||
| 54 | } | 133 | } |
src/main/java/com/bsth/controller/realcontrol/ServiceDataInterface.java
| @@ -87,6 +87,7 @@ public class ServiceDataInterface { | @@ -87,6 +87,7 @@ public class ServiceDataInterface { | ||
| 87 | if (null == sch) | 87 | if (null == sch) |
| 88 | continue; | 88 | continue; |
| 89 | map = new HashMap<>(); | 89 | map = new HashMap<>(); |
| 90 | + map.put("id", sch.getId()); | ||
| 90 | map.put("clZbh", sch.getClZbh()); | 91 | map.put("clZbh", sch.getClZbh()); |
| 91 | map.put("jGh", sch.getjGh()); | 92 | map.put("jGh", sch.getjGh()); |
| 92 | map.put("jName", sch.getjName()); | 93 | map.put("jName", sch.getjName()); |
src/main/java/com/bsth/controller/zndd/LoggerZnddController.java
| @@ -54,4 +54,15 @@ public class LoggerZnddController extends BaseController<LoggerZndd, Integer> { | @@ -54,4 +54,15 @@ public class LoggerZnddController extends BaseController<LoggerZndd, Integer> { | ||
| 54 | public Map<String, Object> schTZSF(String line,String date,String endDate,String changType,String type){ | 54 | public Map<String, Object> schTZSF(String line,String date,String endDate,String changType,String type){ |
| 55 | return loggerZnddService.schTZSF(line,date,endDate,changType,type); | 55 | return loggerZnddService.schTZSF(line,date,endDate,changType,type); |
| 56 | } | 56 | } |
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * 获取当前方向下的下一个班次 | ||
| 60 | + * @param id | ||
| 61 | + * @return | ||
| 62 | + */ | ||
| 63 | + @RequestMapping(value = "nextSch/{id}", method = RequestMethod.GET) | ||
| 64 | + public ScheduleRealInfo nextSch(@PathVariable("id") Long id){ | ||
| 65 | + return loggerZnddService.nextSch(id); | ||
| 66 | + | ||
| 67 | + } | ||
| 57 | } | 68 | } |
src/main/java/com/bsth/controller/zndd/ZnddStatusController.java
| @@ -7,6 +7,7 @@ import com.bsth.service.zndd.ZnddStatusService; | @@ -7,6 +7,7 @@ import com.bsth.service.zndd.ZnddStatusService; | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.web.bind.annotation.RequestMapping; | 8 | import org.springframework.web.bind.annotation.RequestMapping; |
| 9 | import org.springframework.web.bind.annotation.RequestMethod; | 9 | import org.springframework.web.bind.annotation.RequestMethod; |
| 10 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 10 | import org.springframework.web.bind.annotation.RestController; | 11 | import org.springframework.web.bind.annotation.RestController; |
| 11 | 12 | ||
| 12 | import java.util.HashMap; | 13 | import java.util.HashMap; |
| @@ -34,4 +35,21 @@ public class ZnddStatusController extends BaseController<znddStatus, Integer> { | @@ -34,4 +35,21 @@ public class ZnddStatusController extends BaseController<znddStatus, Integer> { | ||
| 34 | return result; | 35 | return result; |
| 35 | } | 36 | } |
| 36 | 37 | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + *新增类型 | ||
| 41 | + * */ | ||
| 42 | + @RequestMapping(value = "/update", method = RequestMethod.POST) | ||
| 43 | + public Map<String, Object> update(@RequestParam Integer id, @RequestParam Integer openStatus) { | ||
| 44 | + Map<String, Object> result = new HashMap<>(); | ||
| 45 | + try { | ||
| 46 | + znddStatusService.update(id,openStatus); | ||
| 47 | + result.put("status", ResponseCode.SUCCESS); | ||
| 48 | + } catch (Exception e) { | ||
| 49 | + result.put("status", ResponseCode.ERROR); | ||
| 50 | + result.put("msg", e.getMessage()); | ||
| 51 | + } | ||
| 52 | + return result; | ||
| 53 | + } | ||
| 54 | + | ||
| 37 | } | 55 | } |
src/main/java/com/bsth/data/car_out_info/CarOutInfoHandler.java
| @@ -117,8 +117,8 @@ public class CarOutInfoHandler { | @@ -117,8 +117,8 @@ public class CarOutInfoHandler { | ||
| 117 | //删除 | 117 | //删除 |
| 118 | jdbcTemplate.update("delete from bsth_t_clfcxxb"); | 118 | jdbcTemplate.update("delete from bsth_t_clfcxxb"); |
| 119 | //重新写入 | 119 | //重新写入 |
| 120 | - jdbcTemplate.batchUpdate("insert into bsth_t_clfcxxb(rq, line_code, line_name, lp_name, lp_sn, dfsj, nbbm, cph, bc_type, end_station_name, updown, jGh, jName, remarks, sn)" + | ||
| 121 | - " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new BatchPreparedStatementSetter() { | 120 | + jdbcTemplate.batchUpdate("insert into bsth_t_clfcxxb(rq, line_code, line_name, lp_name, lp_sn, dfsj, nbbm, cph, bc_type, end_station_name, updown, jGh, jName, remarks, sn, sch)" + |
| 121 | + " VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new BatchPreparedStatementSetter() { | ||
| 122 | @Override | 122 | @Override |
| 123 | public void setValues(PreparedStatement ps, int i) throws SQLException { | 123 | public void setValues(PreparedStatement ps, int i) throws SQLException { |
| 124 | ScheduleRealInfo sch = pstList.get(i); | 124 | ScheduleRealInfo sch = pstList.get(i); |
| @@ -137,6 +137,7 @@ public class CarOutInfoHandler { | @@ -137,6 +137,7 @@ public class CarOutInfoHandler { | ||
| 137 | ps.setString(13, sch.getjName()); | 137 | ps.setString(13, sch.getjName()); |
| 138 | ps.setString(14, sch.getRemarks()); | 138 | ps.setString(14, sch.getRemarks()); |
| 139 | ps.setInt(15, sch.getFcpSn()); | 139 | ps.setInt(15, sch.getFcpSn()); |
| 140 | + ps.setLong(16, sch.getId()); | ||
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | @Override | 143 | @Override |
src/main/java/com/bsth/data/kl/KlData.java
| @@ -6,9 +6,10 @@ import org.slf4j.Logger; | @@ -6,9 +6,10 @@ import org.slf4j.Logger; | ||
| 6 | import org.slf4j.LoggerFactory; | 6 | import org.slf4j.LoggerFactory; |
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.beans.factory.annotation.Value; | 8 | import org.springframework.beans.factory.annotation.Value; |
| 9 | -import org.springframework.scheduling.annotation.Scheduled; | ||
| 10 | import org.springframework.stereotype.Component; | 9 | import org.springframework.stereotype.Component; |
| 11 | -import java.util.*; | 10 | + |
| 11 | +import java.util.HashMap; | ||
| 12 | +import java.util.Map; | ||
| 12 | 13 | ||
| 13 | /** | 14 | /** |
| 14 | * @author ym | 15 | * @author ym |
| @@ -30,7 +31,7 @@ public class KlData { | @@ -30,7 +31,7 @@ public class KlData { | ||
| 30 | @Value("${passengerFlow.url}") | 31 | @Value("${passengerFlow.url}") |
| 31 | private String url; | 32 | private String url; |
| 32 | 33 | ||
| 33 | - @Scheduled(cron = "0/10 * * * * ?") | 34 | + /* @Scheduled(cron = "0/10 * * * * ?") |
| 34 | public void loadKl() { | 35 | public void loadKl() { |
| 35 | Map<String,Kl> map= new HashMap<>(); | 36 | Map<String,Kl> map= new HashMap<>(); |
| 36 | List<Kl> list = klService.loadKl(); | 37 | List<Kl> list = klService.loadKl(); |
| @@ -40,7 +41,7 @@ public class KlData { | @@ -40,7 +41,7 @@ public class KlData { | ||
| 40 | map.put(kl.getDeviceId(),kl); | 41 | map.put(kl.getDeviceId(),kl); |
| 41 | } | 42 | } |
| 42 | KlData =map; | 43 | KlData =map; |
| 43 | - } | 44 | + }*/ |
| 44 | 45 | ||
| 45 | public static Kl getKl(String deviceId){ | 46 | public static Kl getKl(String deviceId){ |
| 46 | //return KlData.get( KlData.keySet().toArray()[0]); | 47 | //return KlData.get( KlData.keySet().toArray()[0]); |
src/main/java/com/bsth/data/pilot80/PilotReport.java
| 1 | package com.bsth.data.pilot80; | 1 | package com.bsth.data.pilot80; |
| 2 | 2 | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 3 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
| 4 | import com.bsth.data.BasicData; | 5 | import com.bsth.data.BasicData; |
| 5 | import com.bsth.data.LineConfigData; | 6 | import com.bsth.data.LineConfigData; |
| @@ -23,7 +24,10 @@ import org.slf4j.LoggerFactory; | @@ -23,7 +24,10 @@ import org.slf4j.LoggerFactory; | ||
| 23 | import org.springframework.beans.factory.annotation.Autowired; | 24 | import org.springframework.beans.factory.annotation.Autowired; |
| 24 | import org.springframework.stereotype.Component; | 25 | import org.springframework.stereotype.Component; |
| 25 | 26 | ||
| 26 | -import java.util.*; | 27 | +import java.util.ArrayList; |
| 28 | +import java.util.Collection; | ||
| 29 | +import java.util.Date; | ||
| 30 | +import java.util.List; | ||
| 27 | import java.util.concurrent.ConcurrentHashMap; | 31 | import java.util.concurrent.ConcurrentHashMap; |
| 28 | 32 | ||
| 29 | /** | 33 | /** |
| @@ -102,21 +106,11 @@ public class PilotReport { | @@ -102,21 +106,11 @@ public class PilotReport { | ||
| 102 | } | 106 | } |
| 103 | break; | 107 | break; |
| 104 | //报警请求 | 108 | //报警请求 |
| 105 | - case 0x10: | ||
| 106 | - try { | ||
| 107 | - String url = systemParamService.getValue("url.yjbj")+"dataDockingApi/accident/saveAccident?"; | ||
| 108 | - url = url + "accidentTime=" + new Date().getTime() + "&nbbm=" + nbbm; | ||
| 109 | - logger.info("url===="+url); | ||
| 110 | - String res = HttpClientUtils.get(url).toString(); | ||
| 111 | - JSONObject jsonObject = JSONObject.parseObject(res); | ||
| 112 | - if ((int) jsonObject.get("code") == 200) { | ||
| 113 | - logger.info("报警请求成功"); | ||
| 114 | - }else { | ||
| 115 | - logger.info("报警请求失败"); | ||
| 116 | - } | ||
| 117 | - }catch (Exception e){ | ||
| 118 | - logger.info("报警请求异常"); | ||
| 119 | - } | 109 | + case 0x21: |
| 110 | + case 0x22: | ||
| 111 | + case 0x23: | ||
| 112 | + case 0x24: | ||
| 113 | + yjbj(nbbm,d80); | ||
| 120 | break; | 114 | break; |
| 121 | } | 115 | } |
| 122 | 116 | ||
| @@ -132,6 +126,39 @@ public class PilotReport { | @@ -132,6 +126,39 @@ public class PilotReport { | ||
| 132 | } | 126 | } |
| 133 | } | 127 | } |
| 134 | 128 | ||
| 129 | + public void yjbj(String nbbm,D80 d80){ | ||
| 130 | + try { | ||
| 131 | + ScheduleRealInfo sch = null; | ||
| 132 | + | ||
| 133 | + if (d80.getData().getStopNo() != null && !d80.getData().getStopNo().equals("")){ | ||
| 134 | + d80.setStationName(BasicData.stationCode2NameMap.get(d80.getData().getStopNo())); | ||
| 135 | + } | ||
| 136 | + if (d80.getSchId() != null){ | ||
| 137 | + sch = dayOfSchedule.get(d80.getSchId()); | ||
| 138 | + Long nextschid = dayOfSchedule.nextByLp(sch).getId(); | ||
| 139 | + d80.setNextschId(nextschid); | ||
| 140 | + } | ||
| 141 | + String url = systemParamService.getValue("url.yjbj")+"dataDockingApi/accident/saveAccident?"; | ||
| 142 | + url = url + "accidentTime=" + new Date().getTime() + "&nbbm=" + nbbm +"&requestCode=" +d80.getData().getRequestCode() | ||
| 143 | + +"&lon=" +d80.getData().getLon()+"&lat="+d80.getData().getLat(); | ||
| 144 | + if (sch != null){ | ||
| 145 | + url = url + "&lineName=" +sch.getXlName()+"&jsy=" +sch.getjGh()+"&jsName=" +sch.getjName(); | ||
| 146 | + } | ||
| 147 | + logger.info("url===="+url); | ||
| 148 | + StringBuilder sb = HttpClientUtils.get(url); | ||
| 149 | + | ||
| 150 | + | ||
| 151 | + JSONObject jsonObject = JSON.parseObject(sb.toString()); | ||
| 152 | + if ((int) jsonObject.get("code") == 200) { | ||
| 153 | + logger.info("报警请求成功=" + jsonObject.get("msg")); | ||
| 154 | + }else { | ||
| 155 | + logger.info("报警请求失败="+ jsonObject.get("msg")); | ||
| 156 | + } | ||
| 157 | + }catch (Exception e){ | ||
| 158 | + logger.info("报警请求异常",e); | ||
| 159 | + } | ||
| 160 | + } | ||
| 161 | + | ||
| 135 | public void report(DC0_A4 c0a4) { | 162 | public void report(DC0_A4 c0a4) { |
| 136 | String deviceId = c0a4.getData().getDeviceId(); | 163 | String deviceId = c0a4.getData().getDeviceId(); |
| 137 | if (StringUtils.isNotEmpty(deviceId)) | 164 | if (StringUtils.isNotEmpty(deviceId)) |
src/main/java/com/bsth/data/zndd/AutomaticSch.java
| 1 | package com.bsth.data.zndd; | 1 | package com.bsth.data.zndd; |
| 2 | 2 | ||
| 3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 4 | +import com.alibaba.fastjson.JSONArray; | ||
| 4 | import com.alibaba.fastjson.JSONObject; | 5 | import com.alibaba.fastjson.JSONObject; |
| 5 | import com.alibaba.fastjson.TypeReference; | 6 | import com.alibaba.fastjson.TypeReference; |
| 6 | import com.bsth.data.BasicData; | 7 | import com.bsth.data.BasicData; |
| @@ -8,18 +9,24 @@ import com.bsth.data.adjg.domain.LargeGap; | @@ -8,18 +9,24 @@ import com.bsth.data.adjg.domain.LargeGap; | ||
| 8 | import com.bsth.data.directive.DayOfDirectives; | 9 | import com.bsth.data.directive.DayOfDirectives; |
| 9 | import com.bsth.data.gpsdata_v2.GpsRealData; | 10 | import com.bsth.data.gpsdata_v2.GpsRealData; |
| 10 | import com.bsth.data.gpsdata_v2.entity.GpsEntity; | 11 | import com.bsth.data.gpsdata_v2.entity.GpsEntity; |
| 12 | +import com.bsth.data.gpsdata_v2.rfid.RfidHttpLoader; | ||
| 13 | +import com.bsth.data.gpsdata_v2.rfid.entity.RfidInfo; | ||
| 11 | import com.bsth.data.schedule.DayOfSchedule; | 14 | import com.bsth.data.schedule.DayOfSchedule; |
| 12 | import com.bsth.data.schedule.ScheduleComparator; | 15 | import com.bsth.data.schedule.ScheduleComparator; |
| 16 | +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo; | ||
| 17 | +import com.bsth.data.schedule.edit_logs.service.SchEditInfoService; | ||
| 13 | import com.bsth.data.schedule.late_adjust.LateAdjustHandle; | 18 | import com.bsth.data.schedule.late_adjust.LateAdjustHandle; |
| 14 | import com.bsth.entity.directive.D60; | 19 | import com.bsth.entity.directive.D60; |
| 15 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 20 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 21 | +import com.bsth.entity.zndd.StationPeopleLogger; | ||
| 16 | import com.bsth.entity.zndd.ZnddYuAn; | 22 | import com.bsth.entity.zndd.ZnddYuAn; |
| 17 | import com.bsth.repository.StationRouteRepository; | 23 | import com.bsth.repository.StationRouteRepository; |
| 18 | import com.bsth.service.directive.DirectiveService; | 24 | import com.bsth.service.directive.DirectiveService; |
| 19 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 25 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 26 | +import com.bsth.service.zndd.ZnddLoggerService; | ||
| 20 | import com.bsth.service.zndd.ZnddYuAnService; | 27 | import com.bsth.service.zndd.ZnddYuAnService; |
| 28 | +import com.bsth.util.DateUtils; | ||
| 21 | import com.bsth.util.HttpClientUtils; | 29 | import com.bsth.util.HttpClientUtils; |
| 22 | -import com.google.gson.Gson; | ||
| 23 | import org.apache.commons.lang3.StringUtils; | 30 | import org.apache.commons.lang3.StringUtils; |
| 24 | import org.slf4j.Logger; | 31 | import org.slf4j.Logger; |
| 25 | import org.slf4j.LoggerFactory; | 32 | import org.slf4j.LoggerFactory; |
| @@ -29,8 +36,6 @@ import org.springframework.stereotype.Component; | @@ -29,8 +36,6 @@ import org.springframework.stereotype.Component; | ||
| 29 | import java.text.ParseException; | 36 | import java.text.ParseException; |
| 30 | import java.text.SimpleDateFormat; | 37 | import java.text.SimpleDateFormat; |
| 31 | import java.util.*; | 38 | import java.util.*; |
| 32 | -import java.util.concurrent.ConcurrentHashMap; | ||
| 33 | -import java.util.concurrent.ConcurrentMap; | ||
| 34 | import java.util.regex.Matcher; | 39 | import java.util.regex.Matcher; |
| 35 | import java.util.regex.Pattern; | 40 | import java.util.regex.Pattern; |
| 36 | 41 | ||
| @@ -62,38 +67,77 @@ public class AutomaticSch { | @@ -62,38 +67,77 @@ public class AutomaticSch { | ||
| 62 | @Autowired | 67 | @Autowired |
| 63 | ZnddYuAnService znddYuAnService; | 68 | ZnddYuAnService znddYuAnService; |
| 64 | 69 | ||
| 65 | - Queue<Map> queue = new LinkedList<>(); | 70 | + @Autowired |
| 71 | + ZnddLoggerService znddLoggerService; | ||
| 72 | + @Autowired | ||
| 73 | + SchEditInfoService schEditInfoService; | ||
| 74 | + | ||
| 66 | 75 | ||
| 67 | private static SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm"); | 76 | private static SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm"); |
| 77 | + private static SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 68 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 78 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 69 | 79 | ||
| 70 | private static Comparator<ScheduleRealInfo> cpm = new ScheduleComparator.DFSJ2(); | 80 | private static Comparator<ScheduleRealInfo> cpm = new ScheduleComparator.DFSJ2(); |
| 71 | private Map<String,Long> drivreMap =new HashMap<>(); //自动重发map | 81 | private Map<String,Long> drivreMap =new HashMap<>(); //自动重发map |
| 72 | - // 当日60指令缓存 | ||
| 73 | - private ConcurrentMap<Integer, D60> d60Map = new ConcurrentHashMap<>();//d60map | ||
| 74 | 82 | ||
| 75 | - String urldkl = "http://10.10.200.202:5580/monitor/api/getMonitorInfoByDay?key=1&solt=1111&t=1&dayStr=2024-10-23"; //大间隔接口 | 83 | + String urldkl = "http://10.10.200.202:5580/monitor/api/getMonitorInfoByDay?key=1&solt=1111&t=1&dayStr="; //大间隔接口 |
| 76 | 84 | ||
| 77 | //http://10.10.200.201:8083/wxk-prod-api/service-api/lggj/schedule/drByInfo 维修接口 | 85 | //http://10.10.200.201:8083/wxk-prod-api/service-api/lggj/schedule/drByInfo 维修接口 |
| 78 | - | ||
| 79 | - private Map<String,Long> SFMAP = new HashMap<>(); | 86 | + String urldkls = "http://10.10.200.140:13089/bsth_passengerflow/klbus/currentInsideNum.do"; //满载接口 |
| 87 | + private Map<Long,Long> SFMAP = new HashMap<>(); | ||
| 80 | 88 | ||
| 81 | //满载 | 89 | //满载 |
| 82 | public void mz(){ | 90 | public void mz(){ |
| 83 | try { | 91 | try { |
| 92 | + StringBuilder sb = HttpClientUtils.get(urldkls); | ||
| 93 | + List<Object> list = JSONArray.parseArray(String.valueOf(sb)); | ||
| 94 | + for (Object b :list){ | ||
| 95 | + Map m = (Map) b; | ||
| 96 | + Integer num = Integer.parseInt(m.get("inside_num").toString()); | ||
| 97 | + | ||
| 98 | + int count= getPenum("MZ","0"); | ||
| 99 | + if(num < count){//大间隔阈值 检测到超过15个人的时候推送 | ||
| 100 | + return; | ||
| 101 | + } | ||
| 102 | + ScheduleRealInfo sr = dayOfSchedule.executeCurr(m.get("nbbm").toString()); //查询当前车辆执行班次 | ||
| 103 | + GpsEntity gps = gpsRealData.get(m.get("sbbh").toString()); | ||
| 104 | + Map msp = new HashMap(); | ||
| 105 | + msp.put("lineCode",m.get("xlbm")); | ||
| 106 | + msp.put("lineName",m.get("XLMC")); | ||
| 107 | + msp.put("stationName",gps.getStationName()); | ||
| 108 | + msp.put("rqStr",sdfMonth.format(new Date())); | ||
| 109 | + msp.put("rq",sdfHHmm.format(new Date())); | ||
| 110 | + msp.put("type","MZ"); | ||
| 111 | + msp.put("xlDir",gps.getUpDown()); | ||
| 112 | + msp.put("fcsj",""); | ||
| 113 | + msp.put("clzbh",gps.getNbbm()); | ||
| 114 | + msp.put("numType",num); | ||
| 115 | + if (sr != null ) | ||
| 116 | + msp.put("xlDir",sr.getXlDir()); | ||
| 117 | + | ||
| 118 | + if (gps != null ) | ||
| 119 | + msp.put("station",gps.getStation().getCode()); | ||
| 120 | + | ||
| 121 | + ts(msp); | ||
| 122 | + LogerWait("满载",sr); | ||
| 123 | + } | ||
| 84 | 124 | ||
| 85 | - List<ScheduleRealInfo> sr = dayOfSchedule.findByBcType("W9G-041","normal"); | 125 | + //测试使用 |
| 126 | + /* List<ScheduleRealInfo> sr = dayOfSchedule.findByBcType("W9G-041","normal"); | ||
| 86 | ts(addStationPeople(sr.get(5), "MZ", 0L));//第二种 设备未离线 出站时间内未出站 | 127 | ts(addStationPeople(sr.get(5), "MZ", 0L));//第二种 设备未离线 出站时间内未出站 |
| 128 | + | ||
| 129 | + String chartStr = JSON.toJSONString(sr.get(5)); | ||
| 130 | + logger.info("满载--"+chartStr);*/ | ||
| 87 | } | 131 | } |
| 88 | catch (Exception e){ | 132 | catch (Exception e){ |
| 89 | - logger.error("满载------------------",e); | 133 | + logger.error("满载检测接口出错------------------",e); |
| 90 | } | 134 | } |
| 91 | } | 135 | } |
| 92 | 136 | ||
| 93 | //大间隔的情况 | 137 | //大间隔的情况 |
| 94 | public void dfTz(int k ){ | 138 | public void dfTz(int k ){ |
| 95 | try{ | 139 | try{ |
| 96 | - StringBuilder sb = HttpClientUtils.get(urldkl /*+ sdfMonth.format(new Date())*/); | 140 | + StringBuilder sb = HttpClientUtils.get(urldkl + sdfMonth.format(new Date())); |
| 97 | if (sb == null) | 141 | if (sb == null) |
| 98 | return; | 142 | return; |
| 99 | JSONObject obj = JSON.parseObject(sb.toString()); | 143 | JSONObject obj = JSON.parseObject(sb.toString()); |
| @@ -106,44 +150,39 @@ public class AutomaticSch { | @@ -106,44 +150,39 @@ public class AutomaticSch { | ||
| 106 | }else { | 150 | }else { |
| 107 | continue; | 151 | continue; |
| 108 | } | 152 | } |
| 109 | - if (k == 0 ){ | ||
| 110 | - if(lg.getlGType() == 0){ | ||
| 111 | - ts(ConvertDJK(lg,sch,"FCJG")); | 153 | + Long t0 = new Date().getTime() - (1000 * 60 * 2); |
| 154 | + Long t1 = t0 - (1000 * 60 * 2); | ||
| 155 | + Long t2 = t0 + (1000 * 60 * 2); | ||
| 156 | + //判断当前间隔是否出现过并且在当前时间段内 大于2分钟 小于1分钟的时间之内 | ||
| 157 | + if (SFMAP.get(lg.getId()) == null) { | ||
| 158 | + if (k == 0) { | ||
| 159 | + if (lg.getlGType() == 0) { | ||
| 160 | + ts(ConvertDJK(lg, sch, "FCJG")); | ||
| 161 | + SFMAP.put(lg.getId(), lg.getTsTime()); | ||
| 162 | + LogerWait("发车大间隔",sch); | ||
| 163 | + } | ||
| 164 | + } else { | ||
| 165 | + if (lg.getlGType() != 0) { | ||
| 166 | + ts(ConvertDJK(lg, sch, "DJG")); | ||
| 167 | + SFMAP.put(lg.getId(), lg.getTsTime()); | ||
| 168 | + LogerWait("行车大间隔",sch); | ||
| 169 | + } | ||
| 112 | } | 170 | } |
| 113 | - }else { | ||
| 114 | - if(lg.getlGType() != 0){ | ||
| 115 | - ts(ConvertDJK(lg,sch,"DJG")); | 171 | + } |
| 172 | + //大于10000条的时候开始清理map | ||
| 173 | + if (SFMAP.size() > 10000){ | ||
| 174 | + for (Map.Entry<Long, Long> m : SFMAP.entrySet()){ | ||
| 175 | + if(m.getValue() < DateUtils.getTimestamp()){ | ||
| 176 | + SFMAP.remove(m.getKey()); | ||
| 177 | + } | ||
| 116 | } | 178 | } |
| 117 | } | 179 | } |
| 118 | - | ||
| 119 | } | 180 | } |
| 120 | 181 | ||
| 121 | }catch (Exception e){ | 182 | }catch (Exception e){ |
| 122 | logger.error("大间隔推送失败------------------",e); | 183 | logger.error("大间隔推送失败------------------",e); |
| 123 | } | 184 | } |
| 124 | } | 185 | } |
| 125 | - //发现大客流 -> 大客流情况 ->处置大客流 | ||
| 126 | - public void Dkl(){ | ||
| 127 | - //推送 | ||
| 128 | - | ||
| 129 | - try{ | ||
| 130 | - Map m = queue.poll(); | ||
| 131 | - if (m != null) { | ||
| 132 | - if (Integer.valueOf(m.get("num").toString()) > 15) { | ||
| 133 | - //超过10的时候 判断为大客流 | ||
| 134 | - ts(ConvertDKL(m)); | ||
| 135 | - } | ||
| 136 | - } | ||
| 137 | - | ||
| 138 | - ScheduleRealInfo sr = dayOfSchedule.findByNbbm("W8A-027").get(0); | ||
| 139 | - ts(addStationPeople(sr, "DKL", 0L));//大客流 | ||
| 140 | - | ||
| 141 | - | ||
| 142 | - }catch (Exception e){ | ||
| 143 | - logger.error("大客流推送失败------------------",e); | ||
| 144 | - } | ||
| 145 | - | ||
| 146 | - } | ||
| 147 | 186 | ||
| 148 | //实发未发检测 -- 车辆GPS掉线的情况下,车辆该出站了 | 187 | //实发未发检测 -- 车辆GPS掉线的情况下,车辆该出站了 |
| 149 | /** | 188 | /** |
| @@ -175,18 +214,33 @@ public class AutomaticSch { | @@ -175,18 +214,33 @@ public class AutomaticSch { | ||
| 175 | //1。一直没收到gps | 214 | //1。一直没收到gps |
| 176 | //2.gps长时间离线的情况下 | 215 | //2.gps长时间离线的情况下 |
| 177 | //3.人为调整过的都跳过 | 216 | //3.人为调整过的都跳过 |
| 178 | - if (gps == null || gps.getTimestamp() + (1000 * 60 * 3) < time || (gps.getAbnormalStatus() != null && gps.getAbnormalStatus().equals("offline"))) { | ||
| 179 | - ts(addStationPeople(sr, "SFTZ_1", 0L)); | ||
| 180 | - Gson gson = new Gson(); | ||
| 181 | - String chartStr = gson.toJsonTree(sr).toString(); | ||
| 182 | - logger.info("实发调整--" + chartStr); | 217 | + if (gps == null || gps.getTimestamp() + (1000 * 60 * 5) < time || (gps.getAbnormalStatus() != null && gps.getAbnormalStatus().equals("offline"))) { |
| 218 | + String sfsj = null; | ||
| 219 | + //rfid 判断 | ||
| 220 | + List<RfidInfo> list = RfidHttpLoader.load(); | ||
| 221 | + for (RfidInfo ri : list) { | ||
| 222 | + if (ri.getRecogTime() != null && ri.getRecogTime().getTime() > System.currentTimeMillis() - 300000) { | ||
| 223 | + //最新的rfid是出站状态 | ||
| 224 | + if (ri.getNbbm().equals(sr.getClZbh())){ | ||
| 225 | + sfsj = sdfHHmm.format(ri.getInoutStation().getTimestamp()); | ||
| 226 | + } | ||
| 227 | + if (ri.getNbbm().equals(sr.getClZbh()) && ri.getInoutStation().getInout() == 0) { | ||
| 228 | + sfsj = sdfHHmm.format(ri.getInoutStation().getTimestamp()); | ||
| 229 | + } | ||
| 230 | + } | ||
| 231 | + } | ||
| 232 | + if (sfsj != null){ | ||
| 233 | + sr.setFcsjActual(sfsj); | ||
| 234 | + ts(addStationPeople(sr, "SFTZ_1", 0L)); | ||
| 235 | + LogerWait("实发调整",sr); | ||
| 236 | + } | ||
| 183 | } | 237 | } |
| 184 | } | 238 | } |
| 185 | } | 239 | } |
| 186 | } | 240 | } |
| 187 | 241 | ||
| 188 | } | 242 | } |
| 189 | - }catch (Exception e){ | 243 | + }catch (Throwable e){ |
| 190 | logger.error("自动调度,实发未发推送失败---",e); | 244 | logger.error("自动调度,实发未发推送失败---",e); |
| 191 | } | 245 | } |
| 192 | logger.warn("实发未发扫描结束"); | 246 | logger.warn("实发未发扫描结束"); |
| @@ -196,6 +250,7 @@ public class AutomaticSch { | @@ -196,6 +250,7 @@ public class AutomaticSch { | ||
| 196 | public void sfCX(){ | 250 | public void sfCX(){ |
| 197 | //查询所有班次 | 251 | //查询所有班次 |
| 198 | //remark 人工干预过的的不检测 | 252 | //remark 人工干预过的的不检测 |
| 253 | + logger.warn("实发撤销检测扫描开始"); | ||
| 199 | try { | 254 | try { |
| 200 | 255 | ||
| 201 | Map<String, String> lineMap = BasicData.lineCode2NameMap; | 256 | Map<String, String> lineMap = BasicData.lineCode2NameMap; |
| @@ -211,8 +266,7 @@ public class AutomaticSch { | @@ -211,8 +266,7 @@ public class AutomaticSch { | ||
| 211 | for (ScheduleRealInfo t : oldSchDateList){ | 266 | for (ScheduleRealInfo t : oldSchDateList){ |
| 212 | // 发车误点 | 267 | // 发车误点 |
| 213 | if (t.getDfsj() != null && t.getFcsjActual() != null | 268 | if (t.getDfsj() != null && t.getFcsjActual() != null |
| 214 | - && (t.getBcType().equals("normal") || t.getBcType().equals("region")) | ||
| 215 | - && (StringUtils.isEmpty(t.getRemarks()) || t.getRemarks().equals("_智能调度-异常实发"))) { | 269 | + && (t.getBcType().equals("normal") || t.getBcType().equals("region"))) { |
| 216 | 270 | ||
| 217 | long sjc = t.getFcsjActualTime() - t.getDfsjT(); | 271 | long sjc = t.getFcsjActualTime() - t.getDfsjT(); |
| 218 | long time = System.currentTimeMillis();//当前时间 | 272 | long time = System.currentTimeMillis();//当前时间 |
| @@ -222,20 +276,35 @@ public class AutomaticSch { | @@ -222,20 +276,35 @@ public class AutomaticSch { | ||
| 222 | if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) { | 276 | if (sjc >= -1 * 60 * 1000 && sjc <= 3 * 60 * 1000) { |
| 223 | continue; | 277 | continue; |
| 224 | } else { | 278 | } else { |
| 279 | + //备注不为null时,查询是否有调度操作记录 | ||
| 280 | + List<SchEditInfo> seiList = new ArrayList<>(); | ||
| 281 | + if (!StringUtils.isEmpty(t.getRemarks())){ | ||
| 282 | + Map msp = new HashMap(); | ||
| 283 | + msp.put("schId_eq",t.getId()); | ||
| 284 | + seiList = (List<SchEditInfo>) schEditInfoService.list(msp); | ||
| 285 | + //有操作记录的跳过 | ||
| 286 | + Boolean isCZ = false; | ||
| 287 | + for(SchEditInfo e : seiList){ | ||
| 288 | + if (e.getType().equals("FCXXWT") || e.getType().equals("DFTZ") || e.getType().equals("SFTZ")){ | ||
| 289 | + isCZ = true; | ||
| 290 | + } | ||
| 291 | + } | ||
| 292 | + if (isCZ) | ||
| 293 | + continue; | ||
| 294 | + } | ||
| 225 | //异常实发 | 295 | //异常实发 |
| 226 | ts(addStationPeople(t, "YCSF", 0l)); | 296 | ts(addStationPeople(t, "YCSF", 0l)); |
| 227 | - Gson gson = new Gson(); | ||
| 228 | - String chartStr = gson.toJsonTree(t).toString(); | ||
| 229 | - logger.info("实发撤销--" + chartStr); | 297 | + LogerWait("实发撤销",t); |
| 230 | } | 298 | } |
| 231 | } | 299 | } |
| 232 | } | 300 | } |
| 233 | 301 | ||
| 234 | } | 302 | } |
| 235 | } | 303 | } |
| 236 | - }catch (Exception e){ | 304 | + }catch (Throwable e){ |
| 237 | logger.error("实发撤销推送接口出错-----------",e); | 305 | logger.error("实发撤销推送接口出错-----------",e); |
| 238 | } | 306 | } |
| 307 | + logger.warn("实发撤销检测扫描结束"); | ||
| 239 | } | 308 | } |
| 240 | 309 | ||
| 241 | public Boolean isLines(String line) { | 310 | public Boolean isLines(String line) { |
| @@ -273,8 +342,7 @@ public class AutomaticSch { | @@ -273,8 +342,7 @@ public class AutomaticSch { | ||
| 273 | String lineCode; | 342 | String lineCode; |
| 274 | for (Map.Entry<String, String> ts : lineMap.entrySet()) { | 343 | for (Map.Entry<String, String> ts : lineMap.entrySet()) { |
| 275 | lineCode = ts.getKey(); | 344 | lineCode = ts.getKey(); |
| 276 | - if(isLines(lineCode)) { | ||
| 277 | - | 345 | + /* if(isLines(lineCode)) {*/ |
| 278 | oldSchDateList = dayOfSchedule.findByLineCode(lineCode); | 346 | oldSchDateList = dayOfSchedule.findByLineCode(lineCode); |
| 279 | for (ScheduleRealInfo t : oldSchDateList) { | 347 | for (ScheduleRealInfo t : oldSchDateList) { |
| 280 | //指令重发 | 348 | //指令重发 |
| @@ -297,10 +365,10 @@ public class AutomaticSch { | @@ -297,10 +365,10 @@ public class AutomaticSch { | ||
| 297 | //下发时间未超过5分钟返回 | 365 | //下发时间未超过5分钟返回 |
| 298 | } | 366 | } |
| 299 | } | 367 | } |
| 300 | - } | 368 | + /*}*/ |
| 301 | } | 369 | } |
| 302 | } | 370 | } |
| 303 | - }catch (Exception e){ | 371 | + }catch (Throwable e){ |
| 304 | logger.error("自动调度,指令重发---",e); | 372 | logger.error("自动调度,指令重发---",e); |
| 305 | } | 373 | } |
| 306 | logger.warn("指令重发扫描结束"); | 374 | logger.warn("指令重发扫描结束"); |
| @@ -319,8 +387,8 @@ public class AutomaticSch { | @@ -319,8 +387,8 @@ public class AutomaticSch { | ||
| 319 | if(sch.getDfsjT() > t) | 387 | if(sch.getDfsjT() > t) |
| 320 | break; | 388 | break; |
| 321 | 389 | ||
| 322 | - /*if(sch.isLate()) //演示使用 不跳过 | ||
| 323 | - continue;*/ | 390 | + if(sch.isLate()) //演示使用 不跳过 |
| 391 | + continue; | ||
| 324 | 392 | ||
| 325 | if(sch.getStatus() == 0 | 393 | if(sch.getStatus() == 0 |
| 326 | && StringUtils.isEmpty(sch.getFcsjActual())){ | 394 | && StringUtils.isEmpty(sch.getFcsjActual())){ |
| @@ -336,10 +404,8 @@ public class AutomaticSch { | @@ -336,10 +404,8 @@ public class AutomaticSch { | ||
| 336 | for (Map m : dzList){ | 404 | for (Map m : dzList){ |
| 337 | if (basicData.nbbmCompanyPlateMap.get(prev.getClZbh()) != null && m.get("terminal").equals(basicData.nbbmCompanyPlateMap.get(prev.getClZbh()).replaceAll("-",""))){ | 405 | if (basicData.nbbmCompanyPlateMap.get(prev.getClZbh()) != null && m.get("terminal").equals(basicData.nbbmCompanyPlateMap.get(prev.getClZbh()).replaceAll("-",""))){ |
| 338 | sch.setRemark(m.get("sj").toString()); | 406 | sch.setRemark(m.get("sj").toString()); |
| 339 | - Gson gson = new Gson(); | ||
| 340 | - String chartStr = gson.toJsonTree(sch).toString(); | ||
| 341 | - logger.info("误点--"+chartStr); | ||
| 342 | ts(addStationPeople(sch, "WD", 0L)); | 407 | ts(addStationPeople(sch, "WD", 0L)); |
| 408 | + LogerWait("误点",sch); | ||
| 343 | } | 409 | } |
| 344 | } | 410 | } |
| 345 | } | 411 | } |
| @@ -353,31 +419,85 @@ public class AutomaticSch { | @@ -353,31 +419,85 @@ public class AutomaticSch { | ||
| 353 | } | 419 | } |
| 354 | 420 | ||
| 355 | 421 | ||
| 422 | + public void LogerWait(String type,ScheduleRealInfo sch){ | ||
| 423 | + String chartStr = "id-"+sch.getId() +",xlName-"+sch.getXlName() + ",fcsj-"+sch.getFcsj() + ",FcsjActual-"+ sch.getFcsjActual()+",clzbh-" + sch.getClZbh(); | ||
| 424 | + logger.info(type+"--" + chartStr); | ||
| 425 | + } | ||
| 356 | 426 | ||
| 357 | - public void ts(Map m) throws ParseException { | ||
| 358 | - //记录存一下 --超过当前时间的是否推送? | ||
| 359 | - String st = m.get("lineCode")+"_"+m.get("type")+"_"+m.get("rqStr"); | ||
| 360 | - Long sj = sdf.parse(m.get("rqStr").toString() +" "+ m.get("rq")).getTime(); | ||
| 361 | - Long dsj = new Date().getTime(); | ||
| 362 | - List<Long> list = new ArrayList(); | ||
| 363 | - //111_DJG_2024-06-24 | ||
| 364 | - if (ZnddThread.ZNDDTYPEMAP.get(st) != null ) { | ||
| 365 | - list = ZnddThread.ZNDDTYPEMAP.get(st); | ||
| 366 | - int i = 0; | ||
| 367 | - | ||
| 368 | - for (Long s : list){ //推送过的同样情况1小时内 &&//超过当前时间的不推送&& sj < dsj | ||
| 369 | - if (Math.abs(s - sj) > (60 * 60 * 1000)){ | ||
| 370 | - i ++ ; | 427 | + /** |
| 428 | + *每辆车倒数第二个班次执行之前3分钟提示 | ||
| 429 | + */ | ||
| 430 | + public void TowdescSch(){ | ||
| 431 | + logger.warn("末二班车执行方法开始"); | ||
| 432 | + try { | ||
| 433 | + //获取所有线路 | ||
| 434 | + Map<String, String> lineMap = BasicData.lineCode2NameMap; | ||
| 435 | + //findByNbbm车辆索引获取的班次 | ||
| 436 | + Map<String, List<ScheduleRealInfo>> groupedByCity = new HashMap<>(); | ||
| 437 | + if(System.currentTimeMillis() < DateUtils.getTimestamp() + (1000 * 60 * 60 * 20)){ | ||
| 438 | + logger.info("未到晚上8点----"+(DateUtils.getTimestamp() + (1000 * 60 * 60 * 20))); | ||
| 439 | + return; | ||
| 440 | + } | ||
| 441 | + | ||
| 442 | + for (Map.Entry<String, String> t : lineMap.entrySet()) { | ||
| 443 | + List<ScheduleRealInfo> srList = dayOfSchedule.findByLineCode(t.getKey()); | ||
| 444 | + Map<String, List<ScheduleRealInfo>> mapType = new HashMap(); | ||
| 445 | + //所有车辆 | ||
| 446 | + for (ScheduleRealInfo s : srList) { | ||
| 447 | + if (mapType.get(s.getClZbh()) != null) | ||
| 448 | + continue; | ||
| 449 | + | ||
| 450 | + List<ScheduleRealInfo> schadd = new ArrayList<>(); | ||
| 451 | + //每辆车下的班次 | ||
| 452 | + for (ScheduleRealInfo sch : srList) { | ||
| 453 | + if (s.getClZbh().equals(sch.getClZbh())) { | ||
| 454 | + schadd.add(sch); | ||
| 455 | + } | ||
| 456 | + } | ||
| 457 | + mapType.put(s.getClZbh(), schadd); | ||
| 458 | + } | ||
| 459 | + //判断倒数第二个班次是否快要发车 | ||
| 460 | + for (String key : mapType.keySet()) { | ||
| 461 | + List<ScheduleRealInfo> carList = mapType.get(key); | ||
| 462 | + Collections.sort(carList, new ScheduleComparator.FCSJ()); | ||
| 463 | + //倒数第二个班次保证数量超过两条 | ||
| 464 | + ScheduleRealInfo scht = carList.size() >= 2 ? carList.get(carList.size() - 2) : null; | ||
| 465 | + if (scht == null) | ||
| 466 | + continue; | ||
| 467 | + | ||
| 468 | + if (scht.getDfsjT() > DateUtils.getTimestamp() + (1000 * 60 * 60 * 20) && | ||
| 469 | + scht.getDfsjT() - System.currentTimeMillis() < (1000* 60 * 4) && | ||
| 470 | + scht.getDfsjT() - System.currentTimeMillis() >= (1000* 60 *3)) { | ||
| 471 | + //推送一下 | ||
| 472 | + ts(addStationPeople(scht,"DESCTWO",0l)); | ||
| 473 | + | ||
| 474 | + LogerWait("末二班车推送",scht); | ||
| 475 | + } | ||
| 371 | } | 476 | } |
| 372 | } | 477 | } |
| 373 | - outEntrance.Znddjk(m);//测试推送 | ||
| 374 | - }else { | ||
| 375 | - list.add(sj); | ||
| 376 | - ZnddThread.ZNDDTYPEMAP.put(st,list);//存记录 | ||
| 377 | - outEntrance.Znddjk(m);//推送 | 478 | + |
| 479 | + }catch (Exception e){ | ||
| 480 | + logger.error("(倒数第二班车)末二班车执行方法出错"+ e); | ||
| 378 | } | 481 | } |
| 482 | + } | ||
| 483 | + | ||
| 484 | + | ||
| 379 | 485 | ||
| 486 | + public void ts(Map m) throws ParseException { | ||
| 380 | 487 | ||
| 488 | + //储存日志 | ||
| 489 | + StationPeopleLogger splogger = new StationPeopleLogger(); | ||
| 490 | + splogger.setType(m.get("type").toString()); | ||
| 491 | + splogger.setLineName(m.get("lineName").toString()); | ||
| 492 | + splogger.setLineCode(m.get("lineCode").toString()); | ||
| 493 | + splogger.setRq(sdf.format(new Date())); | ||
| 494 | + splogger.setRqStr(m.get("rqStr").toString()); | ||
| 495 | + splogger.setXlDir(m.get("xlDir").toString()); | ||
| 496 | + splogger.setFcsj(m.get("fcsj").toString()); | ||
| 497 | + splogger.setClZbh(m.get("clzbh").toString()); | ||
| 498 | + znddLoggerService.save(splogger); | ||
| 499 | + | ||
| 500 | + outEntrance.Znddjk(m);//推送 | ||
| 381 | } | 501 | } |
| 382 | 502 | ||
| 383 | 503 | ||
| @@ -404,16 +524,6 @@ public class AutomaticSch { | @@ -404,16 +524,6 @@ public class AutomaticSch { | ||
| 404 | return sp; | 524 | return sp; |
| 405 | } | 525 | } |
| 406 | 526 | ||
| 407 | - //大间隔数据转换 | ||
| 408 | - public Map ConvertDKL(Map m){ | ||
| 409 | - Map sp = new HashMap(); | ||
| 410 | - sp.put("uuid",UUID()); | ||
| 411 | - sp.put("lineCode",m.get("lineCode")); | ||
| 412 | - sp.put("lineName",m.get("lineName")); | ||
| 413 | - sp.put("rqStr",sdf.format(new Date())); | ||
| 414 | - sp.put("rq",sdfHHmm.format(new Date())); //检测到时间 | ||
| 415 | - return sp; | ||
| 416 | - } | ||
| 417 | 527 | ||
| 418 | 528 | ||
| 419 | //转换 | 529 | //转换 |
src/main/java/com/bsth/data/zndd/OutEntrance.java
| @@ -6,9 +6,13 @@ import com.bsth.common.ResponseCode; | @@ -6,9 +6,13 @@ import com.bsth.common.ResponseCode; | ||
| 6 | import com.bsth.data.BasicData; | 6 | import com.bsth.data.BasicData; |
| 7 | import com.bsth.data.schedule.DayOfSchedule; | 7 | import com.bsth.data.schedule.DayOfSchedule; |
| 8 | import com.bsth.data.schedule.ScheduleComparator; | 8 | import com.bsth.data.schedule.ScheduleComparator; |
| 9 | +import com.bsth.data.schedule.late_adjust.LateAdjustHandle; | ||
| 10 | +import com.bsth.entity.DKLInfo; | ||
| 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 11 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 10 | -import com.bsth.entity.zndd.StationPeopleLogger; | ||
| 11 | import com.bsth.entity.zndd.StationSignsLogger; | 12 | import com.bsth.entity.zndd.StationSignsLogger; |
| 13 | +import com.bsth.entity.zndd.znddStatus; | ||
| 14 | +import com.bsth.repository.zndd.ZnddStatusRepository; | ||
| 15 | +import com.bsth.service.DKLInfoService; | ||
| 12 | import com.bsth.util.HttpClientUtils; | 16 | import com.bsth.util.HttpClientUtils; |
| 13 | import com.bsth.util.SignUtils; | 17 | import com.bsth.util.SignUtils; |
| 14 | import com.bsth.websocket.handler.SendUtils; | 18 | import com.bsth.websocket.handler.SendUtils; |
| @@ -17,20 +21,19 @@ import org.slf4j.Logger; | @@ -17,20 +21,19 @@ import org.slf4j.Logger; | ||
| 17 | import org.slf4j.LoggerFactory; | 21 | import org.slf4j.LoggerFactory; |
| 18 | import org.springframework.beans.factory.annotation.Autowired; | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 19 | import org.springframework.beans.factory.annotation.Value; | 23 | import org.springframework.beans.factory.annotation.Value; |
| 24 | +import org.springframework.dao.DataAccessException; | ||
| 25 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 20 | import org.springframework.scheduling.annotation.Scheduled; | 26 | import org.springframework.scheduling.annotation.Scheduled; |
| 21 | import org.springframework.web.bind.annotation.*; | 27 | import org.springframework.web.bind.annotation.*; |
| 28 | + | ||
| 22 | import java.io.*; | 29 | import java.io.*; |
| 23 | import java.nio.file.Files; | 30 | import java.nio.file.Files; |
| 24 | import java.nio.file.Path; | 31 | import java.nio.file.Path; |
| 25 | import java.nio.file.Paths; | 32 | import java.nio.file.Paths; |
| 26 | import java.nio.file.StandardCopyOption; | 33 | import java.nio.file.StandardCopyOption; |
| 27 | - | ||
| 28 | -import java.io.ByteArrayInputStream; | ||
| 29 | -import java.io.File; | ||
| 30 | -import java.io.FileOutputStream; | ||
| 31 | -import java.io.InputStream; | ||
| 32 | import java.text.SimpleDateFormat; | 34 | import java.text.SimpleDateFormat; |
| 33 | import java.time.Duration; | 35 | import java.time.Duration; |
| 36 | +import java.time.LocalDateTime; | ||
| 34 | import java.time.LocalTime; | 37 | import java.time.LocalTime; |
| 35 | import java.time.format.DateTimeFormatter; | 38 | import java.time.format.DateTimeFormatter; |
| 36 | import java.util.*; | 39 | import java.util.*; |
| @@ -54,9 +57,8 @@ public class OutEntrance { | @@ -54,9 +57,8 @@ public class OutEntrance { | ||
| 54 | 57 | ||
| 55 | @Value("${dc.imgurl}") | 58 | @Value("${dc.imgurl}") |
| 56 | private String imgurl; //存储图片地址 | 59 | private String imgurl; //存储图片地址 |
| 57 | - | ||
| 58 | - @Value("${dc.profile}") | ||
| 59 | - private String profile; //存储图片地址*/ | 60 | + |
| 61 | + private String profile = "profile"; //存储图片地址*/ | ||
| 60 | 62 | ||
| 61 | @Value("${baidu.ak}") | 63 | @Value("${baidu.ak}") |
| 62 | private String ak; //百度api秘钥*/ | 64 | private String ak; //百度api秘钥*/ |
| @@ -69,6 +71,18 @@ public class OutEntrance { | @@ -69,6 +71,18 @@ public class OutEntrance { | ||
| 69 | @Autowired | 71 | @Autowired |
| 70 | AutomaticSch automaticSch; | 72 | AutomaticSch automaticSch; |
| 71 | 73 | ||
| 74 | + @Autowired | ||
| 75 | + private DKLInfoService dklInfoService; | ||
| 76 | + | ||
| 77 | + @Autowired | ||
| 78 | + JdbcTemplate jdbcTemplate; | ||
| 79 | + | ||
| 80 | + @Autowired | ||
| 81 | + ZnddStatusRepository znddStatusRepository; | ||
| 82 | + | ||
| 83 | + @Autowired | ||
| 84 | + BasicData basicData; | ||
| 85 | + | ||
| 72 | //调度屏小程序接口。 | 86 | //调度屏小程序接口。 |
| 73 | @RequestMapping(value = "/OutCar", method = RequestMethod.POST) | 87 | @RequestMapping(value = "/OutCar", method = RequestMethod.POST) |
| 74 | public Map OutCarOutCar(@RequestParam Map m,@RequestBody StationSignsLogger ssLogger) { | 88 | public Map OutCarOutCar(@RequestParam Map m,@RequestBody StationSignsLogger ssLogger) { |
| @@ -93,7 +107,7 @@ public class OutEntrance { | @@ -93,7 +107,7 @@ public class OutEntrance { | ||
| 93 | } | 107 | } |
| 94 | 108 | ||
| 95 | 109 | ||
| 96 | - //查询班次情况自动回复 | 110 | + //查询班次情况自动回复 --拥堵 |
| 97 | //当前日期 | 111 | //当前日期 |
| 98 | List<Map> dzList = carMonitor.carMonitor(ssLogger.getLineCode(), ssLogger.getDir(), ssLogger.getStation()); //信息发布接口 | 112 | List<Map> dzList = carMonitor.carMonitor(ssLogger.getLineCode(), ssLogger.getDir(), ssLogger.getStation()); //信息发布接口 |
| 99 | if (dzList.size() > 0){ | 113 | if (dzList.size() > 0){ |
| @@ -106,9 +120,36 @@ public class OutEntrance { | @@ -106,9 +120,36 @@ public class OutEntrance { | ||
| 106 | if(!"畅通".equals(trafficStatus)){ | 120 | if(!"畅通".equals(trafficStatus)){ |
| 107 | s=road+trafficStatus+","; | 121 | s=road+trafficStatus+","; |
| 108 | } | 122 | } |
| 109 | - rtn.put("message",s+"车辆预计还有"+dzList.get(0).get("sj")+"抵达,请耐心等待"); | 123 | + rtn.put("message",s+"亲爱的乘客,我们的调度员已接收到通知,车辆预计还有"+dzList.get(0).get("sj")+"抵达,请稍等片刻"); |
| 110 | }else { | 124 | }else { |
| 111 | - //筛选方向 | 125 | + //第一个班次 |
| 126 | + //所有应发未到的班次--晚点的情况 | ||
| 127 | + Collection<ScheduleRealInfo> all = LateAdjustHandle.allLateSch(); | ||
| 128 | + for (ScheduleRealInfo schc : all) { | ||
| 129 | + if(schc.getXlBm().equals(m.get("lineCode"))) { | ||
| 130 | + Long schId = schc.getId(); | ||
| 131 | + ScheduleRealInfo sch = null; | ||
| 132 | + if (schId != null) | ||
| 133 | + sch = dayOfSchedule.get(schId); | ||
| 134 | + | ||
| 135 | + ScheduleRealInfo prev = dayOfSchedule.prev(sch); | ||
| 136 | + List<Map> dzLists = carMonitor.carMonitor(prev.getXlBm(), prev.getXlDir(), prev.getZdzCode()); //信息发布接口 | ||
| 137 | + for (Map mst : dzLists) { | ||
| 138 | + //匹配到当前车辆 | ||
| 139 | + if (basicData.nbbmCompanyPlateMap.get(prev.getClZbh()) != null && mst.get("terminal").equals(basicData.nbbmCompanyPlateMap.get(prev.getClZbh()).replaceAll("-", ""))) { | ||
| 140 | + if (sch.getXlBm().equals(schc.getXlBm())) { | ||
| 141 | + rtn.put("message", "非常抱歉,车辆因路上交通拥堵,预计还需要" + mst.get("sj").toString() + "抵达,请稍等片刻"); | ||
| 142 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 143 | + return rtn; | ||
| 144 | + } | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + | ||
| 151 | + | ||
| 152 | + //筛选方向 -- 正常班次未到发车时间 | ||
| 112 | List<ScheduleRealInfo> rs = dayOfSchedule.findByLineAndUpDown(ssLogger.getLineCode(),Integer.parseInt(ssLogger.getDir())); | 153 | List<ScheduleRealInfo> rs = dayOfSchedule.findByLineAndUpDown(ssLogger.getLineCode(),Integer.parseInt(ssLogger.getDir())); |
| 113 | if(rs.size()>0){ | 154 | if(rs.size()>0){ |
| 114 | //排序 | 155 | //排序 |
| @@ -125,7 +166,7 @@ public class OutEntrance { | @@ -125,7 +166,7 @@ public class OutEntrance { | ||
| 125 | } | 166 | } |
| 126 | } | 167 | } |
| 127 | if(sjtext!=null){ | 168 | if(sjtext!=null){ |
| 128 | - rtn.put("message","车辆预计"+sjtext+"发车,请耐心等待"); | 169 | + rtn.put("message","亲爱的乘客,我们的调度员已接收到通知,车辆将按照计划,在"+sjtext+"准时发车,请稍等片刻"); |
| 129 | }else { | 170 | }else { |
| 130 | rtn.put("message","当日运营已结束"); | 171 | rtn.put("message","当日运营已结束"); |
| 131 | } | 172 | } |
| @@ -153,6 +194,23 @@ public class OutEntrance { | @@ -153,6 +194,23 @@ public class OutEntrance { | ||
| 153 | rtn.put("status", "验证失败"); | 194 | rtn.put("status", "验证失败"); |
| 154 | return rtn; | 195 | return rtn; |
| 155 | } | 196 | } |
| 197 | + //大客流开关 | ||
| 198 | + List<znddStatus> znddStatusList = (List<znddStatus>) znddStatusRepository.findAll(); | ||
| 199 | + Boolean isType = false; | ||
| 200 | + String excuteStatus = null; | ||
| 201 | + for (znddStatus zs : znddStatusList) { | ||
| 202 | + if (zs.getType().equals("dkl")) { | ||
| 203 | + isType = true; | ||
| 204 | + excuteStatus = zs.getExcuteStatus(); | ||
| 205 | + } | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + if (!isType){ | ||
| 209 | + logger.info("大客流接口未开启--------------"); | ||
| 210 | + rtn.put("status",ResponseCode.SUCCESS); | ||
| 211 | + return rtn; | ||
| 212 | + } | ||
| 213 | + | ||
| 156 | String num=jsonObject.getString("num"); | 214 | String num=jsonObject.getString("num"); |
| 157 | int count=automaticSch.getPenum("DKL","0"); | 215 | int count=automaticSch.getPenum("DKL","0"); |
| 158 | if(Integer.parseInt(num)<count){ | 216 | if(Integer.parseInt(num)<count){ |
| @@ -169,15 +227,30 @@ public class OutEntrance { | @@ -169,15 +227,30 @@ public class OutEntrance { | ||
| 169 | String lineCode = line.get("lineCode").toString(); | 227 | String lineCode = line.get("lineCode").toString(); |
| 170 | String stationCode = line.get("stationCode").toString(); | 228 | String stationCode = line.get("stationCode").toString(); |
| 171 | String dir = line.get("dir").toString(); | 229 | String dir = line.get("dir").toString(); |
| 172 | - /*StationRoute stationRoute=BasicData.stationCode2StationMap.get(lineCode+"_"+stationCode);*/ | 230 | + imgMap.put(lineCode+"_"+dir,img); |
| 231 | + DKLInfo dklInfo =new DKLInfo(); | ||
| 232 | + dklInfo.setLineCode(stationCode); | ||
| 233 | + String lineName=BasicData.lineCode2NameMap.get(lineCode); | ||
| 234 | + String stationName=BasicData.stationCode2NameMap.get(lineCode+"_"+dir+"_"+stationCode); | ||
| 235 | + dklInfo.setLineName(lineName); | ||
| 236 | + dklInfo.setStationCode(stationCode); | ||
| 237 | + dklInfo.setStationName(stationName); | ||
| 238 | + dklInfo.setNum(Integer.parseInt(num)); | ||
| 239 | + dklInfo.setUpDown(dir); | ||
| 240 | + dklInfo.setImage(img); | ||
| 241 | + dklInfoService.save(dklInfo); | ||
| 242 | + if(Integer.parseInt(num)<count){ | ||
| 243 | + continue; | ||
| 244 | + } | ||
| 173 | Map m = new HashMap(); | 245 | Map m = new HashMap(); |
| 174 | m.put("image", img); | 246 | m.put("image", img); |
| 175 | m.put("stationCode", stationCode); | 247 | m.put("stationCode", stationCode); |
| 176 | m.put("lineCode", lineCode); | 248 | m.put("lineCode", lineCode); |
| 177 | - m.put("stationName",BasicData.stationCode2NameMap.get(lineCode+"_"+dir+"_"+stationCode)); | ||
| 178 | - m.put("lineName",BasicData.lineCode2NameMap.get(lineCode)); | 249 | + m.put("stationName",stationName); |
| 250 | + m.put("lineName",lineName); | ||
| 179 | m.put("num",num); | 251 | m.put("num",num); |
| 180 | m.put("xlDir",dir); | 252 | m.put("xlDir",dir); |
| 253 | + m.put("excuteStatus",excuteStatus); | ||
| 181 | List<ScheduleRealInfo> srList=dayOfSchedule.findByLineAndUpDown(lineCode,Integer.parseInt(dir)); | 254 | List<ScheduleRealInfo> srList=dayOfSchedule.findByLineAndUpDown(lineCode,Integer.parseInt(dir)); |
| 182 | List<ScheduleRealInfo> sl=new ArrayList<>(); | 255 | List<ScheduleRealInfo> sl=new ArrayList<>(); |
| 183 | for (ScheduleRealInfo scheduleRealInfo : srList) {//筛选出运营班次 | 256 | for (ScheduleRealInfo scheduleRealInfo : srList) {//筛选出运营班次 |
| @@ -253,33 +326,6 @@ public class OutEntrance { | @@ -253,33 +326,6 @@ public class OutEntrance { | ||
| 253 | } | 326 | } |
| 254 | 327 | ||
| 255 | 328 | ||
| 256 | - //智能调度接口-大客流 | ||
| 257 | - @RequestMapping(value="/dkl",method = RequestMethod.POST) | ||
| 258 | - public Map ddkl(@RequestParam Map m) { | ||
| 259 | - Map rtn = new HashMap<>(); | ||
| 260 | - | ||
| 261 | - try { | ||
| 262 | - ObjectMapper mapper = new ObjectMapper(); | ||
| 263 | - //map转换实体类 | ||
| 264 | - StationPeopleLogger ssLogger = mapper.convertValue(m, StationPeopleLogger.class); | ||
| 265 | - | ||
| 266 | - ssLogger.setType("大客流"); | ||
| 267 | - | ||
| 268 | - //保存记录 | ||
| 269 | - //znddLoggerService.save(ssLogger); | ||
| 270 | - //线调页面推送 | ||
| 271 | - //sendUtils.sendzndd(ssLogger); | ||
| 272 | - | ||
| 273 | - rtn.put("status",ResponseCode.SUCCESS); | ||
| 274 | - } catch (Exception e) { | ||
| 275 | - rtn.put("status", ResponseCode.ERROR); | ||
| 276 | - logger.error("大客流推送异常----",e); | ||
| 277 | - } | ||
| 278 | - return rtn; | ||
| 279 | - } | ||
| 280 | - | ||
| 281 | - | ||
| 282 | - | ||
| 283 | 329 | ||
| 284 | /** | 330 | /** |
| 285 | * 保存base64图片 | 331 | * 保存base64图片 |
| @@ -319,7 +365,7 @@ public class OutEntrance { | @@ -319,7 +365,7 @@ public class OutEntrance { | ||
| 319 | destfile.mkdirs(); | 365 | destfile.mkdirs(); |
| 320 | } | 366 | } |
| 321 | //文件新名称 | 367 | //文件新名称 |
| 322 | - String fileNameNew = AutomaticSch.UUID()+ ".png"; | 368 | + String fileNameNew = System.currentTimeMillis()+"_"+AutomaticSch.UUID()+ ".png"; |
| 323 | File f = new File(destfile.getAbsoluteFile() + File.separator + fileNameNew); | 369 | File f = new File(destfile.getAbsoluteFile() + File.separator + fileNameNew); |
| 324 | // 将字符串转换成二进制,用于显示图片 | 370 | // 将字符串转换成二进制,用于显示图片 |
| 325 | // 将上面生成的图片格式字符串 imgStr,还原成图片显示 | 371 | // 将上面生成的图片格式字符串 imgStr,还原成图片显示 |
| @@ -397,7 +443,9 @@ public class OutEntrance { | @@ -397,7 +443,9 @@ public class OutEntrance { | ||
| 397 | @Scheduled(cron = "0 0 0 * * ?") | 443 | @Scheduled(cron = "0 0 0 * * ?") |
| 398 | public void clearImg(){ | 444 | public void clearImg(){ |
| 399 | try { | 445 | try { |
| 400 | - File folder=new File(imgurl+"/avat"); | 446 | + LocalDateTime date =LocalDateTime.now().minusDays(7); |
| 447 | + String[] d=date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")).split("-"); | ||
| 448 | + File folder=new File(imgurl+"/avat/"+d[0]+"/"+d[1]+"/"+d[2]); | ||
| 401 | delete(folder); | 449 | delete(folder); |
| 402 | } catch (Exception e) { | 450 | } catch (Exception e) { |
| 403 | e.printStackTrace(); | 451 | e.printStackTrace(); |
| @@ -416,4 +464,28 @@ public class OutEntrance { | @@ -416,4 +464,28 @@ public class OutEntrance { | ||
| 416 | folder.delete(); // 删除空文件夹或者文件 | 464 | folder.delete(); // 删除空文件夹或者文件 |
| 417 | } | 465 | } |
| 418 | 466 | ||
| 467 | + private static Map<String,String> imgMap =new HashMap<>(); | ||
| 468 | + //调度获取站台视频 | ||
| 469 | + @RequestMapping(value = "/getStationVideo", method = RequestMethod.GET) | ||
| 470 | + public String getStationVideo(@RequestParam Map m) { | ||
| 471 | + if (m.get("lineCode")==null || m.get("upDown")==null){ | ||
| 472 | + return null; | ||
| 473 | + } | ||
| 474 | + String sql="select url from station_video where line_code ='"+m.get("lineCode")+"' and up_down ='"+m.get("upDown")+"'"; | ||
| 475 | + String url= null; | ||
| 476 | + try { | ||
| 477 | + url = jdbcTemplate.queryForObject(sql,String.class); | ||
| 478 | + } catch (DataAccessException e) { | ||
| 479 | + return null; | ||
| 480 | + } | ||
| 481 | + return url; | ||
| 482 | + } | ||
| 483 | + | ||
| 484 | + //调度获取站台图片 | ||
| 485 | + @RequestMapping(value = "/getStationImg", method = RequestMethod.GET) | ||
| 486 | + public String getStationImg(@RequestParam Map m) { | ||
| 487 | + String url=imgMap.get(m.get("lineCode")+"_"+m.get("upDown")); | ||
| 488 | + return url; | ||
| 489 | + } | ||
| 490 | + | ||
| 419 | } | 491 | } |
src/main/java/com/bsth/data/zndd/ZnddThread.java
| @@ -45,11 +45,8 @@ public class ZnddThread extends Thread{ | @@ -45,11 +45,8 @@ public class ZnddThread extends Thread{ | ||
| 45 | static Map<String,List> ZNDDTYPEMAP = new HashMap<>(); //已经推送过的检测 | 45 | static Map<String,List> ZNDDTYPEMAP = new HashMap<>(); //已经推送过的检测 |
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | - String url = "https://lgapp.bsth.tech:13089/bsth_passengerflow/klbus/currentInsideNum.do"; //车内客流接口 | ||
| 49 | 48 | ||
| 50 | 49 | ||
| 51 | - String urldkl = "http://10.10.200.140:13089/bsth_passengerflow/klbus/currentInsideNum.do"; //大客流接口 | ||
| 52 | - | ||
| 53 | private static SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm"); | 50 | private static SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm"); |
| 54 | private static SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"); | 51 | private static SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"); |
| 55 | private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 52 | private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| @@ -64,13 +61,7 @@ public class ZnddThread extends Thread{ | @@ -64,13 +61,7 @@ public class ZnddThread extends Thread{ | ||
| 64 | //automaticSch.mz(); | 61 | //automaticSch.mz(); |
| 65 | //automaticSch.dfTz();//大间隔 | 62 | //automaticSch.dfTz();//大间隔 |
| 66 | for (znddStatus zs : znddStatusList) { | 63 | for (znddStatus zs : znddStatusList) { |
| 67 | - if (zs.getOpenStatus().equals("0")) { | ||
| 68 | - //预案5个 | ||
| 69 | - if (zs.getType().equals("fcjg")) { | ||
| 70 | - automaticSch.dfTz(0); | ||
| 71 | - logger.info("发车间隔执行完毕"); | ||
| 72 | - } | ||
| 73 | - | 64 | + if (zs.getOpenStatus() != null && zs.getOpenStatus().equals("0")) { |
| 74 | if (zs.getType().equals("sftz")) { | 65 | if (zs.getType().equals("sftz")) { |
| 75 | automaticSch.sftz();//实发未发 | 66 | automaticSch.sftz();//实发未发 |
| 76 | logger.info("实发执行完毕"); | 67 | logger.info("实发执行完毕"); |
| @@ -79,31 +70,13 @@ public class ZnddThread extends Thread{ | @@ -79,31 +70,13 @@ public class ZnddThread extends Thread{ | ||
| 79 | automaticSch.sfCX();// 异常实发 - 实发撤销 | 70 | automaticSch.sfCX();// 异常实发 - 实发撤销 |
| 80 | logger.info("异常实发执行完毕"); | 71 | logger.info("异常实发执行完毕"); |
| 81 | } | 72 | } |
| 82 | - if (zs.getType().equals("zlcf")){ | ||
| 83 | - automaticSch.drivresponse(); | ||
| 84 | - logger.info("设备重发执行完毕"); | ||
| 85 | - } | ||
| 86 | - if (zs.getType().equals("wd")){ | ||
| 87 | - automaticSch.wd(); | ||
| 88 | - logger.info("误点执行完毕"); | ||
| 89 | - } | ||
| 90 | - if (zs.getType().equals("djg")){ | ||
| 91 | - automaticSch.dfTz(1); | ||
| 92 | - logger.info("行车大间隔执行完毕"); | ||
| 93 | - } | ||
| 94 | - | ||
| 95 | - if (zs.getType().equals("dkl")){ | ||
| 96 | - automaticSch.Dkl(); | ||
| 97 | - logger.info("大客流执行完毕"); | ||
| 98 | - } | ||
| 99 | - if (zs.getType().equals("mz")){ | ||
| 100 | - automaticSch.mz(); | ||
| 101 | - logger.info("满载执行完毕"); | ||
| 102 | - } | ||
| 103 | - | 73 | + if (zs.getType().equals("zlcf")){ |
| 74 | + automaticSch.drivresponse(); | ||
| 75 | + logger.info("设备重发执行完毕"); | ||
| 76 | + } | ||
| 104 | } | 77 | } |
| 105 | } | 78 | } |
| 106 | - }catch (Exception e){ | 79 | + }catch (Throwable e){ |
| 107 | logger.info("智能调度线程——————",e); | 80 | logger.info("智能调度线程——————",e); |
| 108 | } | 81 | } |
| 109 | 82 |
src/main/java/com/bsth/data/zndd/ZnddTwoThread.java
0 → 100644
| 1 | +package com.bsth.data.zndd; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.LineConfigData; | ||
| 4 | +import com.bsth.data.gpsdata_v2.GpsRealData; | ||
| 5 | +import com.bsth.data.gpsdata_v2.entity.GpsEntity; | ||
| 6 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 7 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 8 | +import com.bsth.entity.zndd.znddStatus; | ||
| 9 | +import com.bsth.repository.StationRouteRepository; | ||
| 10 | +import com.bsth.repository.zndd.ZnddStatusRepository; | ||
| 11 | +import org.slf4j.Logger; | ||
| 12 | +import org.slf4j.LoggerFactory; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.stereotype.Component; | ||
| 15 | + | ||
| 16 | +import java.text.ParseException; | ||
| 17 | +import java.text.SimpleDateFormat; | ||
| 18 | +import java.util.Comparator; | ||
| 19 | +import java.util.HashMap; | ||
| 20 | +import java.util.List; | ||
| 21 | +import java.util.Map; | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * 调度预案 发车间隔、误点、大间隔、满载、大客流 | ||
| 25 | + */ | ||
| 26 | +@Component | ||
| 27 | +public class ZnddTwoThread extends Thread{ | ||
| 28 | + | ||
| 29 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 30 | + /*@Autowired | ||
| 31 | + StationPeopleLoggerRepository stationPeopleLoggerRepository;*/ | ||
| 32 | + @Autowired | ||
| 33 | + DayOfSchedule dayOfSchedule; | ||
| 34 | + @Autowired | ||
| 35 | + LineConfigData lineConfs; | ||
| 36 | + @Autowired | ||
| 37 | + GpsRealData gpsRealData; | ||
| 38 | + @Autowired | ||
| 39 | + StationRouteRepository stationRouteRepository; | ||
| 40 | + @Autowired | ||
| 41 | + OutEntrance outEntrance; | ||
| 42 | + @Autowired | ||
| 43 | + AutomaticSch automaticSch; | ||
| 44 | + | ||
| 45 | + @Autowired | ||
| 46 | + ZnddStatusRepository znddStatusRepository; | ||
| 47 | + | ||
| 48 | + static Map<String,List> ZNDDTYPEMAP = new HashMap<>(); //已经推送过的检测 | ||
| 49 | + | ||
| 50 | + | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + private static SimpleDateFormat sdfHHmm = new SimpleDateFormat("HH:mm"); | ||
| 54 | + private static SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 55 | + private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | ||
| 56 | + @Override | ||
| 57 | + public void run() { | ||
| 58 | + try { | ||
| 59 | + List<znddStatus> znddStatusList = (List<znddStatus>) znddStatusRepository.findAll(); | ||
| 60 | + | ||
| 61 | + for (znddStatus zs : znddStatusList) { | ||
| 62 | + if (zs.getOpenStatus() != null && zs.getOpenStatus().equals("0")) { | ||
| 63 | + //预案5个 | ||
| 64 | + if (zs.getType().equals("fcjg")) { | ||
| 65 | + new Thread() { | ||
| 66 | + @Override | ||
| 67 | + public void run() { | ||
| 68 | + automaticSch.dfTz(0); | ||
| 69 | + logger.info("发车间隔执行完毕"); | ||
| 70 | + } | ||
| 71 | + }.start();//启动线程 | ||
| 72 | + } | ||
| 73 | + if (zs.getType().equals("wd")) { | ||
| 74 | + new Thread() { | ||
| 75 | + @Override | ||
| 76 | + public void run() { | ||
| 77 | + automaticSch.wd(); | ||
| 78 | + logger.info("误点执行完毕"); | ||
| 79 | + } | ||
| 80 | + }.start();//启动线程 | ||
| 81 | + } | ||
| 82 | + if (zs.getType().equals("djg")) { | ||
| 83 | + new Thread() { | ||
| 84 | + @Override | ||
| 85 | + public void run() { | ||
| 86 | + automaticSch.dfTz(1); | ||
| 87 | + logger.info("行车大间隔执行完毕"); | ||
| 88 | + } | ||
| 89 | + }.start();//启动线程 | ||
| 90 | + | ||
| 91 | + } | ||
| 92 | + if (zs.getType().equals("mz")) { | ||
| 93 | + new Thread() { | ||
| 94 | + @Override | ||
| 95 | + public void run() { | ||
| 96 | + automaticSch.mz(); | ||
| 97 | + logger.info("满载执行完毕"); | ||
| 98 | + } | ||
| 99 | + }.start();//启动线程 | ||
| 100 | + | ||
| 101 | + } | ||
| 102 | + if (zs.getType().equals("desctwo")) { | ||
| 103 | + new Thread() { | ||
| 104 | + @Override | ||
| 105 | + public void run() { | ||
| 106 | + automaticSch.TowdescSch(); | ||
| 107 | + logger.info("末二班车"); | ||
| 108 | + } | ||
| 109 | + }.start();//启动线程 | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + | ||
| 117 | + } catch (Exception e) { | ||
| 118 | + logger.info("智能调度线程——————", e); | ||
| 119 | + } | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + | ||
| 123 | + //满载 | ||
| 124 | + /* public void MZ(){ | ||
| 125 | + try { | ||
| 126 | + StringBuilder sb = HttpClientUtils.get(url); | ||
| 127 | + List<Object> list = JSONArray.parseArray(String.valueOf(sb)); | ||
| 128 | + for (Object b :list){ | ||
| 129 | + Map m = (Map) b; | ||
| 130 | + Integer num = Integer.parseInt(m.get("inside_num").toString()); | ||
| 131 | + if (num >= 15){ //大间隔阈值 检测到超过15个人的时候推送 | ||
| 132 | + ScheduleRealInfo sr = dayOfSchedule.executeCurr(m.get("nbbm").toString()); //查询当前车辆执行班次 | ||
| 133 | + GpsEntity gps = gpsRealData.get(m.get("sbbh").toString()); | ||
| 134 | + Map msp = new HashMap(); | ||
| 135 | + msp.put("lineCode",m.get("xlbm")); | ||
| 136 | + msp.put("lineName",m.get("xlmc")); | ||
| 137 | + msp.put("stationName",gps.getStationName()); | ||
| 138 | + msp.put("rqStr",sdfMonth.format(new Date())); | ||
| 139 | + msp.put("rq",sdfHHmm.format(new Date())); | ||
| 140 | + msp.put("type","MZ"); | ||
| 141 | + msp.put("numType",num); | ||
| 142 | + if (sr != null ) | ||
| 143 | + msp.put("xlDir",sr.getXlDir()); | ||
| 144 | + | ||
| 145 | + if (gps != null ) | ||
| 146 | + msp.put("station",gps.getStation().getCode()); | ||
| 147 | + | ||
| 148 | + ts(msp); | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + }catch (Exception e){ | ||
| 153 | + logger.error("满载检测接口出错-----------",e); | ||
| 154 | + } | ||
| 155 | + }*/ | ||
| 156 | + public void ts(Map m) throws ParseException { | ||
| 157 | + outEntrance.Znddjk(m);//测试推送 | ||
| 158 | + } | ||
| 159 | + /* public void ts(Map m) throws ParseException { | ||
| 160 | + //记录存一下 --超过当前时间的是否推送? | ||
| 161 | + String st = m.get("lineCode")+"_"+m.get("type")+"_"+m.get("rqStr"); | ||
| 162 | + Long sj = sdf.parse(m.get("rqStr").toString() +" "+ m.get("rq")).getTime(); | ||
| 163 | + List<Long> list = new ArrayList(); | ||
| 164 | + //111_DJG_2024-06-24 | ||
| 165 | + if (ZNDDTYPEMAP.get(st) != null ) { | ||
| 166 | + list = ZNDDTYPEMAP.get(st); | ||
| 167 | + int i = 0; | ||
| 168 | + for (Long s : list){ | ||
| 169 | + if (Math.abs(s - sj) > (60 * 60 * 1000)){ | ||
| 170 | + i ++ ; | ||
| 171 | + } | ||
| 172 | + } | ||
| 173 | + if (i == list.size()){ | ||
| 174 | + list.add(sj); | ||
| 175 | + ZNDDTYPEMAP.put(st,list);//存记录 | ||
| 176 | + outEntrance.Znddjk(m);//推送 | ||
| 177 | + } | ||
| 178 | + return; | ||
| 179 | + }else { | ||
| 180 | + list.add(sj); | ||
| 181 | + ZNDDTYPEMAP.put(st,list);//存记录 | ||
| 182 | + outEntrance.Znddjk(m);//推送 | ||
| 183 | + } | ||
| 184 | + | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | +*/ | ||
| 188 | + | ||
| 189 | + /* //发车间隔 | ||
| 190 | + public void FCJG(){ | ||
| 191 | + try { | ||
| 192 | + //无数据情况下 查看发车间隔配置数据是否正常bsth_c_calc_interval | ||
| 193 | + List<CalcIntervalDetail> fcjgList = userCarCountHandler.calcLast(); | ||
| 194 | + if (fcjgList!= null && !fcjgList.isEmpty()){ | ||
| 195 | + for (CalcIntervalDetail cd : fcjgList){ | ||
| 196 | + Map sp = new HashMap(); | ||
| 197 | + sp.put("lineCode",cd.getLineCode()); | ||
| 198 | + sp.put("lineName",cd.getLineName()); | ||
| 199 | + sp.put("rqStr",cd.getDate()); | ||
| 200 | + sp.put("rq",cd.getSjfc2()); | ||
| 201 | + sp.put("type","FCJG"); | ||
| 202 | + sp.put("xlDir",cd.getXlDir()); | ||
| 203 | + sp.put("numType",cd.getSubTime()); | ||
| 204 | + sp.put("fcsj",cd.getSjfc2()); | ||
| 205 | + sp.put("stationName",cd.getStation()); | ||
| 206 | + ts(sp); | ||
| 207 | + } | ||
| 208 | + } | ||
| 209 | + }catch (Exception e){ | ||
| 210 | + logger.error("发车间隔检测出现出错-----------",e); | ||
| 211 | + } | ||
| 212 | + } | ||
| 213 | +*/ | ||
| 214 | + | ||
| 215 | + //转换 | ||
| 216 | + public Map addStationPeople(ScheduleRealInfo info,String type,Long sst,String sj) throws ParseException{ | ||
| 217 | + Map sp = new HashMap(); | ||
| 218 | + sp.put("lineCode",info.getXlBm()); | ||
| 219 | + sp.put("lineName",info.getXlName() ); | ||
| 220 | + sp.put("rqStr",info.getScheduleDateStr()); | ||
| 221 | + sp.put("rq",new java.sql.Date(sdf.parse((info.getScheduleDateStr()+" " + sj)).getTime())); //检测到时间 | ||
| 222 | + sp.put("type",type); | ||
| 223 | + sp.put("xlDir",info.getXlDir()); | ||
| 224 | + sp.put("numType",sst); | ||
| 225 | + return sp; | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + | ||
| 229 | + | ||
| 230 | + //排序 | ||
| 231 | + public static class GpsComp implements Comparator<GpsEntity> { | ||
| 232 | + @Override | ||
| 233 | + public int compare(GpsEntity o1, GpsEntity o2) { | ||
| 234 | + return Integer.parseInt(o1.getRemark()) - Integer.parseInt(o2.getRemark()); | ||
| 235 | + } | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | +} | ||
| 239 | + |
src/main/java/com/bsth/data/zndd/carMonitor.java
| @@ -81,6 +81,7 @@ public class carMonitor { | @@ -81,6 +81,7 @@ public class carMonitor { | ||
| 81 | map.put("lat",responseEle.elementTextTrim("lat")); | 81 | map.put("lat",responseEle.elementTextTrim("lat")); |
| 82 | map.put("nbbm",responseEle.elementTextTrim("insidecode")); | 82 | map.put("nbbm",responseEle.elementTextTrim("insidecode")); |
| 83 | map.put("road",responseEle.elementTextTrim("road")); | 83 | map.put("road",responseEle.elementTextTrim("road")); |
| 84 | + map.put("schId",responseEle.elementTextTrim("schId")); | ||
| 84 | list.add(map); | 85 | list.add(map); |
| 85 | } | 86 | } |
| 86 | } | 87 | } |
src/main/java/com/bsth/data/zndd/voice/GJC.java
| @@ -16,9 +16,9 @@ public enum GJC { | @@ -16,9 +16,9 @@ public enum GJC { | ||
| 16 | CC(7, "出场"), | 16 | CC(7, "出场"), |
| 17 | KQ(8, "开启"), | 17 | KQ(8, "开启"), |
| 18 | GB(9, "关闭"), | 18 | GB(9, "关闭"), |
| 19 | - ge(10, "个"), | 19 | + ge(10, "一个"), |
| 20 | dao(11, "到"), | 20 | dao(11, "到"), |
| 21 | - de(12, "的"); | 21 | + de(12, "的班次"); |
| 22 | 22 | ||
| 23 | private int code; | 23 | private int code; |
| 24 | private String description; | 24 | private String description; |
src/main/java/com/bsth/data/zndd/voice/UploadVideoServlet.java
| 1 | package com.bsth.data.zndd.voice; | 1 | package com.bsth.data.zndd.voice; |
| 2 | 2 | ||
| 3 | import com.alibaba.fastjson.JSONObject; | 3 | import com.alibaba.fastjson.JSONObject; |
| 4 | -import com.bsth.data.BasicData; | ||
| 5 | import com.bsth.data.zndd.baidu.speech.restapi.asrdemo.AsrMain; | 4 | import com.bsth.data.zndd.baidu.speech.restapi.asrdemo.AsrMain; |
| 6 | import com.bsth.entity.StationRoute; | 5 | import com.bsth.entity.StationRoute; |
| 7 | import com.bsth.entity.sys.SysUser; | 6 | import com.bsth.entity.sys.SysUser; |
| @@ -124,7 +123,7 @@ public class UploadVideoServlet extends HttpServlet { | @@ -124,7 +123,7 @@ public class UploadVideoServlet extends HttpServlet { | ||
| 124 | String text = textList.get(0).toString(); | 123 | String text = textList.get(0).toString(); |
| 125 | //text="新增出厂班次"; | 124 | //text="新增出厂班次"; |
| 126 | //text="帮我添加一个鸿音路南芦公路到临港大道枢纽站的班次"; | 125 | //text="帮我添加一个鸿音路南芦公路到临港大道枢纽站的班次"; |
| 127 | - if(isSimilarity(ZL.zdzdbc,text,null)){//帮我添加一个xx到xx站的班次(帮我添加一个鸿音路南芦公路到临港大道枢纽站的班次) | 126 | + /*if(isSimilarity(ZL.zdzdbc,text,null)){//帮我添加一个xx到xx站的班次(帮我添加一个鸿音路南芦公路到临港大道枢纽站的班次) |
| 128 | String[] ks = text.replace(",","").split("到"); | 127 | String[] ks = text.replace(",","").split("到"); |
| 129 | if(ks[0].split("个").length==1){ | 128 | if(ks[0].split("个").length==1){ |
| 130 | writer.write(text+"_识别失败"+",999"); | 129 | writer.write(text+"_识别失败"+",999"); |
| @@ -137,9 +136,9 @@ public class UploadVideoServlet extends HttpServlet { | @@ -137,9 +136,9 @@ public class UploadVideoServlet extends HttpServlet { | ||
| 137 | String Station1= ks[0].split("个")[1]; | 136 | String Station1= ks[0].split("个")[1]; |
| 138 | String Station2= ks[1].split("的")[0]; | 137 | String Station2= ks[1].split("的")[0]; |
| 139 | 138 | ||
| 140 | - /* String fcsj = null;//线路名,上下行,发车时间 | 139 | + *//* String fcsj = null;//线路名,上下行,发车时间 |
| 141 | //发车时间 | 140 | //发车时间 |
| 142 | - fcsj = extractTimes(text);*/ | 141 | + fcsj = extractTimes(text);*//* |
| 143 | //线路名称 - 线路编码和名称对照 | 142 | //线路名称 - 线路编码和名称对照 |
| 144 | 143 | ||
| 145 | Map<String, Object> param = new HashMap<>(); | 144 | Map<String, Object> param = new HashMap<>(); |
| @@ -163,7 +162,7 @@ public class UploadVideoServlet extends HttpServlet { | @@ -163,7 +162,7 @@ public class UploadVideoServlet extends HttpServlet { | ||
| 163 | } | 162 | } |
| 164 | writer.write(text +",1,"+m.get("stationcode1")+","+m.get("stationcode2")+","+0); | 163 | writer.write(text +",1,"+m.get("stationcode1")+","+m.get("stationcode2")+","+0); |
| 165 | return; | 164 | return; |
| 166 | - } | 165 | + }*/ |
| 167 | if(isSimilarity(ZL.LJCCBC,text,null)){//添加出厂班次 | 166 | if(isSimilarity(ZL.LJCCBC,text,null)){//添加出厂班次 |
| 168 | writer.write(text+"_"+ZL.LJCCBC.getDescription()+",2"); | 167 | writer.write(text+"_"+ZL.LJCCBC.getDescription()+",2"); |
| 169 | return; | 168 | return; |
src/main/java/com/bsth/data/zndd/voice/VoiceUtil.java
| 1 | -package com.bsth.data.zndd.voice; | ||
| 2 | - | ||
| 3 | -import com.alibaba.fastjson.JSON; | ||
| 4 | -import com.alibaba.fastjson.JSONObject; | ||
| 5 | -import com.sun.media.sound.WaveFileReader; | ||
| 6 | -import com.sun.media.sound.WaveFileWriter; | ||
| 7 | -import org.slf4j.Logger; | ||
| 8 | -import org.slf4j.LoggerFactory; | ||
| 9 | -import org.springframework.util.Assert; | ||
| 10 | -import org.springframework.util.StringUtils; | ||
| 11 | -import org.vosk.LibVosk; | ||
| 12 | -import org.vosk.LogLevel; | ||
| 13 | -import org.vosk.Model; | ||
| 14 | -import org.vosk.Recognizer; | ||
| 15 | - | ||
| 16 | -import javax.sound.sampled.*; | ||
| 17 | -import java.io.*; | ||
| 18 | -import java.nio.file.Files; | ||
| 19 | -import java.nio.file.Paths; | ||
| 20 | - | ||
| 21 | -public class VoiceUtil { | ||
| 22 | - /* @Value("${leenleda.vosk.model}") | ||
| 23 | - private String VOSKMODELPATH;*/ | ||
| 24 | - | ||
| 25 | - Logger log = LoggerFactory.getLogger(this.getClass()); | ||
| 26 | - public String getWord(String filePath) throws IOException, UnsupportedAudioFileException { | ||
| 27 | - Assert.isTrue(StringUtils.hasLength("D:\\pcm\\vosk-model-small-cn-0.22"), "无效的VOS模块!"); | ||
| 28 | - byte[] bytes = Files.readAllBytes(Paths.get(filePath)); | ||
| 29 | - // 转换为16KHZ | ||
| 30 | - reSamplingAndSave(bytes, filePath); | ||
| 31 | - File f = new File(filePath); | ||
| 32 | - RandomAccessFile rdf = null; | ||
| 33 | - rdf = new RandomAccessFile(f, "r"); | ||
| 34 | - log.info("声音尺寸:{}", toInt(read(rdf, 4, 4))); | ||
| 35 | - log.info("音频格式:{}", toShort(read(rdf, 20, 2))); | ||
| 36 | - short track = toShort(read(rdf, 22, 2)); | ||
| 37 | - log.info("1 单声道 2 双声道: {}", track); | ||
| 38 | - log.info("采样率、音频采样级别 16000 = 16KHz: {}", toInt(read(rdf, 24, 4))); | ||
| 39 | - log.info("每秒波形的数据量:{}", toShort(read(rdf, 22, 2))); | ||
| 40 | - log.info("采样帧的大小:{}", toShort(read(rdf, 32, 2))); | ||
| 41 | - log.info("采样位数:{}", toShort(read(rdf, 34, 2))); | ||
| 42 | - rdf.close(); | ||
| 43 | - LibVosk.setLogLevel(LogLevel.WARNINGS); | ||
| 44 | - try ( | ||
| 45 | - Model model = new Model("D:\\pcm\\vosk-model-small-cn-0.22"); | ||
| 46 | - InputStream ais = AudioSystem.getAudioInputStream(new BufferedInputStream(new FileInputStream(filePath))); | ||
| 47 | - // 采样率为音频采样率的声道倍数 | ||
| 48 | - Recognizer recognizer = new Recognizer(model, 16000 * track)) { | ||
| 49 | - | ||
| 50 | - recognizer.setWords(true); | ||
| 51 | - | ||
| 52 | - String result = recognizer.getFinalResult(); | ||
| 53 | - log.info("识别结果:{}", result); | ||
| 54 | - if (StringUtils.hasLength(result)) { | ||
| 55 | - JSONObject jsonObject = JSON.parseObject(result); | ||
| 56 | - return jsonObject.getString("text").replace(" ", ""); | ||
| 57 | - } | ||
| 58 | - return ""; | ||
| 59 | - } | ||
| 60 | - | ||
| 61 | - | ||
| 62 | - | ||
| 63 | - } | ||
| 64 | - | ||
| 65 | - public static int toInt(byte[] b) { | ||
| 66 | - return (((b[3] & 0xff) << 24) + ((b[2] & 0xff) << 16) + ((b[1] & 0xff) << 8) + ((b[0] & 0xff) << 0)); | ||
| 67 | - } | ||
| 68 | - | ||
| 69 | - public static short toShort(byte[] b) { | ||
| 70 | - return (short) ((b[1] << 8) + (b[0] << 0)); | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | - public static byte[] read(RandomAccessFile rdf, int pos, int length) throws IOException { | ||
| 74 | - rdf.seek(pos); | ||
| 75 | - byte result[] = new byte[length]; | ||
| 76 | - for (int i = 0; i < length; i++) { | ||
| 77 | - result[i] = rdf.readByte(); | ||
| 78 | - } | ||
| 79 | - return result; | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - public static void reSamplingAndSave(byte[] data, String path) throws IOException, UnsupportedAudioFileException { | ||
| 83 | - WaveFileReader reader = new WaveFileReader(); | ||
| 84 | - AudioInputStream audioIn = reader.getAudioInputStream(new ByteArrayInputStream(data)); | ||
| 85 | - AudioFormat srcFormat = audioIn.getFormat(); | ||
| 86 | - int targetSampleRate = 16000; | ||
| 87 | - AudioFormat dstFormat = new AudioFormat(srcFormat.getEncoding(), | ||
| 88 | - targetSampleRate, | ||
| 89 | - srcFormat.getSampleSizeInBits(), | ||
| 90 | - srcFormat.getChannels(), | ||
| 91 | - srcFormat.getFrameSize(), | ||
| 92 | - srcFormat.getFrameRate(), | ||
| 93 | - srcFormat.isBigEndian()); | ||
| 94 | - AudioInputStream convertedIn = AudioSystem.getAudioInputStream(dstFormat, audioIn); | ||
| 95 | - File file = new File(path); | ||
| 96 | - WaveFileWriter writer = new WaveFileWriter(); | ||
| 97 | - writer.write(convertedIn, AudioFileFormat.Type.WAVE, file); | ||
| 98 | - } | ||
| 99 | -} | ||
| 100 | \ No newline at end of file | 1 | \ No newline at end of file |
| 2 | +//package com.bsth.data.zndd.voice; | ||
| 3 | +// | ||
| 4 | +//import com.alibaba.fastjson.JSON; | ||
| 5 | +//import com.alibaba.fastjson.JSONObject; | ||
| 6 | +//import com.sun.media.sound.WaveFileReader; | ||
| 7 | +//import com.sun.media.sound.WaveFileWriter; | ||
| 8 | +//import org.slf4j.Logger; | ||
| 9 | +//import org.slf4j.LoggerFactory; | ||
| 10 | +//import org.springframework.util.Assert; | ||
| 11 | +//import org.springframework.util.StringUtils; | ||
| 12 | +//import org.vosk.LibVosk; | ||
| 13 | +//import org.vosk.LogLevel; | ||
| 14 | +//import org.vosk.Model; | ||
| 15 | +//import org.vosk.Recognizer; | ||
| 16 | +// | ||
| 17 | +//import javax.sound.sampled.*; | ||
| 18 | +//import java.io.*; | ||
| 19 | +//import java.nio.file.Files; | ||
| 20 | +//import java.nio.file.Paths; | ||
| 21 | +// | ||
| 22 | +//public class VoiceUtil { | ||
| 23 | +// /* @Value("${leenleda.vosk.model}") | ||
| 24 | +// private String VOSKMODELPATH;*/ | ||
| 25 | +// | ||
| 26 | +// Logger log = LoggerFactory.getLogger(this.getClass()); | ||
| 27 | +// public String getWord(String filePath) throws IOException, UnsupportedAudioFileException { | ||
| 28 | +// Assert.isTrue(StringUtils.hasLength("D:\\pcm\\vosk-model-small-cn-0.22"), "无效的VOS模块!"); | ||
| 29 | +// byte[] bytes = Files.readAllBytes(Paths.get(filePath)); | ||
| 30 | +// // 转换为16KHZ | ||
| 31 | +// reSamplingAndSave(bytes, filePath); | ||
| 32 | +// File f = new File(filePath); | ||
| 33 | +// RandomAccessFile rdf = null; | ||
| 34 | +// rdf = new RandomAccessFile(f, "r"); | ||
| 35 | +// log.info("声音尺寸:{}", toInt(read(rdf, 4, 4))); | ||
| 36 | +// log.info("音频格式:{}", toShort(read(rdf, 20, 2))); | ||
| 37 | +// short track = toShort(read(rdf, 22, 2)); | ||
| 38 | +// log.info("1 单声道 2 双声道: {}", track); | ||
| 39 | +// log.info("采样率、音频采样级别 16000 = 16KHz: {}", toInt(read(rdf, 24, 4))); | ||
| 40 | +// log.info("每秒波形的数据量:{}", toShort(read(rdf, 22, 2))); | ||
| 41 | +// log.info("采样帧的大小:{}", toShort(read(rdf, 32, 2))); | ||
| 42 | +// log.info("采样位数:{}", toShort(read(rdf, 34, 2))); | ||
| 43 | +// rdf.close(); | ||
| 44 | +// LibVosk.setLogLevel(LogLevel.WARNINGS); | ||
| 45 | +// try ( | ||
| 46 | +// Model model = new Model("D:\\pcm\\vosk-model-small-cn-0.22"); | ||
| 47 | +// InputStream ais = AudioSystem.getAudioInputStream(new BufferedInputStream(new FileInputStream(filePath))); | ||
| 48 | +// // 采样率为音频采样率的声道倍数 | ||
| 49 | +// Recognizer recognizer = new Recognizer(model, 16000 * track)) { | ||
| 50 | +// | ||
| 51 | +// recognizer.setWords(true); | ||
| 52 | +// | ||
| 53 | +// String result = recognizer.getFinalResult(); | ||
| 54 | +// log.info("识别结果:{}", result); | ||
| 55 | +// if (StringUtils.hasLength(result)) { | ||
| 56 | +// JSONObject jsonObject = JSON.parseObject(result); | ||
| 57 | +// return jsonObject.getString("text").replace(" ", ""); | ||
| 58 | +// } | ||
| 59 | +// return ""; | ||
| 60 | +// } | ||
| 61 | +// | ||
| 62 | +// | ||
| 63 | +// | ||
| 64 | +// } | ||
| 65 | +// | ||
| 66 | +// public static int toInt(byte[] b) { | ||
| 67 | +// return (((b[3] & 0xff) << 24) + ((b[2] & 0xff) << 16) + ((b[1] & 0xff) << 8) + ((b[0] & 0xff) << 0)); | ||
| 68 | +// } | ||
| 69 | +// | ||
| 70 | +// public static short toShort(byte[] b) { | ||
| 71 | +// return (short) ((b[1] << 8) + (b[0] << 0)); | ||
| 72 | +// } | ||
| 73 | +// | ||
| 74 | +// public static byte[] read(RandomAccessFile rdf, int pos, int length) throws IOException { | ||
| 75 | +// rdf.seek(pos); | ||
| 76 | +// byte result[] = new byte[length]; | ||
| 77 | +// for (int i = 0; i < length; i++) { | ||
| 78 | +// result[i] = rdf.readByte(); | ||
| 79 | +// } | ||
| 80 | +// return result; | ||
| 81 | +// } | ||
| 82 | +// | ||
| 83 | +// public static void reSamplingAndSave(byte[] data, String path) throws IOException, UnsupportedAudioFileException { | ||
| 84 | +// WaveFileReader reader = new WaveFileReader(); | ||
| 85 | +// AudioInputStream audioIn = reader.getAudioInputStream(new ByteArrayInputStream(data)); | ||
| 86 | +// AudioFormat srcFormat = audioIn.getFormat(); | ||
| 87 | +// int targetSampleRate = 16000; | ||
| 88 | +// AudioFormat dstFormat = new AudioFormat(srcFormat.getEncoding(), | ||
| 89 | +// targetSampleRate, | ||
| 90 | +// srcFormat.getSampleSizeInBits(), | ||
| 91 | +// srcFormat.getChannels(), | ||
| 92 | +// srcFormat.getFrameSize(), | ||
| 93 | +// srcFormat.getFrameRate(), | ||
| 94 | +// srcFormat.isBigEndian()); | ||
| 95 | +// AudioInputStream convertedIn = AudioSystem.getAudioInputStream(dstFormat, audioIn); | ||
| 96 | +// File file = new File(path); | ||
| 97 | +// WaveFileWriter writer = new WaveFileWriter(); | ||
| 98 | +// writer.write(convertedIn, AudioFileFormat.Type.WAVE, file); | ||
| 99 | +// }*/ | ||
| 100 | +//} | ||
| 101 | \ No newline at end of file | 101 | \ No newline at end of file |
src/main/java/com/bsth/entity/Cars.java
| 1 | package com.bsth.entity; | 1 | package com.bsth.entity; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.BEntity; | 3 | import com.bsth.entity.schedule.BEntity; |
| 4 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 4 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | 5 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 5 | import org.hibernate.annotations.Formula; | 6 | import org.hibernate.annotations.Formula; |
| 6 | 7 | ||
| @@ -145,6 +146,24 @@ public class Cars extends BEntity implements Serializable { | @@ -145,6 +146,24 @@ public class Cars extends BEntity implements Serializable { | ||
| 145 | /** 线路名称(TODO:在原系统里没有,这里暂时留着,并且不做线路关联,只保留个名字) */ | 146 | /** 线路名称(TODO:在原系统里没有,这里暂时留着,并且不做线路关联,只保留个名字) */ |
| 146 | private String xlmc; | 147 | private String xlmc; |
| 147 | 148 | ||
| 149 | + | ||
| 150 | + //** 车辆颜色 *//* | ||
| 151 | + @Transient | ||
| 152 | + @JsonIgnore | ||
| 153 | + private String color; | ||
| 154 | + //** 车辆最大乘坐人数 *//* | ||
| 155 | + @Transient | ||
| 156 | + @JsonIgnore | ||
| 157 | + private String maxPeople; | ||
| 158 | + //** 票价类型 *//* | ||
| 159 | + @Transient | ||
| 160 | + @JsonIgnore | ||
| 161 | + private String priceType; | ||
| 162 | + //** 票价 *//* | ||
| 163 | + @Transient | ||
| 164 | + @JsonIgnore | ||
| 165 | + private String price; | ||
| 166 | + | ||
| 148 | public Cars() {} | 167 | public Cars() {} |
| 149 | 168 | ||
| 150 | public Cars(Object id, Object nbbh, Object clbh, Object cph, Object sbbh) { | 169 | public Cars(Object id, Object nbbh, Object clbh, Object cph, Object sbbh) { |
| @@ -164,7 +183,40 @@ public class Cars extends BEntity implements Serializable { | @@ -164,7 +183,40 @@ public class Cars extends BEntity implements Serializable { | ||
| 164 | this.equipmentCode = sbbh.toString(); | 183 | this.equipmentCode = sbbh.toString(); |
| 165 | } | 184 | } |
| 166 | } | 185 | } |
| 167 | - | 186 | + |
| 187 | + | ||
| 188 | + public String getColor() { | ||
| 189 | + return color; | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + public void setColor(String color) { | ||
| 193 | + this.color = color; | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + public String getMaxPeople() { | ||
| 197 | + return maxPeople; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + public void setMaxPeople(String maxPeople) { | ||
| 201 | + this.maxPeople = maxPeople; | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + public String getPriceType() { | ||
| 205 | + return priceType; | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + public void setPriceType(String priceType) { | ||
| 209 | + this.priceType = priceType; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + public String getPrice() { | ||
| 213 | + return price; | ||
| 214 | + } | ||
| 215 | + | ||
| 216 | + public void setPrice(String price) { | ||
| 217 | + this.price = price; | ||
| 218 | + } | ||
| 219 | + | ||
| 168 | public String getServiceNo() { | 220 | public String getServiceNo() { |
| 169 | return serviceNo; | 221 | return serviceNo; |
| 170 | } | 222 | } |
src/main/java/com/bsth/entity/DKLInfo.java
0 → 100644
| 1 | +package com.bsth.entity; | ||
| 2 | + | ||
| 3 | +import javax.persistence.*; | ||
| 4 | +import java.util.Date; | ||
| 5 | + | ||
| 6 | + | ||
| 7 | + | ||
| 8 | +@Entity | ||
| 9 | +@Table(name = "dkl_info") | ||
| 10 | +public class DKLInfo { | ||
| 11 | + | ||
| 12 | + // ID | ||
| 13 | + @Id | ||
| 14 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 15 | + private Integer id; | ||
| 16 | + | ||
| 17 | + private String lineCode; | ||
| 18 | + | ||
| 19 | + private String lineName; | ||
| 20 | + | ||
| 21 | + private String stationCode; | ||
| 22 | + | ||
| 23 | + private String stationName; | ||
| 24 | + | ||
| 25 | + private int num; | ||
| 26 | + | ||
| 27 | + private String upDown; | ||
| 28 | + | ||
| 29 | + private String image; | ||
| 30 | + | ||
| 31 | + // 创建日期 | ||
| 32 | + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 33 | + private Date createDate; | ||
| 34 | + | ||
| 35 | + | ||
| 36 | + public Integer getId() { | ||
| 37 | + return id; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public void setId(Integer id) { | ||
| 41 | + this.id = id; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public String getLineCode() { | ||
| 45 | + return lineCode; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public void setLineCode(String lineCode) { | ||
| 49 | + this.lineCode = lineCode; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public String getLineName() { | ||
| 53 | + return lineName; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public void setLineName(String lineName) { | ||
| 57 | + this.lineName = lineName; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public String getStationCode() { | ||
| 61 | + return stationCode; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public void setStationCode(String stationCode) { | ||
| 65 | + this.stationCode = stationCode; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public String getStationName() { | ||
| 69 | + return stationName; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public void setStationName(String stationName) { | ||
| 73 | + this.stationName = stationName; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public int getNum() { | ||
| 77 | + return num; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public void setNum(int num) { | ||
| 81 | + this.num = num; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public String getUpDown() { | ||
| 85 | + return upDown; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public void setUpDown(String upDown) { | ||
| 89 | + this.upDown = upDown; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public String getImage() { | ||
| 93 | + return image; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public void setImage(String image) { | ||
| 97 | + this.image = image; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public Date getCreateDate() { | ||
| 101 | + return createDate; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public void setCreateDate(Date createDate) { | ||
| 105 | + this.createDate = createDate; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | +} |
src/main/java/com/bsth/entity/directive/D80.java
| @@ -78,6 +78,7 @@ public class D80 { | @@ -78,6 +78,7 @@ public class D80 { | ||
| 78 | @JsonIgnore | 78 | @JsonIgnore |
| 79 | private Short requestCode; | 79 | private Short requestCode; |
| 80 | 80 | ||
| 81 | + | ||
| 81 | public Long getSchId() { | 82 | public Long getSchId() { |
| 82 | return schId; | 83 | return schId; |
| 83 | } | 84 | } |
| @@ -110,6 +111,30 @@ public class D80 { | @@ -110,6 +111,30 @@ public class D80 { | ||
| 110 | this.requestCode = requestCode; | 111 | this.requestCode = requestCode; |
| 111 | } | 112 | } |
| 112 | 113 | ||
| 114 | + @Transient | ||
| 115 | + @JsonIgnore | ||
| 116 | + private String stationName; | ||
| 117 | + @Transient | ||
| 118 | + @JsonIgnore | ||
| 119 | + private Long nextschId; | ||
| 120 | + | ||
| 121 | + public Long getNextschId() { | ||
| 122 | + return nextschId; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + public void setNextschId(Long nextschId) { | ||
| 126 | + this.nextschId = nextschId; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + public String getStationName() { | ||
| 130 | + return stationName; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public void setStationName(String stationName) { | ||
| 134 | + this.stationName = stationName; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + | ||
| 113 | @Embeddable | 138 | @Embeddable |
| 114 | public static class D80Data { | 139 | public static class D80Data { |
| 115 | 140 | ||
| @@ -121,6 +146,9 @@ public class D80 { | @@ -121,6 +146,9 @@ public class D80 { | ||
| 121 | /** | 146 | /** |
| 122 | * 请求代码 0xa1 恢复运营 0xa2 申请调档 0xa3 出场请求 0xa5 进场请求 0xa7 加油请求 0x50 车辆故障 0x70 | 147 | * 请求代码 0xa1 恢复运营 0xa2 申请调档 0xa3 出场请求 0xa5 进场请求 0xa7 加油请求 0x50 车辆故障 0x70 |
| 123 | * 路阻报告 0x60 事故报告 0x11 扣证纠纷 0x12 报警 0x10 S0S | 148 | * 路阻报告 0x60 事故报告 0x11 扣证纠纷 0x12 报警 0x10 S0S |
| 149 | + * 0x21 单车有人伤 0x22 单车无人伤 | ||
| 150 | + * 0x23 双车有人伤 0x24 双车无人伤 | ||
| 151 | + * | ||
| 124 | */ | 152 | */ |
| 125 | private Short requestCode; | 153 | private Short requestCode; |
| 126 | 154 | ||
| @@ -134,7 +162,48 @@ public class D80 { | @@ -134,7 +162,48 @@ public class D80 { | ||
| 134 | */ | 162 | */ |
| 135 | @Transient | 163 | @Transient |
| 136 | private String nbbm; | 164 | private String nbbm; |
| 137 | - | 165 | + /** |
| 166 | + * 经度 | ||
| 167 | + */ | ||
| 168 | + @Transient | ||
| 169 | + @JsonIgnore | ||
| 170 | + private Float lon; | ||
| 171 | + | ||
| 172 | + /** | ||
| 173 | + * 纬度 | ||
| 174 | + */ | ||
| 175 | + @Transient | ||
| 176 | + @JsonIgnore | ||
| 177 | + private Float lat; | ||
| 178 | + @Transient | ||
| 179 | + @JsonIgnore | ||
| 180 | + private String stopNo; | ||
| 181 | + | ||
| 182 | + | ||
| 183 | + public String getStopNo() { | ||
| 184 | + return stopNo; | ||
| 185 | + } | ||
| 186 | + | ||
| 187 | + public void setStopNo(String stopNo) { | ||
| 188 | + this.stopNo = stopNo; | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + public Float getLon() { | ||
| 192 | + return lon; | ||
| 193 | + } | ||
| 194 | + | ||
| 195 | + public void setLon(Float lon) { | ||
| 196 | + this.lon = lon; | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + public Float getLat() { | ||
| 200 | + return lat; | ||
| 201 | + } | ||
| 202 | + | ||
| 203 | + public void setLat(Float lat) { | ||
| 204 | + this.lat = lat; | ||
| 205 | + } | ||
| 206 | + | ||
| 138 | public Short getOperCode2() { | 207 | public Short getOperCode2() { |
| 139 | return operCode2; | 208 | return operCode2; |
| 140 | } | 209 | } |
src/main/java/com/bsth/entity/lg_travel/Region.java
0 → 100644
| 1 | +package com.bsth.entity.lg_travel; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.BEntity; | ||
| 4 | + | ||
| 5 | +import javax.persistence.Entity; | ||
| 6 | +import javax.persistence.Id; | ||
| 7 | +import javax.persistence.Table; | ||
| 8 | +import java.io.Serializable; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * 区域 | ||
| 12 | + */ | ||
| 13 | +@Entity | ||
| 14 | +@Table(name = "bsth_c_region") | ||
| 15 | +public class Region extends BEntity implements Serializable { | ||
| 16 | + @Id | ||
| 17 | + private Long id; | ||
| 18 | + //区域名称 | ||
| 19 | + private String name; | ||
| 20 | + //是否删除 | ||
| 21 | + private String destroy; | ||
| 22 | + | ||
| 23 | + | ||
| 24 | + | ||
| 25 | + | ||
| 26 | + public void setId(Long id) { | ||
| 27 | + this.id = id; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public Long getId() { | ||
| 31 | + return id; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public String getName() { | ||
| 35 | + return name; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public void setName(String name) { | ||
| 39 | + this.name = name; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public String getDestroy() { | ||
| 43 | + return destroy; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public void setDestroy(String destroy) { | ||
| 47 | + this.destroy = destroy; | ||
| 48 | + } | ||
| 49 | +} | ||
| 0 | \ No newline at end of file | 50 | \ No newline at end of file |
src/main/java/com/bsth/entity/lg_travel/RegionLineCar.java
0 → 100644
| 1 | +package com.bsth.entity.lg_travel; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.Line; | ||
| 4 | +import com.bsth.entity.schedule.BEntity; | ||
| 5 | + | ||
| 6 | +import javax.persistence.*; | ||
| 7 | +import java.io.Serializable; | ||
| 8 | + | ||
| 9 | +/** | ||
| 10 | + * 区域 | ||
| 11 | + */ | ||
| 12 | +@Entity | ||
| 13 | +@Table(name = "bsth_c_region_line_car") | ||
| 14 | +public class RegionLineCar extends BEntity implements Serializable { | ||
| 15 | + @Id | ||
| 16 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 17 | + private Long id; | ||
| 18 | + //区域名称 | ||
| 19 | + @ManyToOne | ||
| 20 | + private Region region; | ||
| 21 | + //线路 | ||
| 22 | + @ManyToOne | ||
| 23 | + private Line line; | ||
| 24 | + //线路名称 | ||
| 25 | + private String lineName; | ||
| 26 | + //车辆自编号 | ||
| 27 | + private String clZbh; | ||
| 28 | + | ||
| 29 | + public Long getId() { | ||
| 30 | + return id; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public void setId(Long id) { | ||
| 34 | + this.id = id; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + public Region getRegion() { | ||
| 39 | + return region; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public void setRegion(Region region) { | ||
| 43 | + this.region = region; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public Line getLine() { | ||
| 47 | + return line; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setLine(Line line) { | ||
| 51 | + this.line = line; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public String getLineName() { | ||
| 55 | + return lineName; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public void setLineName(String lineName) { | ||
| 59 | + this.lineName = lineName; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public String getClZbh() { | ||
| 63 | + return clZbh; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public void setClZbh(String clZbh) { | ||
| 67 | + this.clZbh = clZbh; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + | ||
| 71 | +} | ||
| 0 | \ No newline at end of file | 72 | \ No newline at end of file |
src/main/java/com/bsth/entity/oil/Dlb.java
| 1 | -package com.bsth.entity.oil; | ||
| 2 | - | ||
| 3 | -import java.text.DecimalFormat; | ||
| 4 | -import java.util.Date; | ||
| 5 | - | ||
| 6 | -import javax.persistence.*; | ||
| 7 | - | ||
| 8 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | - | ||
| 10 | -import com.bsth.data.BasicData; | ||
| 11 | - | ||
| 12 | -@Entity | ||
| 13 | -@Table(name = "bsth_c_dlb") | ||
| 14 | -public class Dlb { | ||
| 15 | - @Id | ||
| 16 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 17 | - private Integer id; | ||
| 18 | - @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 19 | - private Date rq; | ||
| 20 | - private String xlbm; | ||
| 21 | - private String linename; | ||
| 22 | - private String ssgsdm; | ||
| 23 | - private String fgsdm; | ||
| 24 | - private String nbbm; | ||
| 25 | - private String jsy; | ||
| 26 | - private Double czlc=0.0; | ||
| 27 | - private Double jzlc=0.0; | ||
| 28 | - //出站存电 | ||
| 29 | - private Double czcd=0.0; | ||
| 30 | - //进站存电 | ||
| 31 | - private Double jzcd=0.0; | ||
| 32 | - //充电量 | ||
| 33 | - private Double cdl; | ||
| 34 | - private int sfkt; | ||
| 35 | - private String jhsj; | ||
| 36 | - //耗电 | ||
| 37 | - private Double hd=0.0; | ||
| 38 | - private Double sh=0.0; | ||
| 39 | - private String shyy; | ||
| 40 | - private Double zlc=0.0; | ||
| 41 | - private int yhlx; | ||
| 42 | - | ||
| 43 | - private Double ns=0.0; | ||
| 44 | - private Double fyylc=0.0; | ||
| 45 | - private Double jhzlc=0.0; | ||
| 46 | - private Double jhfyylc=0.0; | ||
| 47 | - private int jhzbc; | ||
| 48 | - private int jhbc; | ||
| 49 | - private int sjzbc; | ||
| 50 | - private int sjbc; | ||
| 51 | - private String edituser; | ||
| 52 | - private Date edittime; | ||
| 53 | - private Date createtime; | ||
| 54 | - private Date updatetime; | ||
| 55 | - private int nylx; | ||
| 56 | - //进场顺序(根据最先出场和最后进场来关联车辆的存电量) | ||
| 57 | - private int jcsx; | ||
| 58 | - | ||
| 59 | - private String jname; | ||
| 60 | - @Transient | ||
| 61 | - private String name; | ||
| 62 | - @Transient | ||
| 63 | - private String bglyh; | ||
| 64 | - | ||
| 65 | - @Transient | ||
| 66 | - private String xlname; | ||
| 67 | - | ||
| 68 | - @Transient | ||
| 69 | - private String gsname; | ||
| 70 | - | ||
| 71 | - @Transient | ||
| 72 | - private String fgsname; | ||
| 73 | - | ||
| 74 | - | ||
| 75 | - | ||
| 76 | - private String lp; | ||
| 77 | - | ||
| 78 | - public Integer getId() { | ||
| 79 | - return id; | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - public void setId(Integer id) { | ||
| 83 | - this.id = id; | ||
| 84 | - } | ||
| 85 | - | ||
| 86 | - public Date getRq() { | ||
| 87 | - return rq; | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - public void setRq(Date rq) { | ||
| 91 | - this.rq = rq; | ||
| 92 | - } | ||
| 93 | - | ||
| 94 | - public String getXlbm() { | ||
| 95 | - return xlbm; | ||
| 96 | - } | ||
| 97 | - | ||
| 98 | - public void setXlbm(String xlbm) { | ||
| 99 | - this.xlbm = xlbm; | ||
| 100 | - } | ||
| 101 | - | ||
| 102 | - public String getLinename() { | ||
| 103 | - return linename; | ||
| 104 | - } | ||
| 105 | - | ||
| 106 | - public void setLinename(String linename) { | ||
| 107 | - this.linename = linename; | ||
| 108 | - } | ||
| 109 | - | ||
| 110 | - public String getSsgsdm() { | ||
| 111 | - return ssgsdm; | ||
| 112 | - } | ||
| 113 | - | ||
| 114 | - public void setSsgsdm(String ssgsdm) { | ||
| 115 | - this.ssgsdm = ssgsdm; | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - public String getFgsdm() { | ||
| 119 | - return fgsdm; | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | - public void setFgsdm(String fgsdm) { | ||
| 123 | - this.fgsdm = fgsdm; | ||
| 124 | - } | ||
| 125 | - | ||
| 126 | - public String getNbbm() { | ||
| 127 | - return nbbm; | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - public void setNbbm(String nbbm) { | ||
| 131 | - this.nbbm = nbbm; | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - public String getJsy() { | ||
| 135 | - return jsy; | ||
| 136 | - } | ||
| 137 | - | ||
| 138 | - public void setJsy(String jsy) { | ||
| 139 | - this.jsy = jsy; | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - public Double getCzlc() { | ||
| 143 | - return czlc; | ||
| 144 | - } | ||
| 145 | - | ||
| 146 | - public void setCzlc(Double czlc) { | ||
| 147 | - this.czlc = czlc; | ||
| 148 | - } | ||
| 149 | - | ||
| 150 | - public Double getJzlc() { | ||
| 151 | - return jzlc; | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - public void setJzlc(Double jzlc) { | ||
| 155 | - this.jzlc = jzlc; | ||
| 156 | - } | ||
| 157 | - | ||
| 158 | - public Double getCzcd() { | ||
| 159 | - return czcd; | ||
| 160 | - } | ||
| 161 | - | ||
| 162 | - public void setCzcd(Double czcd) { | ||
| 163 | - this.czcd = czcd; | ||
| 164 | - } | ||
| 165 | - | ||
| 166 | - public Double getJzcd() { | ||
| 167 | - return jzcd; | ||
| 168 | - } | ||
| 169 | - | ||
| 170 | - public void setJzcd(Double jzcd) { | ||
| 171 | - this.jzcd = jzcd; | ||
| 172 | - } | ||
| 173 | - | ||
| 174 | - public Double getCdl() { | ||
| 175 | - return cdl; | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - public void setCdl(Double cdl) { | ||
| 179 | - this.cdl = cdl; | ||
| 180 | - } | ||
| 181 | - | ||
| 182 | - public int getSfkt() { | ||
| 183 | - return sfkt; | ||
| 184 | - } | ||
| 185 | - | ||
| 186 | - public void setSfkt(int sfkt) { | ||
| 187 | - this.sfkt = sfkt; | ||
| 188 | - } | ||
| 189 | - | ||
| 190 | - public String getJhsj() { | ||
| 191 | - return jhsj; | ||
| 192 | - } | ||
| 193 | - | ||
| 194 | - public void setJhsj(String jhsj) { | ||
| 195 | - this.jhsj = jhsj; | ||
| 196 | - } | ||
| 197 | - | ||
| 198 | - public Double getHd() { | ||
| 199 | - return hd; | ||
| 200 | - } | ||
| 201 | - | ||
| 202 | - public void setHd(Double hd) { | ||
| 203 | - this.hd = hd; | ||
| 204 | - } | ||
| 205 | - | ||
| 206 | - public Double getSh() { | ||
| 207 | - return sh; | ||
| 208 | - } | ||
| 209 | - | ||
| 210 | - public void setSh(Double sh) { | ||
| 211 | - this.sh = sh; | ||
| 212 | - } | ||
| 213 | - | ||
| 214 | - public String getShyy() { | ||
| 215 | - return shyy; | ||
| 216 | - } | ||
| 217 | - | ||
| 218 | - public void setShyy(String shyy) { | ||
| 219 | - this.shyy = shyy; | ||
| 220 | - } | ||
| 221 | - | ||
| 222 | - public Double getZlc() { | ||
| 223 | - return zlc; | ||
| 224 | - } | ||
| 225 | - | ||
| 226 | - public void setZlc(Double zlc) { | ||
| 227 | - this.zlc = zlc; | ||
| 228 | - } | ||
| 229 | - | ||
| 230 | - public int getYhlx() { | ||
| 231 | - return yhlx; | ||
| 232 | - } | ||
| 233 | - | ||
| 234 | - public void setYhlx(int yhlx) { | ||
| 235 | - this.yhlx = yhlx; | ||
| 236 | - } | ||
| 237 | - | ||
| 238 | - public Double getNs() { | ||
| 239 | - return ns; | ||
| 240 | - } | ||
| 241 | - | ||
| 242 | - public void setNs(Double ns) { | ||
| 243 | - this.ns = ns; | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | - public Double getFyylc() { | ||
| 247 | - return fyylc; | ||
| 248 | - } | ||
| 249 | - | ||
| 250 | - public void setFyylc(Double fyylc) { | ||
| 251 | - this.fyylc = fyylc; | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - public Double getJhzlc() { | ||
| 255 | - return jhzlc; | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - public void setJhzlc(Double jhzlc) { | ||
| 259 | - this.jhzlc = jhzlc; | ||
| 260 | - } | ||
| 261 | - | ||
| 262 | - public Double getJhfyylc() { | ||
| 263 | - return jhfyylc; | ||
| 264 | - } | ||
| 265 | - | ||
| 266 | - public void setJhfyylc(Double jhfyylc) { | ||
| 267 | - this.jhfyylc = jhfyylc; | ||
| 268 | - } | ||
| 269 | - | ||
| 270 | - public int getJhzbc() { | ||
| 271 | - return jhzbc; | ||
| 272 | - } | ||
| 273 | - | ||
| 274 | - public void setJhzbc(int jhzbc) { | ||
| 275 | - this.jhzbc = jhzbc; | ||
| 276 | - } | ||
| 277 | - | ||
| 278 | - public int getJhbc() { | ||
| 279 | - return jhbc; | ||
| 280 | - } | ||
| 281 | - | ||
| 282 | - public void setJhbc(int jhbc) { | ||
| 283 | - this.jhbc = jhbc; | ||
| 284 | - } | ||
| 285 | - | ||
| 286 | - public int getSjzbc() { | ||
| 287 | - return sjzbc; | ||
| 288 | - } | ||
| 289 | - | ||
| 290 | - public void setSjzbc(int sjzbc) { | ||
| 291 | - this.sjzbc = sjzbc; | ||
| 292 | - } | ||
| 293 | - | ||
| 294 | - public int getSjbc() { | ||
| 295 | - return sjbc; | ||
| 296 | - } | ||
| 297 | - | ||
| 298 | - public void setSjbc(int sjbc) { | ||
| 299 | - this.sjbc = sjbc; | ||
| 300 | - } | ||
| 301 | - | ||
| 302 | - public String getEdituser() { | ||
| 303 | - return edituser; | ||
| 304 | - } | ||
| 305 | - | ||
| 306 | - public void setEdituser(String edituser) { | ||
| 307 | - this.edituser = edituser; | ||
| 308 | - } | ||
| 309 | - | ||
| 310 | - public Date getEdittime() { | ||
| 311 | - return edittime; | ||
| 312 | - } | ||
| 313 | - | ||
| 314 | - public void setEdittime(Date edittime) { | ||
| 315 | - this.edittime = edittime; | ||
| 316 | - } | ||
| 317 | - | ||
| 318 | - public Date getCreatetime() { | ||
| 319 | - return createtime; | ||
| 320 | - } | ||
| 321 | - | ||
| 322 | - public void setCreatetime(Date createtime) { | ||
| 323 | - this.createtime = createtime; | ||
| 324 | - } | ||
| 325 | - | ||
| 326 | - public int getNylx() { | ||
| 327 | - return nylx; | ||
| 328 | - } | ||
| 329 | - | ||
| 330 | - public void setNylx(int nylx) { | ||
| 331 | - this.nylx = nylx; | ||
| 332 | - } | ||
| 333 | - | ||
| 334 | - public int getJcsx() { | ||
| 335 | - return jcsx; | ||
| 336 | - } | ||
| 337 | - | ||
| 338 | - public void setJcsx(int jcsx) { | ||
| 339 | - this.jcsx = jcsx; | ||
| 340 | - } | ||
| 341 | - | ||
| 342 | - public String getBglyh() { | ||
| 343 | - if(this.getZlc()==0){ | ||
| 344 | - return "0"; | ||
| 345 | - }else{ | ||
| 346 | - DecimalFormat df = new DecimalFormat("0.00"); | ||
| 347 | - return df.format(this.getHd()/this.getZlc()*100); | ||
| 348 | - } | ||
| 349 | - } | ||
| 350 | - | ||
| 351 | - public void setBglyh(String bglyh) { | ||
| 352 | - this.bglyh = bglyh; | ||
| 353 | - } | ||
| 354 | - | ||
| 355 | - public String getXlname() { | ||
| 356 | - return BasicData.lineCodeAllNameMap.get(this.xlbm); | ||
| 357 | - } | ||
| 358 | - | ||
| 359 | - public void setXlname(String xlname) { | ||
| 360 | - this.xlname = xlname; | ||
| 361 | - } | ||
| 362 | - | ||
| 363 | - public String getGsname() { | ||
| 364 | - return BasicData.businessCodeNameMap.get(this.ssgsdm); | ||
| 365 | - } | ||
| 366 | - | ||
| 367 | - public void setGsname(String gsname) { | ||
| 368 | - this.gsname = gsname; | ||
| 369 | - } | ||
| 370 | - | ||
| 371 | - public String getName() { | ||
| 372 | - return BasicData.allPerson.get(this.ssgsdm+"-"+this.jsy); | ||
| 373 | - } | ||
| 374 | - | ||
| 375 | - public void setName(String name) { | ||
| 376 | - this.name = name; | ||
| 377 | - } | ||
| 378 | - | ||
| 379 | - public String getFgsname() { | ||
| 380 | - return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.ssgsdm); | ||
| 381 | - } | ||
| 382 | - | ||
| 383 | - public void setFgsname(String fgsname) { | ||
| 384 | - this.fgsname = fgsname; | ||
| 385 | - } | ||
| 386 | - | ||
| 387 | - public Date getUpdatetime() { | ||
| 388 | - return updatetime; | ||
| 389 | - } | ||
| 390 | - | ||
| 391 | - public void setUpdatetime(Date updatetime) { | ||
| 392 | - this.updatetime = updatetime; | ||
| 393 | - } | ||
| 394 | - | ||
| 395 | - public String getLp() { | ||
| 396 | - return lp; | ||
| 397 | - } | ||
| 398 | - | ||
| 399 | - public void setLp(String lp) { | ||
| 400 | - this.lp = lp; | ||
| 401 | - } | ||
| 402 | - | ||
| 403 | - public String getJname() { | ||
| 404 | - return jname; | ||
| 405 | - } | ||
| 406 | - | ||
| 407 | - public void setJname(String jname) { | ||
| 408 | - this.jname = jname; | ||
| 409 | - } | ||
| 410 | - | ||
| 411 | - | ||
| 412 | - | ||
| 413 | -} | 1 | +package com.bsth.entity.oil; |
| 2 | + | ||
| 3 | +import java.text.DecimalFormat; | ||
| 4 | +import java.util.Date; | ||
| 5 | + | ||
| 6 | +import javax.persistence.*; | ||
| 7 | + | ||
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | + | ||
| 10 | +import com.bsth.data.BasicData; | ||
| 11 | + | ||
| 12 | +@Entity | ||
| 13 | +@Table(name = "bsth_c_dlb") | ||
| 14 | +public class Dlb { | ||
| 15 | + @Id | ||
| 16 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 17 | + private Integer id; | ||
| 18 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 19 | + private Date rq; | ||
| 20 | + private String xlbm; | ||
| 21 | + private String linename; | ||
| 22 | + private String ssgsdm; | ||
| 23 | + private String fgsdm; | ||
| 24 | + private String nbbm; | ||
| 25 | + private String jsy; | ||
| 26 | + private Double czlc=0.0; | ||
| 27 | + private Double jzlc=0.0; | ||
| 28 | + //出站存电 | ||
| 29 | + private Double czcd=0.0; | ||
| 30 | + //进站存电 | ||
| 31 | + private Double jzcd=0.0; | ||
| 32 | + //充电量 | ||
| 33 | + private Double cdl; | ||
| 34 | + private int sfkt; | ||
| 35 | + private String jhsj; | ||
| 36 | + //耗电 | ||
| 37 | + private Double hd=0.0; | ||
| 38 | + private Double sh=0.0; | ||
| 39 | + private String shyy; | ||
| 40 | + private Double zlc=0.0; | ||
| 41 | + private int yhlx; | ||
| 42 | + | ||
| 43 | + private Double ns=0.0; | ||
| 44 | + private Double fyylc=0.0; | ||
| 45 | + private Double jhzlc=0.0; | ||
| 46 | + private Double jhfyylc=0.0; | ||
| 47 | + private int jhzbc; | ||
| 48 | + private int jhbc; | ||
| 49 | + private int sjzbc; | ||
| 50 | + private int sjbc; | ||
| 51 | + private String edituser; | ||
| 52 | + private Date edittime; | ||
| 53 | + private Date createtime; | ||
| 54 | + private Date updatetime; | ||
| 55 | + private int nylx; | ||
| 56 | + //进场顺序(根据最先出场和最后进场来关联车辆的存电量) | ||
| 57 | + private int jcsx; | ||
| 58 | + | ||
| 59 | + private String jname; | ||
| 60 | + @Transient | ||
| 61 | + private String name; | ||
| 62 | + @Transient | ||
| 63 | + private String bglyh; | ||
| 64 | + | ||
| 65 | + @Transient | ||
| 66 | + private String xlname; | ||
| 67 | + | ||
| 68 | + @Transient | ||
| 69 | + private String gsname; | ||
| 70 | + | ||
| 71 | + @Transient | ||
| 72 | + private String fgsname; | ||
| 73 | + | ||
| 74 | + | ||
| 75 | + | ||
| 76 | + private String lp; | ||
| 77 | + | ||
| 78 | + public Integer getId() { | ||
| 79 | + return id; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public void setId(Integer id) { | ||
| 83 | + this.id = id; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + public Date getRq() { | ||
| 87 | + return rq; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public void setRq(Date rq) { | ||
| 91 | + this.rq = rq; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + public String getXlbm() { | ||
| 95 | + return xlbm; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public void setXlbm(String xlbm) { | ||
| 99 | + this.xlbm = xlbm; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + public String getLinename() { | ||
| 103 | + return linename; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public void setLinename(String linename) { | ||
| 107 | + this.linename = linename; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public String getSsgsdm() { | ||
| 111 | + return ssgsdm; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public void setSsgsdm(String ssgsdm) { | ||
| 115 | + this.ssgsdm = ssgsdm; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public String getFgsdm() { | ||
| 119 | + return fgsdm; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public void setFgsdm(String fgsdm) { | ||
| 123 | + this.fgsdm = fgsdm; | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + public String getNbbm() { | ||
| 127 | + return nbbm; | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + public void setNbbm(String nbbm) { | ||
| 131 | + this.nbbm = nbbm; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + public String getJsy() { | ||
| 135 | + return jsy; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + public void setJsy(String jsy) { | ||
| 139 | + this.jsy = jsy; | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + public Double getCzlc() { | ||
| 143 | + return czlc; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + public void setCzlc(Double czlc) { | ||
| 147 | + this.czlc = czlc; | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + public Double getJzlc() { | ||
| 151 | + return jzlc; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public void setJzlc(Double jzlc) { | ||
| 155 | + this.jzlc = jzlc; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + public Double getCzcd() { | ||
| 159 | + return czcd; | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + public void setCzcd(Double czcd) { | ||
| 163 | + this.czcd = czcd; | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | + public Double getJzcd() { | ||
| 167 | + return jzcd; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + public void setJzcd(Double jzcd) { | ||
| 171 | + this.jzcd = jzcd; | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + public Double getCdl() { | ||
| 175 | + return cdl; | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + public void setCdl(Double cdl) { | ||
| 179 | + this.cdl = cdl; | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + public int getSfkt() { | ||
| 183 | + return sfkt; | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + public void setSfkt(int sfkt) { | ||
| 187 | + this.sfkt = sfkt; | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + public String getJhsj() { | ||
| 191 | + return jhsj; | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + public void setJhsj(String jhsj) { | ||
| 195 | + this.jhsj = jhsj; | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | + public Double getHd() { | ||
| 199 | + return hd; | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + public void setHd(Double hd) { | ||
| 203 | + this.hd = hd; | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + public Double getSh() { | ||
| 207 | + return sh; | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + public void setSh(Double sh) { | ||
| 211 | + this.sh = sh; | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + public String getShyy() { | ||
| 215 | + return shyy; | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + public void setShyy(String shyy) { | ||
| 219 | + this.shyy = shyy; | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + public Double getZlc() { | ||
| 223 | + return zlc; | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + public void setZlc(Double zlc) { | ||
| 227 | + this.zlc = zlc; | ||
| 228 | + } | ||
| 229 | + | ||
| 230 | + public int getYhlx() { | ||
| 231 | + return yhlx; | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | + public void setYhlx(int yhlx) { | ||
| 235 | + this.yhlx = yhlx; | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + public Double getNs() { | ||
| 239 | + return ns; | ||
| 240 | + } | ||
| 241 | + | ||
| 242 | + public void setNs(Double ns) { | ||
| 243 | + this.ns = ns; | ||
| 244 | + } | ||
| 245 | + | ||
| 246 | + public Double getFyylc() { | ||
| 247 | + return fyylc; | ||
| 248 | + } | ||
| 249 | + | ||
| 250 | + public void setFyylc(Double fyylc) { | ||
| 251 | + this.fyylc = fyylc; | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + public Double getJhzlc() { | ||
| 255 | + return jhzlc; | ||
| 256 | + } | ||
| 257 | + | ||
| 258 | + public void setJhzlc(Double jhzlc) { | ||
| 259 | + this.jhzlc = jhzlc; | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + public Double getJhfyylc() { | ||
| 263 | + return jhfyylc; | ||
| 264 | + } | ||
| 265 | + | ||
| 266 | + public void setJhfyylc(Double jhfyylc) { | ||
| 267 | + this.jhfyylc = jhfyylc; | ||
| 268 | + } | ||
| 269 | + | ||
| 270 | + public int getJhzbc() { | ||
| 271 | + return jhzbc; | ||
| 272 | + } | ||
| 273 | + | ||
| 274 | + public void setJhzbc(int jhzbc) { | ||
| 275 | + this.jhzbc = jhzbc; | ||
| 276 | + } | ||
| 277 | + | ||
| 278 | + public int getJhbc() { | ||
| 279 | + return jhbc; | ||
| 280 | + } | ||
| 281 | + | ||
| 282 | + public void setJhbc(int jhbc) { | ||
| 283 | + this.jhbc = jhbc; | ||
| 284 | + } | ||
| 285 | + | ||
| 286 | + public int getSjzbc() { | ||
| 287 | + return sjzbc; | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + public void setSjzbc(int sjzbc) { | ||
| 291 | + this.sjzbc = sjzbc; | ||
| 292 | + } | ||
| 293 | + | ||
| 294 | + public int getSjbc() { | ||
| 295 | + return sjbc; | ||
| 296 | + } | ||
| 297 | + | ||
| 298 | + public void setSjbc(int sjbc) { | ||
| 299 | + this.sjbc = sjbc; | ||
| 300 | + } | ||
| 301 | + | ||
| 302 | + public String getEdituser() { | ||
| 303 | + return edituser; | ||
| 304 | + } | ||
| 305 | + | ||
| 306 | + public void setEdituser(String edituser) { | ||
| 307 | + this.edituser = edituser; | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + public Date getEdittime() { | ||
| 311 | + return edittime; | ||
| 312 | + } | ||
| 313 | + | ||
| 314 | + public void setEdittime(Date edittime) { | ||
| 315 | + this.edittime = edittime; | ||
| 316 | + } | ||
| 317 | + | ||
| 318 | + public Date getCreatetime() { | ||
| 319 | + return createtime; | ||
| 320 | + } | ||
| 321 | + | ||
| 322 | + public void setCreatetime(Date createtime) { | ||
| 323 | + this.createtime = createtime; | ||
| 324 | + } | ||
| 325 | + | ||
| 326 | + public int getNylx() { | ||
| 327 | + return nylx; | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + public void setNylx(int nylx) { | ||
| 331 | + this.nylx = nylx; | ||
| 332 | + } | ||
| 333 | + | ||
| 334 | + public int getJcsx() { | ||
| 335 | + return jcsx; | ||
| 336 | + } | ||
| 337 | + | ||
| 338 | + public void setJcsx(int jcsx) { | ||
| 339 | + this.jcsx = jcsx; | ||
| 340 | + } | ||
| 341 | + | ||
| 342 | + public String getBglyh() { | ||
| 343 | + if(this.getZlc()==0){ | ||
| 344 | + return "0"; | ||
| 345 | + }else{ | ||
| 346 | + DecimalFormat df = new DecimalFormat("0.000"); | ||
| 347 | + return df.format(this.getHd()/this.getZlc()*100); | ||
| 348 | + } | ||
| 349 | + } | ||
| 350 | + | ||
| 351 | + public void setBglyh(String bglyh) { | ||
| 352 | + this.bglyh = bglyh; | ||
| 353 | + } | ||
| 354 | + | ||
| 355 | + public String getXlname() { | ||
| 356 | + return BasicData.lineCodeAllNameMap.get(this.xlbm); | ||
| 357 | + } | ||
| 358 | + | ||
| 359 | + public void setXlname(String xlname) { | ||
| 360 | + this.xlname = xlname; | ||
| 361 | + } | ||
| 362 | + | ||
| 363 | + public String getGsname() { | ||
| 364 | + return BasicData.businessCodeNameMap.get(this.ssgsdm); | ||
| 365 | + } | ||
| 366 | + | ||
| 367 | + public void setGsname(String gsname) { | ||
| 368 | + this.gsname = gsname; | ||
| 369 | + } | ||
| 370 | + | ||
| 371 | + public String getName() { | ||
| 372 | + return BasicData.allPerson.get(this.ssgsdm+"-"+this.jsy); | ||
| 373 | + } | ||
| 374 | + | ||
| 375 | + public void setName(String name) { | ||
| 376 | + this.name = name; | ||
| 377 | + } | ||
| 378 | + | ||
| 379 | + public String getFgsname() { | ||
| 380 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.ssgsdm); | ||
| 381 | + } | ||
| 382 | + | ||
| 383 | + public void setFgsname(String fgsname) { | ||
| 384 | + this.fgsname = fgsname; | ||
| 385 | + } | ||
| 386 | + | ||
| 387 | + public Date getUpdatetime() { | ||
| 388 | + return updatetime; | ||
| 389 | + } | ||
| 390 | + | ||
| 391 | + public void setUpdatetime(Date updatetime) { | ||
| 392 | + this.updatetime = updatetime; | ||
| 393 | + } | ||
| 394 | + | ||
| 395 | + public String getLp() { | ||
| 396 | + return lp; | ||
| 397 | + } | ||
| 398 | + | ||
| 399 | + public void setLp(String lp) { | ||
| 400 | + this.lp = lp; | ||
| 401 | + } | ||
| 402 | + | ||
| 403 | + public String getJname() { | ||
| 404 | + return jname; | ||
| 405 | + } | ||
| 406 | + | ||
| 407 | + public void setJname(String jname) { | ||
| 408 | + this.jname = jname; | ||
| 409 | + } | ||
| 410 | + | ||
| 411 | + | ||
| 412 | + | ||
| 413 | +} |
src/main/java/com/bsth/entity/oil/JdlConnector.java
0 → 100644
| 1 | +package com.bsth.entity.oil; | ||
| 2 | + | ||
| 3 | +import java.util.Date; | ||
| 4 | + | ||
| 5 | +import javax.persistence.Entity; | ||
| 6 | +import javax.persistence.GeneratedValue; | ||
| 7 | +import javax.persistence.GenerationType; | ||
| 8 | +import javax.persistence.Id; | ||
| 9 | +import javax.persistence.Table; | ||
| 10 | + | ||
| 11 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | +-------------------------------------------------------- | ||
| 15 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID', | ||
| 16 | + `connector_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '充电枪名称', | ||
| 17 | + `connector_id` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '充电枪自编号', | ||
| 18 | + `station_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '充电站名称', | ||
| 19 | + `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', | ||
| 20 | + `create_by` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', | ||
| 21 | + `create_date` datetime DEFAULT NULL COMMENT '创建时间', | ||
| 22 | + `update_by` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人', | ||
| 23 | + `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', | ||
| 24 | +*/ | ||
| 25 | +@Entity | ||
| 26 | +@Table(name = "bsth_c_jdl_connector") | ||
| 27 | +public class JdlConnector { | ||
| 28 | + @Id | ||
| 29 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 30 | + private Integer id; | ||
| 31 | + private String connectorName; | ||
| 32 | + private String connectorId; | ||
| 33 | + private String stationName; | ||
| 34 | + private String remark; | ||
| 35 | + private String createBy; | ||
| 36 | + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
| 37 | + private Date createDate; | ||
| 38 | + private String updateBy; | ||
| 39 | + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
| 40 | + private Date updateDate; | ||
| 41 | + | ||
| 42 | + | ||
| 43 | + public Integer getId() { | ||
| 44 | + return id; | ||
| 45 | + } | ||
| 46 | + public void setId(Integer id) { | ||
| 47 | + this.id = id; | ||
| 48 | + } | ||
| 49 | + public String getConnectorName() { | ||
| 50 | + return connectorName; | ||
| 51 | + } | ||
| 52 | + public void setConnectorName(String connectorName) { | ||
| 53 | + this.connectorName = connectorName; | ||
| 54 | + } | ||
| 55 | + public String getConnectorId() { | ||
| 56 | + return connectorId; | ||
| 57 | + } | ||
| 58 | + public void setConnectorId(String connectorId) { | ||
| 59 | + this.connectorId = connectorId; | ||
| 60 | + } | ||
| 61 | + public String getStationName() { | ||
| 62 | + return stationName; | ||
| 63 | + } | ||
| 64 | + public void setStationName(String stationName) { | ||
| 65 | + this.stationName = stationName; | ||
| 66 | + } | ||
| 67 | + public String getRemark() { | ||
| 68 | + return remark; | ||
| 69 | + } | ||
| 70 | + public void setRemark(String remark) { | ||
| 71 | + this.remark = remark; | ||
| 72 | + } | ||
| 73 | + public String getCreateBy() { | ||
| 74 | + return createBy; | ||
| 75 | + } | ||
| 76 | + public void setCreateBy(String createBy) { | ||
| 77 | + this.createBy = createBy; | ||
| 78 | + } | ||
| 79 | + public Date getCreateDate() { | ||
| 80 | + return createDate; | ||
| 81 | + } | ||
| 82 | + public void setCreateDate(Date createDate) { | ||
| 83 | + this.createDate = createDate; | ||
| 84 | + } | ||
| 85 | + public String getUpdateBy() { | ||
| 86 | + return updateBy; | ||
| 87 | + } | ||
| 88 | + public void setUpdateBy(String updateBy) { | ||
| 89 | + this.updateBy = updateBy; | ||
| 90 | + } | ||
| 91 | + public Date getUpdateDate() { | ||
| 92 | + return updateDate; | ||
| 93 | + } | ||
| 94 | + public void setUpdateDate(Date updateDate) { | ||
| 95 | + this.updateDate = updateDate; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | +} | ||
| 0 | \ No newline at end of file | 99 | \ No newline at end of file |
src/main/java/com/bsth/entity/oil/JdlReception.java
0 → 100644
| 1 | +package com.bsth.entity.oil; | ||
| 2 | + | ||
| 3 | +import java.util.Date; | ||
| 4 | + | ||
| 5 | +import javax.persistence.Entity; | ||
| 6 | +import javax.persistence.GeneratedValue; | ||
| 7 | +import javax.persistence.GenerationType; | ||
| 8 | +import javax.persistence.Id; | ||
| 9 | +import javax.persistence.Table; | ||
| 10 | + | ||
| 11 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | +-------------------------------------------------------- | ||
| 15 | + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', | ||
| 16 | + `station_name` varchar(255) DEFAULT NULL COMMENT '站点名称', | ||
| 17 | + `connector_id` varchar(255) DEFAULT NULL COMMENT '枪编号', | ||
| 18 | + `connector_name` varchar(255) DEFAULT NULL COMMENT '充电枪名', | ||
| 19 | + `order_no` varchar(255) DEFAULT NULL COMMENT '订单编号', | ||
| 20 | + `start_time` varchar(255) DEFAULT NULL COMMENT '充电开始时间', | ||
| 21 | + `end_time` varchar(255) DEFAULT NULL COMMENT '充电结束时间', | ||
| 22 | + `start_soc` double(11,2) DEFAULT NULL COMMENT '开始 SOC(%)', | ||
| 23 | + `end_soc` double(11,2) DEFAULT NULL COMMENT '结束 SOC(%)', | ||
| 24 | + `stop_reason` varchar(255) DEFAULT NULL COMMENT '终止原因', | ||
| 25 | + `charge_capacity` double(11,3) DEFAULT NULL COMMENT '充电量,单位:度', | ||
| 26 | + `electric_charge` double(11,2) DEFAULT NULL COMMENT '电费,单位:元', | ||
| 27 | + `service_charge` double(11,2) DEFAULT NULL COMMENT '服务费,单位:元', | ||
| 28 | + `total_amount` double(11,2) DEFAULT NULL COMMENT '总费用,单位:元', | ||
| 29 | + `vin_code` varchar(255) DEFAULT NULL COMMENT '卡号', | ||
| 30 | + `card_no` varchar(255) DEFAULT NULL COMMENT 'VIN,车架号', | ||
| 31 | + `car_code` varchar(255) DEFAULT NULL COMMENT '车牌号', | ||
| 32 | + `date_str` varchar(255) DEFAULT NULL COMMENT '营运日期', | ||
| 33 | + `origin` int(2) NOT NULL DEFAULT '0' COMMENT '数据源(0:接口获取;1:导入)', | ||
| 34 | + `sum_time` bigint(11) DEFAULT NULL COMMENT '总计充电时间(分钟)', | ||
| 35 | + `pile_id` varchar(255) DEFAULT NULL COMMENT '桩号', | ||
| 36 | + `create_by` varchar(255) DEFAULT NULL COMMENT '创建人', | ||
| 37 | + `create_date` datetime DEFAULT NULL COMMENT '创建时间', | ||
| 38 | + `update_by` varchar(255) DEFAULT NULL COMMENT '修改人', | ||
| 39 | + `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间', | ||
| 40 | +*/ | ||
| 41 | +@Entity | ||
| 42 | +@Table(name = "bsth_c_jdl_reception") | ||
| 43 | +public class JdlReception { | ||
| 44 | + @Id | ||
| 45 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 46 | + private Long id; | ||
| 47 | + private String stationName; | ||
| 48 | + private String connectorId; | ||
| 49 | + private String connectorName; | ||
| 50 | + private String orderNo; | ||
| 51 | + private String startTime; | ||
| 52 | + private String endTime; | ||
| 53 | + private Double startSoc; | ||
| 54 | + private Double endSoc; | ||
| 55 | + private String stopReason; | ||
| 56 | + private Double chargeCapacity; | ||
| 57 | + private Double electricCharge; | ||
| 58 | + private Double serviceCharge; | ||
| 59 | + private Double totalAmount; | ||
| 60 | + private String vinCode; | ||
| 61 | + private String cardNo; | ||
| 62 | + private String carCode; | ||
| 63 | + private String dateStr; | ||
| 64 | + private Integer origin; | ||
| 65 | + private Integer sumTime; | ||
| 66 | + private String batchNo; | ||
| 67 | + private String pileId; | ||
| 68 | + private String remark; | ||
| 69 | + private String createBy; | ||
| 70 | + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
| 71 | + private Date createDate; | ||
| 72 | + private String updateBy; | ||
| 73 | + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | ||
| 74 | + private Date updateDate; | ||
| 75 | + | ||
| 76 | + | ||
| 77 | + public Long getId() { | ||
| 78 | + return id; | ||
| 79 | + } | ||
| 80 | + public void setId(Long id) { | ||
| 81 | + this.id = id; | ||
| 82 | + } | ||
| 83 | + public String getStationName() { | ||
| 84 | + return stationName; | ||
| 85 | + } | ||
| 86 | + public void setStationName(String stationName) { | ||
| 87 | + this.stationName = stationName; | ||
| 88 | + } | ||
| 89 | + public String getConnectorId() { | ||
| 90 | + return connectorId; | ||
| 91 | + } | ||
| 92 | + public void setConnectorId(String connectorId) { | ||
| 93 | + this.connectorId = connectorId; | ||
| 94 | + } | ||
| 95 | + public String getConnectorName() { | ||
| 96 | + return connectorName; | ||
| 97 | + } | ||
| 98 | + public void setConnectorName(String connectorName) { | ||
| 99 | + this.connectorName = connectorName; | ||
| 100 | + } | ||
| 101 | + public String getOrderNo() { | ||
| 102 | + return orderNo; | ||
| 103 | + } | ||
| 104 | + public void setOrderNo(String orderNo) { | ||
| 105 | + this.orderNo = orderNo; | ||
| 106 | + } | ||
| 107 | + public String getStartTime() { | ||
| 108 | + return startTime; | ||
| 109 | + } | ||
| 110 | + public void setStartTime(String startTime) { | ||
| 111 | + this.startTime = startTime; | ||
| 112 | + } | ||
| 113 | + public String getEndTime() { | ||
| 114 | + return endTime; | ||
| 115 | + } | ||
| 116 | + public void setEndTime(String endTime) { | ||
| 117 | + this.endTime = endTime; | ||
| 118 | + } | ||
| 119 | + public Double getStartSoc() { | ||
| 120 | + return startSoc; | ||
| 121 | + } | ||
| 122 | + public void setStartSoc(Double startSoc) { | ||
| 123 | + this.startSoc = startSoc; | ||
| 124 | + } | ||
| 125 | + public Double getEndSoc() { | ||
| 126 | + return endSoc; | ||
| 127 | + } | ||
| 128 | + public void setEndSoc(Double endSoc) { | ||
| 129 | + this.endSoc = endSoc; | ||
| 130 | + } | ||
| 131 | + public String getStopReason() { | ||
| 132 | + return stopReason; | ||
| 133 | + } | ||
| 134 | + public void setStopReason(String stopReason) { | ||
| 135 | + this.stopReason = stopReason; | ||
| 136 | + } | ||
| 137 | + public Double getChargeCapacity() { | ||
| 138 | + return chargeCapacity; | ||
| 139 | + } | ||
| 140 | + public void setChargeCapacity(Double chargeCapacity) { | ||
| 141 | + this.chargeCapacity = chargeCapacity; | ||
| 142 | + } | ||
| 143 | + public Double getElectricCharge() { | ||
| 144 | + return electricCharge; | ||
| 145 | + } | ||
| 146 | + public void setElectricCharge(Double electricCharge) { | ||
| 147 | + this.electricCharge = electricCharge; | ||
| 148 | + } | ||
| 149 | + public Double getServiceCharge() { | ||
| 150 | + return serviceCharge; | ||
| 151 | + } | ||
| 152 | + public void setServiceCharge(Double serviceCharge) { | ||
| 153 | + this.serviceCharge = serviceCharge; | ||
| 154 | + } | ||
| 155 | + public Double getTotalAmount() { | ||
| 156 | + return totalAmount; | ||
| 157 | + } | ||
| 158 | + public void setTotalAmount(Double totalAmount) { | ||
| 159 | + this.totalAmount = totalAmount; | ||
| 160 | + } | ||
| 161 | + public String getVinCode() { | ||
| 162 | + return vinCode; | ||
| 163 | + } | ||
| 164 | + public void setVinCode(String vinCode) { | ||
| 165 | + this.vinCode = vinCode; | ||
| 166 | + } | ||
| 167 | + public String getCardNo() { | ||
| 168 | + return cardNo; | ||
| 169 | + } | ||
| 170 | + public void setCardNo(String cardNo) { | ||
| 171 | + this.cardNo = cardNo; | ||
| 172 | + } | ||
| 173 | + public String getCarCode() { | ||
| 174 | + return carCode; | ||
| 175 | + } | ||
| 176 | + public void setCarCode(String carCode) { | ||
| 177 | + this.carCode = carCode; | ||
| 178 | + } | ||
| 179 | + public String getDateStr() { | ||
| 180 | + return dateStr; | ||
| 181 | + } | ||
| 182 | + public void setDateStr(String dateStr) { | ||
| 183 | + this.dateStr = dateStr; | ||
| 184 | + } | ||
| 185 | + public Integer getOrigin() { | ||
| 186 | + return origin; | ||
| 187 | + } | ||
| 188 | + public void setOrigin(Integer origin) { | ||
| 189 | + this.origin = origin; | ||
| 190 | + } | ||
| 191 | + public Integer getSumTime() { | ||
| 192 | + return sumTime; | ||
| 193 | + } | ||
| 194 | + public void setSumTime(Integer sumTime) { | ||
| 195 | + this.sumTime = sumTime; | ||
| 196 | + } | ||
| 197 | + public String getBatchNo() { | ||
| 198 | + return batchNo; | ||
| 199 | + } | ||
| 200 | + public void setBatchNo(String batchNo) { | ||
| 201 | + this.batchNo = batchNo; | ||
| 202 | + } | ||
| 203 | + public String getPileId() { | ||
| 204 | + return pileId; | ||
| 205 | + } | ||
| 206 | + public void setPileId(String pileId) { | ||
| 207 | + this.pileId = pileId; | ||
| 208 | + } | ||
| 209 | + public String getRemark() { | ||
| 210 | + return remark; | ||
| 211 | + } | ||
| 212 | + public void setRemark(String remark) { | ||
| 213 | + this.remark = remark; | ||
| 214 | + } | ||
| 215 | + public String getCreateBy() { | ||
| 216 | + return createBy; | ||
| 217 | + } | ||
| 218 | + public void setCreateBy(String createBy) { | ||
| 219 | + this.createBy = createBy; | ||
| 220 | + } | ||
| 221 | + public Date getCreateDate() { | ||
| 222 | + return createDate; | ||
| 223 | + } | ||
| 224 | + public void setCreateDate(Date createDate) { | ||
| 225 | + this.createDate = createDate; | ||
| 226 | + } | ||
| 227 | + public String getUpdateBy() { | ||
| 228 | + return updateBy; | ||
| 229 | + } | ||
| 230 | + public void setUpdateBy(String updateBy) { | ||
| 231 | + this.updateBy = updateBy; | ||
| 232 | + } | ||
| 233 | + public Date getUpdateDate() { | ||
| 234 | + return updateDate; | ||
| 235 | + } | ||
| 236 | + public void setUpdateDate(Date updateDate) { | ||
| 237 | + this.updateDate = updateDate; | ||
| 238 | + } | ||
| 239 | + | ||
| 240 | +} | ||
| 0 | \ No newline at end of file | 241 | \ No newline at end of file |
src/main/java/com/bsth/entity/oil/Qlb.java
| @@ -348,7 +348,7 @@ public class Qlb { | @@ -348,7 +348,7 @@ public class Qlb { | ||
| 348 | if(this.getZlc()==0){ | 348 | if(this.getZlc()==0){ |
| 349 | return "0"; | 349 | return "0"; |
| 350 | }else{ | 350 | }else{ |
| 351 | - DecimalFormat df = new DecimalFormat("0.00"); | 351 | + DecimalFormat df = new DecimalFormat("0.000"); |
| 352 | return df.format(this.getHn()/this.getZlc()*100); | 352 | return df.format(this.getHn()/this.getZlc()*100); |
| 353 | } | 353 | } |
| 354 | } | 354 | } |
src/main/java/com/bsth/entity/oil/Ylb.java
| 1 | -package com.bsth.entity.oil; | ||
| 2 | - | ||
| 3 | -import java.text.DecimalFormat; | ||
| 4 | -import java.util.Date; | ||
| 5 | - | ||
| 6 | -import javax.persistence.*; | ||
| 7 | - | ||
| 8 | -import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | - | ||
| 10 | -import com.bsth.data.BasicData; | ||
| 11 | - | ||
| 12 | -@Entity | ||
| 13 | -@Table(name = "bsth_c_ylb") | ||
| 14 | -public class Ylb { | ||
| 15 | - @Id | ||
| 16 | - @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 17 | - private Integer id; | ||
| 18 | - @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 19 | - private Date rq; | ||
| 20 | - private String xlbm; | ||
| 21 | - private String linename; | ||
| 22 | - private String ssgsdm; | ||
| 23 | - private String fgsdm; | ||
| 24 | - private String nbbm; | ||
| 25 | - private String jsy; | ||
| 26 | - private String jname; | ||
| 27 | - private Double czlc=0.0; | ||
| 28 | - private Double jzlc=0.0; | ||
| 29 | - private Double czyl=0.0; | ||
| 30 | - private Double jzyl=0.0; | ||
| 31 | - private Double jzl=0.0; | ||
| 32 | - private int sfkt; | ||
| 33 | - private String jhsj; | ||
| 34 | - private Double yh=0.0; | ||
| 35 | - private Double sh=0.0; | ||
| 36 | - private String shyy; | ||
| 37 | - private Double zlc=0.0; | ||
| 38 | - private int yhlx; | ||
| 39 | - private String rylx="0"; | ||
| 40 | - private Double ns=0.0; | ||
| 41 | - private Double fyylc=0.0; | ||
| 42 | - private Double jhzlc=0.0; | ||
| 43 | - private Double jhfyylc=0.0; | ||
| 44 | - private int jhzbc; | ||
| 45 | - private int jhbc; | ||
| 46 | - private int sjzbc; | ||
| 47 | - private int sjbc; | ||
| 48 | - private String edituser; | ||
| 49 | - private Date edittime; | ||
| 50 | - private Date updatetime; | ||
| 51 | - private Date createtime; | ||
| 52 | - | ||
| 53 | - private int nylx; | ||
| 54 | - //进场顺序(根据最先出场和最后进场来关联车辆的存油量) | ||
| 55 | - private int jcsx; | ||
| 56 | - | ||
| 57 | - private String lp; | ||
| 58 | - @Transient | ||
| 59 | - private String bglyh; | ||
| 60 | - | ||
| 61 | - @Transient | ||
| 62 | - private String xlname; | ||
| 63 | - | ||
| 64 | - @Transient | ||
| 65 | - private String gsname; | ||
| 66 | - | ||
| 67 | - @Transient | ||
| 68 | - private String fgsname; | ||
| 69 | - | ||
| 70 | - @Transient | ||
| 71 | - private String name; | ||
| 72 | - | ||
| 73 | - public Integer getId() { | ||
| 74 | - return id; | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - public void setId(Integer id) { | ||
| 78 | - this.id = id; | ||
| 79 | - } | ||
| 80 | - public Date getRq() { | ||
| 81 | - return rq; | ||
| 82 | - } | ||
| 83 | - | ||
| 84 | - public void setRq(Date rq) { | ||
| 85 | - this.rq = rq; | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - public String getXlbm() { | ||
| 89 | - return xlbm; | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | - public void setXlbm(String xlbm) { | ||
| 93 | - this.xlbm = xlbm; | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | - public String getLinename() { | ||
| 97 | - return linename; | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - public void setLinename(String linename) { | ||
| 101 | - this.linename = linename; | ||
| 102 | - } | ||
| 103 | - | ||
| 104 | - public String getSsgsdm() { | ||
| 105 | - return ssgsdm; | ||
| 106 | - } | ||
| 107 | - public void setSsgsdm(String ssgsdm) { | ||
| 108 | - this.ssgsdm = ssgsdm; | ||
| 109 | - } | ||
| 110 | - public String getFgsdm() { | ||
| 111 | - return fgsdm; | ||
| 112 | - } | ||
| 113 | - public void setFgsdm(String fgsdm) { | ||
| 114 | - this.fgsdm = fgsdm; | ||
| 115 | - } | ||
| 116 | - public String getNbbm() { | ||
| 117 | - return nbbm; | ||
| 118 | - } | ||
| 119 | - public void setNbbm(String nbbm) { | ||
| 120 | - this.nbbm = nbbm; | ||
| 121 | - } | ||
| 122 | - public String getJsy() { | ||
| 123 | - return jsy; | ||
| 124 | - } | ||
| 125 | - public void setJsy(String jsy) { | ||
| 126 | - this.jsy = jsy; | ||
| 127 | - } | ||
| 128 | - public Double getCzlc() { | ||
| 129 | - return czlc; | ||
| 130 | - } | ||
| 131 | - public void setCzlc(Double czlc) { | ||
| 132 | - this.czlc = czlc; | ||
| 133 | - } | ||
| 134 | - public Double getJzlc() { | ||
| 135 | - return jzlc; | ||
| 136 | - } | ||
| 137 | - public void setJzlc(Double jzlc) { | ||
| 138 | - this.jzlc = jzlc; | ||
| 139 | - } | ||
| 140 | - public Double getCzyl() { | ||
| 141 | - return czyl; | ||
| 142 | - } | ||
| 143 | - public void setCzyl(Double czyl) { | ||
| 144 | - this.czyl = czyl; | ||
| 145 | - } | ||
| 146 | - public Double getJzyl() { | ||
| 147 | - return jzyl; | ||
| 148 | - } | ||
| 149 | - public void setJzyl(Double jzyl) { | ||
| 150 | - this.jzyl = jzyl; | ||
| 151 | - } | ||
| 152 | - public Double getJzl() { | ||
| 153 | - return jzl; | ||
| 154 | - } | ||
| 155 | - public void setJzl(Double jzl) { | ||
| 156 | - this.jzl = jzl; | ||
| 157 | - } | ||
| 158 | - public int getSfkt() { | ||
| 159 | - return sfkt; | ||
| 160 | - } | ||
| 161 | - public void setSfkt(int sfkt) { | ||
| 162 | - this.sfkt = sfkt; | ||
| 163 | - } | ||
| 164 | - public String getJhsj() { | ||
| 165 | - return jhsj; | ||
| 166 | - } | ||
| 167 | - public void setJhsj(String jhsj) { | ||
| 168 | - this.jhsj = jhsj; | ||
| 169 | - } | ||
| 170 | - public Double getYh() { | ||
| 171 | - return yh; | ||
| 172 | - } | ||
| 173 | - public void setYh(Double yh) { | ||
| 174 | - this.yh = yh; | ||
| 175 | - } | ||
| 176 | - public Double getSh() { | ||
| 177 | - return sh; | ||
| 178 | - } | ||
| 179 | - public void setSh(Double sh) { | ||
| 180 | - this.sh = sh; | ||
| 181 | - } | ||
| 182 | - public String getShyy() { | ||
| 183 | - return shyy; | ||
| 184 | - } | ||
| 185 | - public void setShyy(String shyy) { | ||
| 186 | - this.shyy = shyy; | ||
| 187 | - } | ||
| 188 | - public Double getZlc() { | ||
| 189 | - return zlc; | ||
| 190 | - } | ||
| 191 | - public void setZlc(Double zlc) { | ||
| 192 | - this.zlc = zlc; | ||
| 193 | - } | ||
| 194 | - public int getYhlx() { | ||
| 195 | - return yhlx; | ||
| 196 | - } | ||
| 197 | - public void setYhlx(int yhlx) { | ||
| 198 | - this.yhlx = yhlx; | ||
| 199 | - } | ||
| 200 | - public String getRylx() { | ||
| 201 | - return rylx; | ||
| 202 | - } | ||
| 203 | - public void setRylx(String rylx) { | ||
| 204 | - this.rylx = rylx; | ||
| 205 | - } | ||
| 206 | - public Double getNs() { | ||
| 207 | - return ns; | ||
| 208 | - } | ||
| 209 | - public void setNs(Double ns) { | ||
| 210 | - this.ns = ns; | ||
| 211 | - } | ||
| 212 | - public Double getFyylc() { | ||
| 213 | - return fyylc; | ||
| 214 | - } | ||
| 215 | - public void setFyylc(Double fyylc) { | ||
| 216 | - this.fyylc = fyylc; | ||
| 217 | - } | ||
| 218 | - public Double getJhzlc() { | ||
| 219 | - return jhzlc; | ||
| 220 | - } | ||
| 221 | - public void setJhzlc(Double jhzlc) { | ||
| 222 | - this.jhzlc = jhzlc; | ||
| 223 | - } | ||
| 224 | - public Double getJhfyylc() { | ||
| 225 | - return jhfyylc; | ||
| 226 | - } | ||
| 227 | - public void setJhfyylc(Double jhfyylc) { | ||
| 228 | - this.jhfyylc = jhfyylc; | ||
| 229 | - } | ||
| 230 | - public int getJhzbc() { | ||
| 231 | - return jhzbc; | ||
| 232 | - } | ||
| 233 | - public void setJhzbc(int jhzbc) { | ||
| 234 | - this.jhzbc = jhzbc; | ||
| 235 | - } | ||
| 236 | - public int getJhbc() { | ||
| 237 | - return jhbc; | ||
| 238 | - } | ||
| 239 | - public void setJhbc(int jhbc) { | ||
| 240 | - this.jhbc = jhbc; | ||
| 241 | - } | ||
| 242 | - public int getSjzbc() { | ||
| 243 | - return sjzbc; | ||
| 244 | - } | ||
| 245 | - public void setSjzbc(int sjzbc) { | ||
| 246 | - this.sjzbc = sjzbc; | ||
| 247 | - } | ||
| 248 | - public int getSjbc() { | ||
| 249 | - return sjbc; | ||
| 250 | - } | ||
| 251 | - public void setSjbc(int sjbc) { | ||
| 252 | - this.sjbc = sjbc; | ||
| 253 | - } | ||
| 254 | - public String getEdituser() { | ||
| 255 | - return edituser; | ||
| 256 | - } | ||
| 257 | - public void setEdituser(String edituser) { | ||
| 258 | - this.edituser = edituser; | ||
| 259 | - } | ||
| 260 | - public Date getEdittime() { | ||
| 261 | - return edittime; | ||
| 262 | - } | ||
| 263 | - public void setEdittime(Date edittime) { | ||
| 264 | - this.edittime = edittime; | ||
| 265 | - } | ||
| 266 | - public Date getCreatetime() { | ||
| 267 | - return createtime; | ||
| 268 | - } | ||
| 269 | - public void setCreatetime(Date createtime) { | ||
| 270 | - this.createtime = createtime; | ||
| 271 | - } | ||
| 272 | - public int getNylx() { | ||
| 273 | - return nylx; | ||
| 274 | - } | ||
| 275 | - public void setNylx(int nylx) { | ||
| 276 | - this.nylx = nylx; | ||
| 277 | - } | ||
| 278 | - | ||
| 279 | - public int getJcsx(){ | ||
| 280 | - return jcsx; | ||
| 281 | - } | ||
| 282 | - | ||
| 283 | - public void setJcsx(int jcsx){ | ||
| 284 | - this.jcsx=jcsx; | ||
| 285 | - } | ||
| 286 | - | ||
| 287 | - public String getBglyh() { | ||
| 288 | - if(this.getZlc()==0){ | ||
| 289 | - return "0"; | ||
| 290 | - }else{ | ||
| 291 | - DecimalFormat df = new DecimalFormat("0.00"); | ||
| 292 | - return df.format(this.getYh()/this.getZlc()*100); | ||
| 293 | - } | ||
| 294 | - } | ||
| 295 | - | ||
| 296 | - public void setBglyh(String bglyh) { | ||
| 297 | - this.bglyh = bglyh; | ||
| 298 | - } | ||
| 299 | - | ||
| 300 | - public String getXlname() { | ||
| 301 | - return BasicData.lineCodeAllNameMap.get(this.xlbm); | ||
| 302 | - } | ||
| 303 | - | ||
| 304 | - public void setXlname(String xlname) { | ||
| 305 | - this.xlname = xlname; | ||
| 306 | - } | ||
| 307 | - | ||
| 308 | - public String getGsname() { | ||
| 309 | - return BasicData.businessCodeNameMap.get(this.ssgsdm); | ||
| 310 | - } | ||
| 311 | - | ||
| 312 | - public void setGsname(String gsname) { | ||
| 313 | - this.gsname = gsname; | ||
| 314 | - } | ||
| 315 | - | ||
| 316 | - | ||
| 317 | - public String getFgsname() { | ||
| 318 | - return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.ssgsdm); | ||
| 319 | - } | ||
| 320 | - | ||
| 321 | - public void setFgsname(String fgsname) { | ||
| 322 | - this.fgsname = fgsname; | ||
| 323 | - } | ||
| 324 | - | ||
| 325 | - public String getName() { | ||
| 326 | - return BasicData.allPerson.get(this.ssgsdm+"-"+this.jsy); | ||
| 327 | - } | ||
| 328 | - | ||
| 329 | - public void setName(String name) { | ||
| 330 | - this.name = name; | ||
| 331 | - } | ||
| 332 | - | ||
| 333 | - | ||
| 334 | - public Date getUpdatetime() { | ||
| 335 | - return updatetime; | ||
| 336 | - } | ||
| 337 | - | ||
| 338 | - public void setUpdatetime(Date updatetime) { | ||
| 339 | - this.updatetime = updatetime; | ||
| 340 | - } | ||
| 341 | - | ||
| 342 | - public String getLp() { | ||
| 343 | - return lp; | ||
| 344 | - } | ||
| 345 | - | ||
| 346 | - public void setLp(String lp) { | ||
| 347 | - this.lp = lp; | ||
| 348 | - } | ||
| 349 | - | ||
| 350 | - public String getJname() { | ||
| 351 | - return jname; | ||
| 352 | - } | ||
| 353 | - | ||
| 354 | - public void setJname(String jname) { | ||
| 355 | - this.jname = jname; | ||
| 356 | - } | ||
| 357 | - | ||
| 358 | - | ||
| 359 | -} | 1 | +package com.bsth.entity.oil; |
| 2 | + | ||
| 3 | +import java.text.DecimalFormat; | ||
| 4 | +import java.util.Date; | ||
| 5 | + | ||
| 6 | +import javax.persistence.*; | ||
| 7 | + | ||
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | + | ||
| 10 | +import com.bsth.data.BasicData; | ||
| 11 | + | ||
| 12 | +@Entity | ||
| 13 | +@Table(name = "bsth_c_ylb") | ||
| 14 | +public class Ylb { | ||
| 15 | + @Id | ||
| 16 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | ||
| 17 | + private Integer id; | ||
| 18 | + @DateTimeFormat(pattern="yyyy-MM-dd") | ||
| 19 | + private Date rq; | ||
| 20 | + private String xlbm; | ||
| 21 | + private String linename; | ||
| 22 | + private String ssgsdm; | ||
| 23 | + private String fgsdm; | ||
| 24 | + private String nbbm; | ||
| 25 | + private String jsy; | ||
| 26 | + private String jname; | ||
| 27 | + private Double czlc=0.0; | ||
| 28 | + private Double jzlc=0.0; | ||
| 29 | + private Double czyl=0.0; | ||
| 30 | + private Double jzyl=0.0; | ||
| 31 | + private Double jzl=0.0; | ||
| 32 | + private int sfkt; | ||
| 33 | + private String jhsj; | ||
| 34 | + private Double yh=0.0; | ||
| 35 | + private Double sh=0.0; | ||
| 36 | + private String shyy; | ||
| 37 | + private Double zlc=0.0; | ||
| 38 | + private int yhlx; | ||
| 39 | + private String rylx="0"; | ||
| 40 | + private Double ns=0.0; | ||
| 41 | + private Double fyylc=0.0; | ||
| 42 | + private Double jhzlc=0.0; | ||
| 43 | + private Double jhfyylc=0.0; | ||
| 44 | + private int jhzbc; | ||
| 45 | + private int jhbc; | ||
| 46 | + private int sjzbc; | ||
| 47 | + private int sjbc; | ||
| 48 | + private String edituser; | ||
| 49 | + private Date edittime; | ||
| 50 | + private Date updatetime; | ||
| 51 | + private Date createtime; | ||
| 52 | + | ||
| 53 | + private int nylx; | ||
| 54 | + //进场顺序(根据最先出场和最后进场来关联车辆的存油量) | ||
| 55 | + private int jcsx; | ||
| 56 | + | ||
| 57 | + private String lp; | ||
| 58 | + @Transient | ||
| 59 | + private String bglyh; | ||
| 60 | + | ||
| 61 | + @Transient | ||
| 62 | + private String xlname; | ||
| 63 | + | ||
| 64 | + @Transient | ||
| 65 | + private String gsname; | ||
| 66 | + | ||
| 67 | + @Transient | ||
| 68 | + private String fgsname; | ||
| 69 | + | ||
| 70 | + @Transient | ||
| 71 | + private String name; | ||
| 72 | + | ||
| 73 | + public Integer getId() { | ||
| 74 | + return id; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public void setId(Integer id) { | ||
| 78 | + this.id = id; | ||
| 79 | + } | ||
| 80 | + public Date getRq() { | ||
| 81 | + return rq; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setRq(Date rq) { | ||
| 85 | + this.rq = rq; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public String getXlbm() { | ||
| 89 | + return xlbm; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setXlbm(String xlbm) { | ||
| 93 | + this.xlbm = xlbm; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getLinename() { | ||
| 97 | + return linename; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setLinename(String linename) { | ||
| 101 | + this.linename = linename; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public String getSsgsdm() { | ||
| 105 | + return ssgsdm; | ||
| 106 | + } | ||
| 107 | + public void setSsgsdm(String ssgsdm) { | ||
| 108 | + this.ssgsdm = ssgsdm; | ||
| 109 | + } | ||
| 110 | + public String getFgsdm() { | ||
| 111 | + return fgsdm; | ||
| 112 | + } | ||
| 113 | + public void setFgsdm(String fgsdm) { | ||
| 114 | + this.fgsdm = fgsdm; | ||
| 115 | + } | ||
| 116 | + public String getNbbm() { | ||
| 117 | + return nbbm; | ||
| 118 | + } | ||
| 119 | + public void setNbbm(String nbbm) { | ||
| 120 | + this.nbbm = nbbm; | ||
| 121 | + } | ||
| 122 | + public String getJsy() { | ||
| 123 | + return jsy; | ||
| 124 | + } | ||
| 125 | + public void setJsy(String jsy) { | ||
| 126 | + this.jsy = jsy; | ||
| 127 | + } | ||
| 128 | + public Double getCzlc() { | ||
| 129 | + return czlc; | ||
| 130 | + } | ||
| 131 | + public void setCzlc(Double czlc) { | ||
| 132 | + this.czlc = czlc; | ||
| 133 | + } | ||
| 134 | + public Double getJzlc() { | ||
| 135 | + return jzlc; | ||
| 136 | + } | ||
| 137 | + public void setJzlc(Double jzlc) { | ||
| 138 | + this.jzlc = jzlc; | ||
| 139 | + } | ||
| 140 | + public Double getCzyl() { | ||
| 141 | + return czyl; | ||
| 142 | + } | ||
| 143 | + public void setCzyl(Double czyl) { | ||
| 144 | + this.czyl = czyl; | ||
| 145 | + } | ||
| 146 | + public Double getJzyl() { | ||
| 147 | + return jzyl; | ||
| 148 | + } | ||
| 149 | + public void setJzyl(Double jzyl) { | ||
| 150 | + this.jzyl = jzyl; | ||
| 151 | + } | ||
| 152 | + public Double getJzl() { | ||
| 153 | + return jzl; | ||
| 154 | + } | ||
| 155 | + public void setJzl(Double jzl) { | ||
| 156 | + this.jzl = jzl; | ||
| 157 | + } | ||
| 158 | + public int getSfkt() { | ||
| 159 | + return sfkt; | ||
| 160 | + } | ||
| 161 | + public void setSfkt(int sfkt) { | ||
| 162 | + this.sfkt = sfkt; | ||
| 163 | + } | ||
| 164 | + public String getJhsj() { | ||
| 165 | + return jhsj; | ||
| 166 | + } | ||
| 167 | + public void setJhsj(String jhsj) { | ||
| 168 | + this.jhsj = jhsj; | ||
| 169 | + } | ||
| 170 | + public Double getYh() { | ||
| 171 | + return yh; | ||
| 172 | + } | ||
| 173 | + public void setYh(Double yh) { | ||
| 174 | + this.yh = yh; | ||
| 175 | + } | ||
| 176 | + public Double getSh() { | ||
| 177 | + return sh; | ||
| 178 | + } | ||
| 179 | + public void setSh(Double sh) { | ||
| 180 | + this.sh = sh; | ||
| 181 | + } | ||
| 182 | + public String getShyy() { | ||
| 183 | + return shyy; | ||
| 184 | + } | ||
| 185 | + public void setShyy(String shyy) { | ||
| 186 | + this.shyy = shyy; | ||
| 187 | + } | ||
| 188 | + public Double getZlc() { | ||
| 189 | + return zlc; | ||
| 190 | + } | ||
| 191 | + public void setZlc(Double zlc) { | ||
| 192 | + this.zlc = zlc; | ||
| 193 | + } | ||
| 194 | + public int getYhlx() { | ||
| 195 | + return yhlx; | ||
| 196 | + } | ||
| 197 | + public void setYhlx(int yhlx) { | ||
| 198 | + this.yhlx = yhlx; | ||
| 199 | + } | ||
| 200 | + public String getRylx() { | ||
| 201 | + return rylx; | ||
| 202 | + } | ||
| 203 | + public void setRylx(String rylx) { | ||
| 204 | + this.rylx = rylx; | ||
| 205 | + } | ||
| 206 | + public Double getNs() { | ||
| 207 | + return ns; | ||
| 208 | + } | ||
| 209 | + public void setNs(Double ns) { | ||
| 210 | + this.ns = ns; | ||
| 211 | + } | ||
| 212 | + public Double getFyylc() { | ||
| 213 | + return fyylc; | ||
| 214 | + } | ||
| 215 | + public void setFyylc(Double fyylc) { | ||
| 216 | + this.fyylc = fyylc; | ||
| 217 | + } | ||
| 218 | + public Double getJhzlc() { | ||
| 219 | + return jhzlc; | ||
| 220 | + } | ||
| 221 | + public void setJhzlc(Double jhzlc) { | ||
| 222 | + this.jhzlc = jhzlc; | ||
| 223 | + } | ||
| 224 | + public Double getJhfyylc() { | ||
| 225 | + return jhfyylc; | ||
| 226 | + } | ||
| 227 | + public void setJhfyylc(Double jhfyylc) { | ||
| 228 | + this.jhfyylc = jhfyylc; | ||
| 229 | + } | ||
| 230 | + public int getJhzbc() { | ||
| 231 | + return jhzbc; | ||
| 232 | + } | ||
| 233 | + public void setJhzbc(int jhzbc) { | ||
| 234 | + this.jhzbc = jhzbc; | ||
| 235 | + } | ||
| 236 | + public int getJhbc() { | ||
| 237 | + return jhbc; | ||
| 238 | + } | ||
| 239 | + public void setJhbc(int jhbc) { | ||
| 240 | + this.jhbc = jhbc; | ||
| 241 | + } | ||
| 242 | + public int getSjzbc() { | ||
| 243 | + return sjzbc; | ||
| 244 | + } | ||
| 245 | + public void setSjzbc(int sjzbc) { | ||
| 246 | + this.sjzbc = sjzbc; | ||
| 247 | + } | ||
| 248 | + public int getSjbc() { | ||
| 249 | + return sjbc; | ||
| 250 | + } | ||
| 251 | + public void setSjbc(int sjbc) { | ||
| 252 | + this.sjbc = sjbc; | ||
| 253 | + } | ||
| 254 | + public String getEdituser() { | ||
| 255 | + return edituser; | ||
| 256 | + } | ||
| 257 | + public void setEdituser(String edituser) { | ||
| 258 | + this.edituser = edituser; | ||
| 259 | + } | ||
| 260 | + public Date getEdittime() { | ||
| 261 | + return edittime; | ||
| 262 | + } | ||
| 263 | + public void setEdittime(Date edittime) { | ||
| 264 | + this.edittime = edittime; | ||
| 265 | + } | ||
| 266 | + public Date getCreatetime() { | ||
| 267 | + return createtime; | ||
| 268 | + } | ||
| 269 | + public void setCreatetime(Date createtime) { | ||
| 270 | + this.createtime = createtime; | ||
| 271 | + } | ||
| 272 | + public int getNylx() { | ||
| 273 | + return nylx; | ||
| 274 | + } | ||
| 275 | + public void setNylx(int nylx) { | ||
| 276 | + this.nylx = nylx; | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + public int getJcsx(){ | ||
| 280 | + return jcsx; | ||
| 281 | + } | ||
| 282 | + | ||
| 283 | + public void setJcsx(int jcsx){ | ||
| 284 | + this.jcsx=jcsx; | ||
| 285 | + } | ||
| 286 | + | ||
| 287 | + public String getBglyh() { | ||
| 288 | + if(this.getZlc()==0){ | ||
| 289 | + return "0"; | ||
| 290 | + }else{ | ||
| 291 | + DecimalFormat df = new DecimalFormat("0.000"); | ||
| 292 | + return df.format(this.getYh()/this.getZlc()*100); | ||
| 293 | + } | ||
| 294 | + } | ||
| 295 | + | ||
| 296 | + public void setBglyh(String bglyh) { | ||
| 297 | + this.bglyh = bglyh; | ||
| 298 | + } | ||
| 299 | + | ||
| 300 | + public String getXlname() { | ||
| 301 | + return BasicData.lineCodeAllNameMap.get(this.xlbm); | ||
| 302 | + } | ||
| 303 | + | ||
| 304 | + public void setXlname(String xlname) { | ||
| 305 | + this.xlname = xlname; | ||
| 306 | + } | ||
| 307 | + | ||
| 308 | + public String getGsname() { | ||
| 309 | + return BasicData.businessCodeNameMap.get(this.ssgsdm); | ||
| 310 | + } | ||
| 311 | + | ||
| 312 | + public void setGsname(String gsname) { | ||
| 313 | + this.gsname = gsname; | ||
| 314 | + } | ||
| 315 | + | ||
| 316 | + | ||
| 317 | + public String getFgsname() { | ||
| 318 | + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.ssgsdm); | ||
| 319 | + } | ||
| 320 | + | ||
| 321 | + public void setFgsname(String fgsname) { | ||
| 322 | + this.fgsname = fgsname; | ||
| 323 | + } | ||
| 324 | + | ||
| 325 | + public String getName() { | ||
| 326 | + return BasicData.allPerson.get(this.ssgsdm+"-"+this.jsy); | ||
| 327 | + } | ||
| 328 | + | ||
| 329 | + public void setName(String name) { | ||
| 330 | + this.name = name; | ||
| 331 | + } | ||
| 332 | + | ||
| 333 | + | ||
| 334 | + public Date getUpdatetime() { | ||
| 335 | + return updatetime; | ||
| 336 | + } | ||
| 337 | + | ||
| 338 | + public void setUpdatetime(Date updatetime) { | ||
| 339 | + this.updatetime = updatetime; | ||
| 340 | + } | ||
| 341 | + | ||
| 342 | + public String getLp() { | ||
| 343 | + return lp; | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + public void setLp(String lp) { | ||
| 347 | + this.lp = lp; | ||
| 348 | + } | ||
| 349 | + | ||
| 350 | + public String getJname() { | ||
| 351 | + return jname; | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | + public void setJname(String jname) { | ||
| 355 | + this.jname = jname; | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + | ||
| 359 | +} |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
| @@ -21,7 +21,7 @@ import java.util.Set; | @@ -21,7 +21,7 @@ import java.util.Set; | ||
| 21 | @NamedAttributeNode("cTasks") | 21 | @NamedAttributeNode("cTasks") |
| 22 | }) | 22 | }) |
| 23 | }) | 23 | }) |
| 24 | -public class ScheduleRealInfo { | 24 | +public class ScheduleRealInfo implements Cloneable{ |
| 25 | /** 主键Id */ | 25 | /** 主键Id */ |
| 26 | @Id | 26 | @Id |
| 27 | private Long id; | 27 | private Long id; |
| @@ -1054,4 +1054,10 @@ public class ScheduleRealInfo { | @@ -1054,4 +1054,10 @@ public class ScheduleRealInfo { | ||
| 1054 | public void setOperationType(String operationType) { | 1054 | public void setOperationType(String operationType) { |
| 1055 | this.operationType = operationType; | 1055 | this.operationType = operationType; |
| 1056 | } | 1056 | } |
| 1057 | + | ||
| 1058 | + @Override | ||
| 1059 | + public ScheduleRealInfo clone() throws CloneNotSupportedException { | ||
| 1060 | + ScheduleRealInfo cloned = (ScheduleRealInfo) super.clone(); | ||
| 1061 | + return cloned; | ||
| 1062 | + } | ||
| 1057 | } | 1063 | } |
src/main/java/com/bsth/entity/zndd/StationPeopleLogger.java
| @@ -7,7 +7,7 @@ import javax.persistence.*; | @@ -7,7 +7,7 @@ import javax.persistence.*; | ||
| 7 | import java.io.Serializable; | 7 | import java.io.Serializable; |
| 8 | 8 | ||
| 9 | @Entity | 9 | @Entity |
| 10 | -@Table(name = "bsth_c_t_station_people_logger") //智能调度记录查询表 | 10 | +@Table(name = "bsth_c_t_station_people_logger") //智能调度记录检测表 |
| 11 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | 11 | @JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) |
| 12 | public class StationPeopleLogger implements Serializable { | 12 | public class StationPeopleLogger implements Serializable { |
| 13 | // ID | 13 | // ID |
| @@ -19,8 +19,10 @@ public class StationPeopleLogger implements Serializable { | @@ -19,8 +19,10 @@ public class StationPeopleLogger implements Serializable { | ||
| 19 | //线路名称 | 19 | //线路名称 |
| 20 | private String lineName; | 20 | private String lineName; |
| 21 | //站点code | 21 | //站点code |
| 22 | + @Transient | ||
| 22 | private String station; | 23 | private String station; |
| 23 | //站点名称 | 24 | //站点名称 |
| 25 | + @Transient | ||
| 24 | private String stationName; | 26 | private String stationName; |
| 25 | //日期 | 27 | //日期 |
| 26 | private String rqStr; | 28 | private String rqStr; |
| @@ -31,8 +33,19 @@ public class StationPeopleLogger implements Serializable { | @@ -31,8 +33,19 @@ public class StationPeopleLogger implements Serializable { | ||
| 31 | //上下行 | 33 | //上下行 |
| 32 | private String xlDir; | 34 | private String xlDir; |
| 33 | //人数 or 差距时间 or 站点差数 根据类型判断 | 35 | //人数 or 差距时间 or 站点差数 根据类型判断 |
| 34 | - private Long numType; | ||
| 35 | - | 36 | + private String fcsj; |
| 37 | + | ||
| 38 | + private String clZbh; | ||
| 39 | + | ||
| 40 | + | ||
| 41 | + | ||
| 42 | + public String getClZbh() { | ||
| 43 | + return clZbh; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public void setClZbh(String clZbh) { | ||
| 47 | + this.clZbh = clZbh; | ||
| 48 | + } | ||
| 36 | 49 | ||
| 37 | public void setId(Long id) { | 50 | public void setId(Long id) { |
| 38 | this.id = id; | 51 | this.id = id; |
| @@ -90,8 +103,12 @@ public class StationPeopleLogger implements Serializable { | @@ -90,8 +103,12 @@ public class StationPeopleLogger implements Serializable { | ||
| 90 | this.rq = rq; | 103 | this.rq = rq; |
| 91 | } | 104 | } |
| 92 | 105 | ||
| 93 | - public Long getNumType() { | ||
| 94 | - return numType; | 106 | + public String getFcsj() { |
| 107 | + return fcsj; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public void setFcsj(String fcsj) { | ||
| 111 | + this.fcsj = fcsj; | ||
| 95 | } | 112 | } |
| 96 | 113 | ||
| 97 | public String getStation() { | 114 | public String getStation() { |
| @@ -110,8 +127,5 @@ public class StationPeopleLogger implements Serializable { | @@ -110,8 +127,5 @@ public class StationPeopleLogger implements Serializable { | ||
| 110 | this.stationName = stationName; | 127 | this.stationName = stationName; |
| 111 | } | 128 | } |
| 112 | 129 | ||
| 113 | - public void setNumType(Long numType) { | ||
| 114 | - this.numType = numType; | ||
| 115 | - } | ||
| 116 | 130 | ||
| 117 | } | 131 | } |
src/main/java/com/bsth/entity/zndd/znddStatus.java
| @@ -23,6 +23,25 @@ public class znddStatus { | @@ -23,6 +23,25 @@ public class znddStatus { | ||
| 23 | 23 | ||
| 24 | private String name; | 24 | private String name; |
| 25 | 25 | ||
| 26 | + //大客流是否自动执行班次 0开 1关 null关 | ||
| 27 | + private String excuteStatus; | ||
| 28 | + | ||
| 29 | + public String getExcuteStatus() { | ||
| 30 | + return excuteStatus; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public void setExcuteStatus(String excuteStatus) { | ||
| 34 | + this.excuteStatus = excuteStatus; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + | ||
| 38 | + public Long getId() { | ||
| 39 | + return id; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public void setId(Long id) { | ||
| 43 | + this.id = id; | ||
| 44 | + } | ||
| 26 | 45 | ||
| 27 | public String getType() { | 46 | public String getType() { |
| 28 | return type; | 47 | return type; |
src/main/java/com/bsth/repository/DKLInfoRepository.java
0 → 100644
src/main/java/com/bsth/repository/lg_travel/RegionLineCarRepository.java
0 → 100644
| 1 | +package com.bsth.repository.lg_travel; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.bsth.entity.lg_travel.RegionLineCar; | ||
| 5 | +import com.bsth.repository.BaseRepository; | ||
| 6 | +import org.springframework.stereotype.Repository; | ||
| 7 | + | ||
| 8 | +@Repository | ||
| 9 | +public interface RegionLineCarRepository extends BaseRepository<RegionLineCar, Long> { | ||
| 10 | +} |
src/main/java/com/bsth/repository/lg_travel/RegionRepository.java
0 → 100644
src/main/java/com/bsth/repository/oil/JdlConnectorRepository.java
0 → 100644
| 1 | +package com.bsth.repository.oil; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import org.springframework.data.jpa.repository.Modifying; | ||
| 6 | +import org.springframework.data.jpa.repository.Query; | ||
| 7 | +import org.springframework.stereotype.Repository; | ||
| 8 | +import org.springframework.transaction.annotation.Transactional; | ||
| 9 | + | ||
| 10 | +import com.bsth.entity.oil.JdlConnector; | ||
| 11 | +import com.bsth.repository.BaseRepository; | ||
| 12 | + | ||
| 13 | +@Repository | ||
| 14 | +public interface JdlConnectorRepository extends BaseRepository<JdlConnector, Integer>{ | ||
| 15 | + | ||
| 16 | + @Query(value="SELECT j FROM JdlConnector j WHERE connectorName like %?1% and connectorId like %?2% and stationName like %?3% order by stationName, connectorId ") | ||
| 17 | + List<JdlConnector> query(String connectorName, String connectorId, String stationName); | ||
| 18 | + | ||
| 19 | + @Query(value="SELECT j FROM JdlConnector j WHERE connectorName = ?1 ") | ||
| 20 | + List<JdlConnector> queryByGunName(String connectorName); | ||
| 21 | + | ||
| 22 | + @Query(value="SELECT j FROM JdlConnector j WHERE id = ?1 ") | ||
| 23 | + JdlConnector queryById(Integer id); | ||
| 24 | + | ||
| 25 | + @Query(value="SELECT j.stationName FROM JdlConnector j group by stationName ") | ||
| 26 | + List<String> queryStationName(); | ||
| 27 | + | ||
| 28 | + @Modifying | ||
| 29 | + @Transactional | ||
| 30 | + @Query(value = "delete JdlConnector j where id = ?1 ") | ||
| 31 | + void delete(Integer id); | ||
| 32 | + | ||
| 33 | + @Transactional | ||
| 34 | + @Modifying | ||
| 35 | + @Query(value="UPDATE bsth_c_jdl_connector SET " + | ||
| 36 | + " connector_name = ?2," + | ||
| 37 | + " connector_id = ?3," + | ||
| 38 | + " station_name = ?4" + | ||
| 39 | + " WHERE id = ?1 ", nativeQuery=true) | ||
| 40 | + public void update(Integer id, String connectorName, String connectorId, String stationName); | ||
| 41 | + | ||
| 42 | +} |
src/main/java/com/bsth/repository/oil/JdlReceptionRepository.java
0 → 100644
| 1 | +package com.bsth.repository.oil; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +import org.springframework.data.jpa.repository.Modifying; | ||
| 6 | +import org.springframework.data.jpa.repository.Query; | ||
| 7 | +import org.springframework.stereotype.Repository; | ||
| 8 | +import org.springframework.transaction.annotation.Transactional; | ||
| 9 | + | ||
| 10 | +import com.bsth.entity.oil.JdlReception; | ||
| 11 | +import com.bsth.repository.BaseRepository; | ||
| 12 | + | ||
| 13 | +@Repository | ||
| 14 | +public interface JdlReceptionRepository extends BaseRepository<JdlReception, Integer>{ | ||
| 15 | + | ||
| 16 | + @Query(value="SELECT date_str, car_code, sum(CAST(charge_capacity AS DECIMAL(10, 3))) charge_capacity FROM bsth_c_jdl_reception where date_str = ?1 and car_code like %?2% group by date_str, car_code order by date_str" ,nativeQuery=true) | ||
| 17 | + List<Object[]> querySum(String rq, String nbbm); | ||
| 18 | + | ||
| 19 | + @Query(value="SELECT * FROM bsth_c_jdl_reception where date_str = ?1 and car_code like %?2% " ,nativeQuery=true) | ||
| 20 | + List<JdlReception> query(String rq, String nbbm); | ||
| 21 | + | ||
| 22 | + @Query(value="SELECT batch_no, create_by, DATE_FORMAT(create_date, '%Y-%m-%d %H:%i:%s') create_date FROM bsth_c_jdl_reception where DATE_FORMAT(create_date, '%Y-%m-%d') = ?1 and origin = 1 group by batch_no, create_by, create_date order by batch_no" ,nativeQuery=true) | ||
| 23 | + List<Object[]> queryBatch(String rq); | ||
| 24 | + | ||
| 25 | + @Query(value="SELECT batch_no, create_by, DATE_FORMAT(create_date, '%Y-%m-%d %H:%i:%s') create_date FROM bsth_c_jdl_reception where DATE_FORMAT(create_date, '%Y-%m-%d') >= ?1 and DATE_FORMAT(create_date, '%Y-%m-%d') <= ?2 and create_by like %?3% and origin = 1 group by batch_no, create_by, create_date order by create_date, create_by, batch_no" ,nativeQuery=true) | ||
| 26 | + List<Object[]> queryBatchByDates(String rq1, String rq2, String createBy); | ||
| 27 | + | ||
| 28 | + @Query(value="SELECT * FROM bsth_c_jdl_reception where create_by = ?1 and DATE_FORMAT(create_date, '%Y-%m-%d %H:%i:%s') = ?2 and origin = 1 " ,nativeQuery=true) | ||
| 29 | + List<JdlReception> queryBatchData(String createBy, String createDate); | ||
| 30 | + | ||
| 31 | + @Query(value="SELECT j FROM JdlReception j WHERE id = ?1 ") | ||
| 32 | + List<JdlReception> queryById(Long id); | ||
| 33 | + | ||
| 34 | + @Query(value="SELECT j FROM JdlReception j WHERE endTime >= ?1 and startTime <= ?2 and carCode = ?3 ") | ||
| 35 | + List<JdlReception> queryRepeatCar(String startTime, String endTime, String nbbm); | ||
| 36 | + | ||
| 37 | + @Query(value="SELECT j FROM JdlReception j WHERE endTime >= ?1 and startTime <= ?2 and connectorId = ?3 and carCode != ?4 ") | ||
| 38 | + List<JdlReception> queryRepeatConnector(String startTime, String endTime, String connectorId, String nbbm); | ||
| 39 | + | ||
| 40 | + @Modifying | ||
| 41 | + @Transactional | ||
| 42 | + @Query(value = "delete JdlReception j where createBy = ?1 and DATE_FORMAT(createDate, '%Y-%m-%d %H:%i:%s') = ?2 and origin = 1") | ||
| 43 | + void deleteBatch(String createBy, String createDate); | ||
| 44 | + | ||
| 45 | + @Transactional | ||
| 46 | + @Modifying | ||
| 47 | + @Query(value="UPDATE bsth_c_jdl_reception SET " + | ||
| 48 | + " date_str = ?2," + | ||
| 49 | + " pile_id = ?3," + | ||
| 50 | + " car_code = ?4," + | ||
| 51 | + " start_time = ?5," + | ||
| 52 | + " end_time = ?6," + | ||
| 53 | + " sum_time = ?7," + | ||
| 54 | + " start_soc = ?8," + | ||
| 55 | + " end_soc = ?9," + | ||
| 56 | + " charge_capacity = ?10," + | ||
| 57 | + " stop_reason = ?11" + | ||
| 58 | + " WHERE id = ?1", nativeQuery=true) | ||
| 59 | + public void update(Long id, String dateStr, String pileId, String carCode, String startTime, String endTime, Integer sumTime, Double startSoc, Double endSoc, Double chargeCapacity, String stopReason); | ||
| 60 | + | ||
| 61 | +} |
src/main/java/com/bsth/repository/oil/NylogRepository.java
| 1 | package com.bsth.repository.oil; | 1 | package com.bsth.repository.oil; |
| 2 | 2 | ||
| 3 | +import java.util.List; | ||
| 3 | 4 | ||
| 4 | - | 5 | +import org.springframework.data.jpa.repository.Query; |
| 5 | import org.springframework.stereotype.Repository; | 6 | import org.springframework.stereotype.Repository; |
| 7 | + | ||
| 6 | import com.bsth.entity.oil.Nylog; | 8 | import com.bsth.entity.oil.Nylog; |
| 7 | import com.bsth.repository.BaseRepository; | 9 | import com.bsth.repository.BaseRepository; |
| 8 | 10 | ||
| 9 | @Repository | 11 | @Repository |
| 10 | public interface NylogRepository extends BaseRepository<Nylog, Integer>{ | 12 | public interface NylogRepository extends BaseRepository<Nylog, Integer>{ |
| 13 | + | ||
| 14 | + @Query(value="select n from Nylog n where nylx = ?1 and czmc = ?2 and cxtj = ?3 order by createdate desc ") | ||
| 15 | + List<Nylog> selectByCxtj(String nylx, String czmc, String cxtj); | ||
| 16 | + | ||
| 11 | } | 17 | } |
src/main/java/com/bsth/repository/zndd/ZnddLoggerRepository.java
0 → 100644
src/main/java/com/bsth/repository/zndd/ZnddStatusRepository.java
| @@ -2,10 +2,20 @@ package com.bsth.repository.zndd; | @@ -2,10 +2,20 @@ package com.bsth.repository.zndd; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.zndd.znddStatus; | 3 | import com.bsth.entity.zndd.znddStatus; |
| 4 | import com.bsth.repository.BaseRepository; | 4 | import com.bsth.repository.BaseRepository; |
| 5 | +import org.springframework.data.jpa.repository.Modifying; | ||
| 6 | +import org.springframework.data.jpa.repository.Query; | ||
| 5 | import org.springframework.stereotype.Repository; | 7 | import org.springframework.stereotype.Repository; |
| 8 | +import org.springframework.transaction.annotation.Transactional; | ||
| 6 | 9 | ||
| 7 | 10 | ||
| 8 | @Repository | 11 | @Repository |
| 9 | public interface ZnddStatusRepository extends BaseRepository<znddStatus, Integer> { | 12 | public interface ZnddStatusRepository extends BaseRepository<znddStatus, Integer> { |
| 13 | + | ||
| 14 | + | ||
| 15 | + @Transactional | ||
| 16 | + @Modifying | ||
| 17 | + @Query(value="UPDATE zndd_status SET " + | ||
| 18 | + "open_status = ?2 WHERE id = ?1", nativeQuery=true) | ||
| 19 | + void update(Integer id, Integer openStatus); | ||
| 10 | 20 | ||
| 11 | } | 21 | } |
src/main/java/com/bsth/service/DKLInfoService.java
0 → 100644
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
| @@ -2395,7 +2395,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -2395,7 +2395,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 2395 | } | 2395 | } |
| 2396 | 2396 | ||
| 2397 | int i=1; | 2397 | int i=1; |
| 2398 | - DecimalFormat df = new DecimalFormat("0.00");//格式化小数 | 2398 | + DecimalFormat df = new DecimalFormat("0.000");//格式化小数 |
| 2399 | double allNum = 0.0; | 2399 | double allNum = 0.0; |
| 2400 | while (iter.hasNext()) { | 2400 | while (iter.hasNext()) { |
| 2401 | Map.Entry entry = (Map.Entry) iter.next(); | 2401 | Map.Entry entry = (Map.Entry) iter.next(); |
| @@ -2433,7 +2433,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | @@ -2433,7 +2433,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer | ||
| 2433 | listStr.add(c.getTs()+""); | 2433 | listStr.add(c.getTs()+""); |
| 2434 | // 把列合计的数添加到最后一个 | 2434 | // 把列合计的数添加到最后一个 |
| 2435 | cList.add(c); | 2435 | cList.add(c); |
| 2436 | - // DecimalFormat df = new DecimalFormat("0.00");//格式化小数 | ||
| 2437 | for (CalcWaybillDetail c1:cList) { | 2436 | for (CalcWaybillDetail c1:cList) { |
| 2438 | if(StringUtils.isEmpty(c1.getXl())) { | 2437 | if(StringUtils.isEmpty(c1.getXl())) { |
| 2439 | listStr.add(""); | 2438 | listStr.add(""); |
src/main/java/com/bsth/service/impl/DKLInfoServiceImpl.java
0 → 100644
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| @@ -710,6 +710,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -710,6 +710,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 710 | String sleepStr = ""; | 710 | String sleepStr = ""; |
| 711 | // 方向 | 711 | // 方向 |
| 712 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); | 712 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 713 | + if (directions == 1) { | ||
| 714 | + stationName = stationName.replaceAll("\\(起点站\\)", "").replaceAll("\\(终点站\\)", "").replaceAll("(起点站)", "").replaceAll("(终点站)", ""); | ||
| 715 | + } | ||
| 713 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 716 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 714 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); | 717 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); |
| 715 | if(sobje.size()==1) { | 718 | if(sobje.size()==1) { |
| @@ -799,6 +802,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -799,6 +802,9 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 799 | String sleepStr = ""; | 802 | String sleepStr = ""; |
| 800 | // 方向 | 803 | // 方向 |
| 801 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); | 804 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 805 | + if (directions == 1) { | ||
| 806 | + stationName = stationName.replaceAll("\\(起点站\\)", "").replaceAll("\\(终点站\\)", "").replaceAll("(起点站)", "").replaceAll("(终点站)", ""); | ||
| 807 | + } | ||
| 802 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ | 808 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 803 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); | 809 | List<Object[]> sobje = sectionRouteRepository.sectionRouteVector(lineId,directions); |
| 804 | if(sobje.size()==1) { | 810 | if(sobje.size()==1) { |
src/main/java/com/bsth/service/lg_travel/RegionLineCarService.java
0 → 100644
src/main/java/com/bsth/service/lg_travel/RegionService.java
0 → 100644
src/main/java/com/bsth/service/lg_travel/impl/RegionLineCarServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.lg_travel.impl; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.bsth.entity.lg_travel.RegionLineCar; | ||
| 5 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 6 | +import com.bsth.service.lg_travel.RegionLineCarService; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | + | ||
| 9 | +@Service | ||
| 10 | +public class RegionLineCarServiceImpl extends BaseServiceImpl<RegionLineCar, Long> implements RegionLineCarService { | ||
| 11 | + | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +} |
src/main/java/com/bsth/service/lg_travel/impl/RegionServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.lg_travel.impl; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.bsth.entity.lg_travel.Region; | ||
| 5 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 6 | +import com.bsth.service.lg_travel.RegionService; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | + | ||
| 9 | +@Service | ||
| 10 | +public class RegionServiceImpl extends BaseServiceImpl<Region, Long> implements RegionService { | ||
| 11 | + | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +} |
src/main/java/com/bsth/service/oil/JdlService.java
| 1 | package com.bsth.service.oil; | 1 | package com.bsth.service.oil; |
| 2 | 2 | ||
| 3 | import java.io.File; | 3 | import java.io.File; |
| 4 | +import java.io.IOException; | ||
| 5 | +import java.util.List; | ||
| 4 | import java.util.Map; | 6 | import java.util.Map; |
| 5 | 7 | ||
| 8 | +import javax.servlet.http.HttpServletResponse; | ||
| 9 | + | ||
| 6 | import com.bsth.entity.oil.Jdl; | 10 | import com.bsth.entity.oil.Jdl; |
| 11 | +import com.bsth.entity.oil.JdlConnector; | ||
| 12 | +import com.bsth.entity.oil.JdlReception; | ||
| 7 | import com.bsth.service.BaseService; | 13 | import com.bsth.service.BaseService; |
| 8 | 14 | ||
| 9 | public interface JdlService extends BaseService<Jdl, Integer> { | 15 | public interface JdlService extends BaseService<Jdl, Integer> { |
| 10 | 16 | ||
| 11 | public String importExcel(File file, String gsbm_, String gsName, String fgsbm, String fgsName); | 17 | public String importExcel(File file, String gsbm_, String gsName, String fgsbm, String fgsName); |
| 18 | + | ||
| 19 | + /** 24年12月工单更新电量导入 */ | ||
| 20 | + public String importExcel_2412(File file, String gsbm_, String gsName, String fgsbm, String fgsName, String stationName); | ||
| 12 | 21 | ||
| 13 | public Map<String, Object> query(Map<String, Object> map); | 22 | public Map<String, Object> query(Map<String, Object> map); |
| 23 | + | ||
| 24 | + public Map<String, Object> query_2412(Map<String, Object> map); | ||
| 25 | + | ||
| 26 | + public List<JdlReception> queryJdlReception(Map<String, Object> map); | ||
| 27 | + | ||
| 28 | + public Map<String, Object> queryJdlReceptionBatch(Map<String, Object> map); | ||
| 29 | + | ||
| 30 | + public List<JdlReception> queryJdlReceptionBatchData(Map<String, Object> map); | ||
| 31 | + | ||
| 32 | + public Map<String, Object> deleteJdlReceptionBatch(Map<String, Object> map); | ||
| 33 | + | ||
| 34 | + public Map<String, Object> updateJdlReceptionBatch(Map<String, Object> map); | ||
| 35 | + | ||
| 36 | + public void downloadJdlReceptionImportFile(Map<String, Object> map, HttpServletResponse response) throws IOException; | ||
| 37 | + | ||
| 38 | + /** | ||
| 39 | + * 查询车辆充电量,以jdl表格式返回 | ||
| 40 | + * @param rq 营运日期 | ||
| 41 | + * @param nbbm 车辆自编号(为‘’时查询全部车辆) | ||
| 42 | + * @return | ||
| 43 | + */ | ||
| 44 | + public List<Jdl> queryJdlByJdlReception(String rq, String nbbm); | ||
| 45 | + | ||
| 46 | + public List<JdlConnector> queryJdlConnector(Map<String, Object> map); | ||
| 47 | + | ||
| 48 | + public JdlConnector queryJdlConnectorById(Integer id); | ||
| 49 | + | ||
| 50 | + public List<String> queryJdlStationName(); | ||
| 51 | + | ||
| 52 | + public Map<String, Object> addJdlConnector(Map<String, Object> map); | ||
| 53 | + | ||
| 54 | + public Map<String, Object> deleteJdlConnector(Map<String, Object> map); | ||
| 55 | + | ||
| 56 | + public Map<String, Object> updateJdlConnector(Map<String, Object> map); | ||
| 14 | 57 | ||
| 15 | } | 58 | } |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -48,6 +48,7 @@ import com.bsth.repository.CarsRepository; | @@ -48,6 +48,7 @@ import com.bsth.repository.CarsRepository; | ||
| 48 | import com.bsth.repository.oil.CdlRepository; | 48 | import com.bsth.repository.oil.CdlRepository; |
| 49 | import com.bsth.repository.oil.CylRepository; | 49 | import com.bsth.repository.oil.CylRepository; |
| 50 | import com.bsth.repository.oil.DlbRepository; | 50 | import com.bsth.repository.oil.DlbRepository; |
| 51 | +import com.bsth.repository.oil.JdlReceptionRepository; | ||
| 51 | import com.bsth.repository.oil.JdlRepository; | 52 | import com.bsth.repository.oil.JdlRepository; |
| 52 | import com.bsth.repository.oil.NylogRepository; | 53 | import com.bsth.repository.oil.NylogRepository; |
| 53 | import com.bsth.repository.oil.YlbRepository; | 54 | import com.bsth.repository.oil.YlbRepository; |
| @@ -55,6 +56,7 @@ import com.bsth.repository.oil.YlxxbRepository; | @@ -55,6 +56,7 @@ import com.bsth.repository.oil.YlxxbRepository; | ||
| 55 | import com.bsth.security.util.SecurityUtils; | 56 | import com.bsth.security.util.SecurityUtils; |
| 56 | import com.bsth.service.impl.BaseServiceImpl; | 57 | import com.bsth.service.impl.BaseServiceImpl; |
| 57 | import com.bsth.service.oil.DlbService; | 58 | import com.bsth.service.oil.DlbService; |
| 59 | +import com.bsth.service.oil.JdlService; | ||
| 58 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 60 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 59 | import com.bsth.util.Arith; | 61 | import com.bsth.util.Arith; |
| 60 | import com.bsth.util.BatchSaveUtils; | 62 | import com.bsth.util.BatchSaveUtils; |
| @@ -77,6 +79,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -77,6 +79,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 77 | 79 | ||
| 78 | @Autowired | 80 | @Autowired |
| 79 | ScheduleRealInfoService scheduleRealInfoService; | 81 | ScheduleRealInfoService scheduleRealInfoService; |
| 82 | + @Autowired | ||
| 83 | + JdlService jdlService; | ||
| 80 | 84 | ||
| 81 | @Autowired | 85 | @Autowired |
| 82 | JdbcTemplate jdbcTemplate; | 86 | JdbcTemplate jdbcTemplate; |
| @@ -91,7 +95,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -91,7 +95,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 91 | Map<String, Boolean> carsMap=new HashMap<String, Boolean>(); | 95 | Map<String, Boolean> carsMap=new HashMap<String, Boolean>(); |
| 92 | for (int i = 0; i < carsList.size(); i++) { | 96 | for (int i = 0; i < carsList.size(); i++) { |
| 93 | Cars c=carsList.get(i); | 97 | Cars c=carsList.get(i); |
| 94 | - carsMap.put(c.getInsideCode(), c.getSfdc()); | 98 | + carsMap.put(c.getInsideCode(), (c.getSfdc()!=null?c.getSfdc():false) |
| 99 | + || (c.getSfmix()!=null?c.getSfmix():false));//电车或油电混合,都可以充电 | ||
| 95 | } | 100 | } |
| 96 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 101 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 97 | Date dNow = new Date(); //当前时间 | 102 | Date dNow = new Date(); //当前时间 |
| @@ -103,8 +108,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -103,8 +108,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 103 | String rq=sdf.format(dBefore); | 108 | String rq=sdf.format(dBefore); |
| 104 | // String rq="2017-11-02"; | 109 | // String rq="2017-11-02"; |
| 105 | String line=""; | 110 | String line=""; |
| 106 | - //保留两位小数 | ||
| 107 | - DecimalFormat df = new DecimalFormat("#.00"); | 111 | + //公里保留三位小数 |
| 112 | + DecimalFormat df = new DecimalFormat("#.000"); | ||
| 108 | // TODO Auto-generated method stub | 113 | // TODO Auto-generated method stub |
| 109 | Map<String, Object> newMap=new HashMap<String,Object>(); | 114 | Map<String, Object> newMap=new HashMap<String,Object>(); |
| 110 | //当天DLB信息 | 115 | //当天DLB信息 |
| @@ -112,7 +117,9 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -112,7 +117,9 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 112 | //当天YLXXB信息 | 117 | //当天YLXXB信息 |
| 113 | List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq,1,""); | 118 | List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq,1,""); |
| 114 | //当天加电信息表 | 119 | //当天加电信息表 |
| 115 | - List<Jdl> jdlList=jdlRepository.JdlList(rq); | 120 | + List<Jdl> jdlList = jdlRepository.JdlList(rq); |
| 121 | +// List<Jdl> jdlList = jdlService.queryJdlByJdlReception(rq, ""); | ||
| 122 | +// jdlList.addAll(jdlRepository.JdlList(rq)); | ||
| 116 | //前一天所有车辆最后进场班次信息 | 123 | //前一天所有车辆最后进场班次信息 |
| 117 | // List<Dlb> dlListBe=repository.obtainYlbefore(rq, "", "", "", ""); | 124 | // List<Dlb> dlListBe=repository.obtainYlbefore(rq, "", "", "", ""); |
| 118 | List<Cdl> cdyList=cdlRepository.obtainCdl(); | 125 | List<Cdl> cdyList=cdlRepository.obtainCdl(); |
| @@ -123,7 +130,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -123,7 +130,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 123 | boolean sfdc=false; | 130 | boolean sfdc=false; |
| 124 | Map<String, Object> map=listpb.get(x); | 131 | Map<String, Object> map=listpb.get(x); |
| 125 | if (carsMap.get(map.get("clZbh").toString())!=null) { | 132 | if (carsMap.get(map.get("clZbh").toString())!=null) { |
| 126 | - sfdc= carsMap.get(map.get("clZbh").toString()); | 133 | + sfdc = carsMap.get(map.get("clZbh").toString()); |
| 127 | }else{ | 134 | }else{ |
| 128 | sfdc=false; | 135 | sfdc=false; |
| 129 | } | 136 | } |
| @@ -237,7 +244,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -237,7 +244,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 237 | Map<String, Boolean> carsMap = new HashMap<String, Boolean>(); | 244 | Map<String, Boolean> carsMap = new HashMap<String, Boolean>(); |
| 238 | for (int i = 0; i < carsList.size(); i++) { | 245 | for (int i = 0; i < carsList.size(); i++) { |
| 239 | Cars c = carsList.get(i); | 246 | Cars c = carsList.get(i); |
| 240 | - carsMap.put(c.getInsideCode(), c.getSfdc()); | 247 | + carsMap.put(c.getInsideCode(), (c.getSfdc()!=null?c.getSfdc():false) |
| 248 | + || (c.getSfmix()!=null?c.getSfmix():false));//电车或油电混合,都可以充电 | ||
| 241 | } | 249 | } |
| 242 | String rq = map2.get("rq").toString(); | 250 | String rq = map2.get("rq").toString(); |
| 243 | String line = ""; | 251 | String line = ""; |
| @@ -257,8 +265,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -257,8 +265,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 257 | nbbm=map2.get("nbbm_eq").toString(); | 265 | nbbm=map2.get("nbbm_eq").toString(); |
| 258 | } | 266 | } |
| 259 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 267 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 260 | - // 保留两位小数 | ||
| 261 | - DecimalFormat df = new DecimalFormat("#.00"); | 268 | + // 加注量与能耗保留两位小数 |
| 269 | + DecimalFormat df = new DecimalFormat("0.##"); | ||
| 262 | // TODO Auto-generated method stub | 270 | // TODO Auto-generated method stub |
| 263 | // 当天DLB信息 | 271 | // 当天DLB信息 |
| 264 | List<Dlb> dlList = this.listOrderBy(rq,gsbm,fgsbm,"",nbbm,"nbbm"); | 272 | List<Dlb> dlList = this.listOrderBy(rq,gsbm,fgsbm,"",nbbm,"nbbm"); |
| @@ -281,8 +289,9 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -281,8 +289,9 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 281 | } | 289 | } |
| 282 | } | 290 | } |
| 283 | 291 | ||
| 284 | - List<Jdl> jdlList=jdlRepository.JdlList(rq); | ||
| 285 | - List<Jdl> jdlList_1=jdlRepository.JdlList_1(rq, gsbm, "-1"); | 292 | + List<Jdl> jdlList = jdlRepository.JdlList(rq); |
| 293 | +// List<Jdl> jdlList = jdlService.queryJdlByJdlReception(rq, ""); | ||
| 294 | +// jdlList.addAll(jdlRepository.JdlList(rq)); | ||
| 286 | String sxtj=map2.get("sxtj").toString(); | 295 | String sxtj=map2.get("sxtj").toString(); |
| 287 | if(sxtj.equals("0")){ | 296 | if(sxtj.equals("0")){ |
| 288 | listpb=listpbs; | 297 | listpb=listpbs; |
| @@ -360,41 +369,15 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -360,41 +369,15 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 360 | //车辆总里程 | 369 | //车辆总里程 |
| 361 | double zlc =lcMap.get(map_.get("clZbh").toString()); | 370 | double zlc =lcMap.get(map_.get("clZbh").toString()); |
| 362 | //车辆总加电量 | 371 | //车辆总加电量 |
| 363 | - double zjzl = 0.0, zjzl_1 = 0.0; | ||
| 364 | - for (int j = 0; j < ylxxList.size(); j++) { | ||
| 365 | - Ylxxb ylxxb = ylxxList.get(j); | ||
| 366 | - if (map_.get("clZbh").toString().equals(ylxxb.getNbbm()) | ||
| 367 | - && map_.get("company").toString().equals(ylxxb.getGsdm())) { | ||
| 368 | - zjzl = Arith.add(zjzl, ylxxb.getJzl()); | ||
| 369 | - } | ||
| 370 | - } | 372 | + double zjzl = 0.0; |
| 373 | + // 2022年12月20号要求不按车队导入,这之后导入的加注量将覆盖原加注量 | ||
| 371 | for (int i = 0; i < jdlList.size(); i++) { | 374 | for (int i = 0; i < jdlList.size(); i++) { |
| 372 | Jdl jdl=jdlList.get(i); | 375 | Jdl jdl=jdlList.get(i); |
| 373 | - if(map_.get("clZbh").toString().equals(jdl.getNbbm()) | ||
| 374 | - &&clFgs.get(map_.get("clZbh").toString()).contains(jdl.getGsBm()+"_"+jdl.getFgsBm())){ | ||
| 375 | - zjzl = Arith.add(zjzl,jdl.getJdl()); | 376 | + if(map_.get("clZbh").toString().equals(jdl.getNbbm())){ |
| 377 | + zjzl = Arith.add(zjzl, jdl.getJdl()); | ||
| 376 | } | 378 | } |
| 377 | } | 379 | } |
| 378 | - int num = 0; // 2022年12月20号要求不按车队导入,这之后导入的加注量将覆盖原加注量 | ||
| 379 | - for (int i = 0; i < jdlList_1.size(); i++) { | ||
| 380 | - Jdl jdl=jdlList_1.get(i); | ||
| 381 | - if(map_.get("clZbh").toString().equals(jdl.getNbbm()) | ||
| 382 | - &&map_.get("company").toString().equals(jdl.getGsBm())){ | ||
| 383 | - zjzl_1 = Arith.add(zjzl_1,jdl.getJdl()); | ||
| 384 | - num++; | ||
| 385 | - } | ||
| 386 | - } | ||
| 387 | - if(num > 0){ | ||
| 388 | - zjzl = zjzl_1; | ||
| 389 | - } | ||
| 390 | 380 | ||
| 391 | -// double clsh=0.0; | ||
| 392 | -// if(shMap.get(map_.get("clZbh").toString())==null){ | ||
| 393 | -// clsh=0.0; | ||
| 394 | -// }else{ | ||
| 395 | -// clsh=shMap.get(map_.get("clZbh").toString()); | ||
| 396 | -// } | ||
| 397 | -// zjzl =Arith.sub(zjzl, clsh); | ||
| 398 | Double nextJzyl = 0.0; | 381 | Double nextJzyl = 0.0; |
| 399 | for (int i = 0; i < listpb.size(); i++) { | 382 | for (int i = 0; i < listpb.size(); i++) { |
| 400 | Map<String, Object> map = listpb.get(i); | 383 | Map<String, Object> map = listpb.get(i); |
| @@ -934,18 +917,26 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -934,18 +917,26 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 934 | String fgsdm,String xlbm,String nbbm, | 917 | String fgsdm,String xlbm,String nbbm, |
| 935 | String px) { | 918 | String px) { |
| 936 | // TODO Auto-generated method stub | 919 | // TODO Auto-generated method stub |
| 937 | - String sql="SELECT * FROM bsth_c_dlb " | ||
| 938 | - + " where rq='"+rq+"' and ssgsdm like '%"+gsdm+"%' " | ||
| 939 | - + " and fgsdm like '%"+fgsdm+"%'"; | 920 | + List<String> objList = new ArrayList<String>(); |
| 921 | + String sql="SELECT * FROM bsth_c_dlb " | ||
| 922 | + + " where rq = ? " | ||
| 923 | + + " and ssgsdm like ? " | ||
| 924 | + + " and fgsdm like ? "; | ||
| 925 | + objList.add(rq); | ||
| 926 | + objList.add('%' + gsdm + '%'); | ||
| 927 | + objList.add('%' + fgsdm + '%'); | ||
| 940 | if(xlbm.equals("")){ | 928 | if(xlbm.equals("")){ |
| 941 | - sql+= " and xlbm like '%"+xlbm+"%' "; | 929 | + sql+= " and xlbm like ? "; |
| 930 | + objList.add('%' + xlbm + '%'); | ||
| 942 | }else{ | 931 | }else{ |
| 943 | - sql+= " and xlbm = '"+xlbm+"' "; | 932 | + sql+= " and xlbm = ? "; |
| 933 | + objList.add(xlbm); | ||
| 944 | } | 934 | } |
| 945 | - | ||
| 946 | - sql += "and nbbm like '%"+nbbm+"%' order by "+px+" asc "; | ||
| 947 | 935 | ||
| 948 | - List<Dlb> list = jdbcTemplate.query(sql, new RowMapper<Dlb>() { | 936 | + sql += "and nbbm like ? order by "+px+" asc "; |
| 937 | + objList.add('%' + nbbm + '%'); | ||
| 938 | + | ||
| 939 | + List<Dlb> list = jdbcTemplate.query(sql, objList.toArray(), new RowMapper<Dlb>() { | ||
| 949 | @Override | 940 | @Override |
| 950 | public Dlb mapRow(ResultSet arg0, int arg1) throws SQLException { | 941 | public Dlb mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 951 | Dlb y = new Dlb(); | 942 | Dlb y = new Dlb(); |
| @@ -1075,8 +1066,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -1075,8 +1066,8 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 1075 | // TODO Auto-generated method stub | 1066 | // TODO Auto-generated method stub |
| 1076 | Map<String, List<Dlb>> mapList=new HashMap<String,List<Dlb>>(); | 1067 | Map<String, List<Dlb>> mapList=new HashMap<String,List<Dlb>>(); |
| 1077 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); | 1068 | SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); |
| 1078 | - // 保留两位小数 | ||
| 1079 | - DecimalFormat df = new DecimalFormat("#.00"); | 1069 | + // 加注量与能耗保留两位小数 |
| 1070 | + DecimalFormat df = new DecimalFormat("0.##"); | ||
| 1080 | List<Dlb> dlbList=this.listOrderBy(date,gsdm,fgsdm,"","","nbbm"); | 1071 | List<Dlb> dlbList=this.listOrderBy(date,gsdm,fgsdm,"","","nbbm"); |
| 1081 | List<Dlb> dlbList_upd=new ArrayList<Dlb>(); | 1072 | List<Dlb> dlbList_upd=new ArrayList<Dlb>(); |
| 1082 | List<Dlb> dlbList_del=new ArrayList<Dlb>(); | 1073 | List<Dlb> dlbList_del=new ArrayList<Dlb>(); |
| @@ -1132,8 +1123,11 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -1132,8 +1123,11 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 1132 | shMap.put(cl, Arith.add(sh, dlb.getSh())); | 1123 | shMap.put(cl, Arith.add(sh, dlb.getSh())); |
| 1133 | } | 1124 | } |
| 1134 | } | 1125 | } |
| 1135 | - List<Jdl> jdlList=jdlRepository.JdlList(date); | ||
| 1136 | - List<Ylxxb> ylxxList = ylxxbRepository.obtainYlxx(date, 0,gsdm); | 1126 | + List<Jdl> jdlList = jdlRepository.JdlList(date); |
| 1127 | +// List<Jdl> jdlList = jdlService.queryJdlByJdlReception(date, ""); | ||
| 1128 | +// jdlList.addAll(jdlRepository.JdlList(date)); | ||
| 1129 | + | ||
| 1130 | +// List<Ylxxb> ylxxList = ylxxbRepository.obtainYlxx(date, 0,gsdm); | ||
| 1137 | Map<String, Object> newMap_=new HashMap<String,Object>(); | 1131 | Map<String, Object> newMap_=new HashMap<String,Object>(); |
| 1138 | Map<String, Object> cMap=new HashMap<String, Object>(); | 1132 | Map<String, Object> cMap=new HashMap<String, Object>(); |
| 1139 | List<Map<String, Object>> listpb_=listpbDc; | 1133 | List<Map<String, Object>> listpb_=listpbDc; |
| @@ -1148,19 +1142,10 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -1148,19 +1142,10 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 1148 | double zlc =lcMap.get(map_.get("clZbh").toString()); | 1142 | double zlc =lcMap.get(map_.get("clZbh").toString()); |
| 1149 | //车辆总加电量 | 1143 | //车辆总加电量 |
| 1150 | double zjzl = 0.0; | 1144 | double zjzl = 0.0; |
| 1151 | - for (int j = 0; j < ylxxList.size(); j++) { | ||
| 1152 | - Ylxxb ylxxb = ylxxList.get(j); | ||
| 1153 | - if (map_.get("clZbh").toString().equals(ylxxb.getNbbm()) | ||
| 1154 | - && map_.get("company").toString().equals(ylxxb.getGsdm())) { | ||
| 1155 | - zjzl = Arith.add(zjzl, ylxxb.getJzl()); | ||
| 1156 | - } | ||
| 1157 | - } | ||
| 1158 | for (int i = 0; i < jdlList.size(); i++) { | 1145 | for (int i = 0; i < jdlList.size(); i++) { |
| 1159 | Jdl jdl=jdlList.get(i); | 1146 | Jdl jdl=jdlList.get(i); |
| 1160 | - if(map_.get("clZbh").toString().equals(jdl.getNbbm()) | ||
| 1161 | - &&map_.get("company").toString().equals(jdl.getGsBm()) | ||
| 1162 | - &&map_.get("bCompany").toString().equals(jdl.getFgsBm())){ | ||
| 1163 | - zjzl = Arith.add(zjzl,jdl.getJdl()); | 1147 | + if(map_.get("clZbh").toString().equals(jdl.getNbbm())){ |
| 1148 | + zjzl = Arith.add(zjzl, jdl.getJdl()); | ||
| 1164 | } | 1149 | } |
| 1165 | } | 1150 | } |
| 1166 | double clsh=0.0; | 1151 | double clsh=0.0; |