Commit f695c7ec43ceca832cef74442924809ffdc7baa5

Authored by 徐烜
1 parent 0fe9738c

Update

src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
... ... @@ -281,7 +281,8 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im
281 281 Sheet sheet = book.getSheet(0);
282 282  
283 283 // 2-2、处理数据
284   - int all_bc = 0; // 总班次
  284 + int all_bc_ks = 0; // 总空驶班次
  285 + int all_bc_yy = 0; // 总营运班次
285 286 double all_lc_ks = 0; // 总空驶里程
286 287 double all_lc_yy = 0; // 总营运里程
287 288  
... ... @@ -330,14 +331,14 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im
330 331 bc_ks += 1;
331 332 lc_ks += Double.valueOf(jhlc);
332 333  
333   - all_bc += 1;
  334 + all_bc_ks += 1;
334 335 all_lc_ks += Double.valueOf(jhlc);
335 336  
336 337 } else {
337 338 bc_yy += 1;
338 339 lc_yy += Double.valueOf(jhlc);
339 340  
340   - all_bc += 1;
  341 + all_bc_yy += 1;
341 342 all_lc_yy += Double.valueOf(jhlc);
342 343 }
343 344 }
... ... @@ -359,7 +360,7 @@ public class TTInfoDetailServiceImpl extends BServiceImpl<TTInfoDetail, Long> im
359 360 }
360 361 editInfo.getHeader().addAll(Arrays.asList(headarrays));
361 362  
362   - editInfo.setYy_desc(String.format("班次=%d,空驶里程=%.2f,营运里程=%.2f", all_bc, all_lc_ks, all_lc_yy));
  363 + editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.2f,营运里程=%.2f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy));
363 364 }
364 365  
365 366 LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//");
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-mulselect.html
... ... @@ -42,7 +42,7 @@
42 42 <div class="form-group has-success has-feedback">
43 43 <label class="col-md-2 control-label">方向:</label>
44 44 <div class="col-md-3">
45   - <sa-Radiogroup model="ctrl.xldir" dicgroup="LineTrend" name="xlDir"></sa-Radiogroup>
  45 + <sa-Radiogroup model="ctrl.xldir" dicgroup="LineTrend2" name="xlDir"></sa-Radiogroup>
46 46 </div>
47 47 </div>
48 48  
... ... @@ -54,6 +54,7 @@
54 54 ng-pattern="ctrl.time_regex"
55 55 />
56 56 </div>
  57 + <span>00:00</span>
57 58 <!-- 隐藏块,显示验证信息 -->
58 59 <div class="alert alert-danger well-sm" ng-show="myForm.starttime.$error.pattern">
59 60 时间格式错误,应该是格式hh:mm,如:06:39
... ... @@ -68,11 +69,18 @@
68 69 ng-pattern="ctrl.time_regex"
69 70 />
70 71 </div>
  72 + <span>00:00</span>
71 73 <!-- 隐藏块,显示验证信息 -->
72 74 <div class="alert alert-danger well-sm" ng-show="myForm.endtime.$error.pattern">
73 75 时间格式错误,应该是格式hh:mm,如:06:39
74 76 </div>
75 77 </div>
  78 + <div class="form-group has-success has-feedback">
  79 + <label class="col-md-2 control-label">是否包含进出场:</label>
  80 + <div class="col-md-3">
  81 + <sa-Radiogroup model="ctrl.isInOut" dicgroup="truefalseType" name="isInOut"></sa-Radiogroup>
  82 + </div>
  83 + </div>
