Commit 32c9dc8139da80481125a9b2f2d2393e75b293a8

Authored by 潘钊
2 parents 82e7e545 5446a295

Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control into pudong

src/main/java/com/bsth/controller/forms/ExportController.java
@@ -98,14 +98,14 @@ public class ExportController { @@ -98,14 +98,14 @@ public class ExportController {
98 m.put("lpName", l.getLpName()); 98 m.put("lpName", l.getLpName());
99 m.put("carPlate", l.getCarPlate()); 99 m.put("carPlate", l.getCarPlate());
100 m.put("jhlc", l.getJhlc()); 100 m.put("jhlc", l.getJhlc());
101 - // m.put("sjjhlc", l.getSjjhlc()); 101 + m.put("sjjhlc", l.getSjjhlc());
102 m.put("yygl", l.getYygl()); 102 m.put("yygl", l.getYygl());
103 m.put("emptMileage", l.getEmptMileage()); 103 m.put("emptMileage", l.getEmptMileage());
104 m.put("remMileage", l.getRemMileage()); 104 m.put("remMileage", l.getRemMileage());
105 m.put("addMileage", l.getAddMileage()); 105 m.put("addMileage", l.getAddMileage());
106 m.put("totalm", l.getTotalm()); 106 m.put("totalm", l.getTotalm());
107 m.put("jhbc", l.getJhbc()); 107 m.put("jhbc", l.getJhbc());
108 - // m.put("sjjhbc", l.getSjjhbc()); 108 + m.put("sjjhbc", l.getSjjhbc());
109 m.put("cjbc", l.getCjbc()); 109 m.put("cjbc", l.getCjbc());
110 m.put("ljbc", l.getLjbc()); 110 m.put("ljbc", l.getLjbc());
111 m.put("sjbc", l.getSjbc()); 111 m.put("sjbc", l.getSjbc());
src/main/java/com/bsth/controller/schedule/TrafficManageController.java
@@ -111,6 +111,15 @@ public class TrafficManageController { @@ -111,6 +111,15 @@ public class TrafficManageController {
111 } 111 }
112 } 112 }
113 113
  114 + @RequestMapping(value = "/setJHBCByDate", method = RequestMethod.GET)
  115 + public String setJHBCByDate(@RequestParam("theDate") String theDate) throws Exception {
  116 + try {
  117 + return trManageService.setJHBC(theDate);
  118 + } catch (Exception exp) {
  119 + throw new Exception(exp.getCause());
  120 + }
  121 + }
  122 +
