Commit 85b1c2b70ff1dba5c117a81d5eafe03b1f4c7315

Authored by 潘钊
1 parent 9932f6db

字典update

src/main/java/com/bsth/entity/realcontrol/ChildTaskPlan.java
1 1 package com.bsth.entity.realcontrol;
2 2  
  3 +import javax.persistence.ManyToOne;
  4 +
3 5 /**
4 6 *
5   - * @ClassName: ChildTaskPlan
6   - * @Description: TODO(子任务计划)
  7 + * @ClassName: ChildTaskPlan
  8 + * @Description: TODO(子任务计划)
7 9 * @author PanZhao
8   - * @date 2016年6月20日 上午11:22:22
  10 + * @date 2016年6月20日 上午11:22:22
9 11 *
10 12 */
11 13 public class ChildTaskPlan {
12   -
  14 +
13 15 private Long id;
14   -
  16 +
15 17 /**
16   - * 开始时间
17   - * HH:mm
  18 + * 开始时间 HH:mm
18 19 */
19 20 private String startTimeStr;
20   -
  21 +
21 22 /**
22   - * 结束时间
23   - * HH:mm
  23 + * 结束时间 HH:mm
24 24 */
25 25 private String endTimeStr;
  26 +
  27 + /**
  28 + * 任务类型
  29 + */
  30 + private String type;
  31 +
  32 + /**
  33 + * 起点站名
  34 + */
  35 + private String startStation;
  36 +
  37 + /**
  38 + * 终点站名
  39 + */
  40 + private String endStation;
  41 +
  42 + /**
  43 + * 里程类型
  44 + */
  45 + private String mileageType;
  46 +
  47 + /**
  48 + * 里程
  49 + */
  50 + private Float mileage;
  51 +
  52 + /**
  53 + * 备注
  54 + */
  55 + private String remarks;
26 56  
  57 + /**
  58 + * 主任务
  59 + */
  60 + @ManyToOne
  61 + private ScheduleRealInfo schedul;
  62 +
  63 + public Long getId() {
  64 + return id;
  65 + }
  66 +
  67 + public void setId(Long id) {
  68 + this.id = id;
  69 + }
  70 +
  71 + public String getStartTimeStr() {
  72 + return startTimeStr;
  73 + }
  74 +
  75 + public void setStartTimeStr(String startTimeStr) {
  76 + this.startTimeStr = startTimeStr;
  77 + }
  78 +
  79 + public String getEndTimeStr() {
  80 + return endTimeStr;
  81 + }
  82 +
  83 + public void setEndTimeStr(String endTimeStr) {
  84 + this.endTimeStr = endTimeStr;
  85 + }
  86 +
  87 + public String getType() {
  88 + return type;
  89 + }
  90 +
  91 + public void setType(String type) {
  92 + this.type = type;
  93 + }
  94 +
  95 + public String getStartStation() {
  96 + return startStation;
  97 + }
  98 +
  99 + public void setStartStation(String startStation) {
  100 + this.startStation = startStation;
  101 + }
  102 +
  103 + public String getEndStation() {
  104 + return endStation;
  105 + }
  106 +
  107 + public void setEndStation(String endStation) {
  108 + this.endStation = endStation;
  109 + }
  110 +
  111 + public String getMileageType() {
  112 + return mileageType;
  113 + }
  114 +
  115 + public void setMileageType(String mileageType) {
  116 + this.mileageType = mileageType;
  117 + }
  118 +
  119 + public Float getMileage() {
  120 + return mileage;
  121 + }
  122 +
  123 + public void setMileage(Float mileage) {
  124 + this.mileage = mileage;
  125 + }
  126 +
  127 + public String getRemarks() {
  128 + return remarks;
  129 + }
  130 +
  131 + public void setRemarks(String remarks) {
  132 + this.remarks = remarks;
  133 + }
  134 +
  135 + public ScheduleRealInfo getSchedul() {
  136 + return schedul;
  137 + }
  138 +
  139 + public void setSchedul(ScheduleRealInfo schedul) {
  140 + this.schedul = schedul;
  141 + }
27 142 }
... ...
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
... ... @@ -51,7 +51,7 @@ public class ScheduleRealInfo {
51 51 /** 售票员名字 */
52 52 private String sName;
53 53  
54   - /** 线路方向(TODO:上下行,上行,下行,这个以后用枚举还是字典再议,现在先用文字) */
  54 + /** 线路方向 */
55 55 private String xlDir;
56 56 /** 起点站id,根据班次类型,会关联 bsth_c_station,或 bsth_c_car_park,不做mapping */
57 57 private Integer qdz;
... ... @@ -75,7 +75,6 @@ public class ScheduleRealInfo {
75 75  
76 76 /**
77 77 * 班次类型 TODO:正常班次、出场、进场、加油、临加班次、区间班次、放空班次、放大站班次、两点间空驶
78   - * TODO:这个以后用枚举还是字典再议,现在先用文字
79 78 */
80 79 private String bcType;
81 80  
... ...
src/main/java/com/bsth/entity/sys/Dictionary.java
... ... @@ -8,11 +8,9 @@ import javax.persistence.GeneratedValue;
8 8 import javax.persistence.GenerationType;
9 9 import javax.persistence.Id;
10 10 import javax.persistence.Table;
11   -import javax.persistence.UniqueConstraint;
12 11  
13 12 @Entity
14   -@Table(name = "bsth_c_sys_dictionary",
15   -uniqueConstraints = { @UniqueConstraint(columnNames = {"dCode"}) })
  13 +@Table(name = "bsth_c_sys_dictionary")
16 14 public class Dictionary {
17 15  
18 16 @Id
... ...
src/main/resources/static/pages/control/line/child_pages/child_task.html
... ... @@ -184,11 +184,11 @@
184 184 </div>
185 185 <div class="col-md-4">
186 186 <span class="custom-label">开始时间: </span>
187   - <input class="form-control" data-cell="1" type="time">
  187 + <input class="form-control" data-cell="1" type="time" disabled>
188 188 </div>
189 189 <div class="col-md-4">
190 190 <span class="custom-label">结束时间:</span>
191   - <input class="form-control" data-cell="2" type="time">
  191 + <input class="form-control" data-cell="2" type="time" disabled>
192 192 </div>
193 193 </div>
194 194  
... ... @@ -371,7 +371,7 @@ $(function(){
371 371 scrollTop: $tr.offset().top - cont.offset().top + $tr.scrollTop() - 36 * 4
372 372 }, 500);
373 373  
374   - }, 300);
  374 + }, 100);
