Commit c80575b8b16c15e8c116c9840edbe7e3516b5f57

Authored by 王通
2 parents a1eb7a0d 81cca300

Merge branch 'minhang' of http://192.168.168.201:8888/panzhaov5/bsth_control.git into minhang

src/main/java/com/bsth/entity/Cars.java
... ... @@ -126,6 +126,8 @@ public class Cars extends BEntity implements Serializable {
126 126 private String serviceNo;
127 127 /** 是否电车(TODO:在原系统里没有,这里暂时留着) */
128 128 private Boolean sfdc;
  129 + /** 是否混合动力(TODO:在原系统里没有,这里暂时留着) */
  130 + private Boolean sfmix;
129 131 /** 备注/描述 */
130 132 private String descriptions;
131 133  
... ... @@ -512,4 +514,12 @@ public class Cars extends BEntity implements Serializable {
512 514 public void setCgsbm(String cgsbm) {
513 515 this.cgsbm = cgsbm;
514 516 }
  517 +
  518 + public Boolean getSfmix() {
  519 + return sfmix;
  520 + }
  521 +
  522 + public void setSfmix(Boolean sfmix) {
  523 + this.sfmix = sfmix;
  524 + }
515 525 }
... ...
src/main/java/com/bsth/entity/schedule/BEntity.java
... ... @@ -12,10 +12,10 @@ import java.util.Date;
12 12 public class BEntity {
13 13  
14 14 /** 创建人 */
15   - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  15 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
16 16 private SysUser createBy;
17 17 /** 修改人 */
18   - @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
  18 + @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.REFRESH)
19 19 private SysUser updateBy;
20 20  
21 21 /** 创建日期 */
... ...
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
... ... @@ -123,7 +123,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
123 123 int colnums = poi_sheet.getRow(0).getLastCellNum();
124 124 Row firstrow = poi_sheet.getRow(0);
125 125 for (int i = 0; i < colnums; i++) {
126   - org.apache.poi.ss.usermodel.Cell cell = firstrow.getCell(i);
  126 + Cell cell = firstrow.getCell(i);
127 127 if (i == 0) {
128 128 colList.add(PoiUtils.getStringValueFromCell(cell).trim());
129 129 } else {
... ... @@ -258,7 +258,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
258 258 int colnums = poi_sheet.getRow(0).getLastCellNum();
259 259 Row firstrow = poi_sheet.getRow(0);
260 260 for (int i = 0; i < colnums; i++) {
261   - org.apache.poi.ss.usermodel.Cell cell = firstrow.getCell(i);
  261 + Cell cell = firstrow.getCell(i);
262 262 colList.add(PoiUtils.getStringValueFromCell(cell).trim().replaceAll("(->\\d+)", ""));
263 263 }
264 264  
... ... @@ -454,6 +454,19 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
454 454  
455 455 StationRoute station1 = stationRouteService.findById(lpObjList.get(0).getStationRouteId1());
456 456 StationRoute station2 = stationRouteService.findById(lpObjList.get(1).getStationRouteId2());
  457 +
  458 + // TODO
  459 + Map<String, Object> param = new HashMap<>();
  460 + param.put("station.id_eq", null);
  461 + if (station1 == null) {
  462 + param.put("station.id_eq", lpObjList.get(0).getStationRouteId1());
  463 + station1 = ((List<StationRoute>) stationRouteService.list(param)).get(0);
  464 + }
  465 + if (station2 == null) {
  466 + param.put("station.id_eq", lpObjList.get(0).getStationRouteId2());
  467 + station2 = ((List<StationRoute>) stationRouteService.list(param)).get(0);
  468 + }
  469 +
457 470 for (int i = 0; i < groupCount; i++) {
458 471 excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 1), station1.getStationName(), new Color(0x96b9d7));
459 472 excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 2), station2.getStationName(), new Color(0x96b9d7));
... ... @@ -566,6 +579,19 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
566 579  
567 580 StationRoute station1 = stationRouteService.findById(lpObjList.get(0).getStationRouteId1());
568 581 StationRoute station2 = stationRouteService.findById(lpObjList.get(1).getStationRouteId2());
  582 +
  583 + // TODO
  584 + Map<String, Object> param = new HashMap<>();
  585 + param.put("station.id_eq", null);
  586 + if (station1 == null) {
  587 + param.put("station.id_eq", lpObjList.get(0).getStationRouteId1());
  588 + station1 = ((List<StationRoute>) stationRouteService.list(param)).get(0);
  589 + }
  590 + if (station2 == null) {
  591 + param.put("station.id_eq", lpObjList.get(0).getStationRouteId2());
  592 + station2 = ((List<StationRoute>) stationRouteService.list(param)).get(0);
  593 + }
  594 +