114 @RequestMapping(value = "/setSKB", method = RequestMethod.GET) 123 @RequestMapping(value = "/setSKB", method = RequestMethod.GET)
115 public String setSKB(@RequestParam("ids") String ids) throws Exception { 124 public String setSKB(@RequestParam("ids") String ids) throws Exception {
116 try { 125 try {
src/main/java/com/bsth/data/LineVersionsData.java
1 package com.bsth.data; 1 package com.bsth.data;
2 2
3 -import java.util.HashMap;  
4 -import java.util.List;  
5 -import java.util.Map;  
6 - 3 +import com.bsth.entity.LineVersions;
  4 +import com.bsth.service.LineVersionsService;
  5 +import com.bsth.service.StationRouteService;
7 import org.slf4j.Logger; 6 import org.slf4j.Logger;
8 import org.slf4j.LoggerFactory; 7 import org.slf4j.LoggerFactory;
9 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
10 -import org.springframework.boot.CommandLineRunner;  
11 import org.springframework.core.annotation.Order; 9 import org.springframework.core.annotation.Order;
12 import org.springframework.stereotype.Component; 10 import org.springframework.stereotype.Component;
13 11
14 -import com.bsth.entity.LineVersions;  
15 -import com.bsth.service.LineVersionsService;  
16 -import com.bsth.service.StationRouteService; 12 +import java.util.HashMap;
  13 +import java.util.List;
  14 +import java.util.Map;
17 15
18 /** 16 /**
19 * @ClassName: LineVersionsData 17 * @ClassName: LineVersionsData
@@ -25,10 +23,9 @@ public class LineVersionsData extends Thread { @@ -25,10 +23,9 @@ public class LineVersionsData extends Thread {
25 23
26 static Logger logger = LoggerFactory.getLogger(LineVersionsData.class); 24 static Logger logger = LoggerFactory.getLogger(LineVersionsData.class);
27 25
28 -  
29 @Autowired 26 @Autowired
30 LineVersionsService lineVersionsService; 27 LineVersionsService lineVersionsService;
31 - 28 +
32 @Autowired 29 @Autowired
33 StationRouteService stationRouteService; 30 StationRouteService stationRouteService;
34 31
src/main/java/com/bsth/entity/LineVersions.java
@@ -73,7 +73,7 @@ public class LineVersions{ @@ -73,7 +73,7 @@ public class LineVersions{
73 * 是否发布 int length(1) 73 * 是否发布 int length(1)
74 * 0(没有),1(发布) 74 * 0(没有),1(发布)
75 */ 75 */
76 - private int isupdate; 76 + private int isupdate = 0;
77 77
78 public Integer getId() { 78 public Integer getId() {
79 return id; 79 return id;
src/main/java/com/bsth/service/TrafficManageService.java
@@ -70,6 +70,8 @@ public interface TrafficManageService { @@ -70,6 +70,8 @@ public interface TrafficManageService {
70 */ 70 */
71 String setJHBC(); 71 String setJHBC();
72 72
  73 + String setJHBC(String theDate);
  74 +
73 String setLD(String theDate); 75 String setLD(String theDate);
74 76
75 String setLD(); 77 String setLD();
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -1961,6 +1961,7 @@ public class FormsServiceImpl implements FormsService { @@ -1961,6 +1961,7 @@ public class FormsServiceImpl implements FormsService {
1961 tempMap.put("jhbc", jhbc); 1961 tempMap.put("jhbc", jhbc);
1962 tempMap.put("sjbc", sjbc); 1962 tempMap.put("sjbc", sjbc);
1963 tempMap.put("qz", qz); 1963 tempMap.put("qz", qz);
  1964 + tempMap.put("sm", "");
1964 if(jhcc != 0 && sjcc != 0){ 1965 if(jhcc != 0 && sjcc != 0){
1965 tempMap.put("ccl", numberFormat.format(((float)sjcc / jhcc)*100)+"%"); 1966 tempMap.put("ccl", numberFormat.format(((float)sjcc / jhcc)*100)+"%");
1966 }else{ 1967 }else{
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -165,9 +165,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -165,9 +165,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
165 schedule.setZdsjActual(null); 165 schedule.setZdsjActual(null);
166 } 166 }
167 String[] split1 = schedule.getFcsj().split(":"); 167 String[] split1 = schedule.getFcsj().split(":");
168 - String[] split3 = schedule.getZdsj().split(":");  
169 long fcsj = Long.valueOf(split1[0]) * 60 + Long.valueOf(split1[1]); 168 long fcsj = Long.valueOf(split1[0]) * 60 + Long.valueOf(split1[1]);
170 - long zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]); 169 + long zdsj = 0l;
  170 + if(schedule.getZdsj() == null){
  171 + zdsj = fcsj + schedule.getBcsj();
  172 + } else {
  173 + String[] split3 = schedule.getZdsj().split(":");
  174 + zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]);
  175 + }
171 if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){ 176 if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){
172 if(fcsj<23*60) fcsj += 1440l; 177 if(fcsj<23*60) fcsj += 1440l;
173 if(zdsj<23*60) zdsj += 1440l; 178 if(zdsj<23*60) zdsj += 1440l;
@@ -904,7 +909,15 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -904,7 +909,15 @@ public class BusIntervalServiceImpl implements BusIntervalService {
904 } 909 }
905 } 910 }
906 911
907 - sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task order by start_date"; 912 + long id1 = 0, id2 = 0;
  913 + for(ScheduleRealInfo s : list){
  914 + if(s.getId() > id2)
  915 + id2 = s.getId();
  916 + if(id1 == 0 || id1 > s.getId())
  917 + id1 = s.getId();
  918 + }
  919 + sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task";
  920 + sql += " where id >= "+id1+" and id <= "+id2+" order by start_date";
908 921
909 cList = jdbcTemplate.query(sql, 922 cList = jdbcTemplate.query(sql,
910 new RowMapper<ChildTaskPlan>(){ 923 new RowMapper<ChildTaskPlan>(){
@@ -2162,9 +2175,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2162,9 +2175,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2162 // tempMap.put("dxtz", dxtz); 2175 // tempMap.put("dxtz", dxtz);
2163 tempMap.put("lbtz", lbtz); 2176 tempMap.put("lbtz", lbtz);
2164 tempMap.put("correct", sddf + zddf + lbtz); 2177 tempMap.put("correct", sddf + zddf + lbtz);
2165 - tempMap.put("dfbl", sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0 + "%"); 2178 + tempMap.put("dfbl", (sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0) + "%");
2166 // tempMap.put("dxbl", df.format((double)(dxtz)/sjbc*100) + "%"); 2179 // tempMap.put("dxbl", df.format((double)(dxtz)/sjbc*100) + "%");
2167 - tempMap.put("lbbl", sjbc>0?df.format((double)(lbtz)/sjbc*100):0 + "%"); 2180 + tempMap.put("lbbl", (sjbc>0?df.format((double)(lbtz)/sjbc*100):0) + "%");
2168 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); 2181 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%");
2169 // tempMap.put("workList", tempList); 2182 // tempMap.put("workList", tempList);
2170 2183
@@ -2294,9 +2307,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2294,9 +2307,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2294 // tempMap.put("dxtz", dxtz); 2307 // tempMap.put("dxtz", dxtz);
2295 tempMap.put("lbtz", lbtz); 2308 tempMap.put("lbtz", lbtz);
2296 tempMap.put("correct", sddf + zddf + lbtz); 2309 tempMap.put("correct", sddf + zddf + lbtz);
2297 - tempMap.put("dfbl", sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0 + "%"); 2310 + tempMap.put("dfbl", (sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0) + "%");
2298 2311
2299 - tempMap.put("lbbl", sjbc>0?df.format((double)(lbtz)/sjbc*100):0 + "%"); 2312 + tempMap.put("lbbl", (sjbc>0?df.format((double)(lbtz)/sjbc*100):0) + "%");
2300 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); 2313 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%");
2301 resList.add(tempMap); 2314 resList.add(tempMap);
2302 } 2315 }
@@ -2319,11 +2332,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2319,11 +2332,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2319 resMap.put("dxtz", dxtzz); 2332 resMap.put("dxtz", dxtzz);
2320 resMap.put("correct",correct+dxtzz); 2333 resMap.put("correct",correct+dxtzz);
2321 if(sjbc<=0){ 2334 if(sjbc<=0){
2322 - resMap.put("dxbl", "0");  
2323 - resMap.put("correctbl", "0"); 2335 + resMap.put("dxbl", "0%");
  2336 + resMap.put("correctbl", "0%");
2324 }else{ 2337 }else{
2325 - resMap.put("dxbl", sjbc>0?df.format((double)(dxtzz)/sjbc*100):0 + "%");  
2326 - resMap.put("correctbl", sjbc>0?df.format((double)(correct+dxtzz)/sjbc*100):0 + "%"); 2338 + resMap.put("dxbl", (sjbc>0?df.format((double)(dxtzz)/sjbc*100):0) + "%");
  2339 + resMap.put("correctbl", (sjbc>0?df.format((double)(correct+dxtzz)/sjbc*100):0) + "%");
2327 } 2340 }
2328 2341
2329 2342
@@ -2374,11 +2387,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2374,11 +2387,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2374 resMap.put("dxtz", dxtzf); 2387 resMap.put("dxtz", dxtzf);
2375 resMap.put("correct",correct+dxtzf); 2388 resMap.put("correct",correct+dxtzf);
2376 if(sjbc<=0){ 2389 if(sjbc<=0){
2377 - resMap.put("dxbl", "0");  
2378 - resMap.put("correctbl", "0"); 2390 + resMap.put("dxbl", "0%");
  2391 + resMap.put("correctbl", "0%");
2379 }else{ 2392 }else{
2380 - resMap.put("dxbl", sjbc>0?df.format((double)(dxtzf)/sjbc*100):0 + "%");  
2381 - resMap.put("correctbl", sjbc>0?df.format((double)(correct+dxtzf)/sjbc*100):0 + "%"); 2393 + resMap.put("dxbl", (sjbc>0?df.format((double)(dxtzf)/sjbc*100):0) + "%");
  2394 + resMap.put("correctbl", (sjbc>0?df.format((double)(correct+dxtzf)/sjbc*100):0) + "%");
2382 } 2395 }
2383 resMap.put("xlname",BasicData.lineCode2NameMap.get(xlbm)); 2396 resMap.put("xlname",BasicData.lineCode2NameMap.get(xlbm));
2384 } 2397 }
src/main/java/com/bsth/service/impl/LineVersionsServiceImpl.java
@@ -202,6 +202,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl&lt;LineVersions, Integ @@ -202,6 +202,8 @@ public class LineVersionsServiceImpl extends BaseServiceImpl&lt;LineVersions, Integ
202 // 更新线路版本 202 // 更新线路版本
203 repository.updateOdlVersions(lineId, lineCode); 203 repository.updateOdlVersions(lineId, lineCode);
204 repository.updateNewVersions(lineId,lineCode,versions); 204 repository.updateNewVersions(lineId,lineCode,versions);
  205 + // 记录版本更新日志
  206 + jdbcTemplate.update("INSERT into bsth_c_line_versions_enablog(line_code,`line_versions`,`t`) VALUES (?,?,?)",lineCode,versions, lineVersions.getStartDate().getTime());
205 } 207 }
206 } 208 }
207 return list; 209 return list;
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
@@ -812,10 +812,26 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -812,10 +812,26 @@ public class TrafficManageServiceImpl implements TrafficManageService{
812 } 812 }
813 813
814 /** 814 /**
  815 + * 上传计划班次 指定日期 yyyy-MM-dd
  816 + * @param theDate
  817 + * @return
  818 + */
  819 + public String setJHBC(String theDate){
  820 + return uploadJHBC(theDate);
  821 + }
  822 +
  823 + /**
  824 + * 上传计划班次
  825 + * @return
  826 + */
  827 + public String setJHBC(){
  828 + return uploadJHBC(null);
  829 + }
  830 + /**
815 * 上传线路计划班次表 831 * 上传线路计划班次表
816 */ 832 */
817 - @Override  
818 - public String setJHBC() { 833 +
  834 + private String uploadJHBC(String theDate) {
819 String result = "failure"; 835 String result = "failure";
820 Line line; 836 Line line;
821 StringBuffer sBuffer =new StringBuffer(); 837 StringBuffer sBuffer =new StringBuffer();
@@ -825,8 +841,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -825,8 +841,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{
825 SchedulePlanInfo schedulePlanInfo; 841 SchedulePlanInfo schedulePlanInfo;
826 String xlbm,zbh = ""; 842 String xlbm,zbh = "";
827 Long lp = 0L; 843 Long lp = 0L;
828 - // 取明天的日期  
829 - String tomorrow = sdfnyr.format(DateUtils.addDays(new Date(), +1)); 844 + // 取得计划班次时间
  845 + String tomorrow = theDate == null ? sdfnyr.format(DateUtils.addDays(new Date(), +1)) : theDate;
830 // 查询所有班次 846 // 查询所有班次
831 List<SchedulePlanInfo> schedulePlanList = schedulePlanInfoRepository.findLineScheduleBc(tomorrow); 847 List<SchedulePlanInfo> schedulePlanList = schedulePlanInfoRepository.findLineScheduleBc(tomorrow);
832 int j = 0; // 初始化标识 848 int j = 0; // 初始化标识
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -2164,6 +2164,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2164,6 +2164,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2164 2164
2165 for (int i = 0; i < list.size(); i++) { 2165 for (int i = 0; i < list.size(); i++) {
2166 ScheduleRealInfo s=list.get(i); 2166 ScheduleRealInfo s=list.get(i);
  2167 + if(s.getBcType().equals("out")){
  2168 + s.setRemark("1");
  2169 + }else if(s.getBcType().equals("in")){
  2170 + s.setRemark("3");
  2171 + }else{
  2172 + s.setRemark("2");
  2173 + }
2167 String[] fcsj= s.getFcsj().split(":"); 2174 String[] fcsj= s.getFcsj().split(":");
2168 Long fcsjL=Long.parseLong(fcsj[0])*60+Long.parseLong(fcsj[1]); 2175 Long fcsjL=Long.parseLong(fcsj[0])*60+Long.parseLong(fcsj[1]);
2169 2176
@@ -2190,7 +2197,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2190,7 +2197,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2190 } 2197 }
2191 s.setFcsjT(fscjT); 2198 s.setFcsjT(fscjT);
2192 } 2199 }
2193 - Collections.sort(list, new ComparableReal()); 2200 + Collections.sort(list, new compareFcsjType());
2194 for (int i = 0; i < list.size(); i++) { 2201 for (int i = 0; i < list.size(); i++) {
2195 ScheduleRealInfo s = list.get(i); 2202 ScheduleRealInfo s = list.get(i);
2196 s.setAdjustExps(i + 1 + ""); 2203 s.setAdjustExps(i + 1 + "");
@@ -5245,3 +5252,12 @@ class AccountXlbm implements Comparator&lt;Map&lt;String, Object&gt;&gt;{ @@ -5245,3 +5252,12 @@ class AccountXlbm implements Comparator&lt;Map&lt;String, Object&gt;&gt;{
5245 o2.get("xlNamePy").toString()); 5252 o2.get("xlNamePy").toString());
5246 } 5253 }
5247 } 5254 }
  5255 +
  5256 +class compareFcsjType implements Comparator<ScheduleRealInfo>{
  5257 + @Override
  5258 + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) {
  5259 + // TODO Auto-generated method stub
  5260 + return (o1.getFcsjT()+o1.getRemark()).compareTo(o2.getFcsjT()+o2.getRemark());
  5261 + }
  5262 +
  5263 +}