375 375 });
376 376 });
377 377 lpSelect.on('change', refreshMainList);
... ...
src/main/resources/static/pages/control/line/js/alone.js
... ... @@ -3,9 +3,8 @@
3 3 */
4 4  
5 5 var _alone = (function(){
6   - //暂时用文字判断上下行
7   - var upCode = '上行'
8   - ,downCode = '下行';
  6 + var upCode = 0
  7 + ,downCode = 1;
9 8  
10 9 var aloneObject = {
11 10 init: function(cb){
... ...
src/main/resources/static/pages/control/line/js/rightMenu.js
... ... @@ -52,6 +52,7 @@ var _menu = (function() {
52 52 shift: 5,
53 53 title: '待发调整',
54 54 success: function(){
  55 + dictionaryUtils.transformDom($('#outgoAdjustForm .nt-dictionary'));
55 56 $('#outgoAdjustForm button.confirm').one('click', function(){
56 57 var params = $('#outgoAdjustForm').serializeJSON();
57 58 $post('/realSchedule/outgoAdjust', params, function(rs){
... ...
src/main/resources/static/pages/control/line/temps/alone_tp.html
... ... @@ -225,23 +225,17 @@
225 225 <div class="form-custom-row">
226 226 <div class="item">
227 227 <span class="item-label" style="width: 80px;">班次类型:</span>
228   - <select class="form-control" disabled>
229   - <option value="{{bcType}}" name="bcType">{{bcType}}</option>
230   - </select>
  228 + <input class="form-control nt-dictionary" disabled data-code={{bcType}} data-group=ScheduleType>
231 229 </div>
232 230 </div>
233 231 <div class="form-custom-row">
234 232 <div class="item">
235 233 <span class="item-label" style="width: 80px;">从: </span>
236   - <select class="form-control" disabled>
237   - <option value="{{qdzName}}" name="qdzName">{{qdzName}}</option>
238   - </select>
  234 + <input class="form-control" value="{{qdzName}}" name="qdzName" disabled>
239 235 </div>
240 236 <div class="item">
241 237 <span class="item-label" style="width: 60px;text-align: center">到: </span>
242   - <select class="form-control" disabled>
243   - <option value="{{zdzName}}" name="zdzName">{{zdzName}}</option>
244   - </select>
  238 + <input class="form-control" value="{{zdzName}}" name="qdzName" disabled>
245 239 </div>
246 240 </div>
247 241  
... ...
src/main/resources/static/pages/permission/dictionary/add.html
... ... @@ -126,23 +126,16 @@ $(function(){
126 126 submitHandler : function(f) {
127 127 var params = form.serializeJSON();
128 128 error.hide();
129   -
130 129 //查询代码的顺延号
131   - $get('/dictionary/all', {dCode_prefixLike: params.dCode},function(dicts){
  130 + $get('/dictionary/all', {dCode_eq: params.dCode, dGroup_eq: params.dGroup},function(dicts){
132 131 var suff = '', len = dicts.length;
133 132 if(len > 0){
134   - var oldCode = params.dCode;
135   - params.dCode += '' + len;
136   - params.dName += '' + len;
137   -
138   - layer.confirm('代码【'+oldCode+'%】已存在!自动顺延为如下:<br>代码:'+params.dCode+'<br>名称:'+params.dName+'', {
139   - btn : [ '确认提示并提交', '取消' ]
140   - }, submit);
  133 + alert('代码['+ params.dCode +']已存在');
141 134 }
142 135 else{
143 136 submit();
144 137 }
145   - });
  138 + });
146 139  
147 140  
148 141 function submit(){
... ...