569 595 for (int i = 1; i <= groupCount; i++) {
570 596 excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 1), station1.getStationName(), new Color(0x96b9d7));
571 597 excelPoiOperator.createStringCell(wb, lpHeadRow, (short) (i * 2 + 2), station2.getStationName(), new Color(0x96b9d7));
... ... @@ -644,7 +670,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
644 670 cell.setCellValue(bcObj.getFcsj() + "X");
645 671 } else { // 一个车次链
646 672 cell = lpRow.getCell((short) (bcObj.getGroupNo() * 2 + bcObj.getGroupBcNo() + 3));
647   - cell.setCellValue(bcObj.getFcsj() + "X");
  673 + if (cell != null) {
  674 + cell.setCellValue(bcObj.getFcsj() + "X");
  675 + }
648 676 }
649 677 break;
650 678 case LC:
... ...
src/main/resources/rules/kBase3_validate_timetable.drl
... ... @@ -100,6 +100,7 @@ declare TTInfo_wrap
100 100 weekdays: List // 周一到周日是否启用 List<Boolean>
101 101 specialDays: List // 特殊节假日 List<DateTime>
102 102 updateDate: DateTime // 最新修改时间
  103 + lineVersion : Integer // 线路版本
103 104 end
104 105  
105 106 rule "TTInfo_wrap_result"
... ... @@ -118,6 +119,7 @@ rule &quot;TTInfo_wrap_result&quot;
118 119 ttInfo_wrap.setUpdateDate(new DateTime($ttinfo.getUpdateDate()));
119 120 ttInfo_wrap.setWeekdays(new ArrayList());
120 121 ttInfo_wrap.setSpecialDays(new ArrayList());
  122 + ttInfo_wrap.setLineVersion($ttinfo.getLineVersion());
121 123  
122 124 String[] days = $ttinfo.getRule_days().split(",");
123 125 for (int i = 0; i < 7; i++) {
... ... @@ -151,6 +153,7 @@ end
151 153  
152 154 declare TTInfoDetails_wrap
153 155 ttInfoId: Long // 时刻表id
  156 + lineVersion: Integer // 线路版本
154 157 bcInfoList: List // 班次信息列表 List<TTInfoDetail>
155 158 end
156 159  
... ... @@ -165,6 +168,7 @@ rule &quot;Calcu_iter_days_special_day&quot; // 特殊日期匹配
165 168 TTInfo_wrap(
166 169 $tid: id,
167 170 $tname: name,
  171 + $lineVersion: lineVersion,
168 172 specialDays contains $calcu_date
169 173 )
170 174 then
... ... @@ -189,6 +193,7 @@ rule &quot;Calcu_iter_days_special_day&quot; // 特殊日期匹配
189 193  
190 194 TTInfoDetails_wrap ttInfoDetails_wrap = new TTInfoDetails_wrap();
191 195 ttInfoDetails_wrap.setTtInfoId($tid);
  196 + ttInfoDetails_wrap.setLineVersion($lineVersion);
192 197 ttInfoDetails_wrap.setBcInfoList(tTInfoDetailRepository.findByTtinfoId($tid));
193 198 insert(ttInfoDetails_wrap);
194 199 }
... ... @@ -208,6 +213,7 @@ rule &quot;Calcu_iter_days_normal_day&quot; // 平日匹配
208 213 TTInfo_wrap(
209 214 $tid: id,
210 215 $tname: name,
  216 + $lineVersion: lineVersion,
211 217 specialDays not contains $calcu_date,
212 218 weekdays[$calcu_weekday - 1] == Boolean.TRUE
213 219 )
... ... @@ -234,6 +240,7 @@ rule &quot;Calcu_iter_days_normal_day&quot; // 平日匹配
234 240  
235 241 TTInfoDetails_wrap ttInfoDetails_wrap = new TTInfoDetails_wrap();
236 242 ttInfoDetails_wrap.setTtInfoId($tid);
  243 + ttInfoDetails_wrap.setLineVersion($lineVersion);