src/main/resources/static/pages/base/carpark/list.html
@@ -115,73 +115,9 @@ @@ -115,73 +115,9 @@
115 </td> 115 </td>
116 <td> 116 <td>
117 {{obj.gsmc}} 117 {{obj.gsmc}}
118 - <!--{{if obj.company == '55'}}  
119 - 上南公司  
120 - {{else if obj.company == '22'}}  
121 - 金高公司  
122 - {{else if obj.company == '05'}}  
123 - 杨高公司  
124 - {{else if obj.company == '26'}}  
125 - 南汇公司  
126 - {{else if obj.company == '77'}}  
127 - 闵行公司  
128 - {{/if}}-->  
129 </td> 118 </td>
130 <td> 119 <td>
131 {{obj.fgsmc}} 120 {{obj.fgsmc}}
132 - <!--{{if obj.company == '55'}}  
133 -  
134 - {{if obj.brancheCompany == '1'}}  
135 - 上南二分公司  
136 - {{else if obj.brancheCompany == '2'}}  
137 - 上南三分公司  
138 - {{else if obj.brancheCompany == '3'}}  
139 - 上南六分公司  
140 - {{else if obj.brancheCompany == '4'}}  
141 - 上南一分公司  
142 - {{/if}}  
143 -  
144 - {{else if obj.company == '22'}}  
145 -  
146 - {{if obj.brancheCompany == '1'}}  
147 - 四分公司  
148 - {{else if obj.brancheCompany == '2'}}  
149 - 二分公司  
150 - {{else if obj.brancheCompany == '3'}}  
151 - 三分公司  
152 - {{else if obj.brancheCompany == '5'}}  
153 - 一分公司  
154 - {{/if}}  
155 -  
156 - {{else if obj.company == '05'}}  
157 -  
158 - {{if obj.brancheCompany == '1'}}  
159 - 川沙分公司  
160 - {{else if obj.brancheCompany == '2'}}  
161 - 金桥分公司  
162 - {{else if obj.brancheCompany == '3'}}  
163 - 芦潮港分公司  
164 - {{else if obj.brancheCompany == '5'}}  
165 - 杨高分公司  
166 - {{else if obj.brancheCompany == '6'}}  
167 - 周浦分公司  
168 - {{/if}}  
169 -  
170 - {{else if obj.company == '26'}}  
171 -  
172 - {{if obj.brancheCompany == '1'}}  
173 - 南汇一分  
174 - {{else if obj.brancheCompany == '2'}}  
175 - 南汇二分  
176 - {{else if obj.brancheCompany == '3'}}  
177 - 南汇三分  
178 - {{else if obj.brancheCompany == '4'}}  
179 - 南汇维修公司  
180 - {{else if obj.brancheCompany == '5'}}  
181 - 南汇公司  
182 - {{/if}}  
183 -  
184 - {{/if}}-->  
185 </td> 121 </td>
186 <td> 122 <td>
187 {{obj.versions}} 123 {{obj.versions}}
src/main/resources/static/pages/base/lineversions/js/lineversions-list-table.js
1 /** 1 /**
2 - *  
3 * @JSName : lineversions-list-table.js(线路版本信息list.html页面js) 2 * @JSName : lineversions-list-table.js(线路版本信息list.html页面js)
4 * @Description : TOOD(线路信息list.html页面js) 3 * @Description : TOOD(线路信息list.html页面js)
5 */ 4 */
  5 +(function () {
  6 + // 关闭左侧栏
  7 + if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();}
  8 + // 定义 page : 当前页;initPag ; icheckOptions:选择框
  9 + var page = 0,
  10 + initPag,
  11 + icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'},
  12 + storage = window.localStorage;
  13 + if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') {
  14 + $('.tipso-animation').children().remove();
  15 + // 延迟加载
  16 + setTimeout(function(){
  17 + $('.tipso-animation').tipso({
  18 + speed : 400,
  19 + background : '#0ed0e8',
  20 + color : '#ffffff',
  21 + position :'bottom',
  22 + width : 400,
  23 + delay : 100,
  24 + animationIn : 'fadeInDownBig',
  25 + animationOut : 'fadeOut',
  26 + offsetX : -50,
  27 + offsetY : -195,
  28 + content :'您可以通过点击重置按钮来清除对线路名称的记忆哦!',
6 29
  30 + });
  31 + $('.tipso-animation').tipso('show');
  32 + setTimeout(function(){$('.tipso-animation').tipso('hide');},4000);
  33 + },200);
  34 + }
  35 + // 营运公司Map[key(businessCode)] = 名字
  36 + var companyMap = new Map();
  37 + // 分公司Map[key(upCode+_+businessCode)] = 名字
  38 + var branchMap = new Map();
  39 + initCompanySelect2(function(array) {
  40 + $.each(array, function() {
  41 + companyMap[this.businessCode] = this.businessName;
  42 + // companyMap.put(this.businessCode.toString(), this.businessName);
  43 + if(this.businessCode != null || this.businessCode !=''){
  44 + /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */
  45 + $get('/business/all', {upCode_eq: this.businessCode}, function(array){
  46 + // 遍历array
  47 + $.each(array, function(i,d){
  48 + branchMap[this.upCode+"_"+this.businessCode] = this.businessName;
  49 + // branchMap.put(this.upCode+"_"+this.businessCode, this.businessName);
  50 + });
  51 + });
  52 + }
  53 + });
  54 + // 公司下拉options属性值
  55 + var options = '<option value="">请选择...</option>';
  56 + // 遍历array
  57 + $.each(array, function(i,d){
  58 + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
  59 + });
  60 + // 初始化公司下拉框并监听值改变事件.
  61 + $('#companySelect').html(options).on('change', setBrancheCompanySelectOptions);
  62 + // 初始化分公司下拉框.
  63 + setBrancheCompanySelectOptions();
  64 + initLineSelect2(array);
  65 + /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */
  66 + loadTableDate({'line.name_like':splitxlName(storage.xlName_AgursData)},true);
  67 + });
  68 +
  69 + function initLineSelect2(compD) {
  70 + getComp(function(rs) {
  71 + var params = {};
  72 + if(rs.length>0) {
  73 + var compA = new Array();
  74 + for(var c = 0 ; c<rs.length;c++) {
  75 + var comC = rs[c].companyCode;
  76 + var child = rs[c].children;
  77 + if(child.length>0) {
  78 + for(var d = 0 ;d< child.length;d++) {
  79 + compA.push(comC + '_' + child[d].code);
  80 + }
  81 + }else {
  82 + compA.push(comC);
  83 + }
  84 + }
  85 + params.cgsbm_in = compA.toString();
  86 + }
  87 + // 填充线路拉框选择值
  88 + $get('/line/all', params, function(array){
  89 + var len_ = array.length,paramsD = new Array();
  90 + if(len_>0) {
  91 + $.each(array, function(i, g){
  92 + if(g.name!='' || g.name != null) {
  93 + paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)});
  94 + }
  95 + });
  96 + if($('span').hasClass('select2-selection'))
  97 + $('span .select2-selection').remove();
  98 + initPinYinSelect2($('#lineSelect'),paramsD,function(selector) {
  99 + selector.select2("val", storage.xlName_AgursData);
  100 + });
  101 + }
  102 + });
  103 + });
  104 + }
  105 +
  106 + $('#lineSelect').on('change',function() {
  107 + var text = $('#lineSelect').val();
  108 + if(text){
  109 + var linecode = text.split("_");
  110 + $("#lineCodeInput").val(linecode[2]);
  111 + }
  112 + });
  113 +
  114 + function gsdmTogsName(gsD,code) {
  115 + var rsStr = '';
  116 + for(var s = 0 ; s < gsD.length; s++) {
  117 + if(gsD[s].businessCode == code) {
  118 + rsStr = rsStr + '(' + gsD[s].businessName.replace('公司','') + ')';
  119 + break;
  120 + }
  121 + }
  122 + return rsStr;
  123 + }
