Commit 85b1c2b70ff1dba5c117a81d5eafe03b1f4c7315

Authored by 潘钊
1 parent 9932f6db

字典update

src/main/java/com/bsth/entity/realcontrol/ChildTaskPlan.java
1 package com.bsth.entity.realcontrol; 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 * @author PanZhao 9 * @author PanZhao
8 - * @date 2016年6月20日 上午11:22:22 10 + * @date 2016年6月20日 上午11:22:22
9 * 11 *
10 */ 12 */
11 public class ChildTaskPlan { 13 public class ChildTaskPlan {
12 - 14 +
13 private Long id; 15 private Long id;
14 - 16 +
15 /** 17 /**
16 - * 开始时间  
17 - * HH:mm 18 + * 开始时间 HH:mm
18 */ 19 */
19 private String startTimeStr; 20 private String startTimeStr;
20 - 21 +
21 /** 22 /**
22 - * 结束时间  
23 - * HH:mm 23 + * 结束时间 HH:mm
24 */ 24 */
25 private String endTimeStr; 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,7 +51,7 @@ public class ScheduleRealInfo {
51 /** 售票员名字 */ 51 /** 售票员名字 */
52 private String sName; 52 private String sName;
53 53
54 - /** 线路方向(TODO:上下行,上行,下行,这个以后用枚举还是字典再议,现在先用文字) */ 54 + /** 线路方向 */
55 private String xlDir; 55 private String xlDir;
56 /** 起点站id,根据班次类型,会关联 bsth_c_station,或 bsth_c_car_park,不做mapping */ 56 /** 起点站id,根据班次类型,会关联 bsth_c_station,或 bsth_c_car_park,不做mapping */
57 private Integer qdz; 57 private Integer qdz;
@@ -75,7 +75,6 @@ public class ScheduleRealInfo { @@ -75,7 +75,6 @@ public class ScheduleRealInfo {
75 75
76 /** 76 /**
77 * 班次类型 TODO:正常班次、出场、进场、加油、临加班次、区间班次、放空班次、放大站班次、两点间空驶 77 * 班次类型 TODO:正常班次、出场、进场、加油、临加班次、区间班次、放空班次、放大站班次、两点间空驶
78 - * TODO:这个以后用枚举还是字典再议,现在先用文字  
79 */ 78 */
80 private String bcType; 79 private String bcType;
81 80
src/main/java/com/bsth/entity/sys/Dictionary.java
@@ -8,11 +8,9 @@ import javax.persistence.GeneratedValue; @@ -8,11 +8,9 @@ import javax.persistence.GeneratedValue;
8 import javax.persistence.GenerationType; 8 import javax.persistence.GenerationType;
9 import javax.persistence.Id; 9 import javax.persistence.Id;
10 import javax.persistence.Table; 10 import javax.persistence.Table;
11 -import javax.persistence.UniqueConstraint;  
12 11
13 @Entity 12 @Entity
14 -@Table(name = "bsth_c_sys_dictionary",  
15 -uniqueConstraints = { @UniqueConstraint(columnNames = {"dCode"}) }) 13 +@Table(name = "bsth_c_sys_dictionary")
16 public class Dictionary { 14 public class Dictionary {
17 15
18 @Id 16 @Id
src/main/resources/static/pages/control/line/child_pages/child_task.html
@@ -184,11 +184,11 @@ @@ -184,11 +184,11 @@
184 </div> 184 </div>
185 <div class="col-md-4"> 185 <div class="col-md-4">
186 <span class="custom-label">开始时间: </span> 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 </div> 188 </div>
189 <div class="col-md-4"> 189 <div class="col-md-4">
190 <span class="custom-label">结束时间:</span> 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 </div> 192 </div>
193 </div> 193 </div>
194 194
@@ -371,7 +371,7 @@ $(function(){ @@ -371,7 +371,7 @@ $(function(){
371 scrollTop: $tr.offset().top - cont.offset().top + $tr.scrollTop() - 36 * 4 371 scrollTop: $tr.offset().top - cont.offset().top + $tr.scrollTop() - 36 * 4
372 }, 500); 372 }, 500);
373 373
374 - }, 300); 374 + }, 100);
375 }); 375 });
376 }); 376 });
377 lpSelect.on('change', refreshMainList); 377 lpSelect.on('change', refreshMainList);
src/main/resources/static/pages/control/line/js/alone.js
@@ -3,9 +3,8 @@ @@ -3,9 +3,8 @@
3 */ 3 */
4 4
5 var _alone = (function(){ 5 var _alone = (function(){
6 - //暂时用文字判断上下行  
7 - var upCode = '上行'  
8 - ,downCode = '下行'; 6 + var upCode = 0
  7 + ,downCode = 1;
9 8
10 var aloneObject = { 9 var aloneObject = {
11 init: function(cb){ 10 init: function(cb){
src/main/resources/static/pages/control/line/js/rightMenu.js
@@ -52,6 +52,7 @@ var _menu = (function() { @@ -52,6 +52,7 @@ var _menu = (function() {
52 shift: 5, 52 shift: 5,
53 title: '待发调整', 53 title: '待发调整',
54 success: function(){ 54 success: function(){
  55 + dictionaryUtils.transformDom($('#outgoAdjustForm .nt-dictionary'));
55 $('#outgoAdjustForm button.confirm').one('click', function(){ 56 $('#outgoAdjustForm button.confirm').one('click', function(){
56 var params = $('#outgoAdjustForm').serializeJSON(); 57 var params = $('#outgoAdjustForm').serializeJSON();
57 $post('/realSchedule/outgoAdjust', params, function(rs){ 58 $post('/realSchedule/outgoAdjust', params, function(rs){
src/main/resources/static/pages/control/line/temps/alone_tp.html
@@ -225,23 +225,17 @@ @@ -225,23 +225,17 @@
225 <div class="form-custom-row"> 225 <div class="form-custom-row">
226 <div class="item"> 226 <div class="item">
227 <span class="item-label" style="width: 80px;">班次类型:</span> 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 </div> 229 </div>
232 </div> 230 </div>
233 <div class="form-custom-row"> 231 <div class="form-custom-row">
234 <div class="item"> 232 <div class="item">
235 <span class="item-label" style="width: 80px;">从: </span> 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 </div> 235 </div>
240 <div class="item"> 236 <div class="item">
241 <span class="item-label" style="width: 60px;text-align: center">到: </span> 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 </div> 239 </div>
246 </div> 240 </div>
247 241
src/main/resources/static/pages/permission/dictionary/add.html
@@ -126,23 +126,16 @@ $(function(){ @@ -126,23 +126,16 @@ $(function(){
126 submitHandler : function(f) { 126 submitHandler : function(f) {
127 var params = form.serializeJSON(); 127 var params = form.serializeJSON();
128 error.hide(); 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 var suff = '', len = dicts.length; 131 var suff = '', len = dicts.length;
133 if(len > 0){ 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 else{ 135 else{
143 submit(); 136 submit();
144 } 137 }
145 - }); 138 + });
146 139
147 140
148 function submit(){ 141 function submit(){