Commit b58ba507078915f60f8b4d35d917d0edb73323dd
1 parent
f329afe2
基础数据同步
Showing
35 changed files
with
3560 additions
and
15 deletions
src/main/java/com/bsth/data/commonData/SyncData.java
0 → 100644
| 1 | +package com.bsth.data.commonData; | |
| 2 | + | |
| 3 | +import com.bsth.data.BasicData; | |
| 4 | +import com.bsth.data.commonData.entity.*; | |
| 5 | +import com.bsth.entity.*; | |
| 6 | +import com.bsth.repository.*; | |
| 7 | +import com.bsth.service.*; | |
| 8 | +import com.bsth.service.schedule.CarsService; | |
| 9 | +import com.bsth.util.db.DBUtils_jiaDingBus; | |
| 10 | +import org.slf4j.Logger; | |
| 11 | +import org.slf4j.LoggerFactory; | |
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 13 | +import org.springframework.jdbc.core.BeanPropertyRowMapper; | |
| 14 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 15 | +import org.springframework.scheduling.annotation.Scheduled; | |
| 16 | +import org.springframework.stereotype.Component; | |
| 17 | +import org.springframework.transaction.annotation.EnableTransactionManagement; | |
| 18 | +import org.springframework.transaction.annotation.Transactional; | |
| 19 | +import java.text.ParseException; | |
| 20 | +import java.text.SimpleDateFormat; | |
| 21 | +import java.util.*; | |
| 22 | + | |
| 23 | +@Component | |
| 24 | +@EnableTransactionManagement | |
| 25 | +public class SyncData extends Thread{ | |
| 26 | + | |
| 27 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 28 | + | |
| 29 | + JdbcTemplate jdbcTemp = new JdbcTemplate(DBUtils_jiaDingBus.getDataSource()); | |
| 30 | + | |
| 31 | + @Autowired | |
| 32 | + private BusinessService businessService; | |
| 33 | + | |
| 34 | + @Autowired | |
| 35 | + private BusinessRepository businessRepository; | |
| 36 | + | |
| 37 | + @Autowired | |
| 38 | + private CarParkRepository carParkRepository; | |
| 39 | + | |
| 40 | + @Autowired | |
| 41 | + private CarParkService carParkService; | |
| 42 | + | |
| 43 | + @Autowired | |
| 44 | + private LineService lineService; | |
| 45 | + | |
| 46 | + @Autowired | |
| 47 | + private LineVersionsService lineVersionsService; | |
| 48 | + | |
| 49 | + @Autowired | |
| 50 | + private LineInformationRepository informationRepository; | |
| 51 | + | |
| 52 | + @Autowired | |
| 53 | + private LineInformationService lineInformationService; | |
| 54 | + | |
| 55 | + @Autowired | |
| 56 | + private CarsService carsService; | |
| 57 | + | |
| 58 | + @Autowired | |
| 59 | + private CarsRepository carsRepository; | |
| 60 | + | |
| 61 | + @Autowired | |
| 62 | + private PersonnelRepository personnelRepository; | |
| 63 | + | |
| 64 | + @Autowired | |
| 65 | + private PersonnelService personnelService; | |
| 66 | + | |
| 67 | + @Autowired | |
| 68 | + private StationService stationService; | |
| 69 | + | |
| 70 | + @Autowired | |
| 71 | + private StationRepository stationRepository; | |
| 72 | + | |
| 73 | + @Autowired | |
| 74 | + private StationRouteRepository stationRouteRepository; | |
| 75 | + | |
| 76 | + @Autowired | |
| 77 | + private LsStationRouteRepository lsStationRouteRepository; | |
| 78 | + | |
| 79 | + @Autowired | |
| 80 | + SectionService sectionService; | |
| 81 | + | |
| 82 | + @Autowired | |
| 83 | + SectionRepository sectionRepository; | |
| 84 | + | |
| 85 | + @Autowired | |
| 86 | + SectionRouteRepository sectionRouteRepository; | |
| 87 | + | |
| 88 | + @Autowired | |
| 89 | + LsSectionRouteRepository lsSectionRouteRepository; | |
| 90 | + | |
| 91 | + @Autowired | |
| 92 | + BasicData.BasicDataLoader basicDataLoader; | |
| 93 | + | |
| 94 | + @Scheduled(cron = "0 0/1 * * * ?") | |
| 95 | + @Transactional() | |
| 96 | + public void SyncData(){ | |
| 97 | + syncBusiness(); | |
| 98 | + syncCarPark(); | |
| 99 | + syncLine(); | |
| 100 | + syncLineInformation(); | |
| 101 | + syncCar(); | |
| 102 | + syncPersonnel(); | |
| 103 | + syncStation(); | |
| 104 | + syncStationRoute(); | |
| 105 | + syncSection(); | |
| 106 | + syncSectionRoute(); | |
| 107 | + basicDataLoader.loadAllData(); | |
| 108 | + } | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + public void syncBusiness(){ | |
| 114 | + try { | |
| 115 | + String sql = "select * from common_bus_company"; | |
| 116 | + List<BusCompany> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(BusCompany.class)); | |
| 117 | + List<Business> businesses=BusCompany.convert(list); | |
| 118 | + for (Business business : businesses) { | |
| 119 | + if(businessRepository.findByBusinessCode(business.getBusinessCode()).size()>0){ | |
| 120 | + businessService.update(business); | |
| 121 | + }else { | |
| 122 | + businessService.save(business); | |
| 123 | + } | |
| 124 | + } | |
| 125 | + logger.info(">>>>>>>>>>>>>公司数据同步完成"); | |
| 126 | + } catch (Exception e) { | |
| 127 | + logger.error(">>>>>>>>>>>>>公司数据同步异常",e); | |
| 128 | + } | |
| 129 | + } | |
| 130 | + | |
| 131 | + | |
| 132 | + public void syncCarPark(){ | |
| 133 | + try { | |
| 134 | + String sql2 = "select *,ST_AsText(b_park_point) b_park_point_wkt,ST_AsText(g_park_point) g_park_point_wkt from common_bus_park"; | |
| 135 | + List<BusPark> list2 = jdbcTemp.query(sql2, new BeanPropertyRowMapper(BusPark.class)); | |
| 136 | + List<CarPark> carParks=BusPark.convert(list2); | |
| 137 | + for (CarPark carPark : carParks) { | |
| 138 | + if(carParkRepository.selectTccInfoByCode(carPark.getParkCode()).size()>0){ | |
| 139 | + carParkService.update(carPark); | |
| 140 | + }else { | |
| 141 | + carParkService.save(carPark); | |
| 142 | + } | |
| 143 | + } | |
| 144 | + logger.info(">>>>>>>>>>>>>停车场数据同步完成"); | |
| 145 | + } catch (Exception e) { | |
| 146 | + logger.error(">>>>>>>>>>>>>停车场数据同步异常",e); | |
| 147 | + } | |
| 148 | + } | |
| 149 | + | |
| 150 | + | |
| 151 | + public void syncLine(){ | |
| 152 | + try { | |
| 153 | + String sql = "select * from common_bus_line_base"; | |
| 154 | + List<BusLineBase> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(BusLineBase.class)); | |
| 155 | + List<Line> lines=BusLineBase.convert(list); | |
| 156 | + for (Line line : lines) { | |
| 157 | + if(line.getId()==null) { | |
| 158 | + line.setId(Integer.valueOf(line.getLineCode())); | |
| 159 | + } | |
| 160 | + if(line.getId().toString().length()>6) { | |
| 161 | + logger.info(">>>>>>>>>>>>>线路编码不符合条件"+line.getId().toString()); | |
| 162 | + } | |
| 163 | + if(lineService.lineCodeVerification(line.getLineCode()).equals("false")){//线路存在 修改 | |
| 164 | + lineService.update(line); | |
| 165 | + }else {//新增 | |
| 166 | + saveLine(line); | |
| 167 | + } | |
| 168 | + } | |
| 169 | + logger.info(">>>>>>>>>>>>>线路数据同步完成"); | |
| 170 | + } catch (Exception e) { | |
| 171 | + logger.error(">>>>>>>>>>>>>线路数据同步异常",e); | |
| 172 | + } | |
| 173 | + } | |
| 174 | + | |
| 175 | + public void saveLine(Line t){ | |
| 176 | + // 添加线路版本 | |
| 177 | + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 178 | + try { | |
| 179 | + Date endDate = simpleDateFormat.parse("2088-08-08 00:00:00"); | |
| 180 | + LineVersions lineVersions = new LineVersions(); | |
| 181 | + lineVersions.setName("原始版本"); | |
| 182 | + lineVersions.setLine(t); | |
| 183 | + lineVersions.setLineCode(t.getLineCode()); | |
| 184 | + lineVersions.setStartDate(new java.sql.Date(new Date().getTime())); | |
| 185 | + lineVersions.setEndDate(new java.sql.Date(endDate.getTime()));// 2088-8-8 00:00:00 | |
| 186 | + lineVersions.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 187 | + lineVersions.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 188 | + lineVersions.setVersions(1); | |
| 189 | + lineVersions.setStatus(1); | |
| 190 | + // 先添加线路再添加版本 | |
| 191 | + lineService.save(t); | |
| 192 | + lineVersionsService.save(lineVersions); | |
| 193 | + } catch (ParseException e) { | |
| 194 | + // TODO Auto-generated catch block | |
| 195 | + e.printStackTrace(); | |
| 196 | + return; | |
| 197 | + } | |
| 198 | + } | |
| 199 | + | |
| 200 | + | |
| 201 | + public void syncLineInformation(){ | |
| 202 | + try { | |
| 203 | + String sql = "select * from common_bus_line_operations"; | |
| 204 | + List<BusLineOperations> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(BusLineOperations.class)); | |
| 205 | + List<LineInformation> lineInformations=BusLineOperations.convert(list); | |
| 206 | + for (LineInformation lineInformation : lineInformations) { | |
| 207 | + if(informationRepository.findLineInformationByLineCode(String.valueOf(lineInformation.getLine().getId())).size()>0){//线路存在 修改 | |
| 208 | + lineInformationService.update(lineInformation); | |
| 209 | + }else {//新增 | |
| 210 | + lineInformationService.save(lineInformation); | |
| 211 | + } | |
| 212 | + } | |
| 213 | + logger.info(">>>>>>>>>>>>>线路配置数据同步完成"); | |
| 214 | + } catch (Exception e) { | |
| 215 | + logger.error(">>>>>>>>>>>>>线路配置数据同步异常",e); | |
| 216 | + } | |
| 217 | + } | |
| 218 | + | |
| 219 | + | |
| 220 | + public void syncCar(){ | |
| 221 | + try { | |
| 222 | + String sql = "select * from common_bus_veh"; | |
| 223 | + List<BusVeh> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(BusVeh.class)); | |
| 224 | + List<Cars> cars=BusVeh.convert(list); | |
| 225 | + for (Cars car : cars) { | |
| 226 | + if(carsRepository.findCarsByCode(car.getInsideCode()).size()>0){//存在 | |
| 227 | + carsService.update(car); | |
| 228 | + }else { | |
| 229 | + carsService.save(car); | |
| 230 | + } | |
| 231 | + } | |
| 232 | + logger.info(">>>>>>>>>>>>>车辆数据同步完成"); | |
| 233 | + } catch (Exception e) { | |
| 234 | + logger.error(">>>>>>>>>>>>>车辆数据同步异常",e); | |
| 235 | + } | |
| 236 | + } | |
| 237 | + | |
| 238 | + | |
| 239 | + public void syncPersonnel(){ | |
| 240 | + try { | |
| 241 | + String sql = "select * from common_bus_staff"; | |
| 242 | + List<BusStaff> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(BusStaff.class)); | |
| 243 | + List<Personnel> personnels=BusStaff.convert(list); | |
| 244 | + for (Personnel personnel : personnels) { | |
| 245 | + if(personnelRepository.findPersonnelByCode(personnel.getJobCodeori()).size()>0){//存在 | |
| 246 | + personnelService.update(personnel); | |
| 247 | + }else { | |
| 248 | + personnelService.save(personnel); | |
| 249 | + } | |
| 250 | + } | |
| 251 | + logger.info(">>>>>>>>>>>>>人员数据同步完成"); | |
| 252 | + } catch (Exception e) { | |
| 253 | + logger.error(">>>>>>>>>>>>>人员数据同步异常",e); | |
| 254 | + } | |
| 255 | + } | |
| 256 | + | |
| 257 | + | |
| 258 | + public void syncStation(){ | |
| 259 | + try { | |
| 260 | + String sql = "select *,ST_AsText(center_point) center_point_wkt from common_bus_stop"; | |
| 261 | + List<BusStop> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(BusStop.class)); | |
| 262 | + List<Station> stations=BusStop.convert(list); | |
| 263 | + for (Station station : stations) { | |
| 264 | + if(stationRepository.findStationByStationCode(station.getStationCode()).size()>0){//存在 | |
| 265 | + stationService.update(station); | |
| 266 | + }else { | |
| 267 | + stationService.add(station); | |
| 268 | + } | |
| 269 | + } | |
| 270 | + logger.info(">>>>>>>>>>>>>站点数据同步完成"); | |
| 271 | + } catch (Exception e) { | |
| 272 | + logger.error(">>>>>>>>>>>>>站点数据同步异常",e); | |
| 273 | + } | |
| 274 | + } | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + public void syncStationRoute(){ | |
| 279 | + try { | |
| 280 | + String sql = "select *,ST_AsText(center_point) center_point_wkt,ST_AsText(buffer_polygon) buffer_polygon_wkt from common_bus_stoplevel"; | |
| 281 | + List<BusStopLevel> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(BusStopLevel.class)); | |
| 282 | + List<StationRoute> stationRoutes=BusStopLevel.convert(list); | |
| 283 | + List<LsStationRoute> lsStationRoutes=BusStopLevel.convertLS(list); | |
| 284 | + if(stationRoutes.size()>0){ | |
| 285 | + stationRouteRepository.deleteAll(); | |
| 286 | + lsStationRouteRepository.deleteAll(); | |
| 287 | + } | |
| 288 | + stationRouteRepository.saveAll(stationRoutes); | |
| 289 | + lsStationRouteRepository.saveAll(lsStationRoutes); | |
| 290 | + logger.info(">>>>>>>>>>>>>站点路由数据同步完成"); | |
| 291 | + } catch (Exception e) { | |
| 292 | + logger.error(">>>>>>>>>>>>>站点路由数据同步异常",e); | |
| 293 | + } | |
| 294 | + } | |
| 295 | + | |
| 296 | + | |
| 297 | + private void syncSection(){ | |
| 298 | + try { | |
| 299 | + String sql = "select *,ST_AsText(bsection_vector) bsectionVectorWkt from common_road_section"; | |
| 300 | + List<RoadSection> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(RoadSection.class)); | |
| 301 | + List<Section> sections=RoadSection.convert(list); | |
| 302 | + for (Section section : sections) { | |
| 303 | + if(sectionRepository.findSectionByCode(section.getSectionCode()).size()>0){ | |
| 304 | + sectionService.modify(section); | |
| 305 | + }else { | |
| 306 | + sectionService.add(section); | |
| 307 | + } | |
| 308 | + } | |
| 309 | + logger.info(">>>>>>>>>>>>>路段据同步完成"); | |
| 310 | + } catch (Exception e) { | |
| 311 | + logger.error(">>>>>>>>>>>>>路段数据同步异常",e); | |
| 312 | + } | |
| 313 | + } | |
| 314 | + | |
| 315 | + | |
| 316 | + private void syncSectionRoute(){ | |
| 317 | + try { | |
| 318 | + String sql = "select * from common_road_sectionlevel where destroy=0"; | |
| 319 | + List<RoadSectionLevel> list = jdbcTemp.query(sql, new BeanPropertyRowMapper(RoadSectionLevel.class)); | |
| 320 | + List<SectionRoute> sectionRoutes=RoadSectionLevel.convert(list); | |
| 321 | + List<LsSectionRoute> lsSectionRoutes=RoadSectionLevel.convertLS(list); | |
| 322 | + if(sectionRoutes.size()>0){ | |
| 323 | + sectionRouteRepository.deleteAll(); | |
| 324 | + lsSectionRouteRepository.deleteAll(); | |
| 325 | + } | |
| 326 | + sectionRouteRepository.saveAll(sectionRoutes); | |
| 327 | + lsSectionRouteRepository.saveAll(lsSectionRoutes); | |
| 328 | + logger.info(">>>>>>>>>>>>>路段路由据同步完成"); | |
| 329 | + } catch (Exception e) { | |
| 330 | + logger.error(">>>>>>>>>>>>>路段路由数据同步异常",e); | |
| 331 | + } | |
| 332 | + } | |
| 333 | + | |
| 334 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusCompany.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.bsth.entity.Business; | |
| 5 | + | |
| 6 | +import java.util.ArrayList; | |
| 7 | +import java.util.Date; | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | + | |
| 11 | +public class BusCompany implements Cloneable{ | |
| 12 | + | |
| 13 | + //公司编号 | |
| 14 | + private String COMPANY_ID; | |
| 15 | + //公司名称 | |
| 16 | + private String COMPANY_NAME; | |
| 17 | + //公司简称 | |
| 18 | + private String COMPANY_ADDR; | |
| 19 | + //上级编码 | |
| 20 | + private String P_COMPANY_ID; | |
| 21 | + //删除标识0未删除1已删除 | |
| 22 | + private String DEL_FLAG; | |
| 23 | + //创建时间 | |
| 24 | + private String CREATE_TIME; | |
| 25 | + //修改时间 | |
| 26 | + private String UPDATE_TIME; | |
| 27 | + //创建人 | |
| 28 | + private String CREATE_USER; | |
| 29 | + //修改人 | |
| 30 | + private String UPDATE_USER; | |
| 31 | + | |
| 32 | + public static Business convert(BusCompany busCompany){ | |
| 33 | + Business business = new Business(); | |
| 34 | + business.setBusinessName(busCompany.getCOMPANY_NAME()); | |
| 35 | + business.setBusinessCode(busCompany.getCOMPANY_ID()); | |
| 36 | + business.setUpCode(busCompany.getP_COMPANY_ID()); | |
| 37 | + business.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 38 | + business.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 39 | + return business; | |
| 40 | + } | |
| 41 | + | |
| 42 | + public static List<Business> convert(List<BusCompany> busCompanies){ | |
| 43 | + List<Business> list = new ArrayList<>(); | |
| 44 | + for (BusCompany busCompany : busCompanies) { | |
| 45 | + list.add(convert(busCompany)); | |
| 46 | + } | |
| 47 | + return list; | |
| 48 | + } | |
| 49 | + | |
| 50 | + | |
| 51 | + public String getCOMPANY_ID() { | |
| 52 | + return COMPANY_ID; | |
| 53 | + } | |
| 54 | + | |
| 55 | + public void setCOMPANY_ID(String COMPANY_ID) { | |
| 56 | + this.COMPANY_ID = COMPANY_ID; | |
| 57 | + } | |
| 58 | + | |
| 59 | + public String getCOMPANY_NAME() { | |
| 60 | + return COMPANY_NAME; | |
| 61 | + } | |
| 62 | + | |
| 63 | + public void setCOMPANY_NAME(String COMPANY_NAME) { | |
| 64 | + this.COMPANY_NAME = COMPANY_NAME; | |
| 65 | + } | |
| 66 | + | |
| 67 | + public String getCOMPANY_ADDR() { | |
| 68 | + return COMPANY_ADDR; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public void setCOMPANY_ADDR(String COMPANY_ADDR) { | |
| 72 | + this.COMPANY_ADDR = COMPANY_ADDR; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public String getP_COMPANY_ID() { | |
| 76 | + return P_COMPANY_ID; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setP_COMPANY_ID(String p_COMPANY_ID) { | |
| 80 | + P_COMPANY_ID = p_COMPANY_ID; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public String getDEL_FLAG() { | |
| 84 | + return DEL_FLAG; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public void setDEL_FLAG(String DEL_FLAG) { | |
| 88 | + this.DEL_FLAG = DEL_FLAG; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public String getCREATE_TIME() { | |
| 92 | + return CREATE_TIME; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setCREATE_TIME(String CREATE_TIME) { | |
| 96 | + this.CREATE_TIME = CREATE_TIME; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public String getUPDATE_TIME() { | |
| 100 | + return UPDATE_TIME; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void setUPDATE_TIME(String UPDATE_TIME) { | |
| 104 | + this.UPDATE_TIME = UPDATE_TIME; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public String getCREATE_USER() { | |
| 108 | + return CREATE_USER; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public void setCREATE_USER(String CREATE_USER) { | |
| 112 | + this.CREATE_USER = CREATE_USER; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public String getUPDATE_USER() { | |
| 116 | + return UPDATE_USER; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public void setUPDATE_USER(String UPDATE_USER) { | |
| 120 | + this.UPDATE_USER = UPDATE_USER; | |
| 121 | + } | |
| 122 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusLineBase.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.bsth.entity.Line; | |
| 5 | +import java.util.ArrayList; | |
| 6 | +import java.util.Date; | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | + | |
| 10 | +public class BusLineBase implements Cloneable{ | |
| 11 | + | |
| 12 | + //线路编号 | |
| 13 | + private String id; | |
| 14 | + //线路名称 | |
| 15 | + private String name; | |
| 16 | + //线路编码 | |
| 17 | + private String line_code; | |
| 18 | + //线路英文名 | |
| 19 | + private String es; | |
| 20 | + //线路简称 | |
| 21 | + private String short_name; | |
| 22 | + //配置车辆总数 | |
| 23 | + private int car_sum_number; | |
| 24 | + //空调车辆数量 | |
| 25 | + private int hvac_car_number; | |
| 26 | + //普通车辆数量 | |
| 27 | + private int ord_car_number; | |
| 28 | + //停车场编码 | |
| 29 | + private String car_park_code; | |
| 30 | + //起始站名称 | |
| 31 | + private String start_station_name; | |
| 32 | + // 起始站首班车时间 00:00 | |
| 33 | + private String start_station_first_time; | |
| 34 | + //起始站末班车时间 00:00 | |
| 35 | + private String start_station_end_time; | |
| 36 | + //终点站名称 | |
| 37 | + private String end_station_name; | |
| 38 | + //终点站首班时间 00:00 | |
| 39 | + private String end_station_first_time; | |
| 40 | + //终点站末班时间 00:00 | |
| 41 | + private String end_station_end_time; | |
| 42 | + //所属公司 | |
| 43 | + private String company; | |
| 44 | + //分公司 | |
| 45 | + private String branche_company; | |
| 46 | + //性质(线路类型) | |
| 47 | + private String nature; | |
| 48 | + //线路等级 | |
| 49 | + private String level; | |
| 50 | + //线路长度 | |
| 51 | + private double length; | |
| 52 | + //线路负责人 | |
| 53 | + private String charge_name; | |
| 54 | + //负责人电话 | |
| 55 | + private String telephone; | |
| 56 | + //是否撤销 | |
| 57 | + private int destroy; | |
| 58 | + //是否夜宵线 | |
| 59 | + private int supper_line; | |
| 60 | + //起始调度电话 | |
| 61 | + private String start_phone; | |
| 62 | + //终点调度电话 | |
| 63 | + private String end_phone; | |
| 64 | + //开辟日期 | |
| 65 | + private Date open_date; | |
| 66 | + //线路沿革 | |
| 67 | + private String history; | |
| 68 | + //上海市线路编码 | |
| 69 | + private String shanghai_linecode; | |
| 70 | + //设备线路编码 | |
| 71 | + private String eq_linecode; | |
| 72 | + //描述 | |
| 73 | + private String descriptions; | |
| 74 | + //创建人 | |
| 75 | + private String create_by; | |
| 76 | + //创建日期 | |
| 77 | + private Date create_date; | |
| 78 | + //修改人 | |
| 79 | + private String update_by; | |
| 80 | + //修改日期 | |
| 81 | + private Date update_date; | |
| 82 | + //收否环线(0常规 1环线) | |
| 83 | + private int line_play_type; | |
| 84 | + //权证配车数 | |
| 85 | + private int warrant_car; | |
| 86 | +/* //权证日期 | |
| 87 | + private Integer warrant_date;*/ | |
| 88 | + //是否运营 | |
| 89 | + private int sfyy; | |
| 90 | + //票价 | |
| 91 | + private String ticket_price; | |
| 92 | + //是否跨区 0-不跨区 1-跨区 | |
| 93 | + private int region; | |
| 94 | + //线路版本ID | |
| 95 | + private String line_version_id; | |
| 96 | + | |
| 97 | + public static Line convert(BusLineBase busLineBase){ | |
| 98 | + Line line = new Line(); | |
| 99 | + line.setName(busLineBase.name); | |
| 100 | + line.setLineCode(busLineBase.getLine_code()); | |
| 101 | + line.setEs(busLineBase.getEs()); | |
| 102 | + line.setShortName(busLineBase.getShort_name()); | |
| 103 | + line.setStartStationName(busLineBase.getStart_station_name()); | |
| 104 | + line.setEndStationName(busLineBase.getEnd_station_name()); | |
| 105 | + line.setStartStationFirstTime(busLineBase.getStart_station_first_time()); | |
| 106 | + line.setStartStationEndTime(busLineBase.getStart_station_end_time()); | |
| 107 | + line.setEndStationFirstTime(busLineBase.getEnd_station_first_time()); | |
| 108 | + line.setEndStationEndTime(busLineBase.getEnd_station_end_time()); | |
| 109 | + line.setCompany(busLineBase.getCompany()); | |
| 110 | + line.setBrancheCompany(busLineBase.getBranche_company()); | |
| 111 | + line.setNature(busLineBase.getNature()); | |
| 112 | + line.setLevel(busLineBase.getLevel()); | |
| 113 | + line.setLength(busLineBase.getLength()); | |
| 114 | + line.setChargeName(busLineBase.getCharge_name()); | |
| 115 | + line.setTelephone(busLineBase.getTelephone()); | |
| 116 | + line.setDestroy(busLineBase.getDestroy()); | |
| 117 | + line.setSupperLine(busLineBase.getSupper_line()); | |
| 118 | + line.setSfyy(busLineBase.getSfyy()); | |
| 119 | + line.setRegion(busLineBase.getRegion()); | |
| 120 | + line.setStartPhone(busLineBase.getStart_phone()); | |
| 121 | + line.setEndPhone(busLineBase.getEnd_phone()); | |
| 122 | + line.setOpenDate(busLineBase.getOpen_date()); | |
| 123 | + line.setHistory(busLineBase.getHistory()); | |
| 124 | + line.setShanghaiLinecode(busLineBase.getShanghai_linecode()); | |
| 125 | + line.setEqLinecode(busLineBase.getEq_linecode()); | |
| 126 | + line.setCarSumNumber(busLineBase.getCar_sum_number()); | |
| 127 | + line.setHvacCarNumber(busLineBase.getHvac_car_number()); | |
| 128 | + line.setOrdCarNumber(busLineBase.getOrd_car_number()); | |
| 129 | + line.setWarrantCar(busLineBase.getWarrant_car()); | |
| 130 | + line.setCarParkCode(busLineBase.getCar_park_code()); | |
| 131 | + line.setLinePlayType(busLineBase.getLine_play_type()); | |
| 132 | + line.setDescriptions(busLineBase.getDescriptions()); | |
| 133 | + line.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 134 | + line.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 135 | + int isUse=0; | |
| 136 | + if(busLineBase.getDestroy()==0){ | |
| 137 | + isUse=1; | |
| 138 | + } | |
| 139 | + line.setInUse(isUse); | |
| 140 | + line.setRemove(0); | |
| 141 | + return line; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public static List<Line> convert(List<BusLineBase> busLineBases){ | |
| 145 | + List<Line> list = new ArrayList<>(); | |
| 146 | + for (BusLineBase busLineBase : busLineBases) { | |
| 147 | + list.add(convert(busLineBase)); | |
| 148 | + } | |
| 149 | + return list; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public String getId() { | |
| 153 | + return id; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public void setId(String id) { | |
| 157 | + this.id = id; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public String getName() { | |
| 161 | + return name; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public void setName(String name) { | |
| 165 | + this.name = name; | |
| 166 | + } | |
| 167 | + | |
| 168 | + public String getLine_code() { | |
| 169 | + return line_code; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public void setLine_code(String line_code) { | |
| 173 | + this.line_code = line_code; | |
| 174 | + } | |
| 175 | + | |
| 176 | + public String getEs() { | |
| 177 | + return es; | |
| 178 | + } | |
| 179 | + | |
| 180 | + public void setEs(String es) { | |
| 181 | + this.es = es; | |
| 182 | + } | |
| 183 | + | |
| 184 | + public String getShort_name() { | |
| 185 | + return short_name; | |
| 186 | + } | |
| 187 | + | |
| 188 | + public void setShort_name(String short_name) { | |
| 189 | + this.short_name = short_name; | |
| 190 | + } | |
| 191 | + | |
| 192 | + public int getCar_sum_number() { | |
| 193 | + return car_sum_number; | |
| 194 | + } | |
| 195 | + | |
| 196 | + public void setCar_sum_number(int car_sum_number) { | |
| 197 | + this.car_sum_number = car_sum_number; | |
| 198 | + } | |
| 199 | + | |
| 200 | + public int getHvac_car_number() { | |
| 201 | + return hvac_car_number; | |
| 202 | + } | |
| 203 | + | |
| 204 | + public void setHvac_car_number(int hvac_car_number) { | |
| 205 | + this.hvac_car_number = hvac_car_number; | |
| 206 | + } | |
| 207 | + | |
| 208 | + public int getOrd_car_number() { | |
| 209 | + return ord_car_number; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public void setOrd_car_number(int ord_car_number) { | |
| 213 | + this.ord_car_number = ord_car_number; | |
| 214 | + } | |
| 215 | + | |
| 216 | + public String getCar_park_code() { | |
| 217 | + return car_park_code; | |
| 218 | + } | |
| 219 | + | |
| 220 | + public void setCar_park_code(String car_park_code) { | |
| 221 | + this.car_park_code = car_park_code; | |
| 222 | + } | |
| 223 | + | |
| 224 | + public String getStart_station_name() { | |
| 225 | + return start_station_name; | |
| 226 | + } | |
| 227 | + | |
| 228 | + public void setStart_station_name(String start_station_name) { | |
| 229 | + this.start_station_name = start_station_name; | |
| 230 | + } | |
| 231 | + | |
| 232 | + public String getStart_station_first_time() { | |
| 233 | + return start_station_first_time; | |
| 234 | + } | |
| 235 | + | |
| 236 | + public void setStart_station_first_time(String start_station_first_time) { | |
| 237 | + this.start_station_first_time = start_station_first_time; | |
| 238 | + } | |
| 239 | + | |
| 240 | + public String getStart_station_end_time() { | |
| 241 | + return start_station_end_time; | |
| 242 | + } | |
| 243 | + | |
| 244 | + public void setStart_station_end_time(String start_station_end_time) { | |
| 245 | + this.start_station_end_time = start_station_end_time; | |
| 246 | + } | |
| 247 | + | |
| 248 | + public String getEnd_station_name() { | |
| 249 | + return end_station_name; | |
| 250 | + } | |
| 251 | + | |
| 252 | + public void setEnd_station_name(String end_station_name) { | |
| 253 | + this.end_station_name = end_station_name; | |
| 254 | + } | |
| 255 | + | |
| 256 | + public String getEnd_station_first_time() { | |
| 257 | + return end_station_first_time; | |
| 258 | + } | |
| 259 | + | |
| 260 | + public void setEnd_station_first_time(String end_station_first_time) { | |
| 261 | + this.end_station_first_time = end_station_first_time; | |
| 262 | + } | |
| 263 | + | |
| 264 | + public String getEnd_station_end_time() { | |
| 265 | + return end_station_end_time; | |
| 266 | + } | |
| 267 | + | |
| 268 | + public void setEnd_station_end_time(String end_station_end_time) { | |
| 269 | + this.end_station_end_time = end_station_end_time; | |
| 270 | + } | |
| 271 | + | |
| 272 | + public String getCompany() { | |
| 273 | + return company; | |
| 274 | + } | |
| 275 | + | |
| 276 | + public void setCompany(String company) { | |
| 277 | + this.company = company; | |
| 278 | + } | |
| 279 | + | |
| 280 | + public String getBranche_company() { | |
| 281 | + return branche_company; | |
| 282 | + } | |
| 283 | + | |
| 284 | + public void setBranche_company(String branche_company) { | |
| 285 | + this.branche_company = branche_company; | |
| 286 | + } | |
| 287 | + | |
| 288 | + public String getNature() { | |
| 289 | + return nature; | |
| 290 | + } | |
| 291 | + | |
| 292 | + public void setNature(String nature) { | |
| 293 | + this.nature = nature; | |
| 294 | + } | |
| 295 | + | |
| 296 | + public String getLevel() { | |
| 297 | + return level; | |
| 298 | + } | |
| 299 | + | |
| 300 | + public void setLevel(String level) { | |
| 301 | + this.level = level; | |
| 302 | + } | |
| 303 | + | |
| 304 | + public double getLength() { | |
| 305 | + return length; | |
| 306 | + } | |
| 307 | + | |
| 308 | + public void setLength(double length) { | |
| 309 | + this.length = length; | |
| 310 | + } | |
| 311 | + | |
| 312 | + public String getCharge_name() { | |
| 313 | + return charge_name; | |
| 314 | + } | |
| 315 | + | |
| 316 | + public void setCharge_name(String charge_name) { | |
| 317 | + this.charge_name = charge_name; | |
| 318 | + } | |
| 319 | + | |
| 320 | + public String getTelephone() { | |
| 321 | + return telephone; | |
| 322 | + } | |
| 323 | + | |
| 324 | + public void setTelephone(String telephone) { | |
| 325 | + this.telephone = telephone; | |
| 326 | + } | |
| 327 | + | |
| 328 | + public int getDestroy() { | |
| 329 | + return destroy; | |
| 330 | + } | |
| 331 | + | |
| 332 | + public void setDestroy(int destroy) { | |
| 333 | + this.destroy = destroy; | |
| 334 | + } | |
| 335 | + | |
| 336 | + public int getSupper_line() { | |
| 337 | + return supper_line; | |
| 338 | + } | |
| 339 | + | |
| 340 | + public void setSupper_line(int supper_line) { | |
| 341 | + this.supper_line = supper_line; | |
| 342 | + } | |
| 343 | + | |
| 344 | + public String getStart_phone() { | |
| 345 | + return start_phone; | |
| 346 | + } | |
| 347 | + | |
| 348 | + public void setStart_phone(String start_phone) { | |
| 349 | + this.start_phone = start_phone; | |
| 350 | + } | |
| 351 | + | |
| 352 | + public String getEnd_phone() { | |
| 353 | + return end_phone; | |
| 354 | + } | |
| 355 | + | |
| 356 | + public void setEnd_phone(String end_phone) { | |
| 357 | + this.end_phone = end_phone; | |
| 358 | + } | |
| 359 | + | |
| 360 | + public Date getOpen_date() { | |
| 361 | + return open_date; | |
| 362 | + } | |
| 363 | + | |
| 364 | + public void setOpen_date(Date open_date) { | |
| 365 | + this.open_date = open_date; | |
| 366 | + } | |
| 367 | + | |
| 368 | + public String getHistory() { | |
| 369 | + return history; | |
| 370 | + } | |
| 371 | + | |
| 372 | + public void setHistory(String history) { | |
| 373 | + this.history = history; | |
| 374 | + } | |
| 375 | + | |
| 376 | + public String getShanghai_linecode() { | |
| 377 | + return shanghai_linecode; | |
| 378 | + } | |
| 379 | + | |
| 380 | + public void setShanghai_linecode(String shanghai_linecode) { | |
| 381 | + this.shanghai_linecode = shanghai_linecode; | |
| 382 | + } | |
| 383 | + | |
| 384 | + public String getEq_linecode() { | |
| 385 | + return eq_linecode; | |
| 386 | + } | |
| 387 | + | |
| 388 | + public void setEq_linecode(String eq_linecode) { | |
| 389 | + this.eq_linecode = eq_linecode; | |
| 390 | + } | |
| 391 | + | |
| 392 | + public String getDescriptions() { | |
| 393 | + return descriptions; | |
| 394 | + } | |
| 395 | + | |
| 396 | + public void setDescriptions(String descriptions) { | |
| 397 | + this.descriptions = descriptions; | |
| 398 | + } | |
| 399 | + | |
| 400 | + public String getCreate_by() { | |
| 401 | + return create_by; | |
| 402 | + } | |
| 403 | + | |
| 404 | + public void setCreate_by(String create_by) { | |
| 405 | + this.create_by = create_by; | |
| 406 | + } | |
| 407 | + | |
| 408 | + public Date getCreate_date() { | |
| 409 | + return create_date; | |
| 410 | + } | |
| 411 | + | |
| 412 | + public void setCreate_date(Date create_date) { | |
| 413 | + this.create_date = create_date; | |
| 414 | + } | |
| 415 | + | |
| 416 | + public String getUpdate_by() { | |
| 417 | + return update_by; | |
| 418 | + } | |
| 419 | + | |
| 420 | + public void setUpdate_by(String update_by) { | |
| 421 | + this.update_by = update_by; | |
| 422 | + } | |
| 423 | + | |
| 424 | + public Date getUpdate_date() { | |
| 425 | + return update_date; | |
| 426 | + } | |
| 427 | + | |
| 428 | + public void setUpdate_date(Date update_date) { | |
| 429 | + this.update_date = update_date; | |
| 430 | + } | |
| 431 | + | |
| 432 | + public int getLine_play_type() { | |
| 433 | + return line_play_type; | |
| 434 | + } | |
| 435 | + | |
| 436 | + public void setLine_play_type(int line_play_type) { | |
| 437 | + this.line_play_type = line_play_type; | |
| 438 | + } | |
| 439 | + | |
| 440 | + public int getWarrant_car() { | |
| 441 | + return warrant_car; | |
| 442 | + } | |
| 443 | + | |
| 444 | + public void setWarrant_car(int warrant_car) { | |
| 445 | + this.warrant_car = warrant_car; | |
| 446 | + } | |
| 447 | + | |
| 448 | + public int getSfyy() { | |
| 449 | + return sfyy; | |
| 450 | + } | |
| 451 | + | |
| 452 | + public void setSfyy(int sfyy) { | |
| 453 | + this.sfyy = sfyy; | |
| 454 | + } | |
| 455 | + | |
| 456 | + public String getTicket_price() { | |
| 457 | + return ticket_price; | |
| 458 | + } | |
| 459 | + | |
| 460 | + public void setTicket_price(String ticket_price) { | |
| 461 | + this.ticket_price = ticket_price; | |
| 462 | + } | |
| 463 | + | |
| 464 | + public int getRegion() { | |
| 465 | + return region; | |
| 466 | + } | |
| 467 | + | |
| 468 | + public void setRegion(int region) { | |
| 469 | + this.region = region; | |
| 470 | + } | |
| 471 | + | |
| 472 | + public String getLine_version_id() { | |
| 473 | + return line_version_id; | |
| 474 | + } | |
| 475 | + | |
| 476 | + public void setLine_version_id(String line_version_id) { | |
| 477 | + this.line_version_id = line_version_id; | |
| 478 | + } | |
| 479 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusLineOperations.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.bsth.entity.Line; | |
| 5 | +import com.bsth.entity.LineInformation; | |
| 6 | +import java.util.ArrayList; | |
| 7 | +import java.util.Date; | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | + | |
| 11 | +public class BusLineOperations implements Cloneable{ | |
| 12 | + | |
| 13 | + //序号 | |
| 14 | + private String ID; | |
| 15 | + //线路基础信息编号 | |
| 16 | + private String line_base_id; | |
| 17 | + //线路标准信息类型 | |
| 18 | + private String type; | |
| 19 | + //标准总里程 | |
| 20 | + private Double total_mileage; | |
| 21 | + //空放里程 | |
| 22 | + private Double empty_mileage; | |
| 23 | + //上行里程 | |
| 24 | + private Double up_mileage; | |
| 25 | + //下行里程 | |
| 26 | + private Double down_mileage; | |
| 27 | + //上行行驶时间 | |
| 28 | + private Double up_travel_time; | |
| 29 | + //下行行驶时间 | |
| 30 | + private Double down_travel_time; | |
| 31 | + //早高峰开始时间 00:00 | |
| 32 | + private String early_start_time; | |
| 33 | + //早高峰结束时间 00:00 | |
| 34 | + private String early_end_time; | |
| 35 | + //晚高峰开始时间 00:00 | |
| 36 | + private String late_start_time; | |
| 37 | + //晚高峰结束时间 00:00 | |
| 38 | + private String late_end_time; | |
| 39 | + //早高峰大间隔(分钟) | |
| 40 | + private Double early_interval_lg; | |
| 41 | + //晚高峰大间隔(分钟) | |
| 42 | + private Double late_interval_lg; | |
| 43 | + //平时大间隔(分钟) | |
| 44 | + private Double interval_lg; | |
| 45 | + //限速(平时) | |
| 46 | + private Double speed_limit; | |
| 47 | + //限速(雨天) | |
| 48 | + private Double rain_limit; | |
| 49 | + //限速(大雾) | |
| 50 | + private Double fog_limit; | |
| 51 | + //限速(冰雪) | |
| 52 | + private Double snow_limit; | |
| 53 | + //限速(节庆) | |
| 54 | + private Double festival_speed_limit; | |
| 55 | + //滞站 | |
| 56 | + private Integer lag_station; | |
| 57 | + //越站 | |
| 58 | + private Integer skip; | |
| 59 | + //超速 | |
| 60 | + private Integer speeding; | |
| 61 | + //串线 | |
| 62 | + private Integer crossed_line; | |
| 63 | + //越界 | |
| 64 | + private Integer overflights; | |
| 65 | + //描述 | |
| 66 | + private String descriptions; | |
| 67 | + //创建人 | |
| 68 | + private String create_by; | |
| 69 | + //创建日期 | |
| 70 | + private Date create_date; | |
| 71 | + //修改人 | |
| 72 | + private String update_by; | |
| 73 | + //修改日期 | |
| 74 | + private Date update_date; | |
| 75 | + //早高峰下行行驶时间 | |
| 76 | + private Double early_down_time; | |
| 77 | + //早高峰下行行驶时间 | |
| 78 | + private Double early_up_time; | |
| 79 | + //晚高峰下行行驶时间 | |
| 80 | + private Double late_down_time; | |
| 81 | + //晚高峰上行行驶时间 | |
| 82 | + private Double late_up_time; | |
| 83 | + //小夜高峰上行行驶时间 | |
| 84 | + private Double night_end_time; | |
| 85 | + //小夜高峰下行行驶时间 | |
| 86 | + private Double night_start_time; | |
| 87 | + //低谷下行行驶时间 | |
| 88 | + private Double trough_down_time; | |
| 89 | + //低谷上行行驶时间 | |
| 90 | + private Double trough_up_time; | |
| 91 | + //停车场 | |
| 92 | + private String car_park; | |
| 93 | + //下行进场里程 | |
| 94 | + private Double down_in_mileage; | |
| 95 | + //下行进场时间 | |
| 96 | + private Double down_in_timer; | |
| 97 | + //下行出场里程 | |
| 98 | + private Double down_out_mileage; | |
| 99 | + //下行出场时间 | |
| 100 | + private Double down_out_timer; | |
| 101 | + //上行进场里程 | |
| 102 | + private Double up_in_mileage; | |
| 103 | + //上行进场时间 | |
| 104 | + private Double up_in_timer; | |
| 105 | + //上行出场里程 | |
| 106 | + private Double up_out_mileage; | |
| 107 | + //上行出场时间 | |
| 108 | + private Double up_out_timer; | |
| 109 | + //小夜高峰结束时间 | |
| 110 | + private String xygfjssj; | |
| 111 | + //小夜高峰开始时间 | |
| 112 | + private String xygfkssj; | |
| 113 | + | |
| 114 | + public static LineInformation convert(BusLineOperations blo){ | |
| 115 | + LineInformation information=new LineInformation(); | |
| 116 | + Line line=new Line(); | |
| 117 | + line.setId(Integer.parseInt(blo.getLine_base_id())); | |
| 118 | + information.setLine(line); | |
| 119 | + information.setType(blo.getType()); | |
| 120 | + information.setTotalMileage(blo.getTotal_mileage()); | |
| 121 | + information.setEmptyMileage(blo.getEmpty_mileage()); | |
| 122 | + information.setUpMileage(blo.getUp_mileage()); | |
| 123 | + information.setDownMileage(blo.getDown_mileage()); | |
| 124 | + information.setUpTravelTime(blo.getUp_travel_time()); | |
| 125 | + information.setDownTravelTime(blo.getDown_travel_time()); | |
| 126 | + information.setEarlyStartTime(blo.getEarly_start_time()); | |
| 127 | + information.setEarlyEndTime(blo.getEarly_end_time()); | |
| 128 | + information.setLateStartTime(blo.getLate_start_time()); | |
| 129 | + information.setLateEndTime(blo.getLate_end_time()); | |
| 130 | + information.setXygfkssj(blo.getXygfkssj()); | |
| 131 | + information.setXygfjssj(blo.getXygfjssj()); | |
| 132 | + information.setEarlyUpTime(blo.getEarly_up_time()); | |
| 133 | + information.setEarlyDownTime(blo.getEarly_down_time()); | |
| 134 | + information.setLateUpTime(blo.getLate_up_time()); | |
| 135 | + information.setLateDownTime(blo.getLate_down_time()); | |
| 136 | + information.setNightStartTime(blo.getNight_start_time()); | |
| 137 | + information.setNightEndTime(blo.getNight_end_time()); | |
| 138 | + information.setTroughUpTime(blo.getTrough_up_time()); | |
| 139 | + information.setTroughDownTime(blo.getTrough_down_time()); | |
| 140 | + information.setCarPark(blo.getCar_park()); | |
| 141 | + information.setUpInTimer(blo.getUp_in_timer()); | |
| 142 | + information.setUpOutTimer(blo.getUp_out_timer()); | |
| 143 | + information.setDownInTimer(blo.getDown_in_timer()); | |
| 144 | + information.setDownOutTimer(blo.getDown_out_timer()); | |
| 145 | + information.setEarlyIntervalLg(blo.getEarly_interval_lg()); | |
| 146 | + information.setLateIntervalLg(blo.getLate_interval_lg()); | |
| 147 | + information.setIntervalLg(blo.getInterval_lg()); | |
| 148 | + information.setSpeedLimit(blo.getSpeed_limit()); | |
| 149 | + information.setRainLimit(blo.getRain_limit()); | |
| 150 | + information.setFogLimit(blo.getFog_limit()); | |
| 151 | + information.setSnowLimit(blo.getSnow_limit()); | |
| 152 | + information.setFestivalSpeedLimit(blo.getFestival_speed_limit()); | |
| 153 | + information.setLagStation(blo.getLag_station()); | |
| 154 | + information.setSkip(blo.getSkip()); | |
| 155 | + information.setSpeeding(blo.getSpeeding()); | |
| 156 | + information.setCrossedLine(blo.getCrossed_line()); | |
| 157 | + information.setOverflights(blo.getOverflights()); | |
| 158 | + information.setDescriptions(blo.getDescriptions()); | |
| 159 | + information.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 160 | + information.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 161 | + return information; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public static List<LineInformation> convert(List<BusLineOperations> busLineOperations){ | |
| 165 | + List<LineInformation> list = new ArrayList<>(); | |
| 166 | + for (BusLineOperations busLineOperation : busLineOperations) { | |
| 167 | + list.add(convert(busLineOperation)); | |
| 168 | + } | |
| 169 | + return list; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public String getID() { | |
| 173 | + return ID; | |
| 174 | + } | |
| 175 | + | |
| 176 | + public void setID(String ID) { | |
| 177 | + this.ID = ID; | |
| 178 | + } | |
| 179 | + | |
| 180 | + public String getLine_base_id() { | |
| 181 | + return line_base_id; | |
| 182 | + } | |
| 183 | + | |
| 184 | + public void setLine_base_id(String line_base_id) { | |
| 185 | + this.line_base_id = line_base_id; | |
| 186 | + } | |
| 187 | + | |
| 188 | + public String getType() { | |
| 189 | + return type; | |
| 190 | + } | |
| 191 | + | |
| 192 | + public void setType(String type) { | |
| 193 | + this.type = type; | |
| 194 | + } | |
| 195 | + | |
| 196 | + public Double getTotal_mileage() { | |
| 197 | + return total_mileage; | |
| 198 | + } | |
| 199 | + | |
| 200 | + public void setTotal_mileage(Double total_mileage) { | |
| 201 | + this.total_mileage = total_mileage; | |
| 202 | + } | |
| 203 | + | |
| 204 | + public Double getEmpty_mileage() { | |
| 205 | + return empty_mileage; | |
| 206 | + } | |
| 207 | + | |
| 208 | + public void setEmpty_mileage(Double empty_mileage) { | |
| 209 | + this.empty_mileage = empty_mileage; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public Double getUp_mileage() { | |
| 213 | + return up_mileage; | |
| 214 | + } | |
| 215 | + | |
| 216 | + public void setUp_mileage(Double up_mileage) { | |
| 217 | + this.up_mileage = up_mileage; | |
| 218 | + } | |
| 219 | + | |
| 220 | + public Double getDown_mileage() { | |
| 221 | + return down_mileage; | |
| 222 | + } | |
| 223 | + | |
| 224 | + public void setDown_mileage(Double down_mileage) { | |
| 225 | + this.down_mileage = down_mileage; | |
| 226 | + } | |
| 227 | + | |
| 228 | + public Double getUp_travel_time() { | |
| 229 | + return up_travel_time; | |
| 230 | + } | |
| 231 | + | |
| 232 | + public void setUp_travel_time(Double up_travel_time) { | |
| 233 | + this.up_travel_time = up_travel_time; | |
| 234 | + } | |
| 235 | + | |
| 236 | + public Double getDown_travel_time() { | |
| 237 | + return down_travel_time; | |
| 238 | + } | |
| 239 | + | |
| 240 | + public void setDown_travel_time(Double down_travel_time) { | |
| 241 | + this.down_travel_time = down_travel_time; | |
| 242 | + } | |
| 243 | + | |
| 244 | + public String getEarly_start_time() { | |
| 245 | + return early_start_time; | |
| 246 | + } | |
| 247 | + | |
| 248 | + public void setEarly_start_time(String early_start_time) { | |
| 249 | + this.early_start_time = early_start_time; | |
| 250 | + } | |
| 251 | + | |
| 252 | + public String getEarly_end_time() { | |
| 253 | + return early_end_time; | |
| 254 | + } | |
| 255 | + | |
| 256 | + public void setEarly_end_time(String early_end_time) { | |
| 257 | + this.early_end_time = early_end_time; | |
| 258 | + } | |
| 259 | + | |
| 260 | + public String getLate_start_time() { | |
| 261 | + return late_start_time; | |
| 262 | + } | |
| 263 | + | |
| 264 | + public void setLate_start_time(String late_start_time) { | |
| 265 | + this.late_start_time = late_start_time; | |
| 266 | + } | |
| 267 | + | |
| 268 | + public String getLate_end_time() { | |
| 269 | + return late_end_time; | |
| 270 | + } | |
| 271 | + | |
| 272 | + public void setLate_end_time(String late_end_time) { | |
| 273 | + this.late_end_time = late_end_time; | |
| 274 | + } | |
| 275 | + | |
| 276 | + public Double getEarly_interval_lg() { | |
| 277 | + return early_interval_lg; | |
| 278 | + } | |
| 279 | + | |
| 280 | + public void setEarly_interval_lg(Double early_interval_lg) { | |
| 281 | + this.early_interval_lg = early_interval_lg; | |
| 282 | + } | |
| 283 | + | |
| 284 | + public Double getLate_interval_lg() { | |
| 285 | + return late_interval_lg; | |
| 286 | + } | |
| 287 | + | |
| 288 | + public void setLate_interval_lg(Double late_interval_lg) { | |
| 289 | + this.late_interval_lg = late_interval_lg; | |
| 290 | + } | |
| 291 | + | |
| 292 | + public Double getInterval_lg() { | |
| 293 | + return interval_lg; | |
| 294 | + } | |
| 295 | + | |
| 296 | + public void setInterval_lg(Double interval_lg) { | |
| 297 | + this.interval_lg = interval_lg; | |
| 298 | + } | |
| 299 | + | |
| 300 | + public Double getSpeed_limit() { | |
| 301 | + return speed_limit; | |
| 302 | + } | |
| 303 | + | |
| 304 | + public void setSpeed_limit(Double speed_limit) { | |
| 305 | + this.speed_limit = speed_limit; | |
| 306 | + } | |
| 307 | + | |
| 308 | + public Double getRain_limit() { | |
| 309 | + return rain_limit; | |
| 310 | + } | |
| 311 | + | |
| 312 | + public void setRain_limit(Double rain_limit) { | |
| 313 | + this.rain_limit = rain_limit; | |
| 314 | + } | |
| 315 | + | |
| 316 | + public Double getFog_limit() { | |
| 317 | + return fog_limit; | |
| 318 | + } | |
| 319 | + | |
| 320 | + public void setFog_limit(Double fog_limit) { | |
| 321 | + this.fog_limit = fog_limit; | |
| 322 | + } | |
| 323 | + | |
| 324 | + public Double getSnow_limit() { | |
| 325 | + return snow_limit; | |
| 326 | + } | |
| 327 | + | |
| 328 | + public void setSnow_limit(Double snow_limit) { | |
| 329 | + this.snow_limit = snow_limit; | |
| 330 | + } | |
| 331 | + | |
| 332 | + public Double getFestival_speed_limit() { | |
| 333 | + return festival_speed_limit; | |
| 334 | + } | |
| 335 | + | |
| 336 | + public void setFestival_speed_limit(Double festival_speed_limit) { | |
| 337 | + this.festival_speed_limit = festival_speed_limit; | |
| 338 | + } | |
| 339 | + | |
| 340 | + public Integer getLag_station() { | |
| 341 | + return lag_station; | |
| 342 | + } | |
| 343 | + | |
| 344 | + public void setLag_station(Integer lag_station) { | |
| 345 | + this.lag_station = lag_station; | |
| 346 | + } | |
| 347 | + | |
| 348 | + public Integer getSkip() { | |
| 349 | + return skip; | |
| 350 | + } | |
| 351 | + | |
| 352 | + public void setSkip(Integer skip) { | |
| 353 | + this.skip = skip; | |
| 354 | + } | |
| 355 | + | |
| 356 | + public Integer getSpeeding() { | |
| 357 | + return speeding; | |
| 358 | + } | |
| 359 | + | |
| 360 | + public void setSpeeding(Integer speeding) { | |
| 361 | + this.speeding = speeding; | |
| 362 | + } | |
| 363 | + | |
| 364 | + public Integer getCrossed_line() { | |
| 365 | + return crossed_line; | |
| 366 | + } | |
| 367 | + | |
| 368 | + public void setCrossed_line(Integer crossed_line) { | |
| 369 | + this.crossed_line = crossed_line; | |
| 370 | + } | |
| 371 | + | |
| 372 | + public Integer getOverflights() { | |
| 373 | + return overflights; | |
| 374 | + } | |
| 375 | + | |
| 376 | + public void setOverflights(Integer overflights) { | |
| 377 | + this.overflights = overflights; | |
| 378 | + } | |
| 379 | + | |
| 380 | + public String getDescriptions() { | |
| 381 | + return descriptions; | |
| 382 | + } | |
| 383 | + | |
| 384 | + public void setDescriptions(String descriptions) { | |
| 385 | + this.descriptions = descriptions; | |
| 386 | + } | |
| 387 | + | |
| 388 | + public String getCreate_by() { | |
| 389 | + return create_by; | |
| 390 | + } | |
| 391 | + | |
| 392 | + public void setCreate_by(String create_by) { | |
| 393 | + this.create_by = create_by; | |
| 394 | + } | |
| 395 | + | |
| 396 | + public Date getCreate_date() { | |
| 397 | + return create_date; | |
| 398 | + } | |
| 399 | + | |
| 400 | + public void setCreate_date(Date create_date) { | |
| 401 | + this.create_date = create_date; | |
| 402 | + } | |
| 403 | + | |
| 404 | + public String getUpdate_by() { | |
| 405 | + return update_by; | |
| 406 | + } | |
| 407 | + | |
| 408 | + public void setUpdate_by(String update_by) { | |
| 409 | + this.update_by = update_by; | |
| 410 | + } | |
| 411 | + | |
| 412 | + public Date getUpdate_date() { | |
| 413 | + return update_date; | |
| 414 | + } | |
| 415 | + | |
| 416 | + public void setUpdate_date(Date update_date) { | |
| 417 | + this.update_date = update_date; | |
| 418 | + } | |
| 419 | + | |
| 420 | + public Double getEarly_down_time() { | |
| 421 | + return early_down_time; | |
| 422 | + } | |
| 423 | + | |
| 424 | + public void setEarly_down_time(Double early_down_time) { | |
| 425 | + this.early_down_time = early_down_time; | |
| 426 | + } | |
| 427 | + | |
| 428 | + public Double getEarly_up_time() { | |
| 429 | + return early_up_time; | |
| 430 | + } | |
| 431 | + | |
| 432 | + public void setEarly_up_time(Double early_up_time) { | |
| 433 | + this.early_up_time = early_up_time; | |
| 434 | + } | |
| 435 | + | |
| 436 | + public Double getLate_down_time() { | |
| 437 | + return late_down_time; | |
| 438 | + } | |
| 439 | + | |
| 440 | + public void setLate_down_time(Double late_down_time) { | |
| 441 | + this.late_down_time = late_down_time; | |
| 442 | + } | |
| 443 | + | |
| 444 | + public Double getLate_up_time() { | |
| 445 | + return late_up_time; | |
| 446 | + } | |
| 447 | + | |
| 448 | + public void setLate_up_time(Double late_up_time) { | |
| 449 | + this.late_up_time = late_up_time; | |
| 450 | + } | |
| 451 | + | |
| 452 | + public Double getNight_end_time() { | |
| 453 | + return night_end_time; | |
| 454 | + } | |
| 455 | + | |
| 456 | + public void setNight_end_time(Double night_end_time) { | |
| 457 | + this.night_end_time = night_end_time; | |
| 458 | + } | |
| 459 | + | |
| 460 | + public Double getNight_start_time() { | |
| 461 | + return night_start_time; | |
| 462 | + } | |
| 463 | + | |
| 464 | + public void setNight_start_time(Double night_start_time) { | |
| 465 | + this.night_start_time = night_start_time; | |
| 466 | + } | |
| 467 | + | |
| 468 | + public Double getTrough_down_time() { | |
| 469 | + return trough_down_time; | |
| 470 | + } | |
| 471 | + | |
| 472 | + public void setTrough_down_time(Double trough_down_time) { | |
| 473 | + this.trough_down_time = trough_down_time; | |
| 474 | + } | |
| 475 | + | |
| 476 | + public Double getTrough_up_time() { | |
| 477 | + return trough_up_time; | |
| 478 | + } | |
| 479 | + | |
| 480 | + public void setTrough_up_time(Double trough_up_time) { | |
| 481 | + this.trough_up_time = trough_up_time; | |
| 482 | + } | |
| 483 | + | |
| 484 | + public String getCar_park() { | |
| 485 | + return car_park; | |
| 486 | + } | |
| 487 | + | |
| 488 | + public void setCar_park(String car_park) { | |
| 489 | + this.car_park = car_park; | |
| 490 | + } | |
| 491 | + | |
| 492 | + public Double getDown_in_mileage() { | |
| 493 | + return down_in_mileage; | |
| 494 | + } | |
| 495 | + | |
| 496 | + public void setDown_in_mileage(Double down_in_mileage) { | |
| 497 | + this.down_in_mileage = down_in_mileage; | |
| 498 | + } | |
| 499 | + | |
| 500 | + public Double getDown_in_timer() { | |
| 501 | + return down_in_timer; | |
| 502 | + } | |
| 503 | + | |
| 504 | + public void setDown_in_timer(Double down_in_timer) { | |
| 505 | + this.down_in_timer = down_in_timer; | |
| 506 | + } | |
| 507 | + | |
| 508 | + public Double getDown_out_mileage() { | |
| 509 | + return down_out_mileage; | |
| 510 | + } | |
| 511 | + | |
| 512 | + public void setDown_out_mileage(Double down_out_mileage) { | |
| 513 | + this.down_out_mileage = down_out_mileage; | |
| 514 | + } | |
| 515 | + | |
| 516 | + public Double getDown_out_timer() { | |
| 517 | + return down_out_timer; | |
| 518 | + } | |
| 519 | + | |
| 520 | + public void setDown_out_timer(Double down_out_timer) { | |
| 521 | + this.down_out_timer = down_out_timer; | |
| 522 | + } | |
| 523 | + | |
| 524 | + public Double getUp_in_mileage() { | |
| 525 | + return up_in_mileage; | |
| 526 | + } | |
| 527 | + | |
| 528 | + public void setUp_in_mileage(Double up_in_mileage) { | |
| 529 | + this.up_in_mileage = up_in_mileage; | |
| 530 | + } | |
| 531 | + | |
| 532 | + public Double getUp_in_timer() { | |
| 533 | + return up_in_timer; | |
| 534 | + } | |
| 535 | + | |
| 536 | + public void setUp_in_timer(Double up_in_timer) { | |
| 537 | + this.up_in_timer = up_in_timer; | |
| 538 | + } | |
| 539 | + | |
| 540 | + public Double getUp_out_mileage() { | |
| 541 | + return up_out_mileage; | |
| 542 | + } | |
| 543 | + | |
| 544 | + public void setUp_out_mileage(Double up_out_mileage) { | |
| 545 | + this.up_out_mileage = up_out_mileage; | |
| 546 | + } | |
| 547 | + | |
| 548 | + public Double getUp_out_timer() { | |
| 549 | + return up_out_timer; | |
| 550 | + } | |
| 551 | + | |
| 552 | + public void setUp_out_timer(Double up_out_timer) { | |
| 553 | + this.up_out_timer = up_out_timer; | |
| 554 | + } | |
| 555 | + | |
| 556 | + public String getXygfjssj() { | |
| 557 | + return xygfjssj; | |
| 558 | + } | |
| 559 | + | |
| 560 | + public void setXygfjssj(String xygfjssj) { | |
| 561 | + this.xygfjssj = xygfjssj; | |
| 562 | + } | |
| 563 | + | |
| 564 | + public String getXygfkssj() { | |
| 565 | + return xygfkssj; | |
| 566 | + } | |
| 567 | + | |
| 568 | + public void setXygfkssj(String xygfkssj) { | |
| 569 | + this.xygfkssj = xygfkssj; | |
| 570 | + } | |
| 571 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusPark.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.bsth.entity.CarPark; | |
| 5 | +import java.util.ArrayList; | |
| 6 | +import java.util.Date; | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | + | |
| 10 | +public class BusPark implements Cloneable{ | |
| 11 | + | |
| 12 | + //面积 默认0 | |
| 13 | + private Double area; | |
| 14 | + //公司编码 | |
| 15 | + private String company; | |
| 16 | + //停车场编号长度8位 用F补足 | |
| 17 | + private String park_code; | |
| 18 | + //停车场名称 | |
| 19 | + private String park_name; | |
| 20 | + //地理位置中心点 百度 | |
| 21 | + private String b_center_point; | |
| 22 | + //地理位置 百度 | |
| 23 | + private String b_park_point_wkt; | |
| 24 | + //分公司编码 | |
| 25 | + private String branche_company; | |
| 26 | + //经纬坐标类型 b:百度坐标系 d:高德坐标系 | |
| 27 | + private String db_type; | |
| 28 | + //描述 | |
| 29 | + private String descriptions; | |
| 30 | + //是否撤销 0否 1是 | |
| 31 | + private Integer destroy; | |
| 32 | + //地理位置中心点(WGS坐标) | |
| 33 | + private String g_center_point; | |
| 34 | + //地理位置(WGS坐标) | |
| 35 | + private String g_park_point_wkt; | |
| 36 | + //圆形半径 | |
| 37 | + private Integer radius; | |
| 38 | + //图形类型 r:圆形 d:多边形 | |
| 39 | + private String shapes_type; | |
| 40 | + | |
| 41 | + | |
| 42 | + public static CarPark convert(BusPark bp){ | |
| 43 | + CarPark carPark = new CarPark(); | |
| 44 | + carPark.setParkCode(bp.getPark_code()); | |
| 45 | + carPark.setParkName(bp.getPark_name()); | |
| 46 | + carPark.setbParkPoint(bp.getB_park_point_wkt()); | |
| 47 | + carPark.setbCenterPoint(bp.getB_center_point()); | |
| 48 | + carPark.setgParkPoint(bp.getG_park_point_wkt()); | |
| 49 | + carPark.setgCenterPoint(bp.getG_center_point()); | |
| 50 | + carPark.setDbType(bp.getDb_type()); | |
| 51 | + carPark.setShapesType(bp.getShapes_type()); | |
| 52 | + carPark.setRadius(bp.getRadius()); | |
| 53 | + carPark.setArea(bp.getArea()); | |
| 54 | + carPark.setCompany(bp.getCompany()); | |
| 55 | + carPark.setBrancheCompany(bp.getBranche_company()); | |
| 56 | + carPark.setDestroy(bp.getDestroy()); | |
| 57 | + carPark.setDescriptions(bp.getDescriptions()); | |
| 58 | + carPark.setVersions(1); | |
| 59 | + carPark.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 60 | + carPark.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 61 | + return carPark; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public static List<CarPark> convert(List<BusPark> busParks){ | |
| 65 | + List<CarPark> list = new ArrayList<>(); | |
| 66 | + for (BusPark busPark : busParks) { | |
| 67 | + list.add(convert(busPark)); | |
| 68 | + } | |
| 69 | + return list; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public Double getArea() { | |
| 73 | + return area; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setArea(Double area) { | |
| 77 | + this.area = area; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public String getCompany() { | |
| 81 | + return company; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setCompany(String company) { | |
| 85 | + this.company = company; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public String getPark_code() { | |
| 89 | + return park_code; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setPark_code(String park_code) { | |
| 93 | + this.park_code = park_code; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public String getPark_name() { | |
| 97 | + return park_name; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setPark_name(String park_name) { | |
| 101 | + this.park_name = park_name; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public String getB_center_point() { | |
| 105 | + return b_center_point; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setB_center_point(String b_center_point) { | |
| 109 | + this.b_center_point = b_center_point; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public String getB_park_point_wkt() { | |
| 113 | + return b_park_point_wkt; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setB_park_point_wkt(String b_park_point_wkt) { | |
| 117 | + this.b_park_point_wkt = b_park_point_wkt; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getBranche_company() { | |
| 121 | + return branche_company; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setBranche_company(String branche_company) { | |
| 125 | + this.branche_company = branche_company; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public String getDb_type() { | |
| 129 | + return db_type; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setDb_type(String db_type) { | |
| 133 | + this.db_type = db_type; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public String getDescriptions() { | |
| 137 | + return descriptions; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setDescriptions(String descriptions) { | |
| 141 | + this.descriptions = descriptions; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public Integer getDestroy() { | |
| 145 | + return destroy; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public void setDestroy(Integer destroy) { | |
| 149 | + this.destroy = destroy; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public String getG_center_point() { | |
| 153 | + return g_center_point; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public void setG_center_point(String g_center_point) { | |
| 157 | + this.g_center_point = g_center_point; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public String getG_park_point_wkt() { | |
| 161 | + return g_park_point_wkt; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public void setG_park_point_wkt(String g_park_point_wkt) { | |
| 165 | + this.g_park_point_wkt = g_park_point_wkt; | |
| 166 | + } | |
| 167 | + | |
| 168 | + public Integer getRadius() { | |
| 169 | + return radius; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public void setRadius(Integer radius) { | |
| 173 | + this.radius = radius; | |
| 174 | + } | |
| 175 | + | |
| 176 | + public String getShapes_type() { | |
| 177 | + return shapes_type; | |
| 178 | + } | |
| 179 | + | |
| 180 | + public void setShapes_type(String shapes_type) { | |
| 181 | + this.shapes_type = shapes_type; | |
| 182 | + } | |
| 183 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusStaff.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +import com.bsth.entity.Personnel; | |
| 6 | +import java.util.ArrayList; | |
| 7 | +import java.util.Date; | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | + | |
| 11 | +public class BusStaff implements Cloneable{ | |
| 12 | + | |
| 13 | + | |
| 14 | + //所属分公司 | |
| 15 | + private String branche_company; | |
| 16 | + //分公司编码 | |
| 17 | + private String branche_company_code; | |
| 18 | + //所属公司 | |
| 19 | + private String company; | |
| 20 | + //公司编码 | |
| 21 | + private String company_code; | |
| 22 | + //描述 | |
| 23 | + private String descriptions; | |
| 24 | + //一卡通工作卡号 | |
| 25 | + private String ic_card_code; | |
| 26 | + //工号(员工编号带公司编码前缀) | |
| 27 | + private String job_code; | |
| 28 | + //运营服务证书号 | |
| 29 | + private String papers_code; | |
| 30 | + //姓名 | |
| 31 | + private String personnel_name; | |
| 32 | + //性别 1-男 2-女 | |
| 33 | + private String personnel_type; | |
| 34 | + //所属岗位/工种 | |
| 35 | + private String posts; | |
| 36 | + //手机号 | |
| 37 | + private String telphone; | |
| 38 | + //身份证 | |
| 39 | + private String card; | |
| 40 | + //工号 | |
| 41 | + private String job_codeori; | |
| 42 | + //创建日期 | |
| 43 | + private Date create_date; | |
| 44 | + //更新日期 | |
| 45 | + private Date update_date; | |
| 46 | + | |
| 47 | + | |
| 48 | + public static Personnel convert(BusStaff busStaff){ | |
| 49 | + Personnel personnel = new Personnel(); | |
| 50 | + personnel.setJobCodeori(busStaff.getJob_codeori()); | |
| 51 | + personnel.setJobCode(busStaff.getJob_code()); | |
| 52 | + personnel.setCompany(busStaff.getCompany()); | |
| 53 | + personnel.setCompanyCode(busStaff.getCompany_code()); | |
| 54 | + personnel.setBrancheCompany(busStaff.getBranche_company()); | |
| 55 | + personnel.setBrancheCompanyCode(busStaff.getBranche_company_code()); | |
| 56 | + personnel.setPersonnelName(busStaff.getPersonnel_name()); | |
| 57 | + personnel.setPapersCode(busStaff.getPapers_code()); | |
| 58 | + personnel.setIcCardCode(busStaff.getIc_card_code()); | |
| 59 | + personnel.setPosts(busStaff.getPosts()); | |
| 60 | + personnel.setCard(busStaff.getCard()); | |
| 61 | + personnel.setDestroy(0); | |
| 62 | + return personnel; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public static List<Personnel> convert(List<BusStaff> busStaffs){ | |
| 66 | + List<Personnel> list = new ArrayList<>(); | |
| 67 | + for (BusStaff busStaff : busStaffs) { | |
| 68 | + list.add(convert(busStaff)); | |
| 69 | + } | |
| 70 | + return list; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public String getBranche_company() { | |
| 74 | + return branche_company; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setBranche_company(String branche_company) { | |
| 78 | + this.branche_company = branche_company; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public String getBranche_company_code() { | |
| 82 | + return branche_company_code; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setBranche_company_code(String branche_company_code) { | |
| 86 | + this.branche_company_code = branche_company_code; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public String getCompany() { | |
| 90 | + return company; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setCompany(String company) { | |
| 94 | + this.company = company; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getCompany_code() { | |
| 98 | + return company_code; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setCompany_code(String company_code) { | |
| 102 | + this.company_code = company_code; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getDescriptions() { | |
| 106 | + return descriptions; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setDescriptions(String descriptions) { | |
| 110 | + this.descriptions = descriptions; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public String getIc_card_code() { | |
| 114 | + return ic_card_code; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setIc_card_code(String ic_card_code) { | |
| 118 | + this.ic_card_code = ic_card_code; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public String getJob_code() { | |
| 122 | + return job_code; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setJob_code(String job_code) { | |
| 126 | + this.job_code = job_code; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public String getPapers_code() { | |
| 130 | + return papers_code; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public void setPapers_code(String papers_code) { | |
| 134 | + this.papers_code = papers_code; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public String getPersonnel_name() { | |
| 138 | + return personnel_name; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setPersonnel_name(String personnel_name) { | |
| 142 | + this.personnel_name = personnel_name; | |
| 143 | + } | |
| 144 | + | |
| 145 | + public String getPersonnel_type() { | |
| 146 | + return personnel_type; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public void setPersonnel_type(String personnel_type) { | |
| 150 | + this.personnel_type = personnel_type; | |
| 151 | + } | |
| 152 | + | |
| 153 | + public String getPosts() { | |
| 154 | + return posts; | |
| 155 | + } | |
| 156 | + | |
| 157 | + public void setPosts(String posts) { | |
| 158 | + this.posts = posts; | |
| 159 | + } | |
| 160 | + | |
| 161 | + public String getTelphone() { | |
| 162 | + return telphone; | |
| 163 | + } | |
| 164 | + | |
| 165 | + public void setTelphone(String telphone) { | |
| 166 | + this.telphone = telphone; | |
| 167 | + } | |
| 168 | + | |
| 169 | + public String getCard() { | |
| 170 | + return card; | |
| 171 | + } | |
| 172 | + | |
| 173 | + public void setCard(String card) { | |
| 174 | + this.card = card; | |
| 175 | + } | |
| 176 | + | |
| 177 | + public String getJob_codeori() { | |
| 178 | + return job_codeori; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public void setJob_codeori(String job_codeori) { | |
| 182 | + this.job_codeori = job_codeori; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public Date getCreate_date() { | |
| 186 | + return create_date; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public void setCreate_date(Date create_date) { | |
| 190 | + this.create_date = create_date; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public Date getUpdate_date() { | |
| 194 | + return update_date; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public void setUpdate_date(Date update_date) { | |
| 198 | + this.update_date = update_date; | |
| 199 | + } | |
| 200 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusStop.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +import com.bsth.entity.Station; | |
| 6 | +import com.bsth.util.GeoConverter; | |
| 7 | +import org.geolatte.geom.Point; | |
| 8 | +import org.geolatte.geom.codec.Wkt; | |
| 9 | +import org.springframework.util.StringUtils; | |
| 10 | +import java.util.ArrayList; | |
| 11 | +import java.util.Date; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | + | |
| 15 | +public class BusStop implements Cloneable{ | |
| 16 | + | |
| 17 | + | |
| 18 | + //站点编码 | |
| 19 | + private String station_cod; | |
| 20 | + //站点名称 | |
| 21 | + private String station_name; | |
| 22 | + //所在道路编码 | |
| 23 | + private String road_coding; | |
| 24 | + //站址 | |
| 25 | + private String STOP_ADDRESS; | |
| 26 | + //是否撤销<1:撤销;0:不撤销> | |
| 27 | + private Integer destroy=0; | |
| 28 | + //版本 | |
| 29 | + private Integer versions; | |
| 30 | + //描述 | |
| 31 | + private String descriptions; | |
| 32 | + //中心点 数字格式 | |
| 33 | + private String centerPointWkt; | |
| 34 | + | |
| 35 | + public static Station convert(BusStop busStop){ | |
| 36 | + Station station = new Station(); | |
| 37 | + station.setId(Integer.parseInt(busStop.getStation_cod())); | |
| 38 | + station.setStationCode(busStop.getStation_cod()); | |
| 39 | + station.setStationName(busStop.getStation_name()); | |
| 40 | + station.setRoadCoding(busStop.getRoad_coding()); | |
| 41 | + station.setAddress(busStop.getSTOP_ADDRESS()); | |
| 42 | + station.setDestroy(busStop.getDestroy()); | |
| 43 | + station.setVersions(busStop.getVersions()); | |
| 44 | + station.setDescriptions(busStop.getDescriptions()); | |
| 45 | + station.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 46 | + station.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 47 | + if (!StringUtils.isEmpty(busStop.getCenterPointWkt())) { | |
| 48 | + Point baidu = (Point) Wkt.fromWkt(busStop.getCenterPointWkt()); | |
| 49 | + Point wgs = GeoConverter.pointBd2wgs(busStop.getCenterPointWkt()); | |
| 50 | + station.setCenterPoint(baidu); | |
| 51 | + station.setCenterPointWgs(wgs); | |
| 52 | + } | |
| 53 | + return station; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public static List<Station> convert(List<BusStop> busStops){ | |
| 57 | + List<Station> list = new ArrayList<>(); | |
| 58 | + for (BusStop busStop : busStops) { | |
| 59 | + list.add(convert(busStop)); | |
| 60 | + } | |
| 61 | + return list; | |
| 62 | + } | |
| 63 | + | |
| 64 | + | |
| 65 | + public String getStation_cod() { | |
| 66 | + return station_cod; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public void setStation_cod(String station_cod) { | |
| 70 | + this.station_cod = station_cod; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public String getStation_name() { | |
| 74 | + return station_name; | |
| 75 | + } | |
| 76 | + | |
| 77 | + public void setStation_name(String station_name) { | |
| 78 | + this.station_name = station_name; | |
| 79 | + } | |
| 80 | + | |
| 81 | + public String getRoad_coding() { | |
| 82 | + return road_coding; | |
| 83 | + } | |
| 84 | + | |
| 85 | + public void setRoad_coding(String road_coding) { | |
| 86 | + this.road_coding = road_coding; | |
| 87 | + } | |
| 88 | + | |
| 89 | + public String getSTOP_ADDRESS() { | |
| 90 | + return STOP_ADDRESS; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setSTOP_ADDRESS(String STOP_ADDRESS) { | |
| 94 | + this.STOP_ADDRESS = STOP_ADDRESS; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public Integer getDestroy() { | |
| 98 | + return destroy; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setDestroy(Integer destroy) { | |
| 102 | + this.destroy = destroy; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public Integer getVersions() { | |
| 106 | + return versions; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setVersions(Integer versions) { | |
| 110 | + this.versions = versions; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public String getDescriptions() { | |
| 114 | + return descriptions; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setDescriptions(String descriptions) { | |
| 118 | + this.descriptions = descriptions; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public String getCenterPointWkt() { | |
| 122 | + return centerPointWkt; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setCenterPointWkt(String centerPointWkt) { | |
| 126 | + this.centerPointWkt = centerPointWkt; | |
| 127 | + } | |
| 128 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusStopLevel.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.bsth.entity.*; | |
| 5 | +import com.bsth.util.GeoConverter; | |
| 6 | +import org.geolatte.geom.Point; | |
| 7 | +import org.geolatte.geom.Polygon; | |
| 8 | +import org.geolatte.geom.codec.Wkt; | |
| 9 | +import org.springframework.util.StringUtils; | |
| 10 | +import java.util.ArrayList; | |
| 11 | +import java.util.Date; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | + | |
| 15 | +public class BusStopLevel implements Cloneable{ | |
| 16 | + | |
| 17 | + | |
| 18 | + //线路基础信息编号 | |
| 19 | + private String Line_base_id; | |
| 20 | + //站点id | |
| 21 | + private String station; | |
| 22 | + //站点名称 | |
| 23 | + private String station_name; | |
| 24 | + //站点路由序号 | |
| 25 | + private Integer station_route_code; | |
| 26 | + //线路编码 | |
| 27 | + private String line_code; | |
| 28 | + //站点编码 | |
| 29 | + private String station_code; | |
| 30 | + //站点类别<B:起点站;Z:中途站;E:终点站;T:停车场> | |
| 31 | + private String station_mark; | |
| 32 | + //站点路由出站序号 | |
| 33 | + private Integer out_station_nmber; | |
| 34 | + //站点路由方向 | |
| 35 | + private Integer directions; | |
| 36 | + //站点路由到站距离 | |
| 37 | + private Double distances; | |
| 38 | + //站点路由到站时间 | |
| 39 | + private Double to_time; | |
| 40 | + //首班时间 | |
| 41 | + private String first_time; | |
| 42 | + //末班时间 | |
| 43 | + private String end_time; | |
| 44 | + //描述 | |
| 45 | + private String descriptions; | |
| 46 | + //是否撤销 | |
| 47 | + private Integer destroy; | |
| 48 | + //版本 | |
| 49 | + private Integer versions; | |
| 50 | + //创建人 | |
| 51 | + private String create_by; | |
| 52 | + //创建日期 | |
| 53 | + private Date create_date; | |
| 54 | + //修改人 | |
| 55 | + private String update_by; | |
| 56 | + //修改日期 | |
| 57 | + private Date update_date; | |
| 58 | + //行业编码 | |
| 59 | + private String industry_code; | |
| 60 | + //与下一站距离(米) | |
| 61 | + private Double last_stop_distance; | |
| 62 | + //线路名称 | |
| 63 | + private String line_name; | |
| 64 | + //缓冲区几何图形类型 d 多边形 r 圆形 | |
| 65 | + private String shaped_type; | |
| 66 | + //缓冲区为圆形时的半径(米) | |
| 67 | + private Integer radius; | |
| 68 | + //多边形缓冲区坐标百度 POLYGON((lon lat, lon lat)) | |
| 69 | + private String buffer_polygon_wkt; | |
| 70 | + //中心点 数字格式 百度 | |
| 71 | + private String centerPointWkt; | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + public static StationRoute convert(BusStopLevel bsl){ | |
| 77 | + StationRoute stationRoute = new StationRoute(); | |
| 78 | + stationRoute.setStationRouteCode(bsl.getStation_route_code()); | |
| 79 | + stationRoute.setStationCode(bsl.getStation_code()); | |
| 80 | + Line line=new Line(); | |
| 81 | + line.setId(Integer.parseInt(bsl.getLine_code())); | |
| 82 | + stationRoute.setLine(line); | |
| 83 | + Station station=new Station(); | |
| 84 | + station.setId(Integer.parseInt(bsl.getStation_code())); | |
| 85 | + stationRoute.setStation(station); | |
| 86 | + stationRoute.setStationName(bsl.getStation_name()); | |
| 87 | + stationRoute.setLineCode(bsl.getLine_code()); | |
| 88 | + stationRoute.setStationMark(bsl.getStation_mark()); | |
| 89 | + stationRoute.setDistances(bsl.getDistances()); | |
| 90 | + stationRoute.setToTime(bsl.getTo_time()); | |
| 91 | + stationRoute.setFirstTime(bsl.getFirst_time()); | |
| 92 | + stationRoute.setEndTime(bsl.getEnd_time()); | |
| 93 | + stationRoute.setDirections(bsl.getDirections()); | |
| 94 | + stationRoute.setVersions(1); | |
| 95 | + stationRoute.setDestroy(bsl.getDestroy()); | |
| 96 | + stationRoute.setDescriptions(bsl.getDescriptions()); | |
| 97 | + stationRoute.setShapedType(bsl.getShaped_type()); | |
| 98 | + stationRoute.setRadius(bsl.getRadius()); | |
| 99 | + if (!StringUtils.isEmpty(bsl.getBuffer_polygon_wkt())) { | |
| 100 | + stationRoute.setBufferPolygon((Polygon) Wkt.fromWkt(bsl.getBuffer_polygon_wkt())); | |
| 101 | + stationRoute.setBufferPolygonWgs(GeoConverter.polygonBd2wgs(bsl.getBuffer_polygon_wkt())); | |
| 102 | + } | |
| 103 | + if (!StringUtils.isEmpty(bsl.getCenterPointWkt())) { | |
| 104 | + Point baidu = (Point) Wkt.fromWkt(bsl.getCenterPointWkt()); | |
| 105 | + Point wgs = GeoConverter.pointBd2wgs(bsl.getCenterPointWkt()); | |
| 106 | + stationRoute.setCenterPoint(baidu); | |
| 107 | + stationRoute.setCenterPointWgs(wgs); | |
| 108 | + } | |
| 109 | + stationRoute.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 110 | + stationRoute.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 111 | + return stationRoute; | |
| 112 | + } | |
| 113 | + | |
| 114 | + public static List<StationRoute> convert(List<BusStopLevel> busStopLevels){ | |
| 115 | + List<StationRoute> list = new ArrayList<>(); | |
| 116 | + for (BusStopLevel bsl : busStopLevels) { | |
| 117 | + list.add(convert(bsl)); | |
| 118 | + } | |
| 119 | + return list; | |
| 120 | + } | |
| 121 | + | |
| 122 | + public static LsStationRoute convertLS(BusStopLevel bsl){ | |
| 123 | + LsStationRoute stationRoute = new LsStationRoute(); | |
| 124 | + stationRoute.setStationRouteCode(bsl.getStation_route_code()); | |
| 125 | + stationRoute.setStationCode(bsl.getStation_code()); | |
| 126 | + Line line=new Line(); | |
| 127 | + line.setId(Integer.parseInt(bsl.getLine_code())); | |
| 128 | + stationRoute.setLine(line); | |
| 129 | + Station station=new Station(); | |
| 130 | + station.setId(Integer.parseInt(bsl.getStation_code())); | |
| 131 | + stationRoute.setStation(station); | |
| 132 | + stationRoute.setStationName(bsl.getStation_name()); | |
| 133 | + stationRoute.setLineCode(bsl.getLine_code()); | |
| 134 | + stationRoute.setStationMark(bsl.getStation_mark()); | |
| 135 | + stationRoute.setDistances(bsl.getDistances()); | |
| 136 | + stationRoute.setToTime(bsl.getTo_time()); | |
| 137 | + stationRoute.setFirstTime(bsl.getFirst_time()); | |
| 138 | + stationRoute.setEndTime(bsl.getEnd_time()); | |
| 139 | + stationRoute.setDirections(bsl.getDirections()); | |
| 140 | + stationRoute.setVersions(1); | |
| 141 | + stationRoute.setDestroy(bsl.getDestroy()); | |
| 142 | + stationRoute.setDescriptions(bsl.getDescriptions()); | |
| 143 | + stationRoute.setShapedType(bsl.getShaped_type()); | |
| 144 | + stationRoute.setRadius(bsl.getRadius()); | |
| 145 | + if (!StringUtils.isEmpty(bsl.getBuffer_polygon_wkt())) { | |
| 146 | + stationRoute.setBufferPolygon((Polygon) Wkt.fromWkt(bsl.getBuffer_polygon_wkt())); | |
| 147 | + stationRoute.setBufferPolygonWgs(GeoConverter.polygonBd2wgs(bsl.getBuffer_polygon_wkt())); | |
| 148 | + } | |
| 149 | + if (!StringUtils.isEmpty(bsl.getCenterPointWkt())) { | |
| 150 | + Point baidu = (Point) Wkt.fromWkt(bsl.getCenterPointWkt()); | |
| 151 | + Point wgs = GeoConverter.pointBd2wgs(bsl.getCenterPointWkt()); | |
| 152 | + stationRoute.setCenterPoint(baidu); | |
| 153 | + stationRoute.setCenterPointWgs(wgs); | |
| 154 | + } | |
| 155 | + stationRoute.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 156 | + stationRoute.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 157 | + return stationRoute; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public static List<LsStationRoute> convertLS(List<BusStopLevel> busStopLevels){ | |
| 161 | + List<LsStationRoute> list = new ArrayList<>(); | |
| 162 | + for (BusStopLevel bsl : busStopLevels) { | |
| 163 | + list.add(convertLS(bsl)); | |
| 164 | + } | |
| 165 | + return list; | |
| 166 | + } | |
| 167 | + | |
| 168 | + | |
| 169 | + public String getLine_base_id() { | |
| 170 | + return Line_base_id; | |
| 171 | + } | |
| 172 | + | |
| 173 | + public void setLine_base_id(String line_base_id) { | |
| 174 | + Line_base_id = line_base_id; | |
| 175 | + } | |
| 176 | + | |
| 177 | + public String getStation() { | |
| 178 | + return station; | |
| 179 | + } | |
| 180 | + | |
| 181 | + public void setStation(String station) { | |
| 182 | + this.station = station; | |
| 183 | + } | |
| 184 | + | |
| 185 | + public String getStation_name() { | |
| 186 | + return station_name; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public void setStation_name(String station_name) { | |
| 190 | + this.station_name = station_name; | |
| 191 | + } | |
| 192 | + | |
| 193 | + public Integer getStation_route_code() { | |
| 194 | + return station_route_code; | |
| 195 | + } | |
| 196 | + | |
| 197 | + public void setStation_route_code(Integer station_route_code) { | |
| 198 | + this.station_route_code = station_route_code; | |
| 199 | + } | |
| 200 | + | |
| 201 | + public String getLine_code() { | |
| 202 | + return line_code; | |
| 203 | + } | |
| 204 | + | |
| 205 | + public void setLine_code(String line_code) { | |
| 206 | + this.line_code = line_code; | |
| 207 | + } | |
| 208 | + | |
| 209 | + public String getStation_code() { | |
| 210 | + return station_code; | |
| 211 | + } | |
| 212 | + | |
| 213 | + public void setStation_code(String station_code) { | |
| 214 | + this.station_code = station_code; | |
| 215 | + } | |
| 216 | + | |
| 217 | + public String getStation_mark() { | |
| 218 | + return station_mark; | |
| 219 | + } | |
| 220 | + | |
| 221 | + public void setStation_mark(String station_mark) { | |
| 222 | + this.station_mark = station_mark; | |
| 223 | + } | |
| 224 | + | |
| 225 | + public Integer getOut_station_nmber() { | |
| 226 | + return out_station_nmber; | |
| 227 | + } | |
| 228 | + | |
| 229 | + public void setOut_station_nmber(Integer out_station_nmber) { | |
| 230 | + this.out_station_nmber = out_station_nmber; | |
| 231 | + } | |
| 232 | + | |
| 233 | + public Integer getDirections() { | |
| 234 | + return directions; | |
| 235 | + } | |
| 236 | + | |
| 237 | + public void setDirections(Integer directions) { | |
| 238 | + this.directions = directions; | |
| 239 | + } | |
| 240 | + | |
| 241 | + public Double getDistances() { | |
| 242 | + return distances; | |
| 243 | + } | |
| 244 | + | |
| 245 | + public void setDistances(Double distances) { | |
| 246 | + this.distances = distances; | |
| 247 | + } | |
| 248 | + | |
| 249 | + public Double getTo_time() { | |
| 250 | + return to_time; | |
| 251 | + } | |
| 252 | + | |
| 253 | + public void setTo_time(Double to_time) { | |
| 254 | + this.to_time = to_time; | |
| 255 | + } | |
| 256 | + | |
| 257 | + public String getFirst_time() { | |
| 258 | + return first_time; | |
| 259 | + } | |
| 260 | + | |
| 261 | + public void setFirst_time(String first_time) { | |
| 262 | + this.first_time = first_time; | |
| 263 | + } | |
| 264 | + | |
| 265 | + public String getEnd_time() { | |
| 266 | + return end_time; | |
| 267 | + } | |
| 268 | + | |
| 269 | + public void setEnd_time(String end_time) { | |
| 270 | + this.end_time = end_time; | |
| 271 | + } | |
| 272 | + | |
| 273 | + public String getDescriptions() { | |
| 274 | + return descriptions; | |
| 275 | + } | |
| 276 | + | |
| 277 | + public void setDescriptions(String descriptions) { | |
| 278 | + this.descriptions = descriptions; | |
| 279 | + } | |
| 280 | + | |
| 281 | + public Integer getDestroy() { | |
| 282 | + return destroy; | |
| 283 | + } | |
| 284 | + | |
| 285 | + public void setDestroy(Integer destroy) { | |
| 286 | + this.destroy = destroy; | |
| 287 | + } | |
| 288 | + | |
| 289 | + public Integer getVersions() { | |
| 290 | + return versions; | |
| 291 | + } | |
| 292 | + | |
| 293 | + public void setVersions(Integer versions) { | |
| 294 | + this.versions = versions; | |
| 295 | + } | |
| 296 | + | |
| 297 | + public String getCreate_by() { | |
| 298 | + return create_by; | |
| 299 | + } | |
| 300 | + | |
| 301 | + public void setCreate_by(String create_by) { | |
| 302 | + this.create_by = create_by; | |
| 303 | + } | |
| 304 | + | |
| 305 | + public Date getCreate_date() { | |
| 306 | + return create_date; | |
| 307 | + } | |
| 308 | + | |
| 309 | + public void setCreate_date(Date create_date) { | |
| 310 | + this.create_date = create_date; | |
| 311 | + } | |
| 312 | + | |
| 313 | + public String getUpdate_by() { | |
| 314 | + return update_by; | |
| 315 | + } | |
| 316 | + | |
| 317 | + public void setUpdate_by(String update_by) { | |
| 318 | + this.update_by = update_by; | |
| 319 | + } | |
| 320 | + | |
| 321 | + public Date getUpdate_date() { | |
| 322 | + return update_date; | |
| 323 | + } | |
| 324 | + | |
| 325 | + public void setUpdate_date(Date update_date) { | |
| 326 | + this.update_date = update_date; | |
| 327 | + } | |
| 328 | + | |
| 329 | + public String getIndustry_code() { | |
| 330 | + return industry_code; | |
| 331 | + } | |
| 332 | + | |
| 333 | + public void setIndustry_code(String industry_code) { | |
| 334 | + this.industry_code = industry_code; | |
| 335 | + } | |
| 336 | + | |
| 337 | + public Double getLast_stop_distance() { | |
| 338 | + return last_stop_distance; | |
| 339 | + } | |
| 340 | + | |
| 341 | + public void setLast_stop_distance(Double last_stop_distance) { | |
| 342 | + this.last_stop_distance = last_stop_distance; | |
| 343 | + } | |
| 344 | + | |
| 345 | + public String getLine_name() { | |
| 346 | + return line_name; | |
| 347 | + } | |
| 348 | + | |
| 349 | + public void setLine_name(String line_name) { | |
| 350 | + this.line_name = line_name; | |
| 351 | + } | |
| 352 | + | |
| 353 | + public String getShaped_type() { | |
| 354 | + return shaped_type; | |
| 355 | + } | |
| 356 | + | |
| 357 | + public void setShaped_type(String shaped_type) { | |
| 358 | + this.shaped_type = shaped_type; | |
| 359 | + } | |
| 360 | + | |
| 361 | + public Integer getRadius() { | |
| 362 | + return radius; | |
| 363 | + } | |
| 364 | + | |
| 365 | + public void setRadius(Integer radius) { | |
| 366 | + this.radius = radius; | |
| 367 | + } | |
| 368 | + | |
| 369 | + public String getBuffer_polygon_wkt() { | |
| 370 | + return buffer_polygon_wkt; | |
| 371 | + } | |
| 372 | + | |
| 373 | + public void setBuffer_polygon_wkt(String buffer_polygon_wkt) { | |
| 374 | + this.buffer_polygon_wkt = buffer_polygon_wkt; | |
| 375 | + } | |
| 376 | + | |
| 377 | + public String getCenterPointWkt() { | |
| 378 | + return centerPointWkt; | |
| 379 | + } | |
| 380 | + | |
| 381 | + public void setCenterPointWkt(String centerPointWkt) { | |
| 382 | + this.centerPointWkt = centerPointWkt; | |
| 383 | + } | |
| 384 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/BusVeh.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.bsth.entity.Cars; | |
| 5 | +import java.util.ArrayList; | |
| 6 | +import java.util.Date; | |
| 7 | +import java.util.List; | |
| 8 | + | |
| 9 | + | |
| 10 | +public class BusVeh implements Cloneable{ | |
| 11 | + | |
| 12 | + // | |
| 13 | + private int id; | |
| 14 | + //公司编号 | |
| 15 | + private String COMPANY_ID; | |
| 16 | + //分公司名称 | |
| 17 | + private String branche_company; | |
| 18 | + //分公司代码 | |
| 19 | + private String branche_company_code; | |
| 20 | + //公司代码 | |
| 21 | + private String business_code; | |
| 22 | + //车型 | |
| 23 | + private String car_class; | |
| 24 | + //车辆编码 | |
| 25 | + private String car_code; | |
| 26 | + //车牌 | |
| 27 | + private String car_plate; | |
| 28 | + //座位数 | |
| 29 | + private Integer car_seatn_number; | |
| 30 | + //车辆标准 | |
| 31 | + private String car_standard; | |
| 32 | + //车辆类型 | |
| 33 | + private String car_type; | |
| 34 | + //公司名 | |
| 35 | + private String company; | |
| 36 | + //创建日期 | |
| 37 | + private Date create_date; | |
| 38 | + //描述 | |
| 39 | + private String descriptions; | |
| 40 | + //引擎编码1 | |
| 41 | + private String engine_code_one; | |
| 42 | + //引擎编码2 | |
| 43 | + private String engine_code_two; | |
| 44 | + //设备编码 | |
| 45 | + private String equipment_code; | |
| 46 | + //内部编码 | |
| 47 | + private String inside_code; | |
| 48 | + //报废编码 | |
| 49 | + private String scrap_code; | |
| 50 | + //报废日期 | |
| 51 | + private Date scrap_date; | |
| 52 | + //报废状态 | |
| 53 | + private Integer scrap_state; | |
| 54 | + //是否电车 | |
| 55 | + private Integer sfdc; | |
| 56 | + //供应商 | |
| 57 | + private String supplier_name; | |
| 58 | + //售票类型 | |
| 59 | + private Integer ticket_type; | |
| 60 | + //更新日期 | |
| 61 | + private Date update_date; | |
| 62 | + //能源类型 | |
| 63 | + private Integer ny_type; | |
| 64 | + | |
| 65 | + public static Cars convert(BusVeh bv){ | |
| 66 | + Cars cars=new Cars(); | |
| 67 | + cars.setInsideCode(bv.getInside_code()); | |
| 68 | + cars.setBusinessCode(bv.getBusiness_code()); | |
| 69 | + cars.setCompany(bv.getCompany()); | |
| 70 | + cars.setBrancheCompanyCode(bv.getBranche_company_code()); | |
| 71 | + cars.setBrancheCompany(bv.getBranche_company()); | |
| 72 | + cars.setCarCode(bv.getCar_code()); | |
| 73 | + cars.setCarPlate(bv.getCar_plate()); | |
| 74 | + cars.setSupplierName(bv.getSupplier_name()); | |
| 75 | + cars.setEquipmentCode(bv.getEquipment_code()); | |
| 76 | + cars.setCarClass(bv.getCar_class()); | |
| 77 | + cars.setCarSeatnNumber(bv.getCar_seatn_number()); | |
| 78 | + cars.setCarStandard(bv.getCar_standard()); | |
| 79 | + cars.setScrapCode(bv.getScrap_code()); | |
| 80 | + cars.setScrapDate(bv.getScrap_date()); | |
| 81 | + cars.setMakeCodeOne(bv.getEngine_code_one()); | |
| 82 | + cars.setMakeCodeTwo(bv.getEngine_code_two()); | |
| 83 | + cars.setEngineCodeOne(bv.getEngine_code_one()); | |
| 84 | + cars.setEngineCodeTwo(bv.getEngine_code_two()); | |
| 85 | + cars.setCarType(bv.getCar_type()); | |
| 86 | + cars.setSfdc((bv.getSfdc()==null||bv.getSfdc()==0)?false:true); | |
| 87 | + cars.setDescriptions(bv.getDescriptions()); | |
| 88 | + cars.setScrapState((bv.getScrap_state()==null||bv.getScrap_state()==0)?false:true); | |
| 89 | + cars.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 90 | + cars.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 91 | + cars.setHydrogen(false); | |
| 92 | + return cars; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public static List<Cars> convert(List<BusVeh> busVehs){ | |
| 96 | + List<Cars> list = new ArrayList<>(); | |
| 97 | + for (BusVeh busVeh : busVehs) { | |
| 98 | + list.add(convert(busVeh)); | |
| 99 | + } | |
| 100 | + return list; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public int getId() { | |
| 104 | + return id; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public void setId(int id) { | |
| 108 | + this.id = id; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public String getCOMPANY_ID() { | |
| 112 | + return COMPANY_ID; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public void setCOMPANY_ID(String COMPANY_ID) { | |
| 116 | + this.COMPANY_ID = COMPANY_ID; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public String getBranche_company() { | |
| 120 | + return branche_company; | |
| 121 | + } | |
| 122 | + | |
| 123 | + public void setBranche_company(String branche_company) { | |
| 124 | + this.branche_company = branche_company; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public String getBranche_company_code() { | |
| 128 | + return branche_company_code; | |
| 129 | + } | |
| 130 | + | |
| 131 | + public void setBranche_company_code(String branche_company_code) { | |
| 132 | + this.branche_company_code = branche_company_code; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public String getBusiness_code() { | |
| 136 | + return business_code; | |
| 137 | + } | |
| 138 | + | |
| 139 | + public void setBusiness_code(String business_code) { | |
| 140 | + this.business_code = business_code; | |
| 141 | + } | |
| 142 | + | |
| 143 | + public String getCar_class() { | |
| 144 | + return car_class; | |
| 145 | + } | |
| 146 | + | |
| 147 | + public void setCar_class(String car_class) { | |
| 148 | + this.car_class = car_class; | |
| 149 | + } | |
| 150 | + | |
| 151 | + public String getCar_code() { | |
| 152 | + return car_code; | |
| 153 | + } | |
| 154 | + | |
| 155 | + public void setCar_code(String car_code) { | |
| 156 | + this.car_code = car_code; | |
| 157 | + } | |
| 158 | + | |
| 159 | + public String getCar_plate() { | |
| 160 | + return car_plate; | |
| 161 | + } | |
| 162 | + | |
| 163 | + public void setCar_plate(String car_plate) { | |
| 164 | + this.car_plate = car_plate; | |
| 165 | + } | |
| 166 | + | |
| 167 | + public Integer getCar_seatn_number() { | |
| 168 | + return car_seatn_number; | |
| 169 | + } | |
| 170 | + | |
| 171 | + public void setCar_seatn_number(Integer car_seatn_number) { | |
| 172 | + this.car_seatn_number = car_seatn_number; | |
| 173 | + } | |
| 174 | + | |
| 175 | + public String getCar_standard() { | |
| 176 | + return car_standard; | |
| 177 | + } | |
| 178 | + | |
| 179 | + public void setCar_standard(String car_standard) { | |
| 180 | + this.car_standard = car_standard; | |
| 181 | + } | |
| 182 | + | |
| 183 | + public String getCar_type() { | |
| 184 | + return car_type; | |
| 185 | + } | |
| 186 | + | |
| 187 | + public void setCar_type(String car_type) { | |
| 188 | + this.car_type = car_type; | |
| 189 | + } | |
| 190 | + | |
| 191 | + public String getCompany() { | |
| 192 | + return company; | |
| 193 | + } | |
| 194 | + | |
| 195 | + public void setCompany(String company) { | |
| 196 | + this.company = company; | |
| 197 | + } | |
| 198 | + | |
| 199 | + public Date getCreate_date() { | |
| 200 | + return create_date; | |
| 201 | + } | |
| 202 | + | |
| 203 | + public void setCreate_date(Date create_date) { | |
| 204 | + this.create_date = create_date; | |
| 205 | + } | |
| 206 | + | |
| 207 | + public String getDescriptions() { | |
| 208 | + return descriptions; | |
| 209 | + } | |
| 210 | + | |
| 211 | + public void setDescriptions(String descriptions) { | |
| 212 | + this.descriptions = descriptions; | |
| 213 | + } | |
| 214 | + | |
| 215 | + public String getEngine_code_one() { | |
| 216 | + return engine_code_one; | |
| 217 | + } | |
| 218 | + | |
| 219 | + public void setEngine_code_one(String engine_code_one) { | |
| 220 | + this.engine_code_one = engine_code_one; | |
| 221 | + } | |
| 222 | + | |
| 223 | + public String getEngine_code_two() { | |
| 224 | + return engine_code_two; | |
| 225 | + } | |
| 226 | + | |
| 227 | + public void setEngine_code_two(String engine_code_two) { | |
| 228 | + this.engine_code_two = engine_code_two; | |
| 229 | + } | |
| 230 | + | |
| 231 | + public String getEquipment_code() { | |
| 232 | + return equipment_code; | |
| 233 | + } | |
| 234 | + | |
| 235 | + public void setEquipment_code(String equipment_code) { | |
| 236 | + this.equipment_code = equipment_code; | |
| 237 | + } | |
| 238 | + | |
| 239 | + public String getInside_code() { | |
| 240 | + return inside_code; | |
| 241 | + } | |
| 242 | + | |
| 243 | + public void setInside_code(String inside_code) { | |
| 244 | + this.inside_code = inside_code; | |
| 245 | + } | |
| 246 | + | |
| 247 | + public String getScrap_code() { | |
| 248 | + return scrap_code; | |
| 249 | + } | |
| 250 | + | |
| 251 | + public void setScrap_code(String scrap_code) { | |
| 252 | + this.scrap_code = scrap_code; | |
| 253 | + } | |
| 254 | + | |
| 255 | + public Date getScrap_date() { | |
| 256 | + return scrap_date; | |
| 257 | + } | |
| 258 | + | |
| 259 | + public void setScrap_date(Date scrap_date) { | |
| 260 | + this.scrap_date = scrap_date; | |
| 261 | + } | |
| 262 | + | |
| 263 | + public Integer getScrap_state() { | |
| 264 | + return scrap_state; | |
| 265 | + } | |
| 266 | + | |
| 267 | + public void setScrap_state(Integer scrap_state) { | |
| 268 | + this.scrap_state = scrap_state; | |
| 269 | + } | |
| 270 | + | |
| 271 | + public Integer getSfdc() { | |
| 272 | + return sfdc; | |
| 273 | + } | |
| 274 | + | |
| 275 | + public void setSfdc(Integer sfdc) { | |
| 276 | + this.sfdc = sfdc; | |
| 277 | + } | |
| 278 | + | |
| 279 | + public String getSupplier_name() { | |
| 280 | + return supplier_name; | |
| 281 | + } | |
| 282 | + | |
| 283 | + public void setSupplier_name(String supplier_name) { | |
| 284 | + this.supplier_name = supplier_name; | |
| 285 | + } | |
| 286 | + | |
| 287 | + public Integer getTicket_type() { | |
| 288 | + return ticket_type; | |
| 289 | + } | |
| 290 | + | |
| 291 | + public void setTicket_type(Integer ticket_type) { | |
| 292 | + this.ticket_type = ticket_type; | |
| 293 | + } | |
| 294 | + | |
| 295 | + public Date getUpdate_date() { | |
| 296 | + return update_date; | |
| 297 | + } | |
| 298 | + | |
| 299 | + public void setUpdate_date(Date update_date) { | |
| 300 | + this.update_date = update_date; | |
| 301 | + } | |
| 302 | + | |
| 303 | + public Integer getNy_type() { | |
| 304 | + return ny_type; | |
| 305 | + } | |
| 306 | + | |
| 307 | + public void setNy_type(Integer ny_type) { | |
| 308 | + this.ny_type = ny_type; | |
| 309 | + } | |
| 310 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/RoadSection.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +import com.bsth.entity.Section; | |
| 6 | +import com.bsth.util.GeoConverter; | |
| 7 | +import org.geolatte.geom.LineString; | |
| 8 | +import org.geolatte.geom.codec.Wkt; | |
| 9 | +import org.springframework.util.StringUtils; | |
| 10 | +import java.util.ArrayList; | |
| 11 | +import java.util.Date; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | + | |
| 15 | +public class RoadSection implements Cloneable{ | |
| 16 | + //路段编码 | |
| 17 | + private String section_code; | |
| 18 | + //路段名称 | |
| 19 | + private String section_name; | |
| 20 | + //交叉路 | |
| 21 | + private String croses_road; | |
| 22 | + //终止节点 | |
| 23 | + private String end_node; | |
| 24 | + //起始节点 | |
| 25 | + private String start_node; | |
| 26 | + //中间节点 | |
| 27 | + private String middle_node; | |
| 28 | + //路段类型 | |
| 29 | + private String section_type; | |
| 30 | + //路段矢量(空间坐标点集合)--城建坐标点 | |
| 31 | + private String csection_vector; | |
| 32 | + //路段矢量(空间坐标点集合)--百度原始坐标坐标点 | |
| 33 | + private String bsectionVectorWkt; | |
| 34 | + //路段矢量(空间坐标点集合)--GPS坐标点 | |
| 35 | + private String gsectionVectorWkt; | |
| 36 | + //道路编码 | |
| 37 | + private String road_coding; | |
| 38 | + //路段距离 | |
| 39 | + private Double section_distance; | |
| 40 | + //路段时间 | |
| 41 | + private Double section_time; | |
| 42 | + //经纬坐标类型 | |
| 43 | + private String db_type; | |
| 44 | + //限速 | |
| 45 | + private Double speed_limit; | |
| 46 | + //描述 | |
| 47 | + private String descriptions; | |
| 48 | + //版本号 | |
| 49 | + private Integer versions; | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + public static Section convert(RoadSection rs){ | |
| 54 | + Section section = new Section(); | |
| 55 | + section.setId(Integer.parseInt(rs.getSection_code())); | |
| 56 | + section.setSectionCode(rs.getSection_code()); | |
| 57 | + section.setRoadCoding(rs.getRoad_coding()); | |
| 58 | + section.setSectionName(rs.getSection_name()); | |
| 59 | + section.setSectionDistance(rs.getSection_distance()); | |
| 60 | + section.setSectionTime(rs.getSection_time()); | |
| 61 | + section.setDbType(rs.getDb_type()); | |
| 62 | + section.setSectionType(rs.getSection_type()); | |
| 63 | + section.setCrosesRoad(rs.getCroses_road()); | |
| 64 | + section.setStartNode(rs.getStart_node()); | |
| 65 | + section.setMiddleNode(rs.getMiddle_node()); | |
| 66 | + section.setEndNode(rs.getEnd_node()); | |
| 67 | + section.setSpeedLimit(rs.getSpeed_limit()); | |
| 68 | + section.setVersions(rs.getVersions()); | |
| 69 | + section.setDescriptions(rs.getDescriptions()); | |
| 70 | + if (!StringUtils.isEmpty(rs.getBsectionVectorWkt())) { | |
| 71 | + section.setBsectionVector((LineString) Wkt.fromWkt(rs.getBsectionVectorWkt())); | |
| 72 | + section.setGsectionVector(GeoConverter.lineStringBd2wgs(rs.getBsectionVectorWkt())); | |
| 73 | + } | |
| 74 | + section.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 75 | + section.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 76 | + return section; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public static List<Section> convert(List<RoadSection> roadSections){ | |
| 80 | + List<Section> list = new ArrayList<>(); | |
| 81 | + for (RoadSection roadSection : roadSections) { | |
| 82 | + list.add(convert(roadSection)); | |
| 83 | + } | |
| 84 | + return list; | |
| 85 | + } | |
| 86 | + | |
| 87 | + | |
| 88 | + public String getSection_code() { | |
| 89 | + return section_code; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setSection_code(String section_code) { | |
| 93 | + this.section_code = section_code; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public String getSection_name() { | |
| 97 | + return section_name; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setSection_name(String section_name) { | |
| 101 | + this.section_name = section_name; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public String getCroses_road() { | |
| 105 | + return croses_road; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setCroses_road(String croses_road) { | |
| 109 | + this.croses_road = croses_road; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public String getEnd_node() { | |
| 113 | + return end_node; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setEnd_node(String end_node) { | |
| 117 | + this.end_node = end_node; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getStart_node() { | |
| 121 | + return start_node; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setStart_node(String start_node) { | |
| 125 | + this.start_node = start_node; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public String getMiddle_node() { | |
| 129 | + return middle_node; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setMiddle_node(String middle_node) { | |
| 133 | + this.middle_node = middle_node; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public String getSection_type() { | |
| 137 | + return section_type; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setSection_type(String section_type) { | |
| 141 | + this.section_type = section_type; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public String getCsection_vector() { | |
| 145 | + return csection_vector; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public void setCsection_vector(String csection_vector) { | |
| 149 | + this.csection_vector = csection_vector; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public String getBsectionVectorWkt() { | |
| 153 | + return bsectionVectorWkt; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public void setBsectionVectorWkt(String bsectionVectorWkt) { | |
| 157 | + this.bsectionVectorWkt = bsectionVectorWkt; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public String getGsectionVectorWkt() { | |
| 161 | + return gsectionVectorWkt; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public void setGsectionVectorWkt(String gsectionVectorWkt) { | |
| 165 | + this.gsectionVectorWkt = gsectionVectorWkt; | |
| 166 | + } | |
| 167 | + | |
| 168 | + public String getRoad_coding() { | |
| 169 | + return road_coding; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public void setRoad_coding(String road_coding) { | |
| 173 | + this.road_coding = road_coding; | |
| 174 | + } | |
| 175 | + | |
| 176 | + public Double getSection_distance() { | |
| 177 | + return section_distance; | |
| 178 | + } | |
| 179 | + | |
| 180 | + public void setSection_distance(Double section_distance) { | |
| 181 | + this.section_distance = section_distance; | |
| 182 | + } | |
| 183 | + | |
| 184 | + public Double getSection_time() { | |
| 185 | + return section_time; | |
| 186 | + } | |
| 187 | + | |
| 188 | + public void setSection_time(Double section_time) { | |
| 189 | + this.section_time = section_time; | |
| 190 | + } | |
| 191 | + | |
| 192 | + public String getDb_type() { | |
| 193 | + return db_type; | |
| 194 | + } | |
| 195 | + | |
| 196 | + public void setDb_type(String db_type) { | |
| 197 | + this.db_type = db_type; | |
| 198 | + } | |
| 199 | + | |
| 200 | + public Double getSpeed_limit() { | |
| 201 | + return speed_limit; | |
| 202 | + } | |
| 203 | + | |
| 204 | + public void setSpeed_limit(Double speed_limit) { | |
| 205 | + this.speed_limit = speed_limit; | |
| 206 | + } | |
| 207 | + | |
| 208 | + public String getDescriptions() { | |
| 209 | + return descriptions; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public void setDescriptions(String descriptions) { | |
| 213 | + this.descriptions = descriptions; | |
| 214 | + } | |
| 215 | + | |
| 216 | + public Integer getVersions() { | |
| 217 | + return versions; | |
| 218 | + } | |
| 219 | + | |
| 220 | + public void setVersions(Integer versions) { | |
| 221 | + this.versions = versions; | |
| 222 | + } | |
| 223 | +} | ... | ... |
src/main/java/com/bsth/data/commonData/entity/RoadSectionLevel.java
0 → 100644
| 1 | +package com.bsth.data.commonData.entity; | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | +import com.bsth.entity.Line; | |
| 6 | +import com.bsth.entity.LsSectionRoute; | |
| 7 | +import com.bsth.entity.Section; | |
| 8 | +import com.bsth.entity.SectionRoute; | |
| 9 | +import java.util.ArrayList; | |
| 10 | +import java.util.Date; | |
| 11 | +import java.util.List; | |
| 12 | + | |
| 13 | + | |
| 14 | +public class RoadSectionLevel implements Cloneable{ | |
| 15 | + | |
| 16 | + //线路编码 | |
| 17 | + private String line_code; | |
| 18 | + //路段编码 | |
| 19 | + private String section_code; | |
| 20 | + //路段路由序号 | |
| 21 | + private String sectionroute_code; | |
| 22 | + //路段路由方向 | |
| 23 | + private Integer directions; | |
| 24 | + //线路基础信息编号 | |
| 25 | + private String line_base_id; | |
| 26 | + //路段信息(id) | |
| 27 | + private String section; | |
| 28 | + //描述 | |
| 29 | + private String descriptions; | |
| 30 | + //版本号 | |
| 31 | + private Integer versions; | |
| 32 | + //是否撤销 0-否,1-是 | |
| 33 | + private Integer destroy; | |
| 34 | + //是否有路段限速数据 0-分段;1-未分段 | |
| 35 | + private Integer is_roade_speed; | |
| 36 | + //线路名称 | |
| 37 | + private String line_name; | |
| 38 | + //路段名称 | |
| 39 | + private String section_name; | |
| 40 | + | |
| 41 | + | |
| 42 | + public static SectionRoute convert(RoadSectionLevel rsl){ | |
| 43 | + SectionRoute sectionRoute = new SectionRoute(); | |
| 44 | + sectionRoute.setSectionrouteCode(Integer.parseInt(rsl.getSectionroute_code())); | |
| 45 | + sectionRoute.setLineCode(rsl.getLine_code()); | |
| 46 | + sectionRoute.setSectionCode(rsl.getSection_code()); | |
| 47 | + sectionRoute.setDirections(rsl.getDirections()); | |
| 48 | + sectionRoute.setVersions(1); | |
| 49 | + sectionRoute.setDestroy(rsl.getDestroy()); | |
| 50 | + sectionRoute.setIsRoadeSpeed(rsl.getIs_roade_speed()); | |
| 51 | + sectionRoute.setDescriptions(rsl.getDescriptions()); | |
| 52 | + Section section = new Section(); | |
| 53 | + section.setId(Integer.parseInt(rsl.getSection())); | |
| 54 | + sectionRoute.setSection(section); | |
| 55 | + Line line = new Line(); | |
| 56 | + line.setId(Integer.parseInt(rsl.getLine_code())); | |
| 57 | + sectionRoute.setLine(line); | |
| 58 | + sectionRoute.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 59 | + sectionRoute.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 60 | + return sectionRoute; | |
| 61 | + } | |
| 62 | + | |
| 63 | + public static List<SectionRoute> convert(List<RoadSectionLevel> roadSectionLevels){ | |
| 64 | + List<SectionRoute> list = new ArrayList<>(); | |
| 65 | + for (RoadSectionLevel roadSectionLevel : roadSectionLevels) { | |
| 66 | + list.add(convert(roadSectionLevel)); | |
| 67 | + } | |
| 68 | + return list; | |
| 69 | + } | |
| 70 | + | |
| 71 | + public static LsSectionRoute convertLS(RoadSectionLevel rsl){ | |
| 72 | + LsSectionRoute sectionRoute = new LsSectionRoute(); | |
| 73 | + sectionRoute.setSectionrouteCode(Integer.parseInt(rsl.getSectionroute_code())); | |
| 74 | + sectionRoute.setLineCode(rsl.getLine_code()); | |
| 75 | + sectionRoute.setSectionCode(rsl.getSection_code()); | |
| 76 | + sectionRoute.setDirections(rsl.getDirections()); | |
| 77 | + sectionRoute.setVersions(1); | |
| 78 | + sectionRoute.setDestroy(rsl.getDestroy()); | |
| 79 | + sectionRoute.setIsRoadeSpeed(rsl.getIs_roade_speed()); | |
| 80 | + sectionRoute.setDescriptions(rsl.getDescriptions()); | |
| 81 | + Section section = new Section(); | |
| 82 | + section.setId(Integer.parseInt(rsl.getSection())); | |
| 83 | + sectionRoute.setSection(section); | |
| 84 | + Line line = new Line(); | |
| 85 | + line.setId(Integer.parseInt(rsl.getLine_code())); | |
| 86 | + sectionRoute.setLine(line); | |
| 87 | + sectionRoute.setCreateDate(new java.sql.Date(new Date().getTime())); | |
| 88 | + sectionRoute.setUpdateDate(new java.sql.Date(new Date().getTime())); | |
| 89 | + return sectionRoute; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public static List<LsSectionRoute> convertLS(List<RoadSectionLevel> roadSectionLevels){ | |
| 93 | + List<LsSectionRoute> list = new ArrayList<>(); | |
| 94 | + for (RoadSectionLevel roadSectionLevel : roadSectionLevels) { | |
| 95 | + list.add(convertLS(roadSectionLevel)); | |
| 96 | + } | |
| 97 | + return list; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public String getLine_code() { | |
| 101 | + return line_code; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public void setLine_code(String line_code) { | |
| 105 | + this.line_code = line_code; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public String getSection_code() { | |
| 109 | + return section_code; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public void setSection_code(String section_code) { | |
| 113 | + this.section_code = section_code; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public String getSectionroute_code() { | |
| 117 | + return sectionroute_code; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public void setSectionroute_code(String sectionroute_code) { | |
| 121 | + this.sectionroute_code = sectionroute_code; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public Integer getDirections() { | |
| 125 | + return directions; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public void setDirections(Integer directions) { | |
| 129 | + this.directions = directions; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public String getLine_base_id() { | |
| 133 | + return line_base_id; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public void setLine_base_id(String line_base_id) { | |
| 137 | + this.line_base_id = line_base_id; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public String getSection() { | |
| 141 | + return section; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public void setSection(String section) { | |
| 145 | + this.section = section; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public String getDescriptions() { | |
| 149 | + return descriptions; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public void setDescriptions(String descriptions) { | |
| 153 | + this.descriptions = descriptions; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public Integer getVersions() { | |
| 157 | + return versions; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public void setVersions(Integer versions) { | |
| 161 | + this.versions = versions; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public Integer getDestroy() { | |
| 165 | + return destroy; | |
| 166 | + } | |
| 167 | + | |
| 168 | + public void setDestroy(Integer destroy) { | |
| 169 | + this.destroy = destroy; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public Integer getIs_roade_speed() { | |
| 173 | + return is_roade_speed; | |
| 174 | + } | |
| 175 | + | |
| 176 | + public void setIs_roade_speed(Integer is_roade_speed) { | |
| 177 | + this.is_roade_speed = is_roade_speed; | |
| 178 | + } | |
| 179 | + | |
| 180 | + public String getLine_name() { | |
| 181 | + return line_name; | |
| 182 | + } | |
| 183 | + | |
| 184 | + public void setLine_name(String line_name) { | |
| 185 | + this.line_name = line_name; | |
| 186 | + } | |
| 187 | + | |
| 188 | + public String getSection_name() { | |
| 189 | + return section_name; | |
| 190 | + } | |
| 191 | + | |
| 192 | + public void setSection_name(String section_name) { | |
| 193 | + this.section_name = section_name; | |
| 194 | + } | |
| 195 | +} | ... | ... |
src/main/java/com/bsth/data/jddzx/JDInterface.java
| ... | ... | @@ -103,11 +103,15 @@ public class JDInterface { |
| 103 | 103 | //人员投入 |
| 104 | 104 | int jhrytl=culateService.culateJhry(schList,""); |
| 105 | 105 | int sjrytl=culateService.culateSjry(schList,""); |
| 106 | - BigDecimal rytl=BigDecimal.valueOf(100); | |
| 106 | + BigDecimal rytlbfb=BigDecimal.valueOf(100); | |
| 107 | 107 | if(jhrytl>0){ |
| 108 | - rytl=BigDecimal.valueOf((double)sjrytl/jhrytl*100); | |
| 108 | + rytlbfb=BigDecimal.valueOf((double)sjrytl/jhrytl*100); | |
| 109 | 109 | } |
| 110 | - data.put("rytl",rytl.setScale(2,BigDecimal.ROUND_HALF_UP)); | |
| 110 | + Map<String,Object> rytl=new HashMap<>(); | |
| 111 | + rytl.put("jhrytl",jhrytl); | |
| 112 | + rytl.put("sjrytl",sjrytl); | |
| 113 | + rytl.put("rytl",rytlbfb.setScale(2,BigDecimal.ROUND_HALF_UP)); | |
| 114 | + data.put("rytl",rytl); | |
| 111 | 115 | |
| 112 | 116 | //车辆投入 |
| 113 | 117 | Map<String,Object> cltl=new HashMap<>(); |
| ... | ... | @@ -117,6 +121,8 @@ public class JDInterface { |
| 117 | 121 | if(jh_z>0){ |
| 118 | 122 | cltl_z=BigDecimal.valueOf((double)sj_z/jh_z*100); |
| 119 | 123 | } |
| 124 | + cltl.put("jh_z",jh_z); | |
| 125 | + cltl.put("sj_z",sj_z); | |
| 120 | 126 | cltl.put("cltl_z",cltl_z.setScale(2,BigDecimal.ROUND_HALF_UP)); |
| 121 | 127 | |
| 122 | 128 | int jh_w=culateService.culateJhcl(schList,"wgf"); |
| ... | ... | @@ -125,6 +131,8 @@ public class JDInterface { |
| 125 | 131 | if(jh_w>0){ |
| 126 | 132 | cltl_w=BigDecimal.valueOf((double)sj_w/jh_w*100); |
| 127 | 133 | } |
| 134 | + cltl.put("jh_w",jh_w); | |
| 135 | + cltl.put("sj_w",sj_w); | |
| 128 | 136 | cltl.put("cltl_w",cltl_w.setScale(2,BigDecimal.ROUND_HALF_UP)); |
| 129 | 137 | |
| 130 | 138 | int jh_q=culateService.culateJhcl(schList,""); |
| ... | ... | @@ -133,6 +141,8 @@ public class JDInterface { |
| 133 | 141 | if(jh_q>0){ |
| 134 | 142 | cltl_q=BigDecimal.valueOf((double)sj_q/jh_q*100); |
| 135 | 143 | } |
| 144 | + cltl.put("jh_q",jh_q); | |
| 145 | + cltl.put("sj_q",sj_q); | |
| 136 | 146 | cltl.put("cltl_q",cltl_q.setScale(2,BigDecimal.ROUND_HALF_UP)); |
| 137 | 147 | |
| 138 | 148 | data.put("cltl",cltl); |
| ... | ... | @@ -145,6 +155,8 @@ public class JDInterface { |
| 145 | 155 | if(jhbctl_z>0){ |
| 146 | 156 | bctl_z=BigDecimal.valueOf((double)sjbctl_z/jhbctl_z*100); |
| 147 | 157 | } |
| 158 | + bctl.put("jhbctl_z",jhbctl_z); | |
| 159 | + bctl.put("sjbctl_z",sjbctl_z); | |
| 148 | 160 | bctl.put("bctl_z",bctl_z.setScale(2,BigDecimal.ROUND_HALF_UP)); |
| 149 | 161 | |
| 150 | 162 | int jhbctl_w=culateService.culateJhbc(schList,"wgf"); |
| ... | ... | @@ -153,6 +165,8 @@ public class JDInterface { |
| 153 | 165 | if(jhbctl_w>0){ |
| 154 | 166 | bctl_w=BigDecimal.valueOf((double)sjbctl_w/jhbctl_w*100); |
| 155 | 167 | } |
| 168 | + bctl.put("jhbctl_w",jhbctl_w); | |
| 169 | + bctl.put("sjbctl_w",sjbctl_w); | |
| 156 | 170 | bctl.put("bctl_w",bctl_w.setScale(2,BigDecimal.ROUND_HALF_UP)); |
| 157 | 171 | |
| 158 | 172 | int jhbctl_q=culateService.culateJhbc(schList,""); |
| ... | ... | @@ -161,6 +175,8 @@ public class JDInterface { |
| 161 | 175 | if(jhbctl_q>0){ |
| 162 | 176 | bctl_q=BigDecimal.valueOf((double)sjbctl_q/jhbctl_q*100); |
| 163 | 177 | } |
| 178 | + bctl.put("jhbctl_q",jhbctl_q); | |
| 179 | + bctl.put("sjbctl_q",sjbctl_q); | |
| 164 | 180 | bctl.put("bctl_q",bctl_q.setScale(2,BigDecimal.ROUND_HALF_UP)); |
| 165 | 181 | |
| 166 | 182 | data.put("bctl",bctl); | ... | ... |
src/main/java/com/bsth/repository/BusinessRepository.java
| 1 | 1 | package com.bsth.repository; |
| 2 | 2 | |
| 3 | +import org.springframework.data.jpa.repository.Modifying; | |
| 3 | 4 | import org.springframework.data.jpa.repository.Query; |
| 4 | 5 | import org.springframework.stereotype.Repository; |
| 5 | 6 | |
| 6 | 7 | import com.bsth.entity.Business; |
| 7 | 8 | |
| 9 | +import java.util.Date; | |
| 8 | 10 | import java.util.List; |
| 9 | 11 | |
| 10 | 12 | /** |
| ... | ... | @@ -32,4 +34,11 @@ public interface BusinessRepository extends BaseRepository<Business, Integer> { |
| 32 | 34 | |
| 33 | 35 | @Query(value = "SELECT IFNULL(num,0) as maxId from (SELECT MAX(id) as num FROM bsth_c_business) k" , nativeQuery=true) |
| 34 | 36 | long getMaxId(); |
| 37 | + | |
| 38 | + @Modifying | |
| 39 | + @Query(value = "UPDATE Business b set b.businessName=?1 , b.upCode=?2, b.updateDate=?3 " | |
| 40 | + + "where b.businessCode=?4") | |
| 41 | + int update(String businessName, String upCode, Date updateDate, | |
| 42 | + String businessCode); | |
| 43 | + | |
| 35 | 44 | } | ... | ... |
src/main/java/com/bsth/repository/CarParkRepository.java
| 1 | 1 | package com.bsth.repository; |
| 2 | 2 | |
| 3 | +import java.util.Date; | |
| 3 | 4 | import java.util.List; |
| 4 | 5 | |
| 5 | 6 | import org.springframework.data.jpa.repository.Modifying; |
| ... | ... | @@ -36,7 +37,7 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{ |
| 36 | 37 | "str_to_date(?11,'%Y-%m-%d %H:%i:%s'), ?12 ,?13,ST_GeomFromText(?14), ?15, " + |
| 37 | 38 | |
| 38 | 39 | "?16, ST_GeomFromText(?17), ?18,?19)", nativeQuery=true) |
| 39 | - public void carParkSave(Double area,String company,String parkCode,String parkName, | |
| 40 | + public int carParkSave(Double area,String company,String parkCode,String parkName, | |
| 40 | 41 | |
| 41 | 42 | String brancheCompany,Integer createBy,String createDate,String descriptions,Integer destroy, |
| 42 | 43 | |
| ... | ... | @@ -113,4 +114,32 @@ public interface CarParkRepository extends BaseRepository<CarPark, Integer>{ |
| 113 | 114 | |
| 114 | 115 | @Query(value ="select c.id, c.area,c.company,c.park_code,c.park_name,c.branche_company,c.create_by,c.create_date,c.descriptions,c.destroy,c.update_by,c.update_date,c.versions,c.b_center_point,ST_AsText(c.b_park_point) b_park_point,c.g_center_point,ST_AsText(c.g_park_point) g_park_point,c.db_type,c.radius,c.shapes_type from bsth_c_line_information l left join bsth_c_car_park c on l.car_park = c.park_code where l.line = ?1", nativeQuery=true) |
| 115 | 116 | CarPark findByLineId(int lineId); |
| 117 | + | |
| 118 | + @Transactional | |
| 119 | + @Modifying | |
| 120 | + @Query(value="UPDATE bsth_c_car_park SET " + | |
| 121 | + "area = ?1 , " + | |
| 122 | + "company = ?2 , " + | |
| 123 | + "park_name = ?3 , " + | |
| 124 | + "branche_company = ?4 , " + | |
| 125 | + "descriptions = ?5 , " + | |
| 126 | + "destroy = ?6 , " + | |
| 127 | + "update_date =?7 , " + | |
| 128 | + "versions = ?8 , " + | |
| 129 | + "b_center_point = ?9 , " + | |
| 130 | + "g_center_point = ?10 , " + | |
| 131 | + "b_park_point = ST_GeomFromText(?11) , " + | |
| 132 | + "g_park_point = ST_GeomFromText(?12) , " + | |
| 133 | + "db_type = ?13 , " + | |
| 134 | + "radius = ?14 , " + | |
| 135 | + "shapes_type = ?15 " + | |
| 136 | + " WHERE park_code = ?16 ", nativeQuery=true) | |
| 137 | + public int update(double area, String company, String parkName, String brancheCompany, | |
| 138 | + | |
| 139 | + String descriptions, Integer destroy, Date updateDate, Integer versions, String bCenterPoint, | |
| 140 | + | |
| 141 | + String gCenterPoint, String bParkPoint, | |
| 142 | + | |
| 143 | + String gParkPoint, String dbType, Integer radius, String shapesType, String parkCode ); | |
| 144 | + | |
| 116 | 145 | } | ... | ... |
src/main/java/com/bsth/repository/CarsRepository.java
| 1 | 1 | package com.bsth.repository; |
| 2 | 2 | |
| 3 | +import java.util.Date; | |
| 3 | 4 | import java.util.List; |
| 4 | 5 | |
| 6 | +import org.springframework.data.jpa.repository.Modifying; | |
| 5 | 7 | import org.springframework.data.jpa.repository.Query; |
| 6 | 8 | import org.springframework.stereotype.Repository; |
| 7 | 9 | |
| ... | ... | @@ -18,4 +20,15 @@ public interface CarsRepository extends BaseRepository<Cars, Integer>{ |
| 18 | 20 | |
| 19 | 21 | @Query(value="select s from Cars s where s.insideCode=?1") |
| 20 | 22 | List<Cars> findCarsByCode(String insideCode); |
| 23 | + | |
| 24 | + @Modifying | |
| 25 | + @Query(value = "UPDATE Cars s set s.businessCode=?1 , s.company=?2, s.brancheCompany=?3, s.brancheCompanyCode=?4, " | |
| 26 | + + "s.carCode=?5, s.carPlate=?6, s.supplierName=?7, s.equipmentCode=?8, s.carClass=?9, s.carSeatnNumber=?10," | |
| 27 | + + "s.carStandard=?11, s.scrapCode=?12, s.scrapDate=?13, s.makeCodeOne=?14, s.makeCodeTwo=?15, s.engineCodeOne=?16," | |
| 28 | + + "s.engineCodeTwo=?17, s.carType=?18, s.sfdc=?19, s.descriptions=?20, s.scrapState=?21 " | |
| 29 | + + "where s.insideCode=?22") | |
| 30 | + int update(String businessCode, String company, String brancheCompany, String brancheCompanyCode, | |
| 31 | + String carCode, String carPlate, String supplierName, String equipmentCode, String carClass, Integer carSeatnNumber, | |
| 32 | + String carStandard, String scrapCode, Date scrapDate, String makeCodeOne, String makeCodeTwo, String engineCodeOne, | |
| 33 | + String engineCodeTwo, String carType, Boolean sfdc, String descriptions, Boolean scrapState, String insideCode); | |
| 21 | 34 | } | ... | ... |
src/main/java/com/bsth/repository/LineInformationRepository.java
| ... | ... | @@ -2,6 +2,7 @@ package com.bsth.repository; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | |
| 5 | +import org.springframework.data.jpa.repository.Modifying; | |
| 5 | 6 | import org.springframework.data.jpa.repository.Query; |
| 6 | 7 | import org.springframework.stereotype.Repository; |
| 7 | 8 | |
| ... | ... | @@ -31,4 +32,26 @@ public interface LineInformationRepository extends BaseRepository<LineInformatio |
| 31 | 32 | List<LineInformation> findByLine(List<String> lineCodes); |
| 32 | 33 | |
| 33 | 34 | List<LineInformation> findByLine(Line line); |
| 35 | + | |
| 36 | + @Query(value="select i from LineInformation i where i.line.lineCode=?1") | |
| 37 | + List<LineInformation> findLineInformationByLineCode(String lineCode); | |
| 38 | + | |
| 39 | + @Modifying | |
| 40 | + @Query(value = "UPDATE LineInformation i set i.type=?1 , i.totalMileage=?2, i.emptyMileage=?3, i.upMileage=?4, " | |
| 41 | + + "i.downMileage=?5, i.upTravelTime=?6, i.downTravelTime=?7, i.earlyStartTime=?8, i.earlyEndTime=?9, i.lateStartTime=?10, " | |
| 42 | + + "i.lateEndTime=?11, i.xygfkssj=?12, i.xygfjssj=?13, i.earlyUpTime=?14, i.earlyDownTime=?15, i.lateUpTime=?16, " | |
| 43 | + + "i.lateDownTime=?17, i.nightStartTime=?18, i.nightEndTime=?19, i.troughUpTime=?20, i.troughDownTime=?21, i.carPark=?22, " | |
| 44 | + + "i.upInTimer=?23, i.upOutTimer=?24, i.downInTimer=?25, i.downOutTimer=?26, i.earlyIntervalLg=?27, i.lateIntervalLg=?28, " | |
| 45 | + + "i.intervalLg=?29, i.speedLimit=?30, i.rainLimit=?31, i.fogLimit=?32, i.snowLimit=?33, i.festivalSpeedLimit=?34, " | |
| 46 | + + "i.lagStation=?35, i.skip=?36, i.speeding=?37, i.crossedLine=?38, i.overflights=?39, i.descriptions=?40 " | |
| 47 | + + "where i.line.id=?41") | |
| 48 | + int update(String type, Double totalMileage, Double emptyMileage, Double upMileage, | |
| 49 | + Double downMileage, Double upTravelTime, Double downTravelTime, String earlyStartTime, String earlyEndTime,String lateStartTime, | |
| 50 | + String lateEndTime, String xygfkssj, String xygfjssj, Double earlyUpTime, Double earlyDownTime,Double lateUpTime, | |
| 51 | + Double lateDownTime, Double nightStartTime, Double nightEndTime, Double troughUpTime, Double troughDownTime,String carPark, | |
| 52 | + Double upInTimer, Double upOutTimer, Double downInTimer, Double downOutTimer, Double earlyIntervalLg,Double lateIntervalLg, | |
| 53 | + Double intervalLg, Double speedLimit, Double rainLimit, Double fogLimit, Double snowLimit,Double festivalSpeedLimit, | |
| 54 | + Integer lagStation, Integer skip, Integer speeding, Integer crossedLine, Integer overflights,String descriptions, | |
| 55 | + int lineId); | |
| 56 | + | |
| 34 | 57 | } | ... | ... |
src/main/java/com/bsth/repository/PersonnelRepository.java
| ... | ... | @@ -3,6 +3,7 @@ package com.bsth.repository; |
| 3 | 3 | import java.util.List; |
| 4 | 4 | |
| 5 | 5 | import com.bsth.entity.Personnel; |
| 6 | +import org.springframework.data.jpa.repository.Modifying; | |
| 6 | 7 | import org.springframework.data.jpa.repository.Query; |
| 7 | 8 | import org.springframework.stereotype.Repository; |
| 8 | 9 | |
| ... | ... | @@ -17,4 +18,15 @@ public interface PersonnelRepository extends BaseRepository<Personnel, Integer> |
| 17 | 18 | |
| 18 | 19 | @Query(value="select s from Personnel s where s.id in(select e.spy.id from EmployeeConfigInfo e where e.xl.id = ?1) ") |
| 19 | 20 | List<Personnel> findSpysByLineId(Integer lineId); |
| 21 | + | |
| 22 | + @Query(value="select s from Personnel s where s.jobCodeori=?1") | |
| 23 | + List<Personnel> findPersonnelByCode(String jobCodeori); | |
| 24 | + | |
| 25 | + @Modifying | |
| 26 | + @Query(value = "UPDATE Personnel s set s.company=?1 , s.companyCode=?2, s.brancheCompany=?3, s.brancheCompanyCode=?4, " | |
| 27 | + + "s.personnelName=?5, s.papersCode=?6, s.icCardCode=?7, s.posts=?8, s.card=?9, s.jobCode=?10 " | |
| 28 | + + "where s.jobCodeori=?11") | |
| 29 | + int update(String company, String companyCode, String brancheCompany, String brancheCompanyCode, | |
| 30 | + String personnelName, String papersCode, String icCardCode, String posts, String card,String jobCode, | |
| 31 | + String jobCodeori); | |
| 20 | 32 | } | ... | ... |
src/main/java/com/bsth/repository/SectionRepository.java
| 1 | 1 | package com.bsth.repository; |
| 2 | 2 | |
| 3 | +import com.bsth.entity.Personnel; | |
| 3 | 4 | import org.springframework.data.jpa.repository.Modifying; |
| 4 | 5 | import org.springframework.data.jpa.repository.Query; |
| 5 | 6 | import org.springframework.stereotype.Repository; |
| ... | ... | @@ -172,4 +173,7 @@ public interface SectionRepository extends BaseRepository<Section, Integer> { |
| 172 | 173 | @Query(value = "SELECT AsText(s.bsection_vector) as section,r.directions as dir FROM bsth_c_section s left join bsth_c_sectionroute r on s.section_code = r.section_code " + |
| 173 | 174 | "where r.line = ?1 and directions = ?2 ORDER BY r.directions,r.sectionroute_code ",nativeQuery = true) |
| 174 | 175 | List<Object[]> getSectionDirByLineId(Integer lineId , Integer directions); |
| 176 | + | |
| 177 | + @Query(value="select s from Section s where s.sectionCode=?1") | |
| 178 | + List<Section> findSectionByCode(String sectionCode); | |
| 175 | 179 | } | ... | ... |
src/main/java/com/bsth/repository/StationRepository.java
| ... | ... | @@ -2,6 +2,8 @@ package com.bsth.repository; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | 4 | |
| 5 | +import com.bsth.entity.Personnel; | |
| 6 | +import org.geolatte.geom.Point; | |
| 5 | 7 | import org.springframework.data.jpa.repository.Modifying; |
| 6 | 8 | import org.springframework.data.jpa.repository.Query; |
| 7 | 9 | import org.springframework.stereotype.Repository; |
| ... | ... | @@ -45,4 +47,16 @@ public interface StationRepository extends BaseRepository<Station, Integer> { |
| 45 | 47 | |
| 46 | 48 | @Query(value = "SELECT ST_AsText(b.buffer_polygon_wgs) g_polygon_grid, b.shaped_type,CONCAT(ST_X(a.center_point), ' ', ST_Y(a.center_point)) g_center_point , b.radius, a.station_code, b.station_name FROM bsth_c_station a JOIN bsth_c_stationroute b ON a.id = b.station WHERE b.line_code = ?1 AND a.station_code = ?2", nativeQuery = true) |
| 47 | 49 | Object[][] findBufferArea(String lineCode, String stationCode); |
| 50 | + | |
| 51 | + @Modifying | |
| 52 | + @Query(value = "UPDATE Station s set s.stationName=?1 , s.roadCoding=?2, s.address=?3, s.destroy=?4, " | |
| 53 | + + "s.versions=?5, s.descriptions=?6, s.centerPoint=?7, s.centerPointWgs=?8 " | |
| 54 | + + "where s.stationCode=?9") | |
| 55 | + int update(String stationName, String roadCoding, String address, Integer destroy, | |
| 56 | + Integer versions, String descriptions, Point centerPoint, Point centerPointWgs, | |
| 57 | + String stationCode); | |
| 58 | + | |
| 59 | + @Query(value="select s from Station s where s.stationCode=?1") | |
| 60 | + List<Station> findStationByStationCode(String stationCode); | |
| 61 | + | |
| 48 | 62 | } | ... | ... |
src/main/java/com/bsth/service/BusinessService.java
| 1 | 1 | package com.bsth.service; |
| 2 | 2 | |
| 3 | 3 | import com.bsth.entity.Business; |
| 4 | +import java.util.Map; | |
| 4 | 5 | |
| 5 | 6 | /** |
| 6 | 7 | * |
| ... | ... | @@ -19,4 +20,6 @@ import com.bsth.entity.Business; |
| 19 | 20 | */ |
| 20 | 21 | public interface BusinessService extends BaseService<Business, Integer> { |
| 21 | 22 | long getCompCode(); |
| 23 | + | |
| 24 | + Map<String, Object> update(Business business); | |
| 22 | 25 | } | ... | ... |
src/main/java/com/bsth/service/CarParkService.java
| ... | ... | @@ -32,4 +32,9 @@ public interface CarParkService extends BaseService<CarPark, Integer> { |
| 32 | 32 | boolean selectTccInfoByCode(Map<String, Object> map); |
| 33 | 33 | |
| 34 | 34 | long carParkMaxId(); |
| 35 | + | |
| 36 | + Map<String, Object> update(CarPark carPark); | |
| 37 | + | |
| 38 | + Map<String, Object> save(CarPark carPark); | |
| 39 | + | |
| 35 | 40 | } | ... | ... |
src/main/java/com/bsth/service/LineInformationService.java
| 1 | 1 | package com.bsth.service; |
| 2 | 2 | |
| 3 | 3 | import java.util.List; |
| 4 | +import java.util.Map; | |
| 4 | 5 | |
| 5 | 6 | import com.bsth.entity.LineInformation; |
| 6 | 7 | |
| ... | ... | @@ -23,4 +24,6 @@ import com.bsth.entity.LineInformation; |
| 23 | 24 | public interface LineInformationService extends BaseService<LineInformation, Integer> { |
| 24 | 25 | |
| 25 | 26 | List<LineInformation> findByLine(String lineCodes); |
| 27 | + | |
| 28 | + Map<String, Object> update(LineInformation lineInformation); | |
| 26 | 29 | } | ... | ... |
src/main/java/com/bsth/service/PersonnelService.java
src/main/java/com/bsth/service/StationService.java
src/main/java/com/bsth/service/impl/BusinessServiceImpl.java
| 1 | 1 | package com.bsth.service.impl; |
| 2 | 2 | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 3 | 4 | import org.springframework.beans.factory.annotation.Autowired; |
| 4 | 5 | import org.springframework.stereotype.Service; |
| 5 | 6 | |
| 6 | 7 | import com.bsth.entity.Business; |
| 7 | 8 | import com.bsth.repository.BusinessRepository; |
| 8 | 9 | import com.bsth.service.BusinessService; |
| 10 | +import org.springframework.transaction.annotation.Transactional; | |
| 11 | + | |
| 12 | +import java.util.HashMap; | |
| 13 | +import java.util.Map; | |
| 9 | 14 | |
| 10 | 15 | /** |
| 11 | 16 | * |
| ... | ... | @@ -33,4 +38,19 @@ public class BusinessServiceImpl extends BaseServiceImpl<Business, Integer> impl |
| 33 | 38 | return businessRepository.getMaxId(); |
| 34 | 39 | } |
| 35 | 40 | |
| 41 | + @Transactional | |
| 42 | + @Override | |
| 43 | + public Map<String, Object> update(Business b) { | |
| 44 | + Map<String, Object> map = new HashMap<>(); | |
| 45 | + int status = businessRepository.update(b.getBusinessName(), b.getUpCode(), b.getUpdateDate(), | |
| 46 | + b.getBusinessCode()); | |
| 47 | + if (status==1) { | |
| 48 | + map.put("status", ResponseCode.SUCCESS); | |
| 49 | + } else { | |
| 50 | + map.put("status", ResponseCode.ERROR); | |
| 51 | + } | |
| 52 | + | |
| 53 | + return map; | |
| 54 | + } | |
| 55 | + | |
| 36 | 56 | } | ... | ... |
src/main/java/com/bsth/service/impl/CarParkServiceImpl.java
| ... | ... | @@ -16,8 +16,9 @@ import com.bsth.util.CoordinateConverter.Location; |
| 16 | 16 | |
| 17 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 18 | 18 | import org.springframework.stereotype.Service; |
| 19 | +import org.springframework.transaction.annotation.Transactional; | |
| 20 | + | |
| 19 | 21 | |
| 20 | - | |
| 21 | 22 | @Service |
| 22 | 23 | public class CarParkServiceImpl extends BaseServiceImpl<CarPark, Integer> implements CarParkService { |
| 23 | 24 | |
| ... | ... | @@ -280,4 +281,40 @@ public class CarParkServiceImpl extends BaseServiceImpl<CarPark, Integer> implem |
| 280 | 281 | public long carParkMaxId() { |
| 281 | 282 | return carParkRepository.carParkMaxId(); |
| 282 | 283 | } |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + @Transactional | |
| 288 | + @Override | |
| 289 | + public Map<String, Object> save(CarPark c) { | |
| 290 | + Map<String, Object> map = new HashMap<>(); | |
| 291 | + int status = carParkRepository.carParkSave(c.getArea(), c.getCompany(),c.getParkCode(), c.getParkName(), | |
| 292 | + c.getBrancheCompany(),c.getCreateBy(),c.getCreateDate().toString(), c.getDescriptions(), c.getDestroy(), | |
| 293 | + c.getUpdateBy(),c.getUpdateDate().toString(), c.getVersions(), c.getbCenterPoint(),c.getbParkPoint(), | |
| 294 | + c.getDbType(), c.getgCenterPoint(), c.getgParkPoint(), c.getRadius(), c.getShapesType()); | |
| 295 | + if (status==1) { | |
| 296 | + map.put("status", ResponseCode.SUCCESS); | |
| 297 | + } else { | |
| 298 | + map.put("status", ResponseCode.ERROR); | |
| 299 | + } | |
| 300 | + | |
| 301 | + return map; | |
| 302 | + } | |
| 303 | + | |
| 304 | + @Transactional | |
| 305 | + @Override | |
| 306 | + public Map<String, Object> update(CarPark c) { | |
| 307 | + Map<String, Object> map = new HashMap<>(); | |
| 308 | + int status = carParkRepository.update(c.getArea(), c.getCompany(), c.getParkName(), c.getBrancheCompany(), | |
| 309 | + c.getDescriptions(), c.getDestroy(), c.getUpdateDate(), c.getVersions(), c.getbCenterPoint(),c.getgCenterPoint(), | |
| 310 | + c.getbParkPoint(), c.getgParkPoint(), c.getDbType(), c.getRadius(), c.getShapesType(),c.getParkCode()); | |
| 311 | + if (status==1) { | |
| 312 | + map.put("status", ResponseCode.SUCCESS); | |
| 313 | + } else { | |
| 314 | + map.put("status", ResponseCode.ERROR); | |
| 315 | + } | |
| 316 | + | |
| 317 | + return map; | |
| 318 | + } | |
| 319 | + | |
| 283 | 320 | } | ... | ... |
src/main/java/com/bsth/service/impl/LineInformationServiceImpl.java
| 1 | 1 | package com.bsth.service.impl; |
| 2 | 2 | |
| 3 | +import java.util.HashMap; | |
| 3 | 4 | import java.util.List; |
| 5 | +import java.util.Map; | |
| 4 | 6 | |
| 7 | +import com.bsth.common.ResponseCode; | |
| 5 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 9 | import org.springframework.stereotype.Service; |
| 7 | 10 | |
| ... | ... | @@ -9,6 +12,7 @@ import com.bsth.entity.LineInformation; |
| 9 | 12 | import com.bsth.repository.LineInformationRepository; |
| 10 | 13 | import com.bsth.service.LineInformationService; |
| 11 | 14 | import com.google.common.base.Splitter; |
| 15 | +import org.springframework.transaction.annotation.Transactional; | |
| 12 | 16 | |
| 13 | 17 | /** |
| 14 | 18 | * |
| ... | ... | @@ -39,4 +43,25 @@ public class LineInformationServiceImpl extends BaseServiceImpl<LineInformation, |
| 39 | 43 | return null; |
| 40 | 44 | return lineInformationRepository.findByLine(list); |
| 41 | 45 | } |
| 46 | + | |
| 47 | + @Transactional | |
| 48 | + @Override | |
| 49 | + public Map<String, Object> update(LineInformation i) { | |
| 50 | + Map<String, Object> map = new HashMap<>(); | |
| 51 | + int status = lineInformationRepository.update(i.getType(), i.getTotalMileage(), i.getEmptyMileage(), i.getUpMileage(), | |
| 52 | + i.getDownMileage(), i.getUpTravelTime(), i.getDownTravelTime(), i.getEarlyStartTime(), i.getEarlyEndTime(),i.getLateStartTime(), | |
| 53 | + i.getLateEndTime(), i.getXygfkssj(), i.getXygfjssj(), i.getEarlyUpTime(), i.getEarlyDownTime(),i.getLateUpTime(), | |
| 54 | + i.getLateDownTime(), i.getNightStartTime(), i.getNightEndTime(), i.getTroughUpTime(), i.getTroughDownTime(),i.getCarPark(), | |
| 55 | + i.getUpInTimer(), i.getUpOutTimer(), i.getDownInTimer(), i.getDownOutTimer(), i.getEarlyIntervalLg(),i.getLateIntervalLg(), | |
| 56 | + i.getIntervalLg(), i.getSpeedLimit(), i.getRainLimit(), i.getFogLimit(), i.getSnowLimit(),i.getFestivalSpeedLimit(), | |
| 57 | + i.getLagStation(), i.getSkip(), i.getSpeeding(), i.getCrossedLine(), i.getOverflights(),i.getDescriptions(), | |
| 58 | + i.getLine().getId()); | |
| 59 | + if (status==1) { | |
| 60 | + map.put("status", ResponseCode.SUCCESS); | |
| 61 | + } else { | |
| 62 | + map.put("status", ResponseCode.ERROR); | |
| 63 | + } | |
| 64 | + | |
| 65 | + return map; | |
| 66 | + } | |
| 42 | 67 | } | ... | ... |
src/main/java/com/bsth/service/impl/PersonnelServiceImpl.java
| 1 | 1 | package com.bsth.service.impl; |
| 2 | 2 | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 3 | 4 | import com.bsth.entity.Personnel; |
| 4 | 5 | import com.bsth.repository.PersonnelRepository; |
| 5 | 6 | import com.bsth.service.PersonnelService; |
| ... | ... | @@ -15,6 +16,7 @@ import java.util.Set; |
| 15 | 16 | |
| 16 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 17 | 18 | import org.springframework.stereotype.Service; |
| 19 | +import org.springframework.transaction.annotation.Transactional; | |
| 18 | 20 | |
| 19 | 21 | /** |
| 20 | 22 | * Created by xu on 16/6/15. |
| ... | ... | @@ -56,4 +58,21 @@ public class PersonnelServiceImpl extends BaseServiceImpl<Personnel, Integer> im |
| 56 | 58 | return null; |
| 57 | 59 | |
| 58 | 60 | } |
| 61 | + | |
| 62 | + @Transactional | |
| 63 | + @Override | |
| 64 | + public Map<String, Object> update(Personnel p) { | |
| 65 | + Map<String, Object> map = new HashMap<>(); | |
| 66 | + int status = repository.update(p.getCompany(), p.getCompanyCode(), p.getBrancheCompany(), p.getBrancheCompanyCode(), | |
| 67 | + p.getPersonnelName(), p.getPapersCode(), p.getIcCardCode(), p.getPosts(), p.getCard(),p.getJobCode(), | |
| 68 | + p.getJobCodeori()); | |
| 69 | + if (status==1) { | |
| 70 | + map.put("status", ResponseCode.SUCCESS); | |
| 71 | + } else { | |
| 72 | + map.put("status", ResponseCode.ERROR); | |
| 73 | + } | |
| 74 | + | |
| 75 | + return map; | |
| 76 | + } | |
| 77 | + | |
| 59 | 78 | } | ... | ... |
src/main/java/com/bsth/service/impl/StationServiceImpl.java
| 1 | 1 | package com.bsth.service.impl; |
| 2 | 2 | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 3 | 4 | import com.bsth.entity.Station; |
| 4 | 5 | import com.bsth.entity.search.CustomerSpecs; |
| 5 | 6 | import com.bsth.repository.*; |
| ... | ... | @@ -141,4 +142,21 @@ public class StationServiceImpl extends BaseServiceImpl<Station, Integer> implem |
| 141 | 142 | station.setCenterPointWgs(wgs); |
| 142 | 143 | } |
| 143 | 144 | } |
| 145 | + | |
| 146 | + @Transactional | |
| 147 | + @Override | |
| 148 | + public Map<String, Object> update(Station s) { | |
| 149 | + Map<String, Object> map = new HashMap<>(); | |
| 150 | + int status = stationRepository.update(s.getStationName(), s.getRoadCoding(), s.getAddress(), s.getDestroy(), | |
| 151 | + s.getVersions(), s.getDescriptions(),s.getCenterPoint(),s.getCenterPointWgs(), | |
| 152 | + s.getStationCode()); | |
| 153 | + if (status==1) { | |
| 154 | + map.put("status", ResponseCode.SUCCESS); | |
| 155 | + } else { | |
| 156 | + map.put("status", ResponseCode.ERROR); | |
| 157 | + } | |
| 158 | + | |
| 159 | + return map; | |
| 160 | + } | |
| 161 | + | |
| 144 | 162 | } |
| 145 | 163 | \ No newline at end of file | ... | ... |
src/main/java/com/bsth/service/schedule/CarsService.java
| ... | ... | @@ -3,6 +3,8 @@ package com.bsth.service.schedule; |
| 3 | 3 | import com.bsth.entity.Cars; |
| 4 | 4 | import com.bsth.service.schedule.exception.ScheduleException; |
| 5 | 5 | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 6 | 8 | /** |
| 7 | 9 | * Created by xu on 16/12/8. |
| 8 | 10 | */ |
| ... | ... | @@ -11,4 +13,5 @@ public interface CarsService extends BService<Cars, Integer> { |
| 11 | 13 | public void validate_clbh(Cars cars) throws ScheduleException; |
| 12 | 14 | public void validate_cph(Cars cars) throws ScheduleException; |
| 13 | 15 | public void validate_sbbh(Cars cars) throws ScheduleException; |
| 16 | + Map<String, Object> update(Cars cars); | |
| 14 | 17 | } | ... | ... |
src/main/java/com/bsth/service/schedule/impl/CarsServiceImpl.java
| 1 | 1 | package com.bsth.service.schedule.impl; |
| 2 | 2 | |
| 3 | +import com.bsth.common.ResponseCode; | |
| 3 | 4 | import com.bsth.entity.CarDevice; |
| 4 | 5 | import com.bsth.entity.Cars; |
| 6 | +import com.bsth.entity.Line; | |
| 5 | 7 | import com.bsth.entity.schedule.CarConfigInfo; |
| 8 | +import com.bsth.repository.CarsRepository; | |
| 6 | 9 | import com.bsth.repository.schedule.CarConfigInfoRepository; |
| 7 | 10 | import com.bsth.service.schedule.CarDeviceService; |
| 8 | 11 | import com.bsth.service.schedule.CarsService; |
| ... | ... | @@ -37,6 +40,9 @@ public class CarsServiceImpl extends BServiceImpl<Cars, Integer> implements Cars |
| 37 | 40 | @Autowired |
| 38 | 41 | private CarConfigInfoRepository carConfigInfoRepository; |
| 39 | 42 | |
| 43 | + @Autowired | |
| 44 | + CarsRepository carsRepository; | |
| 45 | + | |
| 40 | 46 | @Override |
| 41 | 47 | public Cars save(Cars cars) { |
| 42 | 48 | if (cars.getId() != null && cars.getScrapState()) { // 更新车辆信息,报废车辆 |
| ... | ... | @@ -143,4 +149,21 @@ public class CarsServiceImpl extends BServiceImpl<Cars, Integer> implements Cars |
| 143 | 149 | throw new ScheduleException("设备编号重复"); |
| 144 | 150 | } |
| 145 | 151 | } |
| 152 | + | |
| 153 | + @Transactional | |
| 154 | + @Override | |
| 155 | + public Map<String, Object> update(Cars c) { | |
| 156 | + Map<String, Object> map = new HashMap<>(); | |
| 157 | + int status = carsRepository.update(c.getBusinessCode(), c.getCompany(), c.getBrancheCompany(), c.getBrancheCompanyCode(), | |
| 158 | + c.getCarCode(), c.getCarPlate(), c.getSupplierName(), c.getEquipmentCode(), c.getCarClass(),c.getCarSeatnNumber(), | |
| 159 | + c.getCarStandard(), c.getScrapCode(), c.getScrapDate(), c.getMakeCodeOne(),c.getMakeCodeTwo(),c.getEngineCodeOne(), | |
| 160 | + c.getEngineCodeTwo(), c.getCarType(), c.getSfdc(), c.getDescriptions(),c.getScrapState(), c.getInsideCode()); | |
| 161 | + if (status==1) { | |
| 162 | + map.put("status", ResponseCode.SUCCESS); | |
| 163 | + } else { | |
| 164 | + map.put("status", ResponseCode.ERROR); | |
| 165 | + } | |
| 166 | + | |
| 167 | + return map; | |
| 168 | + } | |
| 146 | 169 | } | ... | ... |
src/main/java/com/bsth/util/db/DBUtils_jiaDingBus.java
0 → 100644
| 1 | +package com.bsth.util.db; | |
| 2 | + | |
| 3 | +import com.mchange.v2.c3p0.DataSources; | |
| 4 | +import org.apache.log4j.Logger; | |
| 5 | + | |
| 6 | +import javax.sql.DataSource; | |
| 7 | +import java.io.FileNotFoundException; | |
| 8 | +import java.io.IOException; | |
| 9 | +import java.sql.Connection; | |
| 10 | +import java.sql.ResultSet; | |
| 11 | +import java.sql.SQLException; | |
| 12 | +import java.sql.Statement; | |
| 13 | +import java.util.HashMap; | |
| 14 | +import java.util.Map; | |
| 15 | +import java.util.Properties; | |
| 16 | + | |
| 17 | +/** | |
| 18 | + * 嘉定基础库库连接池 | |
| 19 | + * @author | |
| 20 | + * | |
| 21 | + */ | |
| 22 | +//@Component | |
| 23 | +public class DBUtils_jiaDingBus { | |
| 24 | + | |
| 25 | + private static String url = null; | |
| 26 | + | |
| 27 | + private static String username = null; | |
| 28 | + | |
| 29 | + private static String pwd = null; | |
| 30 | + | |
| 31 | + private static DataSource ds_pooled; | |
| 32 | + | |
| 33 | + static Logger logger = Logger.getLogger(DBUtils_jiaDingBus.class); | |
| 34 | + | |
| 35 | + static { | |
| 36 | + Properties env = new Properties(); | |
| 37 | + | |
| 38 | + try { | |
| 39 | + env.load(DBUtils_jiaDingBus.class.getClassLoader().getResourceAsStream("jiaDingBus-jdbc.properties")); | |
| 40 | + // 1. 加载驱动类 | |
| 41 | + Class.forName(env.getProperty("jiaDingBus.mysql.driver")); | |
| 42 | + | |
| 43 | + url = env.getProperty("jiaDingBus.mysql.url"); | |
| 44 | + username = env.getProperty("jiaDingBus.mysql.username"); | |
| 45 | + pwd = env.getProperty("jiaDingBus.mysql.password"); | |
| 46 | + | |
| 47 | + // 设置连接数据库的配置信息 | |
| 48 | + DataSource ds_unpooled = DataSources.unpooledDataSource(url, | |
| 49 | + username, pwd); | |
| 50 | + | |
| 51 | + Map<String, Object> pool_conf = new HashMap<String, Object>(); | |
| 52 | + // 设置最大连接数 | |
| 53 | + pool_conf.put("maxPoolSize", 10); | |
| 54 | + | |
| 55 | + pool_conf.put("testConnectionOnCheckout", false); | |
| 56 | + //异步检测连接的有效性 | |
| 57 | + pool_conf.put("testConnectionOnCheckin", true); | |
| 58 | + //30秒检测一次 | |
| 59 | + pool_conf.put("idleConnectionTestPeriod", 30); | |
| 60 | + ds_pooled = DataSources.pooledDataSource(ds_unpooled, pool_conf); | |
| 61 | + } catch (FileNotFoundException e) { | |
| 62 | + logger.error(e.toString()); | |
| 63 | + e.printStackTrace(); | |
| 64 | + } catch (IOException e) { | |
| 65 | + logger.error(e.toString()); | |
| 66 | + e.printStackTrace(); | |
| 67 | + } catch (ClassNotFoundException e) { | |
| 68 | + logger.error(e.toString()); | |
| 69 | + e.printStackTrace(); | |
| 70 | + } catch (SQLException e) { | |
| 71 | + logger.error(e.toString()); | |
| 72 | + e.printStackTrace(); | |
| 73 | + } | |
| 74 | + } | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * 获取连接对象 | |
| 78 | + */ | |
| 79 | + public static Connection getConnection() throws SQLException { | |
| 80 | + return ds_pooled.getConnection(); | |
| 81 | + } | |
| 82 | + | |
| 83 | + /** | |
| 84 | + * 释放连接池资源 | |
| 85 | + */ | |
| 86 | + public static void clearup() { | |
| 87 | + if (ds_pooled != null) { | |
| 88 | + try { | |
| 89 | + DataSources.destroy(ds_pooled); | |
| 90 | + } catch (SQLException e) { | |
| 91 | + logger.error(e.toString()); | |
| 92 | + e.printStackTrace(); | |
| 93 | + } | |
| 94 | + } | |
| 95 | + } | |
| 96 | + | |
| 97 | + /** | |
| 98 | + * 资源关闭 | |
| 99 | + * | |
| 100 | + * @param rs | |
| 101 | + * @param stmt | |
| 102 | + * @param conn | |
| 103 | + */ | |
| 104 | + public static void close(ResultSet rs, Statement stmt, Connection conn) { | |
| 105 | + if (rs != null) { | |
| 106 | + try { | |
| 107 | + rs.close(); | |
| 108 | + } catch (SQLException e) { | |
| 109 | + logger.error(e.toString()); | |
| 110 | + e.printStackTrace(); | |
| 111 | + } | |
| 112 | + } | |
| 113 | + | |
| 114 | + if (stmt != null) { | |
| 115 | + try { | |
| 116 | + stmt.close(); | |
| 117 | + } catch (SQLException e) { | |
| 118 | + logger.error(e.toString()); | |
| 119 | + e.printStackTrace(); | |
| 120 | + } | |
| 121 | + } | |
| 122 | + | |
| 123 | + if (conn != null) { | |
| 124 | + try { | |
| 125 | + conn.close(); | |
| 126 | + } catch (SQLException e) { | |
| 127 | + logger.error(e.toString()); | |
| 128 | + e.printStackTrace(); | |
| 129 | + } | |
| 130 | + } | |
| 131 | + } | |
| 132 | + | |
| 133 | + public static DataSource getDataSource(){ | |
| 134 | + return ds_pooled; | |
| 135 | + } | |
| 136 | +} | ... | ... |
src/main/resources/jiaDingBus-jdbc.properties
0 → 100644
| 1 | +jiaDingBus.mysql.driver= com.mysql.jdbc.Driver | |
| 2 | +jiaDingBus.mysql.url= jdbc:mysql://127.0.0.1/jiading_bus?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai | |
| 3 | +jiaDingBus.mysql.username= root | |
| 4 | +jiaDingBus.mysql.password= 123456 | |
| 0 | 5 | \ No newline at end of file | ... | ... |
src/main/resources/static/pages/home.html
| ... | ... | @@ -59,16 +59,11 @@ |
| 59 | 59 | } |
| 60 | 60 | </style> |
| 61 | 61 | <div class="system_change_log"> |
| 62 | - <h2 style="text-indent: 35px;margin: 10px 0 5px;">2025-03-04 更新说明 Changelog</h2> | |
| 62 | + <h2 style="text-indent: 35px;margin: 10px 0 5px;">2025-09-15</h2> | |
| 63 | 63 | <br><br> |
| 64 | 64 | <ul > |
| 65 | - <li class="sub_title"><h6>智能调度</h6></li> | |
| 66 | - <li><span class="label s_c_change">修改</span>1.智能调度实发二次调整刷新页面-后续程序上会对这块进行更新,已撤销的班次,你手动再次撤销会刷新这个班次不会再提示无法撤销。</li> | |
| 67 | - <li><span class="label s_c_change">修改</span>2.末二班车提示上线</li> | |
| 68 | - <li><span class="label s_c_change">修改</span>3.交互屏催发接口修复</li> | |
| 69 | - <li><span class="label s_c_change">修改</span>4.行车路单有未实到的班次,导出的时候显示计划公里</li> | |
| 70 | - <li><span class="label s_c_change">修改</span>5.自动调度实发未发只判断有rfid的班次</li> | |
| 71 | - | |
| 65 | + <li class="sub_title"><h6>嘉定示范线调度</h6></li> | |
| 66 | + <li><span class="label s_c_change">试运行</span> | |
| 72 | 67 | </ul> |
| 73 | 68 | |
| 74 | 69 | </div> | ... | ... |
src/main/resources/static/real_control_v2/js/home/layout.js
| ... | ... | @@ -260,8 +260,10 @@ var gb_home_layout = (function () { |
| 260 | 260 | if(gb_svg_chart.getChecked()!=undefined){ |
| 261 | 261 | lineCode=gb_svg_chart.getChecked(); |
| 262 | 262 | } |
| 263 | - createEcharts(lineCode); | |
| 264 | - createEcharts2(lineCode); | |
| 263 | + if(lineCode!=undefined){ | |
| 264 | + createEcharts(lineCode); | |
| 265 | + createEcharts2(lineCode); | |
| 266 | + } | |
| 265 | 267 | timer = setTimeout(f, realT); |
| 266 | 268 | } |
| 267 | 269 | ... | ... |