7 124
8 - // 关闭左侧栏  
9 - if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();}  
10 - // 定义 page : 当前页;initPag ; icheckOptions:选择框  
11 - var page = 0,  
12 - initPag,  
13 - icheckOptions = {checkboxClass: 'icheckbox_flat-blue',increaseArea: '20%'},  
14 - storage = window.localStorage;  
15 - if(storage.xlName_AgursData!=null && storage.xlName_AgursData !='') {  
16 - $('.tipso-animation').children().remove();  
17 - // 延迟加载  
18 - setTimeout(function(){  
19 - $('.tipso-animation').tipso({  
20 - speed : 400,  
21 - background : '#0ed0e8',  
22 - color : '#ffffff',  
23 - position :'bottom',  
24 - width : 400,  
25 - delay : 100,  
26 - animationIn : 'fadeInDownBig',  
27 - animationOut : 'fadeOut',  
28 - offsetX : -50,  
29 - offsetY : -195,  
30 - content :'您可以通过点击重置按钮来清除对线路名称的记忆哦!',  
31 -  
32 - });  
33 - $('.tipso-animation').tipso('show');  
34 - setTimeout(function(){$('.tipso-animation').tipso('hide');},4000);  
35 - },200);  
36 - }  
37 - // 营运公司Map[key(businessCode)] = 名字  
38 - var companyMap = new Map();  
39 - // 分公司Map[key(upCode+_+businessCode)] = 名字  
40 - var branchMap = new Map();  
41 - initCompanySelect2(function(array) {  
42 - $.each(array, function() {  
43 - companyMap[this.businessCode] = this.businessName;  
44 - // companyMap.put(this.businessCode.toString(), this.businessName);  
45 - if(this.businessCode != null || this.businessCode !=''){  
46 - /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */  
47 - $get('/business/all', {upCode_eq: this.businessCode}, function(array){  
48 - // 遍历array  
49 - $.each(array, function(i,d){  
50 - branchMap[this.upCode+"_"+this.businessCode] = this.businessName;  
51 - // branchMap.put(this.upCode+"_"+this.businessCode, this.businessName);  
52 - });  
53 - });  
54 - }  
55 - });  
56 - // 公司下拉options属性值  
57 - var options = '<option value="">请选择...</option>';  
58 - // 遍历array  
59 - $.each(array, function(i,d){  
60 - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';  
61 - });  
62 - // 初始化公司下拉框并监听值改变事件.  
63 - $('#companySelect').html(options).on('change', setBrancheCompanySelectOptions);  
64 - // 初始化分公司下拉框.  
65 - setBrancheCompanySelectOptions();  
66 - initLineSelect2(array);  
67 - /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */  
68 - loadTableDate({'line.name_like':splitxlName(storage.xlName_AgursData)},true);  
69 - });  
70 -  
71 - function initLineSelect2(compD) {  
72 - getComp(function(rs) {  
73 - var params = {};  
74 - if(rs.length>0) {  
75 - var compA = new Array();  
76 - for(var c = 0 ; c<rs.length;c++) {  
77 - var comC = rs[c].companyCode;  
78 - var child = rs[c].children;  
79 - if(child.length>0) {  
80 - for(var d = 0 ;d< child.length;d++) {  
81 - compA.push(comC + '_' + child[d].code);  
82 - }  
83 - }else {  
84 - compA.push(comC);  
85 - }  
86 - }  
87 - params.cgsbm_in = compA.toString();  
88 - }  
89 - // 填充线路拉框选择值  
90 - $get('/line/all', params, function(array){  
91 - var len_ = array.length,paramsD = new Array();  
92 - if(len_>0) {  
93 - $.each(array, function(i, g){  
94 - if(g.name!='' || g.name != null) {  
95 - paramsD.push({'id':g.name + '_' + g.id + '_' + g.lineCode ,'text':g.name + gsdmTogsName(compD,g.company)});  
96 - }  
97 - });  
98 - if($('span').hasClass('select2-selection'))  
99 - $('span .select2-selection').remove();  
100 - initPinYinSelect2($('#lineSelect'),paramsD,function(selector) {  
101 - selector.select2("val", storage.xlName_AgursData);  
102 - });  
103 - }  
104 - });  
105 - });  
106 - }  
107 -  
108 - $('#lineSelect').on('change',function() {  
109 - var text = $('#lineSelect').val();  
110 - if(text){  
111 - var linecode = text.split("_");  
112 - $("#lineCodeInput").val(linecode[2]);  
113 - }  
114 - });  
115 -  
116 - function gsdmTogsName(gsD,code) {  
117 - var rsStr = '';  
118 - for(var s = 0 ; s < gsD.length; s++) {  
119 - if(gsD[s].businessCode == code) {  
120 - rsStr = rsStr + '(' + gsD[s].businessName.replace('公司','') + ')';  
121 - break;  
122 - }  
123 - }  
124 - return rsStr;  
125 - }  
126 -  
127 function initCompanySelect2(cb) { 125 function initCompanySelect2(cb) {
128 - // get请求获取公司  
129 - $get('/business/all', {upCode_eq: '88'}, function(gs_d){  
130 - return cb && cb(gs_d);  
131 - });  
132 - }  
133 - function getComp(cb) {  
134 - $.get('/user/companyData',null,function(rs) {  
135 - return cb && cb(rs);  
136 - });  
137 - }  
138 - function getParams() {  
139 - // cells 集合返回表格中所有(列)单元格的一个数组  
140 - var cells = $('tr.filter')[0].cells;  
141 - // 搜索参数集合  
142 - var params = {};  
143 - // 搜索字段名称  
144 - var name;  
145 - // 遍历cells数组  
146 - $.each(cells, function(i, cell){  
147 - // 获取第i列的input或者select集合  
148 - var items = $('input,select', cell);  
149 - // 遍历items集合  
150 - for(var j = 0, item; item = items[j++];){  
151 - // 获取字段名称  
152 - name = $(item).attr('name');  
153 - if(name){  
154 - // 赋取相对应的值  
155 - params[name] = $(item).val();  
156 - }  
157 - }  
158 - });  
159 - return params;  
160 - }  
161 -  
162 - /** 表格数据分页加载事件 @param:<param : 查询参数;isPon : 是否重新分页> */  
163 - function loadTableDate(param,isPon){  
164 - // 搜索参数  
165 - var params = {};  
166 - if(param) {  
167 - params = param;  
168 - }  
169 - // 排序(按方向与序号)  
170 - params['order'] = 'lineCode,versions';  
171 - // 排序方向.  
172 - params['direction'] = 'ASC,ASC';  
173 - // 记录当前页数  
174 - params['page'] = page;  
175 - // 弹出正在加载层  
176 - var i = layer.load(2);  
177 - // 异步请求获取表格数据  
178 - $.get('/lineVersions',params,function(result){  
179 - // 添加序号  
180 - result.content.page = page;  
181 - // 把数据填充到模版中 126 + // get请求获取公司
  127 + $get('/business/all', {upCode_eq: '88'}, function(gs_d){
  128 + return cb && cb(gs_d);
  129 + });
  130 + }
  131 + function getComp(cb) {
  132 + $.get('/user/companyData',null,function(rs) {
  133 + return cb && cb(rs);
  134 + });
  135 + }
  136 + function getParams() {
  137 + // cells 集合返回表格中所有(列)单元格的一个数组
  138 + var cells = $('tr.filter')[0].cells;
  139 + // 搜索参数集合
  140 + var params = {};
  141 + // 搜索字段名称
  142 + var name;
  143 + // 遍历cells数组
  144 + $.each(cells, function(i, cell){
  145 + // 获取第i列的input或者select集合
  146 + var items = $('input,select', cell);
  147 + // 遍历items集合
  148 + for(var j = 0, item; item = items[j++];){
  149 + // 获取字段名称
  150 + name = $(item).attr('name');
  151 + if(name){
  152 + // 赋取相对应的值
  153 + params[name] = $(item).val();
  154 + }
  155 + }
  156 + });
  157 + return params;
  158 + }
  159 +
  160 + /** 表格数据分页加载事件 @param:<param : 查询参数;isPon : 是否重新分页> */
  161 + function loadTableDate(param,isPon){
  162 + // 搜索参数
  163 + var params = {};
  164 + if(param) {
  165 + params = param;
  166 + }
  167 + // 排序(按方向与序号)
  168 + params['order'] = 'lineCode,versions';
  169 + // 排序方向.
  170 + params['direction'] = 'ASC,ASC';
  171 + // 记录当前页数
  172 + params['page'] = page;
  173 + // 弹出正在加载层
  174 + var i = layer.load(2);
  175 + // 异步请求获取表格数据
  176 + $.get('/lineVersions',params,function(result){
  177 + // 添加序号
  178 + result.content.page = page;
  179 + // 把数据填充到模版中
182 $.each(result.content, function(i, data) { 180 $.each(result.content, function(i, data) {
183 result.content[i].gsmc = companyMap[data.line.company]; 181 result.content[i].gsmc = companyMap[data.line.company];
184 result.content[i].fgsmc = branchMap[data.line.cgsbm]; 182 result.content[i].fgsmc = branchMap[data.line.cgsbm];
@@ -186,169 +184,172 @@ @@ -186,169 +184,172 @@
186 data.endDateStr=moment(data.endDate).format('YYYY-MM-DD HH:mm:ss'); 184 data.endDateStr=moment(data.endDate).format('YYYY-MM-DD HH:mm:ss');
187 }); 185 });
188 186
189 - var tbodyHtml = template('lineversions_list_temp',{list:result.content});  
190 - $('#datatable_lineversions tbody').html(tbodyHtml);  
191 - // 是重新分页且返回数据长度大于0  
192 - if(isPon && result.content.length > 0){  
193 - // 重新分页  
194 - initPag = true;  
195 - // 分页栏  
196 - showPagination(result);  
197 - }  
198 - // 关闭弹出加载层  
199 - layer.close(i);  
200 - });  
201 - } 187 + var tbodyHtml = template('lineversions_list_temp',{list:result.content});
  188 + $('#datatable_lineversions tbody').html(tbodyHtml);
  189 + // 是重新分页且返回数据长度大于0
  190 + if(isPon && result.content.length > 0){
  191 + // 重新分页
  192 + initPag = true;
  193 + // 分页栏
  194 + showPagination(result);
  195 + }
  196 + // 关闭弹出加载层
  197 + layer.close(i);
  198 + });
  199 + }
  200 +
