Commit 8e64d6400f16173e4e062e5204f03c30e0548ab2

Authored by 潘钊
2 parents ce4f33f7 817d069b

Merge branch 'master' of 192.168.168.201:panzhaov5/bsth_control

src/main/java/com/bsth/entity/schedule/SchedulePlan.java
@@ -26,19 +26,17 @@ public class SchedulePlan { @@ -26,19 +26,17 @@ public class SchedulePlan {
26 /** 关联的时刻表/模版 */ 26 /** 关联的时刻表/模版 */
27 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 27 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
28 private TTInfo ttInfo; 28 private TTInfo ttInfo;
29 - /** 关联的排班规则 */  
30 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 29 + /** 关联的排班规则(这里暂时改成可以不关联规则,直接生成排班) */
  30 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
31 private ScheduleRule1 scheduleRule1; 31 private ScheduleRule1 scheduleRule1;
32 32
33 /** 排班计划的开始时间 */ 33 /** 排班计划的开始时间 */
  34 + @Column(nullable = false)
34 private Date scheduleFromTime; 35 private Date scheduleFromTime;
35 /** 排班计划的结束时间 */ 36 /** 排班计划的结束时间 */
  37 + @Column(nullable = false)
36 private Date scheduleToTime; 38 private Date scheduleToTime;
37 39
38 - /** 操作人 */  
39 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
40 - private SysUser user;  
41 -  
42 /** 使用中间表的一对多关联 明细信息 */ 40 /** 使用中间表的一对多关联 明细信息 */
43 @OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 41 @OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
44 @JoinTable( 42 @JoinTable(
@@ -48,10 +46,16 @@ public class SchedulePlan { @@ -48,10 +46,16 @@ public class SchedulePlan {
48 ) 46 )
49 private List<SchedulePlanInfo> schedulePlanInfoList; 47 private List<SchedulePlanInfo> schedulePlanInfoList;
50 48
51 - // 创建日期 49 + /** 创建人 */
  50 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  51 + private SysUser createBy;
  52 + /** 修改人 */
  53 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  54 + private SysUser updateBy;
  55 + /** 创建日期 */
52 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 56 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
53 private Date createDate; 57 private Date createDate;
54 - // 修改日期 58 + /** 修改日期 */
55 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 59 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
56 private Date updateDate; 60 private Date updateDate;
57 61
@@ -79,6 +83,14 @@ public class SchedulePlan { @@ -79,6 +83,14 @@ public class SchedulePlan {
79 this.ttInfo = ttInfo; 83 this.ttInfo = ttInfo;
80 } 84 }
81 85
  86 + public ScheduleRule1 getScheduleRule1() {
  87 + return scheduleRule1;
  88 + }
  89 +
  90 + public void setScheduleRule1(ScheduleRule1 scheduleRule1) {
  91 + this.scheduleRule1 = scheduleRule1;
  92 + }
  93 +
82 public Date getScheduleFromTime() { 94 public Date getScheduleFromTime() {
83 return scheduleFromTime; 95 return scheduleFromTime;
84 } 96 }
@@ -95,12 +107,28 @@ public class SchedulePlan { @@ -95,12 +107,28 @@ public class SchedulePlan {
95 this.scheduleToTime = scheduleToTime; 107 this.scheduleToTime = scheduleToTime;
96 } 108 }
97 109
98 - public SysUser getUser() {  
99 - return user; 110 + public List<SchedulePlanInfo> getSchedulePlanInfoList() {
  111 + return schedulePlanInfoList;
100 } 112 }
101 113
102 - public void setUser(SysUser user) {  
103 - this.user = user; 114 + public void setSchedulePlanInfoList(List<SchedulePlanInfo> schedulePlanInfoList) {
  115 + this.schedulePlanInfoList = schedulePlanInfoList;
  116 + }
  117 +
  118 + public SysUser getCreateBy() {
  119 + return createBy;
  120 + }
  121 +
  122 + public void setCreateBy(SysUser createBy) {
  123 + this.createBy = createBy;
  124 + }
  125 +
  126 + public SysUser getUpdateBy() {
  127 + return updateBy;
  128 + }
  129 +
  130 + public void setUpdateBy(SysUser updateBy) {
  131 + this.updateBy = updateBy;
104 } 132 }
105 133
106 public Date getCreateDate() { 134 public Date getCreateDate() {
@@ -115,14 +143,6 @@ public class SchedulePlan { @@ -115,14 +143,6 @@ public class SchedulePlan {
115 return updateDate; 143 return updateDate;
116 } 144 }
117 145
118 - public ScheduleRule1 getScheduleRule1() {  
119 - return scheduleRule1;  
120 - }  
121 -  
122 - public void setScheduleRule1(ScheduleRule1 scheduleRule1) {  
123 - this.scheduleRule1 = scheduleRule1;  
124 - }  
125 -  
126 public void setUpdateDate(Date updateDate) { 146 public void setUpdateDate(Date updateDate) {
127 this.updateDate = updateDate; 147 this.updateDate = updateDate;
128 } 148 }
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
@@ -20,25 +20,47 @@ public class SchedulePlanInfo { @@ -20,25 +20,47 @@ public class SchedulePlanInfo {
20 private Long id; 20 private Long id;
21 21
22 /** 排班计划日期 */ 22 /** 排班计划日期 */
  23 + @Column(nullable = false)
23 private Date scheduleDate; 24 private Date scheduleDate;
24 25
25 - /** 路牌名称 */  
26 - private String lpName;  
27 - /** 线路编码 */  
28 - private String xlBm; 26 + /** 关联 bsth_c_line 主键,不做mapping */
  27 + @Column(nullable = false)
  28 + private Integer xl;
29 /** 线路名称 */ 29 /** 线路名称 */
  30 + @Column(nullable = false)
30 private String xlName; 31 private String xlName;
  32 + /** 线路编码 */
  33 + @Column(nullable = false)
  34 + private String xlBm;
  35 +
  36 + /** 关联 bsth_c_s_gbi 主键,不做mapping */
  37 + @Column(nullable = false)
  38 + private Long lp;
  39 + /** 路牌名称 */
  40 + @Column(nullable = false)
  41 + private String lpName;
  42 +
  43 + /** 关联 bsth_c_cars 主键,不做mapping */
  44 + @Column(nullable = false)
  45 + private Integer cl;
31 /** 车辆自编号 */ 46 /** 车辆自编号 */
  47 + @Column(nullable = false)
32 private String clZbh; 48 private String clZbh;
33 49
34 50
35 /** 报道1时间(格式 HH:mm) */ 51 /** 报道1时间(格式 HH:mm) */
36 private String bd1Time; 52 private String bd1Time;
37 /** 出场1时间(格式 HH:mm) */ 53 /** 出场1时间(格式 HH:mm) */
  54 + @Column(nullable = false)
38 private String cc1Time; 55 private String cc1Time;
  56 + /** 关联 bsth_c_personnel 主键,不做mapping */
  57 + @Column(nullable = false)
  58 + private Integer j1;
39 /** 驾驶员1工号 */ 59 /** 驾驶员1工号 */
  60 + @Column(nullable = false)
40 private String j1Gh; 61 private String j1Gh;
41 /** 驾驶员1名字 */ 62 /** 驾驶员1名字 */
  63 + @Column(nullable = false)
42 private String j1Name; 64 private String j1Name;
43 /** 售票员1工号 */ 65 /** 售票员1工号 */
44 private String s1Gh; 66 private String s1Gh;
@@ -58,32 +80,73 @@ public class SchedulePlanInfo { @@ -58,32 +80,73 @@ public class SchedulePlanInfo {
58 /** 售票员2名字 */ 80 /** 售票员2名字 */
59 private String s2Name; 81 private String s2Name;
60 82
61 - // 冗余的时刻明细信息  
62 - /** 线路方向 */ 83 + // 上面的暂时保留,之后删除
  84 + /** 报道时间(格式 HH:mm) */
  85 + @Column(nullable = false)
  86 + private String bdTime;
  87 + /** 出场时间(格式 HH:mm) */
  88 + @Column(nullable = false)
  89 + private String ccTime;
  90 + /** 驾驶员工号 */
  91 + @Column(nullable = false)
  92 + private String jGh;
  93 + /** 驾驶员名字 */
  94 + @Column(nullable = false)
  95 + private String jName;
  96 + /** 售票员2工号 */
  97 + private String sGh;
  98 + /** 售票员2名字 */
  99 + private String sName;
  100 +
  101 + // 冗余的时刻明细信息,不做mapping
  102 + /** 线路方向(TODO:上下行,上行,下行,这个以后用枚举还是字典再议,现在先用文字) */
  103 + @Column(nullable = false)
63 private String xlDir; 104 private String xlDir;
64 - /** 起点站名称 */  
65 - private String qdz;  
66 - /** 终点站名称 */  
67 - private String zdz; 105 + /** 起点站id,根据班次类型,会关联 bsth_c_station,或 bsth_c_car_park,不做mapping */
  106 + @Column(nullable = false)
  107 + private Integer qdz;
  108 + /** 起点站名字 */
  109 + @Column(nullable = false)
  110 + private String qdzName;
  111 + /** 终点站id,根据班次类型,会关联 bsth_c_station,或 bsth_c_car_park,不做mapping */
  112 + @Column(nullable = false)
  113 + private Integer zdz;
  114 + /** 终点站名字 */
  115 + @Column(nullable = false)
  116 + private String zdzName;
  117 +
68 /** 发车时间(格式 HH:mm) */ 118 /** 发车时间(格式 HH:mm) */
  119 + @Column(nullable = false)
69 private String fcsj; 120 private String fcsj;
70 /** 发车顺序号 */ 121 /** 发车顺序号 */
71 - private int fcno; 122 + @Column(nullable = false)
  123 + private Integer fcno;
72 /** 对应班次数 */ 124 /** 对应班次数 */
73 - private int bcs; 125 + @Column(nullable = false)
  126 + private Integer bcs;
74 /** 计划里程 */ 127 /** 计划里程 */
75 - private double jhlc; 128 + private Double jhlc;
76 /** 班次历时 */ 129 /** 班次历时 */
77 - private int bcsj;  
78 -  
79 - /** 操作人 */  
80 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)  
81 - private SysUser user;  
82 -  
83 - // 创建日期 130 + private Integer bcsj;
  131 +
  132 + /**
  133 + * 班次类型
  134 + * TODO:正常班次、出场、进场、加油、临加班次、区间班次、放空班次、放大站班次、两点间空驶
  135 + * TODO:这个以后用枚举还是字典再议,现在先用文字
  136 + */
  137 + @Column(nullable = false)
  138 + private String bcType;
  139 +
  140 + /** 创建人 */
  141 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  142 + private SysUser createBy;
  143 + /** 修改人 */
  144 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
  145 + private SysUser updateBy;
  146 + /** 创建日期 */
84 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 147 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
85 private Date createDate; 148 private Date createDate;
86 - // 修改日期 149 + /** 修改日期 */
87 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 150 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
88 private Date updateDate; 151 private Date updateDate;
89 152
@@ -103,12 +166,12 @@ public class SchedulePlanInfo { @@ -103,12 +166,12 @@ public class SchedulePlanInfo {
103 this.scheduleDate = scheduleDate; 166 this.scheduleDate = scheduleDate;
104 } 167 }
105 168
106 - public String getLpName() {  
107 - return lpName; 169 + public Integer getXl() {
  170 + return xl;
108 } 171 }
109 172
110 - public void setLpName(String lpName) {  
111 - this.lpName = lpName; 173 + public void setXl(Integer xl) {
  174 + this.xl = xl;
112 } 175 }
113 176
114 public String getXlName() { 177 public String getXlName() {
@@ -119,6 +182,38 @@ public class SchedulePlanInfo { @@ -119,6 +182,38 @@ public class SchedulePlanInfo {
119 this.xlName = xlName; 182 this.xlName = xlName;
120 } 183 }
121 184
  185 + public String getXlBm() {
  186 + return xlBm;
  187 + }
  188 +
  189 + public void setXlBm(String xlBm) {
  190 + this.xlBm = xlBm;
  191 + }
  192 +
  193 + public Long getLp() {
  194 + return lp;
  195 + }
  196 +
  197 + public void setLp(Long lp) {
  198 + this.lp = lp;
  199 + }
  200 +
  201 + public String getLpName() {
  202 + return lpName;
  203 + }
  204 +
  205 + public void setLpName(String lpName) {
  206 + this.lpName = lpName;
  207 + }
  208 +
  209 + public Integer getCl() {
  210 + return cl;
  211 + }
  212 +
  213 + public void setCl(Integer cl) {
  214 + this.cl = cl;
  215 + }
  216 +
122 public String getClZbh() { 217 public String getClZbh() {
123 return clZbh; 218 return clZbh;
124 } 219 }
@@ -127,6 +222,14 @@ public class SchedulePlanInfo { @@ -127,6 +222,14 @@ public class SchedulePlanInfo {
127 this.clZbh = clZbh; 222 this.clZbh = clZbh;
128 } 223 }
129 224
  225 + public String getBd1Time() {
  226 + return bd1Time;
  227 + }
  228 +
  229 + public void setBd1Time(String bd1Time) {
  230 + this.bd1Time = bd1Time;
  231 + }
  232 +
130 public String getCc1Time() { 233 public String getCc1Time() {
131 return cc1Time; 234 return cc1Time;
132 } 235 }
@@ -135,6 +238,14 @@ public class SchedulePlanInfo { @@ -135,6 +238,14 @@ public class SchedulePlanInfo {
135 this.cc1Time = cc1Time; 238 this.cc1Time = cc1Time;
136 } 239 }
137 240
  241 + public Integer getJ1() {
  242 + return j1;
  243 + }
  244 +
  245 + public void setJ1(Integer j1) {
  246 + this.j1 = j1;
  247 + }
  248 +
138 public String getJ1Gh() { 249 public String getJ1Gh() {
139 return j1Gh; 250 return j1Gh;
140 } 251 }
@@ -167,14 +278,6 @@ public class SchedulePlanInfo { @@ -167,14 +278,6 @@ public class SchedulePlanInfo {
167 this.s1Name = s1Name; 278 this.s1Name = s1Name;
168 } 279 }
169 280
170 - public String getBd1Time() {  
171 - return bd1Time;  
172 - }  
173 -  
174 - public void setBd1Time(String bd1Time) {  
175 - this.bd1Time = bd1Time;  
176 - }  
177 -  
178 public String getBd2Time() { 281 public String getBd2Time() {
179 return bd2Time; 282 return bd2Time;
180 } 283 }
@@ -231,22 +334,38 @@ public class SchedulePlanInfo { @@ -231,22 +334,38 @@ public class SchedulePlanInfo {
231 this.xlDir = xlDir; 334 this.xlDir = xlDir;
232 } 335 }
233 336
234 - public String getQdz() { 337 + public Integer getQdz() {
235 return qdz; 338 return qdz;
236 } 339 }
237 340
238 - public void setQdz(String qdz) { 341 + public void setQdz(Integer qdz) {
239 this.qdz = qdz; 342 this.qdz = qdz;
240 } 343 }
241 344
242 - public String getZdz() { 345 + public String getQdzName() {
  346 + return qdzName;
  347 + }
  348 +
  349 + public void setQdzName(String qdzName) {
  350 + this.qdzName = qdzName;
  351 + }
  352 +
  353 + public Integer getZdz() {
243 return zdz; 354 return zdz;
244 } 355 }
245 356
246 - public void setZdz(String zdz) { 357 + public void setZdz(Integer zdz) {
247 this.zdz = zdz; 358 this.zdz = zdz;
248 } 359 }
249 360
  361 + public String getZdzName() {
  362 + return zdzName;
  363 + }
  364 +
  365 + public void setZdzName(String zdzName) {
  366 + this.zdzName = zdzName;
  367 + }
  368 +
250 public String getFcsj() { 369 public String getFcsj() {
251 return fcsj; 370 return fcsj;
252 } 371 }
@@ -255,12 +374,60 @@ public class SchedulePlanInfo { @@ -255,12 +374,60 @@ public class SchedulePlanInfo {
255 this.fcsj = fcsj; 374 this.fcsj = fcsj;
256 } 375 }
257 376
258 - public SysUser getUser() {  
259 - return user; 377 + public Integer getFcno() {
  378 + return fcno;
  379 + }
  380 +
  381 + public void setFcno(Integer fcno) {
  382 + this.fcno = fcno;
  383 + }
  384 +
  385 + public Integer getBcs() {
  386 + return bcs;
  387 + }
  388 +
  389 + public void setBcs(Integer bcs) {
  390 + this.bcs = bcs;
  391 + }
  392 +
  393 + public Double getJhlc() {
  394 + return jhlc;
  395 + }
  396 +
  397 + public void setJhlc(Double jhlc) {
  398 + this.jhlc = jhlc;
  399 + }
  400 +
  401 + public Integer getBcsj() {
  402 + return bcsj;
  403 + }
  404 +
  405 + public void setBcsj(Integer bcsj) {
  406 + this.bcsj = bcsj;
  407 + }
  408 +
  409 + public String getBcType() {
  410 + return bcType;
  411 + }
  412 +
  413 + public void setBcType(String bcType) {
  414 + this.bcType = bcType;
260 } 415 }
261 416
262 - public void setUser(SysUser user) {  
263 - this.user = user; 417 + public SysUser getCreateBy() {
  418 + return createBy;
  419 + }
  420 +
  421 + public void setCreateBy(SysUser createBy) {
  422 + this.createBy = createBy;
  423 + }
  424 +
  425 + public SysUser getUpdateBy() {
  426 + return updateBy;
  427 + }
  428 +
  429 + public void setUpdateBy(SysUser updateBy) {
  430 + this.updateBy = updateBy;
264 } 431 }
265 432
266 public Date getCreateDate() { 433 public Date getCreateDate() {
@@ -279,43 +446,51 @@ public class SchedulePlanInfo { @@ -279,43 +446,51 @@ public class SchedulePlanInfo {
279 this.updateDate = updateDate; 446 this.updateDate = updateDate;
280 } 447 }
281 448
282 - public int getFcno() {  
283 - return fcno; 449 + public String getBdTime() {
  450 + return bdTime;
284 } 451 }
285 452
286 - public void setFcno(int fcno) {  
287 - this.fcno = fcno; 453 + public void setBdTime(String bdTime) {
  454 + this.bdTime = bdTime;
288 } 455 }
289 456
290 - public int getBcs() {  
291 - return bcs; 457 + public String getCcTime() {
  458 + return ccTime;
292 } 459 }
293 460
294 - public void setBcs(int bcs) {  
295 - this.bcs = bcs; 461 + public void setCcTime(String ccTime) {
  462 + this.ccTime = ccTime;
296 } 463 }
297 464
298 - public double getJhlc() {  
299 - return jhlc; 465 + public String getjGh() {
  466 + return jGh;
300 } 467 }
301 468
302 - public void setJhlc(double jhlc) {  
303 - this.jhlc = jhlc; 469 + public void setjGh(String jGh) {
  470 + this.jGh = jGh;
304 } 471 }
305 472
306 - public int getBcsj() {  
307 - return bcsj; 473 + public String getjName() {
  474 + return jName;
308 } 475 }
309 476
310 - public void setBcsj(int bcsj) {  
311 - this.bcsj = bcsj; 477 + public void setjName(String jName) {
  478 + this.jName = jName;
312 } 479 }
313 480
314 - public String getXlBm() {  
315 - return xlBm; 481 + public String getsGh() {
  482 + return sGh;
316 } 483 }
317 484
318 - public void setXlBm(String xlBm) {  
319 - this.xlBm = xlBm; 485 + public void setsGh(String sGh) {
  486 + this.sGh = sGh;
  487 + }
  488 +
  489 + public String getsName() {
  490 + return sName;
  491 + }
  492 +
  493 + public void setsName(String sName) {
  494 + this.sName = sName;
320 } 495 }
321 } 496 }
src/main/java/com/bsth/entity/schedule/TTInfoDetail.java
@@ -66,6 +66,9 @@ public class TTInfoDetail { @@ -66,6 +66,9 @@ public class TTInfoDetail {
66 @Column(nullable = false) 66 @Column(nullable = false)
67 private String bcType; 67 private String bcType;
68 68
  69 + /** 是否分班(表示这个班次是否是晚班班次,就是换另外一个驾驶员开)*/
  70 + private Boolean isFB;
  71 +
69 /** 是否切换线路 */ 72 /** 是否切换线路 */
70 private Boolean isSwitchXl; 73 private Boolean isSwitchXl;
71 /** 切换的线路(isSwitchXl == true) */ 74 /** 切换的线路(isSwitchXl == true) */
@@ -265,4 +268,12 @@ public class TTInfoDetail { @@ -265,4 +268,12 @@ public class TTInfoDetail {
265 public void setTcc(CarPark tcc) { 268 public void setTcc(CarPark tcc) {
266 this.tcc = tcc; 269 this.tcc = tcc;
267 } 270 }
  271 +
  272 + public Boolean getIsFB() {
  273 + return isFB;
  274 + }
  275 +
  276 + public void setIsFB(Boolean isFB) {
  277 + this.isFB = isFB;
  278 + }
268 } 279 }
src/main/java/com/bsth/repository/schedule/SchedulePlanInfoRepository.java 0 → 100644
  1 +package com.bsth.repository.schedule;
  2 +
  3 +import com.bsth.entity.schedule.SchedulePlanInfo;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + * Created by xu on 16/6/6.
  9 + */
  10 +@Repository
  11 +public interface SchedulePlanInfoRepository extends BaseRepository<SchedulePlanInfo, Long> {
  12 +}