76 84  
77 85 </div>
78 86  
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
... ... @@ -75,7 +75,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
75 75 }
76 76 }
77 77 };
78   - editInfo.detailInfos[i][j].where = function(xldir, startTime_h_m, endTime_h_m) { // where方法
  78 + editInfo.detailInfos[i][j].where = function(xldir, startTime_h_m, endTime_h_m, isInOut) { // where方法
79 79 var fcsj_m_h = [];
80 80 fcsj_m_h[0] = parseInt(this.fcsj.split(":")[0]);
81 81 fcsj_m_h[1] = parseInt(this.fcsj.split(":")[1]);
... ... @@ -87,7 +87,39 @@ angular.module(&#39;ScheduleApp&#39;).factory(
87 87 var s_temp_date = new Date(2000, 1, 1);
88 88 var e_temp_date = new Date(2000, 1, 1);
89 89  
90   - if (xldir) {
  90 + if (xldir == 2) { // 上下行
  91 + // 判定是否要进出场班次
  92 + if (isInOut == false && (this.bc_type == "in" || this.bc_type == "out")) {
  93 + return false;
  94 + }
  95 +
  96 + if (startTime_h_m) {
  97 + if (endTime_h_m) {
  98 + s_temp_date.setHours(startTime_h_m[0]);
  99 + s_temp_date.setMinutes(startTime_h_m[1]);
  100 + e_temp_date.setHours(endTime_h_m[0]);
  101 + e_temp_date.setMinutes(endTime_h_m[1]);
  102 + return fcsj >= s_temp_date && fcsj <= e_temp_date;
  103 + } else {
  104 + s_temp_date.setHours(startTime_h_m[0]);
  105 + s_temp_date.setMinutes(startTime_h_m[1]);
  106 + return fcsj >= s_temp_date;
  107 + }
  108 + } else {
  109 + if (endTime_h_m) {
  110 + e_temp_date.setHours(endTime_h_m[0]);
  111 + e_temp_date.setMinutes(endTime_h_m[1]);
  112 + return fcsj <= e_temp_date;
  113 + } else {
  114 + return false;
  115 + }
  116 + }
  117 + } else {
  118 + // 判定是否要进出场班次
  119 + if (isInOut == false && (this.bc_type == "in" || this.bc_type == "out")) {
  120 + return false;
  121 + }
  122 +
91 123 if (xldir == this.xldir) {
92 124 if (startTime_h_m) {
93 125 if (endTime_h_m) {
... ... @@ -113,28 +145,6 @@ angular.module(&#39;ScheduleApp&#39;).factory(
113 145 } else {
114 146 return false;
115 147 }
116   - } else {
117   - if (startTime_h_m) {
118   - if (endTime_h_m) {
119   - s_temp_date.setHours(startTime_h_m[0]);
120   - s_temp_date.setMinutes(startTime_h_m[1]);
121   - e_temp_date.setHours(endTime_h_m[0]);
122   - e_temp_date.setMinutes(endTime_h_m[1]);
123   - return fcsj >= s_temp_date && fcsj <= e_temp_date;
124   - } else {
125   - s_temp_date.setHours(startTime_h_m[0]);
126   - s_temp_date.setMinutes(startTime_h_m[1]);
127   - return fcsj >= s_temp_date;
128   - }
129   - } else {
130   - if (endTime_h_m) {
131   - e_temp_date.setHours(endTime_h_m[0]);
132   - e_temp_date.setMinutes(endTime_h_m[1]);
133   - return fcsj <= e_temp_date;
134   - } else {
135   - return false;
136   - }
137   - }
138 148 }
139 149  
140 150 };
... ... @@ -657,9 +667,10 @@ angular.module(&#39;ScheduleApp&#39;).controller(
657 667  
658 668 self.title1 = self.xlname + "(" + self.ttname + ")" + "时刻表明细信息";
659 669  
660   - self.xldir = undefined; // 线路上下行
  670 + self.xldir = 2; // 线路上下行
661 671 self.starttime = undefined; // 开始时间
662 672 self.endtime = undefined; // 结束时间
  673 + self.isInOut = false; // 不包含进出场
663 674  
664 675 // 时间正则表达式(格式hh:mm,如:06:39)
665 676 self.time_regex = /^([01]?[0-9]|2[0-3]):[0-5][0-9]$/;
... ... @@ -692,7 +703,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
692 703 for (var i = 0; i < ds.length; i++) {
693 704 for (var j = 0; j < ds[i].length; j++) {
694 705 if (ds[i][j].ttdid && ds[i][j].fcsj) {
695   - ds[i][j].sel = ds[i][j].where(self.xldir, startTime_h_m, endtime_h_m);
  706 + ds[i][j].sel = ds[i][j].where(self.xldir, startTime_h_m, endtime_h_m, self.isInOut);
696 707 }
697 708 }
698 709 }
... ...