202 201
  202 + function toDate(timestamp){
  203 + var date = new Date(parseInt(timestamp).toLocaleString());
  204 + return date;
  205 + }
203 206
204 - function toDate(timestamp){  
205 - var date = new Date(parseInt(timestamp).toLocaleString());  
206 - return date;  
207 - }  
208 -  
209 - /** 复选框组件 */  
210 - function iCheckChange(){  
211 - // 获取当前的父节点tr  
212 - var tr = $(this).parents('tr');  
213 - // 判断当前是否选中  
214 - if(this.checked) {  
215 - // 选中,则增添父节点tr的样式  
216 - tr.addClass('row-active');  
217 - }else {  
218 - // 未选中,则删除父节点tr的样式  
219 - tr.removeClass('row-active');  
220 - }  
221 - }  
222 -  
223 - /** 分页栏组件 */  
224 - function showPagination(data){  
225 - // 分页组件  
226 - $('#pagination').jqPaginator({  
227 - // 总页数  
228 - totalPages: data.totalPages,  
229 - // 中间显示页数  
230 - visiblePages: 6,  
231 - // 当前页  
232 - currentPage: page + 1,  
233 - first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>', 207 + /** 复选框组件 */
  208 + function iCheckChange(){
  209 + // 获取当前的父节点tr
  210 + var tr = $(this).parents('tr');
  211 + // 判断当前是否选中
  212 + if(this.checked) {
  213 + // 选中,则增添父节点tr的样式
  214 + tr.addClass('row-active');
  215 + }else {
  216 + // 未选中,则删除父节点tr的样式
  217 + tr.removeClass('row-active');
  218 + }
  219 + }
  220 +
  221 + /** 分页栏组件 */
  222 + function showPagination(data){
  223 + // 分页组件
  224 + $('#pagination').jqPaginator({
  225 + // 总页数
  226 + totalPages: data.totalPages,
  227 + // 中间显示页数
  228 + visiblePages: 6,
  229 + // 当前页
  230 + currentPage: page + 1,
  231 + first: '<li class="first"><a href="javascript:void(0);">首页<\/a><\/li>',
234 prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>', 232 prev: '<li class="prev"><a href="javascript:void(0);">上一页<\/a><\/li>',
235 next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>', 233 next: '<li class="next"><a href="javascript:void(0);">下一页<\/a><\/li>',
236 last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>', 234 last: '<li class="last"><a href="javascript:void(0);">尾页<\/a><\/li>',
237 page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>', 235 page: '<li class="page"><a href="javascript:void(0);">{{page}}<\/a><\/li>',
238 - onPageChange: function (num, type) {  
239 - if(initPag){  
240 - initPag = false;  
241 - return;  
242 - }  
243 - var pData = getParams();  
244 - pData['line.name_like'] = splitxlName(pData['line.name_like']);  
245 - page = num - 1;  
246 - loadTableDate(pData, false);  
247 - }  
248 - });  
249 - }  
250 - /** 填充分公司下拉框选择值 */  
251 - function setBrancheCompanySelectOptions(){  
252 - // 获取公司下拉框选择值  
253 - var businessCode = $('#companySelect').val();  
254 - // 分公司下拉框options属性值  
255 - var options = '<option value="">请选择...</option>';  
256 - // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码  
257 - if(businessCode == null || businessCode ==''){  
258 - // 填充分公司下拉框options  
259 - $('#brancheCompanySelect').html(options);  
260 - } else {  
261 - /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */  
262 - $get('/business/all', {upCode_eq: businessCode}, function(array){  
263 - // 遍历array  
264 - $.each(array, function(i,d){  
265 - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';  
266 - // 填充分公司下拉框options  
267 - $('#brancheCompanySelect').html(options);  
268 - });  
269 - });  
270 - }  
271 - }  
272 -  
273 - /** 重置按钮事件 */  
274 - $('tr.filter .filter-cancel').on('click',function() {  
275 - // 清空搜索框值  
276 - $('tr.filter input,select').val('').change();  
277 - $('.tipso-animation').tipso('hide');  
278 - storage.setItem('xlName_AgursData','');  
279 - /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */  
280 - loadTableDate(null,true);  
281 - });  
282 -  
283 - function splitxlName(str) {  
284 - var rsStr = '';  
285 - if(str) {  
286 - var strArray = str.split('_');  
287 - rsStr = strArray[0];  
288 - }  
289 - return rsStr;  
290 - }  
291 -  
292 -  
293 - /** 搜索按钮事件 */  
294 - $('tr.filter .filter-submit').on('click',function(){  
295 - var params = getParams();  
296 - if(params['line.name_like']!='' && params['line.name_like'] != null) {  
297 - storage.setItem('xlName_AgursData',params['line.name_like']);  
298 - }  
299 - params['line.name_like'] = splitxlName(params['line.name_like']);  
300 - page = 0;  
301 - /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */  
302 - loadTableDate(params,true);  
303 - });  
304 - 236 + onPageChange: function (num, type) {
  237 + if(initPag){
  238 + initPag = false;
  239 + return;
  240 + }
  241 + var pData = getParams();
  242 + pData['line.name_like'] = splitxlName(pData['line.name_like']);
  243 + page = num - 1;
  244 + loadTableDate(pData, false);
  245 + }
  246 + });
  247 + }
  248 + /** 填充分公司下拉框选择值 */
  249 + function setBrancheCompanySelectOptions(){
  250 + // 获取公司下拉框选择值
  251 + var businessCode = $('#companySelect').val();
  252 + // 分公司下拉框options属性值
  253 + var options = '<option value="">请选择...</option>';
  254 + // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码
  255 + if(businessCode == null || businessCode ==''){
  256 + // 填充分公司下拉框options
  257 + $('#brancheCompanySelect').html(options);
  258 + } else {
  259 + /** 查询出所属公司下的分公司名称和相应分公司代码 @param:<upCode_eq:公司代码> */
  260 + $get('/business/all', {upCode_eq: businessCode}, function(array){
  261 + // 遍历array
  262 + $.each(array, function(i,d){
  263 + options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
  264 + // 填充分公司下拉框options
  265 + $('#brancheCompanySelect').html(options);
  266 + });
  267 + });
  268 + }
  269 + }
  270 +
  271 + /** 重置按钮事件 */
  272 + $('tr.filter .filter-cancel').on('click',function() {
  273 + // 清空搜索框值
  274 + $('tr.filter input,select').val('').change();
  275 + $('.tipso-animation').tipso('hide');
  276 + storage.setItem('xlName_AgursData','');
  277 + /** 表格数据分页加载 @param:<null:搜索参数;true:是否重新分页> */
  278 + loadTableDate(null,true);
  279 + });
