TTinfoDetailDynamicData.java 11.6 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476
package com.bsth.service.schedule.datatools;

import com.bsth.service.schedule.exception.ScheduleException;
import com.bsth.service.schedule.utils.DataToolsFile;
import com.bsth.service.schedule.utils.DataToolsFileType;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

import java.util.List;

/**
 * 动态时刻表数据。
 */
public interface TTinfoDetailDynamicData {

    //---------------------- 生成时刻表用对象(以下) ---------------------//
    enum BcType { // 班次类型枚举
        IN("in"), // 进场
        OUT("out"), // 出场
        BD("bd"), // 早例保
        LC("lc"), // 晚例保
        NORMAL("normal"); // 正常
        private String flag;

        @JsonCreator
        private BcType(String flag) {
            this.flag = flag;
        }

        @JsonValue
        public String getFlag() {
            return flag;
        }

        public void setFlag(String flag) {
            this.flag = flag;
        }
    }

    class BcObj { // 班次对象
        /** 班次时间 */
        private Integer bcsj;
        /** 停站时间 */
        private Integer ssj;
        /** 吃饭时间 */
        private Integer eatsj;

        /** 停车场id */
        private Integer tccid;
        /** 起点站id */
        private Integer qdzid;
        /** 终点站id */
        private Integer zdzid;

        /** 是否上行 */
        private Boolean isUp;

        /** 是否分班 */
        private Boolean isFb;

        /** 班次类型 */
        private BcType bcType;
        /** 发车时刻 */
        private String fcsj;
        /** 用于统计的发车时间描述(把进出场,保养,吃饭时间写在一起) */
        private String fcsjDesc;

        /** 第几圈(从1开始) */
        private Integer groupNo;
        /** 圈里第几个班次(1或者2) */
        private Integer groupBcNo;

        public Integer getBcsj() {
            return bcsj;
        }

        public void setBcsj(Integer bcsj) {
            this.bcsj = bcsj;
        }

        public Integer getSsj() {
            return ssj;
        }

        public void setSsj(Integer ssj) {
            this.ssj = ssj;
        }

        public Integer getEatsj() {
            return eatsj;
        }

        public void setEatsj(Integer eatsj) {
            this.eatsj = eatsj;
        }

        public Integer getTccid() {
            return tccid;
        }

        public void setTccid(Integer tccid) {
            this.tccid = tccid;
        }

        public Integer getQdzid() {
            return qdzid;
        }

        public void setQdzid(Integer qdzid) {
            this.qdzid = qdzid;
        }

        public Integer getZdzid() {
            return zdzid;
        }

        public void setZdzid(Integer zdzid) {
            this.zdzid = zdzid;
        }

        public BcType getBcType() {
            return bcType;
        }

        public void setBcType(BcType bcType) {
            this.bcType = bcType;
        }

        public String getFcsj() {
            return fcsj;
        }

        public void setFcsj(String fcsj) {
            this.fcsj = fcsj;
        }

        public Boolean getIsUp() {
            return isUp;
        }

        public void setIsUp(Boolean isUp) {
            this.isUp = isUp;
        }

        public Integer getGroupNo() {
            return groupNo;
        }

        public void setGroupNo(Integer groupNo) {
            this.groupNo = groupNo;
        }

        public Integer getGroupBcNo() {
            return groupBcNo;
        }

        public void setGroupBcNo(Integer groupBcNo) {
            this.groupBcNo = groupBcNo;
        }

        public String getFcsjDesc() {
            return fcsjDesc;
        }

        public void setFcsjDesc(String fcsjDesc) {
            this.fcsjDesc = fcsjDesc;
        }

        public Boolean getIsFb() {
            return isFb;
        }

        public void setIsFb(Boolean fb) {
            isFb = fb;
        }
    }

    class LpObj { // 路牌对象
        /** 路牌名字 */
        private String lpname;
        /** 每圈的第一个班次是否上行 */
        private Boolean isUp;

        /** 第一个班次起点站路由id */
        private Integer stationRouteId1;
        /** 第二个班次起点站路由id */
        private Integer stationRouteId2;

        /** 班次列表 */
        private List<BcObj> bcObjList;
        /** 总圈数 */
        private Integer groupCount;

        //---------------- 路牌统计 ---------------//
        /** 总里程 */
        private Double zlc;
        /** 营运里程 */
        private Double yylc;
        /** 空驶里程 */
        private Double kslc;
        /** 总工时 */
        private Double zgs;
        /** 总班次 */
        private Integer zbc;
        /** 营运工时 */
        private Double yygs;
        /** 营运班次 */
        private Integer yybc;

        public String getLpname() {
            return lpname;
        }

        public void setLpname(String lpname) {
            this.lpname = lpname;
        }

        public Boolean getIsUp() {
            return isUp;
        }

        public void setIsUp(Boolean isUp) {
            this.isUp = isUp;
        }

        public List<BcObj> getBcObjList() {
            return bcObjList;
        }

        public void setBcObjList(List<BcObj> bcObjList) {
            this.bcObjList = bcObjList;
        }

        public Integer getGroupCount() {
            return groupCount;
        }

