Commit 731e2e90657d81419b0379076a66adaf2dfecb83
Merge remote-tracking branch 'origin/pudong' into pudong_test
# Conflicts: # src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController_facade.java # src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
Showing
19 changed files
with
2420 additions
and
2361 deletions
Too many changes to show.
To preserve performance only 19 of 68 files are displayed.
src/main/java/com/bsth/controller/oil/CwjyController.java
| 1 | package com.bsth.controller.oil; | 1 | package com.bsth.controller.oil; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | +import java.io.File; | ||
| 4 | import java.util.Date; | 5 | import java.util.Date; |
| 5 | import java.util.HashMap; | 6 | import java.util.HashMap; |
| 6 | import java.util.List; | 7 | import java.util.List; |
| @@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | @@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||
| 11 | import org.springframework.web.bind.annotation.RequestMethod; | 12 | import org.springframework.web.bind.annotation.RequestMethod; |
| 12 | import org.springframework.web.bind.annotation.RequestParam; | 13 | import org.springframework.web.bind.annotation.RequestParam; |
| 13 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 15 | +import org.springframework.web.multipart.MultipartFile; | ||
| 14 | 16 | ||
| 15 | import com.bsth.common.ResponseCode; | 17 | import com.bsth.common.ResponseCode; |
| 16 | import com.bsth.controller.BaseController; | 18 | import com.bsth.controller.BaseController; |
| @@ -22,6 +24,7 @@ import com.bsth.entity.sys.SysUser; | @@ -22,6 +24,7 @@ import com.bsth.entity.sys.SysUser; | ||
| 22 | import com.bsth.security.util.SecurityUtils; | 24 | import com.bsth.security.util.SecurityUtils; |
| 23 | import com.bsth.service.oil.CwjyService; | 25 | import com.bsth.service.oil.CwjyService; |
| 24 | import com.bsth.util.PageObject; | 26 | import com.bsth.util.PageObject; |
| 27 | +import com.google.common.io.Files; | ||
| 25 | 28 | ||
| 26 | @RestController | 29 | @RestController |
| 27 | @RequestMapping("cwjy") | 30 | @RequestMapping("cwjy") |
| @@ -95,4 +98,23 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ | @@ -95,4 +98,23 @@ public class CwjyController extends BaseController<Cwjy, Integer>{ | ||
| 95 | return maps; | 98 | return maps; |
| 96 | } | 99 | } |
| 97 | 100 | ||
| 101 | + /* | ||
| 102 | + * 场外加油导入 | ||
| 103 | + */ | ||
| 104 | + @RequestMapping(value = "/uploadFile",method = RequestMethod.POST) | ||
| 105 | + public String uploadFile(MultipartFile file, String gsbm_, String gsName, | ||
| 106 | + String fgsbm_, String fgsName) throws Exception{ | ||
| 107 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 108 | + File newFile = new File( | ||
| 109 | + getDataImportClasspath() + File.separator + | ||
| 110 | + file.getOriginalFilename()); | ||
| 111 | + Files.write(file.getBytes(), newFile); | ||
| 112 | + String result = service.importExcel(newFile, gsbm_, gsName); | ||
| 113 | + return "{\"result\":" + "\""+result+"\"}"; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public String getDataImportClasspath(){ | ||
| 117 | + return this.getClass().getResource("/").getPath() + "/static/pages/oil"; | ||
| 118 | + } | ||
| 119 | + | ||
| 98 | } | 120 | } |
src/main/java/com/bsth/controller/realcontrol/ReportRegisterController.java
| 1 | -package com.bsth.controller.realcontrol; | ||
| 2 | - | ||
| 3 | -import com.alibaba.fastjson.JSON; | ||
| 4 | -import com.alibaba.fastjson.JSONObject; | ||
| 5 | -import com.bsth.common.ResponseCode; | ||
| 6 | -import com.bsth.controller.BaseController; | ||
| 7 | -import com.bsth.data.report_register.ReportRegisterService; | ||
| 8 | -import com.bsth.data.report_register.entity.ReportRegister; | ||
| 9 | -import com.bsth.util.HttpClientUtils; | ||
| 10 | -import org.slf4j.Logger; | ||
| 11 | -import org.slf4j.LoggerFactory; | ||
| 12 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 13 | -import org.springframework.beans.propertyeditors.CustomDateEditor; | ||
| 14 | -import org.springframework.web.bind.WebDataBinder; | ||
| 15 | -import org.springframework.web.bind.annotation.InitBinder; | ||
| 16 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 17 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 20 | -import org.springframework.web.bind.annotation.RestController; | ||
| 21 | -import org.springframework.web.context.request.WebRequest; | ||
| 22 | - | ||
| 23 | -import java.text.DateFormat; | ||
| 24 | -import java.text.SimpleDateFormat; | ||
| 25 | -import java.util.Date; | ||
| 26 | -import java.util.HashMap; | ||
| 27 | -import java.util.Map; | ||
| 28 | - | ||
| 29 | -/** | ||
| 30 | - * 报备登记 | ||
| 31 | - * Created by yrf on 2019/12/04. | ||
| 32 | - */ | ||
| 33 | -@RestController | ||
| 34 | -@RequestMapping("reportRegister") | ||
| 35 | -public class ReportRegisterController extends BaseController<ReportRegister, Long>{ | ||
| 36 | - | ||
| 37 | - Logger log = LoggerFactory.getLogger(this.getClass()); | ||
| 38 | - | ||
| 39 | - final static String url = "http://114.80.178.13/complaint/TsReport/input.do"; | ||
| 40 | -// final static String url = "http://192.168.168.228:8080/complaint/TsReport/input.do"; | ||
| 41 | - | ||
| 42 | - @Autowired | ||
| 43 | - ReportRegisterService reportRegisterService; | ||
| 44 | - | ||
| 45 | - @InitBinder | ||
| 46 | - public void initBinder(WebDataBinder binder, WebRequest request) { | ||
| 47 | - //转换日期 注意这里的转化要和传进来的字符串的格式一直 如2015-9-9 就应该为yyyy-MM-dd | ||
| 48 | - DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 49 | - binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));// CustomDateEditor为自定义日期编辑器 | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - | ||
| 53 | - @RequestMapping(value = "/findList", method = RequestMethod.GET) | ||
| 54 | - public Map<String, Object> findList(@RequestParam Map<String, String> map) { | ||
| 55 | - return reportRegisterService.findList(map); | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - @RequestMapping(value = "/{id}", method = RequestMethod.GET) | ||
| 59 | - public ReportRegister findById(@PathVariable("id") Long id) { | ||
| 60 | - ReportRegister reportRegister = reportRegisterService.findById(id); | ||
| 61 | - return reportRegister; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - @RequestMapping(value = "/delete", method = RequestMethod.POST) | ||
| 65 | - public Map<String, Object> deleteInfo(ReportRegister t) { | ||
| 66 | - Map<String, Object> map = new HashMap<>(); | ||
| 67 | - try{ | ||
| 68 | -// map = baseService.delete(id); | ||
| 69 | - reportRegisterService.deleteInfo(t); | ||
| 70 | - String data = "{ID:'"+t.getID()+"', STATUS:'2'}"; | ||
| 71 | - StringBuilder sb = HttpClientUtils.post(url,data); | ||
| 72 | - JSONObject obj = JSON.parseObject(sb.toString()); | ||
| 73 | - map.put("status2", obj); | ||
| 74 | - } catch (Exception e) { | ||
| 75 | - log.error(e.toString(), e); | ||
| 76 | - } | ||
| 77 | - return map; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - | ||
| 81 | - @RequestMapping(method = RequestMethod.POST) | ||
| 82 | - public Map<String, Object> save(ReportRegister t) { | ||
| 83 | - Map<String, Object> map = new HashMap<>(); | ||
| 84 | - try{ | ||
| 85 | - reportRegisterService.save(t); | ||
| 86 | - map.put("status", ResponseCode.SUCCESS); | ||
| 87 | - map.put("t", t); | ||
| 88 | - StringBuilder sb = HttpClientUtils.post(url,t.toString()); | ||
| 89 | - JSONObject obj = JSON.parseObject(sb.toString()); | ||
| 90 | - map.put("status2", obj); | ||
| 91 | - } catch (Exception e) { | ||
| 92 | - log.error(e.toString(), e); | ||
| 93 | - } | ||
| 94 | - return map; | ||
| 95 | - } | ||
| 96 | -} | 1 | +package com.bsth.controller.realcontrol; |
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.common.ResponseCode; | ||
| 6 | +import com.bsth.controller.BaseController; | ||
| 7 | +import com.bsth.data.report_register.ReportRegisterService; | ||
| 8 | +import com.bsth.data.report_register.entity.ReportRegister; | ||
| 9 | +import com.bsth.util.HttpClientUtils; | ||
| 10 | +import org.slf4j.Logger; | ||
| 11 | +import org.slf4j.LoggerFactory; | ||
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 13 | +import org.springframework.beans.propertyeditors.CustomDateEditor; | ||
| 14 | +import org.springframework.web.bind.WebDataBinder; | ||
| 15 | +import org.springframework.web.bind.annotation.InitBinder; | ||
| 16 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 17 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 20 | +import org.springframework.web.bind.annotation.RestController; | ||
| 21 | +import org.springframework.web.context.request.WebRequest; | ||
| 22 | + | ||
| 23 | +import java.text.DateFormat; | ||
| 24 | +import java.text.SimpleDateFormat; | ||
| 25 | +import java.util.Date; | ||
| 26 | +import java.util.HashMap; | ||
| 27 | +import java.util.Map; | ||
| 28 | + | ||
| 29 | +/** | ||
| 30 | + * 报备登记 | ||
| 31 | + * Created by yrf on 2019/12/04. | ||
| 32 | + */ | ||
| 33 | +@RestController | ||
| 34 | +@RequestMapping("reportRegister") | ||
| 35 | +public class ReportRegisterController extends BaseController<ReportRegister, Long>{ | ||
| 36 | + | ||
| 37 | + Logger log = LoggerFactory.getLogger(this.getClass()); | ||
| 38 | + | ||
| 39 | + final static String url = "http://114.80.178.13/complaint/TsReport/input.do"; | ||
| 40 | +// final static String url = "http://192.168.168.228:8080/complaint/TsReport/input.do"; | ||
| 41 | + | ||
| 42 | + @Autowired | ||
| 43 | + ReportRegisterService reportRegisterService; | ||
| 44 | + | ||
| 45 | + @InitBinder | ||
| 46 | + public void initBinder(WebDataBinder binder, WebRequest request) { | ||
| 47 | + //转换日期 注意这里的转化要和传进来的字符串的格式一直 如2015-9-9 就应该为yyyy-MM-dd | ||
| 48 | + DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 49 | + binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));// CustomDateEditor为自定义日期编辑器 | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + | ||
| 53 | + @RequestMapping(value = "/findList", method = RequestMethod.GET) | ||
| 54 | + public Map<String, Object> findList(@RequestParam Map<String, String> map) { | ||
| 55 | + return reportRegisterService.findList(map); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + @RequestMapping(value = "/{id}", method = RequestMethod.GET) | ||
| 59 | + public ReportRegister findById(@PathVariable("id") Long id) { | ||
| 60 | + ReportRegister reportRegister = reportRegisterService.findById(id); | ||
| 61 | + return reportRegister; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + @RequestMapping(value = "/delete", method = RequestMethod.POST) | ||
| 65 | + public Map<String, Object> deleteInfo(ReportRegister t) { | ||
| 66 | + Map<String, Object> map = new HashMap<>(); | ||
| 67 | + try{ | ||
| 68 | +// map = baseService.delete(id); | ||
| 69 | + reportRegisterService.deleteInfo(t); | ||
| 70 | + String data = "{ID:'"+t.getID()+"', STATUS:'2'}"; | ||
| 71 | + StringBuilder sb = HttpClientUtils.post(url,data); | ||
| 72 | + JSONObject obj = JSON.parseObject(sb.toString()); | ||
| 73 | + map.put("status2", obj); | ||
| 74 | + } catch (Exception e) { | ||
| 75 | + log.error(e.toString(), e); | ||
| 76 | + } | ||
| 77 | + return map; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + | ||
| 81 | + @RequestMapping(method = RequestMethod.POST) | ||
| 82 | + public Map<String, Object> save(ReportRegister t) { | ||
| 83 | + Map<String, Object> map = new HashMap<>(); | ||
| 84 | + try{ | ||
| 85 | + reportRegisterService.save(t); | ||
| 86 | + map.put("status", ResponseCode.SUCCESS); | ||
| 87 | + map.put("t", t); | ||
| 88 | + StringBuilder sb = HttpClientUtils.post(url,t.toString()); | ||
| 89 | + JSONObject obj = JSON.parseObject(sb.toString()); | ||
| 90 | + map.put("status2", obj); | ||
| 91 | + } catch (Exception e) { | ||
| 92 | + log.error(e.toString(), e); | ||
| 93 | + } | ||
| 94 | + return map; | ||
| 95 | + } | ||
| 96 | +} |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| 1 | -package com.bsth.controller.realcontrol; | ||
| 2 | - | ||
| 3 | -import java.util.ArrayList; | ||
| 4 | -import java.util.Arrays; | ||
| 5 | -import java.util.Collection; | ||
| 6 | -import java.util.HashMap; | ||
| 7 | -import java.util.List; | ||
| 8 | -import java.util.Map; | ||
| 9 | - | ||
| 10 | -import org.apache.commons.lang3.StringEscapeUtils; | ||
| 11 | -import org.joda.time.format.DateTimeFormat; | ||
| 12 | -import org.joda.time.format.DateTimeFormatter; | ||
| 13 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 15 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 16 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 17 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 18 | -import org.springframework.web.bind.annotation.RestController; | ||
| 19 | - | ||
| 20 | -import com.alibaba.fastjson.JSONArray; | ||
| 21 | -import com.bsth.common.ResponseCode; | ||
| 22 | -import com.bsth.controller.BaseController; | ||
| 23 | -import com.bsth.controller.realcontrol.dto.ChangePersonCar; | ||
| 24 | -import com.bsth.controller.realcontrol.dto.DfsjChange; | ||
| 25 | -import com.bsth.data.BasicData; | ||
| 26 | -import com.bsth.data.schedule.DayOfSchedule; | ||
| 27 | -import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | ||
| 28 | -import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 29 | -import com.bsth.entity.report.RepairReport; | ||
| 30 | -import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 31 | -import com.bsth.service.realcontrol.ScheduleRealInfoService; | ||
| 32 | - | ||
| 33 | -@RestController | ||
| 34 | -@RequestMapping("/realSchedule") | ||
| 35 | -public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> { | ||
| 36 | - | ||
| 37 | - @Autowired | ||
| 38 | - ScheduleRealInfoService scheduleRealInfoService; | ||
| 39 | - | ||
| 40 | - @Autowired | ||
| 41 | - DayOfSchedule dayOfSchedule; | ||
| 42 | - | ||
| 43 | - @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST) | ||
| 44 | - public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){ | ||
| 45 | - return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm); | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - @RequestMapping(value = "/lines") | ||
| 49 | - public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) { | ||
| 50 | - return scheduleRealInfoService.findByLines(lines); | ||
| 51 | - } | ||
| 52 | - | ||
| 53 | - @RequestMapping(value = "/car") | ||
| 54 | - public List<ScheduleRealInfo> findByCar(String nbbm){ | ||
| 55 | - return dayOfSchedule.findByNbbm(nbbm); | ||
| 56 | - } | ||
| 57 | - | ||
| 58 | - /** | ||
| 59 | - * | ||
| 60 | - * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id | ||
| 61 | - * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws | ||
| 62 | - */ | ||
| 63 | - @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST) | ||
| 64 | - public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks, | ||
| 65 | - @RequestParam String dfsj,String bcType, | ||
| 66 | - @RequestParam(defaultValue = "") String opType) { | ||
| 67 | - return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null); | ||
| 68 | - } | ||
| 69 | - | ||
| 70 | - /** | ||
| 71 | - * | ||
| 72 | - * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔 | ||
| 73 | - */ | ||
| 74 | - @RequestMapping(value = "/destroy", method = RequestMethod.POST) | ||
| 75 | - public Map<String, Object> destroy(@RequestParam String idsStr | ||
| 76 | - /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/, | ||
| 77 | - @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) { | ||
| 78 | - return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null); | ||
| 79 | - } | ||
| 80 | - | ||
| 81 | - /** | ||
| 82 | - * | ||
| 83 | - * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws | ||
| 84 | - */ | ||
| 85 | - @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET) | ||
| 86 | - public Map<String, String> carDeviceMapp() { | ||
| 87 | - return BasicData.deviceId2NbbmMap.inverse(); | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - /** | ||
| 91 | - * | ||
| 92 | - * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param | ||
| 93 | - * lineId @throws | ||
| 94 | - */ | ||
| 95 | - @RequestMapping(value = "/driver", method = RequestMethod.GET) | ||
| 96 | - public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) { | ||
| 97 | - return scheduleRealInfoService.findDriverByLine(lineCode); | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - /** | ||
| 101 | - * | ||
| 102 | - * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param | ||
| 103 | - * lineId @throws | ||
| 104 | - */ | ||
| 105 | - @RequestMapping(value = "/conductor", method = RequestMethod.GET) | ||
| 106 | - public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) { | ||
| 107 | - return scheduleRealInfoService.findConductorByLine(lineCode); | ||
| 108 | - } | ||
| 109 | - | ||
| 110 | - /** | ||
| 111 | - * | ||
| 112 | - * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param | ||
| 113 | - * lineId @throws | ||
| 114 | - */ | ||
| 115 | - @RequestMapping(value = "/cars", method = RequestMethod.GET) | ||
| 116 | - public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) { | ||
| 117 | - return scheduleRealInfoService.findCarByLine(lineCode); | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | - /** | ||
| 121 | - * | ||
| 122 | - * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws | ||
| 123 | - */ | ||
| 124 | - @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET) | ||
| 125 | - public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) { | ||
| 126 | - return scheduleRealInfoService.sreachVehic(nbbm); | ||
| 127 | - } | ||
| 128 | - /** | ||
| 129 | - * | ||
| 130 | - * @Title: realOutAdjust | ||
| 131 | - * @Description: TODO(实发调整) | ||
| 132 | - * @param @param id 班次ID | ||
| 133 | - * @param @param fcsjActual 实际发车时间 HH:mm | ||
| 134 | - * @param @param remarks 备注 | ||
| 135 | - * @throws | ||
| 136 | - */ | ||
| 137 | - @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST) | ||
| 138 | - public Map<String, Object> realOutAdjust(@RequestParam Map<String, String> map) { | ||
| 139 | - return scheduleRealInfoService.realOutAdjust(map); | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - /** | ||
| 143 | - * | ||
| 144 | - * @Title: revokeDestroy | ||
| 145 | - * @Description: TODO(撤销烂班) | ||
| 146 | - * @param @param id | ||
| 147 | - * @throws | ||
| 148 | - */ | ||
| 149 | - @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST) | ||
| 150 | - public Map<String, Object> revokeDestroy(@RequestParam Long id){ | ||
| 151 | - return scheduleRealInfoService.revokeDestroy(id); | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - /** | ||
| 155 | - * | ||
| 156 | - * @Title: revokeRealOutgo | ||
| 157 | - * @Description: TODO(撤销实发) | ||
| 158 | - * @param @param id | ||
| 159 | - * @throws | ||
| 160 | - */ | ||
| 161 | - @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST) | ||
| 162 | - public Map<String, Object> revokeRealOutgo(@RequestParam Long id){ | ||
| 163 | - return scheduleRealInfoService.revokeRealOutgo(id); | ||
| 164 | - } | ||
| 165 | - | ||
| 166 | - /** | ||
| 167 | - * 撤销执行 | ||
| 168 | - * @param id | ||
| 169 | - * @return | ||
| 170 | - */ | ||
| 171 | - @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST) | ||
| 172 | - public Map<String, Object> revokeRealArrive(@RequestParam Long id){ | ||
| 173 | - return scheduleRealInfoService.revokeRealArrive(id); | ||
| 174 | - } | ||
| 175 | - | ||
| 176 | - /** | ||
| 177 | - * | ||
| 178 | - * @Title: spaceAdjust | ||
| 179 | - * @Description: TODO(间隔调整) | ||
| 180 | - * @param @param ids 要调整的班次数组ID | ||
| 181 | - * @param @param space 间隔 | ||
| 182 | - * @throws | ||
| 183 | - */ | ||
| 184 | - @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST) | ||
| 185 | - public Map<String, Object> spaceAdjust(Long[] ids, Integer space){ | ||
| 186 | - return scheduleRealInfoService.spaceAdjust(ids, space); | ||
| 187 | - } | ||
| 188 | - | ||
| 189 | - /** | ||
| 190 | - * | ||
| 191 | - * @Title: schInfoFineTune | ||
| 192 | - * @Description: TODO(发车信息微调) | ||
| 193 | - * @param @param map | ||
| 194 | - * @throws | ||
| 195 | - */ | ||
| 196 | - @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST) | ||
| 197 | - public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){ | ||
| 198 | - return scheduleRealInfoService.schInfoFineTune(map); | ||
| 199 | - } | ||
| 200 | - | ||
| 201 | - /** | ||
| 202 | - * | ||
| 203 | - * @Title: outgoAdjustAll | ||
| 204 | - * @Description: TODO(批量待发调整) | ||
| 205 | - * @param @param list | ||
| 206 | - * @throws | ||
| 207 | - */ | ||
| 208 | - @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST) | ||
| 209 | - public Map<String, Object> outgoAdjustAll(@RequestParam String params){ | ||
| 210 | - //反转义 | ||
| 211 | - params = StringEscapeUtils.unescapeHtml4(params); | ||
| 212 | - return scheduleRealInfoService.outgoAdjustAll(params); | ||
| 213 | - } | ||
| 214 | - | ||
| 215 | - /** | ||
| 216 | - * | ||
| 217 | - * @Title: findByLineAndUpDown | ||
| 218 | - * @Description: TODO(根据线路和走向获取班次) | ||
| 219 | - * @param @param line | ||
| 220 | - * @param @param upDown | ||
| 221 | - */ | ||
| 222 | - @RequestMapping(value = "/findByLineAndUpDown") | ||
| 223 | - public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){ | ||
| 224 | - return dayOfSchedule.findByLineAndUpDown(line, upDown); | ||
| 225 | - } | ||
| 226 | - | ||
| 227 | - /** | ||
| 228 | - * | ||
| 229 | - * @Title: findRouteByLine | ||
| 230 | - * @Description: TODO(获取线路的站点,路段路由) | ||
| 231 | - * @param @param lineCode | ||
| 232 | - * @throws | ||
| 233 | - */ | ||
| 234 | - @RequestMapping(value = "/findRouteByLine") | ||
| 235 | - public Map<String, Object> findRouteByLine(@RequestParam String lineCode){ | ||
| 236 | - return scheduleRealInfoService.findRouteByLine(lineCode); | ||
| 237 | - } | ||
| 238 | - | ||
| 239 | - /** | ||
| 240 | - * | ||
| 241 | - * @Title: removeChildTask | ||
| 242 | - * @Description: TODO(删除子任务) | ||
| 243 | - * @param @param taskId 子任务ID | ||
| 244 | - * @throws | ||
| 245 | - */ | ||
| 246 | - @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE) | ||
| 247 | - public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){ | ||
| 248 | - return scheduleRealInfoService.removeChildTask(taskId); | ||
| 249 | - } | ||
| 250 | - | ||
| 251 | - /** | ||
| 252 | - * | ||
| 253 | - * @Title: findByLineCode | ||
| 254 | - * @Description: TODO(根据线路获取班次信息) | ||
| 255 | - * @param @param lineCode | ||
| 256 | - */ | ||
| 257 | - @RequestMapping(value = "/lineCode/{lineCode}") | ||
| 258 | - public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){ | ||
| 259 | - return dayOfSchedule.findByLineCode(lineCode); | ||
| 260 | - } | ||
| 261 | - | ||
| 262 | - @RequestMapping(value = "/queryUserInfo") | ||
| 263 | - public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line, | ||
| 264 | - @RequestParam String date,@RequestParam String state) { | ||
| 265 | - return scheduleRealInfoService.queryUserInfo(line, date,state); | ||
| 266 | - } | ||
| 267 | - | ||
| 268 | - @RequestMapping(value = "/queryUserInfoPx") | ||
| 269 | - public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line, | ||
| 270 | - @RequestParam String date,@RequestParam String state,@RequestParam String type) { | ||
| 271 | - return scheduleRealInfoService.queryUserInfoPx(line, date,state,type); | ||
| 272 | - } | ||
| 273 | - | ||
| 274 | - @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET) | ||
| 275 | - public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName,@RequestParam String jGh, @RequestParam String clZbh, | ||
| 276 | - @RequestParam String lpName,@RequestParam String date,@RequestParam String line) { | ||
| 277 | - return scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line); | ||
| 278 | - } | ||
| 279 | - | ||
| 280 | - @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET) | ||
| 281 | - public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh | ||
| 282 | - ,@RequestParam String date,@RequestParam String line) { | ||
| 283 | - return scheduleRealInfoService.exportWaybillQp( clZbh, date,line); | ||
| 284 | - } | ||
| 285 | - | ||
| 286 | - | ||
| 287 | - @RequestMapping(value = "/dailyInfo") | ||
| 288 | - public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) { | ||
| 289 | - return scheduleRealInfoService.dailyInfo(line, date, type); | ||
| 290 | - } | ||
| 291 | - | ||
| 292 | - @RequestMapping(value = "/historyMessage") | ||
| 293 | - public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date, | ||
| 294 | - @RequestParam String code, @RequestParam String type) { | ||
| 295 | - return scheduleRealInfoService.historyMessage(line, date, code, type); | ||
| 296 | - } | ||
| 297 | - | ||
| 298 | - @RequestMapping(value="/findLine") | ||
| 299 | - public List<Map<String,String>> findLine(@RequestParam String line){ | ||
| 300 | - return scheduleRealInfoService.findLine(line); | ||
| 301 | - } | ||
| 302 | - | ||
| 303 | - @RequestMapping(value="/findKMBC",method = RequestMethod.GET) | ||
| 304 | - public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | ||
| 305 | - ,@RequestParam String date,@RequestParam String line){ | ||
| 306 | - return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line); | ||
| 307 | - } | ||
| 308 | - | ||
| 309 | - /** | ||
| 310 | - * 路单公里统计 (闵行审计专用) | ||
| 311 | - * @param jGh | ||
| 312 | - * @param clZbh | ||
| 313 | - * @param lpName | ||
| 314 | - * @param date | ||
| 315 | - * @param line | ||
| 316 | - * @return | ||
| 317 | - */ | ||
| 318 | - @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET) | ||
| 319 | - public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | ||
| 320 | - ,@RequestParam String date,@RequestParam String line){ | ||
| 321 | - return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line); | ||
| 322 | - } | ||
| 323 | - | ||
| 324 | - @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET) | ||
| 325 | - public Map<String,Object> findKMBCQp(@RequestParam String clZbh | ||
| 326 | - ,@RequestParam String date,@RequestParam String line){ | ||
| 327 | - return scheduleRealInfoService.findKMBCQp(clZbh,date,line); | ||
| 328 | - } | ||
| 329 | - | ||
| 330 | - @RequestMapping(value="/findLpName") | ||
| 331 | - public List<Map<String,String>> findLpName(@RequestParam String lpName){ | ||
| 332 | - return scheduleRealInfoService.findLpName(lpName); | ||
| 333 | - } | ||
| 334 | - | ||
| 335 | - @RequestMapping(value = "/account") | ||
| 336 | - public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date, | ||
| 337 | - @RequestParam String code,@RequestParam String xlName, @RequestParam String type) { | ||
| 338 | - return scheduleRealInfoService.account(line, date, code, xlName, type); | ||
| 339 | - } | ||
| 340 | - | ||
| 341 | - @RequestMapping(value = "/accountPx") | ||
| 342 | - public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date, | ||
| 343 | - @RequestParam String code,@RequestParam String xlName, @RequestParam String px) { | ||
| 344 | - return scheduleRealInfoService.accountPx(line, date, code, xlName, px); | ||
| 345 | - } | ||
| 346 | - | ||
| 347 | - @RequestMapping(value = "/correctForm") | ||
| 348 | - public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, | ||
| 349 | - @RequestParam String endDate, | ||
| 350 | - @RequestParam String lpName, @RequestParam String code, | ||
| 351 | - @RequestParam String type,@RequestParam String changType) { | ||
| 352 | - return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType); | ||
| 353 | - } | ||
| 354 | - /** | ||
| 355 | - * @Title queryListWaybill | ||
| 356 | - * @Description 查询行车路单列表 | ||
| 357 | - * @param jName 驾驶员名字 | ||
| 358 | - * @param clZbh 车辆自编号(内部编号) | ||
| 359 | - * @param lpName 路牌 | ||
| 360 | - * @return | ||
| 361 | - */ | ||
| 362 | - @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET) | ||
| 363 | - public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | ||
| 364 | - ,@RequestParam String date,@RequestParam String line){ | ||
| 365 | - return scheduleRealInfoService.queryListWaybill(jGh, clZbh,lpName,date,line); | ||
| 366 | - } | ||
| 367 | - | ||
| 368 | - /** | ||
| 369 | - * @Title queryListWaybill | ||
| 370 | - * @Description 查询行车路单列表(闵行审计专用路单) | ||
| 371 | - * @param jName 驾驶员名字 | ||
| 372 | - * @param clZbh 车辆自编号(内部编号) | ||
| 373 | - * @param lpName 路牌 | ||
| 374 | - * @return | ||
| 375 | - */ | ||
| 376 | - @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET) | ||
| 377 | - public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | ||
| 378 | - ,@RequestParam String date,@RequestParam String line){ | ||
| 379 | - return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line); | ||
| 380 | - } | ||
| 381 | - | ||
| 382 | - @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET) | ||
| 383 | - public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh, | ||
| 384 | - @RequestParam String date,@RequestParam String line){ | ||
| 385 | - return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line); | ||
| 386 | - } | ||
| 387 | - | ||
| 388 | - @RequestMapping(value="/statisticsDaily") | ||
| 389 | - public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date, | ||
| 390 | - @RequestParam String xlName, @RequestParam String type){ | ||
| 391 | - return scheduleRealInfoService.statisticsDaily(line, date, xlName, type); | ||
| 392 | - } | ||
| 393 | - | ||
| 394 | - @RequestMapping(value="/statisticsDaily_mh_2") | ||
| 395 | - public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date, | ||
| 396 | - @RequestParam String xlName, @RequestParam String type){ | ||
| 397 | - return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type); | ||
| 398 | - } | ||
| 399 | - | ||
| 400 | - @RequestMapping(value="/statisticsDailyTj") | ||
| 401 | - public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){ | ||
| 402 | - String gsdm=""; | ||
| 403 | - if(map.get("gsdm")!=null){ | ||
| 404 | - gsdm=map.get("gsdm").toString(); | ||
| 405 | - } | ||
| 406 | - String fgsdm=""; | ||
| 407 | - if(map.get("fgsdm")!=null){ | ||
| 408 | - fgsdm=map.get("fgsdm").toString(); | ||
| 409 | - } | ||
| 410 | - String line=""; | ||
| 411 | - if(map.get("line")!=null){ | ||
| 412 | - line=map.get("line").toString(); | ||
| 413 | - } | ||
| 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 xlName=""; | ||
| 423 | - if(map.get("xlName")!=null){ | ||
| 424 | - xlName=map.get("xlName").toString(); | ||
| 425 | - } | ||
| 426 | - String type=""; | ||
| 427 | - if(map.get("type")!=null){ | ||
| 428 | - type=map.get("type").toString(); | ||
| 429 | - } | ||
| 430 | - String nature="0"; | ||
| 431 | - if(map.get("nature")!=null){ | ||
| 432 | - nature=map.get("nature").toString(); | ||
| 433 | - } | ||
| 434 | - return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature); | ||
| 435 | - } | ||
| 436 | - | ||
| 437 | - /* | ||
| 438 | - * 公里修正报表 | ||
| 439 | - */ | ||
| 440 | - @RequestMapping(value="/mileageReportTj") | ||
| 441 | - public List<Map<String,Object>> mileageReport(@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 | - return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2); | ||
| 467 | - } | ||
| 468 | - | ||
| 469 | - /* | ||
| 470 | - * 班次修正报表 | ||
| 471 | - */ | ||
| 472 | - @RequestMapping(value="/scheduleCorrectionReport") | ||
| 473 | - public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){ | ||
| 474 | - String gsdm=""; | ||
| 475 | - if(map.get("gsdm")!=null){ | ||
| 476 | - gsdm=map.get("gsdm").toString(); | ||
| 477 | - } | ||
| 478 | - String fgsdm=""; | ||
| 479 | - if(map.get("fgsdm")!=null){ | ||
| 480 | - fgsdm=map.get("fgsdm").toString(); | ||
| 481 | - } | ||
| 482 | - String line=""; | ||
| 483 | - if(map.get("line")!=null){ | ||
| 484 | - line=map.get("line").toString(); | ||
| 485 | - } | ||
| 486 | - String date=""; | ||
| 487 | - if(map.get("date")!=null){ | ||
| 488 | - date=map.get("date").toString(); | ||
| 489 | - } | ||
| 490 | - String date2=""; | ||
| 491 | - if(map.get("date2")!=null){ | ||
| 492 | - date2=map.get("date2").toString(); | ||
| 493 | - } | ||
| 494 | - String xlName=""; | ||
| 495 | - if(map.get("xlName")!=null){ | ||
| 496 | - xlName=map.get("xlName").toString(); | ||
| 497 | - } | ||
| 498 | - return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2); | ||
| 499 | - } | ||
| 500 | - | ||
| 501 | - @RequestMapping(value="/MapById",method = RequestMethod.GET) | ||
| 502 | - public Map<String, Object> MapById(@RequestParam("id") Long id){ | ||
| 503 | - return scheduleRealInfoService.MapById(id); | ||
| 504 | - } | ||
| 505 | - | ||
| 506 | - @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET) | ||
| 507 | - public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){ | ||
| 508 | - return scheduleRealInfoService.MapByIdQp(id); | ||
| 509 | - } | ||
| 510 | - | ||
| 511 | - /** | ||
| 512 | - * @Title: scheduleDaily | ||
| 513 | - * @Description: TODO(调度日报表) | ||
| 514 | - * @param line 线路 | ||
| 515 | - * @param date 时间 | ||
| 516 | - * @return | ||
| 517 | - */ | ||
| 518 | - @RequestMapping(value="/scheduleDaily") | ||
| 519 | - public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){ | ||
| 520 | - return scheduleRealInfoService.scheduleDaily(line,date); | ||
| 521 | - } | ||
| 522 | - | ||
| 523 | - @RequestMapping(value="/realScheduleList") | ||
| 524 | - public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){ | ||
| 525 | - return scheduleRealInfoService.realScheduleList(line,date); | ||
| 526 | - } | ||
| 527 | - | ||
| 528 | - @RequestMapping(value="/realScheduleList_zrw") | ||
| 529 | - public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){ | ||
| 530 | - return scheduleRealInfoService.realScheduleList_zrw(line,date); | ||
| 531 | - } | ||
| 532 | - | ||
| 533 | - @RequestMapping(value="/realScheduleList_mh_2") | ||
| 534 | - public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){ | ||
| 535 | - return scheduleRealInfoService.realScheduleList_mh_2(line,date); | ||
| 536 | - } | ||
| 537 | - | ||
| 538 | - @RequestMapping(value="/realScheduleListQp") | ||
| 539 | - public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){ | ||
| 540 | - return scheduleRealInfoService.realScheduleListQp(line,date); | ||
| 541 | - } | ||
| 542 | - | ||
| 543 | - @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST) | ||
| 544 | - public Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){ | ||
| 545 | - cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson); | ||
| 546 | - List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class); | ||
| 547 | - return scheduleRealInfoService.multi_tzrc(cpcs, null); | ||
| 548 | - } | ||
| 549 | - | ||
| 550 | - @RequestMapping(value="/multi_dftz", method=RequestMethod.POST) | ||
| 551 | - public Map<String, Object> multi_dftz(@RequestParam String dcsJson){ | ||
| 552 | - dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson); | ||
| 553 | - List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class); | ||
| 554 | - return scheduleRealInfoService.multi_dftz(dfsjcs); | ||
| 555 | - } | ||
| 556 | - | ||
| 557 | - @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST) | ||
| 558 | - public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){ | ||
| 559 | - return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName); | ||
| 560 | - } | ||
| 561 | - | ||
| 562 | - @RequestMapping(value="/history", method=RequestMethod.POST) | ||
| 563 | - public Map<String,Object> historySave(ScheduleRealInfo sch){ | ||
| 564 | - return scheduleRealInfoService.historySave(sch); | ||
| 565 | - } | ||
| 566 | - | ||
| 567 | - | ||
| 568 | - private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | ||
| 569 | - private final static long ONE_DAY = 1000 * 60 * 60 * 24; | ||
| 570 | - /** | ||
| 571 | - * 获取可编辑的历史班次日期 | ||
| 572 | - * @return | ||
| 573 | - */ | ||
| 574 | - @RequestMapping("dateArray") | ||
| 575 | - public List<String> dateArray(@RequestParam(defaultValue = "0") int c){ | ||
| 576 | - List<String> rs = new ArrayList<>(); | ||
| 577 | - | ||
| 578 | - long t = System.currentTimeMillis(); | ||
| 579 | - if(c != 1) | ||
| 580 | - t -= (ONE_DAY + (1000 * 60 * 60 * 6)); | ||
| 581 | - for(int i = 0; i < 3; i ++){ | ||
| 582 | - rs.add(fmtyyyyMMdd.print(t)); | ||
| 583 | - t -= ONE_DAY; | ||
| 584 | - } | ||
| 585 | - return rs; | ||
| 586 | - } | ||
| 587 | - | ||
| 588 | - @RequestMapping(value = "svgAttr", method = RequestMethod.POST) | ||
| 589 | - public Map<String, Object> svgAttr(@RequestParam String jsonStr){ | ||
| 590 | - return scheduleRealInfoService.svgAttr(jsonStr); | ||
| 591 | - } | ||
| 592 | - | ||
| 593 | - @RequestMapping(value = "svgAttr", method = RequestMethod.GET) | ||
| 594 | - public Map<String, Object> findSvgAttr(@RequestParam String idx){ | ||
| 595 | - return scheduleRealInfoService.findSvgAttr(idx); | ||
| 596 | - } | ||
| 597 | - | ||
| 598 | - @RequestMapping(value = "addRemarks", method = RequestMethod.POST) | ||
| 599 | - public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){ | ||
| 600 | - return scheduleRealInfoService.addRemarks(id, remarks); | ||
| 601 | - } | ||
| 602 | - | ||
| 603 | - @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET) | ||
| 604 | - public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){ | ||
| 605 | - return scheduleRealInfoService.scheduleDailyQp(line,date); | ||
| 606 | - } | ||
| 607 | - | ||
| 608 | - @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET) | ||
| 609 | - public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){ | ||
| 610 | - return scheduleRealInfoService.scheduleDailyExport(map); | ||
| 611 | - } | ||
| 612 | - | ||
| 613 | - @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET) | ||
| 614 | - public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){ | ||
| 615 | - return scheduleRealInfoService.exportWaybillMore(map); | ||
| 616 | - } | ||
| 617 | - | ||
| 618 | - /** | ||
| 619 | - * 获取当日计划排班 , 从计划表抓取数据 | ||
| 620 | - * @return | ||
| 621 | - */ | ||
| 622 | - @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET) | ||
| 623 | - public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){ | ||
| 624 | - return scheduleRealInfoService.currentSchedulePlan(lineCode); | ||
| 625 | - } | ||
| 626 | - | ||
| 627 | - @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST) | ||
| 628 | - public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){ | ||
| 629 | - return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type); | ||
| 630 | - } | ||
| 631 | - | ||
| 632 | - /** | ||
| 633 | - * 删除当日实际排班 | ||
| 634 | - * @return | ||
| 635 | - */ | ||
| 636 | - @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST) | ||
| 637 | - public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){ | ||
| 638 | - return dayOfSchedule.deleteRealSchedule(lineCode); | ||
| 639 | - } | ||
| 640 | - | ||
| 641 | - /** | ||
| 642 | - * 从计划表重新加载当日排班 | ||
| 643 | - * @param lineCode | ||
| 644 | - * @return | ||
| 645 | - */ | ||
| 646 | - @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST) | ||
| 647 | - public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){ | ||
| 648 | - Map<String, Object> rs = new HashMap<>(); | ||
| 649 | - List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode); | ||
| 650 | - if(list != null && list.size() > 0){ | ||
| 651 | - rs.put("status", ResponseCode.ERROR); | ||
| 652 | - rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。"); | ||
| 653 | - return rs; | ||
| 654 | - } | ||
| 655 | - | ||
| 656 | - int code = dayOfSchedule.reloadSch(lineCode); | ||
| 657 | - | ||
| 658 | - //重新按公司编码索引数据 | ||
| 659 | - dayOfSchedule.groupByGsbm(); | ||
| 660 | - rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR); | ||
| 661 | - return rs; | ||
| 662 | - } | ||
| 663 | - | ||
| 664 | - /** | ||
| 665 | - * 误点调整 | ||
| 666 | - * @param idx | ||
| 667 | - * @param minute | ||
| 668 | - * @return | ||
| 669 | - */ | ||
| 670 | - @RequestMapping(value = "lateAdjust", method = RequestMethod.POST) | ||
| 671 | - public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){ | ||
| 672 | - return scheduleRealInfoService.lateAdjust(idx, minute); | ||
| 673 | - } | ||
| 674 | - | ||
| 675 | - /** | ||
| 676 | - * 获取所有应发未到的班次 | ||
| 677 | - * @param idx | ||
| 678 | - * @return | ||
| 679 | - */ | ||
| 680 | - @RequestMapping(value = "allLate2") | ||
| 681 | - public List<ScheduleRealInfo> allLate2(@RequestParam String idx){ | ||
| 682 | - return scheduleRealInfoService.allLate2(idx); | ||
| 683 | - } | ||
| 684 | - | ||
| 685 | - /** | ||
| 686 | - * 添加一个临加到历史库 | ||
| 687 | - * @param sch | ||
| 688 | - * @return | ||
| 689 | - */ | ||
| 690 | - @RequestMapping(value = "history/add", method = RequestMethod.POST) | ||
| 691 | - public Map<String, Object> addToHistory(ScheduleRealInfo sch){ | ||
| 692 | - return scheduleRealInfoService.addToHistory(sch); | ||
| 693 | - } | ||
| 694 | - | ||
| 695 | - /** | ||
| 696 | - * 从历史库里删除临加班次 | ||
| 697 | - * @param sch | ||
| 698 | - * @return | ||
| 699 | - */ | ||
| 700 | - @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE) | ||
| 701 | - public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){ | ||
| 702 | - return scheduleRealInfoService.deleteToHistory(id); | ||
| 703 | - } | ||
| 704 | - | ||
| 705 | - @RequestMapping(value = "isCircleQdz", method = RequestMethod.POST) | ||
| 706 | - public Map<String, Object> isCircleQdz(@RequestParam String line, String nbbm, String ts, String qdzCode){ | ||
| 707 | - Map<String, Object> map =new HashMap<>(); | ||
| 708 | - map.put("isExist",scheduleRealInfoService.isCircleQdz(nbbm, ts, line, qdzCode)); | ||
| 709 | - return map; | ||
| 710 | - } | ||
| 711 | - | ||
| 712 | - /** | ||
| 713 | - * 从历史库里删除临加班次 | ||
| 714 | - * @param sch | ||
| 715 | - * @return | ||
| 716 | - */ | ||
| 717 | - @RequestMapping(value = "wxsb", method = RequestMethod.POST) | ||
| 718 | - public Map<String, Object> repairReport(@RequestParam Map<String, Object> param){ | ||
| 719 | - return scheduleRealInfoService.repairReport(param, true); | ||
| 720 | - } | ||
| 721 | - | ||
| 722 | - @RequestMapping(value = "wxsb", method = RequestMethod.GET) | ||
| 723 | - public List<RepairReport> repairReportList(@RequestParam String line, @RequestParam String date, @RequestParam String code, @RequestParam String type){ | ||
| 724 | - return scheduleRealInfoService.repairReportList(line, date, code, type); | ||
| 725 | - } | ||
| 726 | - | ||
| 727 | - @RequestMapping(value = "lineLevel", method = RequestMethod.GET) | ||
| 728 | - public Map<String, String> lineLevel(@RequestParam String idx){ | ||
| 729 | - return scheduleRealInfoService.getLevelsByLines(Arrays.asList(idx.split(","))); | ||
| 730 | - } | ||
| 731 | -} | 1 | +package com.bsth.controller.realcontrol; |
| 2 | + | ||
| 3 | +import java.util.ArrayList; | ||
| 4 | +import java.util.Arrays; | ||
| 5 | +import java.util.Collection; | ||
| 6 | +import java.util.HashMap; | ||
| 7 | +import java.util.List; | ||
| 8 | +import java.util.Map; | ||
| 9 | + | ||
| 10 | +import org.apache.commons.lang3.StringEscapeUtils; | ||
| 11 | +import org.joda.time.format.DateTimeFormat; | ||
| 12 | +import org.joda.time.format.DateTimeFormatter; | ||
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 14 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 15 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 16 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 17 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 18 | +import org.springframework.web.bind.annotation.RestController; | ||
| 19 | + | ||
| 20 | +import com.alibaba.fastjson.JSONArray; | ||
| 21 | +import com.bsth.common.ResponseCode; | ||
| 22 | +import com.bsth.controller.BaseController; | ||
| 23 | +import com.bsth.controller.realcontrol.dto.ChangePersonCar; | ||
| 24 | +import com.bsth.controller.realcontrol.dto.DfsjChange; | ||
| 25 | +import com.bsth.data.BasicData; | ||
| 26 | +import com.bsth.data.schedule.DayOfSchedule; | ||
| 27 | +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | ||
| 28 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | ||
| 29 | +import com.bsth.entity.report.RepairReport; | ||
| 30 | +import com.bsth.entity.schedule.SchedulePlanInfo; | ||
| 31 | +import com.bsth.service.realcontrol.ScheduleRealInfoService; | ||
| 32 | + | ||
| 33 | +@RestController | ||
| 34 | +@RequestMapping("/realSchedule") | ||
| 35 | +public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> { | ||
| 36 | + | ||
| 37 | + @Autowired | ||
| 38 | + ScheduleRealInfoService scheduleRealInfoService; | ||
| 39 | + | ||
| 40 | + @Autowired | ||
| 41 | + DayOfSchedule dayOfSchedule; | ||
| 42 | + | ||
| 43 | + @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST) | ||
| 44 | + public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){ | ||
| 45 | + return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + @RequestMapping(value = "/lines") | ||
| 49 | + public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) { | ||
| 50 | + return scheduleRealInfoService.findByLines(lines); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @RequestMapping(value = "/car") | ||
| 54 | + public List<ScheduleRealInfo> findByCar(String nbbm){ | ||
| 55 | + return dayOfSchedule.findByNbbm(nbbm); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + /** | ||
| 59 | + * | ||
| 60 | + * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id | ||
| 61 | + * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws | ||
| 62 | + */ | ||
| 63 | + @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST) | ||
| 64 | + public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks, | ||
| 65 | + @RequestParam String dfsj,String bcType, | ||
| 66 | + @RequestParam(defaultValue = "") String opType) { | ||
| 67 | + return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null); | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + /** | ||
| 71 | + * | ||
| 72 | + * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔 | ||
| 73 | + */ | ||
| 74 | + @RequestMapping(value = "/destroy", method = RequestMethod.POST) | ||
| 75 | + public Map<String, Object> destroy(@RequestParam String idsStr | ||
| 76 | + /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/, | ||
| 77 | + @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) { | ||
| 78 | + return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null); | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + /** | ||
| 82 | + * | ||
| 83 | + * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws | ||
| 84 | + */ | ||
| 85 | + @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET) | ||
| 86 | + public Map<String, String> carDeviceMapp() { | ||
| 87 | + return BasicData.deviceId2NbbmMap.inverse(); | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + /** | ||
| 91 | + * | ||
| 92 | + * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param | ||
| 93 | + * lineId @throws | ||
| 94 | + */ | ||
| 95 | + @RequestMapping(value = "/driver", method = RequestMethod.GET) | ||
| 96 | + public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) { | ||
| 97 | + return scheduleRealInfoService.findDriverByLine(lineCode); | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + /** | ||
| 101 | + * | ||
| 102 | + * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param | ||
| 103 | + * lineId @throws | ||
| 104 | + */ | ||
| 105 | + @RequestMapping(value = "/conductor", method = RequestMethod.GET) | ||
| 106 | + public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) { | ||
| 107 | + return scheduleRealInfoService.findConductorByLine(lineCode); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + /** | ||
| 111 | + * | ||
| 112 | + * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param | ||
| 113 | + * lineId @throws | ||
| 114 | + */ | ||
| 115 | + @RequestMapping(value = "/cars", method = RequestMethod.GET) | ||
| 116 | + public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) { | ||
| 117 | + return scheduleRealInfoService.findCarByLine(lineCode); | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + /** | ||
| 121 | + * | ||
| 122 | + * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws | ||
| 123 | + */ | ||
| 124 | + @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET) | ||
| 125 | + public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) { | ||
| 126 | + return scheduleRealInfoService.sreachVehic(nbbm); | ||
| 127 | + } | ||
| 128 | + /** | ||
| 129 | + * | ||
| 130 | + * @Title: realOutAdjust | ||
| 131 | + * @Description: TODO(实发调整) | ||
| 132 | + * @param @param id 班次ID | ||
| 133 | + * @param @param fcsjActual 实际发车时间 HH:mm | ||
| 134 | + * @param @param remarks 备注 | ||
| 135 | + * @throws | ||
| 136 | + */ | ||
| 137 | + @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST) | ||
| 138 | + public Map<String, Object> realOutAdjust(@RequestParam Map<String, String> map) { | ||
| 139 | + return scheduleRealInfoService.realOutAdjust(map); | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + /** | ||
| 143 | + * | ||
| 144 | + * @Title: revokeDestroy | ||
| 145 | + * @Description: TODO(撤销烂班) | ||
| 146 | + * @param @param id | ||
| 147 | + * @throws | ||
| 148 | + */ | ||
| 149 | + @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST) | ||
| 150 | + public Map<String, Object> revokeDestroy(@RequestParam Long id){ | ||
| 151 | + return scheduleRealInfoService.revokeDestroy(id); | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + /** | ||
| 155 | + * | ||
| 156 | + * @Title: revokeRealOutgo | ||
| 157 | + * @Description: TODO(撤销实发) | ||
| 158 | + * @param @param id | ||
| 159 | + * @throws | ||
| 160 | + */ | ||
| 161 | + @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST) | ||
| 162 | + public Map<String, Object> revokeRealOutgo(@RequestParam Long id){ | ||
| 163 | + return scheduleRealInfoService.revokeRealOutgo(id); | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | + /** | ||
| 167 | + * 撤销执行 | ||
| 168 | + * @param id | ||
| 169 | + * @return | ||
| 170 | + */ | ||
| 171 | + @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST) | ||
| 172 | + public Map<String, Object> revokeRealArrive(@RequestParam Long id){ | ||
| 173 | + return scheduleRealInfoService.revokeRealArrive(id); | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + /** | ||
| 177 | + * | ||
| 178 | + * @Title: spaceAdjust | ||
| 179 | + * @Description: TODO(间隔调整) | ||
| 180 | + * @param @param ids 要调整的班次数组ID | ||
| 181 | + * @param @param space 间隔 | ||
| 182 | + * @throws | ||
| 183 | + */ | ||
| 184 | + @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST) | ||
| 185 | + public Map<String, Object> spaceAdjust(Long[] ids, Integer space){ | ||
| 186 | + return scheduleRealInfoService.spaceAdjust(ids, space); | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + /** | ||
| 190 | + * | ||
| 191 | + * @Title: schInfoFineTune | ||
| 192 | + * @Description: TODO(发车信息微调) | ||
| 193 | + * @param @param map | ||
| 194 | + * @throws | ||
| 195 | + */ | ||
| 196 | + @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST) | ||
| 197 | + public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){ | ||
| 198 | + return scheduleRealInfoService.schInfoFineTune(map); | ||
| 199 | + } | ||
| 200 | + | ||
| 201 | + /** | ||
| 202 | + * | ||
| 203 | + * @Title: outgoAdjustAll | ||
| 204 | + * @Description: TODO(批量待发调整) | ||
| 205 | + * @param @param list | ||
| 206 | + * @throws | ||
| 207 | + */ | ||
| 208 | + @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST) | ||
| 209 | + public Map<String, Object> outgoAdjustAll(@RequestParam String params){ | ||
| 210 | + //反转义 | ||
| 211 | + params = StringEscapeUtils.unescapeHtml4(params); | ||
| 212 | + return scheduleRealInfoService.outgoAdjustAll(params); | ||
| 213 | + } | ||
| 214 | + | ||
| 215 | + /** | ||
| 216 | + * | ||
| 217 | + * @Title: findByLineAndUpDown | ||
| 218 | + * @Description: TODO(根据线路和走向获取班次) | ||
| 219 | + * @param @param line | ||
| 220 | + * @param @param upDown | ||
| 221 | + */ | ||
| 222 | + @RequestMapping(value = "/findByLineAndUpDown") | ||
| 223 | + public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){ | ||
| 224 | + return dayOfSchedule.findByLineAndUpDown(line, upDown); | ||
| 225 | + } | ||
| 226 | + | ||
| 227 | + /** | ||
| 228 | + * | ||
| 229 | + * @Title: findRouteByLine | ||
| 230 | + * @Description: TODO(获取线路的站点,路段路由) | ||
| 231 | + * @param @param lineCode | ||
| 232 | + * @throws | ||
| 233 | + */ | ||
| 234 | + @RequestMapping(value = "/findRouteByLine") | ||
| 235 | + public Map<String, Object> findRouteByLine(@RequestParam String lineCode){ | ||
| 236 | + return scheduleRealInfoService.findRouteByLine(lineCode); | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + /** | ||
| 240 | + * | ||
| 241 | + * @Title: removeChildTask | ||
| 242 | + * @Description: TODO(删除子任务) | ||
| 243 | + * @param @param taskId 子任务ID | ||
| 244 | + * @throws | ||
| 245 | + */ | ||
| 246 | + @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE) | ||
| 247 | + public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){ | ||
| 248 | + return scheduleRealInfoService.removeChildTask(taskId); | ||
| 249 | + } | ||
| 250 | + | ||
| 251 | + /** | ||
| 252 | + * | ||
| 253 | + * @Title: findByLineCode | ||
| 254 | + * @Description: TODO(根据线路获取班次信息) | ||
| 255 | + * @param @param lineCode | ||
| 256 | + */ | ||
| 257 | + @RequestMapping(value = "/lineCode/{lineCode}") | ||
| 258 | + public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){ | ||
| 259 | + return dayOfSchedule.findByLineCode(lineCode); | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + @RequestMapping(value = "/queryUserInfo") | ||
| 263 | + public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line, | ||
| 264 | + @RequestParam String date,@RequestParam String state) { | ||
| 265 | + return scheduleRealInfoService.queryUserInfo(line, date,state); | ||
| 266 | + } | ||
| 267 | + | ||
| 268 | + @RequestMapping(value = "/queryUserInfoPx") | ||
| 269 | + public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line, | ||
| 270 | + @RequestParam String date,@RequestParam String state,@RequestParam String type) { | ||
| 271 | + return scheduleRealInfoService.queryUserInfoPx(line, date,state,type); | ||
| 272 | + } | ||
| 273 | + | ||
| 274 | + @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET) | ||
| 275 | + public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName,@RequestParam String jGh, @RequestParam String clZbh, | ||
| 276 | + @RequestParam String lpName,@RequestParam String date,@RequestParam String line) { | ||
| 277 | + return scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line); | ||
| 278 | + } | ||
| 279 | + | ||
| 280 | + @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET) | ||
| 281 | + public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh | ||
| 282 | + ,@RequestParam String date,@RequestParam String line) { | ||
| 283 | + return scheduleRealInfoService.exportWaybillQp( clZbh, date,line); | ||
| 284 | + } | ||
| 285 | + | ||
| 286 | + | ||
| 287 | + @RequestMapping(value = "/dailyInfo") | ||
| 288 | + public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) { | ||
| 289 | + return scheduleRealInfoService.dailyInfo(line, date, type); | ||
| 290 | + } | ||
| 291 | + | ||
| 292 | + @RequestMapping(value = "/historyMessage") | ||
| 293 | + public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date, | ||
| 294 | + @RequestParam String code, @RequestParam String type) { | ||
| 295 | + return scheduleRealInfoService.historyMessage(line, date, code, type); | ||
| 296 | + } | ||
| 297 | + | ||
| 298 | + @RequestMapping(value="/findLine") | ||
| 299 | + public List<Map<String,String>> findLine(@RequestParam String line){ | ||
| 300 | + return scheduleRealInfoService.findLine(line); | ||
| 301 | + } | ||
| 302 | + | ||
| 303 | + @RequestMapping(value="/findKMBC",method = RequestMethod.GET) | ||
| 304 | + public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | ||
| 305 | + ,@RequestParam String date,@RequestParam String line){ | ||
| 306 | + return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line); | ||
| 307 | + } | ||
| 308 | + | ||
| 309 | + /** | ||
| 310 | + * 路单公里统计 (闵行审计专用) | ||
| 311 | + * @param jGh | ||
| 312 | + * @param clZbh | ||
| 313 | + * @param lpName | ||
| 314 | + * @param date | ||
| 315 | + * @param line | ||
| 316 | + * @return | ||
| 317 | + */ | ||
| 318 | + @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET) | ||
| 319 | + public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | ||
| 320 | + ,@RequestParam String date,@RequestParam String line){ | ||
| 321 | + return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line); | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | + @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET) | ||
| 325 | + public Map<String,Object> findKMBCQp(@RequestParam String clZbh | ||
| 326 | + ,@RequestParam String date,@RequestParam String line){ | ||
| 327 | + return scheduleRealInfoService.findKMBCQp(clZbh,date,line); | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + @RequestMapping(value="/findLpName") | ||
| 331 | + public List<Map<String,String>> findLpName(@RequestParam String lpName){ | ||
| 332 | + return scheduleRealInfoService.findLpName(lpName); | ||
| 333 | + } | ||
| 334 | + | ||
| 335 | + @RequestMapping(value = "/account") | ||
| 336 | + public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date, | ||
| 337 | + @RequestParam String code,@RequestParam String xlName, @RequestParam String type) { | ||
| 338 | + return scheduleRealInfoService.account(line, date, code, xlName, type); | ||
| 339 | + } | ||
| 340 | + | ||
| 341 | + @RequestMapping(value = "/accountPx") | ||
| 342 | + public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date, | ||
| 343 | + @RequestParam String code,@RequestParam String xlName, @RequestParam String px) { | ||
| 344 | + return scheduleRealInfoService.accountPx(line, date, code, xlName, px); | ||
| 345 | + } | ||
| 346 | + | ||
| 347 | + @RequestMapping(value = "/correctForm") | ||
| 348 | + public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, | ||
| 349 | + @RequestParam String endDate, | ||
| 350 | + @RequestParam String lpName, @RequestParam String code, | ||
| 351 | + @RequestParam String type,@RequestParam String changType) { | ||
| 352 | + return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType); | ||
| 353 | + } | ||
| 354 | + /** | ||
| 355 | + * @Title queryListWaybill | ||
| 356 | + * @Description 查询行车路单列表 | ||
| 357 | + * @param jName 驾驶员名字 | ||
| 358 | + * @param clZbh 车辆自编号(内部编号) | ||
| 359 | + * @param lpName 路牌 | ||
| 360 | + * @return | ||
| 361 | + */ | ||
| 362 | + @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET) | ||
| 363 | + public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName | ||
| 364 | + ,@RequestParam String date,@RequestParam String line){ | ||
| 365 | + return scheduleRealInfoService.queryListWaybill(jGh, clZbh,lpName,date,line); | ||
| 366 | + } | ||
| 367 | + | ||
| 368 | + /** | ||
| 369 | + * @Title queryListWaybill | ||
| 370 | + * @Description 查询行车路单列表(闵行审计专用路单) | ||
| 371 | + * @param jName 驾驶员名字 | ||
| 372 | + * @param clZbh 车辆自编号(内部编号) | ||
| 373 | + * @param lpName 路牌 | ||
| 374 | + * @return | ||
| 375 | + */ | ||
| 376 | + @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET) | ||
| 377 | + public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName | ||
| 378 | + ,@RequestParam String date,@RequestParam String line){ | ||
| 379 | + return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line); | ||
| 380 | + } | ||
| 381 | + | ||
| 382 | + @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET) | ||
| 383 | + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh, | ||
| 384 | + @RequestParam String date,@RequestParam String line){ | ||
| 385 | + return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line); | ||
| 386 | + } | ||
| 387 | + | ||
| 388 | + @RequestMapping(value="/statisticsDaily") | ||
| 389 | + public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date, | ||
| 390 | + @RequestParam String xlName, @RequestParam String type){ | ||
| 391 | + return scheduleRealInfoService.statisticsDaily(line, date, xlName, type); | ||
| 392 | + } | ||
| 393 | + | ||
| 394 | + @RequestMapping(value="/statisticsDaily_mh_2") | ||
| 395 | + public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date, | ||
| 396 | + @RequestParam String xlName, @RequestParam String type){ | ||
| 397 | + return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type); | ||
| 398 | + } | ||
| 399 | + | ||
| 400 | + @RequestMapping(value="/statisticsDailyTj") | ||
| 401 | + public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){ | ||
| 402 | + String gsdm=""; | ||
| 403 | + if(map.get("gsdm")!=null){ | ||
| 404 | + gsdm=map.get("gsdm").toString(); | ||
| 405 | + } | ||
| 406 | + String fgsdm=""; | ||
| 407 | + if(map.get("fgsdm")!=null){ | ||
| 408 | + fgsdm=map.get("fgsdm").toString(); | ||
| 409 | + } | ||
| 410 | + String line=""; | ||
| 411 | + if(map.get("line")!=null){ | ||
| 412 | + line=map.get("line").toString(); | ||
| 413 | + } | ||
| 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 xlName=""; | ||
| 423 | + if(map.get("xlName")!=null){ | ||
| 424 | + xlName=map.get("xlName").toString(); | ||
| 425 | + } | ||
| 426 | + String type=""; | ||
| 427 | + if(map.get("type")!=null){ | ||
| 428 | + type=map.get("type").toString(); | ||
| 429 | + } | ||
| 430 | + String nature="0"; | ||
| 431 | + if(map.get("nature")!=null){ | ||
| 432 | + nature=map.get("nature").toString(); | ||
| 433 | + } | ||
| 434 | + return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature); | ||
| 435 | + } | ||
| 436 | + | ||
| 437 | + /* | ||
| 438 | + * 公里修正报表 | ||
| 439 | + */ | ||
| 440 | + @RequestMapping(value="/mileageReportTj") | ||
| 441 | + public List<Map<String,Object>> mileageReport(@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 | + return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2); | ||
| 467 | + } | ||
| 468 | + | ||
| 469 | + /* | ||
| 470 | + * 班次修正报表 | ||
| 471 | + */ | ||
| 472 | + @RequestMapping(value="/scheduleCorrectionReport") | ||
| 473 | + public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){ | ||
| 474 | + String gsdm=""; | ||
| 475 | + if(map.get("gsdm")!=null){ | ||
| 476 | + gsdm=map.get("gsdm").toString(); | ||
| 477 | + } | ||
| 478 | + String fgsdm=""; | ||
| 479 | + if(map.get("fgsdm")!=null){ | ||
| 480 | + fgsdm=map.get("fgsdm").toString(); | ||
| 481 | + } | ||
| 482 | + String line=""; | ||
| 483 | + if(map.get("line")!=null){ | ||
| 484 | + line=map.get("line").toString(); | ||
| 485 | + } | ||
| 486 | + String date=""; | ||
| 487 | + if(map.get("date")!=null){ | ||
| 488 | + date=map.get("date").toString(); | ||
| 489 | + } | ||
| 490 | + String date2=""; | ||
| 491 | + if(map.get("date2")!=null){ | ||
| 492 | + date2=map.get("date2").toString(); | ||
| 493 | + } | ||
| 494 | + String xlName=""; | ||
| 495 | + if(map.get("xlName")!=null){ | ||
| 496 | + xlName=map.get("xlName").toString(); | ||
| 497 | + } | ||
| 498 | + return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2); | ||
| 499 | + } | ||
| 500 | + | ||
| 501 | + @RequestMapping(value="/MapById",method = RequestMethod.GET) | ||
| 502 | + public Map<String, Object> MapById(@RequestParam("id") Long id){ | ||
| 503 | + return scheduleRealInfoService.MapById(id); | ||
| 504 | + } | ||
| 505 | + | ||
| 506 | + @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET) | ||
| 507 | + public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){ | ||
| 508 | + return scheduleRealInfoService.MapByIdQp(id); | ||
| 509 | + } | ||
| 510 | + | ||
| 511 | + /** | ||
| 512 | + * @Title: scheduleDaily | ||
| 513 | + * @Description: TODO(调度日报表) | ||
| 514 | + * @param line 线路 | ||
| 515 | + * @param date 时间 | ||
| 516 | + * @return | ||
| 517 | + */ | ||
| 518 | + @RequestMapping(value="/scheduleDaily") | ||
| 519 | + public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){ | ||
| 520 | + return scheduleRealInfoService.scheduleDaily(line,date); | ||
| 521 | + } | ||
| 522 | + | ||
| 523 | + @RequestMapping(value="/realScheduleList") | ||
| 524 | + public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){ | ||
| 525 | + return scheduleRealInfoService.realScheduleList(line,date); | ||
| 526 | + } | ||
| 527 | + | ||
| 528 | + @RequestMapping(value="/realScheduleList_zrw") | ||
| 529 | + public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){ | ||
| 530 | + return scheduleRealInfoService.realScheduleList_zrw(line,date); | ||
| 531 | + } | ||
| 532 | + | ||
| 533 | + @RequestMapping(value="/realScheduleList_mh_2") | ||
| 534 | + public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){ | ||
| 535 | + return scheduleRealInfoService.realScheduleList_mh_2(line,date); | ||
| 536 | + } | ||
| 537 | + | ||
| 538 | + @RequestMapping(value="/realScheduleListQp") | ||
| 539 | + public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){ | ||
| 540 | + return scheduleRealInfoService.realScheduleListQp(line,date); | ||
| 541 | + } | ||
| 542 | + | ||
| 543 | + @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST) | ||
| 544 | + public synchronized Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){ | ||
| 545 | + cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson); | ||
| 546 | + List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class); | ||
| 547 | + return scheduleRealInfoService.multi_tzrc(cpcs, null); | ||
| 548 | + } | ||
| 549 | + | ||
| 550 | + @RequestMapping(value="/multi_dftz", method=RequestMethod.POST) | ||
| 551 | + public Map<String, Object> multi_dftz(@RequestParam String dcsJson){ | ||
| 552 | + dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson); | ||
| 553 | + List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class); | ||
| 554 | + return scheduleRealInfoService.multi_dftz(dfsjcs); | ||
| 555 | + } | ||
| 556 | + | ||
| 557 | + @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST) | ||
| 558 | + public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){ | ||
| 559 | + return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName); | ||
| 560 | + } | ||
| 561 | + | ||
| 562 | + @RequestMapping(value="/history", method=RequestMethod.POST) | ||
| 563 | + public Map<String,Object> historySave(ScheduleRealInfo sch){ | ||
| 564 | + return scheduleRealInfoService.historySave(sch); | ||
| 565 | + } | ||
| 566 | + | ||
| 567 | + | ||
| 568 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | ||
| 569 | + private final static long ONE_DAY = 1000 * 60 * 60 * 24; | ||
| 570 | + /** | ||
| 571 | + * 获取可编辑的历史班次日期 | ||
| 572 | + * @return | ||
| 573 | + */ | ||
| 574 | + @RequestMapping("dateArray") | ||
| 575 | + public List<String> dateArray(@RequestParam(defaultValue = "0") int c){ | ||
| 576 | + List<String> rs = new ArrayList<>(); | ||
| 577 | + | ||
| 578 | + long t = System.currentTimeMillis(); | ||
| 579 | + if(c != 1) | ||
| 580 | + t -= (ONE_DAY + (1000 * 60 * 60 * 6)); | ||
| 581 | + for(int i = 0; i < 3; i ++){ | ||
| 582 | + rs.add(fmtyyyyMMdd.print(t)); | ||
| 583 | + t -= ONE_DAY; | ||
| 584 | + } | ||
| 585 | + return rs; | ||
| 586 | + } | ||
| 587 | + | ||
| 588 | + @RequestMapping(value = "svgAttr", method = RequestMethod.POST) | ||
| 589 | + public Map<String, Object> svgAttr(@RequestParam String jsonStr){ | ||
| 590 | + return scheduleRealInfoService.svgAttr(jsonStr); | ||
| 591 | + } | ||
| 592 | + | ||
| 593 | + @RequestMapping(value = "svgAttr", method = RequestMethod.GET) | ||
| 594 | + public Map<String, Object> findSvgAttr(@RequestParam String idx){ | ||
| 595 | + return scheduleRealInfoService.findSvgAttr(idx); | ||
| 596 | + } | ||
| 597 | + | ||
| 598 | + @RequestMapping(value = "addRemarks", method = RequestMethod.POST) | ||
| 599 | + public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){ | ||
| 600 | + return scheduleRealInfoService.addRemarks(id, remarks); | ||
| 601 | + } | ||
| 602 | + | ||
| 603 | + @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET) | ||
| 604 | + public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){ | ||
| 605 | + return scheduleRealInfoService.scheduleDailyQp(line,date); | ||
| 606 | + } | ||
| 607 | + | ||
| 608 | + @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET) | ||
| 609 | + public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){ | ||
| 610 | + return scheduleRealInfoService.scheduleDailyExport(map); | ||
| 611 | + } | ||
| 612 | + | ||
| 613 | + @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET) | ||
| 614 | + public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){ | ||
| 615 | + return scheduleRealInfoService.exportWaybillMore(map); | ||
| 616 | + } | ||
| 617 | + | ||
| 618 | + /** | ||
| 619 | + * 获取当日计划排班 , 从计划表抓取数据 | ||
| 620 | + * @return | ||
| 621 | + */ | ||
| 622 | + @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET) | ||
| 623 | + public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){ | ||
| 624 | + return scheduleRealInfoService.currentSchedulePlan(lineCode); | ||
| 625 | + } | ||
| 626 | + | ||
| 627 | + @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST) | ||
| 628 | + public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){ | ||
| 629 | + return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type); | ||
| 630 | + } | ||
| 631 | + | ||
| 632 | + /** | ||
| 633 | + * 删除当日实际排班 | ||
| 634 | + * @return | ||
| 635 | + */ | ||
| 636 | + @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST) | ||
| 637 | + public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){ | ||
| 638 | + return dayOfSchedule.deleteRealSchedule(lineCode); | ||
| 639 | + } | ||
| 640 | + | ||
| 641 | + /** | ||
| 642 | + * 从计划表重新加载当日排班 | ||
| 643 | + * @param lineCode | ||
| 644 | + * @return | ||
| 645 | + */ | ||
| 646 | + @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST) | ||
| 647 | + public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){ | ||
| 648 | + Map<String, Object> rs = new HashMap<>(); | ||
| 649 | + List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode); | ||
| 650 | + if(list != null && list.size() > 0){ | ||
| 651 | + rs.put("status", ResponseCode.ERROR); | ||
| 652 | + rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。"); | ||
| 653 | + return rs; | ||
| 654 | + } | ||
| 655 | + | ||
| 656 | + int code = dayOfSchedule.reloadSch(lineCode); | ||
| 657 | + | ||
| 658 | + //重新按公司编码索引数据 | ||
| 659 | + dayOfSchedule.groupByGsbm(); | ||
| 660 | + rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR); | ||
| 661 | + return rs; | ||
| 662 | + } | ||
| 663 | + | ||
| 664 | + /** | ||
| 665 | + * 误点调整 | ||
| 666 | + * @param idx | ||
| 667 | + * @param minute | ||
| 668 | + * @return | ||
| 669 | + */ | ||
| 670 | + @RequestMapping(value = "lateAdjust", method = RequestMethod.POST) | ||
| 671 | + public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){ | ||
| 672 | + return scheduleRealInfoService.lateAdjust(idx, minute); | ||
| 673 | + } | ||
| 674 | + | ||
| 675 | + /** | ||
| 676 | + * 获取所有应发未到的班次 | ||
| 677 | + * @param idx | ||
| 678 | + * @return | ||
| 679 | + */ | ||
| 680 | + @RequestMapping(value = "allLate2") | ||
| 681 | + public List<ScheduleRealInfo> allLate2(@RequestParam String idx){ | ||
| 682 | + return scheduleRealInfoService.allLate2(idx); | ||
| 683 | + } | ||
| 684 | + | ||
| 685 | + /** | ||
| 686 | + * 添加一个临加到历史库 | ||
| 687 | + * @param sch | ||
| 688 | + * @return | ||
| 689 | + */ | ||
| 690 | + @RequestMapping(value = "history/add", method = RequestMethod.POST) | ||
| 691 | + public Map<String, Object> addToHistory(ScheduleRealInfo sch){ | ||
| 692 | + return scheduleRealInfoService.addToHistory(sch); | ||
| 693 | + } | ||
| 694 | + | ||
| 695 | + /** | ||
| 696 | + * 从历史库里删除临加班次 | ||
| 697 | + * @param sch | ||
| 698 | + * @return | ||
| 699 | + */ | ||
| 700 | + @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE) | ||
| 701 | + public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){ | ||
| 702 | + return scheduleRealInfoService.deleteToHistory(id); | ||
| 703 | + } | ||
| 704 | + | ||
| 705 | + @RequestMapping(value = "isCircleQdz", method = RequestMethod.POST) | ||
| 706 | + public Map<String, Object> isCircleQdz(@RequestParam String line, String nbbm, String ts, String qdzCode){ | ||
| 707 | + Map<String, Object> map =new HashMap<>(); | ||
| 708 | + map.put("isExist",scheduleRealInfoService.isCircleQdz(nbbm, ts, line, qdzCode)); | ||
| 709 | + return map; | ||
| 710 | + } | ||
| 711 | + | ||
| 712 | + /** | ||
| 713 | + * 从历史库里删除临加班次 | ||
| 714 | + * @param sch | ||
| 715 | + * @return | ||
| 716 | + */ | ||
| 717 | + @RequestMapping(value = "wxsb", method = RequestMethod.POST) | ||
| 718 | + public Map<String, Object> repairReport(@RequestParam Map<String, Object> param){ | ||
| 719 | + return scheduleRealInfoService.repairReport(param, true); | ||
| 720 | + } | ||
| 721 | + | ||
| 722 | + @RequestMapping(value = "wxsb", method = RequestMethod.GET) | ||
| 723 | + public List<RepairReport> repairReportList(@RequestParam String line, @RequestParam String date, @RequestParam String code, @RequestParam String type){ | ||
| 724 | + return scheduleRealInfoService.repairReportList(line, date, code, type); | ||
| 725 | + } | ||
| 726 | + | ||
| 727 | + @RequestMapping(value = "lineLevel", method = RequestMethod.GET) | ||
| 728 | + public Map<String, String> lineLevel(@RequestParam String idx){ | ||
| 729 | + return scheduleRealInfoService.getLevelsByLines(Arrays.asList(idx.split(","))); | ||
| 730 | + } | ||
| 731 | +} |
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -371,4 +371,10 @@ public class ReportController { | @@ -371,4 +371,10 @@ public class ReportController { | ||
| 371 | return service.singledatatj(map); | 371 | return service.singledatatj(map); |
| 372 | } | 372 | } |
| 373 | 373 | ||
| 374 | + //单日统计路单公里与油量,电量合并 | ||
| 375 | + @RequestMapping(value = "/singleEnergy", method = RequestMethod.GET) | ||
| 376 | + public List<Map<String, Object>> singleEnergy(@RequestParam Map<String, Object> map) { | ||
| 377 | + | ||
| 378 | + return service.singleEnergy(map); | ||
| 379 | + } | ||
| 374 | } | 380 | } |
src/main/java/com/bsth/controller/schedule/basicinfo/CarController_facade.java
| 1 | -package com.bsth.controller.schedule.basicinfo; | ||
| 2 | - | ||
| 3 | -import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | -import com.bsth.common.ResponseCode; | ||
| 5 | -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | -import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDto; | ||
| 7 | -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | -import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | -import com.bsth.control_v2.plan_module.common.service.baseinfo.CarServiceFacade; | ||
| 10 | -import com.bsth.controller.schedule.BController_facade; | ||
| 11 | -import com.bsth.service.schedule.CarsService; | ||
| 12 | -import com.bsth.service.schedule.utils.DataToolsFile; | ||
| 13 | -import org.apache.commons.lang3.StringUtils; | ||
| 14 | -import org.apache.poi.ss.usermodel.Workbook; | ||
| 15 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 16 | -import org.springframework.context.annotation.Conditional; | ||
| 17 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 20 | -import org.springframework.web.bind.annotation.RestController; | ||
| 21 | -import org.springframework.web.multipart.MultipartFile; | ||
| 22 | - | ||
| 23 | -import javax.servlet.http.HttpServletResponse; | ||
| 24 | -import java.io.*; | ||
| 25 | -import java.util.*; | ||
| 26 | - | ||
| 27 | -/** | ||
| 28 | - * 车辆基础信息controller_facade | ||
| 29 | - */ | ||
| 30 | -@RestController | ||
| 31 | -@Conditional(DubboConfigCondition.class) | ||
| 32 | -@RequestMapping("cars_sc") | ||
| 33 | -public class CarController_facade extends BController_facade<Integer, CarDto> { | ||
| 34 | - | ||
| 35 | - @Override | ||
| 36 | - public void setCreateUserInfo(CarDto carDto, Integer userId, Date createDate) { | ||
| 37 | - UserDto userDto = UserDto.getBuilder() | ||
| 38 | - .setId(userId) | ||
| 39 | - .build(); | ||
| 40 | - carDto.setCreateBy(userDto); | ||
| 41 | - carDto.setCreateDate(createDate); | ||
| 42 | - } | ||
| 43 | - @Override | ||
| 44 | - public void setUpdateUserInfo(CarDto carDto, Integer userId, Date updateDate) { | ||
| 45 | - UserDto userDto = UserDto.getBuilder() | ||
| 46 | - .setId(userId) | ||
| 47 | - .build(); | ||
| 48 | - carDto.setUpdateBy(userDto); | ||
| 49 | - carDto.setUpdateDate(updateDate); | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - @Reference | ||
| 53 | - private CarServiceFacade carServiceFacade; | ||
| 54 | - @Override | ||
| 55 | - protected BServiceFacade<Integer, CarDto> getBServiceFacade() { | ||
| 56 | - return carServiceFacade; | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | - @RequestMapping(value = "/validate_zbh", method = RequestMethod.GET) | ||
| 60 | - public Map<String, Object> validate_zbh(@RequestParam Map<String, Object> param) { | ||
| 61 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 62 | - try { | ||
| 63 | - // 自编号验证 | ||
| 64 | - CarDto carDto = CarDto.getBuilder() | ||
| 65 | - .setId(param.get("id_eq") == null ? | ||
| 66 | - null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 67 | - .setInsideCode(param.get("insideCode_eq") == null ? | ||
| 68 | - null : param.get("insideCode_eq").toString()) | ||
| 69 | - .build(); | ||
| 70 | - this.carServiceFacade.validate_repeat_nbbh(carDto); | ||
| 71 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 72 | - } catch (Exception exp) { | ||
| 73 | - rtn.put("status", ResponseCode.ERROR); | ||
| 74 | - rtn.put("msg", exp.getMessage()); | ||
| 75 | - } | ||
| 76 | - return rtn; | ||
| 77 | - } | ||
| 78 | - | ||
| 79 | - @RequestMapping(value = "/validate_clbh", method = RequestMethod.GET) | ||
| 80 | - public Map<String, Object> validate_clbh(@RequestParam Map<String, Object> param) { | ||
| 81 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 82 | - try { | ||
| 83 | - // 车辆编号验证 | ||
| 84 | - CarDto carDto = CarDto.getBuilder() | ||
| 85 | - .setId(param.get("id_eq") == null ? | ||
| 86 | - null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 87 | - .setCarCode(param.get("carCode_eq") == null ? | ||
| 88 | - null : param.get("carCode_eq").toString()) | ||
| 89 | - .build(); | ||
| 90 | - this.carServiceFacade.validate_repeat_clbh(carDto); | ||
| 91 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 92 | - } catch (Exception exp) { | ||
| 93 | - rtn.put("status", ResponseCode.ERROR); | ||
| 94 | - rtn.put("msg", exp.getMessage()); | ||
| 95 | - } | ||
| 96 | - return rtn; | ||
| 97 | - } | ||
| 98 | - | ||
| 99 | - @RequestMapping(value = "/validate_cph", method = RequestMethod.GET) | ||
| 100 | - public Map<String, Object> validate_cph(@RequestParam Map<String, Object> param) { | ||
| 101 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 102 | - try { | ||
| 103 | - // 车牌号验证 | ||
| 104 | - CarDto carDto = CarDto.getBuilder() | ||
| 105 | - .setId(param.get("id_eq") == null ? | ||
| 106 | - null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 107 | - .setCarPlate(param.get("carPlate_eq") == null ? | ||
| 108 | - null : param.get("carPlate_eq").toString()) | ||
| 109 | - .build(); | ||
| 110 | - this.carServiceFacade.validate_repeat_cph(carDto); | ||
| 111 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 112 | - } catch (Exception exp) { | ||
| 113 | - rtn.put("status", ResponseCode.ERROR); | ||
| 114 | - rtn.put("msg", exp.getMessage()); | ||
| 115 | - } | ||
| 116 | - return rtn; | ||
| 117 | - } | ||
| 118 | - | ||
| 119 | - @RequestMapping(value = "/validate_sbbh", method = RequestMethod.GET) | ||
| 120 | - public Map<String, Object> validate_sbbh(@RequestParam Map<String, Object> param) { | ||
| 121 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 122 | - try { | ||
| 123 | - // 设备编号验证 | ||
| 124 | - CarDto carDto = CarDto.getBuilder() | ||
| 125 | - .setId(param.get("id_eq") == null ? | ||
| 126 | - null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 127 | - .setEquipmentCode(param.get("equipmentCode_eq") == null ? | ||
| 128 | - null : param.get("equipmentCode_eq").toString()) | ||
| 129 | - .build(); | ||
| 130 | - this.carServiceFacade.validate_repeat_sbbh(carDto); | ||
| 131 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 132 | - } catch (Exception exp) { | ||
| 133 | - rtn.put("status", ResponseCode.ERROR); | ||
| 134 | - rtn.put("msg", exp.getMessage()); | ||
| 135 | - } | ||
| 136 | - return rtn; | ||
| 137 | - } | ||
| 138 | - | ||
| 139 | - //------------------ TODO:导入导出逻辑,之后会服务化 -----------------// | ||
| 140 | - @Autowired | ||
| 141 | - private CarsService carsService; | ||
| 142 | - // 上传excel文件 | ||
| 143 | - @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | ||
| 144 | - public Map<String, Object> uploadFile(MultipartFile file) { | ||
| 145 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 146 | - try { | ||
| 147 | - DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 148 | - // excel文件名 | ||
| 149 | - String fileName = dataToolsFile.getFile().getAbsolutePath(); | ||
| 150 | - Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile()); | ||
| 151 | - | ||
| 152 | - // excel文件sheet | ||
| 153 | - List<String> sheetnames = new ArrayList<>(); | ||
| 154 | - for (int i = 0; i < wb.getNumberOfSheets(); i ++) { | ||
| 155 | - sheetnames.add(wb.getSheetAt(i).getSheetName()); | ||
| 156 | - } | ||
| 157 | - | ||
| 158 | - wb.close(); | ||
| 159 | - | ||
| 160 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 161 | - rtn.put("filename", fileName); | ||
| 162 | - rtn.put("sheetnames", StringUtils.join(sheetnames, ",")); | ||
| 163 | - } catch (Exception exp) { | ||
| 164 | - exp.printStackTrace(); | ||
| 165 | - rtn.put("status", ResponseCode.ERROR); | ||
| 166 | - rtn.put("msg", exp.getMessage()); | ||
| 167 | - } | ||
| 168 | - return rtn; | ||
| 169 | - } | ||
| 170 | - // 导入excel文件 | ||
| 171 | - @RequestMapping(value = "/importFile", method = RequestMethod.POST) | ||
| 172 | - public Map<String, Object> importFile(@RequestParam Map<String, Object> params) { | ||
| 173 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 174 | - | ||
| 175 | - try { | ||
| 176 | - File file = new File(String.valueOf(params.get("filename"))); | ||
| 177 | - if (!file.exists()) { | ||
| 178 | - throw new Exception("导入文件不存在!"); | ||
| 179 | - } | ||
| 180 | - carsService.importData(file, params); | ||
| 181 | - | ||
| 182 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 183 | - rtn.put("msg", "导入文件成功"); | ||
| 184 | - } catch (Exception exp) { | ||
| 185 | - rtn.put("status", ResponseCode.ERROR); | ||
| 186 | - rtn.put("msg", exp.getMessage()); | ||
| 187 | - } | ||
| 188 | - | ||
| 189 | - return rtn; | ||
| 190 | - } | ||
| 191 | - // 上传并导入excel文件 | ||
| 192 | - @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST) | ||
| 193 | - public Map<String, Object> uploadAndImportFile(MultipartFile file) { | ||
| 194 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 195 | - | ||
| 196 | - try { | ||
| 197 | - DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 198 | - Map<String, Object> params = new HashMap<>(); | ||
| 199 | - carsService.importData(dataToolsFile.getFile(), params); | ||
| 200 | - | ||
| 201 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 202 | - rtn.put("msg", "上传&导入文件成功"); | ||
| 203 | - } catch (Exception exp) { | ||
| 204 | - exp.printStackTrace(); | ||
| 205 | - rtn.put("status", ResponseCode.ERROR); | ||
| 206 | - rtn.put("msg", exp.getMessage()); | ||
| 207 | - } | ||
| 208 | - | ||
| 209 | - return rtn; | ||
| 210 | - } | ||
| 211 | - | ||
| 212 | - // 导出数据到xls文件 | ||
| 213 | - @RequestMapping(value = "/exportFile", method = RequestMethod.GET) | ||
| 214 | - public void exportFile(HttpServletResponse response, | ||
| 215 | - @RequestParam Map<String, Object> params) throws Exception { | ||
| 216 | - DataToolsFile dataToolsFile = carsService.exportData(params); | ||
| 217 | - // 流输出导出文件 | ||
| 218 | - response.setHeader("content-type", "application/octet-stream"); | ||
| 219 | - response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName()); | ||
| 220 | - response.setContentType("application/octet-stream"); | ||
| 221 | - | ||
| 222 | - OutputStream os = response.getOutputStream(); | ||
| 223 | - BufferedOutputStream bos = new BufferedOutputStream(os); | ||
| 224 | - | ||
| 225 | - InputStream is = new FileInputStream(dataToolsFile.getFile()); | ||
| 226 | - BufferedInputStream bis = new BufferedInputStream(is); | ||
| 227 | - | ||
| 228 | - int length = 0; | ||
| 229 | - byte[] temp = new byte[1 * 1024 * 10]; | ||
| 230 | - while ((length = bis.read(temp)) != -1) { | ||
| 231 | - bos.write(temp, 0, length); | ||
| 232 | - } | ||
| 233 | - bos.flush(); | ||
| 234 | - bis.close(); | ||
| 235 | - bos.close(); | ||
| 236 | - is.close(); | ||
| 237 | - } | ||
| 238 | - | ||
| 239 | - | ||
| 240 | - | ||
| 241 | - | ||
| 242 | -} | 1 | +package com.bsth.controller.schedule.basicinfo; |
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | +import com.bsth.control_v2.plan_module.common.service.baseinfo.CarServiceFacade; | ||
| 10 | +import com.bsth.controller.schedule.BController_facade; | ||
| 11 | +import com.bsth.service.schedule.CarsService; | ||
| 12 | +import com.bsth.service.schedule.utils.DataToolsFile; | ||
| 13 | +import org.apache.commons.lang3.StringUtils; | ||
| 14 | +import org.apache.poi.ss.usermodel.Workbook; | ||
| 15 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 16 | +import org.springframework.context.annotation.Conditional; | ||
| 17 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 20 | +import org.springframework.web.bind.annotation.RestController; | ||
| 21 | +import org.springframework.web.multipart.MultipartFile; | ||
| 22 | + | ||
| 23 | +import javax.servlet.http.HttpServletResponse; | ||
| 24 | +import java.io.*; | ||
| 25 | +import java.util.*; | ||
| 26 | + | ||
| 27 | +/** | ||
| 28 | + * 车辆基础信息controller_facade | ||
| 29 | + */ | ||
| 30 | +@RestController | ||
| 31 | +@Conditional(DubboConfigCondition.class) | ||
| 32 | +@RequestMapping("cars_sc") | ||
| 33 | +public class CarController_facade extends BController_facade<Integer, CarDto> { | ||
| 34 | + | ||
| 35 | + @Override | ||
| 36 | + public void setCreateUserInfo(CarDto carDto, Integer userId, Date createDate) { | ||
| 37 | + UserDto userDto = UserDto.getBuilder() | ||
| 38 | + .setId(userId) | ||
| 39 | + .build(); | ||
| 40 | + carDto.setCreateBy(userDto); | ||
| 41 | + carDto.setCreateDate(createDate); | ||
| 42 | + } | ||
| 43 | + @Override | ||
| 44 | + public void setUpdateUserInfo(CarDto carDto, Integer userId, Date updateDate) { | ||
| 45 | + UserDto userDto = UserDto.getBuilder() | ||
| 46 | + .setId(userId) | ||
| 47 | + .build(); | ||
| 48 | + carDto.setUpdateBy(userDto); | ||
| 49 | + carDto.setUpdateDate(updateDate); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + @Reference | ||
| 53 | + private CarServiceFacade carServiceFacade; | ||
| 54 | + @Override | ||
| 55 | + protected BServiceFacade<Integer, CarDto> getBServiceFacade() { | ||
| 56 | + return carServiceFacade; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + @RequestMapping(value = "/validate_zbh", method = RequestMethod.GET) | ||
| 60 | + public Map<String, Object> validate_zbh(@RequestParam Map<String, Object> param) { | ||
| 61 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 62 | + try { | ||
| 63 | + // 自编号验证 | ||
| 64 | + CarDto carDto = CarDto.getBuilder() | ||
| 65 | + .setId(param.get("id_eq") == null ? | ||
| 66 | + null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 67 | + .setInsideCode(param.get("insideCode_eq") == null ? | ||
| 68 | + null : param.get("insideCode_eq").toString()) | ||
| 69 | + .build(); | ||
| 70 | + this.carServiceFacade.validate_repeat_nbbh(carDto); | ||
| 71 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 72 | + } catch (Exception exp) { | ||
| 73 | + rtn.put("status", ResponseCode.ERROR); | ||
| 74 | + rtn.put("msg", exp.getMessage()); | ||
| 75 | + } | ||
| 76 | + return rtn; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + @RequestMapping(value = "/validate_clbh", method = RequestMethod.GET) | ||
| 80 | + public Map<String, Object> validate_clbh(@RequestParam Map<String, Object> param) { | ||
| 81 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 82 | + try { | ||
| 83 | + // 车辆编号验证 | ||
| 84 | + CarDto carDto = CarDto.getBuilder() | ||
| 85 | + .setId(param.get("id_eq") == null ? | ||
| 86 | + null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 87 | + .setCarCode(param.get("carCode_eq") == null ? | ||
| 88 | + null : param.get("carCode_eq").toString()) | ||
| 89 | + .build(); | ||
| 90 | + this.carServiceFacade.validate_repeat_clbh(carDto); | ||
| 91 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 92 | + } catch (Exception exp) { | ||
| 93 | + rtn.put("status", ResponseCode.ERROR); | ||
| 94 | + rtn.put("msg", exp.getMessage()); | ||
| 95 | + } | ||
| 96 | + return rtn; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + @RequestMapping(value = "/validate_cph", method = RequestMethod.GET) | ||
| 100 | + public Map<String, Object> validate_cph(@RequestParam Map<String, Object> param) { | ||
| 101 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 102 | + try { | ||
| 103 | + // 车牌号验证 | ||
| 104 | + CarDto carDto = CarDto.getBuilder() | ||
| 105 | + .setId(param.get("id_eq") == null ? | ||
| 106 | + null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 107 | + .setCarPlate(param.get("carPlate_eq") == null ? | ||
| 108 | + null : param.get("carPlate_eq").toString()) | ||
| 109 | + .build(); | ||
| 110 | + this.carServiceFacade.validate_repeat_cph(carDto); | ||
| 111 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 112 | + } catch (Exception exp) { | ||
| 113 | + rtn.put("status", ResponseCode.ERROR); | ||
| 114 | + rtn.put("msg", exp.getMessage()); | ||
| 115 | + } | ||
| 116 | + return rtn; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + @RequestMapping(value = "/validate_sbbh", method = RequestMethod.GET) | ||
| 120 | + public Map<String, Object> validate_sbbh(@RequestParam Map<String, Object> param) { | ||
| 121 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 122 | + try { | ||
| 123 | + // 设备编号验证 | ||
| 124 | + CarDto carDto = CarDto.getBuilder() | ||
| 125 | + .setId(param.get("id_eq") == null ? | ||
| 126 | + null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 127 | + .setEquipmentCode(param.get("equipmentCode_eq") == null ? | ||
| 128 | + null : param.get("equipmentCode_eq").toString()) | ||
| 129 | + .build(); | ||
| 130 | + this.carServiceFacade.validate_repeat_sbbh(carDto); | ||
| 131 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 132 | + } catch (Exception exp) { | ||
| 133 | + rtn.put("status", ResponseCode.ERROR); | ||
| 134 | + rtn.put("msg", exp.getMessage()); | ||
| 135 | + } | ||
| 136 | + return rtn; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------// | ||
| 140 | + @Autowired | ||
| 141 | + private CarsService carsService; | ||
| 142 | + // 上传excel文件 | ||
| 143 | + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | ||
| 144 | + public Map<String, Object> uploadFile(MultipartFile file) { | ||
| 145 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 146 | + try { | ||
| 147 | + DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 148 | + // excel文件名 | ||
| 149 | + String fileName = dataToolsFile.getFile().getAbsolutePath(); | ||
| 150 | + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile()); | ||
| 151 | + | ||
| 152 | + // excel文件sheet | ||
| 153 | + List<String> sheetnames = new ArrayList<>(); | ||
| 154 | + for (int i = 0; i < wb.getNumberOfSheets(); i ++) { | ||
| 155 | + sheetnames.add(wb.getSheetAt(i).getSheetName()); | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + wb.close(); | ||
| 159 | + | ||
| 160 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 161 | + rtn.put("filename", fileName); | ||
| 162 | + rtn.put("sheetnames", StringUtils.join(sheetnames, ",")); | ||
| 163 | + } catch (Exception exp) { | ||
| 164 | + exp.printStackTrace(); | ||
| 165 | + rtn.put("status", ResponseCode.ERROR); | ||
| 166 | + rtn.put("msg", exp.getMessage()); | ||
| 167 | + } | ||
| 168 | + return rtn; | ||
| 169 | + } | ||
| 170 | + // 导入excel文件 | ||
| 171 | + @RequestMapping(value = "/importFile", method = RequestMethod.POST) | ||
| 172 | + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) { | ||
| 173 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 174 | + | ||
| 175 | + try { | ||
| 176 | + File file = new File(String.valueOf(params.get("filename"))); | ||
| 177 | + if (!file.exists()) { | ||
| 178 | + throw new Exception("导入文件不存在!"); | ||
| 179 | + } | ||
| 180 | + carsService.importData(file, params); | ||
| 181 | + | ||
| 182 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 183 | + rtn.put("msg", "导入文件成功"); | ||
| 184 | + } catch (Exception exp) { | ||
| 185 | + rtn.put("status", ResponseCode.ERROR); | ||
| 186 | + rtn.put("msg", exp.getMessage()); | ||
| 187 | + } | ||
| 188 | + | ||
| 189 | + return rtn; | ||
| 190 | + } | ||
| 191 | + // 上传并导入excel文件 | ||
| 192 | + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST) | ||
| 193 | + public Map<String, Object> uploadAndImportFile(MultipartFile file) { | ||
| 194 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 195 | + | ||
| 196 | + try { | ||
| 197 | + DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 198 | + Map<String, Object> params = new HashMap<>(); | ||
| 199 | + carsService.importData(dataToolsFile.getFile(), params); | ||
| 200 | + | ||
| 201 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 202 | + rtn.put("msg", "上传&导入文件成功"); | ||
| 203 | + } catch (Exception exp) { | ||
| 204 | + exp.printStackTrace(); | ||
| 205 | + rtn.put("status", ResponseCode.ERROR); | ||
| 206 | + rtn.put("msg", exp.getMessage()); | ||
| 207 | + } | ||
| 208 | + | ||
| 209 | + return rtn; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + // 导出数据到xls文件 | ||
| 213 | + @RequestMapping(value = "/exportFile", method = RequestMethod.GET) | ||
| 214 | + public void exportFile(HttpServletResponse response, | ||
| 215 | + @RequestParam Map<String, Object> params) throws Exception { | ||
| 216 | + DataToolsFile dataToolsFile = carsService.exportData(params); | ||
| 217 | + // 流输出导出文件 | ||
| 218 | + response.setHeader("content-type", "application/octet-stream"); | ||
| 219 | + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName()); | ||
| 220 | + response.setContentType("application/octet-stream"); | ||
| 221 | + | ||
| 222 | + OutputStream os = response.getOutputStream(); | ||
| 223 | + BufferedOutputStream bos = new BufferedOutputStream(os); | ||
| 224 | + | ||
| 225 | + InputStream is = new FileInputStream(dataToolsFile.getFile()); | ||
| 226 | + BufferedInputStream bis = new BufferedInputStream(is); | ||
| 227 | + | ||
| 228 | + int length = 0; | ||
| 229 | + byte[] temp = new byte[1 * 1024 * 10]; | ||
| 230 | + while ((length = bis.read(temp)) != -1) { | ||
| 231 | + bos.write(temp, 0, length); | ||
| 232 | + } | ||
| 233 | + bos.flush(); | ||
| 234 | + bis.close(); | ||
| 235 | + bos.close(); | ||
| 236 | + is.close(); | ||
| 237 | + } | ||
| 238 | + | ||
| 239 | + | ||
| 240 | + | ||
| 241 | + | ||
| 242 | +} |
src/main/java/com/bsth/controller/schedule/basicinfo/CarDeviceController_facade.java
| 1 | -package com.bsth.controller.schedule.basicinfo; | ||
| 2 | - | ||
| 3 | -import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | -import com.bsth.common.ResponseCode; | ||
| 5 | -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | -import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDeviceDto; | ||
| 7 | -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | -import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | -import com.bsth.control_v2.plan_module.common.service.baseinfo.CarDeviceServiceFacade; | ||
| 10 | -import com.bsth.controller.schedule.BController_facade; | ||
| 11 | -import org.joda.time.DateTime; | ||
| 12 | -import org.springframework.context.annotation.Conditional; | ||
| 13 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 14 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 15 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 16 | -import org.springframework.web.bind.annotation.RestController; | ||
| 17 | - | ||
| 18 | -import java.util.Date; | ||
| 19 | -import java.util.HashMap; | ||
| 20 | -import java.util.Map; | ||
| 21 | - | ||
| 22 | -@RestController | ||
| 23 | -@Conditional(DubboConfigCondition.class) | ||
| 24 | -@RequestMapping("cde_sc") | ||
| 25 | -public class CarDeviceController_facade extends BController_facade<Long, CarDeviceDto> { | ||
| 26 | - @Override | ||
| 27 | - public void setCreateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date createDate) { | ||
| 28 | - UserDto userDto = UserDto.getBuilder() | ||
| 29 | - .setId(userId) | ||
| 30 | - .build(); | ||
| 31 | - carDeviceDto.setCreateBy(userDto); | ||
| 32 | - carDeviceDto.setCreateDate(createDate); | ||
| 33 | - } | ||
| 34 | - | ||
| 35 | - @Override | ||
| 36 | - public void setUpdateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date updateDate) { | ||
| 37 | - UserDto userDto = UserDto.getBuilder() | ||
| 38 | - .setId(userId) | ||
| 39 | - .build(); | ||
| 40 | - carDeviceDto.setUpdateBy(userDto); | ||
| 41 | - carDeviceDto.setUpdateDate(updateDate); | ||
| 42 | - } | ||
| 43 | - | ||
| 44 | - @Reference | ||
| 45 | - private CarDeviceServiceFacade carDeviceServiceFacade; | ||
| 46 | - | ||
| 47 | - @Override | ||
| 48 | - protected BServiceFacade<Long, CarDeviceDto> getBServiceFacade() { | ||
| 49 | - return carDeviceServiceFacade; | ||
| 50 | - } | ||
| 51 | - @RequestMapping(value = "/validate_qyrq", method = RequestMethod.GET) | ||
| 52 | - public Map<String, Object> validate_qyrq(@RequestParam Map<String, Object> param) { | ||
| 53 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 54 | - | ||
| 55 | - try { | ||
| 56 | - // 启用日期验证 | ||
| 57 | - // 计算日期 | ||
| 58 | - Date qyrq_c = null; | ||
| 59 | - if (param.get("qyrq_eq") != null) { | ||
| 60 | - try { | ||
| 61 | - qyrq_c = new Date(); | ||
| 62 | - qyrq_c.setTime(Long.parseLong(param.get("qyrq_eq").toString())); | ||
| 63 | - } catch (Exception exp) { | ||
| 64 | - qyrq_c = new DateTime(param.get("qyrq_eq").toString()).toDate(); | ||
| 65 | - } | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - CarDeviceDto carDeviceDto = CarDeviceDto.getBuilder() | ||
| 69 | - .setId(param.get("id_eq") == null ? | ||
| 70 | - null : Long.valueOf(param.get("id_eq").toString())) | ||
| 71 | - .setXl(param.get("xl_eq") == null ? | ||
| 72 | - null : Integer.valueOf(param.get("xl_eq").toString())) | ||
| 73 | - .setCl(param.get("cl_eq") == null ? | ||
| 74 | - null : Integer.valueOf(param.get("cl_eq").toString())) | ||
| 75 | - .setQyrq(qyrq_c) | ||
| 76 | - .build(); | ||
| 77 | - | ||
| 78 | - this.carDeviceServiceFacade.validate_qyrq(carDeviceDto); | ||
| 79 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 80 | - } catch (Exception exp) { | ||
| 81 | - rtn.put("status", ResponseCode.ERROR); | ||
| 82 | - rtn.put("msg", exp.getMessage()); | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - return rtn; | ||
| 86 | - } | ||
| 87 | -} | 1 | +package com.bsth.controller.schedule.basicinfo; |
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDeviceDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | +import com.bsth.control_v2.plan_module.common.service.baseinfo.CarDeviceServiceFacade; | ||
| 10 | +import com.bsth.controller.schedule.BController_facade; | ||
| 11 | +import org.joda.time.DateTime; | ||
| 12 | +import org.springframework.context.annotation.Conditional; | ||
| 13 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 14 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 15 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 16 | +import org.springframework.web.bind.annotation.RestController; | ||
| 17 | + | ||
| 18 | +import java.util.Date; | ||
| 19 | +import java.util.HashMap; | ||
| 20 | +import java.util.Map; | ||
| 21 | + | ||
| 22 | +@RestController | ||
| 23 | +@Conditional(DubboConfigCondition.class) | ||
| 24 | +@RequestMapping("cde_sc") | ||
| 25 | +public class CarDeviceController_facade extends BController_facade<Long, CarDeviceDto> { | ||
| 26 | + @Override | ||
| 27 | + public void setCreateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date createDate) { | ||
| 28 | + UserDto userDto = UserDto.getBuilder() | ||
| 29 | + .setId(userId) | ||
| 30 | + .build(); | ||
| 31 | + carDeviceDto.setCreateBy(userDto); | ||
| 32 | + carDeviceDto.setCreateDate(createDate); | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + @Override | ||
| 36 | + public void setUpdateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date updateDate) { | ||
| 37 | + UserDto userDto = UserDto.getBuilder() | ||
| 38 | + .setId(userId) | ||
| 39 | + .build(); | ||
| 40 | + carDeviceDto.setUpdateBy(userDto); | ||
| 41 | + carDeviceDto.setUpdateDate(updateDate); | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + @Reference | ||
| 45 | + private CarDeviceServiceFacade carDeviceServiceFacade; | ||
| 46 | + | ||
| 47 | + @Override | ||
| 48 | + protected BServiceFacade<Long, CarDeviceDto> getBServiceFacade() { | ||
| 49 | + return carDeviceServiceFacade; | ||
| 50 | + } | ||
| 51 | + @RequestMapping(value = "/validate_qyrq", method = RequestMethod.GET) | ||
| 52 | + public Map<String, Object> validate_qyrq(@RequestParam Map<String, Object> param) { | ||
| 53 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 54 | + | ||
| 55 | + try { | ||
| 56 | + // 启用日期验证 | ||
| 57 | + // 计算日期 | ||
| 58 | + Date qyrq_c = null; | ||
| 59 | + if (param.get("qyrq_eq") != null) { | ||
| 60 | + try { | ||
| 61 | + qyrq_c = new Date(); | ||
| 62 | + qyrq_c.setTime(Long.parseLong(param.get("qyrq_eq").toString())); | ||
| 63 | + } catch (Exception exp) { | ||
| 64 | + qyrq_c = new DateTime(param.get("qyrq_eq").toString()).toDate(); | ||
| 65 | + } | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + CarDeviceDto carDeviceDto = CarDeviceDto.getBuilder() | ||
| 69 | + .setId(param.get("id_eq") == null ? | ||
| 70 | + null : Long.valueOf(param.get("id_eq").toString())) | ||
| 71 | + .setXl(param.get("xl_eq") == null ? | ||
| 72 | + null : Integer.valueOf(param.get("xl_eq").toString())) | ||
| 73 | + .setCl(param.get("cl_eq") == null ? | ||
| 74 | + null : Integer.valueOf(param.get("cl_eq").toString())) | ||
| 75 | + .setQyrq(qyrq_c) | ||
| 76 | + .build(); | ||
| 77 | + | ||
| 78 | + this.carDeviceServiceFacade.validate_qyrq(carDeviceDto); | ||
| 79 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 80 | + } catch (Exception exp) { | ||
| 81 | + rtn.put("status", ResponseCode.ERROR); | ||
| 82 | + rtn.put("msg", exp.getMessage()); | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + return rtn; | ||
| 86 | + } | ||
| 87 | +} |
src/main/java/com/bsth/controller/schedule/basicinfo/EmployeeController_facade.java
| 1 | -package com.bsth.controller.schedule.basicinfo; | ||
| 2 | - | ||
| 3 | -import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | -import com.bsth.common.ResponseCode; | ||
| 5 | -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | -import com.bsth.control_v2.plan_module.common.dto.baseinfo.PersonnelDto; | ||
| 7 | -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | -import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | -import com.bsth.control_v2.plan_module.common.service.baseinfo.PersonnelServiceFacade; | ||
| 10 | -import com.bsth.controller.schedule.BController_facade; | ||
| 11 | -import com.bsth.service.schedule.EmployeeService; | ||
| 12 | -import com.bsth.service.schedule.utils.DataToolsFile; | ||
| 13 | -import org.apache.commons.lang3.StringUtils; | ||
| 14 | -import org.apache.poi.ss.usermodel.Workbook; | ||
| 15 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 16 | -import org.springframework.context.annotation.Conditional; | ||
| 17 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | -import org.springframework.web.bind.annotation.RequestParam; | ||
| 20 | -import org.springframework.web.bind.annotation.RestController; | ||
| 21 | -import org.springframework.web.multipart.MultipartFile; | ||
| 22 | - | ||
| 23 | -import javax.servlet.http.HttpServletResponse; | ||
| 24 | -import java.io.*; | ||
| 25 | -import java.util.*; | ||
| 26 | - | ||
| 27 | -/** | ||
| 28 | - * 人员基础信息Controller_facade | ||
| 29 | - */ | ||
| 30 | -@RestController | ||
| 31 | -@Conditional(DubboConfigCondition.class) | ||
| 32 | -@RequestMapping("ee") | ||
| 33 | -public class EmployeeController_facade extends BController_facade<Integer, PersonnelDto> { | ||
| 34 | - @Override | ||
| 35 | - public void setCreateUserInfo(PersonnelDto personnelDto, Integer userId, Date createDate) { | ||
| 36 | - UserDto userDto = UserDto.getBuilder() | ||
| 37 | - .setId(userId) | ||
| 38 | - .build(); | ||
| 39 | - personnelDto.setCreateBy(userDto); | ||
| 40 | - personnelDto.setCreateDate(createDate); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - @Override | ||
| 44 | - public void setUpdateUserInfo(PersonnelDto personnelDto, Integer userId, Date updateDate) { | ||
| 45 | - UserDto userDto = UserDto.getBuilder() | ||
| 46 | - .setId(userId) | ||
| 47 | - .build(); | ||
| 48 | - personnelDto.setUpdateBy(userDto); | ||
| 49 | - personnelDto.setUpdateDate(updateDate); | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - @Reference | ||
| 53 | - private PersonnelServiceFacade personnelServiceFacade; | ||
| 54 | - @Override | ||
| 55 | - protected BServiceFacade<Integer, PersonnelDto> getBServiceFacade() { | ||
| 56 | - return personnelServiceFacade; | ||
| 57 | - } | ||
| 58 | - @RequestMapping(value = "/validate_gh", method = RequestMethod.GET) | ||
| 59 | - public Map<String, Object> validate_gh(@RequestParam Map<String, Object> param) { | ||
| 60 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 61 | - try { | ||
| 62 | - // 工号验证 | ||
| 63 | - PersonnelDto personnelDto = PersonnelDto.getBuilder() | ||
| 64 | - .setId(param.get("id_eq") == null ? | ||
| 65 | - null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 66 | - .setCompanyCode(param.get("companyCode_eq") == null ? | ||
| 67 | - null : param.get("companyCode_eq").toString()) | ||
| 68 | - .setJobCode(param.get("jobCode_eq") == null ? | ||
| 69 | - null : param.get("jobCode_eq").toString()) | ||
| 70 | - .build(); | ||
| 71 | - this.personnelServiceFacade.validate_gh(personnelDto); | ||
| 72 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 73 | - } catch (Exception exp) { | ||
| 74 | - rtn.put("status", ResponseCode.ERROR); | ||
| 75 | - rtn.put("msg", exp.getMessage()); | ||
| 76 | - } | ||
| 77 | - | ||
| 78 | - return rtn; | ||
| 79 | - } | ||
| 80 | - | ||
| 81 | - //------------------ TODO:导入导出逻辑,之后会服务化 -----------------// | ||
| 82 | - @Autowired | ||
| 83 | - private EmployeeService employeeService; | ||
| 84 | - // 上传excel文件 | ||
| 85 | - @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | ||
| 86 | - public Map<String, Object> uploadFile(MultipartFile file) { | ||
| 87 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 88 | - try { | ||
| 89 | - DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 90 | - // excel文件名 | ||
| 91 | - String fileName = dataToolsFile.getFile().getAbsolutePath(); | ||
| 92 | - Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile()); | ||
| 93 | - | ||
| 94 | - // excel文件sheet | ||
| 95 | - List<String> sheetnames = new ArrayList<>(); | ||
| 96 | - for (int i = 0; i < wb.getNumberOfSheets(); i ++) { | ||
| 97 | - sheetnames.add(wb.getSheetAt(i).getSheetName()); | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - wb.close(); | ||
| 101 | - | ||
| 102 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 103 | - rtn.put("filename", fileName); | ||
| 104 | - rtn.put("sheetnames", StringUtils.join(sheetnames, ",")); | ||
| 105 | - } catch (Exception exp) { | ||
| 106 | - exp.printStackTrace(); | ||
| 107 | - rtn.put("status", ResponseCode.ERROR); | ||
| 108 | - rtn.put("msg", exp.getMessage()); | ||
| 109 | - } | ||
| 110 | - return rtn; | ||
| 111 | - } | ||
| 112 | - // 导入excel文件 | ||
| 113 | - @RequestMapping(value = "/importFile", method = RequestMethod.POST) | ||
| 114 | - public Map<String, Object> importFile(@RequestParam Map<String, Object> params) { | ||
| 115 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 116 | - | ||
| 117 | - try { | ||
| 118 | - File file = new File(String.valueOf(params.get("filename"))); | ||
| 119 | - if (!file.exists()) { | ||
| 120 | - throw new Exception("导入文件不存在!"); | ||
| 121 | - } | ||
| 122 | - employeeService.importData(file, params); | ||
| 123 | - | ||
| 124 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 125 | - rtn.put("msg", "导入文件成功"); | ||
| 126 | - } catch (Exception exp) { | ||
| 127 | - rtn.put("status", ResponseCode.ERROR); | ||
| 128 | - rtn.put("msg", exp.getMessage()); | ||
| 129 | - } | ||
| 130 | - | ||
| 131 | - return rtn; | ||
| 132 | - } | ||
| 133 | - // 上传并导入excel文件 | ||
| 134 | - @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST) | ||
| 135 | - public Map<String, Object> uploadAndImportFile(MultipartFile file) { | ||
| 136 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 137 | - | ||
| 138 | - try { | ||
| 139 | - DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 140 | - Map<String, Object> params = new HashMap<>(); | ||
| 141 | - employeeService.importData(dataToolsFile.getFile(), params); | ||
| 142 | - | ||
| 143 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 144 | - rtn.put("msg", "上传&导入文件成功"); | ||
| 145 | - } catch (Exception exp) { | ||
| 146 | - exp.printStackTrace(); | ||
| 147 | - rtn.put("status", ResponseCode.ERROR); | ||
| 148 | - rtn.put("msg", exp.getMessage()); | ||
| 149 | - } | ||
| 150 | - | ||
| 151 | - return rtn; | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - // 导出数据到xls文件 | ||
| 155 | - @RequestMapping(value = "/exportFile", method = RequestMethod.GET) | ||
| 156 | - public void exportFile(HttpServletResponse response, | ||
| 157 | - @RequestParam Map<String, Object> params) throws Exception { | ||
| 158 | - DataToolsFile dataToolsFile = employeeService.exportData(params); | ||
| 159 | - // 流输出导出文件 | ||
| 160 | - response.setHeader("content-type", "application/octet-stream"); | ||
| 161 | - response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName()); | ||
| 162 | - response.setContentType("application/octet-stream"); | ||
| 163 | - | ||
| 164 | - OutputStream os = response.getOutputStream(); | ||
| 165 | - BufferedOutputStream bos = new BufferedOutputStream(os); | ||
| 166 | - | ||
| 167 | - InputStream is = new FileInputStream(dataToolsFile.getFile()); | ||
| 168 | - BufferedInputStream bis = new BufferedInputStream(is); | ||
| 169 | - | ||
| 170 | - int length = 0; | ||
| 171 | - byte[] temp = new byte[1 * 1024 * 10]; | ||
| 172 | - while ((length = bis.read(temp)) != -1) { | ||
| 173 | - bos.write(temp, 0, length); | ||
| 174 | - } | ||
| 175 | - bos.flush(); | ||
| 176 | - bis.close(); | ||
| 177 | - bos.close(); | ||
| 178 | - is.close(); | ||
| 179 | - } | ||
| 180 | - | ||
| 181 | -} | 1 | +package com.bsth.controller.schedule.basicinfo; |
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.baseinfo.PersonnelDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | +import com.bsth.control_v2.plan_module.common.service.baseinfo.PersonnelServiceFacade; | ||
| 10 | +import com.bsth.controller.schedule.BController_facade; | ||
| 11 | +import com.bsth.service.schedule.EmployeeService; | ||
| 12 | +import com.bsth.service.schedule.utils.DataToolsFile; | ||
| 13 | +import org.apache.commons.lang3.StringUtils; | ||
| 14 | +import org.apache.poi.ss.usermodel.Workbook; | ||
| 15 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 16 | +import org.springframework.context.annotation.Conditional; | ||
| 17 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 20 | +import org.springframework.web.bind.annotation.RestController; | ||
| 21 | +import org.springframework.web.multipart.MultipartFile; | ||
| 22 | + | ||
| 23 | +import javax.servlet.http.HttpServletResponse; | ||
| 24 | +import java.io.*; | ||
| 25 | +import java.util.*; | ||
| 26 | + | ||
| 27 | +/** | ||
| 28 | + * 人员基础信息Controller_facade | ||
| 29 | + */ | ||
| 30 | +@RestController | ||
| 31 | +@Conditional(DubboConfigCondition.class) | ||
| 32 | +@RequestMapping("ee") | ||
| 33 | +public class EmployeeController_facade extends BController_facade<Integer, PersonnelDto> { | ||
| 34 | + @Override | ||
| 35 | + public void setCreateUserInfo(PersonnelDto personnelDto, Integer userId, Date createDate) { | ||
| 36 | + UserDto userDto = UserDto.getBuilder() | ||
| 37 | + .setId(userId) | ||
| 38 | + .build(); | ||
| 39 | + personnelDto.setCreateBy(userDto); | ||
| 40 | + personnelDto.setCreateDate(createDate); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + @Override | ||
| 44 | + public void setUpdateUserInfo(PersonnelDto personnelDto, Integer userId, Date updateDate) { | ||
| 45 | + UserDto userDto = UserDto.getBuilder() | ||
| 46 | + .setId(userId) | ||
| 47 | + .build(); | ||
| 48 | + personnelDto.setUpdateBy(userDto); | ||
| 49 | + personnelDto.setUpdateDate(updateDate); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + @Reference | ||
| 53 | + private PersonnelServiceFacade personnelServiceFacade; | ||
| 54 | + @Override | ||
| 55 | + protected BServiceFacade<Integer, PersonnelDto> getBServiceFacade() { | ||
| 56 | + return personnelServiceFacade; | ||
| 57 | + } | ||
| 58 | + @RequestMapping(value = "/validate_gh", method = RequestMethod.GET) | ||
| 59 | + public Map<String, Object> validate_gh(@RequestParam Map<String, Object> param) { | ||
| 60 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 61 | + try { | ||
| 62 | + // 工号验证 | ||
| 63 | + PersonnelDto personnelDto = PersonnelDto.getBuilder() | ||
| 64 | + .setId(param.get("id_eq") == null ? | ||
| 65 | + null : Integer.valueOf(param.get("id_eq").toString())) | ||
| 66 | + .setCompanyCode(param.get("companyCode_eq") == null ? | ||
| 67 | + null : param.get("companyCode_eq").toString()) | ||
| 68 | + .setJobCode(param.get("jobCode_eq") == null ? | ||
| 69 | + null : param.get("jobCode_eq").toString()) | ||
| 70 | + .build(); | ||
| 71 | + this.personnelServiceFacade.validate_gh(personnelDto); | ||
| 72 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 73 | + } catch (Exception exp) { | ||
| 74 | + rtn.put("status", ResponseCode.ERROR); | ||
| 75 | + rtn.put("msg", exp.getMessage()); | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + return rtn; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------// | ||
| 82 | + @Autowired | ||
| 83 | + private EmployeeService employeeService; | ||
| 84 | + // 上传excel文件 | ||
| 85 | + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) | ||
| 86 | + public Map<String, Object> uploadFile(MultipartFile file) { | ||
| 87 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 88 | + try { | ||
| 89 | + DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 90 | + // excel文件名 | ||
| 91 | + String fileName = dataToolsFile.getFile().getAbsolutePath(); | ||
| 92 | + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile()); | ||
| 93 | + | ||
| 94 | + // excel文件sheet | ||
| 95 | + List<String> sheetnames = new ArrayList<>(); | ||
| 96 | + for (int i = 0; i < wb.getNumberOfSheets(); i ++) { | ||
| 97 | + sheetnames.add(wb.getSheetAt(i).getSheetName()); | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + wb.close(); | ||
| 101 | + | ||
| 102 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 103 | + rtn.put("filename", fileName); | ||
| 104 | + rtn.put("sheetnames", StringUtils.join(sheetnames, ",")); | ||
| 105 | + } catch (Exception exp) { | ||
| 106 | + exp.printStackTrace(); | ||
| 107 | + rtn.put("status", ResponseCode.ERROR); | ||
| 108 | + rtn.put("msg", exp.getMessage()); | ||
| 109 | + } | ||
| 110 | + return rtn; | ||
| 111 | + } | ||
| 112 | + // 导入excel文件 | ||
| 113 | + @RequestMapping(value = "/importFile", method = RequestMethod.POST) | ||
| 114 | + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) { | ||
| 115 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 116 | + | ||
| 117 | + try { | ||
| 118 | + File file = new File(String.valueOf(params.get("filename"))); | ||
| 119 | + if (!file.exists()) { | ||
| 120 | + throw new Exception("导入文件不存在!"); | ||
| 121 | + } | ||
| 122 | + employeeService.importData(file, params); | ||
| 123 | + | ||
| 124 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 125 | + rtn.put("msg", "导入文件成功"); | ||
| 126 | + } catch (Exception exp) { | ||
| 127 | + rtn.put("status", ResponseCode.ERROR); | ||
| 128 | + rtn.put("msg", exp.getMessage()); | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + return rtn; | ||
| 132 | + } | ||
| 133 | + // 上传并导入excel文件 | ||
| 134 | + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST) | ||
| 135 | + public Map<String, Object> uploadAndImportFile(MultipartFile file) { | ||
| 136 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 137 | + | ||
| 138 | + try { | ||
| 139 | + DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes()); | ||
| 140 | + Map<String, Object> params = new HashMap<>(); | ||
| 141 | + employeeService.importData(dataToolsFile.getFile(), params); | ||
| 142 | + | ||
| 143 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 144 | + rtn.put("msg", "上传&导入文件成功"); | ||
| 145 | + } catch (Exception exp) { | ||
| 146 | + exp.printStackTrace(); | ||
| 147 | + rtn.put("status", ResponseCode.ERROR); | ||
| 148 | + rtn.put("msg", exp.getMessage()); | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + return rtn; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + // 导出数据到xls文件 | ||
| 155 | + @RequestMapping(value = "/exportFile", method = RequestMethod.GET) | ||
| 156 | + public void exportFile(HttpServletResponse response, | ||
| 157 | + @RequestParam Map<String, Object> params) throws Exception { | ||
| 158 | + DataToolsFile dataToolsFile = employeeService.exportData(params); | ||
| 159 | + // 流输出导出文件 | ||
| 160 | + response.setHeader("content-type", "application/octet-stream"); | ||
| 161 | + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName()); | ||
| 162 | + response.setContentType("application/octet-stream"); | ||
| 163 | + | ||
| 164 | + OutputStream os = response.getOutputStream(); | ||
| 165 | + BufferedOutputStream bos = new BufferedOutputStream(os); | ||
| 166 | + | ||
| 167 | + InputStream is = new FileInputStream(dataToolsFile.getFile()); | ||
| 168 | + BufferedInputStream bis = new BufferedInputStream(is); | ||
| 169 | + | ||
| 170 | + int length = 0; | ||
| 171 | + byte[] temp = new byte[1 * 1024 * 10]; | ||
| 172 | + while ((length = bis.read(temp)) != -1) { | ||
| 173 | + bos.write(temp, 0, length); | ||
| 174 | + } | ||
| 175 | + bos.flush(); | ||
| 176 | + bis.close(); | ||
| 177 | + bos.close(); | ||
| 178 | + is.close(); | ||
| 179 | + } | ||
| 180 | + | ||
| 181 | +} |
src/main/java/com/bsth/controller/schedule/core/LogController_facade.java
| 1 | -package com.bsth.controller.schedule.core; | ||
| 2 | - | ||
| 3 | -import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 5 | -import com.bsth.control_v2.plan_module.common.dto.schedule.log.ModuleOperatorLogDto; | ||
| 6 | -import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 7 | -import com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade; | ||
| 8 | -import com.bsth.controller.schedule.BController_facade; | ||
| 9 | -import org.springframework.context.annotation.Conditional; | ||
| 10 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 11 | -import org.springframework.web.bind.annotation.RestController; | ||
| 12 | - | ||
| 13 | -@RestController | ||
| 14 | -@Conditional(DubboConfigCondition.class) | ||
| 15 | -@RequestMapping("s_log") | ||
| 16 | -public class LogController_facade extends BController_facade<Long, ModuleOperatorLogDto> { | ||
| 17 | - @Reference | ||
| 18 | - private LogServiceFacade logServiceFacade; | ||
| 19 | - | ||
| 20 | - @Override | ||
| 21 | - protected BServiceFacade<Long, ModuleOperatorLogDto> getBServiceFacade() { | ||
| 22 | - return logServiceFacade; | ||
| 23 | - } | ||
| 24 | -} | 1 | +package com.bsth.controller.schedule.core; |
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.schedule.log.ModuleOperatorLogDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade; | ||
| 8 | +import com.bsth.controller.schedule.BController_facade; | ||
| 9 | +import org.springframework.context.annotation.Conditional; | ||
| 10 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 11 | +import org.springframework.web.bind.annotation.RestController; | ||
| 12 | + | ||
| 13 | +@RestController | ||
| 14 | +@Conditional(DubboConfigCondition.class) | ||
| 15 | +@RequestMapping("s_log") | ||
| 16 | +public class LogController_facade extends BController_facade<Long, ModuleOperatorLogDto> { | ||
| 17 | + @Reference | ||
| 18 | + private LogServiceFacade logServiceFacade; | ||
| 19 | + | ||
| 20 | + @Override | ||
| 21 | + protected BServiceFacade<Long, ModuleOperatorLogDto> getBServiceFacade() { | ||
| 22 | + return logServiceFacade; | ||
| 23 | + } | ||
| 24 | +} |
src/main/java/com/bsth/controller/schedule/core/SchedulePlanController_facade.java
| 1 | -package com.bsth.controller.schedule.core; | ||
| 2 | - | ||
| 3 | -import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | -import com.bsth.common.ResponseCode; | ||
| 5 | -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | -import com.bsth.control_v2.plan_module.common.dto.schedule.PlanDto; | ||
| 7 | -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | -import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | -import com.bsth.control_v2.plan_module.common.service.schedule.PlanServiceFacade; | ||
| 10 | -import com.bsth.control_v2.plan_module.common.service.schedule.validate.PlanPreValidateFacade; | ||
| 11 | -import com.bsth.controller.schedule.BController_facade; | ||
| 12 | -import com.bsth.entity.schedule.SchedulePlan; | ||
| 13 | -import com.bsth.service.schedule.SchedulePlanService; | ||
| 14 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | -import org.springframework.context.annotation.Conditional; | ||
| 16 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 17 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | -import org.springframework.web.bind.annotation.RestController; | ||
| 20 | - | ||
| 21 | -import java.util.Date; | ||
| 22 | -import java.util.HashMap; | ||
| 23 | -import java.util.Map; | ||
| 24 | - | ||
| 25 | -@RestController | ||
| 26 | -@Conditional(DubboConfigCondition.class) | ||
| 27 | -@RequestMapping("spc") | ||
| 28 | -public class SchedulePlanController_facade extends BController_facade<Long, PlanDto> { | ||
| 29 | - @Reference | ||
| 30 | - private PlanServiceFacade planServiceFacade; | ||
| 31 | - @Reference | ||
| 32 | - private PlanPreValidateFacade planPreValidateFacade; | ||
| 33 | - | ||
| 34 | - @Override | ||
| 35 | - protected BServiceFacade<Long, PlanDto> getBServiceFacade() { | ||
| 36 | - return planServiceFacade; | ||
| 37 | - } | ||
| 38 | - | ||
| 39 | - /** | ||
| 40 | - * 创建指定线路,指定时间范围内的排班计划,使用的时刻表情况 | ||
| 41 | - * @param xlid 线路id | ||
| 42 | - * @param from 开始时间 | ||
| 43 | - * @param to 结束时间 | ||
| 44 | - * @return | ||
| 45 | - * @throws Exception | ||
| 46 | - */ | ||
| 47 | - @RequestMapping(value = "/valttinfo/{xlid}/{from}/{to}", method = RequestMethod.GET) | ||
| 48 | - public Map<String, Object> validateTTInfo( | ||
| 49 | - @PathVariable(value = "xlid") Integer xlid, | ||
| 50 | - @PathVariable(value = "from") Date from, | ||
| 51 | - @PathVariable(value = "to") Date to | ||
| 52 | - ) throws Exception { | ||
| 53 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 54 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 55 | - rtn.put("data", planPreValidateFacade.validateTTInfo(xlid, from, to)); | ||
| 56 | - return rtn; | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | - /** | ||
| 60 | - * 验证排班计划时间范围内规则的正确性。 | ||
| 61 | - * @return | ||
| 62 | - * @throws Exception | ||
| 63 | - */ | ||
| 64 | - @RequestMapping(value = "/valttrule/{xlid}/{from}/{to}", method = RequestMethod.GET) | ||
| 65 | - public Map<String, Object> validateRule( | ||
| 66 | - @PathVariable(value = "xlid") Integer xlid, | ||
| 67 | - @PathVariable(value = "from") Date from, | ||
| 68 | - @PathVariable(value = "to") Date to | ||
| 69 | - ) throws Exception { | ||
| 70 | - Map<String, Object> rtn = new HashMap<>(); | ||
| 71 | - rtn.put("status", ResponseCode.SUCCESS); | ||
| 72 | - rtn.put("data", planPreValidateFacade.validateRule(xlid, from, to)); | ||
| 73 | - return rtn; | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | - @Override | ||
| 77 | - public void setCreateUserInfo(PlanDto planDto, Integer userId, Date createDate) { | ||
| 78 | - UserDto userDto = UserDto.getBuilder() | ||
| 79 | - .setId(userId) | ||
| 80 | - .build(); | ||
| 81 | - planDto.setCreateBy(userDto); | ||
| 82 | - planDto.setCreateDate(createDate); | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - @Override | ||
| 86 | - public void setUpdateUserInfo(PlanDto planDto, Integer userId, Date updateDate) { | ||
| 87 | - UserDto userDto = UserDto.getBuilder() | ||
| 88 | - .setId(userId) | ||
| 89 | - .build(); | ||
| 90 | - planDto.setUpdateBy(userDto); | ||
| 91 | - planDto.setUpdateDate(updateDate); | ||
| 92 | - } | ||
| 93 | - | ||
| 94 | - //------------------------- 以下是还未服务话的功能 --------------------------// | ||
| 95 | - @Autowired | ||
| 96 | - private SchedulePlanService schedulePlanService; | ||
| 97 | - | ||
| 98 | - /** | ||
| 99 | - * 获取明天的一歌排班计划。 | ||
| 100 | - * @return | ||
| 101 | - * @throws Exception | ||
| 102 | - */ | ||
| 103 | - @RequestMapping(value = "/tommorw", method = RequestMethod.GET) | ||
| 104 | - public SchedulePlan getTommorwPlan() throws Exception { | ||
| 105 | - try { | ||
| 106 | - return schedulePlanService.findSchedulePlanTommorw(); | ||
| 107 | - } catch (Exception exp) { | ||
| 108 | - throw new Exception(exp.getCause()); | ||
| 109 | - } | ||
| 110 | - } | ||
| 111 | -} | 1 | +package com.bsth.controller.schedule.core; |
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.schedule.PlanDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | +import com.bsth.control_v2.plan_module.common.service.schedule.PlanServiceFacade; | ||
| 10 | +import com.bsth.control_v2.plan_module.common.service.schedule.validate.PlanPreValidateFacade; | ||
| 11 | +import com.bsth.controller.schedule.BController_facade; | ||
| 12 | +import com.bsth.entity.schedule.SchedulePlan; | ||
| 13 | +import com.bsth.service.schedule.SchedulePlanService; | ||
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | +import org.springframework.context.annotation.Conditional; | ||
| 16 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 17 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 18 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 19 | +import org.springframework.web.bind.annotation.RestController; | ||
| 20 | + | ||
| 21 | +import java.util.Date; | ||
| 22 | +import java.util.HashMap; | ||
| 23 | +import java.util.Map; | ||
| 24 | + | ||
| 25 | +@RestController | ||
| 26 | +@Conditional(DubboConfigCondition.class) | ||
| 27 | +@RequestMapping("spc") | ||
| 28 | +public class SchedulePlanController_facade extends BController_facade<Long, PlanDto> { | ||
| 29 | + @Reference | ||
| 30 | + private PlanServiceFacade planServiceFacade; | ||
| 31 | + @Reference | ||
| 32 | + private PlanPreValidateFacade planPreValidateFacade; | ||
| 33 | + | ||
| 34 | + @Override | ||
| 35 | + protected BServiceFacade<Long, PlanDto> getBServiceFacade() { | ||
| 36 | + return planServiceFacade; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 创建指定线路,指定时间范围内的排班计划,使用的时刻表情况 | ||
| 41 | + * @param xlid 线路id | ||
| 42 | + * @param from 开始时间 | ||
| 43 | + * @param to 结束时间 | ||
| 44 | + * @return | ||
| 45 | + * @throws Exception | ||
| 46 | + */ | ||
| 47 | + @RequestMapping(value = "/valttinfo/{xlid}/{from}/{to}", method = RequestMethod.GET) | ||
| 48 | + public Map<String, Object> validateTTInfo( | ||
| 49 | + @PathVariable(value = "xlid") Integer xlid, | ||
| 50 | + @PathVariable(value = "from") Date from, | ||
| 51 | + @PathVariable(value = "to") Date to | ||
| 52 | + ) throws Exception { | ||
| 53 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 54 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 55 | + rtn.put("data", planPreValidateFacade.validateTTInfo(xlid, from, to)); | ||
| 56 | + return rtn; | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 60 | + * 验证排班计划时间范围内规则的正确性。 | ||
| 61 | + * @return | ||
| 62 | + * @throws Exception | ||
| 63 | + */ | ||
| 64 | + @RequestMapping(value = "/valttrule/{xlid}/{from}/{to}", method = RequestMethod.GET) | ||
| 65 | + public Map<String, Object> validateRule( | ||
| 66 | + @PathVariable(value = "xlid") Integer xlid, | ||
| 67 | + @PathVariable(value = "from") Date from, | ||
| 68 | + @PathVariable(value = "to") Date to | ||
| 69 | + ) throws Exception { | ||
| 70 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 71 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 72 | + rtn.put("data", planPreValidateFacade.validateRule(xlid, from, to)); | ||
| 73 | + return rtn; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + @Override | ||
| 77 | + public void setCreateUserInfo(PlanDto planDto, Integer userId, Date createDate) { | ||
| 78 | + UserDto userDto = UserDto.getBuilder() | ||
| 79 | + .setId(userId) | ||
| 80 | + .build(); | ||
| 81 | + planDto.setCreateBy(userDto); | ||
| 82 | + planDto.setCreateDate(createDate); | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + @Override | ||
| 86 | + public void setUpdateUserInfo(PlanDto planDto, Integer userId, Date updateDate) { | ||
| 87 | + UserDto userDto = UserDto.getBuilder() | ||
| 88 | + .setId(userId) | ||
| 89 | + .build(); | ||
| 90 | + planDto.setUpdateBy(userDto); | ||
| 91 | + planDto.setUpdateDate(updateDate); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + //------------------------- 以下是还未服务话的功能 --------------------------// | ||
| 95 | + @Autowired | ||
| 96 | + private SchedulePlanService schedulePlanService; | ||
| 97 | + | ||
| 98 | + /** | ||
| 99 | + * 获取明天的一歌排班计划。 | ||
| 100 | + * @return | ||
| 101 | + * @throws Exception | ||
| 102 | + */ | ||
| 103 | + @RequestMapping(value = "/tommorw", method = RequestMethod.GET) | ||
| 104 | + public SchedulePlan getTommorwPlan() throws Exception { | ||
| 105 | + try { | ||
| 106 | + return schedulePlanService.findSchedulePlanTommorw(); | ||
| 107 | + } catch (Exception exp) { | ||
| 108 | + throw new Exception(exp.getCause()); | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | +} |
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController_facade.java
| 1 | -package com.bsth.controller.schedule.core; | ||
| 2 | - | ||
| 3 | -import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | -import com.bsth.common.ResponseCode; | ||
| 5 | -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | -import com.bsth.control_v2.plan_module.common.dto.schedule.PlanInfoDto; | ||
| 7 | -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | -import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | -import com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade; | ||
| 10 | -import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils; | ||
| 11 | -import com.bsth.controller.schedule.BController_facade; | ||
| 12 | -import org.springframework.context.annotation.Conditional; | ||
| 13 | -import org.springframework.web.bind.annotation.PathVariable; | ||
| 14 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 15 | -import org.springframework.web.bind.annotation.RequestMethod; | ||
| 16 | -import org.springframework.web.bind.annotation.RestController; | ||
| 17 | - | ||
| 18 | -import java.util.Date; | ||
| 19 | -import java.util.HashMap; | ||
| 20 | -import java.util.Map; | ||
| 21 | - | ||
| 22 | -@RestController | ||
| 23 | -@Conditional(DubboConfigCondition.class) | ||
| 24 | -@RequestMapping("spic") | ||
| 25 | -public class SchedulePlanInfoController_facade extends BController_facade<Long, PlanInfoDto> { | ||
| 26 | - @Reference | ||
| 27 | - private PlanInfoServiceFacade planInfoServiceFacade; | ||
| 28 | - | ||
| 29 | - @Override | ||
| 30 | - protected BServiceFacade<Long, PlanInfoDto> getBServiceFacade() { | ||
| 31 | - return planInfoServiceFacade; | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | - @Override | ||
| 35 | - public void setCreateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date createDate) { | ||
| 36 | - UserDto userDto = UserDto.getBuilder() | ||
| 37 | - .setId(userId) | ||
| 38 | - .build(); | ||
| 39 | - planInfoDto.setCreateBy(userDto); | ||
| 40 | - planInfoDto.setCreateDate(createDate); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - @Override | ||
| 44 | - public void setUpdateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date updateDate) { | ||
| 45 | - UserDto userDto = UserDto.getBuilder() | ||
| 46 | - .setId(userId) | ||
| 47 | - .build(); | ||
| 48 | - planInfoDto.setUpdateBy(userDto); | ||
| 49 | - planInfoDto.setUpdateDate(updateDate); | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - @Override | ||
| 53 | - protected boolean isUpdateExtend() { | ||
| 54 | - return true; | ||
| 55 | - } | ||
| 56 | - | ||
| 57 | - @Override | ||
| 58 | - protected PlanInfoDto updateExtend(PlanInfoDto planInfoDto) { | ||
| 59 | - return this.planInfoServiceFacade.updateInfo(planInfoDto, SystemInfoUtils.createClientSystemInfo()); | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - @RequestMapping(value = "/groupextinfos/{xlid}/{date}", method = RequestMethod.GET) | ||
| 63 | - public Map<String, Object> findGroupInfoExt( | ||
| 64 | - @PathVariable(value = "xlid") Integer xlid, | ||
| 65 | - @PathVariable(value = "date") Date scheduleDate) { | ||
| 66 | - Map<String, Object> resultMap = new HashMap<>(); | ||
| 67 | - try { | ||
| 68 | - resultMap.put("status", ResponseCode.SUCCESS); | ||
| 69 | - resultMap.put("data", this.planInfoServiceFacade.findPlanGroupInfo(xlid, scheduleDate)); | ||
| 70 | - | ||
| 71 | - } catch (Exception exp) { | ||
| 72 | - exp.printStackTrace(); | ||
| 73 | - resultMap.put("status", ResponseCode.ERROR); | ||
| 74 | - resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 75 | - } | ||
| 76 | - | ||
| 77 | - return resultMap; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - @RequestMapping(value = "/lastestsd/{xlid}", method = RequestMethod.GET) | ||
| 81 | - public Map<String, Object> findLastestPlanDate( | ||
| 82 | - @PathVariable(value = "xlid") Integer xlid) { | ||
| 83 | - Map<String, Object> resultMap = new HashMap<>(); | ||
| 84 | - try { | ||
| 85 | - resultMap.put("status", ResponseCode.SUCCESS); | ||
| 86 | - resultMap.put("data", this.planInfoServiceFacade.findLastestPlanInfoDate(xlid)); | ||
| 87 | - | ||
| 88 | - } catch (Exception exp) { | ||
| 89 | - exp.printStackTrace(); | ||
| 90 | - resultMap.put("status", ResponseCode.ERROR); | ||
| 91 | - resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 92 | - } | ||
| 93 | - | ||
| 94 | - return resultMap; | ||
| 95 | - } | ||
| 96 | - | ||
| 97 | - | ||
| 98 | -} | 1 | +package com.bsth.controller.schedule.core; |
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.common.ResponseCode; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.schedule.PlanInfoDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 9 | +import com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade; | ||
| 10 | +import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils; | ||
| 11 | +import com.bsth.controller.schedule.BController_facade; | ||
| 12 | +import org.springframework.context.annotation.Conditional; | ||
| 13 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 14 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 15 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 16 | +import org.springframework.web.bind.annotation.RestController; | ||
| 17 | + | ||
| 18 | +import java.util.Date; | ||
| 19 | +import java.util.HashMap; | ||
| 20 | +import java.util.Map; | ||
| 21 | + | ||
| 22 | +@RestController | ||
| 23 | +@Conditional(DubboConfigCondition.class) | ||
| 24 | +@RequestMapping("spic") | ||
| 25 | +public class SchedulePlanInfoController_facade extends BController_facade<Long, PlanInfoDto> { | ||
| 26 | + @Reference | ||
| 27 | + private PlanInfoServiceFacade planInfoServiceFacade; | ||
| 28 | + | ||
| 29 | + @Override | ||
| 30 | + protected BServiceFacade<Long, PlanInfoDto> getBServiceFacade() { | ||
| 31 | + return planInfoServiceFacade; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + @Override | ||
| 35 | + public void setCreateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date createDate) { | ||
| 36 | + UserDto userDto = UserDto.getBuilder() | ||
| 37 | + .setId(userId) | ||
| 38 | + .build(); | ||
| 39 | + planInfoDto.setCreateBy(userDto); | ||
| 40 | + planInfoDto.setCreateDate(createDate); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + @Override | ||
| 44 | + public void setUpdateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date updateDate) { | ||
| 45 | + UserDto userDto = UserDto.getBuilder() | ||
| 46 | + .setId(userId) | ||
| 47 | + .build(); | ||
| 48 | + planInfoDto.setUpdateBy(userDto); | ||
| 49 | + planInfoDto.setUpdateDate(updateDate); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + @Override | ||
| 53 | + protected boolean isUpdateExtend() { | ||
| 54 | + return true; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + @Override | ||
| 58 | + protected PlanInfoDto updateExtend(PlanInfoDto planInfoDto) { | ||
| 59 | + return this.planInfoServiceFacade.updateInfo(planInfoDto, SystemInfoUtils.createClientSystemInfo()); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + @RequestMapping(value = "/groupextinfos/{xlid}/{date}", method = RequestMethod.GET) | ||
| 63 | + public Map<String, Object> findGroupInfoExt( | ||
| 64 | + @PathVariable(value = "xlid") Integer xlid, | ||
| 65 | + @PathVariable(value = "date") Date scheduleDate) { | ||
| 66 | + Map<String, Object> resultMap = new HashMap<>(); | ||
| 67 | + try { | ||
| 68 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 69 | + resultMap.put("data", this.planInfoServiceFacade.findPlanGroupInfo(xlid, scheduleDate)); | ||
| 70 | + | ||
| 71 | + } catch (Exception exp) { | ||
| 72 | + exp.printStackTrace(); | ||
| 73 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 74 | + resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + return resultMap; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + @RequestMapping(value = "/lastestsd/{xlid}", method = RequestMethod.GET) | ||
| 81 | + public Map<String, Object> findLastestPlanDate( | ||
| 82 | + @PathVariable(value = "xlid") Integer xlid) { | ||
| 83 | + Map<String, Object> resultMap = new HashMap<>(); | ||
| 84 | + try { | ||
| 85 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 86 | + resultMap.put("data", this.planInfoServiceFacade.findLastestPlanInfoDate(xlid)); | ||
| 87 | + | ||
| 88 | + } catch (Exception exp) { | ||
| 89 | + exp.printStackTrace(); | ||
| 90 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 91 | + resultMap.put("msg", exp.getLocalizedMessage()); | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + return resultMap; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + | ||
| 98 | +} |
src/main/java/com/bsth/controller/schedule/core/TTInfoBxDetailController_facade.java
| 1 | -package com.bsth.controller.schedule.core; | ||
| 2 | - | ||
| 3 | -import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 5 | -import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoBxDetailDto; | ||
| 6 | -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 7 | -import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 8 | -import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade; | ||
| 9 | -import com.bsth.controller.schedule.BController_facade; | ||
| 10 | -import org.springframework.context.annotation.Conditional; | ||
| 11 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 12 | -import org.springframework.web.bind.annotation.RestController; | ||
| 13 | - | ||
| 14 | -import java.util.Date; | ||
| 15 | - | ||
| 16 | -@RestController | ||
| 17 | -@Conditional(DubboConfigCondition.class) | ||
| 18 | -@RequestMapping("tibxdc") | ||
| 19 | -public class TTInfoBxDetailController_facade extends BController_facade<Long, TTInfoBxDetailDto> { | ||
| 20 | - @Reference | ||
| 21 | - private TTInfoBxDetailServiceFacade ttInfoBxDetailServiceFacade; | ||
| 22 | - | ||
| 23 | - @Override | ||
| 24 | - protected BServiceFacade<Long, TTInfoBxDetailDto> getBServiceFacade() { | ||
| 25 | - return ttInfoBxDetailServiceFacade; | ||
| 26 | - } | ||
| 27 | - | ||
| 28 | - @Override | ||
| 29 | - public void setCreateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date createDate) { | ||
| 30 | - UserDto userDto = UserDto.getBuilder() | ||
| 31 | - .setId(userId) | ||
| 32 | - .build(); | ||
| 33 | - ttInfoBxDetailDto.setCreateBy(userDto); | ||
| 34 | - ttInfoBxDetailDto.setCreateDate(createDate); | ||
| 35 | - } | ||
| 36 | - | ||
| 37 | - @Override | ||
| 38 | - public void setUpdateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date updateDate) { | ||
| 39 | - UserDto userDto = UserDto.getBuilder() | ||
| 40 | - .setId(userId) | ||
| 41 | - .build(); | ||
| 42 | - ttInfoBxDetailDto.setUpdateBy(userDto); | ||
| 43 | - ttInfoBxDetailDto.setUpdateDate(updateDate); | ||
| 44 | - } | ||
| 45 | -} | 1 | +package com.bsth.controller.schedule.core; |
| 2 | + | ||
| 3 | +import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition; | ||
| 5 | +import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoBxDetailDto; | ||
| 6 | +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto; | ||
| 7 | +import com.bsth.control_v2.plan_module.common.service.BServiceFacade; | ||
| 8 | +import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade; | ||
| 9 | +import com.bsth.controller.schedule.BController_facade; | ||
| 10 | +import org.springframework.context.annotation.Conditional; | ||
| 11 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 12 | +import org.springframework.web.bind.annotation.RestController; | ||
| 13 | + | ||
| 14 | +import java.util.Date; | ||
| 15 | + | ||
| 16 | +@RestController | ||
| 17 | +@Conditional(DubboConfigCondition.class) | ||
| 18 | +@RequestMapping("tibxdc") | ||
| 19 | +public class TTInfoBxDetailController_facade extends BController_facade<Long, TTInfoBxDetailDto> { | ||
| 20 | + @Reference | ||
| 21 | + private TTInfoBxDetailServiceFacade ttInfoBxDetailServiceFacade; | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + protected BServiceFacade<Long, TTInfoBxDetailDto> getBServiceFacade() { | ||
| 25 | + return ttInfoBxDetailServiceFacade; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + @Override | ||
| 29 | + public void setCreateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date createDate) { | ||
| 30 | + UserDto userDto = UserDto.getBuilder() | ||
| 31 | + .setId(userId) | ||
| 32 | + .build(); | ||
| 33 | + ttInfoBxDetailDto.setCreateBy(userDto); | ||
| 34 | + ttInfoBxDetailDto.setCreateDate(createDate); | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + @Override | ||
| 38 | + public void setUpdateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date updateDate) { | ||
| 39 | + UserDto userDto = UserDto.getBuilder() | ||
| 40 | + .setId(userId) | ||
| 41 | + .build(); | ||
| 42 | + ttInfoBxDetailDto.setUpdateBy(userDto); | ||
| 43 | + ttInfoBxDetailDto.setUpdateDate(updateDate); | ||
| 44 | + } | ||
| 45 | +} |
src/main/java/com/bsth/controller/schedule/core/legacy/TTInfoBxDetailController.java
| 1 | -package com.bsth.controller.schedule.core.legacy; | ||
| 2 | - | ||
| 3 | -import com.bsth.controller.schedule.BController; | ||
| 4 | -import com.bsth.controller.schedule.core.TTInfoBxDetailController_facade; | ||
| 5 | -import com.bsth.entity.schedule.TTInfoBxDetail; | ||
| 6 | -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||
| 7 | -import org.springframework.web.bind.annotation.RequestMapping; | ||
| 8 | -import org.springframework.web.bind.annotation.RestController; | ||
| 9 | - | ||
| 10 | -@RestController | ||
| 11 | -@ConditionalOnMissingBean(TTInfoBxDetailController_facade.class) | ||
| 12 | -@RequestMapping("tibxdc") | ||
| 13 | -public class TTInfoBxDetailController extends BController<TTInfoBxDetail, Long> { | ||
| 14 | -} | 1 | +package com.bsth.controller.schedule.core.legacy; |
| 2 | + | ||
| 3 | +import com.bsth.controller.schedule.BController; | ||
| 4 | +import com.bsth.controller.schedule.core.TTInfoBxDetailController_facade; | ||
| 5 | +import com.bsth.entity.schedule.TTInfoBxDetail; | ||
| 6 | +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||
| 7 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 8 | +import org.springframework.web.bind.annotation.RestController; | ||
| 9 | + | ||
| 10 | +@RestController | ||
| 11 | +@ConditionalOnMissingBean(TTInfoBxDetailController_facade.class) | ||
| 12 | +@RequestMapping("tibxdc") | ||
| 13 | +public class TTInfoBxDetailController extends BController<TTInfoBxDetail, Long> { | ||
| 14 | +} |
src/main/java/com/bsth/data/report_register/ReportRegisterService.java
| 1 | -package com.bsth.data.report_register; | ||
| 2 | - | ||
| 3 | -import com.bsth.data.report_register.entity.ReportRegister; | ||
| 4 | -import com.bsth.service.BaseService; | ||
| 5 | - | ||
| 6 | -import java.util.Map; | ||
| 7 | - | ||
| 8 | -public interface ReportRegisterService extends BaseService<ReportRegister, Long>{ | ||
| 9 | - | ||
| 10 | - Map<String, Object> findList(Map<String, String> map); | ||
| 11 | - | ||
| 12 | - Map<String, Object> deleteInfo( ReportRegister t); | ||
| 13 | -} | 1 | +package com.bsth.data.report_register; |
| 2 | + | ||
| 3 | +import com.bsth.data.report_register.entity.ReportRegister; | ||
| 4 | +import com.bsth.service.BaseService; | ||
| 5 | + | ||
| 6 | +import java.util.Map; | ||
| 7 | + | ||
| 8 | +public interface ReportRegisterService extends BaseService<ReportRegister, Long>{ | ||
| 9 | + | ||
| 10 | + Map<String, Object> findList(Map<String, String> map); | ||
| 11 | + | ||
| 12 | + Map<String, Object> deleteInfo( ReportRegister t); | ||
| 13 | +} |
src/main/java/com/bsth/data/report_register/ReportRegisterServiceImpl.java
| 1 | -package com.bsth.data.report_register; | ||
| 2 | - | ||
| 3 | -import com.bsth.common.ResponseCode; | ||
| 4 | -import com.bsth.data.report_register.entity.ReportRegister; | ||
| 5 | -import com.bsth.service.impl.BaseServiceImpl; | ||
| 6 | -import com.bsth.util.ReportUtils; | ||
| 7 | -import org.slf4j.Logger; | ||
| 8 | -import org.slf4j.LoggerFactory; | ||
| 9 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | -import org.springframework.dao.DataIntegrityViolationException; | ||
| 11 | -import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
| 12 | -import org.springframework.jdbc.core.JdbcTemplate; | ||
| 13 | -import org.springframework.stereotype.Service; | ||
| 14 | - | ||
| 15 | -import java.text.SimpleDateFormat; | ||
| 16 | -import java.util.ArrayList; | ||
| 17 | -import java.util.Date; | ||
| 18 | -import java.util.HashMap; | ||
| 19 | -import java.util.Iterator; | ||
| 20 | -import java.util.List; | ||
| 21 | -import java.util.Map; | ||
| 22 | - | ||
| 23 | -@Service | ||
| 24 | -public class ReportRegisterServiceImpl extends BaseServiceImpl<ReportRegister, Long> implements ReportRegisterService{ | ||
| 25 | - | ||
| 26 | - Logger log = LoggerFactory.getLogger(this.getClass()); | ||
| 27 | - | ||
| 28 | - @Autowired | ||
| 29 | - JdbcTemplate jdbcTemplate; | ||
| 30 | - | ||
| 31 | - @Override | ||
| 32 | - public Map<String, Object> findList(Map<String, String> map) { | ||
| 33 | - Map<String, Object> rs = new HashMap(); | ||
| 34 | - try { | ||
| 35 | - | ||
| 36 | - String lineCodes = map.get("lineCodes") == null ? "" : map.get("lineCodes").toString(); | ||
| 37 | - String lineName = map.get("lineName") == null ? "" : map.get("lineName").toString(); | ||
| 38 | - String type = map.get("type") == null ? "" : map.get("type").toString(); | ||
| 39 | - String date1 = "",date2 = ""; | ||
| 40 | - String isFindDelete = ""; | ||
| 41 | - if(type!=null && (type.equals("query") || type.equals("export"))){ | ||
| 42 | - // 导出是不要删除的 | ||
| 43 | - if(type.equals("export")) | ||
| 44 | - isFindDelete = " and STATUS !=2 "; | ||
| 45 | - date1 = map.get("date1") == null ? "" : map.get("date1").toString()+" 00:00:00"; | ||
| 46 | - date2 = map.get("date2") == null ? "" : map.get("date2").toString()+" 23:59:59"; | ||
| 47 | - } else { | ||
| 48 | - Date startDate = new Date(); | ||
| 49 | - startDate.setHours(0); | ||
| 50 | - startDate.setMinutes(0); | ||
| 51 | - startDate.setSeconds(0); | ||
| 52 | - Date endDate = new Date(); | ||
| 53 | - endDate.setHours(23); | ||
| 54 | - endDate.setMinutes(59); | ||
| 55 | - endDate.setSeconds(59); | ||
| 56 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 57 | - date1 = sdf.format(startDate); | ||
| 58 | - date2 = sdf.format(endDate); | ||
| 59 | - } | ||
| 60 | - String sql = "select * from bsth_t_report where REPORT_DATE >=\""+date1+"\" and REPORT_DATE <= \""+date2+"\" and REPORT_XL in("+lineCodes+") " + isFindDelete; | ||
| 61 | - List<ReportRegister> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ReportRegister.class)); | ||
| 62 | - | ||
| 63 | - if(type!=null && type.equals("export")){ | ||
| 64 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 65 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 66 | - String dateTime = ""; | ||
| 67 | - try { | ||
| 68 | - String dateStr1 = sdfSimple.format(sdfMonth.parse(date1)); | ||
| 69 | - String dateStr2 = sdfSimple.format(sdfMonth.parse(date2)); | ||
| 70 | - if (dateStr1.equals(dateStr2)) { | ||
| 71 | - dateTime = dateStr1; | ||
| 72 | - } else { | ||
| 73 | - dateTime = dateStr1 + "-" + dateStr2; | ||
| 74 | - } | ||
| 75 | - } catch (Exception e) { | ||
| 76 | - // TODO: handle exception | ||
| 77 | - e.printStackTrace(); | ||
| 78 | - } | ||
| 79 | - List<List<Iterator<?>>> lists = new ArrayList<>(); | ||
| 80 | - List<Iterator<?>> list1 = new ArrayList<>(); | ||
| 81 | - List<Iterator<?>> list2 = new ArrayList<>(); | ||
| 82 | - List<Iterator<?>> list3 = new ArrayList<>(); | ||
| 83 | - List<Iterator<?>> list4 = new ArrayList<>(); | ||
| 84 | - List<Iterator<?>> list5 = new ArrayList<>(); | ||
| 85 | - List<Iterator<?>> list6 = new ArrayList<>(); | ||
| 86 | - List<Map<String, Object>> resList1 = new ArrayList<Map<String, Object>>(); | ||
| 87 | - List<Map<String, Object>> resList2 = new ArrayList<Map<String, Object>>(); | ||
| 88 | - List<Map<String, Object>> resList3 = new ArrayList<Map<String, Object>>(); | ||
| 89 | - List<Map<String, Object>> resList4 = new ArrayList<Map<String, Object>>(); | ||
| 90 | - List<Map<String, Object>> resList5 = new ArrayList<Map<String, Object>>(); | ||
| 91 | - List<Map<String, Object>> resList6 = new ArrayList<Map<String, Object>>(); | ||
| 92 | - int i1 =0,i2 =0,i3 =0,i4 =0,i5 =0,i6 =0; | ||
| 93 | - ReportUtils ee = new ReportUtils(); | ||
| 94 | - for (ReportRegister l : list) { | ||
| 95 | - Map<String, Object> m = new HashMap<String, Object>(); | ||
| 96 | - String report_type = l.getREPORT_TYPE(); | ||
| 97 | - m.put("REPORT_DATE", l.getREPORT_DATE()); | ||
| 98 | - m.put("REPORT_TYPE", report_type); | ||
| 99 | - m.put("REPORT_GSNAME", l.getREPORT_GSNAME()); | ||
| 100 | - m.put("REPORT_FGSNAME", l.getREPORT_FGSNAME()); | ||
| 101 | - m.put("REPORT_BBR", l.getREPORT_BBR()); | ||
| 102 | - m.put("REPORT_XL", l.getREPORT_XL()); | ||
| 103 | - m.put("REPORT_XLNAME", l.getREPORT_XLNAME()); | ||
| 104 | - m.put("REPORT_STATION", l.getREPORT_STATION()); | ||
| 105 | - m.put("REPORT_DWSBBM", l.getREPORT_DWSBBM()); | ||
| 106 | - m.put("REPORT_DWSBSJ", l.getREPORT_DWSBSJ()); | ||
| 107 | - m.put("REPORT_YWSJ", l.getREPORT_YWSJ()); | ||
| 108 | - m.put("REPORT_SMBWD", l.getREPORT_SMBWD()); | ||
| 109 | - m.put("REPORT_DJGSJ", l.getREPORT_DJGSJ()); | ||
| 110 | - m.put("REPORT_DJGYY", l.getREPORT_DJGYY()); | ||
| 111 | - m.put("REPORT_TFSJ", l.getREPORT_TFSJ()); | ||
| 112 | - m.put("REPORT_YXSJ", l.getREPORT_YXSJ()); | ||
| 113 | - m.put("REPORT_YXBC", l.getREPORT_YXBC()); | ||
| 114 | - m.put("REPORT_TZCS", l.getREPORT_TZCS()); | ||
| 115 | - m.put("REPORT_SGBH", l.getREPORT_SGBH()); | ||
| 116 | - m.put("REPORT_ZBH", l.getREPORT_ZBH()); | ||
| 117 | - m.put("REPORT_PZH", l.getREPORT_PZH()); | ||
| 118 | - m.put("REPORT_JSY", l.getREPORT_JSY()); | ||
| 119 | - m.put("REPORT_SGSJ", l.getREPORT_SGSJ()); | ||
| 120 | - m.put("REPORT_SGDD", l.getREPORT_SGDD()); | ||
| 121 | - m.put("REPORT_XSFX", l.getREPORT_XSFX()); | ||
| 122 | - m.put("REPORT_SGDX", l.getREPORT_SGDX()); | ||
| 123 | - m.put("REPORT_DXPZH", l.getREPORT_DXPZH()); | ||
| 124 | - m.put("REPORT_SGGK", l.getREPORT_SGGK()); | ||
| 125 | - m.put("REPORT_SSRS", l.getREPORT_SSRS()); | ||
| 126 | - m.put("REPORT_SWRS", l.getREPORT_SWRS()); | ||
| 127 | - m.put("REPORT_BGR", l.getREPORT_BGR()); | ||
| 128 | - m.put("REPORT_BGRDH", l.getREPORT_BGRDH()); | ||
| 129 | - m.put("REPORT_BZ", l.getREPORT_BZ()); | ||
| 130 | - m.put("REPORT_ROAD", l.getREPORT_ROAD()); | ||
| 131 | - if(report_type.equals("1")){ | ||
| 132 | - i1++; | ||
| 133 | - m.put("i", i1); | ||
| 134 | - resList1.add(m); | ||
| 135 | - }else if(report_type.equals("2")){ | ||
| 136 | - i2++; | ||
| 137 | - m.put("i", i2); | ||
| 138 | - resList2.add(m); | ||
| 139 | - }else if(report_type.equals("3")){ | ||
| 140 | - i3++; | ||
| 141 | - m.put("i", i3); | ||
| 142 | - resList3.add(m); | ||
| 143 | - }else if(report_type.equals("4")){ | ||
| 144 | - i4++; | ||
| 145 | - m.put("i", i4); | ||
| 146 | - resList4.add(m); | ||
| 147 | - } else if(report_type.equals("5")){ | ||
| 148 | - i5++; | ||
| 149 | - m.put("i", i5); | ||
| 150 | - resList5.add(m); | ||
| 151 | - }else if(report_type.equals("6")){ | ||
| 152 | - i6++; | ||
| 153 | - m.put("i", i6); | ||
| 154 | - resList6.add(m); | ||
| 155 | - } | ||
| 156 | - } | ||
| 157 | - try { | ||
| 158 | - list1.add(resList1.iterator()); | ||
| 159 | - lists.add(list1); | ||
| 160 | - list2.add(resList2.iterator()); | ||
| 161 | - lists.add(list2); | ||
| 162 | - list3.add(resList3.iterator()); | ||
| 163 | - lists.add(list3); | ||
| 164 | - list4.add(resList4.iterator()); | ||
| 165 | - lists.add(list4); | ||
| 166 | - list5.add(resList5.iterator()); | ||
| 167 | - lists.add(list5); | ||
| 168 | - list6.add(resList6.iterator()); | ||
| 169 | - lists.add(list6); | ||
| 170 | - String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 171 | - ee.excelMoreSheetReplace(lists, new Object[]{map}, path + "mould/report_register.xls", | ||
| 172 | - path + "export/" + dateTime +"_"+lineName+ "_报备登记.xls"); | ||
| 173 | - } catch (Exception e) { | ||
| 174 | - // TODO: handle exception | ||
| 175 | - e.printStackTrace(); | ||
| 176 | - } | ||
| 177 | - } | ||
| 178 | - rs.put("status", ResponseCode.SUCCESS); | ||
| 179 | - rs.put("list", list); | ||
| 180 | - } | ||
| 181 | -// catch (ParseException e) { | ||
| 182 | -// e.printStackTrace(); | ||
| 183 | -// } | ||
| 184 | - catch (Exception e){ | ||
| 185 | - log.error("", e); | ||
| 186 | - rs.put("status", ResponseCode.ERROR); | ||
| 187 | - rs.put("msg", e.getMessage()); | ||
| 188 | - } | ||
| 189 | - return rs; | ||
| 190 | - } | ||
| 191 | - | ||
| 192 | - @Override | ||
| 193 | - public Map<String, Object> deleteInfo(ReportRegister rr) { | ||
| 194 | - Map<String, Object> map = new HashMap<>(); | ||
| 195 | - try{ | ||
| 196 | - Long id = rr.getID(); | ||
| 197 | - String bbr = rr.getREPORT_BBR(); | ||
| 198 | - | ||
| 199 | - jdbcTemplate.update("UPDATE bsth_t_report SET STATUS = 2,REPORT_BBR = ? WHERE ID = ? ",bbr,id); | ||
| 200 | - map.put("status", ResponseCode.SUCCESS); | ||
| 201 | - }catch(DataIntegrityViolationException de){ | ||
| 202 | - map.put("status", ResponseCode.ERROR); | ||
| 203 | - map.put("msg", "“完整性约束”校验失败,请检查要删除的对象是否存在外键约束"); | ||
| 204 | - } | ||
| 205 | - return map; | ||
| 206 | - } | ||
| 207 | -} | 1 | +package com.bsth.data.report_register; |
| 2 | + | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 4 | +import com.bsth.data.report_register.entity.ReportRegister; | ||
| 5 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 6 | +import com.bsth.util.ReportUtils; | ||
| 7 | +import org.slf4j.Logger; | ||
| 8 | +import org.slf4j.LoggerFactory; | ||
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 10 | +import org.springframework.dao.DataIntegrityViolationException; | ||
| 11 | +import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
| 12 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 13 | +import org.springframework.stereotype.Service; | ||
| 14 | + | ||
| 15 | +import java.text.SimpleDateFormat; | ||
| 16 | +import java.util.ArrayList; | ||
| 17 | +import java.util.Date; | ||
| 18 | +import java.util.HashMap; | ||
| 19 | +import java.util.Iterator; | ||
| 20 | +import java.util.List; | ||
| 21 | +import java.util.Map; | ||
| 22 | + | ||
| 23 | +@Service | ||
| 24 | +public class ReportRegisterServiceImpl extends BaseServiceImpl<ReportRegister, Long> implements ReportRegisterService{ | ||
| 25 | + | ||
| 26 | + Logger log = LoggerFactory.getLogger(this.getClass()); | ||
| 27 | + | ||
| 28 | + @Autowired | ||
| 29 | + JdbcTemplate jdbcTemplate; | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public Map<String, Object> findList(Map<String, String> map) { | ||
| 33 | + Map<String, Object> rs = new HashMap(); | ||
| 34 | + try { | ||
| 35 | + | ||
| 36 | + String lineCodes = map.get("lineCodes") == null ? "" : map.get("lineCodes").toString(); | ||
| 37 | + String lineName = map.get("lineName") == null ? "" : map.get("lineName").toString(); | ||
| 38 | + String type = map.get("type") == null ? "" : map.get("type").toString(); | ||
| 39 | + String date1 = "",date2 = ""; | ||
| 40 | + String isFindDelete = ""; | ||
| 41 | + if(type!=null && (type.equals("query") || type.equals("export"))){ | ||
| 42 | + // 导出是不要删除的 | ||
| 43 | + if(type.equals("export")) | ||
| 44 | + isFindDelete = " and STATUS !=2 "; | ||
| 45 | + date1 = map.get("date1") == null ? "" : map.get("date1").toString()+" 00:00:00"; | ||
| 46 | + date2 = map.get("date2") == null ? "" : map.get("date2").toString()+" 23:59:59"; | ||
| 47 | + } else { | ||
| 48 | + Date startDate = new Date(); | ||
| 49 | + startDate.setHours(0); | ||
| 50 | + startDate.setMinutes(0); | ||
| 51 | + startDate.setSeconds(0); | ||
| 52 | + Date endDate = new Date(); | ||
| 53 | + endDate.setHours(23); | ||
| 54 | + endDate.setMinutes(59); | ||
| 55 | + endDate.setSeconds(59); | ||
| 56 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 57 | + date1 = sdf.format(startDate); | ||
| 58 | + date2 = sdf.format(endDate); | ||
| 59 | + } | ||
| 60 | + String sql = "select * from bsth_t_report where REPORT_DATE >=\""+date1+"\" and REPORT_DATE <= \""+date2+"\" and REPORT_XL in("+lineCodes+") " + isFindDelete; | ||
| 61 | + List<ReportRegister> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ReportRegister.class)); | ||
| 62 | + | ||
| 63 | + if(type!=null && type.equals("export")){ | ||
| 64 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 65 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 66 | + String dateTime = ""; | ||
| 67 | + try { | ||
| 68 | + String dateStr1 = sdfSimple.format(sdfMonth.parse(date1)); | ||
| 69 | + String dateStr2 = sdfSimple.format(sdfMonth.parse(date2)); | ||
| 70 | + if (dateStr1.equals(dateStr2)) { | ||
| 71 | + dateTime = dateStr1; | ||
| 72 | + } else { | ||
| 73 | + dateTime = dateStr1 + "-" + dateStr2; | ||
| 74 | + } | ||
| 75 | + } catch (Exception e) { | ||
| 76 | + // TODO: handle exception | ||
| 77 | + e.printStackTrace(); | ||
| 78 | + } | ||
| 79 | + List<List<Iterator<?>>> lists = new ArrayList<>(); | ||
| 80 | + List<Iterator<?>> list1 = new ArrayList<>(); | ||
| 81 | + List<Iterator<?>> list2 = new ArrayList<>(); | ||
| 82 | + List<Iterator<?>> list3 = new ArrayList<>(); | ||
| 83 | + List<Iterator<?>> list4 = new ArrayList<>(); | ||
| 84 | + List<Iterator<?>> list5 = new ArrayList<>(); | ||
| 85 | + List<Iterator<?>> list6 = new ArrayList<>(); | ||
| 86 | + List<Map<String, Object>> resList1 = new ArrayList<Map<String, Object>>(); | ||
| 87 | + List<Map<String, Object>> resList2 = new ArrayList<Map<String, Object>>(); | ||
| 88 | + List<Map<String, Object>> resList3 = new ArrayList<Map<String, Object>>(); | ||
| 89 | + List<Map<String, Object>> resList4 = new ArrayList<Map<String, Object>>(); | ||
| 90 | + List<Map<String, Object>> resList5 = new ArrayList<Map<String, Object>>(); | ||
| 91 | + List<Map<String, Object>> resList6 = new ArrayList<Map<String, Object>>(); | ||
| 92 | + int i1 =0,i2 =0,i3 =0,i4 =0,i5 =0,i6 =0; | ||
| 93 | + ReportUtils ee = new ReportUtils(); | ||
| 94 | + for (ReportRegister l : list) { | ||
| 95 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 96 | + String report_type = l.getREPORT_TYPE(); | ||
| 97 | + m.put("REPORT_DATE", l.getREPORT_DATE()); | ||
| 98 | + m.put("REPORT_TYPE", report_type); | ||
| 99 | + m.put("REPORT_GSNAME", l.getREPORT_GSNAME()); | ||
| 100 | + m.put("REPORT_FGSNAME", l.getREPORT_FGSNAME()); | ||
| 101 | + m.put("REPORT_BBR", l.getREPORT_BBR()); | ||
| 102 | + m.put("REPORT_XL", l.getREPORT_XL()); | ||
| 103 | + m.put("REPORT_XLNAME", l.getREPORT_XLNAME()); | ||
| 104 | + m.put("REPORT_STATION", l.getREPORT_STATION()); | ||
| 105 | + m.put("REPORT_DWSBBM", l.getREPORT_DWSBBM()); | ||
| 106 | + m.put("REPORT_DWSBSJ", l.getREPORT_DWSBSJ()); | ||
| 107 | + m.put("REPORT_YWSJ", l.getREPORT_YWSJ()); | ||
| 108 | + m.put("REPORT_SMBWD", l.getREPORT_SMBWD()); | ||
| 109 | + m.put("REPORT_DJGSJ", l.getREPORT_DJGSJ()); | ||
| 110 | + m.put("REPORT_DJGYY", l.getREPORT_DJGYY()); | ||
| 111 | + m.put("REPORT_TFSJ", l.getREPORT_TFSJ()); | ||
| 112 | + m.put("REPORT_YXSJ", l.getREPORT_YXSJ()); | ||
| 113 | + m.put("REPORT_YXBC", l.getREPORT_YXBC()); | ||
| 114 | + m.put("REPORT_TZCS", l.getREPORT_TZCS()); | ||
| 115 | + m.put("REPORT_SGBH", l.getREPORT_SGBH()); | ||
| 116 | + m.put("REPORT_ZBH", l.getREPORT_ZBH()); | ||
| 117 | + m.put("REPORT_PZH", l.getREPORT_PZH()); | ||
| 118 | + m.put("REPORT_JSY", l.getREPORT_JSY()); | ||
| 119 | + m.put("REPORT_SGSJ", l.getREPORT_SGSJ()); | ||
| 120 | + m.put("REPORT_SGDD", l.getREPORT_SGDD()); | ||
| 121 | + m.put("REPORT_XSFX", l.getREPORT_XSFX()); | ||
| 122 | + m.put("REPORT_SGDX", l.getREPORT_SGDX()); | ||
| 123 | + m.put("REPORT_DXPZH", l.getREPORT_DXPZH()); | ||
| 124 | + m.put("REPORT_SGGK", l.getREPORT_SGGK()); | ||
| 125 | + m.put("REPORT_SSRS", l.getREPORT_SSRS()); | ||
| 126 | + m.put("REPORT_SWRS", l.getREPORT_SWRS()); | ||
| 127 | + m.put("REPORT_BGR", l.getREPORT_BGR()); | ||
| 128 | + m.put("REPORT_BGRDH", l.getREPORT_BGRDH()); | ||
| 129 | + m.put("REPORT_BZ", l.getREPORT_BZ()); | ||
| 130 | + m.put("REPORT_ROAD", l.getREPORT_ROAD()); | ||
| 131 | + if(report_type.equals("1")){ | ||
| 132 | + i1++; | ||
| 133 | + m.put("i", i1); | ||
| 134 | + resList1.add(m); | ||
| 135 | + }else if(report_type.equals("2")){ | ||
| 136 | + i2++; | ||
| 137 | + m.put("i", i2); | ||
| 138 | + resList2.add(m); | ||
| 139 | + }else if(report_type.equals("3")){ | ||
| 140 | + i3++; | ||
| 141 | + m.put("i", i3); | ||
| 142 | + resList3.add(m); | ||
| 143 | + }else if(report_type.equals("4")){ | ||
| 144 | + i4++; | ||
| 145 | + m.put("i", i4); | ||
| 146 | + resList4.add(m); | ||
| 147 | + } else if(report_type.equals("5")){ | ||
| 148 | + i5++; | ||
| 149 | + m.put("i", i5); | ||
| 150 | + resList5.add(m); | ||
| 151 | + }else if(report_type.equals("6")){ | ||
| 152 | + i6++; | ||
| 153 | + m.put("i", i6); | ||
| 154 | + resList6.add(m); | ||
| 155 | + } | ||
| 156 | + } | ||
| 157 | + try { | ||
| 158 | + list1.add(resList1.iterator()); | ||
| 159 | + lists.add(list1); | ||
| 160 | + list2.add(resList2.iterator()); | ||
| 161 | + lists.add(list2); | ||
| 162 | + list3.add(resList3.iterator()); | ||
| 163 | + lists.add(list3); | ||
| 164 | + list4.add(resList4.iterator()); | ||
| 165 | + lists.add(list4); | ||
| 166 | + list5.add(resList5.iterator()); | ||
| 167 | + lists.add(list5); | ||
| 168 | + list6.add(resList6.iterator()); | ||
| 169 | + lists.add(list6); | ||
| 170 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 171 | + ee.excelMoreSheetReplace(lists, new Object[]{map}, path + "mould/report_register.xls", | ||
| 172 | + path + "export/" + dateTime +"_"+lineName+ "_报备登记.xls"); | ||
| 173 | + } catch (Exception e) { | ||
| 174 | + // TODO: handle exception | ||
| 175 | + e.printStackTrace(); | ||
| 176 | + } | ||
| 177 | + } | ||
| 178 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 179 | + rs.put("list", list); | ||
| 180 | + } | ||
| 181 | +// catch (ParseException e) { | ||
| 182 | +// e.printStackTrace(); | ||
| 183 | +// } | ||
| 184 | + catch (Exception e){ | ||
| 185 | + log.error("", e); | ||
| 186 | + rs.put("status", ResponseCode.ERROR); | ||
| 187 | + rs.put("msg", e.getMessage()); | ||
| 188 | + } | ||
| 189 | + return rs; | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + @Override | ||
| 193 | + public Map<String, Object> deleteInfo(ReportRegister rr) { | ||
| 194 | + Map<String, Object> map = new HashMap<>(); | ||
| 195 | + try{ | ||
| 196 | + Long id = rr.getID(); | ||
| 197 | + String bbr = rr.getREPORT_BBR(); | ||
| 198 | + | ||
| 199 | + jdbcTemplate.update("UPDATE bsth_t_report SET STATUS = 2,REPORT_BBR = ? WHERE ID = ? ",bbr,id); | ||
| 200 | + map.put("status", ResponseCode.SUCCESS); | ||
| 201 | + }catch(DataIntegrityViolationException de){ | ||
| 202 | + map.put("status", ResponseCode.ERROR); | ||
| 203 | + map.put("msg", "“完整性约束”校验失败,请检查要删除的对象是否存在外键约束"); | ||
| 204 | + } | ||
| 205 | + return map; | ||
| 206 | + } | ||
| 207 | +} |
src/main/java/com/bsth/data/report_register/entity/ReportRegister.java
| 1 | -package com.bsth.data.report_register.entity; | ||
| 2 | - | ||
| 3 | -import javax.persistence.Column; | ||
| 4 | -import javax.persistence.Entity; | ||
| 5 | -import javax.persistence.GeneratedValue; | ||
| 6 | -import javax.persistence.Id; | ||
| 7 | -import javax.persistence.Table; | ||
| 8 | -import java.text.DateFormat; | ||
| 9 | -import java.text.SimpleDateFormat; | ||
| 10 | -import java.util.Date; | ||
| 11 | - | ||
| 12 | - | ||
| 13 | -@Entity | ||
| 14 | -@Table(name = "bsth_t_report") | ||
| 15 | -public class ReportRegister { | ||
| 16 | - | ||
| 17 | - @Id | ||
| 18 | - @GeneratedValue | ||
| 19 | - private long ID; | ||
| 20 | - | ||
| 21 | - /** 类型*/ | ||
| 22 | - private String REPORT_TYPE; | ||
| 23 | - /** 公司 */ | ||
| 24 | - private String REPORT_GS; | ||
| 25 | - /** 分公司 */ | ||
| 26 | - private String REPORT_FGS; | ||
| 27 | - /** 公司名 */ | ||
| 28 | - private String REPORT_GSNAME; | ||
| 29 | - /** 分公司名 */ | ||
| 30 | - private String REPORT_FGSNAME; | ||
| 31 | - /** 时间*/ | ||
| 32 | - private Date REPORT_DATE; | ||
| 33 | - /** 报备人*/ | ||
| 34 | - private String REPORT_BBR; | ||
| 35 | - /** 线路编码 */ | ||
| 36 | - private String REPORT_XL; | ||
| 37 | - /** 线路名*/ | ||
| 38 | - private String REPORT_XLNAME; | ||
| 39 | - /** 站点*/ | ||
| 40 | - private String REPORT_STATION; | ||
| 41 | - /** 对外上报部门*/ | ||
| 42 | - private String REPORT_DWSBBM; | ||
| 43 | - /** 对外上报时间*/ | ||
| 44 | - private String REPORT_DWSBSJ; | ||
| 45 | - /** 延误时间*/ | ||
| 46 | - private String REPORT_YWSJ; | ||
| 47 | - /** 首末班误点原因*/ | ||
| 48 | - private String REPORT_SMBWD; | ||
| 49 | - /** 大间隔时间*/ | ||
| 50 | - private String REPORT_DJGSJ; | ||
| 51 | - /** 大间隔原因*/ | ||
| 52 | - private String REPORT_DJGYY; | ||
| 53 | - /** 突发事件*/ | ||
| 54 | - private String REPORT_TFSJ; | ||
| 55 | - /** 影响时间*/ | ||
| 56 | - private String REPORT_YXSJ; | ||
| 57 | - /** 影响班次数*/ | ||
| 58 | - private String REPORT_YXBC; | ||
| 59 | - /** 调整措施*/ | ||
| 60 | - private String REPORT_TZCS; | ||
| 61 | - /** 报案事故编号*/ | ||
| 62 | - private String REPORT_SGBH; | ||
| 63 | - /** 车辆自编号*/ | ||
| 64 | - private String REPORT_ZBH; | ||
| 65 | - /** 车辆牌照号*/ | ||
| 66 | - private String REPORT_PZH; | ||
| 67 | - /** 驾驶员*/ | ||
| 68 | - private String REPORT_JSY; | ||
| 69 | - /** 事故发生时间*/ | ||
| 70 | - private String REPORT_SGSJ; | ||
| 71 | - /** 事故发生地点*/ | ||
| 72 | - private String REPORT_SGDD; | ||
| 73 | - /** 行驶方向*/ | ||
| 74 | - private String REPORT_XSFX; | ||
| 75 | - /** 事故对象*/ | ||
| 76 | - private String REPORT_SGDX; | ||
| 77 | - /** 对象车牌照号*/ | ||
| 78 | - private String REPORT_DXPZH; | ||
| 79 | - /** 事故概况*/ | ||
| 80 | - private String REPORT_SGGK; | ||
| 81 | - /** 受伤人数*/ | ||
| 82 | - private String REPORT_SSRS; | ||
| 83 | - /** 死亡人数*/ | ||
| 84 | - private String REPORT_SWRS; | ||
| 85 | - /** 报告人 */ | ||
| 86 | - private String REPORT_BGR; | ||
| 87 | - /** 报告人电话 */ | ||
| 88 | - private String REPORT_BGRDH; | ||
| 89 | - /** 备注 */ | ||
| 90 | - private String REPORT_BZ; | ||
| 91 | - /** 路段*/ | ||
| 92 | - private String REPORT_ROAD; | ||
| 93 | - /** 访问接口时使用的状态码 操作类型,0:新增;1:修改;2:删除 */ | ||
| 94 | - private String STATUS; | ||
| 95 | - /** 创建人*/ | ||
| 96 | - private String CREATE_BY; | ||
| 97 | - /** 创建时间 */ | ||
| 98 | - @Column(updatable = false, name = "CREATE_DATE", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 99 | - private Date CREATE_DATE; | ||
| 100 | - /** 修改人*/ | ||
| 101 | - private String UPDATE_BY; | ||
| 102 | - /** 修改时间*/ | ||
| 103 | - @Column(name = "UPDATE_DATE", columnDefinition = "UPDATE_DATE DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 104 | - private Date UPDATE_DATE; | ||
| 105 | - | ||
| 106 | - public long getID() { | ||
| 107 | - return ID; | ||
| 108 | - } | ||
| 109 | - | ||
| 110 | - public void setID(long ID) { | ||
| 111 | - this.ID = ID; | ||
| 112 | - } | ||
| 113 | - | ||
| 114 | - public String getREPORT_TYPE() { | ||
| 115 | - return REPORT_TYPE; | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - public void setREPORT_TYPE(String REPORT_TYPE) { | ||
| 119 | - this.REPORT_TYPE = REPORT_TYPE; | ||
| 120 | - } | ||
| 121 | - | ||
| 122 | - public String getREPORT_GS() { | ||
| 123 | - return REPORT_GS; | ||
| 124 | - } | ||
| 125 | - | ||
| 126 | - public void setREPORT_GS(String REPORT_GS) { | ||
| 127 | - this.REPORT_GS = REPORT_GS; | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - public String getREPORT_FGS() { | ||
| 131 | - return REPORT_FGS; | ||
| 132 | - } | ||
| 133 | - | ||
| 134 | - public void setREPORT_FGS(String REPORT_FGS) { | ||
| 135 | - this.REPORT_FGS = REPORT_FGS; | ||
| 136 | - } | ||
| 137 | - | ||
| 138 | - public String getREPORT_GSNAME() { | ||
| 139 | - return REPORT_GSNAME; | ||
| 140 | - } | ||
| 141 | - | ||
| 142 | - public void setREPORT_GSNAME(String REPORT_GSNAME) { | ||
| 143 | - this.REPORT_GSNAME = REPORT_GSNAME; | ||
| 144 | - } | ||
| 145 | - | ||
| 146 | - public String getREPORT_FGSNAME() { | ||
| 147 | - return REPORT_FGSNAME; | ||
| 148 | - } | ||
| 149 | - | ||
| 150 | - public void setREPORT_FGSNAME(String REPORT_FGSNAME) { | ||
| 151 | - this.REPORT_FGSNAME = REPORT_FGSNAME; | ||
| 152 | - } | ||
| 153 | - | ||
| 154 | - public Date getREPORT_DATE() { | ||
| 155 | - return REPORT_DATE; | ||
| 156 | - } | ||
| 157 | - | ||
| 158 | - public void setREPORT_DATE(Date REPORT_DATE) { | ||
| 159 | - this.REPORT_DATE = REPORT_DATE; | ||
| 160 | - } | ||
| 161 | - | ||
| 162 | - public String getREPORT_BBR() { | ||
| 163 | - return REPORT_BBR; | ||
| 164 | - } | ||
| 165 | - | ||
| 166 | - public void setREPORT_BBR(String REPORT_BBR) { | ||
| 167 | - this.REPORT_BBR = REPORT_BBR; | ||
| 168 | - } | ||
| 169 | - | ||
| 170 | - public String getREPORT_XL() { | ||
| 171 | - return REPORT_XL; | ||
| 172 | - } | ||
| 173 | - | ||
| 174 | - public void setREPORT_XL(String REPORT_XL) { | ||
| 175 | - this.REPORT_XL = REPORT_XL; | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - public String getREPORT_XLNAME() { | ||
| 179 | - return REPORT_XLNAME; | ||
| 180 | - } | ||
| 181 | - | ||
| 182 | - public void setREPORT_XLNAME(String REPORT_XLNAME) { | ||
| 183 | - this.REPORT_XLNAME = REPORT_XLNAME; | ||
| 184 | - } | ||
| 185 | - | ||
| 186 | - public String getREPORT_STATION() { | ||
| 187 | - return REPORT_STATION; | ||
| 188 | - } | ||
| 189 | - | ||
| 190 | - public void setREPORT_STATION(String REPORT_STATION) { | ||
| 191 | - this.REPORT_STATION = REPORT_STATION; | ||
| 192 | - } | ||
| 193 | - | ||
| 194 | - public String getREPORT_DWSBBM() { | ||
| 195 | - return REPORT_DWSBBM; | ||
| 196 | - } | ||
| 197 | - | ||
| 198 | - public void setREPORT_DWSBBM(String REPORT_DWSBBM) { | ||
| 199 | - this.REPORT_DWSBBM = REPORT_DWSBBM; | ||
| 200 | - } | ||
| 201 | - | ||
| 202 | - public String getREPORT_DWSBSJ() { | ||
| 203 | - return REPORT_DWSBSJ; | ||
| 204 | - } | ||
| 205 | - | ||
| 206 | - public void setREPORT_DWSBSJ(String REPORT_DWSBSJ) { | ||
| 207 | - this.REPORT_DWSBSJ = REPORT_DWSBSJ; | ||
| 208 | - } | ||
| 209 | - | ||
| 210 | - public String getREPORT_YWSJ() { | ||
| 211 | - return REPORT_YWSJ; | ||
| 212 | - } | ||
| 213 | - | ||
| 214 | - public void setREPORT_YWSJ(String REPORT_YWSJ) { | ||
| 215 | - this.REPORT_YWSJ = REPORT_YWSJ; | ||
| 216 | - } | ||
| 217 | - | ||
| 218 | - public String getREPORT_SMBWD() { | ||
| 219 | - return REPORT_SMBWD; | ||
| 220 | - } | ||
| 221 | - | ||
| 222 | - public void setREPORT_SMBWD(String REPORT_SMBWD) { | ||
| 223 | - this.REPORT_SMBWD = REPORT_SMBWD; | ||
| 224 | - } | ||
| 225 | - | ||
| 226 | - public String getREPORT_DJGSJ() { | ||
| 227 | - return REPORT_DJGSJ; | ||
| 228 | - } | ||
| 229 | - | ||
| 230 | - public void setREPORT_DJGSJ(String REPORT_DJGSJ) { | ||
| 231 | - this.REPORT_DJGSJ = REPORT_DJGSJ; | ||
| 232 | - } | ||
| 233 | - | ||
| 234 | - public String getREPORT_DJGYY() { | ||
| 235 | - return REPORT_DJGYY; | ||
| 236 | - } | ||
| 237 | - | ||
| 238 | - public void setREPORT_DJGYY(String REPORT_DJGYY) { | ||
| 239 | - this.REPORT_DJGYY = REPORT_DJGYY; | ||
| 240 | - } | ||
| 241 | - | ||
| 242 | - public String getREPORT_TFSJ() { | ||
| 243 | - return REPORT_TFSJ; | ||
| 244 | - } | ||
| 245 | - | ||
| 246 | - public void setREPORT_TFSJ(String REPORT_TFSJ) { | ||
| 247 | - this.REPORT_TFSJ = REPORT_TFSJ; | ||
| 248 | - } | ||
| 249 | - | ||
| 250 | - public String getREPORT_YXSJ() { | ||
| 251 | - return REPORT_YXSJ; | ||
| 252 | - } | ||
| 253 | - | ||
| 254 | - public void setREPORT_YXSJ(String REPORT_YXSJ) { | ||
| 255 | - this.REPORT_YXSJ = REPORT_YXSJ; | ||
| 256 | - } | ||
| 257 | - | ||
| 258 | - public String getREPORT_YXBC() { | ||
| 259 | - return REPORT_YXBC; | ||
| 260 | - } | ||
| 261 | - | ||
| 262 | - public void setREPORT_YXBC(String REPORT_YXBC) { | ||
| 263 | - this.REPORT_YXBC = REPORT_YXBC; | ||
| 264 | - } | ||
| 265 | - | ||
| 266 | - public String getREPORT_TZCS() { | ||
| 267 | - return REPORT_TZCS; | ||
| 268 | - } | ||
| 269 | - | ||
| 270 | - public void setREPORT_TZCS(String REPORT_TZCS) { | ||
| 271 | - this.REPORT_TZCS = REPORT_TZCS; | ||
| 272 | - } | ||
| 273 | - | ||
| 274 | - public String getREPORT_SGBH() { | ||
| 275 | - return REPORT_SGBH; | ||
| 276 | - } | ||
| 277 | - | ||
| 278 | - public void setREPORT_SGBH(String REPORT_SGBH) { | ||
| 279 | - this.REPORT_SGBH = REPORT_SGBH; | ||
| 280 | - } | ||
| 281 | - | ||
| 282 | - public String getREPORT_ZBH() { | ||
| 283 | - return REPORT_ZBH; | ||
| 284 | - } | ||
| 285 | - | ||
| 286 | - public void setREPORT_ZBH(String REPORT_ZBH) { | ||
| 287 | - this.REPORT_ZBH = REPORT_ZBH; | ||
| 288 | - } | ||
| 289 | - | ||
| 290 | - public String getREPORT_PZH() { | ||
| 291 | - return REPORT_PZH; | ||
| 292 | - } | ||
| 293 | - | ||
| 294 | - public void setREPORT_PZH(String REPORT_PZH) { | ||
| 295 | - this.REPORT_PZH = REPORT_PZH; | ||
| 296 | - } | ||
| 297 | - | ||
| 298 | - public String getREPORT_JSY() { | ||
| 299 | - return REPORT_JSY; | ||
| 300 | - } | ||
| 301 | - | ||
| 302 | - public void setREPORT_JSY(String REPORT_JSY) { | ||
| 303 | - this.REPORT_JSY = REPORT_JSY; | ||
| 304 | - } | ||
| 305 | - | ||
| 306 | - public String getREPORT_SGSJ() { | ||
| 307 | - return REPORT_SGSJ; | ||
| 308 | - } | ||
| 309 | - | ||
| 310 | - public void setREPORT_SGSJ(String REPORT_SGSJ) { | ||
| 311 | - this.REPORT_SGSJ = REPORT_SGSJ; | ||
| 312 | - } | ||
| 313 | - | ||
| 314 | - public String getREPORT_SGDD() { | ||
| 315 | - return REPORT_SGDD; | ||
| 316 | - } | ||
| 317 | - | ||
| 318 | - public void setREPORT_SGDD(String REPORT_SGDD) { | ||
| 319 | - this.REPORT_SGDD = REPORT_SGDD; | ||
| 320 | - } | ||
| 321 | - | ||
| 322 | - public String getREPORT_XSFX() { | ||
| 323 | - return REPORT_XSFX; | ||
| 324 | - } | ||
| 325 | - | ||
| 326 | - public void setREPORT_XSFX(String REPORT_XSFX) { | ||
| 327 | - this.REPORT_XSFX = REPORT_XSFX; | ||
| 328 | - } | ||
| 329 | - | ||
| 330 | - public String getREPORT_SGDX() { | ||
| 331 | - return REPORT_SGDX; | ||
| 332 | - } | ||
| 333 | - | ||
| 334 | - public void setREPORT_SGDX(String REPORT_SGDX) { | ||
| 335 | - this.REPORT_SGDX = REPORT_SGDX; | ||
| 336 | - } | ||
| 337 | - | ||
| 338 | - public String getREPORT_DXPZH() { | ||
| 339 | - return REPORT_DXPZH; | ||
| 340 | - } | ||
| 341 | - | ||
| 342 | - public void setREPORT_DXPZH(String REPORT_DXPZH) { | ||
| 343 | - this.REPORT_DXPZH = REPORT_DXPZH; | ||
| 344 | - } | ||
| 345 | - | ||
| 346 | - public String getREPORT_SGGK() { | ||
| 347 | - return REPORT_SGGK; | ||
| 348 | - } | ||
| 349 | - | ||
| 350 | - public void setREPORT_SGGK(String REPORT_SGGK) { | ||
| 351 | - this.REPORT_SGGK = REPORT_SGGK; | ||
| 352 | - } | ||
| 353 | - | ||
| 354 | - public String getREPORT_SSRS() { | ||
| 355 | - return REPORT_SSRS; | ||
| 356 | - } | ||
| 357 | - | ||
| 358 | - public void setREPORT_SSRS(String REPORT_SSRS) { | ||
| 359 | - this.REPORT_SSRS = REPORT_SSRS; | ||
| 360 | - } | ||
| 361 | - | ||
| 362 | - public String getREPORT_SWRS() { | ||
| 363 | - return REPORT_SWRS; | ||
| 364 | - } | ||
| 365 | - | ||
| 366 | - public void setREPORT_SWRS(String REPORT_SWRS) { | ||
| 367 | - this.REPORT_SWRS = REPORT_SWRS; | ||
| 368 | - } | ||
| 369 | - | ||
| 370 | - public String getREPORT_BGR() { | ||
| 371 | - return REPORT_BGR; | ||
| 372 | - } | ||
| 373 | - | ||
| 374 | - public void setREPORT_BGR(String REPORT_BGR) { | ||
| 375 | - this.REPORT_BGR = REPORT_BGR; | ||
| 376 | - } | ||
| 377 | - | ||
| 378 | - public String getREPORT_BGRDH() { | ||
| 379 | - return REPORT_BGRDH; | ||
| 380 | - } | ||
| 381 | - | ||
| 382 | - public void setREPORT_BGRDH(String REPORT_BGRDH) { | ||
| 383 | - this.REPORT_BGRDH = REPORT_BGRDH; | ||
| 384 | - } | ||
| 385 | - | ||
| 386 | - public String getREPORT_BZ() { | ||
| 387 | - return REPORT_BZ; | ||
| 388 | - } | ||
| 389 | - | ||
| 390 | - public void setREPORT_BZ(String REPORT_BZ) { | ||
| 391 | - this.REPORT_BZ = REPORT_BZ; | ||
| 392 | - } | ||
| 393 | - | ||
| 394 | - public String getCREATE_BY() { | ||
| 395 | - return CREATE_BY; | ||
| 396 | - } | ||
| 397 | - | ||
| 398 | - public void setCREATE_BY(String CREATE_BY) { | ||
| 399 | - this.CREATE_BY = CREATE_BY; | ||
| 400 | - } | ||
| 401 | - | ||
| 402 | - public Date getCREATE_DATE() { | ||
| 403 | - return CREATE_DATE; | ||
| 404 | - } | ||
| 405 | - | ||
| 406 | - public void setCREATE_DATE(Date CREATE_DATE) { | ||
| 407 | - this.CREATE_DATE = CREATE_DATE; | ||
| 408 | - } | ||
| 409 | - | ||
| 410 | - public String getUPDATE_BY() { | ||
| 411 | - return UPDATE_BY; | ||
| 412 | - } | ||
| 413 | - | ||
| 414 | - public void setUPDATE_BY(String UPDATE_BY) { | ||
| 415 | - this.UPDATE_BY = UPDATE_BY; | ||
| 416 | - } | ||
| 417 | - | ||
| 418 | - public Date getUPDATE_DATE() { | ||
| 419 | - return UPDATE_DATE; | ||
| 420 | - } | ||
| 421 | - | ||
| 422 | - public void setUPDATE_DATE(Date UPDATE_DATE) { | ||
| 423 | - this.UPDATE_DATE = UPDATE_DATE; | ||
| 424 | - } | ||
| 425 | - | ||
| 426 | - public String getREPORT_ROAD() { | ||
| 427 | - return REPORT_ROAD; | ||
| 428 | - } | ||
| 429 | - | ||
| 430 | - public void setREPORT_ROAD(String REPORT_ROAD) { | ||
| 431 | - this.REPORT_ROAD = REPORT_ROAD; | ||
| 432 | - } | ||
| 433 | - | ||
| 434 | - public String getSTATUS() { | ||
| 435 | - return STATUS; | ||
| 436 | - } | ||
| 437 | - | ||
| 438 | - public void setSTATUS(String STATUS) { | ||
| 439 | - this.STATUS = STATUS; | ||
| 440 | - } | ||
| 441 | - | ||
| 442 | - @Override | ||
| 443 | - public String toString() { | ||
| 444 | - DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 445 | - return "{" + | ||
| 446 | - "ID:'" + ID + '\'' + | ||
| 447 | - ", REPORT_TYPE:'" + REPORT_TYPE + '\'' + | ||
| 448 | - ", REPORT_GS:'" + REPORT_GS + '\'' + | ||
| 449 | - ", REPORT_FGS:'" + REPORT_FGS + '\'' + | ||
| 450 | - ", REPORT_DATE:'" + dateFormat.format(REPORT_DATE) + '\'' + | ||
| 451 | - ", REPORT_BBR:'" + REPORT_BBR + '\'' + | ||
| 452 | - ", REPORT_XL:'" + REPORT_XL + '\'' + | ||
| 453 | - ", REPORT_XLNAME:'" + REPORT_XLNAME + '\'' + | ||
| 454 | - ", REPORT_STATION:'" + REPORT_STATION + '\'' + | ||
| 455 | - ", REPORT_DWSBBM:'" + REPORT_DWSBBM + '\'' + | ||
| 456 | - ", REPORT_DWSBSJ:'" + REPORT_DWSBSJ + '\'' + | ||
| 457 | - ", REPORT_YWSJ:'" + REPORT_YWSJ + '\'' + | ||
| 458 | - ", REPORT_SMBWD:'" + REPORT_SMBWD + '\'' + | ||
| 459 | - ", REPORT_DJGSJ:'" + REPORT_DJGSJ + '\'' + | ||
| 460 | - ", REPORT_DJGYY:'" + REPORT_DJGYY + '\'' + | ||
| 461 | - ", REPORT_TFSJ:'" + REPORT_TFSJ + '\'' + | ||
| 462 | - ", REPORT_YXSJ:'" + REPORT_YXSJ + '\'' + | ||
| 463 | - ", REPORT_YXBC:'" + REPORT_YXBC + '\'' + | ||
| 464 | - ", REPORT_TZCS:'" + REPORT_TZCS + '\'' + | ||
| 465 | - ", REPORT_SGBH:'" + REPORT_SGBH + '\'' + | ||
| 466 | - ", REPORT_ZBH:'" + REPORT_ZBH + '\'' + | ||
| 467 | - ", REPORT_PZH:'" + REPORT_PZH + '\'' + | ||
| 468 | - ", REPORT_JSY:'" + REPORT_JSY + '\'' + | ||
| 469 | - ", REPORT_SGSJ:'" + REPORT_SGSJ + '\'' + | ||
| 470 | - ", REPORT_SGDD:'" + REPORT_SGDD + '\'' + | ||
| 471 | - ", REPORT_XSFX:'" + REPORT_XSFX + '\'' + | ||
| 472 | - ", REPORT_SGDX:'" + REPORT_SGDX + '\'' + | ||
| 473 | - ", REPORT_DXPZH:'" + REPORT_DXPZH + '\'' + | ||
| 474 | - ", REPORT_SGGK:'" + REPORT_SGGK + '\'' + | ||
| 475 | - ", REPORT_SSRS:'" + REPORT_SSRS + '\'' + | ||
| 476 | - ", REPORT_SWRS:'" + REPORT_SWRS + '\'' + | ||
| 477 | - ", REPORT_BGR:'" + REPORT_BGR + '\'' + | ||
| 478 | - ", REPORT_BGRDH:'" + REPORT_BGRDH + '\'' + | ||
| 479 | - ", REPORT_BZ:'" + REPORT_BZ + '\'' + | ||
| 480 | - ", CREATE_BY:'" + CREATE_BY + '\'' + | ||
| 481 | - ", CREATE_DATE:" + CREATE_DATE + | ||
| 482 | - ", UPDATE_BY:'" + UPDATE_BY + '\'' + | ||
| 483 | - ", UPDATE_DATE:" + UPDATE_DATE + | ||
| 484 | - ", REPORT_ROAD:'" + REPORT_ROAD + '\'' + | ||
| 485 | - ", STATUS:'" + STATUS + '\'' + | ||
| 486 | - '}'; | ||
| 487 | - } | ||
| 488 | -} | 1 | +package com.bsth.data.report_register.entity; |
| 2 | + | ||
| 3 | +import javax.persistence.Column; | ||
| 4 | +import javax.persistence.Entity; | ||
| 5 | +import javax.persistence.GeneratedValue; | ||
| 6 | +import javax.persistence.Id; | ||
| 7 | +import javax.persistence.Table; | ||
| 8 | +import java.text.DateFormat; | ||
| 9 | +import java.text.SimpleDateFormat; | ||
| 10 | +import java.util.Date; | ||
| 11 | + | ||
| 12 | + | ||
| 13 | +@Entity | ||
| 14 | +@Table(name = "bsth_t_report") | ||
| 15 | +public class ReportRegister { | ||
| 16 | + | ||
| 17 | + @Id | ||
| 18 | + @GeneratedValue | ||
| 19 | + private long ID; | ||
| 20 | + | ||
| 21 | + /** 类型*/ | ||
| 22 | + private String REPORT_TYPE; | ||
| 23 | + /** 公司 */ | ||
| 24 | + private String REPORT_GS; | ||
| 25 | + /** 分公司 */ | ||
| 26 | + private String REPORT_FGS; | ||
| 27 | + /** 公司名 */ | ||
| 28 | + private String REPORT_GSNAME; | ||
| 29 | + /** 分公司名 */ | ||
| 30 | + private String REPORT_FGSNAME; | ||
| 31 | + /** 时间*/ | ||
| 32 | + private Date REPORT_DATE; | ||
| 33 | + /** 报备人*/ | ||
| 34 | + private String REPORT_BBR; | ||
| 35 | + /** 线路编码 */ | ||
| 36 | + private String REPORT_XL; | ||
| 37 | + /** 线路名*/ | ||
| 38 | + private String REPORT_XLNAME; | ||
| 39 | + /** 站点*/ | ||
| 40 | + private String REPORT_STATION; | ||
| 41 | + /** 对外上报部门*/ | ||
| 42 | + private String REPORT_DWSBBM; | ||
| 43 | + /** 对外上报时间*/ | ||
| 44 | + private String REPORT_DWSBSJ; | ||
| 45 | + /** 延误时间*/ | ||
| 46 | + private String REPORT_YWSJ; | ||
| 47 | + /** 首末班误点原因*/ | ||
| 48 | + private String REPORT_SMBWD; | ||
| 49 | + /** 大间隔时间*/ | ||
| 50 | + private String REPORT_DJGSJ; | ||
| 51 | + /** 大间隔原因*/ | ||
| 52 | + private String REPORT_DJGYY; | ||
| 53 | + /** 突发事件*/ | ||
| 54 | + private String REPORT_TFSJ; | ||
| 55 | + /** 影响时间*/ | ||
| 56 | + private String REPORT_YXSJ; | ||
| 57 | + /** 影响班次数*/ | ||
| 58 | + private String REPORT_YXBC; | ||
| 59 | + /** 调整措施*/ | ||
| 60 | + private String REPORT_TZCS; | ||
| 61 | + /** 报案事故编号*/ | ||
| 62 | + private String REPORT_SGBH; | ||
| 63 | + /** 车辆自编号*/ | ||
| 64 | + private String REPORT_ZBH; | ||
| 65 | + /** 车辆牌照号*/ | ||
| 66 | + private String REPORT_PZH; | ||
| 67 | + /** 驾驶员*/ | ||
| 68 | + private String REPORT_JSY; | ||
| 69 | + /** 事故发生时间*/ | ||
| 70 | + private String REPORT_SGSJ; | ||
| 71 | + /** 事故发生地点*/ | ||
| 72 | + private String REPORT_SGDD; | ||
| 73 | + /** 行驶方向*/ | ||
| 74 | + private String REPORT_XSFX; | ||
| 75 | + /** 事故对象*/ | ||
| 76 | + private String REPORT_SGDX; | ||
| 77 | + /** 对象车牌照号*/ | ||
| 78 | + private String REPORT_DXPZH; | ||
| 79 | + /** 事故概况*/ | ||
| 80 | + private String REPORT_SGGK; | ||
| 81 | + /** 受伤人数*/ | ||
| 82 | + private String REPORT_SSRS; | ||
| 83 | + /** 死亡人数*/ | ||
| 84 | + private String REPORT_SWRS; | ||
| 85 | + /** 报告人 */ | ||
| 86 | + private String REPORT_BGR; | ||
| 87 | + /** 报告人电话 */ | ||
| 88 | + private String REPORT_BGRDH; | ||
| 89 | + /** 备注 */ | ||
| 90 | + private String REPORT_BZ; | ||
| 91 | + /** 路段*/ | ||
| 92 | + private String REPORT_ROAD; | ||
| 93 | + /** 访问接口时使用的状态码 操作类型,0:新增;1:修改;2:删除 */ | ||
| 94 | + private String STATUS; | ||
| 95 | + /** 创建人*/ | ||
| 96 | + private String CREATE_BY; | ||
| 97 | + /** 创建时间 */ | ||
| 98 | + @Column(updatable = false, name = "CREATE_DATE", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | ||
| 99 | + private Date CREATE_DATE; | ||
| 100 | + /** 修改人*/ | ||
| 101 | + private String UPDATE_BY; | ||
| 102 | + /** 修改时间*/ | ||
| 103 | + @Column(name = "UPDATE_DATE", columnDefinition = "UPDATE_DATE DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") | ||
| 104 | + private Date UPDATE_DATE; | ||
| 105 | + | ||
| 106 | + public long getID() { | ||
| 107 | + return ID; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public void setID(long ID) { | ||
| 111 | + this.ID = ID; | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public String getREPORT_TYPE() { | ||
| 115 | + return REPORT_TYPE; | ||
| 116 | + } | ||
| 117 | + | ||
| 118 | + public void setREPORT_TYPE(String REPORT_TYPE) { | ||
| 119 | + this.REPORT_TYPE = REPORT_TYPE; | ||
| 120 | + } | ||
| 121 | + | ||
| 122 | + public String getREPORT_GS() { | ||
| 123 | + return REPORT_GS; | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + public void setREPORT_GS(String REPORT_GS) { | ||
| 127 | + this.REPORT_GS = REPORT_GS; | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + public String getREPORT_FGS() { | ||
| 131 | + return REPORT_FGS; | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + public void setREPORT_FGS(String REPORT_FGS) { | ||
| 135 | + this.REPORT_FGS = REPORT_FGS; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + public String getREPORT_GSNAME() { | ||
| 139 | + return REPORT_GSNAME; | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + public void setREPORT_GSNAME(String REPORT_GSNAME) { | ||
| 143 | + this.REPORT_GSNAME = REPORT_GSNAME; | ||
| 144 | + } | ||
| 145 | + | ||
| 146 | + public String getREPORT_FGSNAME() { | ||
| 147 | + return REPORT_FGSNAME; | ||
| 148 | + } | ||
| 149 | + | ||
| 150 | + public void setREPORT_FGSNAME(String REPORT_FGSNAME) { | ||
| 151 | + this.REPORT_FGSNAME = REPORT_FGSNAME; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public Date getREPORT_DATE() { | ||
| 155 | + return REPORT_DATE; | ||
| 156 | + } | ||
| 157 | + | ||
| 158 | + public void setREPORT_DATE(Date REPORT_DATE) { | ||
| 159 | + this.REPORT_DATE = REPORT_DATE; | ||
| 160 | + } | ||
| 161 | + | ||
| 162 | + public String getREPORT_BBR() { | ||
| 163 | + return REPORT_BBR; | ||
| 164 | + } | ||
| 165 | + | ||
| 166 | + public void setREPORT_BBR(String REPORT_BBR) { | ||
| 167 | + this.REPORT_BBR = REPORT_BBR; | ||
| 168 | + } | ||
| 169 | + | ||
| 170 | + public String getREPORT_XL() { | ||
| 171 | + return REPORT_XL; | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + public void setREPORT_XL(String REPORT_XL) { | ||
| 175 | + this.REPORT_XL = REPORT_XL; | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + public String getREPORT_XLNAME() { | ||
| 179 | + return REPORT_XLNAME; | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + public void setREPORT_XLNAME(String REPORT_XLNAME) { | ||
| 183 | + this.REPORT_XLNAME = REPORT_XLNAME; | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + public String getREPORT_STATION() { | ||
| 187 | + return REPORT_STATION; | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + public void setREPORT_STATION(String REPORT_STATION) { | ||
| 191 | + this.REPORT_STATION = REPORT_STATION; | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + public String getREPORT_DWSBBM() { | ||
| 195 | + return REPORT_DWSBBM; | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | + public void setREPORT_DWSBBM(String REPORT_DWSBBM) { | ||
| 199 | + this.REPORT_DWSBBM = REPORT_DWSBBM; | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + public String getREPORT_DWSBSJ() { | ||
| 203 | + return REPORT_DWSBSJ; | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + public void setREPORT_DWSBSJ(String REPORT_DWSBSJ) { | ||
| 207 | + this.REPORT_DWSBSJ = REPORT_DWSBSJ; | ||
| 208 | + } | ||
| 209 | + | ||
| 210 | + public String getREPORT_YWSJ() { | ||
| 211 | + return REPORT_YWSJ; | ||
| 212 | + } | ||
| 213 | + | ||
| 214 | + public void setREPORT_YWSJ(String REPORT_YWSJ) { | ||
| 215 | + this.REPORT_YWSJ = REPORT_YWSJ; | ||
| 216 | + } | ||
| 217 | + | ||
| 218 | + public String getREPORT_SMBWD() { | ||
| 219 | + return REPORT_SMBWD; | ||
| 220 | + } | ||
| 221 | + | ||
| 222 | + public void setREPORT_SMBWD(String REPORT_SMBWD) { | ||
| 223 | + this.REPORT_SMBWD = REPORT_SMBWD; | ||
| 224 | + } | ||
| 225 | + | ||
| 226 | + public String getREPORT_DJGSJ() { | ||
| 227 | + return REPORT_DJGSJ; | ||
| 228 | + } | ||
| 229 | + | ||
| 230 | + public void setREPORT_DJGSJ(String REPORT_DJGSJ) { | ||
| 231 | + this.REPORT_DJGSJ = REPORT_DJGSJ; | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | + public String getREPORT_DJGYY() { | ||
| 235 | + return REPORT_DJGYY; | ||
| 236 | + } | ||
| 237 | + | ||
| 238 | + public void setREPORT_DJGYY(String REPORT_DJGYY) { | ||
| 239 | + this.REPORT_DJGYY = REPORT_DJGYY; | ||
| 240 | + } | ||
| 241 | + | ||
| 242 | + public String getREPORT_TFSJ() { | ||
| 243 | + return REPORT_TFSJ; | ||
| 244 | + } | ||
| 245 | + | ||
| 246 | + public void setREPORT_TFSJ(String REPORT_TFSJ) { | ||
| 247 | + this.REPORT_TFSJ = REPORT_TFSJ; | ||
| 248 | + } | ||
| 249 | + | ||
| 250 | + public String getREPORT_YXSJ() { | ||
| 251 | + return REPORT_YXSJ; | ||
| 252 | + } | ||
| 253 | + | ||
| 254 | + public void setREPORT_YXSJ(String REPORT_YXSJ) { | ||
| 255 | + this.REPORT_YXSJ = REPORT_YXSJ; | ||
| 256 | + } | ||
| 257 | + | ||
| 258 | + public String getREPORT_YXBC() { | ||
| 259 | + return REPORT_YXBC; | ||
| 260 | + } | ||
| 261 | + | ||
| 262 | + public void setREPORT_YXBC(String REPORT_YXBC) { | ||
| 263 | + this.REPORT_YXBC = REPORT_YXBC; | ||
| 264 | + } | ||
| 265 | + | ||
| 266 | + public String getREPORT_TZCS() { | ||
| 267 | + return REPORT_TZCS; | ||
| 268 | + } | ||
| 269 | + | ||
| 270 | + public void setREPORT_TZCS(String REPORT_TZCS) { | ||
| 271 | + this.REPORT_TZCS = REPORT_TZCS; | ||
| 272 | + } | ||
| 273 | + | ||
| 274 | + public String getREPORT_SGBH() { | ||
| 275 | + return REPORT_SGBH; | ||
| 276 | + } | ||
| 277 | + | ||
| 278 | + public void setREPORT_SGBH(String REPORT_SGBH) { | ||
| 279 | + this.REPORT_SGBH = REPORT_SGBH; | ||
| 280 | + } | ||
| 281 | + | ||
| 282 | + public String getREPORT_ZBH() { | ||
| 283 | + return REPORT_ZBH; | ||
| 284 | + } | ||
| 285 | + | ||
| 286 | + public void setREPORT_ZBH(String REPORT_ZBH) { | ||
| 287 | + this.REPORT_ZBH = REPORT_ZBH; | ||
| 288 | + } | ||
| 289 | + | ||
| 290 | + public String getREPORT_PZH() { | ||
| 291 | + return REPORT_PZH; | ||
| 292 | + } | ||
| 293 | + | ||
| 294 | + public void setREPORT_PZH(String REPORT_PZH) { | ||
| 295 | + this.REPORT_PZH = REPORT_PZH; | ||
| 296 | + } | ||
| 297 | + | ||
| 298 | + public String getREPORT_JSY() { | ||
| 299 | + return REPORT_JSY; | ||
| 300 | + } | ||
| 301 | + | ||
| 302 | + public void setREPORT_JSY(String REPORT_JSY) { | ||
| 303 | + this.REPORT_JSY = REPORT_JSY; | ||
| 304 | + } | ||
| 305 | + | ||
| 306 | + public String getREPORT_SGSJ() { | ||
| 307 | + return REPORT_SGSJ; | ||
| 308 | + } | ||
| 309 | + | ||
| 310 | + public void setREPORT_SGSJ(String REPORT_SGSJ) { | ||
| 311 | + this.REPORT_SGSJ = REPORT_SGSJ; | ||
| 312 | + } | ||
| 313 | + | ||
| 314 | + public String getREPORT_SGDD() { | ||
| 315 | + return REPORT_SGDD; | ||
| 316 | + } | ||
| 317 | + | ||
| 318 | + public void setREPORT_SGDD(String REPORT_SGDD) { | ||
| 319 | + this.REPORT_SGDD = REPORT_SGDD; | ||
| 320 | + } | ||
| 321 | + | ||
| 322 | + public String getREPORT_XSFX() { | ||
| 323 | + return REPORT_XSFX; | ||
| 324 | + } | ||
| 325 | + | ||
| 326 | + public void setREPORT_XSFX(String REPORT_XSFX) { | ||
| 327 | + this.REPORT_XSFX = REPORT_XSFX; | ||
| 328 | + } | ||
| 329 | + | ||
| 330 | + public String getREPORT_SGDX() { | ||
| 331 | + return REPORT_SGDX; | ||
| 332 | + } | ||
| 333 | + | ||
| 334 | + public void setREPORT_SGDX(String REPORT_SGDX) { | ||
| 335 | + this.REPORT_SGDX = REPORT_SGDX; | ||
| 336 | + } | ||
| 337 | + | ||
| 338 | + public String getREPORT_DXPZH() { | ||
| 339 | + return REPORT_DXPZH; | ||
| 340 | + } | ||
| 341 | + | ||
| 342 | + public void setREPORT_DXPZH(String REPORT_DXPZH) { | ||
| 343 | + this.REPORT_DXPZH = REPORT_DXPZH; | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + public String getREPORT_SGGK() { | ||
| 347 | + return REPORT_SGGK; | ||
| 348 | + } | ||
| 349 | + | ||
| 350 | + public void setREPORT_SGGK(String REPORT_SGGK) { | ||
| 351 | + this.REPORT_SGGK = REPORT_SGGK; | ||
| 352 | + } | ||
| 353 | + | ||
| 354 | + public String getREPORT_SSRS() { | ||
| 355 | + return REPORT_SSRS; | ||
| 356 | + } | ||
| 357 | + | ||
| 358 | + public void setREPORT_SSRS(String REPORT_SSRS) { | ||
| 359 | + this.REPORT_SSRS = REPORT_SSRS; | ||
| 360 | + } | ||
| 361 | + | ||
| 362 | + public String getREPORT_SWRS() { | ||
| 363 | + return REPORT_SWRS; | ||
| 364 | + } | ||
| 365 | + | ||
| 366 | + public void setREPORT_SWRS(String REPORT_SWRS) { | ||
| 367 | + this.REPORT_SWRS = REPORT_SWRS; | ||
| 368 | + } | ||
| 369 | + | ||
| 370 | + public String getREPORT_BGR() { | ||
| 371 | + return REPORT_BGR; | ||
| 372 | + } | ||
| 373 | + | ||
| 374 | + public void setREPORT_BGR(String REPORT_BGR) { | ||
| 375 | + this.REPORT_BGR = REPORT_BGR; | ||
| 376 | + } | ||
| 377 | + | ||
| 378 | + public String getREPORT_BGRDH() { | ||
| 379 | + return REPORT_BGRDH; | ||
| 380 | + } | ||
| 381 | + | ||
| 382 | + public void setREPORT_BGRDH(String REPORT_BGRDH) { | ||
| 383 | + this.REPORT_BGRDH = REPORT_BGRDH; | ||
| 384 | + } | ||
| 385 | + | ||
| 386 | + public String getREPORT_BZ() { | ||
| 387 | + return REPORT_BZ; | ||
| 388 | + } | ||
| 389 | + | ||
| 390 | + public void setREPORT_BZ(String REPORT_BZ) { | ||
| 391 | + this.REPORT_BZ = REPORT_BZ; | ||
| 392 | + } | ||
| 393 | + | ||
| 394 | + public String getCREATE_BY() { | ||
| 395 | + return CREATE_BY; | ||
| 396 | + } | ||
| 397 | + | ||
| 398 | + public void setCREATE_BY(String CREATE_BY) { | ||
| 399 | + this.CREATE_BY = CREATE_BY; | ||
| 400 | + } | ||
| 401 | + | ||
| 402 | + public Date getCREATE_DATE() { | ||
| 403 | + return CREATE_DATE; | ||
| 404 | + } | ||
| 405 | + | ||
| 406 | + public void setCREATE_DATE(Date CREATE_DATE) { | ||
| 407 | + this.CREATE_DATE = CREATE_DATE; | ||
| 408 | + } | ||
| 409 | + | ||
| 410 | + public String getUPDATE_BY() { | ||
| 411 | + return UPDATE_BY; | ||
| 412 | + } | ||
| 413 | + | ||
| 414 | + public void setUPDATE_BY(String UPDATE_BY) { | ||
| 415 | + this.UPDATE_BY = UPDATE_BY; | ||
| 416 | + } | ||
| 417 | + | ||
| 418 | + public Date getUPDATE_DATE() { | ||
| 419 | + return UPDATE_DATE; | ||
| 420 | + } | ||
| 421 | + | ||
| 422 | + public void setUPDATE_DATE(Date UPDATE_DATE) { | ||
| 423 | + this.UPDATE_DATE = UPDATE_DATE; | ||
| 424 | + } | ||
| 425 | + | ||
| 426 | + public String getREPORT_ROAD() { | ||
| 427 | + return REPORT_ROAD; | ||
| 428 | + } | ||
| 429 | + | ||
| 430 | + public void setREPORT_ROAD(String REPORT_ROAD) { | ||
| 431 | + this.REPORT_ROAD = REPORT_ROAD; | ||
| 432 | + } | ||
| 433 | + | ||
| 434 | + public String getSTATUS() { | ||
| 435 | + return STATUS; | ||
| 436 | + } | ||
| 437 | + | ||
| 438 | + public void setSTATUS(String STATUS) { | ||
| 439 | + this.STATUS = STATUS; | ||
| 440 | + } | ||
| 441 | + | ||
| 442 | + @Override | ||
| 443 | + public String toString() { | ||
| 444 | + DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
| 445 | + return "{" + | ||
| 446 | + "ID:'" + ID + '\'' + | ||
| 447 | + ", REPORT_TYPE:'" + REPORT_TYPE + '\'' + | ||
| 448 | + ", REPORT_GS:'" + REPORT_GS + '\'' + | ||
| 449 | + ", REPORT_FGS:'" + REPORT_FGS + '\'' + | ||
| 450 | + ", REPORT_DATE:'" + dateFormat.format(REPORT_DATE) + '\'' + | ||
| 451 | + ", REPORT_BBR:'" + REPORT_BBR + '\'' + | ||
| 452 | + ", REPORT_XL:'" + REPORT_XL + '\'' + | ||
| 453 | + ", REPORT_XLNAME:'" + REPORT_XLNAME + '\'' + | ||
| 454 | + ", REPORT_STATION:'" + REPORT_STATION + '\'' + | ||
| 455 | + ", REPORT_DWSBBM:'" + REPORT_DWSBBM + '\'' + | ||
| 456 | + ", REPORT_DWSBSJ:'" + REPORT_DWSBSJ + '\'' + | ||
| 457 | + ", REPORT_YWSJ:'" + REPORT_YWSJ + '\'' + | ||
| 458 | + ", REPORT_SMBWD:'" + REPORT_SMBWD + '\'' + | ||
| 459 | + ", REPORT_DJGSJ:'" + REPORT_DJGSJ + '\'' + | ||
| 460 | + ", REPORT_DJGYY:'" + REPORT_DJGYY + '\'' + | ||
| 461 | + ", REPORT_TFSJ:'" + REPORT_TFSJ + '\'' + | ||
| 462 | + ", REPORT_YXSJ:'" + REPORT_YXSJ + '\'' + | ||
| 463 | + ", REPORT_YXBC:'" + REPORT_YXBC + '\'' + | ||
| 464 | + ", REPORT_TZCS:'" + REPORT_TZCS + '\'' + | ||
| 465 | + ", REPORT_SGBH:'" + REPORT_SGBH + '\'' + | ||
| 466 | + ", REPORT_ZBH:'" + REPORT_ZBH + '\'' + | ||
| 467 | + ", REPORT_PZH:'" + REPORT_PZH + '\'' + | ||
| 468 | + ", REPORT_JSY:'" + REPORT_JSY + '\'' + | ||
| 469 | + ", REPORT_SGSJ:'" + REPORT_SGSJ + '\'' + | ||
| 470 | + ", REPORT_SGDD:'" + REPORT_SGDD + '\'' + | ||
| 471 | + ", REPORT_XSFX:'" + REPORT_XSFX + '\'' + | ||
| 472 | + ", REPORT_SGDX:'" + REPORT_SGDX + '\'' + | ||
| 473 | + ", REPORT_DXPZH:'" + REPORT_DXPZH + '\'' + | ||
| 474 | + ", REPORT_SGGK:'" + REPORT_SGGK + '\'' + | ||
| 475 | + ", REPORT_SSRS:'" + REPORT_SSRS + '\'' + | ||
| 476 | + ", REPORT_SWRS:'" + REPORT_SWRS + '\'' + | ||
| 477 | + ", REPORT_BGR:'" + REPORT_BGR + '\'' + | ||
| 478 | + ", REPORT_BGRDH:'" + REPORT_BGRDH + '\'' + | ||
| 479 | + ", REPORT_BZ:'" + REPORT_BZ + '\'' + | ||
| 480 | + ", CREATE_BY:'" + CREATE_BY + '\'' + | ||
| 481 | + ", CREATE_DATE:" + CREATE_DATE + | ||
| 482 | + ", UPDATE_BY:'" + UPDATE_BY + '\'' + | ||
| 483 | + ", UPDATE_DATE:" + UPDATE_DATE + | ||
| 484 | + ", REPORT_ROAD:'" + REPORT_ROAD + '\'' + | ||
| 485 | + ", STATUS:'" + STATUS + '\'' + | ||
| 486 | + '}'; | ||
| 487 | + } | ||
| 488 | +} |
src/main/java/com/bsth/data/report_register/repository/ReportRegisterRepository.java
| 1 | -package com.bsth.data.report_register.repository; | ||
| 2 | - | ||
| 3 | -import com.bsth.data.report_register.entity.ReportRegister; | ||
| 4 | -import com.bsth.repository.BaseRepository; | ||
| 5 | -import org.springframework.stereotype.Repository; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * | ||
| 9 | - * @Interface: ReportRegisterRepository(等级报表Repository数据持久层接口) | ||
| 10 | - * | ||
| 11 | - * @Author yrf | ||
| 12 | - * | ||
| 13 | - * @Date 2019-12-04 | ||
| 14 | - * | ||
| 15 | - * @Version 公交调度系统BS版 0.1 | ||
| 16 | - * | ||
| 17 | - */ | ||
| 18 | - | ||
| 19 | -@Repository | ||
| 20 | -public interface ReportRegisterRepository extends BaseRepository<ReportRegister, Long> { | ||
| 21 | - | ||
| 22 | -} | 1 | +package com.bsth.data.report_register.repository; |
| 2 | + | ||
| 3 | +import com.bsth.data.report_register.entity.ReportRegister; | ||
| 4 | +import com.bsth.repository.BaseRepository; | ||
| 5 | +import org.springframework.stereotype.Repository; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * | ||
| 9 | + * @Interface: ReportRegisterRepository(等级报表Repository数据持久层接口) | ||
| 10 | + * | ||
| 11 | + * @Author yrf | ||
| 12 | + * | ||
| 13 | + * @Date 2019-12-04 | ||
| 14 | + * | ||
| 15 | + * @Version 公交调度系统BS版 0.1 | ||
| 16 | + * | ||
| 17 | + */ | ||
| 18 | + | ||
| 19 | +@Repository | ||
| 20 | +public interface ReportRegisterRepository extends BaseRepository<ReportRegister, Long> { | ||
| 21 | + | ||
| 22 | +} |
src/main/java/com/bsth/entity/LsStationRoute.java
| @@ -41,7 +41,9 @@ public class LsStationRoute { | @@ -41,7 +41,9 @@ public class LsStationRoute { | ||
| 41 | 41 | ||
| 42 | // 线路编码 | 42 | // 线路编码 |
| 43 | private String lineCode; | 43 | private String lineCode; |
| 44 | - | 44 | + |
| 45 | + // 行业编码 | ||
| 46 | + private String industryCode; | ||
| 45 | /** | 47 | /** |
| 46 | * 站点类型 | 48 | * 站点类型 |
| 47 | * | 49 | * |
| @@ -145,6 +147,14 @@ public class LsStationRoute { | @@ -145,6 +147,14 @@ public class LsStationRoute { | ||
| 145 | this.lineCode = lineCode; | 147 | this.lineCode = lineCode; |
| 146 | } | 148 | } |
| 147 | 149 | ||
| 150 | + public String getIndustryCode() { | ||
| 151 | + return industryCode; | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + public void setIndustryCode(String industryCode) { | ||
| 155 | + this.industryCode = industryCode; | ||
| 156 | + } | ||
| 157 | + | ||
| 148 | public String getStationMark() { | 158 | public String getStationMark() { |
| 149 | return stationMark; | 159 | return stationMark; |
| 150 | } | 160 | } |
src/main/java/com/bsth/entity/StationRoute.java
| @@ -43,6 +43,9 @@ public class StationRoute { | @@ -43,6 +43,9 @@ public class StationRoute { | ||
| 43 | 43 | ||
| 44 | // 线路编码 | 44 | // 线路编码 |
| 45 | private String lineCode; | 45 | private String lineCode; |
| 46 | + | ||
| 47 | + // 行业编码 | ||
| 48 | + private String industryCode; | ||
| 46 | 49 | ||
| 47 | /** | 50 | /** |
| 48 | * 站点类型 | 51 | * 站点类型 |
| @@ -147,6 +150,14 @@ public class StationRoute { | @@ -147,6 +150,14 @@ public class StationRoute { | ||
| 147 | this.lineCode = lineCode; | 150 | this.lineCode = lineCode; |
| 148 | } | 151 | } |
| 149 | 152 | ||
| 153 | + public String getIndustryCode() { | ||
| 154 | + return industryCode; | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + public void setIndustryCode(String industryCode) { | ||
| 158 | + this.industryCode = industryCode; | ||
| 159 | + } | ||
| 160 | + | ||
| 150 | public String getStationMark() { | 161 | public String getStationMark() { |
| 151 | return stationMark; | 162 | return stationMark; |
| 152 | } | 163 | } |
src/main/java/com/bsth/entity/StationRouteCache.java
| @@ -44,7 +44,9 @@ public class StationRouteCache { | @@ -44,7 +44,9 @@ public class StationRouteCache { | ||
| 44 | 44 | ||
| 45 | // 线路编码 | 45 | // 线路编码 |
| 46 | private String lineCode; | 46 | private String lineCode; |
| 47 | - | 47 | + |
| 48 | + // 行业编码 | ||
| 49 | + private String industryCode; | ||
| 48 | /** | 50 | /** |
| 49 | * 站点类型 | 51 | * 站点类型 |
| 50 | * | 52 | * |
| @@ -148,6 +150,14 @@ public class StationRouteCache { | @@ -148,6 +150,14 @@ public class StationRouteCache { | ||
| 148 | this.lineCode = lineCode; | 150 | this.lineCode = lineCode; |
| 149 | } | 151 | } |
| 150 | 152 | ||
| 153 | + public String getIndustryCode() { | ||
| 154 | + return industryCode; | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + public void setIndustryCode(String industryCode) { | ||
| 158 | + this.industryCode = industryCode; | ||
| 159 | + } | ||
| 160 | + | ||
| 151 | public String getStationMark() { | 161 | public String getStationMark() { |
| 152 | return stationMark; | 162 | return stationMark; |
| 153 | } | 163 | } |