305 280
306 -function updateVersionsRoute(obj){  
307 - var lineId = obj.dataset.lineid;  
308 - swal({  
309 - title: "操作须知",  
310 - text: "每周会更新数据,请在本周内做完线路走向并发布,不然您做的走向有可能会被覆盖!",  
311 - type: "warning",  
312 - showCancelButton: true,  
313 - confirmButtonColor: "#DD6B55",  
314 - confirmButtonText: "知道了!",  
315 - cancelButtonText: "不懂!",  
316 - closeOnConfirm: false },  
317 - function(isConfirm){  
318 - if(isConfirm){  
319 - var win1 = window.open("http://114.80.178.12:29088/login2.html","线路信息编辑","false");  
320 - setTimeout(function(){  
321 - window.open("http://114.80.178.12:29088/pages/base/stationroute/list.html?no="+lineId,"线路信息编辑","false");  
322 - },1500);  
323 - swal.close();  
324 - }  
325 - });  
326 -} 281 + function splitxlName(str) {
  282 + var rsStr = '';
  283 + if(str) {
  284 + var strArray = str.split('_');
  285 + rsStr = strArray[0];
  286 + }
  287 + return rsStr;
  288 + }
327 289
328 -function issueBnt(id){  
329 - swal({  
330 - title: "发布说明",  
331 - text: "重复发布会覆盖已有的数据,请确认线路信息正确后发布,发布后需要几分钟后才能再次发布!",  
332 - type: "warning",  
333 - showCancelButton: true,  
334 - confirmButtonColor: "#DD6B55",  
335 - confirmButtonText: "确定发布!",  
336 - cancelButtonText: "取消发布!",  
337 - closeOnConfirm: false },  
338 - function(){  
339 - $.post('/lineVersions/issueVersion',{'id':id},function(result){  
340 - if(result.status=='SUCCESS') {  
341 - // 弹出添加成功提示消息  
342 - swal("发布!", "线路站点及走向已发布至历史库,待到版本启用时间自动更新。", "success");  
343 - } else if(result.status=='ERROR') {  
344 - // 弹出添加失败提示消息  
345 - swal("发布失败!", "您发布的信息可能有误,请检查!", "ERROR");  
346 - }  
347 -// loadPage('list.html');  
348 - // 发布后刷新页面  
349 - var pData = getParams();  
350 - pData['line.name_like'] = splitxlName(pData['line.name_like']);  
351 - loadTableDate(pData, false);  
352 - });  
353 - });  
354 -}  
355 \ No newline at end of file 290 \ No newline at end of file
  291 +
  292 + /** 搜索按钮事件 */
  293 + $('tr.filter .filter-submit').on('click',function(){
  294 + var params = getParams();
  295 + if(params['line.name_like']!='' && params['line.name_like'] != null) {
  296 + storage.setItem('xlName_AgursData',params['line.name_like']);
  297 + }
  298 + params['line.name_like'] = splitxlName(params['line.name_like']);
  299 + page = 0;
  300 + /** 表格数据分页加载 @param:<params:搜索参数;true:是否重新分页> */
  301 + loadTableDate(params,true);
  302 + });
  303 + // 线路版本编辑
  304 + $(document).on('click', 'a.update_versions_route_btn', function () {
  305 + debugger
  306 + var lineId = $(this).data('lineid');
  307 + swal({
  308 + title: "操作须知",
  309 + text: "每周会更新数据,请在本周内做完线路走向并发布,不然您做的走向有可能会被覆盖!",
  310 + type: "warning",
  311 + showCancelButton: true,
  312 + confirmButtonColor: "#DD6B55",
  313 + confirmButtonText: "知道了!",
  314 + cancelButtonText: "不懂!",
  315 + closeOnConfirm: false },
  316 + function(isConfirm){
  317 + if(isConfirm){
  318 + var win1 = window.open("http://114.80.178.12:29088/login2.html","线路信息编辑","false");
  319 + setTimeout(function(){
  320 + window.open("http://114.80.178.12:29088/pages/base/stationroute/list.html?no="+lineId,"线路信息编辑","false");
  321 + },1500);
  322 + swal.close();
  323 + }
  324 + });
  325 + });
  326 + // 版本发布
  327 + $(document).on('click', 'a.issue_btn', function () {
  328 + debugger
  329 + var id = $(this).data('id');
  330 + swal({
  331 + title: "发布说明",
  332 + text: "重复发布会覆盖已有的数据,请确认线路信息正确后发布,发布后需要几分钟后才能再次发布!",
  333 + type: "warning",
  334 + showCancelButton: true,
  335 + confirmButtonColor: "#DD6B55",
  336 + confirmButtonText: "确定发布!",
  337 + cancelButtonText: "取消发布!",
  338 + closeOnConfirm: false },
  339 + function(){
  340 + $.post('/lineVersions/issueVersion',{'id':id},function(result){
  341 + if(result.status=='SUCCESS') {
  342 + // 弹出添加成功提示消息
  343 + swal("发布!", "线路站点及走向已发布至历史库,待到版本启用时间自动更新。", "success");
  344 + } else if(result.status=='ERROR') {
  345 + // 弹出添加失败提示消息
  346 + swal("发布失败!", "您发布的信息可能有误,请检查!", "ERROR");
  347 + }
  348 + // loadPage('list.html');
  349 + // 发布后刷新页面
  350 + var pData = getParams();
  351 + pData['line.name_like'] = splitxlName(pData['line.name_like']);
  352 + loadTableDate(pData, false);
  353 + });
  354 + });
  355 + });
  356 +})();
