Commit 589ee963ae078271c02b4ba74c282f7fe062ba94
Merge branch 'pudong_jdk8' of http://192.168.168.201:8888/panzhaov5/bsth_control into pudong_jdk8
Showing
10 changed files
with
2262 additions
and
2147 deletions
Too many changes to show.
To preserve performance only 10 of 18 files are displayed.
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| 1 | -package com.bsth.controller.realcontrol; | |
| 2 | - | |
| 3 | -import java.io.ByteArrayOutputStream; | |
| 4 | -import java.io.IOException; | |
| 5 | -import java.io.InputStream; | |
| 6 | -import java.io.OutputStream; | |
| 7 | -import java.net.HttpURLConnection; | |
| 8 | -import java.net.MalformedURLException; | |
| 9 | -import java.net.URL; | |
| 10 | -import java.net.URLEncoder; | |
| 11 | -import java.sql.Connection; | |
| 12 | -import java.sql.Date; | |
| 13 | -import java.sql.PreparedStatement; | |
| 14 | -import java.sql.ResultSet; | |
| 15 | -import java.util.*; | |
| 16 | - | |
| 17 | -import com.bsth.data.forecast.entity.ArrivalEntity; | |
| 18 | -import com.bsth.entity.sys.SysUser; | |
| 19 | -import com.bsth.security.util.SecurityUtils; | |
| 20 | -import com.bsth.util.ReportUtils; | |
| 21 | -import com.bsth.util.db.DBUtils_MS; | |
| 22 | -import com.bsth.util.db.DBUtils_control; | |
| 23 | -import com.fasterxml.jackson.databind.ObjectMapper; | |
| 24 | -import org.apache.commons.io.IOUtils; | |
| 25 | -import org.apache.commons.lang3.StringEscapeUtils; | |
| 26 | -import org.joda.time.DateTime; | |
| 27 | -import org.joda.time.format.DateTimeFormat; | |
| 28 | -import org.joda.time.format.DateTimeFormatter; | |
| 29 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 30 | -import org.springframework.web.bind.annotation.*; | |
| 31 | - | |
| 32 | -import com.alibaba.fastjson.JSONArray; | |
| 33 | -import com.bsth.common.ResponseCode; | |
| 34 | -import com.bsth.controller.BaseController; | |
| 35 | -import com.bsth.controller.realcontrol.dto.ChangePersonCar; | |
| 36 | -import com.bsth.controller.realcontrol.dto.DfsjChange; | |
| 37 | -import com.bsth.data.BasicData; | |
| 38 | -import com.bsth.data.schedule.DayOfSchedule; | |
| 39 | -import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | |
| 40 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 41 | -import com.bsth.entity.report.RepairReport; | |
| 42 | -import com.bsth.entity.schedule.SchedulePlanInfo; | |
| 43 | -import com.bsth.service.realcontrol.ScheduleRealInfoService; | |
| 44 | - | |
| 45 | -@RestController | |
| 46 | -@RequestMapping("/realSchedule") | |
| 47 | -public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> { | |
| 48 | - | |
| 49 | - @Autowired | |
| 50 | - ScheduleRealInfoService scheduleRealInfoService; | |
| 51 | - | |
| 52 | - @Autowired | |
| 53 | - DayOfSchedule dayOfSchedule; | |
| 54 | - | |
| 55 | - @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST) | |
| 56 | - public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){ | |
| 57 | - return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm); | |
| 58 | - } | |
| 59 | - | |
| 60 | - @RequestMapping(value = "/lines") | |
| 61 | - public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) { | |
| 62 | - return scheduleRealInfoService.findByLines(lines); | |
| 63 | - } | |
| 64 | - | |
| 65 | - @RequestMapping(value = "/car") | |
| 66 | - public List<ScheduleRealInfo> findByCar(String nbbm){ | |
| 67 | - return dayOfSchedule.findByNbbm(nbbm); | |
| 68 | - } | |
| 69 | - | |
| 70 | - /** | |
| 71 | - * | |
| 72 | - * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id | |
| 73 | - * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws | |
| 74 | - */ | |
| 75 | - @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST) | |
| 76 | - public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks, | |
| 77 | - @RequestParam String dfsj,String bcType, | |
| 78 | - @RequestParam(defaultValue = "") String opType) { | |
| 79 | - return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null); | |
| 80 | - } | |
| 81 | - | |
| 82 | - /** | |
| 83 | - * | |
| 84 | - * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔 | |
| 85 | - */ | |
| 86 | - @RequestMapping(value = "/destroy", method = RequestMethod.POST) | |
| 87 | - public Map<String, Object> destroy(@RequestParam String idsStr | |
| 88 | - /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/, | |
| 89 | - @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) { | |
| 90 | - return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null); | |
| 91 | - } | |
| 92 | - | |
| 93 | - /** | |
| 94 | - * | |
| 95 | - * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws | |
| 96 | - */ | |
| 97 | - @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET) | |
| 98 | - public Map<String, String> carDeviceMapp() { | |
| 99 | - return BasicData.deviceId2NbbmMap.inverse(); | |
| 100 | - } | |
| 101 | - | |
| 102 | - /** | |
| 103 | - * | |
| 104 | - * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param | |
| 105 | - * lineId @throws | |
| 106 | - */ | |
| 107 | - @RequestMapping(value = "/driver", method = RequestMethod.GET) | |
| 108 | - public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) { | |
| 109 | - return scheduleRealInfoService.findDriverByLine(lineCode); | |
| 110 | - } | |
| 111 | - | |
| 112 | - /** | |
| 113 | - * | |
| 114 | - * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param | |
| 115 | - * lineId @throws | |
| 116 | - */ | |
| 117 | - @RequestMapping(value = "/conductor", method = RequestMethod.GET) | |
| 118 | - public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) { | |
| 119 | - return scheduleRealInfoService.findConductorByLine(lineCode); | |
| 120 | - } | |
| 121 | - | |
| 122 | - /** | |
| 123 | - * | |
| 124 | - * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param | |
| 125 | - * lineId @throws | |
| 126 | - */ | |
| 127 | - @RequestMapping(value = "/cars", method = RequestMethod.GET) | |
| 128 | - public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) { | |
| 129 | - return scheduleRealInfoService.findCarByLine(lineCode); | |
| 130 | - } | |
| 131 | - | |
| 132 | - /** | |
| 133 | - * | |
| 134 | - * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws | |
| 135 | - */ | |
| 136 | - @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET) | |
| 137 | - public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) { | |
| 138 | - return scheduleRealInfoService.sreachVehic(nbbm); | |
| 139 | - } | |
| 140 | - /** | |
| 141 | - * | |
| 142 | - * @Title: realOutAdjust | |
| 143 | - * @Description: TODO(实发调整) | |
| 144 | - * @param @param id 班次ID | |
| 145 | - * @param @param fcsjActual 实际发车时间 HH:mm | |
| 146 | - * @param @param remarks 备注 | |
| 147 | - * @throws | |
| 148 | - */ | |
| 149 | - @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST) | |
| 150 | - public Map<String, Object> realOutAdjust(@RequestParam Map<String, String> map) { | |
| 151 | - return scheduleRealInfoService.realOutAdjust(map); | |
| 152 | - } | |
| 153 | - | |
| 154 | - /** | |
| 155 | - * | |
| 156 | - * @Title: revokeDestroy | |
| 157 | - * @Description: TODO(撤销烂班) | |
| 158 | - * @param @param id | |
| 159 | - * @throws | |
| 160 | - */ | |
| 161 | - @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST) | |
| 162 | - public Map<String, Object> revokeDestroy(@RequestParam Long id){ | |
| 163 | - return scheduleRealInfoService.revokeDestroy(id); | |
| 164 | - } | |
| 165 | - | |
| 166 | - /** | |
| 167 | - * | |
| 168 | - * @Title: revokeRealOutgo | |
| 169 | - * @Description: TODO(撤销实发) | |
| 170 | - * @param @param id | |
| 171 | - * @throws | |
| 172 | - */ | |
| 173 | - @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST) | |
| 174 | - public Map<String, Object> revokeRealOutgo(@RequestParam Long id){ | |
| 175 | - return scheduleRealInfoService.revokeRealOutgo(id); | |
| 176 | - } | |
| 177 | - | |
| 178 | - /** | |
| 179 | - * 撤销执行 | |
| 180 | - * @param id | |
| 181 | - * @return | |
| 182 | - */ | |
| 183 | - @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST) | |
| 184 | - public Map<String, Object> revokeRealArrive(@RequestParam Long id){ | |
| 185 | - return scheduleRealInfoService.revokeRealArrive(id); | |
| 186 | - } | |
| 187 | - | |
| 188 | - /** | |
| 189 | - * | |
| 190 | - * @Title: spaceAdjust | |
| 191 | - * @Description: TODO(间隔调整) | |
| 192 | - * @param @param ids 要调整的班次数组ID | |
| 193 | - * @param @param space 间隔 | |
| 194 | - * @throws | |
| 195 | - */ | |
| 196 | - @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST) | |
| 197 | - public Map<String, Object> spaceAdjust(Long[] ids, Integer space){ | |
| 198 | - return scheduleRealInfoService.spaceAdjust(ids, space); | |
| 199 | - } | |
| 200 | - | |
| 201 | - /** | |
| 202 | - * | |
| 203 | - * @Title: schInfoFineTune | |
| 204 | - * @Description: TODO(发车信息微调) | |
| 205 | - * @param @param map | |
| 206 | - * @throws | |
| 207 | - */ | |
| 208 | - @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST) | |
| 209 | - public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){ | |
| 210 | - return scheduleRealInfoService.schInfoFineTune(map); | |
| 211 | - } | |
| 212 | - | |
| 213 | - /** | |
| 214 | - * | |
| 215 | - * @Title: outgoAdjustAll | |
| 216 | - * @Description: TODO(批量待发调整) | |
| 217 | - * @param @param list | |
| 218 | - * @throws | |
| 219 | - */ | |
| 220 | - @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST) | |
| 221 | - public Map<String, Object> outgoAdjustAll(@RequestParam String params){ | |
| 222 | - //反转义 | |
| 223 | - params = StringEscapeUtils.unescapeHtml4(params); | |
| 224 | - return scheduleRealInfoService.outgoAdjustAll(params); | |
| 225 | - } | |
| 226 | - | |
| 227 | - /** | |
| 228 | - * | |
| 229 | - * @Title: findByLineAndUpDown | |
| 230 | - * @Description: TODO(根据线路和走向获取班次) | |
| 231 | - * @param @param line | |
| 232 | - * @param @param upDown | |
| 233 | - */ | |
| 234 | - @RequestMapping(value = "/findByLineAndUpDown") | |
| 235 | - public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){ | |
| 236 | - return dayOfSchedule.findByLineAndUpDown(line, upDown); | |
| 237 | - } | |
| 238 | - | |
| 239 | - /** | |
| 240 | - * | |
| 241 | - * @Title: findRouteByLine | |
| 242 | - * @Description: TODO(获取线路的站点,路段路由) | |
| 243 | - * @param @param lineCode | |
| 244 | - * @throws | |
| 245 | - */ | |
| 246 | - @RequestMapping(value = "/findRouteByLine") | |
| 247 | - public Map<String, Object> findRouteByLine(@RequestParam String lineCode){ | |
| 248 | - return scheduleRealInfoService.findRouteByLine(lineCode); | |
| 249 | - } | |
| 250 | - | |
| 251 | - /** | |
| 252 | - * | |
| 253 | - * @Title: removeChildTask | |
| 254 | - * @Description: TODO(删除子任务) | |
| 255 | - * @param @param taskId 子任务ID | |
| 256 | - * @throws | |
| 257 | - */ | |
| 258 | - @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE) | |
| 259 | - public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){ | |
| 260 | - return scheduleRealInfoService.removeChildTask(taskId); | |
| 261 | - } | |
| 262 | - | |
| 263 | - /** | |
| 264 | - * | |
| 265 | - * @Title: findByLineCode | |
| 266 | - * @Description: TODO(根据线路获取班次信息) | |
| 267 | - * @param @param lineCode | |
| 268 | - */ | |
| 269 | - @RequestMapping(value = "/lineCode/{lineCode}") | |
| 270 | - public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){ | |
| 271 | - return dayOfSchedule.findByLineCode(lineCode); | |
| 272 | - } | |
| 273 | - | |
| 274 | - @RequestMapping(value = "/queryUserInfo") | |
| 275 | - public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line, | |
| 276 | - @RequestParam String date,@RequestParam String state) { | |
| 277 | - return scheduleRealInfoService.queryUserInfo(line, date,state); | |
| 278 | - } | |
| 279 | - | |
| 280 | - @RequestMapping(value = "/queryUserInfoPx") | |
| 281 | - public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line, | |
| 282 | - @RequestParam String date,@RequestParam String state,@RequestParam String type) { | |
| 283 | - return scheduleRealInfoService.queryUserInfoPx(line, date,state,type); | |
| 284 | - } | |
| 285 | - | |
| 286 | - @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET) | |
| 287 | - public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName,@RequestParam String jGh, @RequestParam String clZbh, | |
| 288 | - @RequestParam String lpName,@RequestParam String date,@RequestParam String line) { | |
| 289 | - return scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line); | |
| 290 | - } | |
| 291 | - | |
| 292 | - @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET) | |
| 293 | - public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh | |
| 294 | - ,@RequestParam String date,@RequestParam String line) { | |
| 295 | - return scheduleRealInfoService.exportWaybillQp( clZbh, date,line); | |
| 296 | - } | |
| 297 | - | |
| 298 | - | |
| 299 | - @RequestMapping(value = "/dailyInfo") | |
| 300 | - public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) { | |
| 301 | - return scheduleRealInfoService.dailyInfo(line, date, type); | |
| 302 | - } | |
| 303 | - | |
| 304 | - @RequestMapping(value = "/historyMessage") | |
| 305 | - public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date, | |
| 306 | - @RequestParam String code, @RequestParam String type) { | |
| 307 | - return scheduleRealInfoService.historyMessage(line, date, code, type); | |
| 308 | - } | |
| 309 | - | |
| 310 | - @RequestMapping(value="/findLine") | |
| 311 | - public List<Map<String,String>> findLine(@RequestParam String line){ | |
| 312 | - return scheduleRealInfoService.findLine(line); | |
| 313 | - } | |
| 314 | - | |
| 315 | - @RequestMapping(value="/findKMBC",method = RequestMethod.GET) | |
| 316 | - public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | |
| 317 | - ,@RequestParam String date,@RequestParam String line){ | |
| 318 | - return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line); | |
| 319 | - } | |
| 320 | - | |
| 321 | - /** | |
| 322 | - * 路单公里统计 (闵行审计专用) | |
| 323 | - * @param jGh | |
| 324 | - * @param clZbh | |
| 325 | - * @param lpName | |
| 326 | - * @param date | |
| 327 | - * @param line | |
| 328 | - * @return | |
| 329 | - */ | |
| 330 | - @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET) | |
| 331 | - public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | |
| 332 | - ,@RequestParam String date,@RequestParam String line){ | |
| 333 | - return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line); | |
| 334 | - } | |
| 335 | - | |
| 336 | - @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET) | |
| 337 | - public Map<String,Object> findKMBCQp(@RequestParam String clZbh | |
| 338 | - ,@RequestParam String date,@RequestParam String line){ | |
| 339 | - return scheduleRealInfoService.findKMBCQp(clZbh,date,line); | |
| 340 | - } | |
| 341 | - | |
| 342 | - @RequestMapping(value="/findLpName") | |
| 343 | - public List<Map<String,String>> findLpName(@RequestParam String lpName){ | |
| 344 | - return scheduleRealInfoService.findLpName(lpName); | |
| 345 | - } | |
| 346 | - | |
| 347 | - @RequestMapping(value = "/account") | |
| 348 | - public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date, | |
| 349 | - @RequestParam String code,@RequestParam String xlName, @RequestParam String type) { | |
| 350 | - return scheduleRealInfoService.account(line, date, code, xlName, type); | |
| 351 | - } | |
| 352 | - | |
| 353 | - @RequestMapping(value = "/accountPx") | |
| 354 | - public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date, | |
| 355 | - @RequestParam String code,@RequestParam String xlName, @RequestParam String px) { | |
| 356 | - return scheduleRealInfoService.accountPx(line, date, code, xlName, px); | |
| 357 | - } | |
| 358 | - | |
| 359 | - @RequestMapping(value = "/correctForm") | |
| 360 | - public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, | |
| 361 | - @RequestParam String endDate, | |
| 362 | - @RequestParam String lpName, @RequestParam String code, | |
| 363 | - @RequestParam String type,@RequestParam String changType) { | |
| 364 | - return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType); | |
| 365 | - } | |
| 366 | - /** | |
| 367 | - * @Title queryListWaybill | |
| 368 | - * @Description 查询行车路单列表 | |
| 369 | - * @param jGh 驾驶员名字 | |
| 370 | - * @param clZbh 车辆自编号(内部编号) | |
| 371 | - * @param lpName 路牌 | |
| 372 | - * @return | |
| 373 | - */ | |
| 374 | - @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET) | |
| 375 | - public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | |
| 376 | - ,@RequestParam String date,@RequestParam String line){ | |
| 377 | - return scheduleRealInfoService.queryListWaybill(jGh, clZbh,lpName,date,line); | |
| 378 | - } | |
| 379 | - | |
| 380 | - /** | |
| 381 | - * @Title queryListWaybill | |
| 382 | - * @Description 查询行车路单列表(闵行审计专用路单) | |
| 383 | - * @param jName 驾驶员名字 | |
| 384 | - * @param clZbh 车辆自编号(内部编号) | |
| 385 | - * @param lpName 路牌 | |
| 386 | - * @return | |
| 387 | - */ | |
| 388 | - @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET) | |
| 389 | - public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | |
| 390 | - ,@RequestParam String date,@RequestParam String line){ | |
| 391 | - return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line); | |
| 392 | - } | |
| 393 | - | |
| 394 | - @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET) | |
| 395 | - public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh, | |
| 396 | - @RequestParam String date,@RequestParam String line){ | |
| 397 | - return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line); | |
| 398 | - } | |
| 399 | - | |
| 400 | - @RequestMapping(value="/statisticsDaily") | |
| 401 | - public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date, | |
| 402 | - @RequestParam String xlName, @RequestParam String type){ | |
| 403 | - return scheduleRealInfoService.statisticsDaily(line, date, xlName, type); | |
| 404 | - } | |
| 405 | - | |
| 406 | - @RequestMapping(value="/statisticsDaily_mh_2") | |
| 407 | - public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date, | |
| 408 | - @RequestParam String xlName, @RequestParam String type){ | |
| 409 | - return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type); | |
| 410 | - } | |
| 411 | - | |
| 412 | - @RequestMapping(value="/dispatchDailySum") | |
| 413 | - public List<Map<String,Object>> dispatchDailySum(@RequestParam Map<String, Object> map){ | |
| 414 | - String date=""; | |
| 415 | - if(map.get("date")!=null){ | |
| 416 | - date=map.get("date").toString(); | |
| 417 | - } | |
| 418 | - String date2=""; | |
| 419 | - if(map.get("date2")!=null){ | |
| 420 | - date2=map.get("date2").toString(); | |
| 421 | - } | |
| 422 | - String nature="0"; | |
| 423 | - if(map.get("nature")!=null){ | |
| 424 | - nature=map.get("nature").toString(); | |
| 425 | - } | |
| 426 | - String type=""; | |
| 427 | - if(map.get("type")!=null){ | |
| 428 | - type=map.get("type").toString(); | |
| 429 | - } | |
| 430 | - return scheduleRealInfoService.dispatchDailySum(date, date2, nature, type); | |
| 431 | - } | |
| 432 | - | |
| 433 | - @RequestMapping(value="/statisticsDailyTj") | |
| 434 | - public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){ | |
| 435 | - String gsdm=""; | |
| 436 | - if(map.get("gsdm")!=null){ | |
| 437 | - gsdm=map.get("gsdm").toString(); | |
| 438 | - } | |
| 439 | - String fgsdm=""; | |
| 440 | - if(map.get("fgsdm")!=null){ | |
| 441 | - fgsdm=map.get("fgsdm").toString(); | |
| 442 | - } | |
| 443 | - String line=""; | |
| 444 | - if(map.get("line")!=null){ | |
| 445 | - line=map.get("line").toString(); | |
| 446 | - } | |
| 447 | - String date=""; | |
| 448 | - if(map.get("date")!=null){ | |
| 449 | - date=map.get("date").toString(); | |
| 450 | - } | |
| 451 | - String date2=""; | |
| 452 | - if(map.get("date2")!=null){ | |
| 453 | - date2=map.get("date2").toString(); | |
| 454 | - } | |
| 455 | - String xlName=""; | |
| 456 | - if(map.get("xlName")!=null){ | |
| 457 | - xlName=map.get("xlName").toString(); | |
| 458 | - } | |
| 459 | - String type=""; | |
| 460 | - if(map.get("type")!=null){ | |
| 461 | - type=map.get("type").toString(); | |
| 462 | - } | |
| 463 | - String nature="0"; | |
| 464 | - if(map.get("nature")!=null){ | |
| 465 | - nature=map.get("nature").toString(); | |
| 466 | - } | |
| 467 | - return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature); | |
| 468 | - } | |
| 469 | - | |
| 470 | - /* | |
| 471 | - * 公里修正报表 | |
| 472 | - */ | |
| 473 | - @RequestMapping(value="/mileageReportTj") | |
| 474 | - public List<Map<String,Object>> mileageReport(@RequestParam Map<String, Object> map){ | |
| 475 | - String gsdm=""; | |
| 476 | - if(map.get("gsdm")!=null){ | |
| 477 | - gsdm=map.get("gsdm").toString(); | |
| 478 | - } | |
| 479 | - String fgsdm=""; | |
| 480 | - if(map.get("fgsdm")!=null){ | |
| 481 | - fgsdm=map.get("fgsdm").toString(); | |
| 482 | - } | |
| 483 | - String line=""; | |
| 484 | - if(map.get("line")!=null){ | |
| 485 | - line=map.get("line").toString(); | |
| 486 | - } | |
| 487 | - String date=""; | |
| 488 | - if(map.get("date")!=null){ | |
| 489 | - date=map.get("date").toString(); | |
| 490 | - } | |
| 491 | - String date2=""; | |
| 492 | - if(map.get("date2")!=null){ | |
| 493 | - date2=map.get("date2").toString(); | |
| 494 | - } | |
| 495 | - String xlName=""; | |
| 496 | - if(map.get("xlName")!=null){ | |
| 497 | - xlName=map.get("xlName").toString(); | |
| 498 | - } | |
| 499 | - return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2); | |
| 500 | - } | |
| 501 | - | |
| 502 | - /* | |
| 503 | - * 班次修正报表 | |
| 504 | - */ | |
| 505 | - @RequestMapping(value="/scheduleCorrectionReport") | |
| 506 | - public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){ | |
| 507 | - String gsdm=""; | |
| 508 | - if(map.get("gsdm")!=null){ | |
| 509 | - gsdm=map.get("gsdm").toString(); | |
| 510 | - } | |
| 511 | - String fgsdm=""; | |
| 512 | - if(map.get("fgsdm")!=null){ | |
| 513 | - fgsdm=map.get("fgsdm").toString(); | |
| 514 | - } | |
| 515 | - String line=""; | |
| 516 | - if(map.get("line")!=null){ | |
| 517 | - line=map.get("line").toString(); | |
| 518 | - } | |
| 519 | - String date=""; | |
| 520 | - if(map.get("date")!=null){ | |
| 521 | - date=map.get("date").toString(); | |
| 522 | - } | |
| 523 | - String date2=""; | |
| 524 | - if(map.get("date2")!=null){ | |
| 525 | - date2=map.get("date2").toString(); | |
| 526 | - } | |
| 527 | - String xlName=""; | |
| 528 | - if(map.get("xlName")!=null){ | |
| 529 | - xlName=map.get("xlName").toString(); | |
| 530 | - } | |
| 531 | - return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2); | |
| 532 | - } | |
| 533 | - | |
| 534 | - @RequestMapping(value="/MapById",method = RequestMethod.GET) | |
| 535 | - public Map<String, Object> MapById(@RequestParam("id") Long id){ | |
| 536 | - return scheduleRealInfoService.MapById(id); | |
| 537 | - } | |
| 538 | - | |
| 539 | - @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET) | |
| 540 | - public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){ | |
| 541 | - return scheduleRealInfoService.MapByIdQp(id); | |
| 542 | - } | |
| 543 | - | |
| 544 | - /** | |
| 545 | - * @Title: scheduleDaily | |
| 546 | - * @Description: TODO(调度日报表) | |
| 547 | - * @param line 线路 | |
| 548 | - * @param date 时间 | |
| 549 | - * @return | |
| 550 | - */ | |
| 551 | - @RequestMapping(value="/scheduleDaily") | |
| 552 | - public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){ | |
| 553 | - return scheduleRealInfoService.scheduleDaily(line,date); | |
| 554 | - } | |
| 555 | - | |
| 556 | - @RequestMapping(value="/realScheduleList") | |
| 557 | - public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){ | |
| 558 | - return scheduleRealInfoService.realScheduleList(line,date); | |
| 559 | - } | |
| 560 | - | |
| 561 | - @RequestMapping(value="/realScheduleList_zrw") | |
| 562 | - public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){ | |
| 563 | - return scheduleRealInfoService.realScheduleList_zrw(line,date); | |
| 564 | - } | |
| 565 | - | |
| 566 | - @RequestMapping(value="/realScheduleList_mh_2") | |
| 567 | - public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){ | |
| 568 | - return scheduleRealInfoService.realScheduleList_mh_2(line,date); | |
| 569 | - } | |
| 570 | - | |
| 571 | - @RequestMapping(value="/realScheduleListQp") | |
| 572 | - public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){ | |
| 573 | - return scheduleRealInfoService.realScheduleListQp(line,date); | |
| 574 | - } | |
| 575 | - | |
| 576 | - @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST) | |
| 577 | - public synchronized Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){ | |
| 578 | - cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson); | |
| 579 | - List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class); | |
| 580 | - return scheduleRealInfoService.multi_tzrc(cpcs, null); | |
| 581 | - } | |
| 582 | - | |
| 583 | - @RequestMapping(value="/multi_dftz", method=RequestMethod.POST) | |
| 584 | - public Map<String, Object> multi_dftz(@RequestParam String dcsJson){ | |
| 585 | - dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson); | |
| 586 | - List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class); | |
| 587 | - return scheduleRealInfoService.multi_dftz(dfsjcs); | |
| 588 | - } | |
| 589 | - | |
| 590 | - @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST) | |
| 591 | - public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){ | |
| 592 | - return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName); | |
| 593 | - } | |
| 594 | - | |
| 595 | - @RequestMapping(value="/history", method=RequestMethod.POST) | |
| 596 | - public Map<String,Object> historySave(ScheduleRealInfo sch){ | |
| 597 | - return scheduleRealInfoService.historySave(sch); | |
| 598 | - } | |
| 599 | - | |
| 600 | - | |
| 601 | - private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | |
| 602 | - private final static long ONE_DAY = 1000 * 60 * 60 * 24; | |
| 603 | - /** | |
| 604 | - * 获取可编辑的历史班次日期 | |
| 605 | - * @return | |
| 606 | - */ | |
| 607 | - @RequestMapping("dateArray") | |
| 608 | - public List<String> dateArray(@RequestParam(defaultValue = "0") int c){ | |
| 609 | - List<String> rs = new ArrayList<>(); | |
| 610 | - | |
| 611 | - long t = System.currentTimeMillis(); | |
| 612 | - if(c != 1) | |
| 613 | - t -= (ONE_DAY + (1000 * 60 * 60 * 6)); | |
| 614 | - for(int i = 0; i < 3; i ++){ | |
| 615 | - rs.add(fmtyyyyMMdd.print(t)); | |
| 616 | - t -= ONE_DAY; | |
| 617 | - } | |
| 618 | - return rs; | |
| 619 | - } | |
| 620 | - | |
| 621 | - @RequestMapping(value = "svgAttr", method = RequestMethod.POST) | |
| 622 | - public Map<String, Object> svgAttr(@RequestParam String jsonStr){ | |
| 623 | - return scheduleRealInfoService.svgAttr(jsonStr); | |
| 624 | - } | |
| 625 | - | |
| 626 | - @RequestMapping(value = "svgAttr", method = RequestMethod.GET) | |
| 627 | - public Map<String, Object> findSvgAttr(@RequestParam String idx){ | |
| 628 | - return scheduleRealInfoService.findSvgAttr(idx); | |
| 629 | - } | |
| 630 | - | |
| 631 | - @RequestMapping(value = "addRemarks", method = RequestMethod.POST) | |
| 632 | - public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){ | |
| 633 | - return scheduleRealInfoService.addRemarks(id, remarks); | |
| 634 | - } | |
| 635 | - | |
| 636 | - @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET) | |
| 637 | - public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){ | |
| 638 | - return scheduleRealInfoService.scheduleDailyQp(line,date); | |
| 639 | - } | |
| 640 | - | |
| 641 | - @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET) | |
| 642 | - public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){ | |
| 643 | - return scheduleRealInfoService.scheduleDailyExport(map); | |
| 644 | - } | |
| 645 | - | |
| 646 | - @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET) | |
| 647 | - public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){ | |
| 648 | - return scheduleRealInfoService.exportWaybillMore(map); | |
| 649 | - } | |
| 650 | - | |
| 651 | - /** | |
| 652 | - * 获取当日计划排班 , 从计划表抓取数据 | |
| 653 | - * @return | |
| 654 | - */ | |
| 655 | - @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET) | |
| 656 | - public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){ | |
| 657 | - return scheduleRealInfoService.currentSchedulePlan(lineCode); | |
| 658 | - } | |
| 659 | - | |
| 660 | - @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST) | |
| 661 | - public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){ | |
| 662 | - return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type); | |
| 663 | - } | |
| 664 | - | |
| 665 | - /** | |
| 666 | - * 删除当日实际排班 | |
| 667 | - * @return | |
| 668 | - */ | |
| 669 | - @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST) | |
| 670 | - public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){ | |
| 671 | - return dayOfSchedule.deleteRealSchedule(lineCode); | |
| 672 | - } | |
| 673 | - | |
| 674 | - /** | |
| 675 | - * 从计划表重新加载当日排班 | |
| 676 | - * @param lineCode | |
| 677 | - * @return | |
| 678 | - */ | |
| 679 | - @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST) | |
| 680 | - public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){ | |
| 681 | - Map<String, Object> rs = new HashMap<>(); | |
| 682 | - List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode); | |
| 683 | - if(list != null && list.size() > 0){ | |
| 684 | - rs.put("status", ResponseCode.ERROR); | |
| 685 | - rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。"); | |
| 686 | - return rs; | |
| 687 | - } | |
| 688 | - | |
| 689 | - int code = dayOfSchedule.reloadSch(lineCode); | |
| 690 | - | |
| 691 | - //重新按公司编码索引数据 | |
| 692 | - dayOfSchedule.groupByGsbm(); | |
| 693 | - rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR); | |
| 694 | - return rs; | |
| 695 | - } | |
| 696 | - | |
| 697 | - /** | |
| 698 | - * 误点调整 | |
| 699 | - * @param idx | |
| 700 | - * @param minute | |
| 701 | - * @return | |
| 702 | - */ | |
| 703 | - @RequestMapping(value = "lateAdjust", method = RequestMethod.POST) | |
| 704 | - public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){ | |
| 705 | - return scheduleRealInfoService.lateAdjust(idx, minute); | |
| 706 | - } | |
| 707 | - | |
| 708 | - /** | |
| 709 | - * 获取所有应发未到的班次 | |
| 710 | - * @param idx | |
| 711 | - * @return | |
| 712 | - */ | |
| 713 | - @RequestMapping(value = "allLate2") | |
| 714 | - public List<ScheduleRealInfo> allLate2(@RequestParam String idx){ | |
| 715 | - return scheduleRealInfoService.allLate2(idx); | |
| 716 | - } | |
| 717 | - | |
| 718 | - /** | |
| 719 | - * 添加一个临加到历史库 | |
| 720 | - * @param sch | |
| 721 | - * @return | |
| 722 | - */ | |
| 723 | - @RequestMapping(value = "history/add", method = RequestMethod.POST) | |
| 724 | - public Map<String, Object> addToHistory(ScheduleRealInfo sch){ | |
| 725 | - return scheduleRealInfoService.addToHistory(sch); | |
| 726 | - } | |
| 727 | - | |
| 728 | - /** | |
| 729 | - * 从历史库里删除临加班次 | |
| 730 | - * @param id | |
| 731 | - * @return | |
| 732 | - */ | |
| 733 | - @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE) | |
| 734 | - public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){ | |
| 735 | - return scheduleRealInfoService.deleteToHistory(id); | |
| 736 | - } | |
| 737 | - | |
| 738 | - @RequestMapping(value = "isCircleQdz", method = RequestMethod.POST) | |
| 739 | - public Map<String, Object> isCircleQdz(@RequestParam String line, String nbbm, String ts, String qdzCode){ | |
| 740 | - Map<String, Object> map =new HashMap<>(); | |
| 741 | - map.put("isExist",scheduleRealInfoService.isCircleQdz(nbbm, ts, line, qdzCode)); | |
| 742 | - return map; | |
| 743 | - } | |
| 744 | - | |
| 745 | - /** | |
| 746 | - * 从历史库里删除临加班次 | |
| 747 | - * @param param | |
| 748 | - * @return | |
| 749 | - */ | |
| 750 | - @RequestMapping(value = "wxsb", method = RequestMethod.POST) | |
| 751 | - public Map<String, Object> repairReport(@RequestParam Map<String, Object> param){ | |
| 752 | - return scheduleRealInfoService.repairReport(param, true); | |
| 753 | - } | |
| 754 | - | |
| 755 | - @RequestMapping(value = "wxsb", method = RequestMethod.GET) | |
| 756 | - public List<RepairReport> repairReportList(@RequestParam String line, @RequestParam String date, @RequestParam String code, @RequestParam String type){ | |
| 757 | - return scheduleRealInfoService.repairReportList(line, date, code, type); | |
| 758 | - } | |
| 759 | - | |
| 760 | - @RequestMapping(value = "lineLevel", method = RequestMethod.GET) | |
| 761 | - public Map<String, String> lineLevel(@RequestParam String idx){ | |
| 762 | - return scheduleRealInfoService.getLevelsByLines(Arrays.asList(idx.split(","))); | |
| 763 | - } | |
| 764 | - | |
| 765 | - /** | |
| 766 | - * 反馈安全驾驶系统 | |
| 767 | - * @param param | |
| 768 | - * @return | |
| 769 | - */ | |
| 770 | - @RequestMapping(value = "ackDsm", method = RequestMethod.POST) | |
| 771 | - public Map<String, Object> ackDsm(@RequestParam Map<String, Object> param){ | |
| 772 | - Map<String, Object> res = new HashMap<>(); | |
| 773 | - InputStream in = null; | |
| 774 | - SysUser user = SecurityUtils.getCurrentUser(); | |
| 775 | - DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"); | |
| 776 | - StringBuilder url = new StringBuilder("http://211.95.61.66:9008/modules/dsmCheckTheRecord/addDsm?"), uri = new StringBuilder(); | |
| 777 | - HttpURLConnection con = null; | |
| 778 | - try { | |
| 779 | - uri.append("ddyName=").append(URLEncoder.encode(user == null ? "admin" : user.getUserName(), "UTF-8")); | |
| 780 | - uri.append("&checkTime=").append(URLEncoder.encode(fmt.print(System.currentTimeMillis()), "UTF-8")); | |
| 781 | - uri.append("&nbbm=").append(URLEncoder.encode(param.get("nbbm").toString(), "UTF-8")); | |
| 782 | - uri.append("&starttime=").append(URLEncoder.encode(fmt.print(Long.parseLong(param.get("ts").toString())), "UTF-8")); | |
| 783 | - url.append(uri); | |
| 784 | - con = (HttpURLConnection)new URL(url.toString()).openConnection(); | |
| 785 | - con.setDoInput(true); | |
| 786 | - con.setRequestMethod("POST"); | |
| 787 | - con.setConnectTimeout(5000); | |
| 788 | - con.setReadTimeout(5000); | |
| 789 | - con.setRequestProperty("keep-alive", "true"); | |
| 790 | - con.setRequestProperty("accept", "*/*"); | |
| 791 | - con.setRequestProperty("content-type", "application/x-www-form-urlencoded"); | |
| 792 | - con.connect(); | |
| 793 | - | |
| 794 | - if (con.getResponseCode() == 200) { | |
| 795 | - in = con.getInputStream(); | |
| 796 | - ByteArrayOutputStream bout = new ByteArrayOutputStream(); | |
| 797 | - IOUtils.copy(in, bout); | |
| 798 | - Map<String, Object> map = new ObjectMapper().readValue(bout.toByteArray(), Map.class); | |
| 799 | - System.out.println(map); | |
| 800 | - } | |
| 801 | - } catch (MalformedURLException e) { | |
| 802 | - // TODO Auto-generated catch block | |
| 803 | - e.printStackTrace(); | |
| 804 | - } catch (IOException e) { | |
| 805 | - // TODO Auto-generated catch block | |
| 806 | - e.printStackTrace(); | |
| 807 | - } finally { | |
| 808 | - if (con != null) { | |
| 809 | - con.disconnect(); | |
| 810 | - } | |
| 811 | - } | |
| 812 | - | |
| 813 | - return res; | |
| 814 | - } | |
| 815 | - | |
| 816 | - @RequestMapping(value = "exportPlan", method = RequestMethod.GET) | |
| 817 | - public Map<String, Object> exportPlan(@RequestParam String date){ | |
| 818 | - Map<String, Object> res = new HashMap<>(); | |
| 819 | - DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm"); | |
| 820 | - Connection conn = null; | |
| 821 | - PreparedStatement ps = null; | |
| 822 | - ResultSet rs = null; | |
| 823 | - | |
| 824 | - List<Map<String, Object>> list = new ArrayList<>(); | |
| 825 | - String sql = "select xl_name,xl_dir,schedule_date,fcsj,cl_zbh,j_name,bcsj from bsth_c_s_sp_info where schedule_date = ? and xl_bm in (22205, 202104, 202105, 202106, 202107, 210415) and bc_type = 'normal'"; | |
| 826 | - try{ | |
| 827 | - conn = DBUtils_control.getConnection(); | |
| 828 | - ps = conn.prepareStatement(sql); | |
| 829 | - ps.setString(1, date); | |
| 830 | - rs = ps.executeQuery(); | |
| 831 | - ObjectMapper mapper = new ObjectMapper(); | |
| 832 | - | |
| 833 | - while (rs.next()) { | |
| 834 | - SchedulePlan schedulePlan = new SchedulePlan(); | |
| 835 | - schedulePlan.setXlName(rs.getString("xl_name")); | |
| 836 | - schedulePlan.setXlDir(rs.getInt("xl_dir")); | |
| 837 | - Date scheduleDate = rs.getDate("schedule_date"); | |
| 838 | - schedulePlan.setScheduleDate(new DateTime(scheduleDate.getTime()).toString("yyyy-MM-dd")); | |
| 839 | - String fcsj = rs.getString("fcsj"); | |
| 840 | - int bcsj = rs.getInt("bcsj"); | |
| 841 | - DateTime fcsjDt = dateTimeFormatter.parseDateTime(schedulePlan.getScheduleDate() + " " + fcsj); | |
| 842 | - schedulePlan.setFcsj(fcsjDt.toString("HH:mm:00")); | |
| 843 | - DateTime ddsjDt = fcsjDt.plusMinutes(bcsj); | |
| 844 | - schedulePlan.setDdsj(ddsjDt.toString("HH:mm:00")); | |
| 845 | - schedulePlan.setSjdStart(fcsjDt.toString("HH:00:00")); | |
| 846 | - DateTime endDt = fcsjDt.plusHours(1); | |
| 847 | - schedulePlan.setSjdEnd(endDt.toString("HH:00:00")); | |
| 848 | - schedulePlan.setClZbh(rs.getString("cl_zbh")); | |
| 849 | - schedulePlan.setJsy(rs.getString("j_name")); | |
| 850 | - schedulePlan.setBcsj(bcsj); | |
| 851 | - | |
| 852 | - list.add(mapper.readValue(mapper.writeValueAsString(schedulePlan), HashMap.class)); | |
| 853 | - } | |
| 854 | - List<Iterator<?>> iterators = new ArrayList<Iterator<?>>(); | |
| 855 | - iterators.add(list.iterator()); | |
| 856 | - String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | |
| 857 | - String sourcePath = path + "mould/schedulePlan.xls"; | |
| 858 | - | |
| 859 | - new ReportUtils().excelReplace(iterators, new Object[]{}, sourcePath, path + "export/" + date + "-花博会专线班次.xls"); | |
| 860 | - | |
| 861 | - res.put("status", ResponseCode.SUCCESS); | |
| 862 | - res.put("msg", "成功"); | |
| 863 | - } catch (Exception e) { | |
| 864 | - res.put("status", ResponseCode.ERROR); | |
| 865 | - res.put("msg", e.getMessage()); | |
| 866 | - } finally { | |
| 867 | - DBUtils_control.close(rs, ps, conn); | |
| 868 | - } | |
| 869 | - | |
| 870 | - return res; | |
| 871 | - } | |
| 872 | - | |
| 873 | - public final static class SchedulePlan { | |
| 874 | - private String company = "浦东公司[46]"; | |
| 875 | - | |
| 876 | - private String xlName = ""; | |
| 877 | - | |
| 878 | - private int xlDir; | |
| 879 | - | |
| 880 | - private String xlDirStr = ""; | |
| 881 | - | |
| 882 | - private String scheduleDate = ""; | |
| 883 | - | |
| 884 | - private String sjdStart = ""; | |
| 885 | - | |
| 886 | - private String sjdEnd = ""; | |
| 887 | - | |
| 888 | - private String fcsj = ""; | |
| 889 | - | |
| 890 | - private int bcsj; | |
| 891 | - | |
| 892 | - private String ddsj = ""; | |
| 893 | - | |
| 894 | - private int yys = 25; | |
| 895 | - | |
| 896 | - private String clZbh = ""; | |
| 897 | - | |
| 898 | - private String cph = ""; | |
| 899 | - | |
| 900 | - private String color = "绿牌"; | |
| 901 | - | |
| 902 | - private String jsy = ""; | |
| 903 | - | |
| 904 | - private String jsydh = ""; | |
| 905 | - | |
| 906 | - private int pj = 10; | |
| 907 | - | |
| 908 | - public String getCompany() { | |
| 909 | - return company; | |
| 910 | - } | |
| 911 | - | |
| 912 | - public void setCompany(String company) { | |
| 913 | - this.company = company; | |
| 914 | - } | |
| 915 | - | |
| 916 | - public String getXlName() { | |
| 917 | - return xlName; | |
| 918 | - } | |
| 919 | - | |
| 920 | - public void setXlName(String xlName) { | |
| 921 | - this.xlName = xlName; | |
| 922 | - } | |
| 923 | - | |
| 924 | - public int getXlDir() { | |
| 925 | - return xlDir; | |
| 926 | - } | |
| 927 | - | |
| 928 | - public void setXlDir(int xlDir) { | |
| 929 | - this.xlDir = xlDir; | |
| 930 | - } | |
| 931 | - | |
| 932 | - public String getXlDirStr() { | |
| 933 | - xlDirStr = ""; | |
| 934 | - if (xlDir == 0) { | |
| 935 | - xlDirStr = "上行"; | |
| 936 | - } else if (xlDir == 1) { | |
| 937 | - xlDirStr = "下行"; | |
| 938 | - } | |
| 939 | - return xlDirStr; | |
| 940 | - } | |
| 941 | - | |
| 942 | - public void setXlDirStr(String xlDirStr) { | |
| 943 | - this.xlDirStr = xlDirStr; | |
| 944 | - } | |
| 945 | - | |
| 946 | - public String getScheduleDate() { | |
| 947 | - return scheduleDate; | |
| 948 | - } | |
| 949 | - | |
| 950 | - public void setScheduleDate(String scheduleDate) { | |
| 951 | - this.scheduleDate = scheduleDate; | |
| 952 | - } | |
| 953 | - | |
| 954 | - public String getSjdStart() { | |
| 955 | - return sjdStart; | |
| 956 | - } | |
| 957 | - | |
| 958 | - public void setSjdStart(String sjdStart) { | |
| 959 | - this.sjdStart = sjdStart; | |
| 960 | - } | |
| 961 | - | |
| 962 | - public String getSjdEnd() { | |
| 963 | - return sjdEnd; | |
| 964 | - } | |
| 965 | - | |
| 966 | - public void setSjdEnd(String sjdEnd) { | |
| 967 | - this.sjdEnd = sjdEnd; | |
| 968 | - } | |
| 969 | - | |
| 970 | - public String getFcsj() { | |
| 971 | - return fcsj; | |
| 972 | - } | |
| 973 | - | |
| 974 | - public void setFcsj(String fcsj) { | |
| 975 | - this.fcsj = fcsj; | |
| 976 | - } | |
| 977 | - | |
| 978 | - public int getBcsj() { | |
| 979 | - return bcsj; | |
| 980 | - } | |
| 981 | - | |
| 982 | - public void setBcsj(int bcsj) { | |
| 983 | - this.bcsj = bcsj; | |
| 984 | - } | |
| 985 | - | |
| 986 | - public String getDdsj() { | |
| 987 | - return ddsj; | |
| 988 | - } | |
| 989 | - | |
| 990 | - public void setDdsj(String ddsj) { | |
| 991 | - this.ddsj = ddsj; | |
| 992 | - } | |
| 993 | - | |
| 994 | - public int getYys() { | |
| 995 | - return yys; | |
| 996 | - } | |
| 997 | - | |
| 998 | - public void setYys(int yys) { | |
| 999 | - this.yys = yys; | |
| 1000 | - } | |
| 1001 | - | |
| 1002 | - public String getClZbh() { | |
| 1003 | - return clZbh; | |
| 1004 | - } | |
| 1005 | - | |
| 1006 | - public void setClZbh(String clZbh) { | |
| 1007 | - this.clZbh = clZbh; | |
| 1008 | - } | |
| 1009 | - | |
| 1010 | - public String getCph() { | |
| 1011 | - cph = BasicData.nbbmCompanyPlateMap.get(clZbh); | |
| 1012 | - if (cph == null) { | |
| 1013 | - cph = ""; | |
| 1014 | - } | |
| 1015 | - return cph; | |
| 1016 | - } | |
| 1017 | - | |
| 1018 | - public void setCph(String cph) { | |
| 1019 | - this.cph = cph; | |
| 1020 | - } | |
| 1021 | - | |
| 1022 | - public String getColor() { | |
| 1023 | - return color; | |
| 1024 | - } | |
| 1025 | - | |
| 1026 | - public void setColor(String color) { | |
| 1027 | - this.color = color; | |
| 1028 | - } | |
| 1029 | - | |
| 1030 | - public String getJsy() { | |
| 1031 | - return jsy; | |
| 1032 | - } | |
| 1033 | - | |
| 1034 | - public void setJsy(String jsy) { | |
| 1035 | - this.jsy = jsy; | |
| 1036 | - } | |
| 1037 | - | |
| 1038 | - public String getJsydh() { | |
| 1039 | - return jsydh; | |
| 1040 | - } | |
| 1041 | - | |
| 1042 | - public void setJsydh(String jsydh) { | |
| 1043 | - this.jsydh = jsydh; | |
| 1044 | - } | |
| 1045 | - | |
| 1046 | - public int getPj() { | |
| 1047 | - return pj; | |
| 1048 | - } | |
| 1049 | - | |
| 1050 | - public void setPj(int pj) { | |
| 1051 | - this.pj = pj; | |
| 1052 | - } | |
| 1053 | - } | |
| 1054 | -} | |
| 1 | +package com.bsth.controller.realcontrol; | |
| 2 | + | |
| 3 | +import java.io.ByteArrayOutputStream; | |
| 4 | +import java.io.IOException; | |
| 5 | +import java.io.InputStream; | |
| 6 | +import java.io.OutputStream; | |
| 7 | +import java.net.HttpURLConnection; | |
| 8 | +import java.net.MalformedURLException; | |
| 9 | +import java.net.URL; | |
| 10 | +import java.net.URLEncoder; | |
| 11 | +import java.sql.Connection; | |
| 12 | +import java.sql.Date; | |
| 13 | +import java.sql.PreparedStatement; | |
| 14 | +import java.sql.ResultSet; | |
| 15 | +import java.util.*; | |
| 16 | + | |
| 17 | +import com.bsth.data.forecast.entity.ArrivalEntity; | |
| 18 | +import com.bsth.entity.sys.SysUser; | |
| 19 | +import com.bsth.security.util.SecurityUtils; | |
| 20 | +import com.bsth.util.ReportUtils; | |
| 21 | +import com.bsth.util.db.DBUtils_MS; | |
| 22 | +import com.bsth.util.db.DBUtils_control; | |
| 23 | +import com.fasterxml.jackson.databind.ObjectMapper; | |
| 24 | +import org.apache.commons.io.IOUtils; | |
| 25 | +import org.apache.commons.lang3.StringEscapeUtils; | |
| 26 | +import org.joda.time.DateTime; | |
| 27 | +import org.joda.time.format.DateTimeFormat; | |
| 28 | +import org.joda.time.format.DateTimeFormatter; | |
| 29 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 30 | +import org.springframework.beans.factory.annotation.Value; | |
| 31 | +import org.springframework.web.bind.annotation.*; | |
| 32 | + | |
| 33 | +import com.alibaba.fastjson.JSONArray; | |
| 34 | +import com.bsth.common.ResponseCode; | |
| 35 | +import com.bsth.controller.BaseController; | |
| 36 | +import com.bsth.controller.realcontrol.dto.ChangePersonCar; | |
| 37 | +import com.bsth.controller.realcontrol.dto.DfsjChange; | |
| 38 | +import com.bsth.data.BasicData; | |
| 39 | +import com.bsth.data.schedule.DayOfSchedule; | |
| 40 | +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | |
| 41 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 42 | +import com.bsth.entity.report.RepairReport; | |
| 43 | +import com.bsth.entity.schedule.SchedulePlanInfo; | |
| 44 | +import com.bsth.service.realcontrol.ScheduleRealInfoService; | |
| 45 | + | |
| 46 | +@RestController | |
| 47 | +@RequestMapping("/realSchedule") | |
| 48 | +public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> { | |
| 49 | + | |
| 50 | + @Autowired | |
| 51 | + ScheduleRealInfoService scheduleRealInfoService; | |
| 52 | + | |
| 53 | + @Autowired | |
| 54 | + DayOfSchedule dayOfSchedule; | |
| 55 | + | |
| 56 | + @Value("${dsm.ack.url}") | |
| 57 | + private String dsmUrl; | |
| 58 | + | |
| 59 | + @Value("${cp.ack.url}") | |
| 60 | + private String cpUrl; | |
| 61 | + | |
| 62 | + @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST) | |
| 63 | + public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){ | |
| 64 | + return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm); | |
| 65 | + } | |
| 66 | + | |
| 67 | + @RequestMapping(value = "/lines") | |
| 68 | + public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) { | |
| 69 | + return scheduleRealInfoService.findByLines(lines); | |
| 70 | + } | |
| 71 | + | |
| 72 | + @RequestMapping(value = "/car") | |
| 73 | + public List<ScheduleRealInfo> findByCar(String nbbm){ | |
| 74 | + return dayOfSchedule.findByNbbm(nbbm); | |
| 75 | + } | |
| 76 | + | |
| 77 | + /** | |
| 78 | + * | |
| 79 | + * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id | |
| 80 | + * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws | |
| 81 | + */ | |
| 82 | + @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST) | |
| 83 | + public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks, | |
| 84 | + @RequestParam String dfsj,String bcType, | |
| 85 | + @RequestParam(defaultValue = "") String opType) { | |
| 86 | + return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null); | |
| 87 | + } | |
| 88 | + | |
| 89 | + /** | |
| 90 | + * | |
| 91 | + * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔 | |
| 92 | + */ | |
| 93 | + @RequestMapping(value = "/destroy", method = RequestMethod.POST) | |
| 94 | + public Map<String, Object> destroy(@RequestParam String idsStr | |
| 95 | + /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/, | |
| 96 | + @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) { | |
| 97 | + return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null); | |
| 98 | + } | |
| 99 | + | |
| 100 | + /** | |
| 101 | + * | |
| 102 | + * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws | |
| 103 | + */ | |
| 104 | + @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET) | |
| 105 | + public Map<String, String> carDeviceMapp() { | |
| 106 | + return BasicData.deviceId2NbbmMap.inverse(); | |
| 107 | + } | |
| 108 | + | |
| 109 | + /** | |
| 110 | + * | |
| 111 | + * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param | |
| 112 | + * lineId @throws | |
| 113 | + */ | |
| 114 | + @RequestMapping(value = "/driver", method = RequestMethod.GET) | |
| 115 | + public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) { | |
| 116 | + return scheduleRealInfoService.findDriverByLine(lineCode); | |
| 117 | + } | |
| 118 | + | |
| 119 | + /** | |
| 120 | + * | |
| 121 | + * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param | |
| 122 | + * lineId @throws | |
| 123 | + */ | |
| 124 | + @RequestMapping(value = "/conductor", method = RequestMethod.GET) | |
| 125 | + public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) { | |
| 126 | + return scheduleRealInfoService.findConductorByLine(lineCode); | |
| 127 | + } | |
| 128 | + | |
| 129 | + /** | |
| 130 | + * | |
| 131 | + * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param | |
| 132 | + * lineId @throws | |
| 133 | + */ | |
| 134 | + @RequestMapping(value = "/cars", method = RequestMethod.GET) | |
| 135 | + public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) { | |
| 136 | + return scheduleRealInfoService.findCarByLine(lineCode); | |
| 137 | + } | |
| 138 | + | |
| 139 | + /** | |
| 140 | + * | |
| 141 | + * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws | |
| 142 | + */ | |
| 143 | + @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET) | |
| 144 | + public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) { | |
| 145 | + return scheduleRealInfoService.sreachVehic(nbbm); | |
| 146 | + } | |
| 147 | + /** | |
| 148 | + * | |
| 149 | + * @Title: realOutAdjust | |
| 150 | + * @Description: TODO(实发调整) | |
| 151 | + * @param @param id 班次ID | |
| 152 | + * @param @param fcsjActual 实际发车时间 HH:mm | |
| 153 | + * @param @param remarks 备注 | |
| 154 | + * @throws | |
| 155 | + */ | |
| 156 | + @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST) | |
| 157 | + public Map<String, Object> realOutAdjust(@RequestParam Map<String, String> map) { | |
| 158 | + return scheduleRealInfoService.realOutAdjust(map); | |
| 159 | + } | |
| 160 | + | |
| 161 | + /** | |
| 162 | + * | |
| 163 | + * @Title: revokeDestroy | |
| 164 | + * @Description: TODO(撤销烂班) | |
| 165 | + * @param @param id | |
| 166 | + * @throws | |
| 167 | + */ | |
| 168 | + @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST) | |
| 169 | + public Map<String, Object> revokeDestroy(@RequestParam Long id){ | |
| 170 | + return scheduleRealInfoService.revokeDestroy(id); | |
| 171 | + } | |
| 172 | + | |
| 173 | + /** | |
| 174 | + * | |
| 175 | + * @Title: revokeRealOutgo | |
| 176 | + * @Description: TODO(撤销实发) | |
| 177 | + * @param @param id | |
| 178 | + * @throws | |
| 179 | + */ | |
| 180 | + @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST) | |
| 181 | + public Map<String, Object> revokeRealOutgo(@RequestParam Long id){ | |
| 182 | + return scheduleRealInfoService.revokeRealOutgo(id); | |
| 183 | + } | |
| 184 | + | |
| 185 | + /** | |
| 186 | + * 撤销执行 | |
| 187 | + * @param id | |
| 188 | + * @return | |
| 189 | + */ | |
| 190 | + @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST) | |
| 191 | + public Map<String, Object> revokeRealArrive(@RequestParam Long id){ | |
| 192 | + return scheduleRealInfoService.revokeRealArrive(id); | |
| 193 | + } | |
| 194 | + | |
| 195 | + /** | |
| 196 | + * | |
| 197 | + * @Title: spaceAdjust | |
| 198 | + * @Description: TODO(间隔调整) | |
| 199 | + * @param @param ids 要调整的班次数组ID | |
| 200 | + * @param @param space 间隔 | |
| 201 | + * @throws | |
| 202 | + */ | |
| 203 | + @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST) | |
| 204 | + public Map<String, Object> spaceAdjust(Long[] ids, Integer space){ | |
| 205 | + return scheduleRealInfoService.spaceAdjust(ids, space); | |
| 206 | + } | |
| 207 | + | |
| 208 | + /** | |
| 209 | + * | |
| 210 | + * @Title: schInfoFineTune | |
| 211 | + * @Description: TODO(发车信息微调) | |
| 212 | + * @param @param map | |
| 213 | + * @throws | |
| 214 | + */ | |
| 215 | + @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST) | |
| 216 | + public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){ | |
| 217 | + return scheduleRealInfoService.schInfoFineTune(map); | |
| 218 | + } | |
| 219 | + | |
| 220 | + /** | |
| 221 | + * | |
| 222 | + * @Title: outgoAdjustAll | |
| 223 | + * @Description: TODO(批量待发调整) | |
| 224 | + * @param @param list | |
| 225 | + * @throws | |
| 226 | + */ | |
| 227 | + @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST) | |
| 228 | + public Map<String, Object> outgoAdjustAll(@RequestParam String params){ | |
| 229 | + //反转义 | |
| 230 | + params = StringEscapeUtils.unescapeHtml4(params); | |
| 231 | + return scheduleRealInfoService.outgoAdjustAll(params); | |
| 232 | + } | |
| 233 | + | |
| 234 | + /** | |
| 235 | + * | |
| 236 | + * @Title: findByLineAndUpDown | |
| 237 | + * @Description: TODO(根据线路和走向获取班次) | |
| 238 | + * @param @param line | |
| 239 | + * @param @param upDown | |
| 240 | + */ | |
| 241 | + @RequestMapping(value = "/findByLineAndUpDown") | |
| 242 | + public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){ | |
| 243 | + return dayOfSchedule.findByLineAndUpDown(line, upDown); | |
| 244 | + } | |
| 245 | + | |
| 246 | + /** | |
| 247 | + * | |
| 248 | + * @Title: findRouteByLine | |
| 249 | + * @Description: TODO(获取线路的站点,路段路由) | |
| 250 | + * @param @param lineCode | |
| 251 | + * @throws | |
| 252 | + */ | |
| 253 | + @RequestMapping(value = "/findRouteByLine") | |
| 254 | + public Map<String, Object> findRouteByLine(@RequestParam String lineCode){ | |
| 255 | + return scheduleRealInfoService.findRouteByLine(lineCode); | |
| 256 | + } | |
| 257 | + | |
| 258 | + /** | |
| 259 | + * | |
| 260 | + * @Title: removeChildTask | |
| 261 | + * @Description: TODO(删除子任务) | |
| 262 | + * @param @param taskId 子任务ID | |
| 263 | + * @throws | |
| 264 | + */ | |
| 265 | + @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE) | |
| 266 | + public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){ | |
| 267 | + return scheduleRealInfoService.removeChildTask(taskId); | |
| 268 | + } | |
| 269 | + | |
| 270 | + /** | |
| 271 | + * | |
| 272 | + * @Title: findByLineCode | |
| 273 | + * @Description: TODO(根据线路获取班次信息) | |
| 274 | + * @param @param lineCode | |
| 275 | + */ | |
| 276 | + @RequestMapping(value = "/lineCode/{lineCode}") | |
| 277 | + public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){ | |
| 278 | + return dayOfSchedule.findByLineCode(lineCode); | |
| 279 | + } | |
| 280 | + | |
| 281 | + @RequestMapping(value = "/queryUserInfo") | |
| 282 | + public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line, | |
| 283 | + @RequestParam String date,@RequestParam String state) { | |
| 284 | + return scheduleRealInfoService.queryUserInfo(line, date,state); | |
| 285 | + } | |
| 286 | + | |
| 287 | + @RequestMapping(value = "/queryUserInfoPx") | |
| 288 | + public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line, | |
| 289 | + @RequestParam String date,@RequestParam String state,@RequestParam String type) { | |
| 290 | + return scheduleRealInfoService.queryUserInfoPx(line, date,state,type); | |
| 291 | + } | |
| 292 | + | |
| 293 | + @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET) | |
| 294 | + public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName,@RequestParam String jGh, @RequestParam String clZbh, | |
| 295 | + @RequestParam String lpName,@RequestParam String date,@RequestParam String line) { | |
| 296 | + return scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line); | |
| 297 | + } | |
| 298 | + | |
| 299 | + @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET) | |
| 300 | + public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh | |
| 301 | + ,@RequestParam String date,@RequestParam String line) { | |
| 302 | + return scheduleRealInfoService.exportWaybillQp( clZbh, date,line); | |
| 303 | + } | |
| 304 | + | |
| 305 | + | |
| 306 | + @RequestMapping(value = "/dailyInfo") | |
| 307 | + public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) { | |
| 308 | + return scheduleRealInfoService.dailyInfo(line, date, type); | |
| 309 | + } | |
| 310 | + | |
| 311 | + @RequestMapping(value = "/historyMessage") | |
| 312 | + public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date, | |
| 313 | + @RequestParam String code, @RequestParam String type) { | |
| 314 | + return scheduleRealInfoService.historyMessage(line, date, code, type); | |
| 315 | + } | |
| 316 | + | |
| 317 | + @RequestMapping(value="/findLine") | |
| 318 | + public List<Map<String,String>> findLine(@RequestParam String line){ | |
| 319 | + return scheduleRealInfoService.findLine(line); | |
| 320 | + } | |
| 321 | + | |
| 322 | + @RequestMapping(value="/findKMBC",method = RequestMethod.GET) | |
| 323 | + public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | |
| 324 | + ,@RequestParam String date,@RequestParam String line){ | |
| 325 | + return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line); | |
| 326 | + } | |
| 327 | + | |
| 328 | + /** | |
| 329 | + * 路单公里统计 (闵行审计专用) | |
| 330 | + * @param jGh | |
| 331 | + * @param clZbh | |
| 332 | + * @param lpName | |
| 333 | + * @param date | |
| 334 | + * @param line | |
| 335 | + * @return | |
| 336 | + */ | |
| 337 | + @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET) | |
| 338 | + public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | |
| 339 | + ,@RequestParam String date,@RequestParam String line){ | |
| 340 | + return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line); | |
| 341 | + } | |
| 342 | + | |
| 343 | + @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET) | |
| 344 | + public Map<String,Object> findKMBCQp(@RequestParam String clZbh | |
| 345 | + ,@RequestParam String date,@RequestParam String line){ | |
| 346 | + return scheduleRealInfoService.findKMBCQp(clZbh,date,line); | |
| 347 | + } | |
| 348 | + | |
| 349 | + @RequestMapping(value="/findLpName") | |
| 350 | + public List<Map<String,String>> findLpName(@RequestParam String lpName){ | |
| 351 | + return scheduleRealInfoService.findLpName(lpName); | |
| 352 | + } | |
| 353 | + | |
| 354 | + @RequestMapping(value = "/account") | |
| 355 | + public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date, | |
| 356 | + @RequestParam String code,@RequestParam String xlName, @RequestParam String type) { | |
| 357 | + return scheduleRealInfoService.account(line, date, code, xlName, type); | |
| 358 | + } | |
| 359 | + | |
| 360 | + @RequestMapping(value = "/accountPx") | |
| 361 | + public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date, | |
| 362 | + @RequestParam String code,@RequestParam String xlName, @RequestParam String px) { | |
| 363 | + return scheduleRealInfoService.accountPx(line, date, code, xlName, px); | |
| 364 | + } | |
| 365 | + | |
| 366 | + @RequestMapping(value = "/correctForm") | |
| 367 | + public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, | |
| 368 | + @RequestParam String endDate, | |
| 369 | + @RequestParam String lpName, @RequestParam String code, | |
| 370 | + @RequestParam String type,@RequestParam String changType) { | |
| 371 | + return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType); | |
| 372 | + } | |
| 373 | + /** | |
| 374 | + * @Title queryListWaybill | |
| 375 | + * @Description 查询行车路单列表 | |
| 376 | + * @param jGh 驾驶员名字 | |
| 377 | + * @param clZbh 车辆自编号(内部编号) | |
| 378 | + * @param lpName 路牌 | |
| 379 | + * @return | |
| 380 | + */ | |
| 381 | + @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET) | |
| 382 | + public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | |
| 383 | + ,@RequestParam String date,@RequestParam String line){ | |
| 384 | + return scheduleRealInfoService.queryListWaybill(jGh, clZbh,lpName,date,line); | |
| 385 | + } | |
| 386 | + | |
| 387 | + /** | |
| 388 | + * @Title queryListWaybill | |
| 389 | + * @Description 查询行车路单列表(闵行审计专用路单) | |
| 390 | + * @param jName 驾驶员名字 | |
| 391 | + * @param clZbh 车辆自编号(内部编号) | |
| 392 | + * @param lpName 路牌 | |
| 393 | + * @return | |
| 394 | + */ | |
| 395 | + @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET) | |
| 396 | + public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | |
| 397 | + ,@RequestParam String date,@RequestParam String line){ | |
| 398 | + return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line); | |
| 399 | + } | |
| 400 | + | |
| 401 | + @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET) | |
| 402 | + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh, | |
| 403 | + @RequestParam String date,@RequestParam String line){ | |
| 404 | + return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line); | |
| 405 | + } | |
| 406 | + | |
| 407 | + @RequestMapping(value="/statisticsDaily") | |
| 408 | + public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date, | |
| 409 | + @RequestParam String xlName, @RequestParam String type){ | |
| 410 | + return scheduleRealInfoService.statisticsDaily(line, date, xlName, type); | |
| 411 | + } | |
| 412 | + | |
| 413 | + @RequestMapping(value="/statisticsDaily_mh_2") | |
| 414 | + public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date, | |
| 415 | + @RequestParam String xlName, @RequestParam String type){ | |
| 416 | + return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type); | |
| 417 | + } | |
| 418 | + | |
| 419 | + @RequestMapping(value="/dispatchDailySum") | |
| 420 | + public List<Map<String,Object>> dispatchDailySum(@RequestParam Map<String, Object> map){ | |
| 421 | + String date=""; | |
| 422 | + if(map.get("date")!=null){ | |
| 423 | + date=map.get("date").toString(); | |
| 424 | + } | |
| 425 | + String date2=""; | |
| 426 | + if(map.get("date2")!=null){ | |
| 427 | + date2=map.get("date2").toString(); | |
| 428 | + } | |
| 429 | + String nature="0"; | |
| 430 | + if(map.get("nature")!=null){ | |
| 431 | + nature=map.get("nature").toString(); | |
| 432 | + } | |
| 433 | + String type=""; | |
| 434 | + if(map.get("type")!=null){ | |
| 435 | + type=map.get("type").toString(); | |
| 436 | + } | |
| 437 | + return scheduleRealInfoService.dispatchDailySum(date, date2, nature, type); | |
| 438 | + } | |
| 439 | + | |
| 440 | + @RequestMapping(value="/statisticsDailyTj") | |
| 441 | + public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){ | |
| 442 | + String gsdm=""; | |
| 443 | + if(map.get("gsdm")!=null){ | |
| 444 | + gsdm=map.get("gsdm").toString(); | |
| 445 | + } | |
| 446 | + String fgsdm=""; | |
| 447 | + if(map.get("fgsdm")!=null){ | |
| 448 | + fgsdm=map.get("fgsdm").toString(); | |
| 449 | + } | |
| 450 | + String line=""; | |
| 451 | + if(map.get("line")!=null){ | |
| 452 | + line=map.get("line").toString(); | |
| 453 | + } | |
| 454 | + String date=""; | |
| 455 | + if(map.get("date")!=null){ | |
| 456 | + date=map.get("date").toString(); | |
| 457 | + } | |
| 458 | + String date2=""; | |
| 459 | + if(map.get("date2")!=null){ | |
| 460 | + date2=map.get("date2").toString(); | |
| 461 | + } | |
| 462 | + String xlName=""; | |
| 463 | + if(map.get("xlName")!=null){ | |
| 464 | + xlName=map.get("xlName").toString(); | |
| 465 | + } | |
| 466 | + String type=""; | |
| 467 | + if(map.get("type")!=null){ | |
| 468 | + type=map.get("type").toString(); | |
| 469 | + } | |
| 470 | + String nature="0"; | |
| 471 | + if(map.get("nature")!=null){ | |
| 472 | + nature=map.get("nature").toString(); | |
| 473 | + } | |
| 474 | + return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature); | |
| 475 | + } | |
| 476 | + | |
| 477 | + /* | |
| 478 | + * 公里修正报表 | |
| 479 | + */ | |
| 480 | + @RequestMapping(value="/mileageReportTj") | |
| 481 | + public List<Map<String,Object>> mileageReport(@RequestParam Map<String, Object> map){ | |
| 482 | + String gsdm=""; | |
| 483 | + if(map.get("gsdm")!=null){ | |
| 484 | + gsdm=map.get("gsdm").toString(); | |
| 485 | + } | |
| 486 | + String fgsdm=""; | |
| 487 | + if(map.get("fgsdm")!=null){ | |
| 488 | + fgsdm=map.get("fgsdm").toString(); | |
| 489 | + } | |
| 490 | + String line=""; | |
| 491 | + if(map.get("line")!=null){ | |
| 492 | + line=map.get("line").toString(); | |
| 493 | + } | |
| 494 | + String date=""; | |
| 495 | + if(map.get("date")!=null){ | |
| 496 | + date=map.get("date").toString(); | |
| 497 | + } | |
| 498 | + String date2=""; | |
| 499 | + if(map.get("date2")!=null){ | |
| 500 | + date2=map.get("date2").toString(); | |
| 501 | + } | |
| 502 | + String xlName=""; | |
| 503 | + if(map.get("xlName")!=null){ | |
| 504 | + xlName=map.get("xlName").toString(); | |
| 505 | + } | |
| 506 | + return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2); | |
| 507 | + } | |
| 508 | + | |
| 509 | + /* | |
| 510 | + * 班次修正报表 | |
| 511 | + */ | |
| 512 | + @RequestMapping(value="/scheduleCorrectionReport") | |
| 513 | + public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){ | |
| 514 | + String gsdm=""; | |
| 515 | + if(map.get("gsdm")!=null){ | |
| 516 | + gsdm=map.get("gsdm").toString(); | |
| 517 | + } | |
| 518 | + String fgsdm=""; | |
| 519 | + if(map.get("fgsdm")!=null){ | |
| 520 | + fgsdm=map.get("fgsdm").toString(); | |
| 521 | + } | |
| 522 | + String line=""; | |
| 523 | + if(map.get("line")!=null){ | |
| 524 | + line=map.get("line").toString(); | |
| 525 | + } | |
| 526 | + String date=""; | |
| 527 | + if(map.get("date")!=null){ | |
| 528 | + date=map.get("date").toString(); | |
| 529 | + } | |
| 530 | + String date2=""; | |
| 531 | + if(map.get("date2")!=null){ | |
| 532 | + date2=map.get("date2").toString(); | |
| 533 | + } | |
| 534 | + String xlName=""; | |
| 535 | + if(map.get("xlName")!=null){ | |
| 536 | + xlName=map.get("xlName").toString(); | |
| 537 | + } | |
| 538 | + return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2); | |
| 539 | + } | |
| 540 | + | |
| 541 | + @RequestMapping(value="/MapById",method = RequestMethod.GET) | |
| 542 | + public Map<String, Object> MapById(@RequestParam("id") Long id){ | |
| 543 | + return scheduleRealInfoService.MapById(id); | |
| 544 | + } | |
| 545 | + | |
| 546 | + @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET) | |
| 547 | + public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){ | |
| 548 | + return scheduleRealInfoService.MapByIdQp(id); | |
| 549 | + } | |
| 550 | + | |
| 551 | + /** | |
| 552 | + * @Title: scheduleDaily | |
| 553 | + * @Description: TODO(调度日报表) | |
| 554 | + * @param line 线路 | |
| 555 | + * @param date 时间 | |
| 556 | + * @return | |
| 557 | + */ | |
| 558 | + @RequestMapping(value="/scheduleDaily") | |
| 559 | + public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){ | |
| 560 | + return scheduleRealInfoService.scheduleDaily(line,date); | |
| 561 | + } | |
| 562 | + | |
| 563 | + @RequestMapping(value="/realScheduleList") | |
| 564 | + public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){ | |
| 565 | + return scheduleRealInfoService.realScheduleList(line,date); | |
| 566 | + } | |
| 567 | + | |
| 568 | + @RequestMapping(value="/realScheduleList_zrw") | |
| 569 | + public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){ | |
| 570 | + return scheduleRealInfoService.realScheduleList_zrw(line,date); | |
| 571 | + } | |
| 572 | + | |
| 573 | + @RequestMapping(value="/realScheduleList_mh_2") | |
| 574 | + public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){ | |
| 575 | + return scheduleRealInfoService.realScheduleList_mh_2(line,date); | |
| 576 | + } | |
| 577 | + | |
| 578 | + @RequestMapping(value="/realScheduleListQp") | |
| 579 | + public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){ | |
| 580 | + return scheduleRealInfoService.realScheduleListQp(line,date); | |
| 581 | + } | |
| 582 | + | |
| 583 | + @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST) | |
| 584 | + public synchronized Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){ | |
| 585 | + cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson); | |
| 586 | + List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class); | |
| 587 | + return scheduleRealInfoService.multi_tzrc(cpcs, null); | |
| 588 | + } | |
| 589 | + | |
| 590 | + @RequestMapping(value="/multi_dftz", method=RequestMethod.POST) | |
| 591 | + public Map<String, Object> multi_dftz(@RequestParam String dcsJson){ | |
| 592 | + dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson); | |
| 593 | + List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class); | |
| 594 | + return scheduleRealInfoService.multi_dftz(dfsjcs); | |
| 595 | + } | |
| 596 | + | |
| 597 | + @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST) | |
| 598 | + public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){ | |
| 599 | + return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName); | |
| 600 | + } | |
| 601 | + | |
| 602 | + @RequestMapping(value="/history", method=RequestMethod.POST) | |
| 603 | + public Map<String,Object> historySave(ScheduleRealInfo sch){ | |
| 604 | + return scheduleRealInfoService.historySave(sch); | |
| 605 | + } | |
| 606 | + | |
| 607 | + | |
| 608 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | |
| 609 | + private final static long ONE_DAY = 1000 * 60 * 60 * 24; | |
| 610 | + /** | |
| 611 | + * 获取可编辑的历史班次日期 | |
| 612 | + * @return | |
| 613 | + */ | |
| 614 | + @RequestMapping("dateArray") | |
| 615 | + public List<String> dateArray(@RequestParam(defaultValue = "0") int c){ | |
| 616 | + List<String> rs = new ArrayList<>(); | |
| 617 | + | |
| 618 | + long t = System.currentTimeMillis(); | |
| 619 | + if(c != 1) | |
| 620 | + t -= (ONE_DAY + (1000 * 60 * 60 * 6)); | |
| 621 | + for(int i = 0; i < 3; i ++){ | |
| 622 | + rs.add(fmtyyyyMMdd.print(t)); | |
| 623 | + t -= ONE_DAY; | |
| 624 | + } | |
| 625 | + return rs; | |
| 626 | + } | |
| 627 | + | |
| 628 | + @RequestMapping(value = "svgAttr", method = RequestMethod.POST) | |
| 629 | + public Map<String, Object> svgAttr(@RequestParam String jsonStr){ | |
| 630 | + return scheduleRealInfoService.svgAttr(jsonStr); | |
| 631 | + } | |
| 632 | + | |
| 633 | + @RequestMapping(value = "svgAttr", method = RequestMethod.GET) | |
| 634 | + public Map<String, Object> findSvgAttr(@RequestParam String idx){ | |
| 635 | + return scheduleRealInfoService.findSvgAttr(idx); | |
| 636 | + } | |
| 637 | + | |
| 638 | + @RequestMapping(value = "addRemarks", method = RequestMethod.POST) | |
| 639 | + public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){ | |
| 640 | + return scheduleRealInfoService.addRemarks(id, remarks); | |
| 641 | + } | |
| 642 | + | |
| 643 | + @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET) | |
| 644 | + public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){ | |
| 645 | + return scheduleRealInfoService.scheduleDailyQp(line,date); | |
| 646 | + } | |
| 647 | + | |
| 648 | + @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET) | |
| 649 | + public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){ | |
| 650 | + return scheduleRealInfoService.scheduleDailyExport(map); | |
| 651 | + } | |
| 652 | + | |
| 653 | + @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET) | |
| 654 | + public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){ | |
| 655 | + return scheduleRealInfoService.exportWaybillMore(map); | |
| 656 | + } | |
| 657 | + | |
| 658 | + /** | |
| 659 | + * 获取当日计划排班 , 从计划表抓取数据 | |
| 660 | + * @return | |
| 661 | + */ | |
| 662 | + @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET) | |
| 663 | + public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){ | |
| 664 | + return scheduleRealInfoService.currentSchedulePlan(lineCode); | |
| 665 | + } | |
| 666 | + | |
| 667 | + @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST) | |
| 668 | + public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){ | |
| 669 | + return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type); | |
| 670 | + } | |
| 671 | + | |
| 672 | + /** | |
| 673 | + * 删除当日实际排班 | |
| 674 | + * @return | |
| 675 | + */ | |
| 676 | + @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST) | |
| 677 | + public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){ | |
| 678 | + return dayOfSchedule.deleteRealSchedule(lineCode); | |
| 679 | + } | |
| 680 | + | |
| 681 | + /** | |
| 682 | + * 从计划表重新加载当日排班 | |
| 683 | + * @param lineCode | |
| 684 | + * @return | |
| 685 | + */ | |
| 686 | + @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST) | |
| 687 | + public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){ | |
| 688 | + Map<String, Object> rs = new HashMap<>(); | |
| 689 | + List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode); | |
| 690 | + if(list != null && list.size() > 0){ | |
| 691 | + rs.put("status", ResponseCode.ERROR); | |
| 692 | + rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。"); | |
| 693 | + return rs; | |
| 694 | + } | |
| 695 | + | |
| 696 | + int code = dayOfSchedule.reloadSch(lineCode); | |
| 697 | + | |
| 698 | + //重新按公司编码索引数据 | |
| 699 | + dayOfSchedule.groupByGsbm(); | |
| 700 | + rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR); | |
| 701 | + return rs; | |
| 702 | + } | |
| 703 | + | |
| 704 | + /** | |
| 705 | + * 误点调整 | |
| 706 | + * @param idx | |
| 707 | + * @param minute | |
| 708 | + * @return | |
| 709 | + */ | |
| 710 | + @RequestMapping(value = "lateAdjust", method = RequestMethod.POST) | |
| 711 | + public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){ | |
| 712 | + return scheduleRealInfoService.lateAdjust(idx, minute); | |
| 713 | + } | |
| 714 | + | |
| 715 | + /** | |
| 716 | + * 获取所有应发未到的班次 | |
| 717 | + * @param idx | |
| 718 | + * @return | |
| 719 | + */ | |
| 720 | + @RequestMapping(value = "allLate2") | |
| 721 | + public List<ScheduleRealInfo> allLate2(@RequestParam String idx){ | |
| 722 | + return scheduleRealInfoService.allLate2(idx); | |
| 723 | + } | |
| 724 | + | |
| 725 | + /** | |
| 726 | + * 添加一个临加到历史库 | |
| 727 | + * @param sch | |
| 728 | + * @return | |
| 729 | + */ | |
| 730 | + @RequestMapping(value = "history/add", method = RequestMethod.POST) | |
| 731 | + public Map<String, Object> addToHistory(ScheduleRealInfo sch){ | |
| 732 | + return scheduleRealInfoService.addToHistory(sch); | |
| 733 | + } | |
| 734 | + | |
| 735 | + /** | |
| 736 | + * 从历史库里删除临加班次 | |
| 737 | + * @param id | |
| 738 | + * @return | |
| 739 | + */ | |
| 740 | + @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE) | |
| 741 | + public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){ | |
| 742 | + return scheduleRealInfoService.deleteToHistory(id); | |
| 743 | + } | |
| 744 | + | |
| 745 | + @RequestMapping(value = "isCircleQdz", method = RequestMethod.POST) | |
| 746 | + public Map<String, Object> isCircleQdz(@RequestParam String line, String nbbm, String ts, String qdzCode){ | |
| 747 | + Map<String, Object> map =new HashMap<>(); | |
| 748 | + map.put("isExist",scheduleRealInfoService.isCircleQdz(nbbm, ts, line, qdzCode)); | |
| 749 | + return map; | |
| 750 | + } | |
| 751 | + | |
| 752 | + /** | |
| 753 | + * 从历史库里删除临加班次 | |
| 754 | + * @param param | |
| 755 | + * @return | |
| 756 | + */ | |
| 757 | + @RequestMapping(value = "wxsb", method = RequestMethod.POST) | |
| 758 | + public Map<String, Object> repairReport(@RequestParam Map<String, Object> param){ | |
| 759 | + return scheduleRealInfoService.repairReport(param, true); | |
| 760 | + } | |
| 761 | + | |
| 762 | + @RequestMapping(value = "wxsb", method = RequestMethod.GET) | |
| 763 | + public List<RepairReport> repairReportList(@RequestParam String line, @RequestParam String date, @RequestParam String code, @RequestParam String type){ | |
| 764 | + return scheduleRealInfoService.repairReportList(line, date, code, type); | |
| 765 | + } | |
| 766 | + | |
| 767 | + @RequestMapping(value = "lineLevel", method = RequestMethod.GET) | |
| 768 | + public Map<String, String> lineLevel(@RequestParam String idx){ | |
| 769 | + return scheduleRealInfoService.getLevelsByLines(Arrays.asList(idx.split(","))); | |
| 770 | + } | |
| 771 | + | |
| 772 | + /** | |
| 773 | + * 反馈安全驾驶系统 | |
| 774 | + * @param param | |
| 775 | + * @return | |
| 776 | + */ | |
| 777 | + @RequestMapping(value = "ackDsm", method = RequestMethod.POST) | |
| 778 | + public Map<String, Object> ackDsm(@RequestParam Map<String, Object> param){ | |
| 779 | + Map<String, Object> res = new HashMap<>(); | |
| 780 | + InputStream in = null; | |
| 781 | + SysUser user = SecurityUtils.getCurrentUser(); | |
| 782 | + DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"); | |
| 783 | + StringBuilder url = new StringBuilder(dsmUrl), uri = new StringBuilder(); | |
| 784 | + HttpURLConnection con = null; | |
| 785 | + try { | |
| 786 | + uri.append("ddyName=").append(URLEncoder.encode(user == null ? "admin" : user.getUserName(), "UTF-8")); | |
| 787 | + uri.append("&checkTime=").append(URLEncoder.encode(fmt.print(System.currentTimeMillis()), "UTF-8")); | |
| 788 | + uri.append("&nbbm=").append(URLEncoder.encode(param.get("nbbm").toString(), "UTF-8")); | |
| 789 | + uri.append("&starttime=").append(URLEncoder.encode(fmt.print(Long.parseLong(param.get("ts").toString())), "UTF-8")); | |
| 790 | + url.append(uri); | |
| 791 | + con = (HttpURLConnection)new URL(url.toString()).openConnection(); | |
| 792 | + con.setDoInput(true); | |
| 793 | + con.setRequestMethod("POST"); | |
| 794 | + con.setConnectTimeout(5000); | |
| 795 | + con.setReadTimeout(5000); | |
| 796 | + con.setRequestProperty("keep-alive", "true"); | |
| 797 | + con.setRequestProperty("accept", "*/*"); | |
| 798 | + con.setRequestProperty("content-type", "application/x-www-form-urlencoded"); | |
| 799 | + con.connect(); | |
| 800 | + | |
| 801 | + if (con.getResponseCode() == 200) { | |
| 802 | + in = con.getInputStream(); | |
| 803 | + ByteArrayOutputStream bout = new ByteArrayOutputStream(); | |
| 804 | + IOUtils.copy(in, bout); | |
| 805 | + Map<String, Object> map = new ObjectMapper().readValue(bout.toByteArray(), Map.class); | |
| 806 | + System.out.println(map); | |
| 807 | + } | |
| 808 | + } catch (MalformedURLException e) { | |
| 809 | + // TODO Auto-generated catch block | |
| 810 | + e.printStackTrace(); | |
| 811 | + } catch (IOException e) { | |
| 812 | + // TODO Auto-generated catch block | |
| 813 | + e.printStackTrace(); | |
| 814 | + } finally { | |
| 815 | + if (con != null) { | |
| 816 | + con.disconnect(); | |
| 817 | + } | |
| 818 | + } | |
| 819 | + | |
| 820 | + return res; | |
| 821 | + } | |
| 822 | + | |
| 823 | + /** | |
| 824 | + * 反馈应急预案系统 | |
| 825 | + * @param param | |
| 826 | + * @return | |
| 827 | + */ | |
| 828 | + @RequestMapping(value = "ackCp", method = RequestMethod.POST) | |
| 829 | + public Map<String, Object> ackCp(@RequestParam Map<String, Object> param){ | |
| 830 | + Map<String, Object> res = new HashMap<>(); | |
| 831 | + InputStream in = null; | |
| 832 | + SysUser user = SecurityUtils.getCurrentUser(); | |
| 833 | + DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"); | |
| 834 | + StringBuilder url = new StringBuilder(cpUrl); | |
| 835 | + HttpURLConnection con = null; | |
| 836 | + try { | |
| 837 | + con = (HttpURLConnection)new URL(url.append(param.get("id")).toString()).openConnection(); | |
| 838 | + con.setDoInput(true); | |
| 839 | + con.setRequestMethod("GET"); | |
| 840 | + con.setConnectTimeout(5000); | |
| 841 | + con.setReadTimeout(5000); | |
| 842 | + con.setRequestProperty("keep-alive", "true"); | |
| 843 | + con.setRequestProperty("accept", "*/*"); | |
| 844 | + | |
| 845 | + if (con.getResponseCode() == 200) { | |
| 846 | + in = con.getInputStream(); | |
| 847 | + ByteArrayOutputStream bout = new ByteArrayOutputStream(); | |
| 848 | + IOUtils.copy(in, bout); | |
| 849 | + Map<String, Object> map = new ObjectMapper().readValue(bout.toByteArray(), Map.class); | |
| 850 | + System.out.println(map); | |
| 851 | + } | |
| 852 | + } catch (MalformedURLException e) { | |
| 853 | + // TODO Auto-generated catch block | |
| 854 | + e.printStackTrace(); | |
| 855 | + } catch (IOException e) { | |
| 856 | + // TODO Auto-generated catch block | |
| 857 | + e.printStackTrace(); | |
| 858 | + } finally { | |
| 859 | + if (con != null) { | |
| 860 | + con.disconnect(); | |
| 861 | + } | |
| 862 | + } | |
| 863 | + | |
| 864 | + return res; | |
| 865 | + } | |
| 866 | + | |
| 867 | + @RequestMapping(value = "exportPlan", method = RequestMethod.GET) | |
| 868 | + public Map<String, Object> exportPlan(@RequestParam String date){ | |
| 869 | + Map<String, Object> res = new HashMap<>(); | |
| 870 | + DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm"); | |
| 871 | + Connection conn = null; | |
| 872 | + PreparedStatement ps = null; | |
| 873 | + ResultSet rs = null; | |
| 874 | + | |
| 875 | + List<Map<String, Object>> list = new ArrayList<>(); | |
| 876 | + String sql = "select xl_name,xl_dir,schedule_date,fcsj,cl_zbh,j_name,bcsj from bsth_c_s_sp_info where schedule_date = ? and xl_bm in (22205, 202104, 202105, 202106, 202107, 210415) and bc_type = 'normal'"; | |
| 877 | + try{ | |
| 878 | + conn = DBUtils_control.getConnection(); | |
| 879 | + ps = conn.prepareStatement(sql); | |
| 880 | + ps.setString(1, date); | |
| 881 | + rs = ps.executeQuery(); | |
| 882 | + ObjectMapper mapper = new ObjectMapper(); | |
| 883 | + | |
| 884 | + while (rs.next()) { | |
| 885 | + SchedulePlan schedulePlan = new SchedulePlan(); | |
| 886 | + schedulePlan.setXlName(rs.getString("xl_name")); | |
| 887 | + schedulePlan.setXlDir(rs.getInt("xl_dir")); | |
| 888 | + Date scheduleDate = rs.getDate("schedule_date"); | |
| 889 | + schedulePlan.setScheduleDate(new DateTime(scheduleDate.getTime()).toString("yyyy-MM-dd")); | |
| 890 | + String fcsj = rs.getString("fcsj"); | |
| 891 | + int bcsj = rs.getInt("bcsj"); | |
| 892 | + DateTime fcsjDt = dateTimeFormatter.parseDateTime(schedulePlan.getScheduleDate() + " " + fcsj); | |
| 893 | + schedulePlan.setFcsj(fcsjDt.toString("HH:mm:00")); | |
| 894 | + DateTime ddsjDt = fcsjDt.plusMinutes(bcsj); | |
| 895 | + schedulePlan.setDdsj(ddsjDt.toString("HH:mm:00")); | |
| 896 | + schedulePlan.setSjdStart(fcsjDt.toString("HH:00:00")); | |
| 897 | + DateTime endDt = fcsjDt.plusHours(1); | |
| 898 | + schedulePlan.setSjdEnd(endDt.toString("HH:00:00")); | |
| 899 | + schedulePlan.setClZbh(rs.getString("cl_zbh")); | |
| 900 | + schedulePlan.setJsy(rs.getString("j_name")); | |
| 901 | + schedulePlan.setBcsj(bcsj); | |
| 902 | + | |
| 903 | + list.add(mapper.readValue(mapper.writeValueAsString(schedulePlan), HashMap.class)); | |
| 904 | + } | |
| 905 | + List<Iterator<?>> iterators = new ArrayList<Iterator<?>>(); | |
| 906 | + iterators.add(list.iterator()); | |
| 907 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | |
| 908 | + String sourcePath = path + "mould/schedulePlan.xls"; | |
| 909 | + | |
| 910 | + new ReportUtils().excelReplace(iterators, new Object[]{}, sourcePath, path + "export/" + date + "-花博会专线班次.xls"); | |
| 911 | + | |
| 912 | + res.put("status", ResponseCode.SUCCESS); | |
| 913 | + res.put("msg", "成功"); | |
| 914 | + } catch (Exception e) { | |
| 915 | + res.put("status", ResponseCode.ERROR); | |
| 916 | + res.put("msg", e.getMessage()); | |
| 917 | + } finally { | |
| 918 | + DBUtils_control.close(rs, ps, conn); | |
| 919 | + } | |
| 920 | + | |
| 921 | + return res; | |
| 922 | + } | |
| 923 | + | |
| 924 | + public final static class SchedulePlan { | |
| 925 | + private String company = "浦东公司[46]"; | |
| 926 | + | |
| 927 | + private String xlName = ""; | |
| 928 | + | |
| 929 | + private int xlDir; | |
| 930 | + | |
| 931 | + private String xlDirStr = ""; | |
| 932 | + | |
| 933 | + private String scheduleDate = ""; | |
| 934 | + | |
| 935 | + private String sjdStart = ""; | |
| 936 | + | |
| 937 | + private String sjdEnd = ""; | |
| 938 | + | |
| 939 | + private String fcsj = ""; | |
| 940 | + | |
| 941 | + private int bcsj; | |
| 942 | + | |
| 943 | + private String ddsj = ""; | |
| 944 | + | |
| 945 | + private int yys = 25; | |
| 946 | + | |
| 947 | + private String clZbh = ""; | |
| 948 | + | |
| 949 | + private String cph = ""; | |
| 950 | + | |
| 951 | + private String color = "绿牌"; | |
| 952 | + | |
| 953 | + private String jsy = ""; | |
| 954 | + | |
| 955 | + private String jsydh = ""; | |
| 956 | + | |
| 957 | + private int pj = 10; | |
| 958 | + | |
| 959 | + public String getCompany() { | |
| 960 | + return company; | |
| 961 | + } | |
| 962 | + | |
| 963 | + public void setCompany(String company) { | |
| 964 | + this.company = company; | |
| 965 | + } | |
| 966 | + | |
| 967 | + public String getXlName() { | |
| 968 | + return xlName; | |
| 969 | + } | |
| 970 | + | |
| 971 | + public void setXlName(String xlName) { | |
| 972 | + this.xlName = xlName; | |
| 973 | + } | |
| 974 | + | |
| 975 | + public int getXlDir() { | |
| 976 | + return xlDir; | |
| 977 | + } | |
| 978 | + | |
| 979 | + public void setXlDir(int xlDir) { | |
| 980 | + this.xlDir = xlDir; | |
| 981 | + } | |
| 982 | + | |
| 983 | + public String getXlDirStr() { | |
| 984 | + xlDirStr = ""; | |
| 985 | + if (xlDir == 0) { | |
| 986 | + xlDirStr = "上行"; | |
| 987 | + } else if (xlDir == 1) { | |
| 988 | + xlDirStr = "下行"; | |
| 989 | + } | |
| 990 | + return xlDirStr; | |
| 991 | + } | |
| 992 | + | |
| 993 | + public void setXlDirStr(String xlDirStr) { | |
| 994 | + this.xlDirStr = xlDirStr; | |
| 995 | + } | |
| 996 | + | |
| 997 | + public String getScheduleDate() { | |
| 998 | + return scheduleDate; | |
| 999 | + } | |
| 1000 | + | |
| 1001 | + public void setScheduleDate(String scheduleDate) { | |
| 1002 | + this.scheduleDate = scheduleDate; | |
| 1003 | + } | |
| 1004 | + | |
| 1005 | + public String getSjdStart() { | |
| 1006 | + return sjdStart; | |
| 1007 | + } | |
| 1008 | + | |
| 1009 | + public void setSjdStart(String sjdStart) { | |
| 1010 | + this.sjdStart = sjdStart; | |
| 1011 | + } | |
| 1012 | + | |
| 1013 | + public String getSjdEnd() { | |
| 1014 | + return sjdEnd; | |
| 1015 | + } | |
| 1016 | + | |
| 1017 | + public void setSjdEnd(String sjdEnd) { | |
| 1018 | + this.sjdEnd = sjdEnd; | |
| 1019 | + } | |
| 1020 | + | |
| 1021 | + public String getFcsj() { | |
| 1022 | + return fcsj; | |
| 1023 | + } | |
| 1024 | + | |
| 1025 | + public void setFcsj(String fcsj) { | |
| 1026 | + this.fcsj = fcsj; | |
| 1027 | + } | |
| 1028 | + | |
| 1029 | + public int getBcsj() { | |
| 1030 | + return bcsj; | |
| 1031 | + } | |
| 1032 | + | |
| 1033 | + public void setBcsj(int bcsj) { | |
| 1034 | + this.bcsj = bcsj; | |
| 1035 | + } | |
| 1036 | + | |
| 1037 | + public String getDdsj() { | |
| 1038 | + return ddsj; | |
| 1039 | + } | |
| 1040 | + | |
| 1041 | + public void setDdsj(String ddsj) { | |
| 1042 | + this.ddsj = ddsj; | |
| 1043 | + } | |
| 1044 | + | |
| 1045 | + public int getYys() { | |
| 1046 | + return yys; | |
| 1047 | + } | |
| 1048 | + | |
| 1049 | + public void setYys(int yys) { | |
| 1050 | + this.yys = yys; | |
| 1051 | + } | |
| 1052 | + | |
| 1053 | + public String getClZbh() { | |
| 1054 | + return clZbh; | |
| 1055 | + } | |
| 1056 | + | |
| 1057 | + public void setClZbh(String clZbh) { | |
| 1058 | + this.clZbh = clZbh; | |
| 1059 | + } | |
| 1060 | + | |
| 1061 | + public String getCph() { | |
| 1062 | + cph = BasicData.nbbmCompanyPlateMap.get(clZbh); | |
| 1063 | + if (cph == null) { | |
| 1064 | + cph = ""; | |
| 1065 | + } | |
| 1066 | + return cph; | |
| 1067 | + } | |
| 1068 | + | |
| 1069 | + public void setCph(String cph) { | |
| 1070 | + this.cph = cph; | |
| 1071 | + } | |
| 1072 | + | |
| 1073 | + public String getColor() { | |
| 1074 | + return color; | |
| 1075 | + } | |
| 1076 | + | |
| 1077 | + public void setColor(String color) { | |
| 1078 | + this.color = color; | |
| 1079 | + } | |
| 1080 | + | |
| 1081 | + public String getJsy() { | |
| 1082 | + return jsy; | |
| 1083 | + } | |
| 1084 | + | |
| 1085 | + public void setJsy(String jsy) { | |
| 1086 | + this.jsy = jsy; | |
| 1087 | + } | |
| 1088 | + | |
| 1089 | + public String getJsydh() { | |
| 1090 | + return jsydh; | |
| 1091 | + } | |
| 1092 | + | |
| 1093 | + public void setJsydh(String jsydh) { | |
| 1094 | + this.jsydh = jsydh; | |
| 1095 | + } | |
| 1096 | + | |
| 1097 | + public int getPj() { | |
| 1098 | + return pj; | |
| 1099 | + } | |
| 1100 | + | |
| 1101 | + public void setPj(int pj) { | |
| 1102 | + this.pj = pj; | |
| 1103 | + } | |
| 1104 | + } | |
| 1105 | +} | ... | ... |
src/main/java/com/bsth/controller/realcontrol/ServiceDataInterface.java
| 1 | -package com.bsth.controller.realcontrol; | |
| 2 | - | |
| 3 | -import com.alibaba.fastjson.JSON; | |
| 4 | -import com.alibaba.fastjson.JSONArray; | |
| 5 | -import com.alibaba.fastjson.JSONObject; | |
| 6 | -import com.bsth.controller.realcontrol.dto.ChangePersonCar; | |
| 7 | -import com.bsth.controller.realcontrol.dto.DftzAndDestroy; | |
| 8 | -import com.bsth.data.BasicData; | |
| 9 | -import com.bsth.data.directive.DayOfDirectives; | |
| 10 | -import com.bsth.data.directive.DirectiveCreator; | |
| 11 | -import com.bsth.data.directive.GatewayHttpUtils; | |
| 12 | -import com.bsth.data.gpsdata_v2.GpsRealData; | |
| 13 | -import com.bsth.data.gpsdata_v2.entity.GpsEntity; | |
| 14 | -import com.bsth.data.schedule.DayOfSchedule; | |
| 15 | -import com.bsth.data.schedule.external.TccExternalService; | |
| 16 | -import com.bsth.entity.directive.D60; | |
| 17 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 18 | -import com.bsth.repository.directive.D60Repository; | |
| 19 | -import com.google.common.base.Splitter; | |
| 20 | -import org.apache.commons.lang3.StringEscapeUtils; | |
| 21 | -import org.apache.commons.lang3.StringUtils; | |
| 22 | -import org.slf4j.Logger; | |
| 23 | -import org.slf4j.LoggerFactory; | |
| 24 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 25 | -import org.springframework.web.bind.annotation.*; | |
| 26 | - | |
| 27 | -import java.util.*; | |
| 28 | - | |
| 29 | -/** | |
| 30 | - * 对外的营运数据接口 | |
| 31 | - * Created by panzhao on 2017/3/15. | |
| 32 | - */ | |
| 33 | -@RestController | |
| 34 | -@RequestMapping("/companyService") | |
| 35 | -public class ServiceDataInterface { | |
| 36 | - | |
| 37 | - private final static String SECRE_KEY = "dVPHJkWUt5FhMT7jrM2dLV7QvlHAmZFd42rs1P0usBx8A7HZki"; | |
| 38 | - | |
| 39 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 40 | - | |
| 41 | - @Autowired | |
| 42 | - DayOfSchedule dayOfSchedule; | |
| 43 | - | |
| 44 | - @Autowired | |
| 45 | - DayOfDirectives dayOfDirectives; | |
| 46 | - | |
| 47 | - @Autowired | |
| 48 | - D60Repository d60Repository; | |
| 49 | - | |
| 50 | - @Autowired | |
| 51 | - GpsRealData gpsRealData; | |
| 52 | - | |
| 53 | - @Autowired | |
| 54 | - TccExternalService tccExternalService; | |
| 55 | - | |
| 56 | - /** | |
| 57 | - * 获取车辆 和 当前执行班次对照信息 | |
| 58 | - * | |
| 59 | - * @return | |
| 60 | - */ | |
| 61 | - @RequestMapping("/execSchList") | |
| 62 | - public List<Map<String, Object>> execSchList(@RequestParam String secretKey) { | |
| 63 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 64 | - return null; | |
| 65 | - | |
| 66 | - List<Map<String, Object>> rs = new ArrayList<>(); | |
| 67 | - Collection<ScheduleRealInfo> list = dayOfSchedule.execPlanMap().values(); | |
| 68 | - | |
| 69 | - Map<String, Object> map; | |
| 70 | - for (ScheduleRealInfo sch : list) { | |
| 71 | - if (null == sch) | |
| 72 | - continue; | |
| 73 | - map = new HashMap<>(); | |
| 74 | - map.put("clZbh", sch.getClZbh()); | |
| 75 | - map.put("jGh", sch.getjGh()); | |
| 76 | - map.put("jName", sch.getjName()); | |
| 77 | - map.put("sGh", sch.getsGh()); | |
| 78 | - map.put("sName", sch.getsName()); | |
| 79 | - map.put("lpName", sch.getLpName()); | |
| 80 | - map.put("xlBm", sch.getXlBm()); | |
| 81 | - map.put("xlName", sch.getXlName()); | |
| 82 | - map.put("xlDir", sch.getXlDir()); | |
| 83 | - map.put("qdzName", sch.getQdzName()); | |
| 84 | - map.put("zdzName", sch.getZdzName()); | |
| 85 | - map.put("fcsj", sch.getFcsj()); | |
| 86 | - map.put("dfsj", sch.getDfsj()); | |
| 87 | - map.put("zdsj", sch.getZdsj()); | |
| 88 | - map.put("bcType", sch.getBcType()); | |
| 89 | - map.put("remarks", sch.getRemark()); | |
| 90 | - map.put("status", sch.getStatus()); | |
| 91 | - | |
| 92 | - //放站班次,放到的站点 | |
| 93 | - map.put("majorStationName", sch.getMajorStationName()); | |
| 94 | - rs.add(map); | |
| 95 | - } | |
| 96 | - return rs; | |
| 97 | - } | |
| 98 | - | |
| 99 | - @RequestMapping("/getCurrentDayPlan") | |
| 100 | - public List<ScheduleRealInfo> getCurrentDayPlan( | |
| 101 | - @RequestParam String companyId, | |
| 102 | - @RequestParam String workId, | |
| 103 | - @RequestParam String secretKey) { | |
| 104 | - | |
| 105 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 106 | - return null; | |
| 107 | - | |
| 108 | - List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findByGsbm(companyId)), rs = new ArrayList<>(); | |
| 109 | - for (ScheduleRealInfo sch : all) { | |
| 110 | - if (sch.getGsBm() != null | |
| 111 | - && sch.getGsBm().equals(companyId) | |
| 112 | - && sch.getjGh().equals(workId)) { | |
| 113 | - rs.add(sch); | |
| 114 | - } | |
| 115 | - } | |
| 116 | - return rs; | |
| 117 | - } | |
| 118 | - | |
| 119 | - @RequestMapping("/returnCCInfo") | |
| 120 | - public List<ScheduleRealInfo> returnCCInfo(@RequestParam String companyId, @RequestParam String secretKey) { | |
| 121 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 122 | - return null; | |
| 123 | - | |
| 124 | - | |
| 125 | - List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()), rs = new ArrayList<>(); | |
| 126 | - for (ScheduleRealInfo sch : all) { | |
| 127 | - | |
| 128 | - if (sch.getBcType().equals("out") | |
| 129 | - && sch.getGsBm() != null | |
| 130 | - && sch.getGsBm().equals(companyId)) { | |
| 131 | - rs.add(sch); | |
| 132 | - } | |
| 133 | - } | |
| 134 | - return rs; | |
| 135 | - } | |
| 136 | - | |
| 137 | - @RequestMapping("/returnJCInfo") | |
| 138 | - public List<ScheduleRealInfo> returnJCInfo(@RequestParam String companyId, @RequestParam String secretKey) { | |
| 139 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 140 | - return null; | |
| 141 | - | |
| 142 | - | |
| 143 | - List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()), rs = new ArrayList<>(); | |
| 144 | - for (ScheduleRealInfo sch : all) { | |
| 145 | - if (sch.getBcType().equals("in") | |
| 146 | - && sch.getGsBm() != null | |
| 147 | - && sch.getGsBm().equals(companyId)) { | |
| 148 | - rs.add(sch); | |
| 149 | - } | |
| 150 | - } | |
| 151 | - return rs; | |
| 152 | - } | |
| 153 | - | |
| 154 | - /** | |
| 155 | - * 获取全量的进出场数据, 仅供接口项目调用。 由接口项目负责对外所有场站输出 | |
| 156 | - * | |
| 157 | - * @return | |
| 158 | - */ | |
| 159 | - @RequestMapping("/findCurrInAndOut") | |
| 160 | - public List<ScheduleRealInfo> findCurrInAndOut(@RequestParam String secretKey) { | |
| 161 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 162 | - return null; | |
| 163 | - | |
| 164 | - | |
| 165 | - List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()), rs = new ArrayList<>(); | |
| 166 | - for (ScheduleRealInfo sch : all) { | |
| 167 | - if (sch.getBcType().equals("in") | |
| 168 | - || sch.getBcType().equals("out")) { | |
| 169 | - rs.add(sch); | |
| 170 | - } | |
| 171 | - } | |
| 172 | - return rs; | |
| 173 | - } | |
| 174 | - | |
| 175 | - /** | |
| 176 | - * 向指定的车辆下发消息短语 | |
| 177 | - * | |
| 178 | - * @return | |
| 179 | - */ | |
| 180 | - @RequestMapping(value = "/send60Phrase", method = RequestMethod.POST) | |
| 181 | - public int send60Phrase(@RequestBody Map<String, String> map, @RequestParam String secretKey) { | |
| 182 | - try { | |
| 183 | - String nbbm = map.get("nbbm"); | |
| 184 | - String txt = map.get("txt"); | |
| 185 | - String sender = map.get("sender"); | |
| 186 | - if (txt.length() > 50) | |
| 187 | - txt = txt.substring(0, 50); | |
| 188 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 189 | - return -500; | |
| 190 | - | |
| 191 | - //车辆和设备号对照 | |
| 192 | - String deviceId = BasicData.deviceId2NbbmMap.inverse().get(nbbm); | |
| 193 | - if (StringUtils.isEmpty(deviceId)) | |
| 194 | - return -404; | |
| 195 | - | |
| 196 | - //检查设备是否在线 | |
| 197 | - long t = System.currentTimeMillis(); | |
| 198 | - GpsEntity gps = gpsRealData.get(deviceId); | |
| 199 | - if (null == gps || (t - gps.getServerTimestamp()) > 1000 * 60 * 5) | |
| 200 | - return -405; | |
| 201 | - | |
| 202 | - Short dispatchInstruct = 0;//消息短语 | |
| 203 | - D60 d60 = new DirectiveCreator().createD60(nbbm, txt, dispatchInstruct, gps.getUpDown(), gps.getState(), gps.getLineId()); | |
| 204 | - d60.setSender(sender); | |
| 205 | - // 发送指令 | |
| 206 | - int code = GatewayHttpUtils.postJson(JSON.toJSONString(d60)); | |
| 207 | - d60.setHttpCode(code); | |
| 208 | - | |
| 209 | - if (code != 0) | |
| 210 | - d60.setErrorText("网关通讯失败, code: " + code); | |
| 211 | - | |
| 212 | - dayOfDirectives.put60(d60); | |
| 213 | - return d60.getMsgId(); | |
| 214 | - } catch (Exception e) { | |
| 215 | - logger.error("", e); | |
| 216 | - return -500; | |
| 217 | - } | |
| 218 | - } | |
| 219 | - | |
| 220 | - /** | |
| 221 | - * 根据msg id 查询指令响应情况 | |
| 222 | - * | |
| 223 | - * @param msgIds | |
| 224 | - * @return | |
| 225 | - */ | |
| 226 | - @RequestMapping("/findD60Reply") | |
| 227 | - public List<Map<String, Object>> findD60Reply(@RequestParam String msgIds) { | |
| 228 | - List<Map<String, Object>> rs = new ArrayList<>(); | |
| 229 | - try { | |
| 230 | - Map<String, Object> map = new HashMap(); | |
| 231 | - | |
| 232 | - List<String> ids = Splitter.on(",").splitToList(msgIds); | |
| 233 | - D60 d60; | |
| 234 | - for (String id : ids) { | |
| 235 | - if (StringUtils.isEmpty(id)) | |
| 236 | - continue; | |
| 237 | - | |
| 238 | - d60 = dayOfDirectives.get(Integer.parseInt(id)); | |
| 239 | - if (null == d60) | |
| 240 | - continue; | |
| 241 | - | |
| 242 | - map.put("msgId", d60.getMsgId()); | |
| 243 | - map.put("deviceReplyTime", d60.getReply46Time()); | |
| 244 | - map.put("jsyReplyTime", d60.getReply47Time()); | |
| 245 | - rs.add(map); | |
| 246 | - } | |
| 247 | - } catch (Exception e) { | |
| 248 | - logger.error("", e); | |
| 249 | - } | |
| 250 | - return rs; | |
| 251 | - } | |
| 252 | - | |
| 253 | - /** | |
| 254 | - * 获取路牌下所有班次 | |
| 255 | - * | |
| 256 | - * @param lineCode | |
| 257 | - * @param lpName | |
| 258 | - * @return | |
| 259 | - */ | |
| 260 | - @RequestMapping("/findByLpName") | |
| 261 | - public List<ScheduleRealInfo> findByLpName(@RequestParam String lineCode, @RequestParam String lpName, @RequestParam String secretKey) { | |
| 262 | - try { | |
| 263 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 264 | - return null; | |
| 265 | - | |
| 266 | - List<ScheduleRealInfo> list = dayOfSchedule.getLpScheduleMap().get(lineCode + "_" + lpName); | |
| 267 | - return list; | |
| 268 | - } catch (Exception e) { | |
| 269 | - logger.error("", e); | |
| 270 | - } | |
| 271 | - return null; | |
| 272 | - } | |
| 273 | - | |
| 274 | - /** | |
| 275 | - * 调整出场班次待发,并烂掉后续班次(调派用) | |
| 276 | - * | |
| 277 | - * @param dad | |
| 278 | - * @return | |
| 279 | - */ | |
| 280 | - @RequestMapping(value = "/dftzAndDestroy", method = RequestMethod.POST) | |
| 281 | - public Map<String, Object> dftzAndDestroy(@RequestBody DftzAndDestroy dad, @RequestParam String secretKey) { | |
| 282 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 283 | - return null; | |
| 284 | - return tccExternalService.dftz(dad); | |
| 285 | - } | |
| 286 | - | |
| 287 | - /** | |
| 288 | - * 换人换车,(调派用) | |
| 289 | - * @return | |
| 290 | - */ | |
| 291 | - @RequestMapping(value = "/tccHrhc", method = RequestMethod.POST) | |
| 292 | - public Map<String, Object> hrhc(@RequestBody String jsonStr, @RequestParam String secretKey){ | |
| 293 | - | |
| 294 | - if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 295 | - return null; | |
| 296 | - | |
| 297 | - jsonStr = StringEscapeUtils.unescapeHtml4(jsonStr); | |
| 298 | - JSONObject rootObj = JSON.parseObject(jsonStr); | |
| 299 | - | |
| 300 | - List<ChangePersonCar> cpcs = JSONArray.parseArray(rootObj.getString("cpcs"), ChangePersonCar.class); | |
| 301 | - return tccExternalService.hrhc(cpcs, rootObj.getString("tccCode"), rootObj.getString("userId")); | |
| 302 | - } | |
| 303 | -} | |
| 1 | +package com.bsth.controller.realcontrol; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSON; | |
| 4 | +import com.alibaba.fastjson.JSONArray; | |
| 5 | +import com.alibaba.fastjson.JSONObject; | |
| 6 | +import com.bsth.controller.realcontrol.dto.ChangePersonCar; | |
| 7 | +import com.bsth.controller.realcontrol.dto.DftzAndDestroy; | |
| 8 | +import com.bsth.data.BasicData; | |
| 9 | +import com.bsth.data.directive.DayOfDirectives; | |
| 10 | +import com.bsth.data.directive.DirectiveCreator; | |
| 11 | +import com.bsth.data.directive.GatewayHttpUtils; | |
| 12 | +import com.bsth.data.gpsdata_v2.GpsRealData; | |
| 13 | +import com.bsth.data.gpsdata_v2.entity.GpsEntity; | |
| 14 | +import com.bsth.data.schedule.DayOfSchedule; | |
| 15 | +import com.bsth.data.schedule.external.TccExternalService; | |
| 16 | +import com.bsth.entity.directive.D60; | |
| 17 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 18 | +import com.bsth.repository.directive.D60Repository; | |
| 19 | +import com.bsth.websocket.handler.SendUtils; | |
| 20 | +import com.fasterxml.jackson.databind.ObjectMapper; | |
| 21 | +import com.google.common.base.Splitter; | |
| 22 | +import org.apache.commons.lang3.StringEscapeUtils; | |
| 23 | +import org.apache.commons.lang3.StringUtils; | |
| 24 | +import org.slf4j.Logger; | |
| 25 | +import org.slf4j.LoggerFactory; | |
| 26 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 27 | +import org.springframework.web.bind.annotation.*; | |
| 28 | + | |
| 29 | +import java.io.IOException; | |
| 30 | +import java.util.*; | |
| 31 | + | |
| 32 | +/** | |
| 33 | + * 对外的营运数据接口 | |
| 34 | + * Created by panzhao on 2017/3/15. | |
| 35 | + */ | |
| 36 | +@RestController | |
| 37 | +@RequestMapping("/companyService") | |
| 38 | +public class ServiceDataInterface { | |
| 39 | + | |
| 40 | + private final static String SECRE_KEY = "dVPHJkWUt5FhMT7jrM2dLV7QvlHAmZFd42rs1P0usBx8A7HZki"; | |
| 41 | + | |
| 42 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 43 | + | |
| 44 | + @Autowired | |
| 45 | + DayOfSchedule dayOfSchedule; | |
| 46 | + | |
| 47 | + @Autowired | |
| 48 | + DayOfDirectives dayOfDirectives; | |
| 49 | + | |
| 50 | + @Autowired | |
| 51 | + D60Repository d60Repository; | |
| 52 | + | |
| 53 | + @Autowired | |
| 54 | + GpsRealData gpsRealData; | |
| 55 | + | |
| 56 | + @Autowired | |
| 57 | + TccExternalService tccExternalService; | |
| 58 | + | |
| 59 | + @Autowired | |
| 60 | + private SendUtils sendUtils; | |
| 61 | + | |
| 62 | + /** | |
| 63 | + * 获取车辆 和 当前执行班次对照信息 | |
| 64 | + * | |
| 65 | + * @return | |
| 66 | + */ | |
| 67 | + @RequestMapping("/execSchList") | |
| 68 | + public List<Map<String, Object>> execSchList(@RequestParam String secretKey) { | |
| 69 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 70 | + return null; | |
| 71 | + | |
| 72 | + List<Map<String, Object>> rs = new ArrayList<>(); | |
| 73 | + Collection<ScheduleRealInfo> list = dayOfSchedule.execPlanMap().values(); | |
| 74 | + | |
| 75 | + Map<String, Object> map; | |
| 76 | + for (ScheduleRealInfo sch : list) { | |
| 77 | + if (null == sch) | |
| 78 | + continue; | |
| 79 | + map = new HashMap<>(); | |
| 80 | + map.put("clZbh", sch.getClZbh()); | |
| 81 | + map.put("jGh", sch.getjGh()); | |
| 82 | + map.put("jName", sch.getjName()); | |
| 83 | + map.put("sGh", sch.getsGh()); | |
| 84 | + map.put("sName", sch.getsName()); | |
| 85 | + map.put("lpName", sch.getLpName()); | |
| 86 | + map.put("xlBm", sch.getXlBm()); | |
| 87 | + map.put("xlName", sch.getXlName()); | |
| 88 | + map.put("xlDir", sch.getXlDir()); | |
| 89 | + map.put("qdzName", sch.getQdzName()); | |
| 90 | + map.put("zdzName", sch.getZdzName()); | |
| 91 | + map.put("fcsj", sch.getFcsj()); | |
| 92 | + map.put("dfsj", sch.getDfsj()); | |
| 93 | + map.put("zdsj", sch.getZdsj()); | |
| 94 | + map.put("bcType", sch.getBcType()); | |
| 95 | + map.put("remarks", sch.getRemark()); | |
| 96 | + map.put("status", sch.getStatus()); | |
| 97 | + | |
| 98 | + //放站班次,放到的站点 | |
| 99 | + map.put("majorStationName", sch.getMajorStationName()); | |
| 100 | + rs.add(map); | |
| 101 | + } | |
| 102 | + return rs; | |
| 103 | + } | |
| 104 | + | |
| 105 | + @RequestMapping("/getCurrentDayPlan") | |
| 106 | + public List<ScheduleRealInfo> getCurrentDayPlan( | |
| 107 | + @RequestParam String companyId, | |
| 108 | + @RequestParam String workId, | |
| 109 | + @RequestParam String secretKey) { | |
| 110 | + | |
| 111 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 112 | + return null; | |
| 113 | + | |
| 114 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findByGsbm(companyId)), rs = new ArrayList<>(); | |
| 115 | + for (ScheduleRealInfo sch : all) { | |
| 116 | + if (sch.getGsBm() != null | |
| 117 | + && sch.getGsBm().equals(companyId) | |
| 118 | + && sch.getjGh().equals(workId)) { | |
| 119 | + rs.add(sch); | |
| 120 | + } | |
| 121 | + } | |
| 122 | + return rs; | |
| 123 | + } | |
| 124 | + | |
| 125 | + @RequestMapping("/returnCCInfo") | |
| 126 | + public List<ScheduleRealInfo> returnCCInfo(@RequestParam String companyId, @RequestParam String secretKey) { | |
| 127 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 128 | + return null; | |
| 129 | + | |
| 130 | + | |
| 131 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()), rs = new ArrayList<>(); | |
| 132 | + for (ScheduleRealInfo sch : all) { | |
| 133 | + | |
| 134 | + if (sch.getBcType().equals("out") | |
| 135 | + && sch.getGsBm() != null | |
| 136 | + && sch.getGsBm().equals(companyId)) { | |
| 137 | + rs.add(sch); | |
| 138 | + } | |
| 139 | + } | |
| 140 | + return rs; | |
| 141 | + } | |
| 142 | + | |
| 143 | + @RequestMapping("/returnJCInfo") | |
| 144 | + public List<ScheduleRealInfo> returnJCInfo(@RequestParam String companyId, @RequestParam String secretKey) { | |
| 145 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 146 | + return null; | |
| 147 | + | |
| 148 | + | |
| 149 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()), rs = new ArrayList<>(); | |
| 150 | + for (ScheduleRealInfo sch : all) { | |
| 151 | + if (sch.getBcType().equals("in") | |
| 152 | + && sch.getGsBm() != null | |
| 153 | + && sch.getGsBm().equals(companyId)) { | |
| 154 | + rs.add(sch); | |
| 155 | + } | |
| 156 | + } | |
| 157 | + return rs; | |
| 158 | + } | |
| 159 | + | |
| 160 | + /** | |
| 161 | + * 获取全量的进出场数据, 仅供接口项目调用。 由接口项目负责对外所有场站输出 | |
| 162 | + * | |
| 163 | + * @return | |
| 164 | + */ | |
| 165 | + @RequestMapping("/findCurrInAndOut") | |
| 166 | + public List<ScheduleRealInfo> findCurrInAndOut(@RequestParam String secretKey) { | |
| 167 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 168 | + return null; | |
| 169 | + | |
| 170 | + | |
| 171 | + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll()), rs = new ArrayList<>(); | |
| 172 | + for (ScheduleRealInfo sch : all) { | |
| 173 | + if (sch.getBcType().equals("in") | |
| 174 | + || sch.getBcType().equals("out")) { | |
| 175 | + rs.add(sch); | |
| 176 | + } | |
| 177 | + } | |
| 178 | + return rs; | |
| 179 | + } | |
| 180 | + | |
| 181 | + /** | |
| 182 | + * 向指定的车辆下发消息短语 | |
| 183 | + * | |
| 184 | + * @return | |
| 185 | + */ | |
| 186 | + @RequestMapping(value = "/send60Phrase", method = RequestMethod.POST) | |
| 187 | + public int send60Phrase(@RequestBody Map<String, String> map, @RequestParam String secretKey) { | |
| 188 | + try { | |
| 189 | + String nbbm = map.get("nbbm"); | |
| 190 | + String txt = map.get("txt"); | |
| 191 | + String sender = map.get("sender"); | |
| 192 | + if (txt.length() > 50) | |
| 193 | + txt = txt.substring(0, 50); | |
| 194 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 195 | + return -500; | |
| 196 | + | |
| 197 | + //车辆和设备号对照 | |
| 198 | + String deviceId = BasicData.deviceId2NbbmMap.inverse().get(nbbm); | |
| 199 | + if (StringUtils.isEmpty(deviceId)) | |
| 200 | + return -404; | |
| 201 | + | |
| 202 | + //检查设备是否在线 | |
| 203 | + long t = System.currentTimeMillis(); | |
| 204 | + GpsEntity gps = gpsRealData.get(deviceId); | |
| 205 | + if (null == gps || (t - gps.getServerTimestamp()) > 1000 * 60 * 5) | |
| 206 | + return -405; | |
| 207 | + | |
| 208 | + Short dispatchInstruct = 0;//消息短语 | |
| 209 | + D60 d60 = new DirectiveCreator().createD60(nbbm, txt, dispatchInstruct, gps.getUpDown(), gps.getState(), gps.getLineId()); | |
| 210 | + d60.setSender(sender); | |
| 211 | + // 发送指令 | |
| 212 | + int code = GatewayHttpUtils.postJson(JSON.toJSONString(d60)); | |
| 213 | + d60.setHttpCode(code); | |
| 214 | + | |
| 215 | + if (code != 0) | |
| 216 | + d60.setErrorText("网关通讯失败, code: " + code); | |
| 217 | + | |
| 218 | + dayOfDirectives.put60(d60); | |
| 219 | + return d60.getMsgId(); | |
| 220 | + } catch (Exception e) { | |
| 221 | + logger.error("", e); | |
| 222 | + return -500; | |
| 223 | + } | |
| 224 | + } | |
| 225 | + | |
| 226 | + /** | |
| 227 | + * 根据msg id 查询指令响应情况 | |
| 228 | + * | |
| 229 | + * @param msgIds | |
| 230 | + * @return | |
| 231 | + */ | |
| 232 | + @RequestMapping("/findD60Reply") | |
| 233 | + public List<Map<String, Object>> findD60Reply(@RequestParam String msgIds) { | |
| 234 | + List<Map<String, Object>> rs = new ArrayList<>(); | |
| 235 | + try { | |
| 236 | + Map<String, Object> map = new HashMap(); | |
| 237 | + | |
| 238 | + List<String> ids = Splitter.on(",").splitToList(msgIds); | |
| 239 | + D60 d60; | |
| 240 | + for (String id : ids) { | |
| 241 | + if (StringUtils.isEmpty(id)) | |
| 242 | + continue; | |
| 243 | + | |
| 244 | + d60 = dayOfDirectives.get(Integer.parseInt(id)); | |
| 245 | + if (null == d60) | |
| 246 | + continue; | |
| 247 | + | |
| 248 | + map.put("msgId", d60.getMsgId()); | |
| 249 | + map.put("deviceReplyTime", d60.getReply46Time()); | |
| 250 | + map.put("jsyReplyTime", d60.getReply47Time()); | |
| 251 | + rs.add(map); | |
| 252 | + } | |
| 253 | + } catch (Exception e) { | |
| 254 | + logger.error("", e); | |
| 255 | + } | |
| 256 | + return rs; | |
| 257 | + } | |
| 258 | + | |
| 259 | + /** | |
| 260 | + * 获取路牌下所有班次 | |
| 261 | + * | |
| 262 | + * @param lineCode | |
| 263 | + * @param lpName | |
| 264 | + * @return | |
| 265 | + */ | |
| 266 | + @RequestMapping("/findByLpName") | |
| 267 | + public List<ScheduleRealInfo> findByLpName(@RequestParam String lineCode, @RequestParam String lpName, @RequestParam String secretKey) { | |
| 268 | + try { | |
| 269 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 270 | + return null; | |
| 271 | + | |
| 272 | + List<ScheduleRealInfo> list = dayOfSchedule.getLpScheduleMap().get(lineCode + "_" + lpName); | |
| 273 | + return list; | |
| 274 | + } catch (Exception e) { | |
| 275 | + logger.error("", e); | |
| 276 | + } | |
| 277 | + return null; | |
| 278 | + } | |
| 279 | + | |
| 280 | + /** | |
| 281 | + * 调整出场班次待发,并烂掉后续班次(调派用) | |
| 282 | + * | |
| 283 | + * @param dad | |
| 284 | + * @return | |
| 285 | + */ | |
| 286 | + @RequestMapping(value = "/dftzAndDestroy", method = RequestMethod.POST) | |
| 287 | + public Map<String, Object> dftzAndDestroy(@RequestBody DftzAndDestroy dad, @RequestParam String secretKey) { | |
| 288 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 289 | + return null; | |
| 290 | + return tccExternalService.dftz(dad); | |
| 291 | + } | |
| 292 | + | |
| 293 | + /** | |
| 294 | + * 换人换车,(调派用) | |
| 295 | + * @return | |
| 296 | + */ | |
| 297 | + @RequestMapping(value = "/tccHrhc", method = RequestMethod.POST) | |
| 298 | + public Map<String, Object> hrhc(@RequestBody String jsonStr, @RequestParam String secretKey){ | |
| 299 | + | |
| 300 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) | |
| 301 | + return null; | |
| 302 | + | |
| 303 | + jsonStr = StringEscapeUtils.unescapeHtml4(jsonStr); | |
| 304 | + JSONObject rootObj = JSON.parseObject(jsonStr); | |
| 305 | + | |
| 306 | + List<ChangePersonCar> cpcs = JSONArray.parseArray(rootObj.getString("cpcs"), ChangePersonCar.class); | |
| 307 | + return tccExternalService.hrhc(cpcs, rootObj.getString("tccCode"), rootObj.getString("userId")); | |
| 308 | + } | |
| 309 | + | |
| 310 | + /** | |
| 311 | + * 接收应急预案信息 | |
| 312 | + * @return | |
| 313 | + */ | |
| 314 | + @RequestMapping(value = "/contingencyPlan", method = RequestMethod.POST) | |
| 315 | + public Map<String, Object> contingencyPlan(@RequestBody String jsonStr, @RequestParam String secretKey){ | |
| 316 | + Map<String, Object> result = new HashMap<>(); | |
| 317 | + result.put("errCode", 0); | |
| 318 | + if (StringUtils.isEmpty(secretKey) || !secretKey.equals(SECRE_KEY)) { | |
| 319 | + result.put("errCode", 501); | |
| 320 | + result.put("msg", "无效的key"); | |
| 321 | + | |
| 322 | + return result; | |
| 323 | + } | |
| 324 | + | |
| 325 | + ObjectMapper mapper = new ObjectMapper(); | |
| 326 | + try { | |
| 327 | + List<Map> maps = mapper.readValue(jsonStr,mapper.getTypeFactory().constructParametricType(List.class, Map.class)); | |
| 328 | + for (Map map : maps) { | |
| 329 | + sendUtils.sendContingencyPlan(map); | |
| 330 | + } | |
| 331 | + } catch (IOException e) { | |
| 332 | + result.put("errCode", 502); | |
| 333 | + result.put("msg", "json数据格式异常"); | |
| 334 | + logger.info("", e); | |
| 335 | + } | |
| 336 | + | |
| 337 | + return result; | |
| 338 | + } | |
| 339 | +} | ... | ... |
src/main/java/com/bsth/entity/Personnel.java
| ... | ... | @@ -22,7 +22,7 @@ import javax.persistence.*; |
| 22 | 22 | |
| 23 | 23 | @Entity |
| 24 | 24 | @Table(name = "bsth_c_personnel") |
| 25 | -@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | |
| 25 | +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler","createBy","updateBy"}) | |
| 26 | 26 | public class Personnel extends BEntity { |
| 27 | 27 | |
| 28 | 28 | /** 主键Id */ | ... | ... |
src/main/java/com/bsth/entity/schedule/BEntity.java
| 1 | -package com.bsth.entity.schedule; | |
| 2 | - | |
| 3 | -import com.bsth.entity.sys.SysUser; | |
| 4 | -import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 5 | - | |
| 6 | -import javax.persistence.*; | |
| 7 | -import java.util.Date; | |
| 8 | - | |
| 9 | -/** | |
| 10 | - * Created by xu on 16/12/14. | |
| 11 | - */ | |
| 12 | -@MappedSuperclass | |
| 13 | -public class BEntity { | |
| 14 | - | |
| 15 | - /** 创建人 */ | |
| 16 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 17 | - @JsonIgnore | |
| 18 | - private SysUser createBy; | |
| 19 | - /** 修改人 */ | |
| 20 | - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 21 | - @JsonIgnore | |
| 22 | - private SysUser updateBy; | |
| 23 | - | |
| 24 | - /** 创建日期 */ | |
| 25 | - @Column(updatable = false, name = "create_date") | |
| 26 | - private Date createDate; | |
| 27 | - /** 修改日期 */ | |
| 28 | - @Column(name = "update_date") | |
| 29 | - private Date updateDate; | |
| 30 | - | |
| 31 | - public SysUser getCreateBy() { | |
| 32 | - return createBy; | |
| 33 | - } | |
| 34 | - | |
| 35 | - public void setCreateBy(SysUser createBy) { | |
| 36 | - this.createBy = createBy; | |
| 37 | - } | |
| 38 | - | |
| 39 | - public SysUser getUpdateBy() { | |
| 40 | - return updateBy; | |
| 41 | - } | |
| 42 | - | |
| 43 | - public void setUpdateBy(SysUser updateBy) { | |
| 44 | - this.updateBy = updateBy; | |
| 45 | - } | |
| 46 | - | |
| 47 | - public Date getCreateDate() { | |
| 48 | - return createDate; | |
| 49 | - } | |
| 50 | - | |
| 51 | - public void setCreateDate(Date createDate) { | |
| 52 | - this.createDate = createDate; | |
| 53 | - } | |
| 54 | - | |
| 55 | - public Date getUpdateDate() { | |
| 56 | - return updateDate; | |
| 57 | - } | |
| 58 | - | |
| 59 | - public void setUpdateDate(Date updateDate) { | |
| 60 | - this.updateDate = updateDate; | |
| 61 | - } | |
| 62 | -} | |
| 1 | +package com.bsth.entity.schedule; | |
| 2 | + | |
| 3 | +import com.bsth.entity.sys.SysUser; | |
| 4 | +import com.fasterxml.jackson.annotation.JsonIgnore; | |
| 5 | + | |
| 6 | +import javax.persistence.*; | |
| 7 | +import java.util.Date; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * Created by xu on 16/12/14. | |
| 11 | + */ | |
| 12 | +@MappedSuperclass | |
| 13 | +public class BEntity { | |
| 14 | + | |
| 15 | + /** 创建人 */ | |
| 16 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 17 | + private SysUser createBy; | |
| 18 | + /** 修改人 */ | |
| 19 | + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH) | |
| 20 | + private SysUser updateBy; | |
| 21 | + | |
| 22 | + /** 创建日期 */ | |
| 23 | + @Column(updatable = false, name = "create_date") | |
| 24 | + private Date createDate; | |
| 25 | + /** 修改日期 */ | |
| 26 | + @Column(name = "update_date") | |
| 27 | + private Date updateDate; | |
| 28 | + | |
| 29 | + public SysUser getCreateBy() { | |
| 30 | + return createBy; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setCreateBy(SysUser createBy) { | |
| 34 | + this.createBy = createBy; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public SysUser getUpdateBy() { | |
| 38 | + return updateBy; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setUpdateBy(SysUser updateBy) { | |
| 42 | + this.updateBy = updateBy; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public Date getCreateDate() { | |
| 46 | + return createDate; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setCreateDate(Date createDate) { | |
| 50 | + this.createDate = createDate; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public Date getUpdateDate() { | |
| 54 | + return updateDate; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setUpdateDate(Date updateDate) { | |
| 58 | + this.updateDate = updateDate; | |
| 59 | + } | |
| 60 | +} | ... | ... |
src/main/java/com/bsth/websocket/handler/RealControlSocketHandler.java
| 1 | -package com.bsth.websocket.handler; | |
| 2 | - | |
| 3 | -import com.alibaba.fastjson.JSONObject; | |
| 4 | -import com.bsth.data.BasicData; | |
| 5 | -import com.bsth.data.msg_queue.WebSocketPushQueue; | |
| 6 | -import com.google.common.base.Splitter; | |
| 7 | -import org.slf4j.Logger; | |
| 8 | -import org.slf4j.LoggerFactory; | |
| 9 | -import org.springframework.stereotype.Component; | |
| 10 | -import org.springframework.web.socket.*; | |
| 11 | - | |
| 12 | -import java.util.ArrayList; | |
| 13 | -import java.util.Collection; | |
| 14 | -import java.util.Iterator; | |
| 15 | -import java.util.List; | |
| 16 | -import java.util.concurrent.ConcurrentHashMap; | |
| 17 | -import java.util.concurrent.CopyOnWriteArrayList; | |
| 18 | - | |
| 19 | -/** | |
| 20 | - * @author PanZhao | |
| 21 | - */ | |
| 22 | -@Component | |
| 23 | -public class RealControlSocketHandler implements WebSocketHandler { | |
| 24 | - | |
| 25 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 26 | - | |
| 27 | - private static ArrayList<WebSocketSession> users; | |
| 28 | - private static ConcurrentHashMap<String, CopyOnWriteArrayList<WebSocketSession>> listenMap; | |
| 29 | - | |
| 30 | - static { | |
| 31 | - users = new ArrayList<WebSocketSession>(); | |
| 32 | - listenMap = new ConcurrentHashMap(); | |
| 33 | - } | |
| 34 | - | |
| 35 | - @Override | |
| 36 | - public void afterConnectionClosed(WebSocketSession session, CloseStatus arg1) | |
| 37 | - throws Exception { | |
| 38 | - users.remove(session); | |
| 39 | - //清理监听 | |
| 40 | - int vsCount=0; | |
| 41 | - Collection<CopyOnWriteArrayList<WebSocketSession>> vs = listenMap.values(); | |
| 42 | - for(CopyOnWriteArrayList<WebSocketSession> list : vs){ | |
| 43 | - list.remove(session); | |
| 44 | - | |
| 45 | - vsCount += list.size(); | |
| 46 | - } | |
| 47 | - logger.info("listen values size: " + vsCount + " -CloseStatus:" + arg1 + "conn: " + users.size()); | |
| 48 | - } | |
| 49 | - | |
| 50 | - @Override | |
| 51 | - public void afterConnectionEstablished(WebSocketSession session) | |
| 52 | - throws Exception { | |
| 53 | - session.setBinaryMessageSizeLimit(52768); | |
| 54 | - session.setTextMessageSizeLimit(52768); | |
| 55 | - users.add(session); | |
| 56 | - } | |
| 57 | - | |
| 58 | - @Override | |
| 59 | - public void handleMessage(WebSocketSession session, WebSocketMessage<?> msg) | |
| 60 | - throws Exception { | |
| 61 | - JSONObject jsonObj = JSONObject.parseObject(msg.getPayload().toString()); | |
| 62 | - switch (jsonObj.getString("operCode")) { | |
| 63 | - case "register_line": | |
| 64 | - //注册线路监听 | |
| 65 | - List<String> idx = Splitter.on(",").splitToList(jsonObj.getString("idx")); | |
| 66 | - for(String lineCode : idx){ | |
| 67 | - if(BasicData.lineCode2NameMap.containsKey(lineCode)){ | |
| 68 | - if(!listenMap.containsKey(lineCode)){ | |
| 69 | - listenMap.put(lineCode, new CopyOnWriteArrayList<WebSocketSession>()); | |
| 70 | - } | |
| 71 | - listenMap.get(lineCode).add(session); | |
| 72 | - } | |
| 73 | - } | |
| 74 | - break; | |
| 75 | - | |
| 76 | - default: | |
| 77 | - break; | |
| 78 | - } | |
| 79 | - logger.info(msg.getPayload().toString()); | |
| 80 | - } | |
| 81 | - | |
| 82 | - @Override | |
| 83 | - public void handleTransportError(WebSocketSession session, Throwable arg1) | |
| 84 | - throws Exception { | |
| 85 | - if(session.isOpen()){ | |
| 86 | - session.close(); | |
| 87 | - } | |
| 88 | - users.remove(session); | |
| 89 | - } | |
| 90 | - | |
| 91 | - @Override | |
| 92 | - public boolean supportsPartialMessages() { | |
| 93 | - return false; | |
| 94 | - } | |
| 95 | - | |
| 96 | - | |
| 97 | - /** | |
| 98 | - * 根据线路推送消息 | |
| 99 | - */ | |
| 100 | - public void sendMessageToLine(String lineCode, String msg) { | |
| 101 | - | |
| 102 | - TextMessage message = new TextMessage(msg.getBytes()); | |
| 103 | - List<WebSocketSession> list = listenMap.get(lineCode); | |
| 104 | - if(list == null || list.size() == 0) | |
| 105 | - return; | |
| 106 | - | |
| 107 | - for(WebSocketSession user : list){ | |
| 108 | - WebSocketPushQueue.put(user, message); | |
| 109 | - /*try { | |
| 110 | - if (user.isOpen()) { | |
| 111 | - user.sendMessage(message); | |
| 112 | - } | |
| 113 | - } catch (Exception e) { | |
| 114 | - try{ | |
| 115 | - logger.error("error user...."+user.getAttributes().get(Constants.SESSION_USERNAME)); | |
| 116 | - } | |
| 117 | - catch(Exception e2){} | |
| 118 | - logger.error("sendMessageToLine error ...."+msg); | |
| 119 | - logger.error("sendMessageToLine error ....", e); | |
| 120 | - }*/ | |
| 121 | - } | |
| 122 | - } | |
| 123 | - | |
| 124 | - | |
| 125 | - | |
| 126 | - /** | |
| 127 | - * 全局推送 | |
| 128 | - */ | |
| 129 | - public void sendMessage(String msg) { | |
| 130 | - | |
| 131 | - TextMessage message = new TextMessage(msg.getBytes()); | |
| 132 | - | |
| 133 | - Iterator<WebSocketSession> iterator = users.iterator(); | |
| 134 | - | |
| 135 | - WebSocketSession user; | |
| 136 | - while(iterator.hasNext()){ | |
| 137 | - user = iterator.next(); | |
| 138 | - WebSocketPushQueue.put(user, message); | |
| 139 | - /*try { | |
| 140 | - if (user.isOpen()) { | |
| 141 | - user.sendMessage(message); | |
| 142 | - } | |
| 143 | - } catch (Exception e) { | |
| 144 | - logger.error("sendMessage error ...."+msg); | |
| 145 | - }*/ | |
| 146 | - } | |
| 147 | - } | |
| 148 | -} | |
| 1 | +package com.bsth.websocket.handler; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSONObject; | |
| 4 | +import com.bsth.data.BasicData; | |
| 5 | +import com.bsth.data.msg_queue.WebSocketPushQueue; | |
| 6 | +import com.google.common.base.Splitter; | |
| 7 | +import org.slf4j.Logger; | |
| 8 | +import org.slf4j.LoggerFactory; | |
| 9 | +import org.springframework.stereotype.Component; | |
| 10 | +import org.springframework.web.socket.*; | |
| 11 | + | |
| 12 | +import java.util.ArrayList; | |
| 13 | +import java.util.Collection; | |
| 14 | +import java.util.Iterator; | |
| 15 | +import java.util.List; | |
| 16 | +import java.util.concurrent.ConcurrentHashMap; | |
| 17 | +import java.util.concurrent.CopyOnWriteArrayList; | |
| 18 | + | |
| 19 | +/** | |
| 20 | + * @author PanZhao | |
| 21 | + */ | |
| 22 | +@Component | |
| 23 | +public class RealControlSocketHandler implements WebSocketHandler { | |
| 24 | + | |
| 25 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 26 | + | |
| 27 | + private static ArrayList<WebSocketSession> users; | |
| 28 | + private static ConcurrentHashMap<String, CopyOnWriteArrayList<WebSocketSession>> listenMap; | |
| 29 | + | |
| 30 | + static { | |
| 31 | + users = new ArrayList<WebSocketSession>(); | |
| 32 | + listenMap = new ConcurrentHashMap(); | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + public void afterConnectionClosed(WebSocketSession session, CloseStatus arg1) | |
| 37 | + throws Exception { | |
| 38 | + users.remove(session); | |
| 39 | + //清理监听 | |
| 40 | + int vsCount=0; | |
| 41 | + Collection<CopyOnWriteArrayList<WebSocketSession>> vs = listenMap.values(); | |
| 42 | + for(CopyOnWriteArrayList<WebSocketSession> list : vs){ | |
| 43 | + list.remove(session); | |
| 44 | + | |
| 45 | + vsCount += list.size(); | |
| 46 | + } | |
| 47 | + logger.info("listen values size: " + vsCount + " -CloseStatus:" + arg1 + "conn: " + users.size()); | |
| 48 | + } | |
| 49 | + | |
| 50 | + @Override | |
| 51 | + public void afterConnectionEstablished(WebSocketSession session) | |
| 52 | + throws Exception { | |
| 53 | + session.setBinaryMessageSizeLimit(52768); | |
| 54 | + session.setTextMessageSizeLimit(52768); | |
| 55 | + users.add(session); | |
| 56 | + } | |
| 57 | + | |
| 58 | + @Override | |
| 59 | + public void handleMessage(WebSocketSession session, WebSocketMessage<?> msg) | |
| 60 | + throws Exception { | |
| 61 | + JSONObject jsonObj = JSONObject.parseObject(msg.getPayload().toString()); | |
| 62 | + switch (jsonObj.getString("operCode")) { | |
| 63 | + case "register_line": | |
| 64 | + //注册线路监听 | |
| 65 | + List<String> idx = Splitter.on(",").splitToList(jsonObj.getString("idx")); | |
| 66 | + for(String lineCode : idx){ | |
| 67 | + if(BasicData.lineCode2NameMap.containsKey(lineCode)){ | |
| 68 | + if(!listenMap.containsKey(lineCode)){ | |
| 69 | + listenMap.put(lineCode, new CopyOnWriteArrayList<WebSocketSession>()); | |
| 70 | + } | |
| 71 | + listenMap.get(lineCode).add(session); | |
| 72 | + } | |
| 73 | + } | |
| 74 | + break; | |
| 75 | + | |
| 76 | + default: | |
| 77 | + break; | |
| 78 | + } | |
| 79 | + logger.info(msg.getPayload().toString()); | |
| 80 | + } | |
| 81 | + | |
| 82 | + @Override | |
| 83 | + public void handleTransportError(WebSocketSession session, Throwable arg1) | |
| 84 | + throws Exception { | |
| 85 | + if(session.isOpen()){ | |
| 86 | + session.close(); | |
| 87 | + } | |
| 88 | + users.remove(session); | |
| 89 | + } | |
| 90 | + | |
| 91 | + @Override | |
| 92 | + public boolean supportsPartialMessages() { | |
| 93 | + return false; | |
| 94 | + } | |
| 95 | + | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 根据线路推送消息 | |
| 99 | + */ | |
| 100 | + public void sendMessageToLine(String lineCode, String msg) { | |
| 101 | + | |
| 102 | + TextMessage message = new TextMessage(msg.getBytes()); | |
| 103 | + List<WebSocketSession> list = listenMap.get(lineCode); | |
| 104 | + if(list == null || list.size() == 0) | |
| 105 | + return; | |
| 106 | + | |
| 107 | + for(WebSocketSession user : list){ | |
| 108 | + WebSocketPushQueue.put(user, message); | |
| 109 | + /*try { | |
| 110 | + if (user.isOpen()) { | |
| 111 | + user.sendMessage(message); | |
| 112 | + } | |
| 113 | + } catch (Exception e) { | |
| 114 | + try{ | |
| 115 | + logger.error("error user...."+user.getAttributes().get(Constants.SESSION_USERNAME)); | |
| 116 | + } | |
| 117 | + catch(Exception e2){} | |
| 118 | + logger.error("sendMessageToLine error ...."+msg); | |
| 119 | + logger.error("sendMessageToLine error ....", e); | |
| 120 | + }*/ | |
| 121 | + } | |
| 122 | + } | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + /** | |
| 127 | + * 全局推送 | |
| 128 | + */ | |
| 129 | + public void sendMessage(String msg) { | |
| 130 | + | |
| 131 | + TextMessage message = new TextMessage(msg.getBytes()); | |
| 132 | + | |
| 133 | + Iterator<WebSocketSession> iterator = users.iterator(); | |
| 134 | + | |
| 135 | + WebSocketSession user; | |
| 136 | + while(iterator.hasNext()){ | |
| 137 | + user = iterator.next(); | |
| 138 | + WebSocketPushQueue.put(user, message); | |
| 139 | + /*try { | |
| 140 | + if (user.isOpen()) { | |
| 141 | + user.sendMessage(message); | |
| 142 | + } | |
| 143 | + } catch (Exception e) { | |
| 144 | + logger.error("sendMessage error ...."+msg); | |
| 145 | + }*/ | |
| 146 | + } | |
| 147 | + } | |
| 148 | + | |
| 149 | + /** | |
| 150 | + * 根据线路推送消息 | |
| 151 | + */ | |
| 152 | + public void sendMessageToUser(String userName, String msg) { | |
| 153 | + | |
| 154 | + TextMessage message = new TextMessage(msg.getBytes()); | |
| 155 | + | |
| 156 | + for(WebSocketSession user : users){ | |
| 157 | + if (userName.equals(user.getPrincipal().getName())) { | |
| 158 | + WebSocketPushQueue.put(user, message); | |
| 159 | + } | |
| 160 | + } | |
| 161 | + } | |
| 162 | +} | ... | ... |
src/main/java/com/bsth/websocket/handler/SendUtils.java
| ... | ... | @@ -230,7 +230,23 @@ public class SendUtils{ |
| 230 | 230 | try { |
| 231 | 231 | socketHandler.sendMessageToLine(sch.getXlBm(), mapper.writeValueAsString(map)); |
| 232 | 232 | } catch (JsonProcessingException e) { |
| 233 | - logger.error("", e); | |
| 233 | + logger.error("sendRfid", e); | |
| 234 | + } | |
| 235 | + } | |
| 236 | + | |
| 237 | + /** | |
| 238 | + * 将应急预案发送至线调页面 | |
| 239 | + */ | |
| 240 | + public void sendContingencyPlan(Map<String, Object> cp) { | |
| 241 | + Map<String, Object> map = new HashMap<>(); | |
| 242 | + map.put("fn", "contingencyPlan"); | |
| 243 | + map.put("data", cp); | |
| 244 | + ObjectMapper mapper = new ObjectMapper(); | |
| 245 | + | |
| 246 | + try { | |
| 247 | + socketHandler.sendMessageToUser((String)cp.get("instructionsPeopleCode"), mapper.writeValueAsString(map)); | |
| 248 | + } catch (JsonProcessingException e) { | |
| 249 | + logger.error("sendContingencyPlan", e); | |
| 234 | 250 | } |
| 235 | 251 | } |
| 236 | 252 | } | ... | ... |
src/main/resources/application-dev.properties
| 1 | -server.port=9088 | |
| 2 | - | |
| 3 | -# dubbo服务化使用开关flag | |
| 4 | -dubbo.use=false | |
| 5 | - | |
| 6 | -#JPA | |
| 7 | -spring.jpa.hibernate.ddl-auto= none | |
| 8 | -spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | |
| 9 | -spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | |
| 10 | -spring.jpa.database= MYSQL | |
| 11 | -spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | |
| 12 | -spring.jpa.show-sql= true | |
| 13 | - | |
| 14 | -#DATABASE | |
| 15 | -spring.datasource.driver-class-name= com.mysql.jdbc.Driver | |
| 16 | -#spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 17 | -##spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 18 | -#spring.datasource.username= root | |
| 19 | -#spring.datasource.password= | |
| 20 | -spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 21 | -spring.datasource.username= root | |
| 22 | -spring.datasource.password= root | |
| 23 | -#spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 24 | -#spring.datasource.username= root | |
| 25 | -#spring.datasource.password= root | |
| 26 | -spring.datasource.type= com.zaxxer.hikari.HikariDataSource | |
| 27 | - | |
| 28 | -#DATASOURCE SETTING | |
| 29 | -spring.datasource.hikari.minimum-idle= 8 | |
| 30 | -spring.datasource.hikari.maximum-pool-size= 100 | |
| 31 | -#spring.datasource.hikari.auto-commit= true | |
| 32 | -spring.datasource.hikari.idle-timeout= 60000 | |
| 33 | -#spring.datasource.hikari.pool-name= HikariPool | |
| 34 | -spring.datasource.hikari.max-lifetime= 1800000 | |
| 35 | -spring.datasource.hikari.connection-timeout= 3000 | |
| 36 | -spring.datasource.hikari.connection-test-query= SELECT 1 | |
| 37 | -spring.datasource.hikari.validation-timeout= 3000 | |
| 38 | -spring.datasource.hikari.register-mbeans=true | |
| 39 | - | |
| 40 | -## gps client data | |
| 41 | -http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | |
| 42 | -## gateway real data | |
| 43 | -http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/ | |
| 44 | -## gateway send directive | |
| 45 | -http.send.directive = http://192.168.168.201:9090/transport_server/message/ | |
| 46 | -## rfid data | |
| 47 | -http.rfid.url= http://114.80.178.12:29000/rfid | |
| 48 | -## http ticketing interface | |
| 49 | -http.ticketing.interface= http://112.64.187.3:1080/gjService/request | |
| 50 | -## first last generate | |
| 51 | -ms.fl.generate=true | |
| 52 | 1 | \ No newline at end of file |
| 2 | +server.port=9088 | |
| 3 | + | |
| 4 | +# dubbo服务化使用开关flag | |
| 5 | +dubbo.use=false | |
| 6 | + | |
| 7 | +#JPA | |
| 8 | +spring.jpa.hibernate.ddl-auto= none | |
| 9 | +spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | |
| 10 | +spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | |
| 11 | +spring.jpa.database= MYSQL | |
| 12 | +spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | |
| 13 | +spring.jpa.show-sql= true | |
| 14 | + | |
| 15 | +#DATABASE | |
| 16 | +spring.datasource.driver-class-name= com.mysql.jdbc.Driver | |
| 17 | +#spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 18 | +##spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 19 | +#spring.datasource.username= root | |
| 20 | +#spring.datasource.password= | |
| 21 | +spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 22 | +spring.datasource.username= root | |
| 23 | +spring.datasource.password= root | |
| 24 | +#spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 25 | +#spring.datasource.username= root | |
| 26 | +#spring.datasource.password= root | |
| 27 | +spring.datasource.type= com.zaxxer.hikari.HikariDataSource | |
| 28 | + | |
| 29 | +#DATASOURCE SETTING | |
| 30 | +spring.datasource.hikari.minimum-idle= 8 | |
| 31 | +spring.datasource.hikari.maximum-pool-size= 100 | |
| 32 | +#spring.datasource.hikari.auto-commit= true | |
| 33 | +spring.datasource.hikari.idle-timeout= 60000 | |
| 34 | +#spring.datasource.hikari.pool-name= HikariPool | |
| 35 | +spring.datasource.hikari.max-lifetime= 1800000 | |
| 36 | +spring.datasource.hikari.connection-timeout= 3000 | |
| 37 | +spring.datasource.hikari.connection-test-query= SELECT 1 | |
| 38 | +spring.datasource.hikari.validation-timeout= 3000 | |
| 39 | +spring.datasource.hikari.register-mbeans=true | |
| 40 | + | |
| 41 | +## gps client data | |
| 42 | +http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | |
| 43 | +## gateway real data | |
| 44 | +http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/ | |
| 45 | +## gateway send directive | |
| 46 | +http.send.directive = http://192.168.168.201:9090/transport_server/message/ | |
| 47 | +## rfid data | |
| 48 | +http.rfid.url= http://114.80.178.12:29000/rfid | |
| 49 | +## http ticketing interface | |
| 50 | +http.ticketing.interface= http://112.64.187.3:1080/gjService/request | |
| 51 | +## first last generate | |
| 52 | +ms.fl.generate=true | |
| 53 | +## dsm ack interface | |
| 54 | +dsm.ack.url= http://211.95.61.66:9008/modules/dsmCheckTheRecord/addDsm? | |
| 55 | +## cp ack interface | |
| 56 | +cp.ack.url= http://114.80.178.12:8778/prod-api/serverApi/instructionsIssue/confirm/ | |
| 53 | 57 | \ No newline at end of file | ... | ... |
src/main/resources/application-prod.properties
| 1 | -server.port=9088 | |
| 2 | - | |
| 3 | -# dubbo����ʹ�ÿ���flag | |
| 4 | -dubbo.use=false | |
| 5 | - | |
| 6 | -#JPA | |
| 7 | -spring.jpa.hibernate.ddl-auto= none | |
| 8 | -spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | |
| 9 | -spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | |
| 10 | -spring.jpa.database= MYSQL | |
| 11 | -spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | |
| 12 | -spring.jpa.show-sql= true | |
| 13 | - | |
| 14 | -#DATABASE | |
| 15 | -spring.datasource.driver-class-name= com.mysql.jdbc.Driver | |
| 16 | -spring.datasource.url= jdbc:mysql://10.10.200.121:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai | |
| 17 | -spring.datasource.username= root | |
| 18 | -spring.datasource.password= root2jsp | |
| 19 | -spring.datasource.type= com.zaxxer.hikari.HikariDataSource | |
| 20 | - | |
| 21 | -#DATASOURCE SETTING | |
| 22 | -spring.datasource.hikari.minimum-idle= 8 | |
| 23 | -spring.datasource.hikari.maximum-pool-size= 100 | |
| 24 | -#spring.datasource.hikari.auto-commit= true | |
| 25 | -spring.datasource.hikari.idle-timeout= 60000 | |
| 26 | -#spring.datasource.hikari.pool-name= HikariPool | |
| 27 | -spring.datasource.hikari.max-lifetime= 1800000 | |
| 28 | -spring.datasource.hikari.connection-timeout= 3000 | |
| 29 | -spring.datasource.hikari.connection-test-query= SELECT 1 | |
| 30 | -spring.datasource.hikari.validation-timeout= 3000 | |
| 31 | -spring.datasource.hikari.register-mbeans=true | |
| 32 | - | |
| 33 | -## gps client data | |
| 34 | -http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | |
| 35 | -## gateway real data | |
| 36 | -http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ | |
| 37 | -## gateway send directive | |
| 38 | -http.send.directive= http://10.10.200.79:8080/transport_server/message/ | |
| 39 | -## rfid data | |
| 40 | -http.rfid.url= http://10.10.200.82:9000/rfid | |
| 41 | -## wxsb | |
| 42 | -#http.report.url.05= http://192.168.168.154:8088/ygjwsystem_j2ee/clbx/clbx_dd.do | |
| 43 | -#http.report.url.22= http://192.168.168.154:8088/jgjwsystem_j2ee/clbx/clbx_dd.do | |
| 44 | -#http.report.url.26= http://192.168.168.154:8088/nhjwsystem_j2ee/clbx/clbx_dd.do | |
| 45 | -#http.report.url.55= http://192.168.168.154:8088/snjwsystem_j2ee/clbx/clbx_dd.do | |
| 46 | -http.report.url.05= http://116.228.197.222:8081/ygjwsystem_j2ee/clbx/clbx_dd.do | |
| 47 | -http.report.url.22= http://116.247.73.122:9098/jgjwsystem_j2ee/clbx/clbx_dd.do | |
| 48 | -http.report.url.26= http://116.236.141.34:8088/nhjwsystem_j2ee/clbx/clbx_dd.do | |
| 49 | -http.report.url.55= http://180.168.216.248:8088/snjwsystem_j2ee/clbx/clbx_dd.do | |
| 50 | -## http ticketing interface | |
| 51 | -http.ticketing.interface= http://112.64.187.3:1080/gjService/request | |
| 52 | -## first last generate | |
| 53 | -ms.fl.generate=true | |
| 54 | 1 | \ No newline at end of file |
| 2 | +server.port=9088 | |
| 3 | + | |
| 4 | +# dubbo����ʹ�ÿ���flag | |
| 5 | +dubbo.use=false | |
| 6 | + | |
| 7 | +#JPA | |
| 8 | +spring.jpa.hibernate.ddl-auto= none | |
| 9 | +spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | |
| 10 | +spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | |
| 11 | +spring.jpa.database= MYSQL | |
| 12 | +spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | |
| 13 | +spring.jpa.show-sql= true | |
| 14 | + | |
| 15 | +#DATABASE | |
| 16 | +spring.datasource.driver-class-name= com.mysql.jdbc.Driver | |
| 17 | +spring.datasource.url= jdbc:mysql://10.10.200.121:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai | |
| 18 | +spring.datasource.username= root | |
| 19 | +spring.datasource.password= root2jsp | |
| 20 | +spring.datasource.type= com.zaxxer.hikari.HikariDataSource | |
| 21 | + | |
| 22 | +#DATASOURCE SETTING | |
| 23 | +spring.datasource.hikari.minimum-idle= 8 | |
| 24 | +spring.datasource.hikari.maximum-pool-size= 100 | |
| 25 | +#spring.datasource.hikari.auto-commit= true | |
| 26 | +spring.datasource.hikari.idle-timeout= 60000 | |
| 27 | +#spring.datasource.hikari.pool-name= HikariPool | |
| 28 | +spring.datasource.hikari.max-lifetime= 1800000 | |
| 29 | +spring.datasource.hikari.connection-timeout= 3000 | |
| 30 | +spring.datasource.hikari.connection-test-query= SELECT 1 | |
| 31 | +spring.datasource.hikari.validation-timeout= 3000 | |
| 32 | +spring.datasource.hikari.register-mbeans=true | |
| 33 | + | |
| 34 | +## gps client data | |
| 35 | +http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | |
| 36 | +## gateway real data | |
| 37 | +http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ | |
| 38 | +## gateway send directive | |
| 39 | +http.send.directive= http://10.10.200.79:8080/transport_server/message/ | |
| 40 | +## rfid data | |
| 41 | +http.rfid.url= http://10.10.200.82:9000/rfid | |
| 42 | +## wxsb | |
| 43 | +#http.report.url.05= http://192.168.168.154:8088/ygjwsystem_j2ee/clbx/clbx_dd.do | |
| 44 | +#http.report.url.22= http://192.168.168.154:8088/jgjwsystem_j2ee/clbx/clbx_dd.do | |
| 45 | +#http.report.url.26= http://192.168.168.154:8088/nhjwsystem_j2ee/clbx/clbx_dd.do | |
| 46 | +#http.report.url.55= http://192.168.168.154:8088/snjwsystem_j2ee/clbx/clbx_dd.do | |
| 47 | +http.report.url.05= http://116.228.197.222:8081/ygjwsystem_j2ee/clbx/clbx_dd.do | |
| 48 | +http.report.url.22= http://116.247.73.122:9098/jgjwsystem_j2ee/clbx/clbx_dd.do | |
| 49 | +http.report.url.26= http://116.236.141.34:8088/nhjwsystem_j2ee/clbx/clbx_dd.do | |
| 50 | +http.report.url.55= http://180.168.216.248:8088/snjwsystem_j2ee/clbx/clbx_dd.do | |
| 51 | +## http ticketing interface | |
| 52 | +http.ticketing.interface= http://112.64.187.3:1080/gjService/request | |
| 53 | +## first last generate | |
| 54 | +ms.fl.generate=true | |
| 55 | +## dsm ack interface | |
| 56 | +dsm.ack.url= http://211.95.61.66:9008/modules/dsmCheckTheRecord/addDsm? | |
| 57 | +## cp ack interface | |
| 58 | +cp.ack.url= http://114.80.178.12:8778/prod-api/serverApi/instructionsIssue/confirm/ | |
| 55 | 59 | \ No newline at end of file | ... | ... |
src/main/resources/application-test.properties
| 1 | -server.port=9088 | |
| 2 | - | |
| 3 | -# dubbo����ʹ�ÿ���flag | |
| 4 | -dubbo.use=false | |
| 5 | - | |
| 6 | -#JPA | |
| 7 | -spring.jpa.hibernate.ddl-auto= none | |
| 8 | -spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | |
| 9 | -spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | |
| 10 | -spring.jpa.database= MYSQL | |
| 11 | -spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | |
| 12 | -spring.jpa.show-sql= false | |
| 13 | - | |
| 14 | -#DATABASE | |
| 15 | -spring.datasource.driver-class-name= com.mysql.jdbc.Driver | |
| 16 | -spring.datasource.url= jdbc:mysql://10.10.200.148:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 17 | -spring.datasource.username= root | |
| 18 | -spring.datasource.password= root | |
| 19 | -spring.datasource.type= com.zaxxer.hikari.HikariDataSource | |
| 20 | - | |
| 21 | -#DATASOURCE SETTING | |
| 22 | -spring.datasource.hikari.minimum-idle= 8 | |
| 23 | -spring.datasource.hikari.maximum-pool-size= 100 | |
| 24 | -#spring.datasource.hikari.auto-commit= true | |
| 25 | -spring.datasource.hikari.idle-timeout= 60000 | |
| 26 | -#spring.datasource.hikari.pool-name= HikariPool | |
| 27 | -spring.datasource.hikari.max-lifetime= 1800000 | |
| 28 | -spring.datasource.hikari.connection-timeout= 3000 | |
| 29 | -spring.datasource.hikari.connection-test-query= SELECT 1 | |
| 30 | -spring.datasource.hikari.validation-timeout= 3000 | |
| 31 | -spring.datasource.hikari.register-mbeans=true | |
| 32 | - | |
| 33 | -## gps client data | |
| 34 | -http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | |
| 35 | -## gateway real data | |
| 36 | -http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ | |
| 37 | -## gateway send directive | |
| 38 | -#http.send.directive = http://10.10.200.79:8080/transport_server/message/ | |
| 39 | -## rfid data | |
| 40 | -http.rfid.url= http://10.10.200.82:9000/rfid | |
| 41 | -## http ticketing interface | |
| 42 | -http.ticketing.interface= http://112.64.187.3:1080/gjService/request | |
| 43 | -## first last generate | |
| 44 | -ms.fl.generate=false | |
| 45 | 1 | \ No newline at end of file |
| 2 | +server.port=9088 | |
| 3 | + | |
| 4 | +# dubbo����ʹ�ÿ���flag | |
| 5 | +dubbo.use=false | |
| 6 | + | |
| 7 | +#JPA | |
| 8 | +spring.jpa.hibernate.ddl-auto= none | |
| 9 | +spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | |
| 10 | +spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | |
| 11 | +spring.jpa.database= MYSQL | |
| 12 | +spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | |
| 13 | +spring.jpa.show-sql= false | |
| 14 | + | |
| 15 | +#DATABASE | |
| 16 | +spring.datasource.driver-class-name= com.mysql.jdbc.Driver | |
| 17 | +spring.datasource.url= jdbc:mysql://10.10.200.148:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | |
| 18 | +spring.datasource.username= root | |
| 19 | +spring.datasource.password= root | |
| 20 | +spring.datasource.type= com.zaxxer.hikari.HikariDataSource | |
| 21 | + | |
| 22 | +#DATASOURCE SETTING | |
| 23 | +spring.datasource.hikari.minimum-idle= 8 | |
| 24 | +spring.datasource.hikari.maximum-pool-size= 100 | |
| 25 | +#spring.datasource.hikari.auto-commit= true | |
| 26 | +spring.datasource.hikari.idle-timeout= 60000 | |
| 27 | +#spring.datasource.hikari.pool-name= HikariPool | |
| 28 | +spring.datasource.hikari.max-lifetime= 1800000 | |
| 29 | +spring.datasource.hikari.connection-timeout= 3000 | |
| 30 | +spring.datasource.hikari.connection-test-query= SELECT 1 | |
| 31 | +spring.datasource.hikari.validation-timeout= 3000 | |
| 32 | +spring.datasource.hikari.register-mbeans=true | |
| 33 | + | |
| 34 | +## gps client data | |
| 35 | +http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | |
| 36 | +## gateway real data | |
| 37 | +http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ | |
| 38 | +## gateway send directive | |
| 39 | +#http.send.directive = http://10.10.200.79:8080/transport_server/message/ | |
| 40 | +## rfid data | |
| 41 | +http.rfid.url= http://10.10.200.82:9000/rfid | |
| 42 | +## http ticketing interface | |
| 43 | +http.ticketing.interface= http://112.64.187.3:1080/gjService/request | |
| 44 | +## first last generate | |
| 45 | +ms.fl.generate=false | |
| 46 | +## dsm ack interface | |
| 47 | +dsm.ack.url= http://211.95.61.66:9008/modules/dsmCheckTheRecord/addDsm? | |
| 48 | +## cp ack interface | |
| 49 | +cp.ack.url= http://114.80.178.12:8778/prod-api/serverApi/instructionsIssue/confirm/ | |
| 46 | 50 | \ No newline at end of file | ... | ... |
src/main/resources/datatools/ktrs/scheduleRuleDataInput.ktr
| ... | ... | @@ -11,12 +11,12 @@ |
| 11 | 11 | <parameters> |
| 12 | 12 | <parameter> |
| 13 | 13 | <name>erroroutputdir</name> |
| 14 | - <default_value>/Users/xu/resource/project_code/bsth_project/bsth_control_etl/导入导出1</default_value> | |
| 14 | + <default_value>/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/erroroutput</default_value> | |
| 15 | 15 | <description>ktr step配置的错误输出目录</description> |
| 16 | 16 | </parameter> |
| 17 | 17 | <parameter> |
| 18 | 18 | <name>filepath</name> |
| 19 | - <default_value>/Users/xu/resource/project_code/bsth_project/bsth_control_etl/导入导出1/排版规则信息.xls</default_value> | |
| 19 | + <default_value>/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/排版规则信息-167-副本.xls</default_value> | |
| 20 | 20 | <description>待处理导入的excel文件</description> |
| 21 | 21 | </parameter> |
| 22 | 22 | </parameters> |
| ... | ... | @@ -84,6 +84,27 @@ |
| 84 | 84 | <is_key_private>N</is_key_private> |
| 85 | 85 | </info> |
| 86 | 86 | <notepads> |
| 87 | + <notepad> | |
| 88 | + <note>业务信息更新:
1、人员如果作废了,忽略关联的搭班编码
2、所有的数据库 join step的outer join不要勾选,
 不勾选的情况下,如果当前input行数据参与的数据库查询没找到数据,则output行就没有数据了,
 (之前outer join选中,造成output行一直有数据,后面还要使用过滤step过滤数据)</note> | |
| 89 | + <xloc>161</xloc> | |
| 90 | + <yloc>362</yloc> | |
| 91 | + <width>557</width> | |
| 92 | + <heigth>90</heigth> | |
| 93 | + <fontname>YaHei Consolas Hybrid</fontname> | |
| 94 | + <fontsize>12</fontsize> | |
| 95 | + <fontbold>N</fontbold> | |
| 96 | + <fontitalic>N</fontitalic> | |
| 97 | + <fontcolorred>0</fontcolorred> | |
| 98 | + <fontcolorgreen>0</fontcolorgreen> | |
| 99 | + <fontcolorblue>0</fontcolorblue> | |
| 100 | + <backgroundcolorred>255</backgroundcolorred> | |
| 101 | + <backgroundcolorgreen>205</backgroundcolorgreen> | |
| 102 | + <backgroundcolorblue>112</backgroundcolorblue> | |
| 103 | + <bordercolorred>100</bordercolorred> | |
| 104 | + <bordercolorgreen>100</bordercolorgreen> | |
| 105 | + <bordercolorblue>100</bordercolorblue> | |
| 106 | + <drawshadow>Y</drawshadow> | |
| 107 | + </notepad> | |
| 87 | 108 | </notepads> |
| 88 | 109 | <connection> |
| 89 | 110 | <name>192.168.168.1_jwgl_dw</name> |
| ... | ... | @@ -593,35 +614,36 @@ |
| 593 | 614 | </attributes> |
| 594 | 615 | </connection> |
| 595 | 616 | <order> |
| 596 | - <hop> <from>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> | |
| 597 | - <hop> <from>原始系统导出的Excel输入</from><to>启用被数据flag</to><enabled>Y</enabled> </hop> | |
| 598 | - <hop> <from>拆分路牌范围</from><to>路牌id查询</to><enabled>Y</enabled> </hop> | |
| 599 | - <hop> <from>排序记录</from><to>分组合并路牌id</to><enabled>Y</enabled> </hop> | |
| 600 | - <hop> <from>分组合并路牌id</from><to>拆分人员范围</to><enabled>Y</enabled> </hop> | |
| 601 | - <hop> <from>拆分人员范围</from><to>拆分分班搭班编码字段</to><enabled>Y</enabled> </hop> | |
| 602 | - <hop> <from>拆分分班搭班编码字段</from><to>人员配置id查询</to><enabled>Y</enabled> </hop> | |
| 603 | - <hop> <from>人员配置id查询</from><to>人员配置id查询 2</to><enabled>Y</enabled> </hop> | |
| 604 | - <hop> <from>启用被数据flag</from><to>线路id查询</to><enabled>Y</enabled> </hop> | |
| 605 | - <hop> <from>线路id查询</from><to>过滤线路id为空记录</to><enabled>Y</enabled> </hop> | |
| 606 | - <hop> <from>过滤线路id为空记录</from><to>车辆配置id查询</to><enabled>Y</enabled> </hop> | |
| 607 | - <hop> <from>车辆配置id查询</from><to>过滤车辆配置id为空记录</to><enabled>Y</enabled> </hop> | |
| 608 | - <hop> <from>过滤车辆配置id为空记录</from><to>拆分路牌范围</to><enabled>Y</enabled> </hop> | |
| 609 | - <hop> <from>路牌id查询</from><to>过滤路牌id为空记录</to><enabled>Y</enabled> </hop> | |
| 610 | - <hop> <from>过滤路牌id为空记录</from><to>排序记录</to><enabled>Y</enabled> </hop> | |
| 611 | - <hop> <from>人员配置id查询 2</from><to>过滤人员配置id为空记录</to><enabled>Y</enabled> </hop> | |
| 612 | - <hop> <from>过滤人员配置id为空记录</from><to>合并分班人员配置id</to><enabled>Y</enabled> </hop> | |
| 613 | - <hop> <from>合并分班人员配置id</from><to>排序记录 2</to><enabled>Y</enabled> </hop> | |
| 614 | - <hop> <from>排序记录 2</from><to>分组合并人员配置id</to><enabled>Y</enabled> </hop> | |
| 615 | - <hop> <from>分组合并人员配置id</from><to>启用日期转换</to><enabled>Y</enabled> </hop> | |
| 616 | 617 | <hop> <from>删除</from><to>阻塞数据直到步骤都完成</to><enabled>Y</enabled> </hop> |
| 617 | 618 | <hop> <from>阻塞数据直到步骤都完成</from><to>规则表输出</to><enabled>Y</enabled> </hop> |
| 618 | 619 | <hop> <from>规则表输出</from><to>错误输出 2</to><enabled>Y</enabled> </hop> |
| 619 | 620 | <hop> <from>启用日期转换</from><to>默认翻班类型</to><enabled>Y</enabled> </hop> |
| 620 | 621 | <hop> <from>默认翻班类型</from><to>删除</to><enabled>Y</enabled> </hop> |
| 622 | + <hop> <from>原始系统导出的Excel输入</from><to>线路信息查询</to><enabled>Y</enabled> </hop> | |
| 623 | + <hop> <from>线路信息查询</from><to>车辆配置信息查询</to><enabled>Y</enabled> </hop> | |
| 624 | + <hop> <from>车辆配置信息查询</from><to>拆分路牌范围信息</to><enabled>Y</enabled> </hop> | |
| 625 | + <hop> <from>拆分路牌范围信息</from><to>路牌信息查询</to><enabled>Y</enabled> </hop> | |
| 626 | + <hop> <from>路牌信息查询</from><to>排序数据</to><enabled>Y</enabled> </hop> | |
| 627 | + <hop> <from>排序数据</from><to>分组合并路牌信息</to><enabled>Y</enabled> </hop> | |
| 628 | + <hop> <from>分组合并路牌信息</from><to>拆分人员范围信息</to><enabled>Y</enabled> </hop> | |
| 629 | + <hop> <from>拆分人员范围信息</from><to>继续拆分人员范围(分班)</to><enabled>Y</enabled> </hop> | |
| 630 | + <hop> <from>排序记录2</from><to>分组合并人员配置信息</to><enabled>Y</enabled> </hop> | |
| 631 | + <hop> <from>分组合并人员配置信息</from><to>启用日期转换</to><enabled>Y</enabled> </hop> | |
| 632 | + <hop> <from>继续拆分人员范围(分班)</from><to>判断是否分班</to><enabled>Y</enabled> </hop> | |
| 633 | + <hop> <from>判断是否分班</from><to>无分班人员配置信息查询 </to><enabled>Y</enabled> </hop> | |
| 634 | + <hop> <from>分班人员配置1信息查询</from><to>分班人员配置2信息查询</to><enabled>Y</enabled> </hop> | |
| 635 | + <hop> <from>判断是否分班</from><to>分班人员配置1信息查询</to><enabled>Y</enabled> </hop> | |
| 636 | + <hop> <from>无分班人员配置信息查询 </from><to>处理无分班人员配置id信息</to><enabled>Y</enabled> </hop> | |
| 637 | + <hop> <from>分班人员配置2信息查询</from><to>合并处理分班人员配置id信息</to><enabled>Y</enabled> </hop> | |
| 638 | + <hop> <from>处理无分班人员配置id信息</from><to>字段选择</to><enabled>Y</enabled> </hop> | |
| 639 | + <hop> <from>合并处理分班人员配置id信息</from><to>字段选择 2</to><enabled>Y</enabled> </hop> | |
| 640 | + <hop> <from>字段选择</from><to>排序记录2</to><enabled>Y</enabled> </hop> | |
| 641 | + <hop> <from>字段选择 2</from><to>排序记录2</to><enabled>Y</enabled> </hop> | |
| 642 | + <hop> <from>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> | |
| 621 | 643 | </order> |
| 622 | 644 | <step> |
| 623 | - <name>人员配置id查询</name> | |
| 624 | - <type>DBLookup</type> | |
| 645 | + <name>分班人员配置1信息查询</name> | |
| 646 | + <type>DBJoin</type> | |
| 625 | 647 | <description/> |
| 626 | 648 | <distribute>Y</distribute> |
| 627 | 649 | <custom_distribution/> |
| ... | ... | @@ -631,51 +653,31 @@ |
| 631 | 653 | <schema_name/> |
| 632 | 654 | </partitioning> |
| 633 | 655 | <connection>control_jndi</connection> |
| 634 | - <cache>N</cache> | |
| 635 | - <cache_load_all>Y</cache_load_all> | |
| 636 | - <cache_size>0</cache_size> | |
| 637 | - <lookup> | |
| 638 | - <schema/> | |
| 639 | - <table>bsth_c_s_ecinfo</table> | |
| 640 | - <orderby/> | |
| 641 | - <fail_on_multiple>N</fail_on_multiple> | |
| 642 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 643 | - <key> | |
| 656 | + <rowlimit>1</rowlimit> | |
| 657 | + <sql>select id as rycid1 from bsth_c_s_ecinfo employeeco0_ 
where xl = ? 
and dbbm = ? 
and is_cancel = 0
and (
(
 select IFNULL(t2.destroy, 0) 
 from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.jsy = t2.id 
 where t1.id = employeeco0_.id
) + 
(
 select IFNULL(t2.destroy, 0) 
 from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.spy = t2.id 
 where t1.id = employeeco0_.id
)
) = 0</sql> | |
| 658 | + <outer_join>N</outer_join> | |
| 659 | + <replace_vars>N</replace_vars> | |
| 660 | + <parameter> | |
| 661 | + <field> | |
| 644 | 662 | <name>xlid</name> |
| 645 | - <field>xl</field> | |
| 646 | - <condition>=</condition> | |
| 647 | - <name2/> | |
| 648 | - </key> | |
| 649 | - <key> | |
| 650 | - <name>dbbm1</name> | |
| 651 | - <field>dbbm</field> | |
| 652 | - <condition>=</condition> | |
| 653 | - <name2/> | |
| 654 | - </key> | |
| 655 | - <key> | |
| 656 | - <name>isCancel</name> | |
| 657 | - <field>is_cancel</field> | |
| 658 | - <condition>=</condition> | |
| 659 | - <name2/> | |
| 660 | - </key> | |
| 661 | - <value> | |
| 662 | - <name>id</name> | |
| 663 | - <rename>rycid1</rename> | |
| 664 | - <default/> | |
| 665 | 663 | <type>Integer</type> |
| 666 | - </value> | |
| 667 | - </lookup> | |
| 664 | + </field> | |
| 665 | + <field> | |
| 666 | + <name>dbbm1</name> | |
| 667 | + <type>String</type> | |
| 668 | + </field> | |
| 669 | + </parameter> | |
| 668 | 670 | <cluster_schema/> |
| 669 | 671 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 670 | - <xloc>904</xloc> | |
| 671 | - <yloc>101</yloc> | |
| 672 | + <xloc>950</xloc> | |
| 673 | + <yloc>113</yloc> | |
| 672 | 674 | <draw>Y</draw> |
| 673 | 675 | </GUI> |
| 674 | 676 | </step> |
| 675 | 677 | |
| 676 | 678 | <step> |
| 677 | - <name>人员配置id查询 2</name> | |
| 678 | - <type>DBLookup</type> | |
| 679 | + <name>分班人员配置2信息查询</name> | |
| 680 | + <type>DBJoin</type> | |
| 679 | 681 | <description/> |
| 680 | 682 | <distribute>Y</distribute> |
| 681 | 683 | <custom_distribution/> |
| ... | ... | @@ -685,50 +687,30 @@ |
| 685 | 687 | <schema_name/> |
| 686 | 688 | </partitioning> |
| 687 | 689 | <connection>control_jndi</connection> |
| 688 | - <cache>N</cache> | |
| 689 | - <cache_load_all>Y</cache_load_all> | |
| 690 | - <cache_size>0</cache_size> | |
| 691 | - <lookup> | |
| 692 | - <schema/> | |
| 693 | - <table>bsth_c_s_ecinfo</table> | |
| 694 | - <orderby/> | |
| 695 | - <fail_on_multiple>N</fail_on_multiple> | |
| 696 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 697 | - <key> | |
| 690 | + <rowlimit>1</rowlimit> | |
| 691 | + <sql>select id as rycid2 from bsth_c_s_ecinfo employeeco0_ 
where xl = ? 
and dbbm = ? 
and is_cancel = 0
and (
(
 select IFNULL(t2.destroy, 0) 
 from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.jsy = t2.id 
 where t1.id = employeeco0_.id
) + 
(
 select IFNULL(t2.destroy, 0) 
 from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.spy = t2.id 
 where t1.id = employeeco0_.id
)
) = 0</sql> | |
| 692 | + <outer_join>N</outer_join> | |
| 693 | + <replace_vars>N</replace_vars> | |
| 694 | + <parameter> | |
| 695 | + <field> | |
| 698 | 696 | <name>xlid</name> |
| 699 | - <field>xl</field> | |
| 700 | - <condition>=</condition> | |
| 701 | - <name2/> | |
| 702 | - </key> | |
| 703 | - <key> | |
| 704 | - <name>dbbm2</name> | |
| 705 | - <field>dbbm</field> | |
| 706 | - <condition>=</condition> | |
| 707 | - <name2/> | |
| 708 | - </key> | |
| 709 | - <key> | |
| 710 | - <name>isCancel</name> | |
| 711 | - <field>is_cancel</field> | |
| 712 | - <condition>=</condition> | |
| 713 | - <name2/> | |
| 714 | - </key> | |
| 715 | - <value> | |
| 716 | - <name>id</name> | |
| 717 | - <rename>rycid2</rename> | |
| 718 | - <default/> | |
| 719 | 697 | <type>Integer</type> |
| 720 | - </value> | |
| 721 | - </lookup> | |
| 698 | + </field> | |
| 699 | + <field> | |
| 700 | + <name>dbbm2</name> | |
| 701 | + <type>String</type> | |
| 702 | + </field> | |
| 703 | + </parameter> | |
| 722 | 704 | <cluster_schema/> |
| 723 | 705 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 724 | - <xloc>778</xloc> | |
| 725 | - <yloc>103</yloc> | |
| 706 | + <xloc>952</xloc> | |
| 707 | + <yloc>200</yloc> | |
| 726 | 708 | <draw>Y</draw> |
| 727 | 709 | </GUI> |
| 728 | 710 | </step> |
| 729 | 711 | |
| 730 | 712 | <step> |
| 731 | - <name>分组合并人员配置id</name> | |
| 713 | + <name>分组合并人员配置信息</name> | |
| 732 | 714 | <type>GroupBy</type> |
| 733 | 715 | <description/> |
| 734 | 716 | <distribute>Y</distribute> |
| ... | ... | @@ -774,9 +756,6 @@ |
| 774 | 756 | <field> |
| 775 | 757 | <name>翻班格式</name> |
| 776 | 758 | </field> |
| 777 | - <field> | |
| 778 | - <name>isCancel</name> | |
| 779 | - </field> | |
| 780 | 759 | </group> |
| 781 | 760 | <fields> |
| 782 | 761 | <field> |
| ... | ... | @@ -794,14 +773,14 @@ |
| 794 | 773 | </fields> |
| 795 | 774 | <cluster_schema/> |
| 796 | 775 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 797 | - <xloc>780</xloc> | |
| 798 | - <yloc>291</yloc> | |
| 776 | + <xloc>765</xloc> | |
| 777 | + <yloc>476</yloc> | |
| 799 | 778 | <draw>Y</draw> |
| 800 | 779 | </GUI> |
| 801 | 780 | </step> |
| 802 | 781 | |
| 803 | 782 | <step> |
| 804 | - <name>分组合并路牌id</name> | |
| 783 | + <name>分组合并路牌信息</name> | |
| 805 | 784 | <type>GroupBy</type> |
| 806 | 785 | <description/> |
| 807 | 786 | <distribute>Y</distribute> |
| ... | ... | @@ -841,9 +820,6 @@ |
| 841 | 820 | <field> |
| 842 | 821 | <name>翻班格式</name> |
| 843 | 822 | </field> |
| 844 | - <field> | |
| 845 | - <name>isCancel</name> | |
| 846 | - </field> | |
| 847 | 823 | </group> |
| 848 | 824 | <fields> |
| 849 | 825 | <field> |
| ... | ... | @@ -861,8 +837,8 @@ |
| 861 | 837 | </fields> |
| 862 | 838 | <cluster_schema/> |
| 863 | 839 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 864 | - <xloc>653</xloc> | |
| 865 | - <yloc>119</yloc> | |
| 840 | + <xloc>370</xloc> | |
| 841 | + <yloc>293</yloc> | |
| 866 | 842 | <draw>Y</draw> |
| 867 | 843 | </GUI> |
| 868 | 844 | </step> |
| ... | ... | @@ -892,8 +868,8 @@ |
| 892 | 868 | </lookup> |
| 893 | 869 | <cluster_schema/> |
| 894 | 870 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 895 | - <xloc>508</xloc> | |
| 896 | - <yloc>381</yloc> | |
| 871 | + <xloc>371</xloc> | |
| 872 | + <yloc>479</yloc> | |
| 897 | 873 | <draw>Y</draw> |
| 898 | 874 | </GUI> |
| 899 | 875 | </step> |
| ... | ... | @@ -1063,7 +1039,7 @@ |
| 1063 | 1039 | </step> |
| 1064 | 1040 | |
| 1065 | 1041 | <step> |
| 1066 | - <name>合并分班人员配置id</name> | |
| 1042 | + <name>合并处理分班人员配置id信息</name> | |
| 1067 | 1043 | <type>ScriptValueMod</type> |
| 1068 | 1044 | <description/> |
| 1069 | 1045 | <distribute>Y</distribute> |
| ... | ... | @@ -1077,7 +1053,7 @@ |
| 1077 | 1053 | <optimizationLevel>9</optimizationLevel> |
| 1078 | 1054 | <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> |
| 1079 | 1055 | <jsScript_name>Script 1</jsScript_name> |
| 1080 | - <jsScript_script>//Script here

var rycid;
var rybm;

if (rycid2 == null) {
 rycid = rycid1;
 rybm = dbbm1;
} else {
 rycid = rycid1 + "-" + rycid2;
 rybm = dbbm1 + "-" + dbbm2;
}</jsScript_script> | |
| 1056 | + <jsScript_script>//Script here

var rycid;
var rybm;

rycid = rycid1 + "-" + rycid2;
rybm = dbbm1 + "-" + dbbm2;
</jsScript_script> | |
| 1081 | 1057 | </jsScript> </jsScripts> <fields> <field> <name>rycid</name> |
| 1082 | 1058 | <rename>rycid</rename> |
| 1083 | 1059 | <type>String</type> |
| ... | ... | @@ -1092,8 +1068,8 @@ |
| 1092 | 1068 | <replace>N</replace> |
| 1093 | 1069 | </field> </fields> <cluster_schema/> |
| 1094 | 1070 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1095 | - <xloc>917</xloc> | |
| 1096 | - <yloc>201</yloc> | |
| 1071 | + <xloc>953</xloc> | |
| 1072 | + <yloc>288</yloc> | |
| 1097 | 1073 | <draw>Y</draw> |
| 1098 | 1074 | </GUI> |
| 1099 | 1075 | </step> |
| ... | ... | @@ -1127,47 +1103,14 @@ |
| 1127 | 1103 | <storage_type/> |
| 1128 | 1104 | </meta> </fields> <cluster_schema/> |
| 1129 | 1105 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1130 | - <xloc>777</xloc> | |
| 1131 | - <yloc>368</yloc> | |
| 1106 | + <xloc>615</xloc> | |
| 1107 | + <yloc>480</yloc> | |
| 1132 | 1108 | <draw>Y</draw> |
| 1133 | 1109 | </GUI> |
| 1134 | 1110 | </step> |
| 1135 | 1111 | |
| 1136 | 1112 | <step> |
| 1137 | - <name>启用被数据flag</name> | |
| 1138 | - <type>Constant</type> | |
| 1139 | - <description/> | |
| 1140 | - <distribute>Y</distribute> | |
| 1141 | - <custom_distribution/> | |
| 1142 | - <copies>1</copies> | |
| 1143 | - <partitioning> | |
| 1144 | - <method>none</method> | |
| 1145 | - <schema_name/> | |
| 1146 | - </partitioning> | |
| 1147 | - <fields> | |
| 1148 | - <field> | |
| 1149 | - <name>isCancel</name> | |
| 1150 | - <type>Integer</type> | |
| 1151 | - <format/> | |
| 1152 | - <currency/> | |
| 1153 | - <decimal/> | |
| 1154 | - <group/> | |
| 1155 | - <nullif>0</nullif> | |
| 1156 | - <length>-1</length> | |
| 1157 | - <precision>-1</precision> | |
| 1158 | - <set_empty_string>N</set_empty_string> | |
| 1159 | - </field> | |
| 1160 | - </fields> | |
| 1161 | - <cluster_schema/> | |
| 1162 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1163 | - <xloc>361</xloc> | |
| 1164 | - <yloc>22</yloc> | |
| 1165 | - <draw>Y</draw> | |
| 1166 | - </GUI> | |
| 1167 | - </step> | |
| 1168 | - | |
| 1169 | - <step> | |
| 1170 | - <name>拆分人员范围</name> | |
| 1113 | + <name>拆分人员范围信息</name> | |
| 1171 | 1114 | <type>SplitFieldToRows3</type> |
| 1172 | 1115 | <description/> |
| 1173 | 1116 | <distribute>Y</distribute> |
| ... | ... | @@ -1186,62 +1129,14 @@ |
| 1186 | 1129 | <delimiter_is_regex>N</delimiter_is_regex> |
| 1187 | 1130 | <cluster_schema/> |
| 1188 | 1131 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1189 | - <xloc>777</xloc> | |
| 1190 | - <yloc>22</yloc> | |
| 1191 | - <draw>Y</draw> | |
| 1192 | - </GUI> | |
| 1193 | - </step> | |
| 1194 | - | |
| 1195 | - <step> | |
| 1196 | - <name>拆分分班搭班编码字段</name> | |
| 1197 | - <type>FieldSplitter</type> | |
| 1198 | - <description/> | |
| 1199 | - <distribute>Y</distribute> | |
| 1200 | - <custom_distribution/> | |
| 1201 | - <copies>1</copies> | |
| 1202 | - <partitioning> | |
| 1203 | - <method>none</method> | |
| 1204 | - <schema_name/> | |
| 1205 | - </partitioning> | |
| 1206 | - <splitfield>dbbm</splitfield> | |
| 1207 | - <delimiter>-</delimiter> | |
| 1208 | - <enclosure/> | |
| 1209 | - <fields> <field> <name>dbbm1</name> | |
| 1210 | - <id/> | |
| 1211 | - <idrem>N</idrem> | |
| 1212 | - <type>String</type> | |
| 1213 | - <format/> | |
| 1214 | - <group/> | |
| 1215 | - <decimal/> | |
| 1216 | - <currency/> | |
| 1217 | - <length>-1</length> | |
| 1218 | - <precision>-1</precision> | |
| 1219 | - <nullif/> | |
| 1220 | - <ifnull/> | |
| 1221 | - <trimtype>none</trimtype> | |
| 1222 | - </field> <field> <name>dbbm2</name> | |
| 1223 | - <id/> | |
| 1224 | - <idrem>N</idrem> | |
| 1225 | - <type>String</type> | |
| 1226 | - <format/> | |
| 1227 | - <group/> | |
| 1228 | - <decimal/> | |
| 1229 | - <currency/> | |
| 1230 | - <length>-1</length> | |
| 1231 | - <precision>-1</precision> | |
| 1232 | - <nullif/> | |
| 1233 | - <ifnull/> | |
| 1234 | - <trimtype>none</trimtype> | |
| 1235 | - </field> </fields> <cluster_schema/> | |
| 1236 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1237 | - <xloc>901</xloc> | |
| 1238 | - <yloc>22</yloc> | |
| 1132 | + <xloc>552</xloc> | |
| 1133 | + <yloc>21</yloc> | |
| 1239 | 1134 | <draw>Y</draw> |
| 1240 | 1135 | </GUI> |
| 1241 | 1136 | </step> |
| 1242 | 1137 | |
| 1243 | 1138 | <step> |
| 1244 | - <name>拆分路牌范围</name> | |
| 1139 | + <name>拆分路牌范围信息</name> | |
| 1245 | 1140 | <type>SplitFieldToRows3</type> |
| 1246 | 1141 | <description/> |
| 1247 | 1142 | <distribute>Y</distribute> |
| ... | ... | @@ -1260,14 +1155,14 @@ |
| 1260 | 1155 | <delimiter_is_regex>N</delimiter_is_regex> |
| 1261 | 1156 | <cluster_schema/> |
| 1262 | 1157 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1263 | - <xloc>364</xloc> | |
| 1264 | - <yloc>259</yloc> | |
| 1158 | + <xloc>367</xloc> | |
| 1159 | + <yloc>20</yloc> | |
| 1265 | 1160 | <draw>Y</draw> |
| 1266 | 1161 | </GUI> |
| 1267 | 1162 | </step> |
| 1268 | 1163 | |
| 1269 | 1164 | <step> |
| 1270 | - <name>排序记录</name> | |
| 1165 | + <name>排序数据</name> | |
| 1271 | 1166 | <type>SortRows</type> |
| 1272 | 1167 | <description/> |
| 1273 | 1168 | <distribute>Y</distribute> |
| ... | ... | @@ -1327,23 +1222,17 @@ |
| 1327 | 1222 | <case_sensitive>N</case_sensitive> |
| 1328 | 1223 | <presorted>N</presorted> |
| 1329 | 1224 | </field> |
| 1330 | - <field> | |
| 1331 | - <name>isCancel</name> | |
| 1332 | - <ascending>Y</ascending> | |
| 1333 | - <case_sensitive>N</case_sensitive> | |
| 1334 | - <presorted>N</presorted> | |
| 1335 | - </field> | |
| 1336 | 1225 | </fields> |
| 1337 | 1226 | <cluster_schema/> |
| 1338 | 1227 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1339 | - <xloc>516</xloc> | |
| 1340 | - <yloc>119</yloc> | |
| 1228 | + <xloc>369</xloc> | |
| 1229 | + <yloc>205</yloc> | |
| 1341 | 1230 | <draw>Y</draw> |
| 1342 | 1231 | </GUI> |
| 1343 | 1232 | </step> |
| 1344 | 1233 | |
| 1345 | 1234 | <step> |
| 1346 | - <name>排序记录 2</name> | |
| 1235 | + <name>排序记录2</name> | |
| 1347 | 1236 | <type>SortRows</type> |
| 1348 | 1237 | <description/> |
| 1349 | 1238 | <distribute>Y</distribute> |
| ... | ... | @@ -1415,24 +1304,18 @@ |
| 1415 | 1304 | <case_sensitive>N</case_sensitive> |
| 1416 | 1305 | <presorted>N</presorted> |
| 1417 | 1306 | </field> |
| 1418 | - <field> | |
| 1419 | - <name>isCancel</name> | |
| 1420 | - <ascending>Y</ascending> | |
| 1421 | - <case_sensitive>N</case_sensitive> | |
| 1422 | - <presorted>N</presorted> | |
| 1423 | - </field> | |
| 1424 | 1307 | </fields> |
| 1425 | 1308 | <cluster_schema/> |
| 1426 | 1309 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1427 | - <xloc>919</xloc> | |
| 1428 | - <yloc>289</yloc> | |
| 1310 | + <xloc>862</xloc> | |
| 1311 | + <yloc>474</yloc> | |
| 1429 | 1312 | <draw>Y</draw> |
| 1430 | 1313 | </GUI> |
| 1431 | 1314 | </step> |
| 1432 | 1315 | |
| 1433 | 1316 | <step> |
| 1434 | - <name>线路id查询</name> | |
| 1435 | - <type>DBLookup</type> | |
| 1317 | + <name>线路信息查询</name> | |
| 1318 | + <type>DBJoin</type> | |
| 1436 | 1319 | <description/> |
| 1437 | 1320 | <distribute>Y</distribute> |
| 1438 | 1321 | <custom_distribution/> |
| ... | ... | @@ -1442,43 +1325,73 @@ |
| 1442 | 1325 | <schema_name/> |
| 1443 | 1326 | </partitioning> |
| 1444 | 1327 | <connection>control_jndi</connection> |
| 1445 | - <cache>N</cache> | |
| 1446 | - <cache_load_all>Y</cache_load_all> | |
| 1447 | - <cache_size>0</cache_size> | |
| 1448 | - <lookup> | |
| 1449 | - <schema/> | |
| 1450 | - <table>bsth_c_line</table> | |
| 1451 | - <orderby/> | |
| 1452 | - <fail_on_multiple>N</fail_on_multiple> | |
| 1453 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 1454 | - <key> | |
| 1328 | + <rowlimit>1</rowlimit> | |
| 1329 | + <sql>select id as xlid from bsth_c_line
where name = ? 
and destroy = 0 </sql> | |
| 1330 | + <outer_join>N</outer_join> | |
| 1331 | + <replace_vars>N</replace_vars> | |
| 1332 | + <parameter> | |
| 1333 | + <field> | |
| 1455 | 1334 | <name>线路</name> |
| 1456 | - <field>name</field> | |
| 1457 | - <condition>=</condition> | |
| 1458 | - <name2/> | |
| 1459 | - </key> | |
| 1460 | - <key> | |
| 1461 | - <name>isCancel</name> | |
| 1462 | - <field>destroy</field> | |
| 1463 | - <condition>=</condition> | |
| 1464 | - <name2/> | |
| 1465 | - </key> | |
| 1466 | - <value> | |
| 1467 | - <name>id</name> | |
| 1468 | - <rename>xlid</rename> | |
| 1469 | - <default/> | |
| 1470 | - <type>Integer</type> | |
| 1471 | - </value> | |
| 1472 | - </lookup> | |
| 1335 | + <type>String</type> | |
| 1336 | + </field> | |
| 1337 | + </parameter> | |
| 1473 | 1338 | <cluster_schema/> |
| 1474 | 1339 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1475 | - <xloc>359</xloc> | |
| 1340 | + <xloc>208</xloc> | |
| 1476 | 1341 | <yloc>110</yloc> |
| 1477 | 1342 | <draw>Y</draw> |
| 1478 | 1343 | </GUI> |
| 1479 | 1344 | </step> |
| 1480 | 1345 | |
| 1481 | 1346 | <step> |
| 1347 | + <name>继续拆分人员范围(分班)</name> | |
| 1348 | + <type>FieldSplitter</type> | |
| 1349 | + <description/> | |
| 1350 | + <distribute>Y</distribute> | |
| 1351 | + <custom_distribution/> | |
| 1352 | + <copies>1</copies> | |
| 1353 | + <partitioning> | |
| 1354 | + <method>none</method> | |
| 1355 | + <schema_name/> | |
| 1356 | + </partitioning> | |
| 1357 | + <splitfield>dbbm</splitfield> | |
| 1358 | + <delimiter>-</delimiter> | |
| 1359 | + <enclosure/> | |
| 1360 | + <fields> <field> <name>dbbm1</name> | |
| 1361 | + <id/> | |
| 1362 | + <idrem>N</idrem> | |
| 1363 | + <type>String</type> | |
| 1364 | + <format/> | |
| 1365 | + <group/> | |
| 1366 | + <decimal/> | |
| 1367 | + <currency/> | |
| 1368 | + <length>-1</length> | |
| 1369 | + <precision>-1</precision> | |
| 1370 | + <nullif/> | |
| 1371 | + <ifnull/> | |
| 1372 | + <trimtype>none</trimtype> | |
| 1373 | + </field> <field> <name>dbbm2</name> | |
| 1374 | + <id/> | |
| 1375 | + <idrem>N</idrem> | |
| 1376 | + <type>String</type> | |
| 1377 | + <format/> | |
| 1378 | + <group/> | |
| 1379 | + <decimal/> | |
| 1380 | + <currency/> | |
| 1381 | + <length>-1</length> | |
| 1382 | + <precision>-1</precision> | |
| 1383 | + <nullif/> | |
| 1384 | + <ifnull/> | |
| 1385 | + <trimtype>none</trimtype> | |
| 1386 | + </field> </fields> <cluster_schema/> | |
| 1387 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1388 | + <xloc>711</xloc> | |
| 1389 | + <yloc>23</yloc> | |
| 1390 | + <draw>Y</draw> | |
| 1391 | + </GUI> | |
| 1392 | + </step> | |
| 1393 | + | |
| 1394 | + <step> | |
| 1482 | 1395 | <name>获取变量</name> |
| 1483 | 1396 | <type>GetVariable</type> |
| 1484 | 1397 | <description/> |
| ... | ... | @@ -1599,15 +1512,15 @@ |
| 1599 | 1512 | </fields> |
| 1600 | 1513 | <cluster_schema/> |
| 1601 | 1514 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1602 | - <xloc>148</xloc> | |
| 1603 | - <yloc>380</yloc> | |
| 1515 | + <xloc>65</xloc> | |
| 1516 | + <yloc>481</yloc> | |
| 1604 | 1517 | <draw>Y</draw> |
| 1605 | 1518 | </GUI> |
| 1606 | 1519 | </step> |
| 1607 | 1520 | |
| 1608 | 1521 | <step> |
| 1609 | - <name>路牌id查询</name> | |
| 1610 | - <type>DBLookup</type> | |
| 1522 | + <name>路牌信息查询</name> | |
| 1523 | + <type>DBJoin</type> | |
| 1611 | 1524 | <description/> |
| 1612 | 1525 | <distribute>Y</distribute> |
| 1613 | 1526 | <custom_distribution/> |
| ... | ... | @@ -1617,50 +1530,30 @@ |
| 1617 | 1530 | <schema_name/> |
| 1618 | 1531 | </partitioning> |
| 1619 | 1532 | <connection>control_jndi</connection> |
| 1620 | - <cache>N</cache> | |
| 1621 | - <cache_load_all>Y</cache_load_all> | |
| 1622 | - <cache_size>0</cache_size> | |
| 1623 | - <lookup> | |
| 1624 | - <schema/> | |
| 1625 | - <table>bsth_c_s_gbi</table> | |
| 1626 | - <orderby/> | |
| 1627 | - <fail_on_multiple>N</fail_on_multiple> | |
| 1628 | - <eat_row_on_failure>N</eat_row_on_failure> | |
| 1629 | - <key> | |
| 1533 | + <rowlimit>1</rowlimit> | |
| 1534 | + <sql>select id as lpid from bsth_c_s_gbi
where xl = ? 
and lp_name = ? 
and is_cancel = 0</sql> | |
| 1535 | + <outer_join>N</outer_join> | |
| 1536 | + <replace_vars>N</replace_vars> | |
| 1537 | + <parameter> | |
| 1538 | + <field> | |
| 1630 | 1539 | <name>xlid</name> |
| 1631 | - <field>xl</field> | |
| 1632 | - <condition>=</condition> | |
| 1633 | - <name2/> | |
| 1634 | - </key> | |
| 1635 | - <key> | |
| 1636 | - <name>lpname</name> | |
| 1637 | - <field>lp_name</field> | |
| 1638 | - <condition>=</condition> | |
| 1639 | - <name2/> | |
| 1640 | - </key> | |
| 1641 | - <key> | |
| 1642 | - <name>isCancel</name> | |
| 1643 | - <field>is_cancel</field> | |
| 1644 | - <condition>=</condition> | |
| 1645 | - <name2/> | |
| 1646 | - </key> | |
| 1647 | - <value> | |
| 1648 | - <name>id</name> | |
| 1649 | - <rename>lpid</rename> | |
| 1650 | - <default/> | |
| 1651 | 1540 | <type>Integer</type> |
| 1652 | - </value> | |
| 1653 | - </lookup> | |
| 1541 | + </field> | |
| 1542 | + <field> | |
| 1543 | + <name>lpname</name> | |
| 1544 | + <type>String</type> | |
| 1545 | + </field> | |
| 1546 | + </parameter> | |
| 1654 | 1547 | <cluster_schema/> |
| 1655 | 1548 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1656 | - <xloc>516</xloc> | |
| 1657 | - <yloc>21</yloc> | |
| 1549 | + <xloc>366</xloc> | |
| 1550 | + <yloc>111</yloc> | |
| 1658 | 1551 | <draw>Y</draw> |
| 1659 | 1552 | </GUI> |
| 1660 | 1553 | </step> |
| 1661 | 1554 | |
| 1662 | 1555 | <step> |
| 1663 | - <name>车辆配置id查询</name> | |
| 1556 | + <name>车辆配置信息查询</name> | |
| 1664 | 1557 | <type>DBJoin</type> |
| 1665 | 1558 | <description/> |
| 1666 | 1559 | <distribute>Y</distribute> |
| ... | ... | @@ -1672,8 +1565,8 @@ |
| 1672 | 1565 | </partitioning> |
| 1673 | 1566 | <connection>control_jndi</connection> |
| 1674 | 1567 | <rowlimit>1</rowlimit> |
| 1675 | - <sql>select t1.id as cid from bsth_c_s_ccinfo t1 left join bsth_c_cars t2 on t1.cl = t2.id
where t1.xl = ? and t2.inside_code = ? and t1.is_cancel = ?</sql> | |
| 1676 | - <outer_join>Y</outer_join> | |
| 1568 | + <sql>select t1.id as cid 
from bsth_c_s_ccinfo t1 left join bsth_c_cars t2 on t1.cl = t2.id
where t1.xl = ? 
and t2.inside_code = ? 
and t1.is_cancel = 0 </sql> | |
| 1569 | + <outer_join>N</outer_join> | |
| 1677 | 1570 | <replace_vars>N</replace_vars> |
| 1678 | 1571 | <parameter> |
| 1679 | 1572 | <field> |
| ... | ... | @@ -1684,143 +1577,11 @@ |
| 1684 | 1577 | <name>内部编码</name> |
| 1685 | 1578 | <type>String</type> |
| 1686 | 1579 | </field> |
| 1687 | - <field> | |
| 1688 | - <name>isCancel</name> | |
| 1689 | - <type>Integer</type> | |
| 1690 | - </field> | |
| 1691 | 1580 | </parameter> |
| 1692 | 1581 | <cluster_schema/> |
| 1693 | 1582 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1694 | - <xloc>360</xloc> | |
| 1695 | - <yloc>184</yloc> | |
| 1696 | - <draw>Y</draw> | |
| 1697 | - </GUI> | |
| 1698 | - </step> | |
| 1699 | - | |
| 1700 | - <step> | |
| 1701 | - <name>过滤人员配置id为空记录</name> | |
| 1702 | - <type>FilterRows</type> | |
| 1703 | - <description/> | |
| 1704 | - <distribute>Y</distribute> | |
| 1705 | - <custom_distribution/> | |
| 1706 | - <copies>1</copies> | |
| 1707 | - <partitioning> | |
| 1708 | - <method>none</method> | |
| 1709 | - <schema_name/> | |
| 1710 | - </partitioning> | |
| 1711 | -<send_true_to/> | |
| 1712 | -<send_false_to/> | |
| 1713 | - <compare> | |
| 1714 | -<condition> | |
| 1715 | - <negated>N</negated> | |
| 1716 | - <conditions> | |
| 1717 | - <condition> | |
| 1718 | - <negated>N</negated> | |
| 1719 | - <leftvalue>rycid1</leftvalue> | |
| 1720 | - <function>IS NOT NULL</function> | |
| 1721 | - <rightvalue/> | |
| 1722 | - </condition> | |
| 1723 | - <condition> | |
| 1724 | - <negated>N</negated> | |
| 1725 | - <operator>OR</operator> | |
| 1726 | - <leftvalue>rycid2</leftvalue> | |
| 1727 | - <function>IS NOT NULL</function> | |
| 1728 | - <rightvalue/> | |
| 1729 | - </condition> | |
| 1730 | - </conditions> | |
| 1731 | - </condition> | |
| 1732 | - </compare> | |
| 1733 | - <cluster_schema/> | |
| 1734 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1735 | - <xloc>776</xloc> | |
| 1736 | - <yloc>204</yloc> | |
| 1737 | - <draw>Y</draw> | |
| 1738 | - </GUI> | |
| 1739 | - </step> | |
| 1740 | - | |
| 1741 | - <step> | |
| 1742 | - <name>过滤线路id为空记录</name> | |
| 1743 | - <type>FilterRows</type> | |
| 1744 | - <description/> | |
| 1745 | - <distribute>Y</distribute> | |
| 1746 | - <custom_distribution/> | |
| 1747 | - <copies>1</copies> | |
| 1748 | - <partitioning> | |
| 1749 | - <method>none</method> | |
| 1750 | - <schema_name/> | |
| 1751 | - </partitioning> | |
| 1752 | -<send_true_to>车辆配置id查询</send_true_to> | |
| 1753 | -<send_false_to/> | |
| 1754 | - <compare> | |
| 1755 | -<condition> | |
| 1756 | - <negated>N</negated> | |
| 1757 | - <leftvalue>xlid</leftvalue> | |
| 1758 | - <function>IS NOT NULL</function> | |
| 1759 | - <rightvalue/> | |
| 1760 | - </condition> | |
| 1761 | - </compare> | |
| 1762 | - <cluster_schema/> | |
| 1763 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1764 | - <xloc>203</xloc> | |
| 1765 | - <yloc>110</yloc> | |
| 1766 | - <draw>Y</draw> | |
| 1767 | - </GUI> | |
| 1768 | - </step> | |
| 1769 | - | |
| 1770 | - <step> | |
| 1771 | - <name>过滤路牌id为空记录</name> | |
| 1772 | - <type>FilterRows</type> | |
| 1773 | - <description/> | |
| 1774 | - <distribute>Y</distribute> | |
| 1775 | - <custom_distribution/> | |
| 1776 | - <copies>1</copies> | |
| 1777 | - <partitioning> | |
| 1778 | - <method>none</method> | |
| 1779 | - <schema_name/> | |
| 1780 | - </partitioning> | |
| 1781 | -<send_true_to>排序记录</send_true_to> | |
| 1782 | -<send_false_to/> | |
| 1783 | - <compare> | |
| 1784 | -<condition> | |
| 1785 | - <negated>N</negated> | |
| 1786 | - <leftvalue>lpid</leftvalue> | |
| 1787 | - <function>IS NOT NULL</function> | |
| 1788 | - <rightvalue/> | |
| 1789 | - </condition> | |
| 1790 | - </compare> | |
| 1791 | - <cluster_schema/> | |
| 1792 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1793 | - <xloc>653</xloc> | |
| 1794 | - <yloc>23</yloc> | |
| 1795 | - <draw>Y</draw> | |
| 1796 | - </GUI> | |
| 1797 | - </step> | |
| 1798 | - | |
| 1799 | - <step> | |
| 1800 | - <name>过滤车辆配置id为空记录</name> | |
| 1801 | - <type>FilterRows</type> | |
| 1802 | - <description/> | |
| 1803 | - <distribute>Y</distribute> | |
| 1804 | - <custom_distribution/> | |
| 1805 | - <copies>1</copies> | |
| 1806 | - <partitioning> | |
| 1807 | - <method>none</method> | |
| 1808 | - <schema_name/> | |
| 1809 | - </partitioning> | |
| 1810 | -<send_true_to>拆分路牌范围</send_true_to> | |
| 1811 | -<send_false_to/> | |
| 1812 | - <compare> | |
| 1813 | -<condition> | |
| 1814 | - <negated>N</negated> | |
| 1815 | - <leftvalue>cid</leftvalue> | |
| 1816 | - <function>IS NOT NULL</function> | |
| 1817 | - <rightvalue/> | |
| 1818 | - </condition> | |
| 1819 | - </compare> | |
| 1820 | - <cluster_schema/> | |
| 1821 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1822 | - <xloc>208</xloc> | |
| 1823 | - <yloc>182</yloc> | |
| 1583 | + <xloc>209</xloc> | |
| 1584 | + <yloc>207</yloc> | |
| 1824 | 1585 | <draw>Y</draw> |
| 1825 | 1586 | </GUI> |
| 1826 | 1587 | </step> |
| ... | ... | @@ -1966,8 +1727,8 @@ |
| 1966 | 1727 | </custom> |
| 1967 | 1728 | <cluster_schema/> |
| 1968 | 1729 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1969 | - <xloc>142</xloc> | |
| 1970 | - <yloc>512</yloc> | |
| 1730 | + <xloc>64</xloc> | |
| 1731 | + <yloc>380</yloc> | |
| 1971 | 1732 | <draw>Y</draw> |
| 1972 | 1733 | </GUI> |
| 1973 | 1734 | </step> |
| ... | ... | @@ -1991,8 +1752,8 @@ |
| 1991 | 1752 | </steps> |
| 1992 | 1753 | <cluster_schema/> |
| 1993 | 1754 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 1994 | - <xloc>339</xloc> | |
| 1995 | - <yloc>381</yloc> | |
| 1755 | + <xloc>216</xloc> | |
| 1756 | + <yloc>480</yloc> | |
| 1996 | 1757 | <draw>Y</draw> |
| 1997 | 1758 | </GUI> |
| 1998 | 1759 | </step> |
| ... | ... | @@ -2024,8 +1785,235 @@ |
| 2024 | 1785 | </fields> |
| 2025 | 1786 | <cluster_schema/> |
| 2026 | 1787 | <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> |
| 2027 | - <xloc>643</xloc> | |
| 2028 | - <yloc>368</yloc> | |
| 1788 | + <xloc>485</xloc> | |
| 1789 | + <yloc>481</yloc> | |
| 1790 | + <draw>Y</draw> | |
| 1791 | + </GUI> | |
| 1792 | + </step> | |
| 1793 | + | |
| 1794 | + <step> | |
| 1795 | + <name>判断是否分班</name> | |
| 1796 | + <type>FilterRows</type> | |
| 1797 | + <description/> | |
| 1798 | + <distribute>Y</distribute> | |
| 1799 | + <custom_distribution/> | |
| 1800 | + <copies>1</copies> | |
| 1801 | + <partitioning> | |
| 1802 | + <method>none</method> | |
| 1803 | + <schema_name/> | |
| 1804 | + </partitioning> | |
| 1805 | +<send_true_to>无分班人员配置信息查询 </send_true_to> | |
| 1806 | +<send_false_to>分班人员配置1信息查询</send_false_to> | |
| 1807 | + <compare> | |
| 1808 | +<condition> | |
| 1809 | + <negated>N</negated> | |
| 1810 | + <leftvalue>dbbm2</leftvalue> | |
| 1811 | + <function>IS NULL</function> | |
| 1812 | + <rightvalue/> | |
| 1813 | + </condition> | |
| 1814 | + </compare> | |
| 1815 | + <cluster_schema/> | |
| 1816 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1817 | + <xloc>856</xloc> | |
| 1818 | + <yloc>24</yloc> | |
| 1819 | + <draw>Y</draw> | |
| 1820 | + </GUI> | |
| 1821 | + </step> | |
| 1822 | + | |
| 1823 | + <step> | |
| 1824 | + <name>无分班人员配置信息查询 </name> | |
| 1825 | + <type>DBJoin</type> | |
| 1826 | + <description/> | |
| 1827 | + <distribute>Y</distribute> | |
| 1828 | + <custom_distribution/> | |
| 1829 | + <copies>1</copies> | |
| 1830 | + <partitioning> | |
| 1831 | + <method>none</method> | |
| 1832 | + <schema_name/> | |
| 1833 | + </partitioning> | |
| 1834 | + <connection>control_jndi</connection> | |
| 1835 | + <rowlimit>1</rowlimit> | |
| 1836 | + <sql>select id as rycid1 from bsth_c_s_ecinfo employeeco0_ 
where xl = ? 
and dbbm = ? 
and is_cancel = 0
and (
(
 select IFNULL(t2.destroy, 0) 
 from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.jsy = t2.id 
 where t1.id = employeeco0_.id
) + 
(
 select IFNULL(t2.destroy, 0) 
 from bsth_c_s_ecinfo t1 left join bsth_c_personnel t2 on t1.spy = t2.id 
 where t1.id = employeeco0_.id
)
) = 0</sql> | |
| 1837 | + <outer_join>N</outer_join> | |
| 1838 | + <replace_vars>N</replace_vars> | |
| 1839 | + <parameter> | |
| 1840 | + <field> | |
| 1841 | + <name>xlid</name> | |
| 1842 | + <type>Integer</type> | |
| 1843 | + </field> | |
| 1844 | + <field> | |
| 1845 | + <name>dbbm1</name> | |
| 1846 | + <type>String</type> | |
| 1847 | + </field> | |
| 1848 | + </parameter> | |
| 1849 | + <cluster_schema/> | |
| 1850 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1851 | + <xloc>769</xloc> | |
| 1852 | + <yloc>115</yloc> | |
| 1853 | + <draw>Y</draw> | |
| 1854 | + </GUI> | |
| 1855 | + </step> | |
| 1856 | + | |
| 1857 | + <step> | |
| 1858 | + <name>处理无分班人员配置id信息</name> | |
| 1859 | + <type>ScriptValueMod</type> | |
| 1860 | + <description/> | |
| 1861 | + <distribute>Y</distribute> | |
| 1862 | + <custom_distribution/> | |
| 1863 | + <copies>1</copies> | |
| 1864 | + <partitioning> | |
| 1865 | + <method>none</method> | |
| 1866 | + <schema_name/> | |
| 1867 | + </partitioning> | |
| 1868 | + <compatible>N</compatible> | |
| 1869 | + <optimizationLevel>9</optimizationLevel> | |
| 1870 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 1871 | + <jsScript_name>Script 1</jsScript_name> | |
| 1872 | + <jsScript_script>//Script here

var rycid;
var rybm;

rycid = rycid1;
rybm = dbbm1;
</jsScript_script> | |
| 1873 | + </jsScript> </jsScripts> <fields> <field> <name>rycid</name> | |
| 1874 | + <rename>rycid</rename> | |
| 1875 | + <type>String</type> | |
| 1876 | + <length>-1</length> | |
| 1877 | + <precision>-1</precision> | |
| 1878 | + <replace>N</replace> | |
| 1879 | + </field> <field> <name>rybm</name> | |
| 1880 | + <rename>rybm</rename> | |
| 1881 | + <type>String</type> | |
| 1882 | + <length>-1</length> | |
| 1883 | + <precision>-1</precision> | |
| 1884 | + <replace>N</replace> | |
| 1885 | + </field> </fields> <cluster_schema/> | |
| 1886 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1887 | + <xloc>763</xloc> | |
| 1888 | + <yloc>197</yloc> | |
| 1889 | + <draw>Y</draw> | |
| 1890 | + </GUI> | |
| 1891 | + </step> | |
| 1892 | + | |
| 1893 | + <step> | |
| 1894 | + <name>字段选择</name> | |
| 1895 | + <type>SelectValues</type> | |
| 1896 | + <description/> | |
| 1897 | + <distribute>Y</distribute> | |
| 1898 | + <custom_distribution/> | |
| 1899 | + <copies>1</copies> | |
| 1900 | + <partitioning> | |
| 1901 | + <method>none</method> | |
| 1902 | + <schema_name/> | |
| 1903 | + </partitioning> | |
| 1904 | + <fields> <field> <name>xlid</name> | |
| 1905 | + <rename/> | |
| 1906 | + <length>-2</length> | |
| 1907 | + <precision>-2</precision> | |
| 1908 | + </field> <field> <name>cid</name> | |
| 1909 | + <rename/> | |
| 1910 | + <length>-2</length> | |
| 1911 | + <precision>-2</precision> | |
| 1912 | + </field> <field> <name>lpnames</name> | |
| 1913 | + <rename/> | |
| 1914 | + <length>-2</length> | |
| 1915 | + <precision>-2</precision> | |
| 1916 | + </field> <field> <name>lpids</name> | |
| 1917 | + <rename/> | |
| 1918 | + <length>-2</length> | |
| 1919 | + <precision>-2</precision> | |
| 1920 | + </field> <field> <name>起始路牌</name> | |
| 1921 | + <rename/> | |
| 1922 | + <length>-2</length> | |
| 1923 | + <precision>-2</precision> | |
| 1924 | + </field> <field> <name>起始人员</name> | |
| 1925 | + <rename/> | |
| 1926 | + <length>-2</length> | |
| 1927 | + <precision>-2</precision> | |
| 1928 | + </field> <field> <name>人员范围</name> | |
| 1929 | + <rename/> | |
| 1930 | + <length>-2</length> | |
| 1931 | + <precision>-2</precision> | |
| 1932 | + </field> <field> <name>启用日期</name> | |
| 1933 | + <rename/> | |
| 1934 | + <length>-2</length> | |
| 1935 | + <precision>-2</precision> | |
| 1936 | + </field> <field> <name>翻班格式</name> | |
| 1937 | + <rename/> | |
| 1938 | + <length>-2</length> | |
| 1939 | + <precision>-2</precision> | |
| 1940 | + </field> <field> <name>rycid</name> | |
| 1941 | + <rename/> | |
| 1942 | + <length>-2</length> | |
| 1943 | + <precision>-2</precision> | |
| 1944 | + </field> <field> <name>rybm</name> | |
| 1945 | + <rename/> | |
| 1946 | + <length>-2</length> | |
| 1947 | + <precision>-2</precision> | |
| 1948 | + </field> <select_unspecified>N</select_unspecified> | |
| 1949 | + </fields> <cluster_schema/> | |
| 1950 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1951 | + <xloc>764</xloc> | |
| 1952 | + <yloc>386</yloc> | |
| 1953 | + <draw>Y</draw> | |
| 1954 | + </GUI> | |
| 1955 | + </step> | |
| 1956 | + | |
| 1957 | + <step> | |
| 1958 | + <name>字段选择 2</name> | |
| 1959 | + <type>SelectValues</type> | |
| 1960 | + <description/> | |
| 1961 | + <distribute>Y</distribute> | |
| 1962 | + <custom_distribution/> | |
| 1963 | + <copies>1</copies> | |
| 1964 | + <partitioning> | |
| 1965 | + <method>none</method> | |
| 1966 | + <schema_name/> | |
| 1967 | + </partitioning> | |
| 1968 | + <fields> <field> <name>xlid</name> | |
| 1969 | + <rename/> | |
| 1970 | + <length>-2</length> | |
| 1971 | + <precision>-2</precision> | |
| 1972 | + </field> <field> <name>cid</name> | |
| 1973 | + <rename/> | |
| 1974 | + <length>-2</length> | |
| 1975 | + <precision>-2</precision> | |
| 1976 | + </field> <field> <name>lpnames</name> | |
| 1977 | + <rename/> | |
| 1978 | + <length>-2</length> | |
| 1979 | + <precision>-2</precision> | |
| 1980 | + </field> <field> <name>lpids</name> | |
| 1981 | + <rename/> | |
| 1982 | + <length>-2</length> | |
| 1983 | + <precision>-2</precision> | |
| 1984 | + </field> <field> <name>起始路牌</name> | |
| 1985 | + <rename/> | |
| 1986 | + <length>-2</length> | |
| 1987 | + <precision>-2</precision> | |
| 1988 | + </field> <field> <name>起始人员</name> | |
| 1989 | + <rename/> | |
| 1990 | + <length>-2</length> | |
| 1991 | + <precision>-2</precision> | |
| 1992 | + </field> <field> <name>人员范围</name> | |
| 1993 | + <rename/> | |
| 1994 | + <length>-2</length> | |
| 1995 | + <precision>-2</precision> | |
| 1996 | + </field> <field> <name>启用日期</name> | |
| 1997 | + <rename/> | |
| 1998 | + <length>-2</length> | |
| 1999 | + <precision>-2</precision> | |
| 2000 | + </field> <field> <name>翻班格式</name> | |
| 2001 | + <rename/> | |
| 2002 | + <length>-2</length> | |
| 2003 | + <precision>-2</precision> | |
| 2004 | + </field> <field> <name>rycid</name> | |
| 2005 | + <rename/> | |
| 2006 | + <length>-2</length> | |
| 2007 | + <precision>-2</precision> | |
| 2008 | + </field> <field> <name>rybm</name> | |
| 2009 | + <rename/> | |
| 2010 | + <length>-2</length> | |
| 2011 | + <precision>-2</precision> | |
| 2012 | + </field> <select_unspecified>N</select_unspecified> | |
| 2013 | + </fields> <cluster_schema/> | |
| 2014 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 2015 | + <xloc>956</xloc> | |
| 2016 | + <yloc>385</yloc> | |
| 2029 | 2017 | <draw>Y</draw> |
| 2030 | 2018 | </GUI> |
| 2031 | 2019 | </step> | ... | ... |