        public void setGroupCount(Integer groupCount) {
            this.groupCount = groupCount;
        }

        public Integer getStationRouteId1() {
            return stationRouteId1;
        }

        public void setStationRouteId1(Integer stationRouteId1) {
            this.stationRouteId1 = stationRouteId1;
        }

        public Integer getStationRouteId2() {
            return stationRouteId2;
        }

        public void setStationRouteId2(Integer stationRouteId2) {
            this.stationRouteId2 = stationRouteId2;
        }

        public Boolean getUp() {
            return isUp;
        }

        public void setUp(Boolean up) {
            isUp = up;
        }

        public Double getZlc() {
            return zlc;
        }

        public void setZlc(Double zlc) {
            this.zlc = zlc;
        }

        public Double getYylc() {
            return yylc;
        }

        public void setYylc(Double yylc) {
            this.yylc = yylc;
        }

        public Double getKslc() {
            return kslc;
        }

        public void setKslc(Double kslc) {
            this.kslc = kslc;
        }

        public Double getZgs() {
            return zgs;
        }

        public void setZgs(Double zgs) {
            this.zgs = zgs;
        }

        public Integer getZbc() {
            return zbc;
        }

        public void setZbc(Integer zbc) {
            this.zbc = zbc;
        }

        public Double getYygs() {
            return yygs;
        }

        public void setYygs(Double yygs) {
            this.yygs = yygs;
        }

        public Integer getYybc() {
            return yybc;
        }

        public void setYybc(Integer yybc) {
            this.yybc = yybc;
        }

    }

    class StatInfo { // 统计数据对象
        /** 统计项目 */
        private String statItem;
        /** 统计值 */
        private Double statValue;

        public String getStatItem() {
            return statItem;
        }

        public void setStatItem(String statItem) {
            this.statItem = statItem;
        }

        public Double getStatValue() {
            return statValue;
        }

        public void setStatValue(Double statValue) {
            this.statValue = statValue;
        }
    }

    class ParameterInfo { // 生成参数对象
        /** 参数项目名称 */
        private String paramItem;
        /** 参数项目值 */
        private String paramValue;

        public String getParamItem() {
            return paramItem;
        }

        public void setParamItem(String paramItem) {
            this.paramItem = paramItem;
        }

        public String getParamValue() {
            return paramValue;
        }

        public void setParamValue(String paramValue) {
            this.paramValue = paramValue;
        }
    }

    class DTInfos { // 所有数据信息
        /** 路牌班次数据列表 */
        private List<LpObj> lpObjList;
        /** 统计数据列表 */
        private List<StatInfo> statInfoList;
        /** 参数对象信息 */
        private List<ParameterInfo> parameterInfoList;

        public List<LpObj> getLpObjList() {
            return lpObjList;
        }

        public void setLpObjList(List<LpObj> lpObjList) {
            this.lpObjList = lpObjList;
        }

        public List<StatInfo> getStatInfoList() {
            return statInfoList;
        }

        public void setStatInfoList(List<StatInfo> statInfoList) {
            this.statInfoList = statInfoList;
        }

        public List<ParameterInfo> getParameterInfoList() {
            return parameterInfoList;
        }

        public void setParameterInfoList(List<ParameterInfo> parameterInfoList) {
            this.parameterInfoList = parameterInfoList;
        }
    }

    class BcHeadWayInfo { // 班次发车间隔信息
        /** 路牌名字 */
        private String lpName;
        /** 发车时间 */
        private String fcsj;
        /** 发车间隔 */
        private String headway;

        public String getLpName() {
            return lpName;
        }

        public void setLpName(String lpName) {
            this.lpName = lpName;
        }

        public String getFcsj() {
            return fcsj;
        }

        public void setFcsj(String fcsj) {
            this.fcsj = fcsj;
        }

        public String getHeadway() {
            return headway;
        }

        public void setHeadway(String headway) {
            this.headway = headway;
        }
    }

    class LineHeadWayInfo { // 线路发车间隔信息
        /** 上行班次发车间隔信息 */
        private List<BcHeadWayInfo> upBcList;
        /** 下行班次发车间隔信息 */
        private List<BcHeadWayInfo> downBcList;

        public List<BcHeadWayInfo> getUpBcList() {
            return upBcList;
        }

        public void setUpBcList(List<BcHeadWayInfo> upBcList) {
            this.upBcList = upBcList;
        }

        public List<BcHeadWayInfo> getDownBcList() {
            return downBcList;
        }

        public void setDownBcList(List<BcHeadWayInfo> downBcList) {
            this.downBcList = downBcList;
        }
    }

    //---------------------- 生成时刻表用对象(以上) ---------------------//

    /**
     * 导出动态时刻表数据。
     * @param dtInfos
     * @return
     * @throws ScheduleException
     */
    DataToolsFile exportDynamicTTinfo(DTInfos dtInfos, DataToolsFileType type) throws ScheduleException;

    /**
     * 导出班次发车间隔信息。
     * @param lineHeadWayInfo
     * @return
     * @throws ScheduleException
     */
    DataToolsFile exportHeadwayTTinfo(LineHeadWayInfo lineHeadWayInfo) throws ScheduleException;
}