356 \ No newline at end of file 357 \ No newline at end of file
src/main/resources/static/pages/base/lineversions/list.html
@@ -119,75 +119,9 @@ @@ -119,75 +119,9 @@
119 </td> 119 </td>
120 <td> 120 <td>
121 {{obj.gsmc}} 121 {{obj.gsmc}}
122 - <!--{{if obj.line.company == '55'}}  
123 - 上南公司  
124 - {{else if obj.line.company == '22'}}  
125 - 金高公司  
126 - {{else if obj.line.company == '05'}}  
127 - 杨高公司  
128 - {{else if obj.line.company == '26'}}  
129 - 南汇公司  
130 - {{else if obj.line.company == '77'}}  
131 - 闵行公司  
132 - {{/if}}-->  
133 </td> 122 </td>
134 <td> 123 <td>
135 {{obj.fgsmc}} 124 {{obj.fgsmc}}
136 - <!--{{if obj.line.company == '55'}}  
137 -  
138 - {{if obj.line.brancheCompany == '1'}}  
139 - 上南二分公司  
140 - {{else if obj.line.brancheCompany == '2'}}  
141 - 上南三分公司  
142 - {{else if obj.line.brancheCompany == '3'}}  
143 - 上南六分公司  
144 - {{else if obj.line.brancheCompany == '4'}}  
145 - 上南一分公司  
146 - {{/if}}  
147 -  
148 - {{else if obj.company == '22'}}  
149 -  
150 - {{if obj.line.brancheCompany == '1'}}  
151 - 四分公司  
152 - {{else if obj.line.brancheCompany == '2'}}  
153 - 二分公司  
154 - {{else if obj.line.brancheCompany == '3'}}  
155 - 三分公司  
156 - {{else if obj.line.brancheCompany == '5'}}  
157 - 一分公司  
158 - {{/if}}  
159 -  
160 - {{else if obj.line.company == '05'}}  
161 -  
162 - {{if obj.line.brancheCompany == '1'}}  
163 - 川沙分公司  
164 - {{else if obj.line.brancheCompany == '2'}}  
165 - 金桥分公司  
166 - {{else if obj.line.brancheCompany == '3'}}  
167 - 芦潮港分公司  
168 - {{else if obj.line.brancheCompany == '5'}}  
169 - 杨高分公司  
170 - {{else if obj.line.brancheCompany == '6'}}  
171 - 周浦分公司  
172 - {{/if}}  
173 -  
174 - {{else if obj.line.company == '26'}}  
175 -  
176 - {{if obj.line.brancheCompany == '1'}}  
177 - 南汇一分  
178 - {{else if obj.line.brancheCompany == '2'}}  
179 - 南汇二分  
180 - {{else if obj.line.brancheCompany == '3'}}  
181 - 南汇三分  
182 - {{else if obj.line.brancheCompany == '4'}}  
183 - 南汇维修公司  
184 - {{else if obj.line.brancheCompany == '5'}}  
185 - 南汇公司  
186 - {{else if obj.brancheCompany == '6'}}  
187 - 航头枢纽站  
188 - {{/if}}  
189 -  
190 - {{/if}}-->  
191 </td> 125 </td>
192 <td> 126 <td>
193 {{obj.startDateStr}} 127 {{obj.startDateStr}}
@@ -213,10 +147,10 @@ @@ -213,10 +147,10 @@
213 <td> 147 <td>
214 <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a> 148 <a href="edit.html?no={{obj.id}}" class="btn default blue-stripe btn-sm" data-pjax> 修改 </a>
215 {{if obj.status == '2'}} 149 {{if obj.status == '2'}}
216 - <a class="btn default blue-stripe btn-sm" data-lineid="{{obj.line.id}}" onclick="updateVersionsRoute(this)" data-pjax> 编辑版本路线 </a> 150 + <a class="update_versions_route_btn btn default blue-stripe btn-sm" data-lineid="{{obj.line.id}}" data-pjax> 编辑版本路线 </a>
217 {{/if}} 151 {{/if}}
218 {{if obj.status == '2' && obj.isupdate!=1}} 152 {{if obj.status == '2' && obj.isupdate!=1}}
219 - <a class="btn btn-danger btn-sm" onclick = "issueBnt({{obj.id}})" data-pjax>发布</a> 153 + <a class="issue_btn btn btn-danger btn-sm" data-id="{{obj.id}}" data-pjax>发布</a>
220 {{else if obj.status == '2' && obj.isupdate==1}} 154 {{else if obj.status == '2' && obj.isupdate==1}}
221 <a class="btn btn-danger btn-sm disabled">数据同步中</a> 155 <a class="btn btn-danger btn-sm disabled">数据同步中</a>
222 {{/if}} 156 {{/if}}
src/main/resources/static/pages/forms/mould/shifday.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanth.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanthclzbh.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanthspy.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/timeAndSpeed.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
@@ -170,14 +170,6 @@ @@ -170,14 +170,6 @@
170 if (!$('body').hasClass('page-sidebar-closed')) 170 if (!$('body').hasClass('page-sidebar-closed'))
171 $('.menu-toggler.sidebar-toggler').click(); 171 $('.menu-toggler.sidebar-toggler').click();
172 172
173 - $("#startDate").datetimepicker({  
174 - format : 'YYYY-MM-DD',  
175 - locale : 'zh-cn'  
176 - });  
177 - $("#endDate").datetimepicker({  
178 - format : 'YYYY-MM-DD',  
179 - locale : 'zh-cn'  
180 - });  
181 173
182 $("#times1").datetimepicker({ 174 $("#times1").datetimepicker({
183 format : 'HH:mm', 175 format : 'HH:mm',
@@ -189,6 +181,7 @@ @@ -189,6 +181,7 @@
189 }); 181 });
190 182
191 var d = new Date(); 183 var d = new Date();
  184 + d.setTime(d.getTime() - 1*1000*60*60*24);