237 244 ttInfoDetails_wrap.setBcInfoList(tTInfoDetailRepository.findByTtinfoId($tid));
238 245 insert(ttInfoDetails_wrap);
239 246 }
... ... @@ -253,6 +260,7 @@ rule &quot;Calcu_iter_days_other_day&quot; // 都没有的情况下,匹配
253 260 TTInfo_wrap(
254 261 $tid: id,
255 262 $tname: name,
  263 + $lineVersion: lineVersion,
256 264 specialDays not contains $calcu_date,
257 265 weekdays[$calcu_weekday - 1] == false
258 266 )
... ... @@ -278,6 +286,7 @@ rule &quot;Calcu_iter_days_other_day&quot; // 都没有的情况下,匹配
278 286  
279 287 TTInfoDetails_wrap ttInfoDetails_wrap = new TTInfoDetails_wrap();
280 288 ttInfoDetails_wrap.setTtInfoId($tid);
  289 + ttInfoDetails_wrap.setLineVersion($lineVersion);
281 290 Map<String, Object> param = new HashMap<String, Object>();
282 291 ttInfoDetails_wrap.setBcInfoList(tTInfoDetailRepository.findByTtinfoId($tid));
283 292 insert(ttInfoDetails_wrap);
... ... @@ -308,7 +317,7 @@ rule &quot;statinfo_result&quot; // 统计计算结果
308 317 $statInfo.setYybc($yybc);
309 318 $statInfo.setErrorbc($errorbc);
310 319  
311   - int lineVersion = ((TTInfoDetail) $ttInfoDetails_wrap.getBcInfoList().get(0)).getLineVersion();
  320 + int lineVersion = $ttInfoDetails_wrap.getLineVersion();
312 321 $statInfo.setLineVersion(lineVersion);
313 322  
314 323 rs.getInfos().add($statInfo);
... ...
src/main/resources/static/pages/base/timesmodel/js/add-form-reload.js
... ... @@ -3,7 +3,7 @@
3 3 if (!$('body').hasClass('page-sidebar-closed')) {
4 4 $('.menu-toggler.sidebar-toggler').click();
5 5 }
6   -
  6 +
