Commit c922dd4485e7f38b2a33882203fe590d1d76073b

Authored by 潘钊
1 parent 485ba583

update

src/main/java/com/bsth/XDApplication.java
@@ -107,7 +107,7 @@ public class XDApplication implements CommandLineRunner { @@ -107,7 +107,7 @@ public class XDApplication implements CommandLineRunner {
107 //dayOfSchedule.dataRecovery(); 107 //dayOfSchedule.dataRecovery();
108 //sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS); 108 //sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS);
109 //实际排班更新线程 109 //实际排班更新线程
110 - sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 110 + //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
111 //实际排班延迟入库线程 111 //实际排班延迟入库线程
112 //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); 112 //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
113 //班次修正日志延迟入库 113 //班次修正日志延迟入库
@@ -140,7 +140,7 @@ public class XDApplication implements CommandLineRunner { @@ -140,7 +140,7 @@ public class XDApplication implements CommandLineRunner {
140 sexec.scheduleWithFixedDelay(fcxxUpdateThread, 60, 40, TimeUnit.SECONDS);//发车信息(发车屏、信息发布) 140 sexec.scheduleWithFixedDelay(fcxxUpdateThread, 60, 40, TimeUnit.SECONDS);//发车信息(发车屏、信息发布)
141 //线路首末班数据(网关用,班次更新时写入) 141 //线路首末班数据(网关用,班次更新时写入)
142 //com.bsth.data.schedule.f_a_l.FirstAndLastHandler 142 //com.bsth.data.schedule.f_a_l.FirstAndLastHandler
143 - //无法自动完成的班次信息(网关用,补信号) 143 + //靠GPS信号无法自动完成的班次信息(网关用,补信号)
144 144
145 145
146 //运管处静态数据提交 146 //运管处静态数据提交
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -729,7 +729,7 @@ public class DayOfSchedule { @@ -729,7 +729,7 @@ public class DayOfSchedule {
729 /** 729 /**
730 * @Title: prveNotExecNum 730 * @Title: prveNotExecNum
731 * @Description: TODO(班次之前未执行班次数量) 731 * @Description: TODO(班次之前未执行班次数量)
732 - */ 732 +
733 public int prveNotExecNum(ScheduleRealInfo sch) { 733 public int prveNotExecNum(ScheduleRealInfo sch) {
734 int n = 0; 734 int n = 0;
735 List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh()); 735 List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh());
@@ -741,29 +741,29 @@ public class DayOfSchedule { @@ -741,29 +741,29 @@ public class DayOfSchedule {
741 break; 741 break;
742 } 742 }
743 return n; 743 return n;
744 - } 744 + }*/
745 745
746 /** 746 /**
747 * @Title: validEndTime 747 * @Title: validEndTime
748 * @Description: TODO(是否是有效的到达时间) 748 * @Description: TODO(是否是有效的到达时间)
749 - */ 749 +
750 public boolean validEndTime(ScheduleRealInfo sch, Long ts) { 750 public boolean validEndTime(ScheduleRealInfo sch, Long ts) {
751 if (sch.getFcsjActualTime() != null && sch.getFcsjActualTime() > ts) 751 if (sch.getFcsjActualTime() != null && sch.getFcsjActualTime() > ts)
752 return false; 752 return false;
753 753
754 return validTime(sch, ts); 754 return validTime(sch, ts);
755 - } 755 + }*/
756 756
757 /** 757 /**
758 * @Title: validStartTime 758 * @Title: validStartTime
759 * @Description: TODO(是否是合适的发车时间) 759 * @Description: TODO(是否是合适的发车时间)
760 - */ 760 +
761 public boolean validStartTime(ScheduleRealInfo sch, Long ts) { 761 public boolean validStartTime(ScheduleRealInfo sch, Long ts) {
762 if (sch.getZdsjActualTime() != null && sch.getZdsjActualTime() < ts) 762 if (sch.getZdsjActualTime() != null && sch.getZdsjActualTime() < ts)
763 return false; 763 return false;
764 764
765 return validTime(sch, ts); 765 return validTime(sch, ts);
766 - } 766 + }*/
767 767
768 public boolean validTime(ScheduleRealInfo sch, Long ts) { 768 public boolean validTime(ScheduleRealInfo sch, Long ts) {
769 List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh()); 769 List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh());
@@ -875,9 +875,9 @@ public class DayOfSchedule { @@ -875,9 +875,9 @@ public class DayOfSchedule {
875 return outList; 875 return outList;
876 } 876 }
877 877
878 - public Set<String> allCar() { 878 +/* public Set<String> allCar() {
879 return nbbmScheduleMap.keySet(); 879 return nbbmScheduleMap.keySet();
880 - } 880 + }*/
881 881
882 public Collection<ScheduleRealInfo> findAll() { 882 public Collection<ScheduleRealInfo> findAll() {
883 return nbbmScheduleMap.values(); 883 return nbbmScheduleMap.values();
@@ -939,12 +939,12 @@ public class DayOfSchedule { @@ -939,12 +939,12 @@ public class DayOfSchedule {
939 return ups; 939 return ups;
940 } 940 }
941 941
942 - public void removeNbbm2SchMapp(ScheduleRealInfo sch, String nbbm) {  
943 - nbbmScheduleMap.remove(nbbm, sch); 942 + public void removeNbbm2SchMapp(ScheduleRealInfo sch) {
  943 + nbbmScheduleMap.remove(sch.getClZbh(), sch);
944 } 944 }
945 945
946 - public void addNbbm2SchMapp(ScheduleRealInfo sch, String nbbm) {  
947 - nbbmScheduleMap.put(nbbm, sch); 946 + public void addNbbm2SchMapp(ScheduleRealInfo sch) {
  947 + nbbmScheduleMap.put(sch.getClZbh(), sch);
948 } 948 }
949 949
950 public void reCalcExecPlan(String nbbm) { 950 public void reCalcExecPlan(String nbbm) {
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -3011,10 +3011,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3011,10 +3011,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3011 if (sch == null) 3011 if (sch == null)
3012 continue; 3012 continue;
3013 3013
3014 - if (cpc.getClZbh() != null && !carExist(sch.getGsBm(), cpc.getClZbh())) {  
3015 - rs.put("msg", "车辆 " + cpc.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!");  
3016 - rs.put("status", ResponseCode.ERROR);  
3017 - return rs; 3014 + if (cpc.getClZbh() != null) {
  3015 + if(!carExist(sch.getGsBm(), cpc.getClZbh())) {
  3016 + rs.put("msg", "车辆 " + cpc.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!");
  3017 + rs.put("status", ResponseCode.ERROR);
  3018 + return rs;
  3019 + }
  3020 + else if(!sch.getGsBm().equals(BasicData.nbbm2CompanyCodeMap.get(cpc.getClZbh()))){
  3021 + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到自编号为【" + cpc.getClZbh() + "】的车辆");
  3022 + rs.put("status", ResponseCode.ERROR);
  3023 + return rs;
  3024 + }
3018 } 3025 }
3019 3026
3020 if (StringUtils.isNotEmpty(cpc.getJsy())) { 3027 if (StringUtils.isNotEmpty(cpc.getJsy())) {
@@ -4439,9 +4446,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4439,9 +4446,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4439 try { 4446 try {
4440 List<String> leftList = Splitter.on(",").splitToList(leftIdx); 4447 List<String> leftList = Splitter.on(",").splitToList(leftIdx);
4441 List<String> rightList = Splitter.on(",").splitToList(rightIdx); 4448 List<String> rightList = Splitter.on(",").splitToList(rightIdx);
4442 -  
4443 - //有班次变更的车辆  
4444 - Set<String> cars = new HashSet<>(); 4449 + Set<String> lpSet = new HashSet<>();
4445 4450
4446 List<ScheduleRealInfo> largeList, smallList; 4451 List<ScheduleRealInfo> largeList, smallList;
4447 if (leftList.size() > rightList.size()) { 4452 if (leftList.size() > rightList.size()) {
@@ -4462,7 +4467,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4462,7 +4467,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4462 //不对称时多出来的 4467 //不对称时多出来的
4463 lpChangeByLeft(leftSch, largeList.get(i - 1), type); 4468 lpChangeByLeft(leftSch, largeList.get(i - 1), type);
4464 ts.add(leftSch); 4469 ts.add(leftSch);
4465 - cars.add(leftSch.getClZbh()); 4470 + lpSet.add(leftSch.getXlBm() + "_" + leftSch.getLpName());
4466 continue; 4471 continue;
4467 } 4472 }
4468 4473
@@ -4470,13 +4475,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4470,13 +4475,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4470 lpChange(leftSch, rightSch, type); 4475 lpChange(leftSch, rightSch, type);
4471 ts.add(leftSch); 4476 ts.add(leftSch);
4472 4477
4473 - cars.add(leftSch.getClZbh());  
4474 - cars.add(rightSch.getClZbh()); 4478 + lpSet.add(leftSch.getXlBm() + "_" + leftSch.getLpName());
  4479 + lpSet.add(rightSch.getXlBm() + "_" + rightSch.getLpName());
4475 } 4480 }
4476 4481
4477 - //重新计算起点应到时间  
4478 - for(String nbbm : cars){  
4479 - ts.addAll(dayOfSchedule.updateQdzTimePlan(nbbm)); 4482 + //重新计算路牌的起点应到时间
  4483 + for(String lpName : lpSet){
  4484 + ts.addAll(dayOfSchedule.updateQdzTimePlan(lpName));
4480 } 4485 }
4481 4486
4482 for (ScheduleRealInfo sch : ts) { 4487 for (ScheduleRealInfo sch : ts) {
@@ -4504,6 +4509,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4504,6 +4509,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4504 4509
4505 @Override 4510 @Override
4506 public void lpChange(ScheduleRealInfo leftSch, ScheduleRealInfo rightSch, int type) { 4511 public void lpChange(ScheduleRealInfo leftSch, ScheduleRealInfo rightSch, int type) {
  4512 + //释放班次映射
  4513 + if(type > 0) {
  4514 + dayOfSchedule.removeNbbm2SchMapp(leftSch);
  4515 + dayOfSchedule.removeNbbm2SchMapp(rightSch);
  4516 + }
  4517 +
  4518 + //对调数据
4507 LpData leftData = new LpData(leftSch); 4519 LpData leftData = new LpData(leftSch);
4508 LpData rightData = new LpData(rightSch); 4520 LpData rightData = new LpData(rightSch);
4509 4521
@@ -4511,12 +4523,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4511,12 +4523,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4511 rightData.appendTo(leftSch, type); 4523 rightData.appendTo(leftSch, type);
4512 4524
4513 if(type > 0){ 4525 if(type > 0){
4514 - //更新车辆和班次映射信息  
4515 - dayOfSchedule.removeNbbm2SchMapp(leftSch, leftData.getNbbm());  
4516 - dayOfSchedule.removeNbbm2SchMapp(rightSch, rightData.getNbbm());  
4517 -  
4518 - dayOfSchedule.addNbbm2SchMapp(leftSch, rightData.getNbbm());  
4519 - dayOfSchedule.addNbbm2SchMapp(rightSch, leftData.getNbbm()); 4526 + //重新映射
  4527 + dayOfSchedule.addNbbm2SchMapp(leftSch);
  4528 + dayOfSchedule.addNbbm2SchMapp(rightSch);
4520 } 4529 }
4521 } 4530 }
4522 4531
@@ -4527,14 +4536,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4527,14 +4536,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4527 * @param type 4536 * @param type
4528 */ 4537 */
4529 public void lpChangeByLeft(ScheduleRealInfo leftSch, ScheduleRealInfo rightSch, int type) { 4538 public void lpChangeByLeft(ScheduleRealInfo leftSch, ScheduleRealInfo rightSch, int type) {
4530 - LpData rightData = new LpData(rightSch); 4539 + //释放班次映射
  4540 + if(type > 0)
  4541 + dayOfSchedule.removeNbbm2SchMapp(leftSch);
4531 4542
  4543 + LpData rightData = new LpData(rightSch);
4532 rightData.appendTo(leftSch, type); 4544 rightData.appendTo(leftSch, type);
4533 4545
4534 - if(type > 0){  
4535 - //更新车辆和班次映射信息  
4536 - dayOfSchedule.addNbbm2SchMapp(leftSch, rightData.getNbbm());  
4537 - } 4546 + //重新映射
  4547 + if(type > 0)
  4548 + dayOfSchedule.addNbbm2SchMapp(leftSch);
  4549 +
4538 } 4550 }
4539 4551
4540 @Override 4552 @Override
src/main/resources/static/real_control_v2/css/ct_table.css
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 .ct_table>.ct_table_body { 33 .ct_table>.ct_table_body {
34 width: 100%; 34 width: 100%;
35 border-bottom: 1px solid #dedede; 35 border-bottom: 1px solid #dedede;
36 - color: #000; 36 + /*color: #000;*/
37 } 37 }
38 38
39 .ct_table dl { 39 .ct_table dl {
src/main/resources/static/real_control_v2/css/line_schedule.css
@@ -771,27 +771,30 @@ input.i-cbox[type=checkbox]{ @@ -771,27 +771,30 @@ input.i-cbox[type=checkbox]{
771 771
772 772
773 .sch-tzrc-table dl dt:nth-of-type(1), .sch-tzrc-table dl dd:nth-of-type(1) { 773 .sch-tzrc-table dl dt:nth-of-type(1), .sch-tzrc-table dl dd:nth-of-type(1) {
774 - width: 30%; 774 + width: 25%;
775 } 775 }
776 .sch-tzrc-table dl dt:nth-of-type(2), .sch-tzrc-table dl dd:nth-of-type(2) { 776 .sch-tzrc-table dl dt:nth-of-type(2), .sch-tzrc-table dl dd:nth-of-type(2) {
777 - width: 25%; 777 + width: 18%;
778 } 778 }
779 .sch-tzrc-table dl dt:nth-of-type(3), .sch-tzrc-table dl dd:nth-of-type(3) { 779 .sch-tzrc-table dl dt:nth-of-type(3), .sch-tzrc-table dl dd:nth-of-type(3) {
780 - width: 25%; 780 + width: 21%;
781 } 781 }
782 .sch-tzrc-table dl dt:nth-of-type(4), .sch-tzrc-table dl dd:nth-of-type(4) { 782 .sch-tzrc-table dl dt:nth-of-type(4), .sch-tzrc-table dl dd:nth-of-type(4) {
783 - width: 20%; 783 + width: 21%;
  784 +}
  785 +.sch-tzrc-table dl dt:nth-of-type(5), .sch-tzrc-table dl dd:nth-of-type(5) {
  786 + width: 15%;
784 } 787 }
785 788
786 .ct-form-modal .uk-autocomplete{ 789 .ct-form-modal .uk-autocomplete{
787 width: 100%; 790 width: 100%;
788 } 791 }
789 792
790 -.sch-tzrc-table.ct_table dl.active, 793 +/*.sch-tzrc-table.ct_table dl.active,
791 .sch-tzrc-table.ct_table>.ct_table_body dl.active:hover, 794 .sch-tzrc-table.ct_table>.ct_table_body dl.active:hover,
792 .sch-tzrc-table.ct_table>.ct_table_body dl.context-menu-active{ 795 .sch-tzrc-table.ct_table>.ct_table_body dl.context-menu-active{
793 background: #e6e6e6; 796 background: #e6e6e6;
794 -} 797 +}*/
795 798
796 .search_sch_panel{ 799 .search_sch_panel{
797 float: right; 800 float: right;
src/main/resources/static/real_control_v2/css/main.css
@@ -1597,3 +1597,62 @@ ul.left_tabs_lg li{ @@ -1597,3 +1597,62 @@ ul.left_tabs_lg li{
1597 text-decoration: underline; 1597 text-decoration: underline;
1598 font-size: 13px; 1598 font-size: 13px;
1599 } 1599 }
  1600 +
  1601 +#schedule-tzrc-modal input[type=checkbox]{
  1602 + margin-right: 9px;
  1603 +}
  1604 +
  1605 +#schedule-tzrc-modal span.ct_zt_yzx{
  1606 + color: #2196F3;
  1607 + font-size: 12px;
  1608 +}
  1609 +
  1610 +#schedule-tzrc-modal span.ct_zt_lb{
  1611 + color: red;
  1612 + font-size: 12px;
  1613 +}
  1614 +
  1615 +#schedule-tzrc-modal span.ct_zt_zzzx{
  1616 + font-size: 12px;
  1617 + color: #38ad3c;
  1618 +}
  1619 +
  1620 +#schedule-tzrc-modal .tzrc_form{
  1621 + padding: 20px;
  1622 + border: 1px solid #f0eded;
  1623 + box-shadow: 0px -3px 15px rgba(0,0,0,0.08);
  1624 + background: #f9f9f9;
  1625 +}
  1626 +
  1627 +.uk-panel.ct_search_panel{
  1628 + padding: 15px;
  1629 + border: 1px solid #f0eded;
  1630 + box-shadow: 0px 3px 15px rgba(0,0,0,0.08);
  1631 + background: #f9f9f9;
  1632 +}
  1633 +
  1634 +.sch-tzrc-table.ct_table dl.active,
  1635 +.sch-tzrc-table.ct_table>.ct_table_body dl.active:hover{
  1636 + background: #5bd460;
  1637 + color: white;
  1638 +}
  1639 +
  1640 +#schedule-tzrc-modal dl.active span.ct_zt_yzx{
  1641 + color: #545252;
  1642 +}
  1643 +
  1644 +#schedule-tzrc-modal dl.active span.ct_zt_lb{
  1645 + color: #d64949;
  1646 +}
  1647 +
  1648 +#schedule-tzrc-modal dl.active span.ct_zt_zzzx{
  1649 + color: white;
  1650 +}
  1651 +
  1652 +#schedule-tzrc-modal dl.active input[type=checkbox]{
  1653 + border: 0;
  1654 +}
  1655 +
  1656 +#schedule-tzrc-modal dl.active input[type=checkbox]:before{
  1657 + color: #ffffff;
  1658 +}
1600 \ No newline at end of file 1659 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_in_out.html
@@ -100,7 +100,7 @@ @@ -100,7 +100,7 @@
100 else if (sch.status == 2) { 100 else if (sch.status == 2) {
101 $f('destroy', f).parents('label').remove(); 101 $f('destroy', f).parents('label').remove();
102 $f('endDate', f).val(sch.zdsjActual); 102 $f('endDate', f).val(sch.zdsjActual);
103 - $('input,select', f).attr('disabled', 'disabled'); 103 + //$('input,select', f).attr('disabled', 'disabled');
104 } 104 }
105 } 105 }
106 106
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/tzrc.html
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <a href="" class="uk-modal-close uk-close"></a> 3 <a href="" class="uk-modal-close uk-close"></a>
4 <div class="uk-modal-header"> 4 <div class="uk-modal-header">
5 <h2>调整人车</h2></div> 5 <h2>调整人车</h2></div>
6 - <div class="uk-panel uk-panel-box uk-panel-box-primary"> 6 + <div class="uk-panel ct_search_panel">
7 <form class="uk-form uk-form-horizontal search-form"> 7 <form class="uk-form uk-form-horizontal search-form">
8 <div class="uk-grid"> 8 <div class="uk-grid">
9 <div class="uk-width-1-3"> 9 <div class="uk-width-1-3">
@@ -26,21 +26,23 @@ @@ -26,21 +26,23 @@
26 </form> 26 </form>
27 </div> 27 </div>
28 28
29 - <div class="ct_table_wrap ct_table_no_border tzrc-table-wrap" style="height: 300px;"> 29 + <form class="uk-form">
  30 + <div class="ct_table_wrap ct_table_no_border tzrc-table-wrap" style="height: 340px;">
30 <div class="ct_table sch-tzrc-table"> 31 <div class="ct_table sch-tzrc-table">
31 <div class="ct_table_head"> 32 <div class="ct_table_head">
32 <dl> 33 <dl>
33 - <dt><input type="checkbox" id="globalCheckBox" class="i-cbox" style="margin-top: 0px;">时间</dt> 34 + <dt><input type="checkbox" id="globalCheckBox" class="i-cbox" >时间</dt>
34 <dt>车辆</dt> 35 <dt>车辆</dt>
35 <dt>驾驶员</dt> 36 <dt>驾驶员</dt>
36 <dt>售票员</dt> 37 <dt>售票员</dt>
  38 + <dt>状态</dt>
37 </dl> 39 </dl>
38 </div> 40 </div>
39 <div class="ct_table_body"></div> 41 <div class="ct_table_body"></div>
40 </div> 42 </div>
41 </div> 43 </div>
42 -  
43 - <form class="uk-form uk-form-horizontal tzrc_form" style="padding-top: 20px;border-top: 1px solid whitesmoke;"> 44 + </form>
  45 + <form class="uk-form uk-form-horizontal tzrc_form">
44 <div class="uk-grid"> 46 <div class="uk-grid">
45 <div class="uk-width-1-2"> 47 <div class="uk-width-1-2">
46 <div class="uk-form-row"> 48 <div class="uk-form-row">
@@ -77,7 +79,7 @@ @@ -77,7 +79,7 @@
77 </div> 79 </div>
78 <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;"> 80 <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
79 <button type="button" class="uk-button uk-modal-close">取消</button> 81 <button type="button" class="uk-button uk-modal-close">取消</button>
80 - <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存 82 + <button type="submit" class="uk-button uk-button-primary" ><i class="uk-icon-check"></i> &nbsp;保存
81 </button> 83 </button>
82 </div> 84 </div>
83 </form> 85 </form>
@@ -85,10 +87,9 @@ @@ -85,10 +87,9 @@
85 87
86 <script id="schedule-tzrc-table-temp" type="text/html"> 88 <script id="schedule-tzrc-table-temp" type="text/html">
87 {{each list as sch i}} 89 {{each list as sch i}}
88 - <dl data-id="{{sch.id}}"> 90 + <dl data-id="{{sch.id}}" {{if sch.status==0}}class="no_exec_sch_row"{{/if}}>
89 <dd> 91 <dd>
90 - <label>  
91 - <input type="checkbox" value=1 name="schCBox" class="i-cbox" style="margin-top: 0px;"> 92 + <input type="checkbox" value=1 name="schCBox" class="i-cbox" >
92 {{sch.dfsj}} 93 {{sch.dfsj}}
93 {{if sch.bcType == "out"}} 94 {{if sch.bcType == "out"}}
94 <span class="uk-badge uk-badge-success">出场</span> 95 <span class="uk-badge uk-badge-success">出场</span>
@@ -105,11 +106,19 @@ @@ -105,11 +106,19 @@
105 {{if sch.cTasks.length > 0}} 106 {{if sch.cTasks.length > 0}}
106 <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> 107 <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span>
107 {{/if}} 108 {{/if}}
108 - </label>  
109 </dd> 109 </dd>
110 <dd>{{sch.clZbh}}</dd> 110 <dd>{{sch.clZbh}}</dd>
111 <dd>{{sch.jGh}}/{{sch.jName}}</dd> 111 <dd>{{sch.jGh}}/{{sch.jName}}</dd>
112 <dd>{{sch.sGh}}/{{sch.sName}}</dd> 112 <dd>{{sch.sGh}}/{{sch.sName}}</dd>
  113 + <dd>
  114 + {{if sch.status==2}}
  115 + <span class="ct_zt_yzx">已执行</span>
  116 + {{else if sch.status==1}}
  117 + <span class="ct_zt_zzzx">正在执行</span>
  118 + {{else if sch.status==-1}}
  119 + <span class="ct_zt_lb">烂班</span>
  120 + {{/if}}
  121 + </dd>
113 </dl> 122 </dl>
114 {{/each}} 123 {{/each}}
115 </script> 124 </script>
@@ -151,17 +160,21 @@ @@ -151,17 +160,21 @@
151 $('.tzrc-table-wrap', modal).perfectScrollbar('update'); 160 $('.tzrc-table-wrap', modal).perfectScrollbar('update');
152 }); 161 });
153 162
154 - $(modal).on('click', '.sch-tzrc-table .ct_table_body dl input[type=checkbox]', function () {  
155 - if ($(this).attr('disabled')) return;  
156 - var dl = $(this).parents('dl');  
157 - if (this.checked) {  
158 - dl.addClass('active'); 163 + $(modal).on('click', '.sch-tzrc-table .ct_table_body dl', function () {
  164 + var cbox = $('input[type=checkbox]',this)[0];
  165 + //var active = $();
  166 + if(!$(this).hasClass('active')){
  167 + $(this).addClass('active');
  168 + cbox.checked = true;
159 var lineCode = $('[name=lineSelect]', modal).val(); 169 var lineCode = $('[name=lineSelect]', modal).val();
160 - var sch = gb_schedule_table.findScheduleByLine(lineCode)[dl.data('id')]; 170 + var sch = gb_schedule_table.findScheduleByLine(lineCode)[$(this).data('id')];
161 171
162 writeSch2Form(sch); 172 writeSch2Form(sch);
163 - } else  
164 - dl.removeClass('active'); 173 + }
  174 + else{
  175 + $(this).removeClass('active');
  176 + cbox.checked = false;
  177 + }
165 }); 178 });
166 179
167 //默认选中项 180 //默认选中项
@@ -191,7 +204,42 @@ @@ -191,7 +204,42 @@
191 //}); 204 //});
192 205
193 //submit 206 //submit
194 - var f = $('form.tzrc_form', modal).formValidation({ 207 + var f = $('form.tzrc_form', modal);
  208 + f.on('submit', function (e) {
  209 + e.stopPropagation();
  210 +
  211 + var checkeds = $('.sch-tzrc-table .ct_table_body input[type=checkbox]:checked', modal);
  212 + if (checkeds.length == 0)
  213 + return notify_err('请选中要调整的班次');
  214 +
  215 + var param = $(this).serializeJSON();
  216 + var data = [];
  217 + var schId;
  218 + $.each(checkeds, function () {
  219 + schId = $(this).parents('dl').data('id');
  220 + data.push({
  221 + schId: schId,
  222 + jsy: param.jsy,
  223 + spy: param.spy,
  224 + clZbh: param.clZbh
  225 + });
  226 + });
  227 +
  228 + //检查一下是否跨公司换人,换车
  229 + // gb_common.$get('/')
  230 +
  231 + gb_common.$post('/realSchedule/multi_tzrc', {
  232 + cpcsJson: JSON.stringify(data)
  233 + }, function (rs) {
  234 + if (rs.ts && rs.ts.length > 0) {
  235 + gb_schedule_table.updateSchedule(rs.ts);
  236 + UIkit.modal(modal).hide();
  237 + notify_succ('调整人车成功');
  238 + }
  239 + });
  240 + return false;
  241 + });
  242 + /*var f = $('form.tzrc_form', modal).formValidation({
195 framework: 'uikit', 243 framework: 'uikit',
196 locale: 'zh_CN' 244 locale: 'zh_CN'
197 }); 245 });
@@ -222,7 +270,7 @@ @@ -222,7 +270,7 @@
222 notify_succ('调整人车成功'); 270 notify_succ('调整人车成功');
223 } 271 }
224 }); 272 });
225 - }); 273 + });*/
226 }); 274 });
227 275
228 function writeSch2Form(sch) { 276 function writeSch2Form(sch) {
@@ -235,11 +283,28 @@ @@ -235,11 +283,28 @@
235 283
236 //全选 284 //全选
237 $('#globalCheckBox', modal).on('click', function () { 285 $('#globalCheckBox', modal).on('click', function () {
  286 + clearCheckAll();
238 var status = this.checked; 287 var status = this.checked;
239 - $('input[name=schCBox]', modal).each(function () {  
240 - this.checked = status;  
241 - }); 288 + if(status){
  289 + var id;
  290 + $('.no_exec_sch_row', modal).each(function () {
  291 + $(this).addClass('active');
  292 + $('input[type=checkbox]',this)[0].checked = true;
  293 + id = $(this).data('id');
  294 + });
  295 +
  296 + var lineCode = $('[name=lineSelect]', modal).val();
  297 + var sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  298 + writeSch2Form(sch);
  299 + }
242 }); 300 });
  301 +
  302 + function clearCheckAll() {
  303 + $('.sch-tzrc-table .ct_table_body>dl', modal).each(function () {
  304 + $(this).removeClass('active');
  305 + $('input[type=checkbox]',this)[0].checked = false;
  306 + });
  307 + }
243 })(); 308 })();
244 </script> 309 </script>
245 </div> 310 </div>
src/main/resources/static/real_control_v2/js/common.js
@@ -112,7 +112,7 @@ var gb_common = (function () { @@ -112,7 +112,7 @@ var gb_common = (function () {
112 }); 112 });
113 }; 113 };
114 114
115 - var errorHead = '<span style="color:red;">服务器出现异常:</span>'; 115 + var errorHead = '<span style="color:red;">异常:</span>';
116 116
117 function successHandle(json, handle) { 117 function successHandle(json, handle) {
118 var status = json.status; 118 var status = json.status;