Commit 7886a0e23a0f528fcc569cd49926672fb619ce0c

Authored by 徐烜
1 parent 7a047c1a

update

src/main/java/com/bsth/entity/Cars.java
@@ -29,7 +29,7 @@ public class Cars { @@ -29,7 +29,7 @@ public class Cars {
29 private Integer id; 29 private Integer id;
30 30
31 /** 自编号/内部编号 */ 31 /** 自编号/内部编号 */
32 - @Column(nullable = false, length = 8) 32 + @Column(nullable = false, length = 8, unique = true)
33 private String insideCode; 33 private String insideCode;
34 34
35 // 公司、分公司暂时不用关联实体 35 // 公司、分公司暂时不用关联实体
@@ -140,11 +140,11 @@ public class Cars { @@ -140,11 +140,11 @@ public class Cars {
140 @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) 140 @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
141 private SysUser updateBy; 141 private SysUser updateBy;
142 142
143 - // 创建日期 143 + /** 创建日期 */
144 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 144 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
145 private Date createDate; 145 private Date createDate;
146 146
147 - // 修改日期 147 + /** 修改日期 */
148 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 148 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
149 private Date updateDate; 149 private Date updateDate;
150 150
src/main/java/com/bsth/entity/schedule/CarConfigInfo.java
@@ -2,6 +2,7 @@ package com.bsth.entity.schedule; @@ -2,6 +2,7 @@ package com.bsth.entity.schedule;
2 2
3 import com.bsth.entity.Cars; 3 import com.bsth.entity.Cars;
4 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
  5 +import com.bsth.entity.sys.SysUser;
5 6
6 import javax.persistence.*; 7 import javax.persistence.*;
7 import java.util.Date; 8 import java.util.Date;
@@ -18,8 +19,6 @@ public class CarConfigInfo { @@ -18,8 +19,6 @@ public class CarConfigInfo {
18 @GeneratedValue 19 @GeneratedValue
19 private Long id; 20 private Long id;
20 21
21 - /** TODO:等其他实体类完整后,做关联引用 */  
22 -  
23 /** 线路关联 */ 22 /** 线路关联 */
24 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 23 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
25 private Line xl; 24 private Line xl;
@@ -36,18 +35,28 @@ public class CarConfigInfo { @@ -36,18 +35,28 @@ public class CarConfigInfo {
36 private String mbsj; 35 private String mbsj;
37 36
38 /** 启用日期 */ 37 /** 启用日期 */
  38 + @Column(nullable = false)
39 private Date qyrq; 39 private Date qyrq;
40 /** 终止日期 */ 40 /** 终止日期 */
41 private Date zzrq; 41 private Date zzrq;
42 - /** 停车点(TODO:这个不知道是否要关联)( */ 42 + @Column(nullable = false)
  43 + /** 停车点(TODO:这个不知道是否要关联)*/
43 private String tcd; 44 private String tcd;
44 - /** 受否切换(TODO:不懂) */ 45 + /** 受否切换 0或者1(TODO:不懂,貌似喝历史配车有关) */
  46 + @Column(nullable = false)
45 private int isSwitch; 47 private int isSwitch;
46 48
47 - // 创建日期 49 + /** 创建人 */
  50 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  51 + private SysUser createBy;
  52 + /** 修改人 */
  53 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  54 + private SysUser updateBy;
  55 +
  56 + /** 创建日期 */
48 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 57 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
49 private Date createDate; 58 private Date createDate;
50 - // 修改日期 59 + /** 修改日期 */
51 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 60 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
52 private Date updateDate; 61 private Date updateDate;
53 62
@@ -75,6 +84,22 @@ public class CarConfigInfo { @@ -75,6 +84,22 @@ public class CarConfigInfo {
75 this.cl = cl; 84 this.cl = cl;
76 } 85 }
77 86
  87 + public String getZbsj() {
  88 + return zbsj;
  89 + }
  90 +
  91 + public void setZbsj(String zbsj) {
  92 + this.zbsj = zbsj;
  93 + }
  94 +
  95 + public String getMbsj() {
  96 + return mbsj;
  97 + }
  98 +
  99 + public void setMbsj(String mbsj) {
  100 + this.mbsj = mbsj;
  101 + }
  102 +
78 public Date getQyrq() { 103 public Date getQyrq() {
79 return qyrq; 104 return qyrq;
80 } 105 }
@@ -107,32 +132,32 @@ public class CarConfigInfo { @@ -107,32 +132,32 @@ public class CarConfigInfo {
107 this.isSwitch = isSwitch; 132 this.isSwitch = isSwitch;
108 } 133 }
109 134
110 - public Date getCreateDate() {  
111 - return createDate; 135 + public SysUser getCreateBy() {
  136 + return createBy;
112 } 137 }
113 138
114 - public void setCreateDate(Date createDate) {  
115 - this.createDate = createDate; 139 + public void setCreateBy(SysUser createBy) {
  140 + this.createBy = createBy;
116 } 141 }
117 142
118 - public Date getUpdateDate() {  
119 - return updateDate; 143 + public SysUser getUpdateBy() {
  144 + return updateBy;
120 } 145 }
121 146
122 - public String getZbsj() {  
123 - return zbsj; 147 + public void setUpdateBy(SysUser updateBy) {
  148 + this.updateBy = updateBy;
124 } 149 }
125 150
126 - public void setZbsj(String zbsj) {  
127 - this.zbsj = zbsj; 151 + public Date getCreateDate() {
  152 + return createDate;
128 } 153 }
129 154
130 - public String getMbsj() {  
131 - return mbsj; 155 + public void setCreateDate(Date createDate) {
  156 + this.createDate = createDate;
132 } 157 }
133 158
134 - public void setMbsj(String mbsj) {  
135 - this.mbsj = mbsj; 159 + public Date getUpdateDate() {
  160 + return updateDate;
136 } 161 }
137 162
138 public void setUpdateDate(Date updateDate) { 163 public void setUpdateDate(Date updateDate) {
src/main/java/com/bsth/entity/schedule/EmployeeConfigInfo.java
@@ -3,6 +3,7 @@ package com.bsth.entity.schedule; @@ -3,6 +3,7 @@ package com.bsth.entity.schedule;
3 import com.bsth.entity.Cars; 3 import com.bsth.entity.Cars;
4 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
5 import com.bsth.entity.Personnel; 5 import com.bsth.entity.Personnel;
  6 +import com.bsth.entity.sys.SysUser;
6 7
7 import javax.persistence.*; 8 import javax.persistence.*;
8 import java.util.Date; 9 import java.util.Date;
@@ -23,22 +24,29 @@ public class EmployeeConfigInfo { @@ -23,22 +24,29 @@ public class EmployeeConfigInfo {
23 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 24 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
24 private Line xl; 25 private Line xl;
25 /** 车辆关联 */ 26 /** 车辆关联 */
26 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 27 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
27 private Cars cl; 28 private Cars cl;
28 /** 人员关联(驾驶员) */ 29 /** 人员关联(驾驶员) */
29 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 30 @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
30 private Personnel jsy; 31 private Personnel jsy;
31 /** 人员关联(售票员) */ 32 /** 人员关联(售票员) */
32 - @ManyToOne(optional = false, cascade = CascadeType.PERSIST, fetch = FetchType.LAZY) 33 + @ManyToOne(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
33 private Personnel spy; 34 private Personnel spy;
34 35
35 - /** 搭班编码(TODO:不懂) */ 36 + /** 搭班编码(TODO:估计是售票员和驾驶员搭配时使用) */
36 private String dbbm; 37 private String dbbm;
37 38
38 - // 创建日期 39 + /** 创建人 */
  40 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  41 + private SysUser createBy;
  42 + /** 修改人 */
  43 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  44 + private SysUser updateBy;
  45 +
  46 + /** 创建日期 */
39 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") 47 @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
40 private Date createDate; 48 private Date createDate;
41 - // 修改日期 49 + /** 修改日期 */
42 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 50 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
43 private Date updateDate; 51 private Date updateDate;
44 52