7 7 $('.openHaveSkb').on('click',function() {
8 8 var skbId = $("#skbNameSelect").val();
9 9 var argus = {
... ...
src/main/resources/static/pages/base/timesmodel/js/gantt.js
... ... @@ -66,6 +66,8 @@
66 66 CSMap = getMaxCarAndStopSpace0(map,seMap);
67 67 // 发车间隙
68 68 map.fcjx = CSMap.fcjx;
  69 + map.stt = "1";
  70 + _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap);
69 71 }else if(map.baseRes== '1') {
70 72 CSMap = getMaxCarAndStopSpace1(map);
71 73 // 发车间隙
... ... @@ -77,6 +79,7 @@
77 79 CSMap = getMaxCarAndStopSpace1(map);
78 80 } else if (map.baseRes == '3') { // 主站停站使用v2_2版本
79 81 _paramObj = Main_v2.getFactory().createParameterObj(map, dataMap); // TODO:暂时使用v2_1版本的方法,通用的,后续再放到v2_2版本中
  82 + console.log(_paramObj);
80 83 map.clzs = InternalScheduleObj_v2_2.calcuClzx(_paramObj);
81 84 CSMap = getMaxCarAndStopSpace1(map);
82 85 }
... ... @@ -143,7 +146,7 @@
143 146 // // 初始化右键菜单.
144 147 // contextInit(graph);
145 148  
146   - if (map.baseRes == '3' || map.baseRes == '1') {
  149 + if (map.baseRes == '3' || map.baseRes == '1' || map.baseRes == '0') {
147 150 // 导入导出设置
148 151 // Main_v2_2.exportExcelConfig($_GlobalGraph.getDataArray);
149 152  
... ... @@ -186,7 +189,7 @@
186 189 return _rtnBcArray;
187 190 };
188 191  
189   - // Main_v2_2.exportExcelConfig(_dfun);
  192 + Main_v2_2.exportExcelConfig(_paramObj, _dfun);
190 193 }
191 194  
192 195 // 关闭弹出层
... ...
src/main/resources/static/pages/base/timesmodel/js/v2_2/Main_v2_2_ExcelObj.js
... ... @@ -581,10 +581,10 @@ var Main_v2_2_ExcelObj = (function() {
581 581 "zdzid": oGanttBc.zdz, // 终点站id
582 582  
583 583 "isUp": bIsUp, // 是否上行
584   - "isFb": null, // 是否分班(_resetBdOutInLcBcGroup方法修正)
  584 + "isFb": false, // 是否分班(_resetBdOutInLcBcGroup方法修正)
585 585  
586 586 "bcType": oGanttBc.bcType, // 班次类型(bc、out、in、lc)
587   - "fcsj": oGanttBc.fcsj, // 发车时间描述
  587 + "fcsj": (oGanttBc.fcsj == null ? "" : oGanttBc.fcsj), // 发车时间描述
588 588  
589 589 "groupNo": -99, // 第几圈(_resetBdOutInLcBcGroup方法修正)
590 590 "groupBcNo": -99, // 圈里第几个班次(_resetBdOutInLcBcGroup方法修正)
... ...
src/main/resources/static/pages/base/timesmodel/js/v2_2/main_v2_2.js
... ... @@ -43,7 +43,7 @@ var Main_v2_2 = function() {
43 43 schedule.fnAdjustHeadway();
44 44 // 4、计算吃饭班次
45 45 schedule.fnCalcuEatBc();
46   - // // 6、计算末班车
  46 + // // 6、计算末班车(TODO:这里家里末班车,貌似导出Excel会报错,待修正)
47 47 // schedule.fnCalcuLastBc();
48 48 // 7、重新设置停站时间
49 49 schedule.fnReSetLayoverTime();
... ... @@ -64,8 +64,8 @@ var Main_v2_2 = function() {
64 64 * 导出时刻表配置。
65 65 * @param fnGetGanttBc 获取gantt班次方法
66 66 */
67   - exportExcelConfig: function(fnGetGanttBc) {
68   - var oExcel = new Main_v2_2_ExcelObj(_paramObj, fnGetGanttBc);
  67 + exportExcelConfig: function(paramobj, fnGetGanttBc) {
  68 + var oExcel = new Main_v2_2_ExcelObj(paramobj, fnGetGanttBc);
69 69  
70 70 $('.exportAddXls').off('click');
71 71 $('.exportAddXlsx').off('click');
... ...
src/main/resources/static/pages/control/lineallot_v2/main.html
... ... @@ -144,7 +144,7 @@
144 144 <div class="allot_wrap uk-flex-center" uk-grid>
145 145 <div class="uk-card uk-card-hover uk-card-body uk-width-2-3@m"
146 146 style="padding-top: 20px;padding-bottom: 20px;">
147   - <div class="company_search_wrap">
  147 + <div class="company_search_wrap" style="width: 99%">
148 148 <select class="uk-select company_search_select"></select>
149 149 <select class="uk-select fgs_search_select" disabled>
150 150 <option value="">分公司搜索</option>
... ... @@ -153,6 +153,9 @@
153 153 <span class="uk-form-icon uk-form-icon-flip" uk-icon="icon: search"></span>
154 154 <input class="uk-input line_search_input" style="width: 310px;" placeholder="搜索线路">
155 155 </div>
  156 + <button class="uk-button uk-button-primary" style="font-size: 16px;float: right;" id="select_all" data-selectType="select_all_no"><i
  157 + uk-icon=" " style="margin-right: 5px;" ></i>全选
  158 + </button>
156 159 </div>
157 160 <hr>
158 161 <div class="line_list_all_wrap"></div>
... ... @@ -164,8 +167,10 @@
164 167 <button class="uk-button uk-button-default uk-button-large" style="font-size: 16px" id="go_to_real_system_btn"><i
165 168 uk-icon=" icon: sign-in" style="margin-right: 5px;" ></i>进入线路调度
166 169 </button>
  170 +
167 171 <label class="pattern_type_label"><input class="uk-checkbox" type="checkbox" > 主调模式登录</label>
168 172 <label class="new_window_open_label" title="可能会被浏览器阻止新建窗口" uk-tooltip><input class="uk-checkbox" type="checkbox"> 新窗口打开</label>
  173 +
169 174 </div>
170 175  
171 176 <div class="uk-alert-warning uk-width-2-3@m " uk-alert>
... ... @@ -244,6 +249,7 @@
244 249 $('.item[data-id='+line.lineCode+']','.line_list_all_wrap').trigger('click');
245 250 });
246 251 }
  252 + selectButtonStatus();
247 253 });
248 254  
249 255 $('.pattern_type_label').on('click', function () {
... ... @@ -297,6 +303,7 @@
297 303 });
298 304 $('.checked_list').append(span);
299 305 }
  306 + selectButtonStatus();
300 307 });
301 308  
302 309 /*$('.checked_list').on('click', '.item', function () {
... ... @@ -469,6 +476,44 @@
469 476 })();
470 477 var storage = window.localStorage;
471 478 $('#go_to_real_system_btn').on('click', go_to_xd_sys);
  479 + $('#select_all').on('click', function(){
  480 + if ($(this).attr("data-selectType")=="select_all_no"){
  481 + $('.line_list_all_wrap>.item').addClass('active');
  482 + $(this).text('全不选');
  483 + $(this).attr("data-selectType","select_all");
  484 + var linesArrays= $('.line_list_all_wrap span.item');
  485 + if(linesArrays&&linesArrays.length>0){
  486 + $('.checked_list').empty();
  487 + for (var i = 0; i < linesArrays.length; i++) {
  488 + var span = $('<span data-id="'+$(linesArrays[i]).data('id')+'" class="item uk-card uk-card-default uk-animation-slide-bottom '+($(linesArrays[i]).hasClass('destroy')?"destroy":"")+'">'+$(linesArrays[i]).text()+'</span>')
  489 + .one('webkitAnimationEnd', function () {
  490 + $(this).removeClass('uk-animation-slide-bottom');
  491 + });
  492 + $('.checked_list').append(span);
  493 + }
  494 + }
  495 + $(this).removeClass('uk-button-primary');
  496 + $(this).addClass('uk-button-default');
  497 + return;
  498 + }
  499 + if ($(this).attr("data-selectType")=="select_all"){
  500 + $('.line_list_all_wrap>.item').removeClass('active');
  501 + $(this).text('全选');
  502 + $(this).attr("data-selectType","select_all_no");
  503 + $('.checked_list').empty();
  504 + $(this).removeClass('uk-button-default');
  505 + $(this).addClass('uk-button-primary');
  506 + return;
  507 + }
  508 + });
  509 + var selectButtonStatus=function(){
  510 + if($('.checked_list span.item').length==$('.line_list_all_wrap span.item').length){
  511 + $('#select_all').removeClass('uk-button-primary').addClass('uk-button-default').attr("data-selectType","select_all").text('全不选');
  512 + }else {
  513 + $('#select_all').removeClass('uk-button-default').addClass('uk-button-primary').attr("data-selectType","select_all_no").text('全选');
  514 + }
  515 + }
  516 +
472 517 /**
473 518 * 进入线调
474 519 */
... ... @@ -608,7 +653,9 @@
608 653 var lineCode = $(e).data('id');
609 654 $('.item[data-id='+lineCode+']','.line_list_all_wrap').removeClass('active');
610 655 $(e).remove();
  656 + selectButtonStatus();
