Commit 8a2900b0f68ef49fe516dd889dc8ce11e9067b1e
1 parent
247ee6cd
增加单条线路的实际排班接口
Showing
4 changed files
with
16 additions
and
75 deletions
src/main/java/com/bsth/server_rs/base_info/car/Car.java
| @@ -69,17 +69,6 @@ public class Car implements Serializable { | @@ -69,17 +69,6 @@ public class Car implements Serializable { | ||
| 69 | 69 | ||
| 70 | private Date updateDate; | 70 | private Date updateDate; |
| 71 | 71 | ||
| 72 | - | ||
| 73 | - | ||
| 74 | - /** 车辆颜色 */ | ||
| 75 | - private String color; | ||
| 76 | - /** 车辆最大乘坐人数 */ | ||
| 77 | - private String maxPeople; | ||
| 78 | - /** 票价类型 */ | ||
| 79 | - private String priceType; | ||
| 80 | - /** 票价 */ | ||
| 81 | - private String price; | ||
| 82 | - | ||
| 83 | public String getNbbm() { | 72 | public String getNbbm() { |
| 84 | return nbbm; | 73 | return nbbm; |
| 85 | } | 74 | } |
| @@ -191,44 +180,4 @@ public class Car implements Serializable { | @@ -191,44 +180,4 @@ public class Car implements Serializable { | ||
| 191 | public void setRemark(String remark) { | 180 | public void setRemark(String remark) { |
| 192 | this.remark = remark; | 181 | this.remark = remark; |
| 193 | } | 182 | } |
| 194 | - | ||
| 195 | - public Date getUpdateDate() { | ||
| 196 | - return updateDate; | ||
| 197 | - } | ||
| 198 | - | ||
| 199 | - public void setUpdateDate(Date updateDate) { | ||
| 200 | - this.updateDate = updateDate; | ||
| 201 | - } | ||
| 202 | - | ||
| 203 | - public String getColor() { | ||
| 204 | - return color; | ||
| 205 | - } | ||
| 206 | - | ||
| 207 | - public void setColor(String color) { | ||
| 208 | - this.color = color; | ||
| 209 | - } | ||
| 210 | - | ||
| 211 | - public String getMaxPeople() { | ||
| 212 | - return maxPeople; | ||
| 213 | - } | ||
| 214 | - | ||
| 215 | - public void setMaxPeople(String maxPeople) { | ||
| 216 | - this.maxPeople = maxPeople; | ||
| 217 | - } | ||
| 218 | - | ||
| 219 | - public String getPriceType() { | ||
| 220 | - return priceType; | ||
| 221 | - } | ||
| 222 | - | ||
| 223 | - public void setPriceType(String priceType) { | ||
| 224 | - this.priceType = priceType; | ||
| 225 | - } | ||
| 226 | - | ||
| 227 | - public String getPrice() { | ||
| 228 | - return price; | ||
| 229 | - } | ||
| 230 | - | ||
| 231 | - public void setPrice(String price) { | ||
| 232 | - this.price = price; | ||
| 233 | - } | ||
| 234 | } | 183 | } |
src/main/java/com/bsth/server_rs/base_info/station/buffer/StationBufferData.java
| @@ -114,15 +114,4 @@ public class StationBufferData implements CommandLineRunner { | @@ -114,15 +114,4 @@ public class StationBufferData implements CommandLineRunner { | ||
| 114 | return listMap.asMap(); | 114 | return listMap.asMap(); |
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | - | ||
| 118 | - public static Map<String, Collection<StationRotue>> findRouteByLineCoderegion(String lineCode,String region){ | ||
| 119 | - | ||
| 120 | - ArrayListMultimap<String, StationRotue> listMap = ArrayListMultimap.create(); | ||
| 121 | - String k1 = lineCode + "_" + 0 | ||
| 122 | - ,k2 = lineCode + "_" + 1; | ||
| 123 | - | ||
| 124 | - listMap.putAll(k1+ "_" +region, routeListMap.get(k1)); | ||
| 125 | - listMap.putAll(k2 + "_" +region, routeListMap.get(k2)); | ||
| 126 | - return listMap.asMap(); | ||
| 127 | - } | ||
| 128 | } | 117 | } |
src/main/java/com/bsth/server_rs/schedule/plan/SchedulePlanService.java
| @@ -52,19 +52,6 @@ public class SchedulePlanService { | @@ -52,19 +52,6 @@ public class SchedulePlanService { | ||
| 52 | return all; | 52 | return all; |
| 53 | } | 53 | } |
| 54 | 54 | ||
| 55 | - @GET | ||
| 56 | - @Path("/sch_jk_line/{company}/{rq}/{lineCode}") | ||
| 57 | - public List<PlanScheduleDTO_JK> find_JK_line(@PathParam("company") String company, @PathParam("rq") String rq, @PathParam("lineCode") String lineCode){ | ||
| 58 | - List<PlanScheduleDTO_JK> all = new ArrayList<>(); | ||
| 59 | - | ||
| 60 | - List<Line> lines = LineBufferData.findByCompany(company); | ||
| 61 | - for(Line line : lines){ | ||
| 62 | - if(line.getLineCode().equals(lineCode)){ | ||
| 63 | - all.addAll(PlanScheduleDTO_JK.getMultiInstance(redisService.read(rq, line.getLineCode()))); | ||
| 64 | - } | ||
| 65 | - } | ||
| 66 | - return all; | ||
| 67 | - } | ||
| 68 | 55 | ||
| 69 | 56 | ||
| 70 | @GET | 57 | @GET |
src/main/java/com/bsth/server_rs/schedule/real/ScheduleRealService.java
| @@ -16,6 +16,7 @@ import com.bsth.server_rs.base_info.line.Line; | @@ -16,6 +16,7 @@ import com.bsth.server_rs.base_info.line.Line; | ||
| 16 | import com.bsth.server_rs.base_info.line.buffer.LineBufferData; | 16 | import com.bsth.server_rs.base_info.line.buffer.LineBufferData; |
| 17 | import com.bsth.server_rs.gps.buffer.GpsRealDataBuffer; | 17 | import com.bsth.server_rs.gps.buffer.GpsRealDataBuffer; |
| 18 | import com.bsth.server_rs.gps.entity.GpsEntity; | 18 | import com.bsth.server_rs.gps.entity.GpsEntity; |
| 19 | +import com.bsth.server_rs.schedule.dto.PlanScheduleDTO_JK; | ||
| 19 | import com.bsth.server_rs.schedule.dto.ScheduleCcInfoConfig; | 20 | import com.bsth.server_rs.schedule.dto.ScheduleCcInfoConfig; |
| 20 | import com.bsth.server_rs.schedule.dto.ScheduleInOut; | 21 | import com.bsth.server_rs.schedule.dto.ScheduleInOut; |
| 21 | import com.bsth.server_rs.schedule.dto.ScheduleRealInfoDTO_JK; | 22 | import com.bsth.server_rs.schedule.dto.ScheduleRealInfoDTO_JK; |
| @@ -231,6 +232,21 @@ public class ScheduleRealService implements InitializingBean { | @@ -231,6 +232,21 @@ public class ScheduleRealService implements InitializingBean { | ||
| 231 | } | 232 | } |
| 232 | 233 | ||
| 233 | @GET | 234 | @GET |
| 235 | + @Path("/sch_jk_line/{company}/{rq}/{lineCode}") | ||
| 236 | + public List<ScheduleRealInfoDTO_JK> find_JK_line(@PathParam("company") String company, @PathParam("rq") String rq, @PathParam("lineCode") String lineCode){ | ||
| 237 | + List<ScheduleRealInfoDTO_JK> all = new ArrayList<>(); | ||
| 238 | + | ||
| 239 | + List<Line> lines = LineBufferData.findByCompany(company); | ||
| 240 | + for(Line line : lines){ | ||
| 241 | + if(line.getLineCode().equals(lineCode)){ | ||
| 242 | + all.addAll(ScheduleRealInfoDTO_JK.getMultiInstance(redisService.read(rq, line.getLineCode()))); | ||
| 243 | + } | ||
| 244 | + } | ||
| 245 | + return all; | ||
| 246 | + } | ||
| 247 | + | ||
| 248 | + | ||
| 249 | + @GET | ||
| 234 | @Path("/sch_jk_db/{company}/{rq}") | 250 | @Path("/sch_jk_db/{company}/{rq}") |
| 235 | public List<ScheduleRealInfoDTO_JK> sch_jk(@PathParam("company") String company, @PathParam("rq") String rq) { | 251 | public List<ScheduleRealInfoDTO_JK> sch_jk(@PathParam("company") String company, @PathParam("rq") String rq) { |
| 236 | DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyyMMdd"); | 252 | DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyyMMdd"); |