192 var year = d.getFullYear(); 185 var year = d.getFullYear();
193 var month = d.getMonth() + 1; 186 var month = d.getMonth() + 1;
194 var day = d.getDate(); 187 var day = d.getDate();
@@ -196,8 +189,19 @@ @@ -196,8 +189,19 @@
196 month = "0" + month; 189 month = "0" + month;
197 if(day < 10) 190 if(day < 10)
198 day = "0" + day; 191 day = "0" + day;
199 - $("#startDate").val(year + "-" + month + "-" + day);  
200 - $("#endDate").val(year + "-" + month + "-" + day); 192 + var dateTime = year + "-" + month + "-" + day;
  193 + $("#startDate").datetimepicker({
  194 + format : 'YYYY-MM-DD',
  195 + locale : 'zh-cn',
  196 + maxDate : dateTime
  197 + });
  198 + $("#endDate").datetimepicker({
  199 + format : 'YYYY-MM-DD',
  200 + locale : 'zh-cn',
  201 + maxDate : dateTime
  202 + });
  203 + $("#startDate").val(dateTime);
  204 + $("#endDate").val(dateTime);
201 205
202 $("#times1").val("05:00"); 206 $("#times1").val("05:00");
203 $("#times2").val("23:00"); 207 $("#times2").val("23:00");
@@ -391,7 +395,8 @@ @@ -391,7 +395,8 @@
391 var tbodyHtml = template('list_lineTimeAnaly',{list:result}); 395 var tbodyHtml = template('list_lineTimeAnaly',{list:result});
392 // 把渲染好的模版html文本追加到表格中 396 // 把渲染好的模版html文本追加到表格中
393 $('#forms tbody').html(tbodyHtml); 397 $('#forms tbody').html(tbodyHtml);
394 - 398 + $("#works_hidden").addClass("hidden");
  399 + $("#printArea").addClass("hidden");
395 list = result; 400 list = result;
396 }); 401 });
397 402
@@ -413,6 +418,7 @@ @@ -413,6 +418,7 @@
413 $('#works tbody').html(tbodyHtml); 418 $('#works tbody').html(tbodyHtml);
414 $("#works_hidden").removeClass("hidden"); 419 $("#works_hidden").removeClass("hidden");
415 $("#works .hidden").removeClass("hidden"); 420 $("#works .hidden").removeClass("hidden");
  421 + $("#printArea").removeClass("hidden");
416 $("#date1").html(g.dates); 422 $("#date1").html(g.dates);
417 $("#line1").html(g.line); 423 $("#line1").html(g.line);
418 $("#lp1").html(g.lp); 424 $("#lp1").html(g.lp);
src/main/resources/static/pages/report/countInterval/countInterval.html
@@ -314,7 +314,7 @@ @@ -314,7 +314,7 @@
314 {{/each}} 314 {{/each}}
315 {{if list.length == 0}} 315 {{if list.length == 0}}
316 <tr> 316 <tr>
317 - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 317 + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
318 </tr> 318 </tr>
319 {{/if}} 319 {{/if}}
320 </script> 320 </script>