611 657 }
  658 +
612 659 </script>
613 660 </body>
614 661 </html>
615 662 \ No newline at end of file
... ...
src/main/resources/static/pages/permission/user/list.html
... ... @@ -55,7 +55,7 @@
55 55 <td>
56 56 <select class="form-control form-filter " name="enabled_eq">
57 57 <option value="">请选择...</option>
58   - <option value="true">可用</option>
  58 + <option value="true" selected = "selected">可用</option>
59 59 <option value="false">禁用</option>
60 60 </select>
61 61 </td>
... ... @@ -131,7 +131,7 @@ $(function(){
131 131 increaseArea: '20%'
132 132 };
133 133  
134   - jsDoQuery(null,true);
  134 + jsDoQuery({'enabled_eq':true},true);
135 135  
136 136 //重置
137 137 $('tr.filter .filter-cancel').on('click', function(){
... ... @@ -216,11 +216,21 @@ $(function(){
216 216 if(initPagination){
217 217 initPagination = false;
218 218 return;
219   - }
220   -
221   -
222   - page = num - 1;
223   - jsDoQuery(null, false);
  219 + }
  220 + var cells = $('tr.filter')[0].cells
  221 + ,params = {}
  222 + ,name;
  223 + $.each(cells, function(i, cell){
  224 + var items = $('input,select', cell);
  225 + for(var j = 0, item; item = items[j++];){
  226 + name = $(item).attr('name');
  227 + if(name){
  228 + params[name] = $(item).val();
  229 + }
  230 + }
  231 + });
  232 + page = num - 1;
  233 + jsDoQuery(params, false);
224 234 }
225 235 });
226 236 }
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
... ... @@ -449,6 +449,13 @@
449 449 </div>
450 450  
451 451 <div class="form-group">
  452 + <label class="col-md-2 control-label">是否混合电车:</label>
  453 + <div class="col-md-3">
  454 + <sa-Radiogroup model="ctrl.busInfoForSave.sfmix" dicgroup="truefalseType" name="sfmix"></sa-Radiogroup>
  455 + </div>
  456 + </div>
  457 +
  458 + <div class="form-group">
452 459 <label class="col-md-2 control-label">备注:</label>
453 460 <div class="col-md-10">
454 461 <textarea rows="3" class="form-control" name="descriptions"
... ...
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
... ... @@ -441,6 +441,13 @@
441 441 </div>
442 442  
443 443 <div class="form-group">
  444 + <label class="col-md-2 control-label">是否混合电车:</label>
  445 + <div class="col-md-3">
  446 + <sa-Radiogroup model="ctrl.busInfoForSave.sfmix" dicgroup="truefalseType" name="sfmix"></sa-Radiogroup>
  447 + </div>
  448 + </div>
  449 +
  450 + <div class="form-group">
444 451 <label class="col-md-2 control-label">备注:</label>
445 452 <div class="col-md-10">
446 453 <textarea rows="3" class="form-control" name="descriptions"
... ...