Commit 35068d05e7cd68a4791a8dc1ebd284dfb62e92ed

Authored by mcy123
2 parents 46ae344a 9f277f10

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

Showing 45 changed files with 2366 additions and 850 deletions
src/main/java/com/bsth/controller/realcontrol/RealMapController.java
@@ -35,4 +35,17 @@ public class RealMapController { @@ -35,4 +35,17 @@ public class RealMapController {
35 public Map<String, Object> carParkSpatialData(){ 35 public Map<String, Object> carParkSpatialData(){
36 return realMapService.carParkSpatialData(); 36 return realMapService.carParkSpatialData();
37 } 37 }
  38 +
  39 +
  40 + /**
  41 + *
  42 + * @Title: findRouteByLine
  43 + * @Description: TODO(获取线路的站点,路段路由)
  44 + * @param @param lineCode
  45 + * @throws
  46 + */
  47 + @RequestMapping(value = "/findRouteByLine")
  48 + public Map<String, Object> findRouteByLine(@RequestParam String lineCode){
  49 + return realMapService.findRouteByLine(lineCode);
  50 + }
38 } 51 }
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo, @@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
351 @RequestMapping(value="/queryListWaybill") 351 @RequestMapping(value="/queryListWaybill")
352 public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName 352 public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
353 ,@RequestParam String date){ 353 ,@RequestParam String date){
354 - return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date); 354 + String type="fqp";
  355 + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type);
  356 + }
  357 +
  358 + @RequestMapping(value="/queryListWaybillQp")
  359 + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
  360 + ,@RequestParam String date){
  361 + String type="qp";
  362 + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type);
355 } 363 }
356 364
357 @RequestMapping(value="/statisticsDaily") 365 @RequestMapping(value="/statisticsDaily")
src/main/java/com/bsth/controller/schedule/PeopleCarPlanController.java
@@ -20,33 +20,33 @@ public class PeopleCarPlanController { @@ -20,33 +20,33 @@ public class PeopleCarPlanController {
20 private PeopleCarPlanService peopleCarPlanService; 20 private PeopleCarPlanService peopleCarPlanService;
21 21
22 @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET) 22 @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET)
23 - public List<Map<String,Object>> queryPeopleCar(@RequestParam String line, @RequestParam String date, @RequestParam String type){  
24 - return peopleCarPlanService.queryPeopleCar(line, date, type); 23 + public List<Map<String,Object>> queryPeopleCar(@RequestParam Map<String, Object> map){
  24 + return peopleCarPlanService.queryPeopleCar(map);
25 } 25 }
26 26
27 @RequestMapping(value="/workDaily", method = RequestMethod.GET) 27 @RequestMapping(value="/workDaily", method = RequestMethod.GET)
28 - public List<Map<String,Object>> workDaily(@RequestParam String line, @RequestParam String date, @RequestParam String type){  
29 - return peopleCarPlanService.workDaily(line, date, type); 28 + public List<Map<String,Object>> workDaily(@RequestParam Map<String, Object> map){
  29 + return peopleCarPlanService.workDaily(map);
30 } 30 }
31 31
32 @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) 32 @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET)
33 - public Map<String, Object> scheduleAnaly(@RequestParam String page, @RequestParam String line, @RequestParam String startDate, @RequestParam String endDate, @RequestParam String model, @RequestParam String type){  
34 - return peopleCarPlanService.scheduleAnaly(page, line, startDate, endDate, model, type); 33 + public Map<String, Object> scheduleAnaly(@RequestParam Map<String, Object> map){
  34 + return peopleCarPlanService.scheduleAnaly(map);
35 } 35 }
36 36
37 @RequestMapping(value="/getModel", method = RequestMethod.GET) 37 @RequestMapping(value="/getModel", method = RequestMethod.GET)
38 - public List<Map<String,Object>> getModel(@RequestParam String line, @RequestParam String startDate, @RequestParam String endDate){  
39 - return peopleCarPlanService.getModel(line, startDate, endDate); 38 + public List<Map<String,Object>> getModel(@RequestParam Map<String, Object> map){
  39 + return peopleCarPlanService.getModel(map);
40 } 40 }
41 41
42 @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET) 42 @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET)
43 - public List<Map<String,Object>> firstAndLastBus(@RequestParam String line, @RequestParam String date, @RequestParam String type){  
44 - return peopleCarPlanService.firstAndLastBus(line, date, type); 43 + public List<Map<String,Object>> firstAndLastBus(@RequestParam Map<String, Object> map){
  44 + return peopleCarPlanService.firstAndLastBus(map);
45 } 45 }
46 46
47 @RequestMapping(value="/commandState", method = RequestMethod.GET) 47 @RequestMapping(value="/commandState", method = RequestMethod.GET)
48 - public List<Map<String,Object>> commandState(@RequestParam String line, @RequestParam String date, @RequestParam String code){  
49 - return peopleCarPlanService.commandState(line, date, code); 48 + public List<Map<String,Object>> commandState(@RequestParam Map<String, Object> map){
  49 + return peopleCarPlanService.commandState(map);
50 } 50 }
51 51
52 } 52 }
src/main/java/com/bsth/entity/oil/Ylxxb.java
@@ -10,6 +10,8 @@ import javax.persistence.Transient; @@ -10,6 +10,8 @@ import javax.persistence.Transient;
10 10
11 import org.springframework.format.annotation.DateTimeFormat; 11 import org.springframework.format.annotation.DateTimeFormat;
12 12
  13 +import com.bsth.data.BasicData;
  14 +
13 @Entity 15 @Entity
14 @Table(name = "bsth_c_ylxxb") 16 @Table(name = "bsth_c_ylxxb")
15 public class Ylxxb { 17 public class Ylxxb {
@@ -38,6 +40,10 @@ public class Ylxxb { @@ -38,6 +40,10 @@ public class Ylxxb {
38 private String ldgh; 40 private String ldgh;
39 //0为接口数据,1为手工输入 41 //0为接口数据,1为手工输入
40 private int jylx=0; 42 private int jylx=0;
  43 + @Transient
  44 + private String gsname;
  45 + @Transient
  46 + private String fgsname;
41 47
42 48
43 public Integer getId() { 49 public Integer getId() {
@@ -163,6 +169,20 @@ public class Ylxxb { @@ -163,6 +169,20 @@ public class Ylxxb {
163 this.jylx = jylx; 169 this.jylx = jylx;
164 } 170 }
165 171
  172 + public String getGsname() {
  173 + return BasicData.businessCodeNameMap.get(this.gsdm);
  174 + }
  175 +
  176 + public void setGsname(String gsname) {
  177 + this.gsname = gsname;
  178 + }
166 179
  180 + public String getFgsname() {
  181 + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm);
  182 + }
  183 +
  184 + public void setFgsname(String fgsname) {
  185 + this.fgsname = fgsname;
  186 + }
167 187
168 } 188 }
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper; @@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper;
18 import org.springframework.stereotype.Service; 18 import org.springframework.stereotype.Service;
19 19
20 import com.bsth.entity.realcontrol.ScheduleRealInfo; 20 import com.bsth.entity.realcontrol.ScheduleRealInfo;
21 -import com.bsth.entity.schedule.TTInfoDetail;  
22 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; 21 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
23 import com.bsth.service.BusIntervalService; 22 import com.bsth.service.BusIntervalService;
24 import com.bsth.service.schedule.PeopleCarPlanService; 23 import com.bsth.service.schedule.PeopleCarPlanService;
@@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
39 private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 38 private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
40 private DecimalFormat df = new DecimalFormat("##0.00"); 39 private DecimalFormat df = new DecimalFormat("##0.00");
41 40
42 - public List<ScheduleRealInfo> getSchedule(String line, String startDate, String endDate, String model, String times){  
43 - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); 41 + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String startDate, String endDate, String model, String times){
  42 + List<Long> ttList = new ArrayList<Long>();
44 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 43 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
45 List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); 44 List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>();
46 45
@@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
54 String[] split = times.split("-"); 53 String[] split = times.split("-");
55 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; 54 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'";
56 } 55 }
  56 + if(company.length() != 0){
  57 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  58 + }
57 sql += " and bc_type = 'normal'"; 59 sql += " and bc_type = 'normal'";
58 60
59 list =jdbcTemplate.query(sql, 61 list =jdbcTemplate.query(sql,
@@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService {
85 schedule.setClZbh(rs.getString("cl_zbh")); 87 schedule.setClZbh(rs.getString("cl_zbh"));
86 schedule.setjGh(rs.getString("j_gh")); 88 schedule.setjGh(rs.getString("j_gh"));
87 schedule.setjName(rs.getString("j_name")); 89 schedule.setjName(rs.getString("j_name"));
  90 + schedule.setSpId(rs.getLong("sp_id"));
88 return schedule; 91 return schedule;
89 } 92 }
90 }); 93 });
91 94
92 if(model.length() != 0){ 95 if(model.length() != 0){
93 - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; 96 +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'";
  97 + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'";
94 98
95 ttList =jdbcTemplate.query(sql, 99 ttList =jdbcTemplate.query(sql,
96 - new RowMapper<TTInfoDetail>(){ 100 + new RowMapper<Long>(){
97 @Override 101 @Override
98 - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException {  
99 - TTInfoDetail ttInfo = new TTInfoDetail();  
100 - ttInfo.setBcType(rs.getString("bc_type"));  
101 - ttInfo.setBcs(rs.getInt("bcs"));  
102 - ttInfo.setFcsj(rs.getString("fcsj"));  
103 - ttInfo.setBcsj(rs.getInt("bcsj"));  
104 - return ttInfo; 102 + public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
  103 + return rs.getLong("id");
105 } 104 }
106 }); 105 });
107 } 106 }
@@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
133 } 132 }
134 DO:{ 133 DO:{
135 if(model.length() != 0){ 134 if(model.length() != 0){
136 - for(TTInfoDetail tt : ttList){  
137 - if(tt.getBcs() == schedule.getBcs() && tt.getFcsj().equals(schedule.getFcsj())  
138 - && tt.getBcsj() == schedule.getBcsj()){  
139 - resList.add(schedule);  
140 - break DO; 135 + for(Long tt : ttList){
  136 + if(tt == schedule.getSpId()){
  137 + resList.add(schedule);
  138 + break DO;
141 } 139 }
142 } 140 }
143 } else { 141 } else {
@@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
210 public List<Map<String, Object>> interval(Map<String, Object> map) { 208 public List<Map<String, Object>> interval(Map<String, Object> map) {
211 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 209 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
212 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 210 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
213 - 211 +
  212 + String company = map.get("company").toString();
  213 + String subCompany = map.get("subCompany").toString();
214 String line = map.get("line").toString(); 214 String line = map.get("line").toString();
215 String startDate = map.get("startDate").toString(); 215 String startDate = map.get("startDate").toString();
216 String endDate = map.get("endDate").toString(); 216 String endDate = map.get("endDate").toString();
@@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
228 times = "06:00-07:00"; 228 times = "06:00-07:00";
229 } 229 }
230 230
231 - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); 231 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times);
232 232
233 String[] date1 = startDate.split("-"); 233 String[] date1 = startDate.split("-");
234 String[] date2 = endDate.split("-"); 234 String[] date2 = endDate.split("-");
@@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
254 long sjInterval = 0; 254 long sjInterval = 0;
255 int jhNum = 0; 255 int jhNum = 0;
256 int sjNum = 0; 256 int sjNum = 0;
257 - String company = "", subCompany = ""; 257 + String companyName = "", subCompanyName = "";
258 Map<String, Object> tempMap = new HashMap<String, Object>(); 258 Map<String, Object> tempMap = new HashMap<String, Object>();
259 Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>(); 259 Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>();
260 for(ScheduleRealInfo schedule : keyMap.get(key)){ 260 for(ScheduleRealInfo schedule : keyMap.get(key)){
@@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
269 jhNum++; 269 jhNum++;
270 ScheduleRealInfo schedule1 = tempList.get(i - 1); 270 ScheduleRealInfo schedule1 = tempList.get(i - 1);
271 ScheduleRealInfo schedule2 = tempList.get(i); 271 ScheduleRealInfo schedule2 = tempList.get(i);
272 - if(schedule1.getGsName() != null && company.length() == 0)  
273 - company = schedule1.getGsName();  
274 - if(schedule1.getFgsName() != null && subCompany.length() == 0)  
275 - subCompany = schedule1.getFgsName(); 272 +
  273 + if(schedule1.getGsName() != null && companyName.length() == 0)
  274 + companyName = schedule1.getGsName();
  275 + if(schedule1.getFgsName() != null && subCompanyName.length() == 0)
  276 + subCompanyName = schedule1.getFgsName();
  277 +
276 jhInterval += schedule2.getFcsjT(); 278 jhInterval += schedule2.getFcsjT();
277 jhInterval -= schedule1.getFcsjT(); 279 jhInterval -= schedule1.getFcsjT();
278 if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){ 280 if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){
@@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
290 tempMap.put("line", keys[0]); 292 tempMap.put("line", keys[0]);
291 tempMap.put("qdz", keys[1]); 293 tempMap.put("qdz", keys[1]);
292 tempMap.put("times", times); 294 tempMap.put("times", times);
293 - tempMap.put("company", company);  
294 - tempMap.put("subCompany", subCompany); 295 + tempMap.put("company", companyName);
  296 + tempMap.put("subCompany", subCompanyName);
295 if(jhNum != 0) 297 if(jhNum != 0)
296 tempMap.put("jhInterval", jhInterval/jhNum); 298 tempMap.put("jhInterval", jhInterval/jhNum);
297 else 299 else
@@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
333 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 335 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
334 Map<String, Object> modelMap = new HashMap<String, Object>(); 336 Map<String, Object> modelMap = new HashMap<String, Object>();
335 337
  338 + String company = map.get("company").toString();
  339 + String subCompany = map.get("subCompany").toString();
336 String line = map.get("line").toString(); 340 String line = map.get("line").toString();
337 String startDate = map.get("startDate").toString(); 341 String startDate = map.get("startDate").toString();
338 String endDate = map.get("endDate").toString(); 342 String endDate = map.get("endDate").toString();
@@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
351 times = "06:00-07:00"; 355 times = "06:00-07:00";
352 } 356 }
353 357
354 - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); 358 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times);
355 359
356 String[] date1 = startDate.split("-"); 360 String[] date1 = startDate.split("-");
357 String[] date2 = endDate.split("-"); 361 String[] date2 = endDate.split("-");
@@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
389 double yssd = 0; 393 double yssd = 0;
390 int yyNum = 0; 394 int yyNum = 0;
391 int ysNum = 0; 395 int ysNum = 0;
392 - String company = "", subCompany = ""; 396 + String companyName = "", subCompanyName = "";
393 for(ScheduleRealInfo schedule : keyMap.get(key)){ 397 for(ScheduleRealInfo schedule : keyMap.get(key)){
394 - if(schedule.getGsName() != null && company.length() == 0)  
395 - company = schedule.getGsName();  
396 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
397 - subCompany = schedule.getFgsName(); 398 + if(schedule.getGsName() != null && companyName.length() == 0)
  399 + companyName = schedule.getGsName();
  400 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  401 + subCompanyName = schedule.getFgsName();
398 if(!tempMap.containsKey("xlDir")) 402 if(!tempMap.containsKey("xlDir"))
399 tempMap.put("xlDir", schedule.getXlDir()); 403 tempMap.put("xlDir", schedule.getXlDir());
400 if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0")) 404 if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0"))
@@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
424 tempMap.put("line", keys[0]); 428 tempMap.put("line", keys[0]);
425 tempMap.put("lp", keys[1]); 429 tempMap.put("lp", keys[1]);
426 tempMap.put("zdz", keys[2]); 430 tempMap.put("zdz", keys[2]);
427 - tempMap.put("company", company);  
428 - tempMap.put("subCompany", subCompany); 431 + tempMap.put("company", companyName);
  432 + tempMap.put("subCompany", subCompanyName);
429 433
430 tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟"); 434 tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟");
431 yysjSum += yysj; 435 yysjSum += yysj;
@@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
465 List<Integer> keyList = new ArrayList<Integer>(); 469 List<Integer> keyList = new ArrayList<Integer>();
466 Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>(); 470 Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>();
467 for(Map<String, Object> m : keyMap2.get(key)){ 471 for(Map<String, Object> m : keyMap2.get(key)){
468 - Integer num = Integer.valueOf(m.get("lp").toString())*10+Integer.valueOf(m.get("xlDir").toString()); 472 + String lp = m.get("lp").toString();
  473 + String str = "";
  474 + for(int i = 0; i < lp.length(); i++){
  475 + str += (int)lp.charAt(i);
  476 + }
  477 + Integer num = Integer.valueOf(str)*10+Integer.valueOf(m.get("xlDir").toString());
469 if(!temp.containsKey(num)){ 478 if(!temp.containsKey(num)){
470 temp.put(num, new ArrayList<Map<String, Object>>()); 479 temp.put(num, new ArrayList<Map<String, Object>>());
471 keyList.add(num); 480 keyList.add(num);
@@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
494 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); 503 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>();
495 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); 504 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>();
496 505
  506 + String company = map.get("company").toString();
  507 + String subCompany = map.get("subCompany").toString();
497 String line = map.get("line").toString(); 508 String line = map.get("line").toString();
498 String startDate = map.get("startDate").toString(); 509 String startDate = map.get("startDate").toString();
499 String endDate = map.get("endDate").toString(); 510 String endDate = map.get("endDate").toString();
@@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
512 times = "06:00-07:00"; 523 times = "06:00-07:00";
513 } 524 }
514 525
515 - list = getSchedule(line, startDate, endDate, model, times); 526 + list = getSchedule(company, subCompany, line, startDate, endDate, model, times);
516 527
517 String[] date1 = startDate.split("-"); 528 String[] date1 = startDate.split("-");
518 String[] date2 = endDate.split("-"); 529 String[] date2 = endDate.split("-");
@@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
559 long sjtz = 0l; 570 long sjtz = 0l;
560 long tzsjMax = 0l; 571 long tzsjMax = 0l;
561 long tzsjMin = 0l; 572 long tzsjMin = 0l;
562 - String company = "", subCompany = ""; 573 + String companyName = "", subCompanyName = "";
563 for(ScheduleRealInfo schedule : keyMap.get(key)){ 574 for(ScheduleRealInfo schedule : keyMap.get(key)){
564 - if(schedule.getGsName() != null && company.length() == 0)  
565 - company = schedule.getGsName();  
566 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
567 - subCompany = schedule.getFgsName(); 575 + if(schedule.getGsName() != null && companyName.length() == 0)
  576 + companyName = schedule.getGsName();
  577 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  578 + subCompanyName = schedule.getFgsName();
568 long tzsj = 0l; 579 long tzsj = 0l;
569 long yssj = 0l; 580 long yssj = 0l;
570 jhbc++; 581 jhbc++;
@@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
618 tempMap.put("jhfc", keys[3]); 629 tempMap.put("jhfc", keys[3]);
619 tempMap.put("station", keys[4]); 630 tempMap.put("station", keys[4]);
620 tempMap.put("times", times); 631 tempMap.put("times", times);
621 - tempMap.put("company", company);  
622 - tempMap.put("subCompany", subCompany); 632 + tempMap.put("company", companyName);
  633 + tempMap.put("subCompany", subCompanyName);
623 if(startDate.equals(endDate)) 634 if(startDate.equals(endDate))
624 tempMap.put("dates", startDate); 635 tempMap.put("dates", startDate);
625 else 636 else
@@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
692 int wdfc2 = 0; 703 int wdfc2 = 0;
693 int ys = 0; 704 int ys = 0;
694 int tz = 0; 705 int tz = 0;
695 - String company = ""; 706 + String companyName = "", subCompanyName = "";
696 for(Map<String, Object> m : keyMap0.get(key)){ 707 for(Map<String, Object> m : keyMap0.get(key)){
697 - if(m.containsKey("company") && company.length() == 0)  
698 - company = m.get("company").toString(); 708 + if(m.containsKey("company") && companyName.length() == 0)
  709 + companyName = m.get("company").toString();
  710 + if(m.containsKey("subCompany") && subCompanyName.length() == 0)
  711 + subCompanyName = m.get("subCompany").toString();
699 jhbc += Integer.valueOf(m.get("jhbc").toString()); 712 jhbc += Integer.valueOf(m.get("jhbc").toString());
700 sjbc += Integer.valueOf(m.get("sjbc").toString()); 713 sjbc += Integer.valueOf(m.get("sjbc").toString());
701 wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1)); 714 wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1));
@@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
709 tempMap.put("dates", startDate); 722 tempMap.put("dates", startDate);
710 else 723 else
711 tempMap.put("dates", startDate + "--" + endDate); 724 tempMap.put("dates", startDate + "--" + endDate);
712 - tempMap.put("company", company); 725 + tempMap.put("company", companyName);
  726 + tempMap.put("subCompany", subCompanyName);
713 String[] keys = key.split("/"); 727 String[] keys = key.split("/");
714 tempMap.put("line", keys[0]); 728 tempMap.put("line", keys[0]);
715 tempMap.put("lp", keys[1]); 729 tempMap.put("lp", keys[1]);
@@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService {
733 747
734 for(String key : keyMap1.keySet()){ 748 for(String key : keyMap1.keySet()){
735 Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() { 749 Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() {
736 - 750 +
737 public int compare(Map<String, Object> o1, Map<String, Object> o2) { 751 public int compare(Map<String, Object> o1, Map<String, Object> o2) {
  752 + Integer a;
  753 + Integer b;
  754 + String lp1 = o1.get("lp").toString();
  755 + String lp2 = o2.get("lp").toString();
  756 + String str1 = "";
  757 + String str2 = "";
  758 + for(int i = 0; i < lp1.length(); i++){
  759 + str1 += (int)lp1.charAt(i);
  760 + }
  761 + for(int i = 0; i < lp2.length(); i++){
  762 + str2 += (int)lp2.charAt(i);
  763 + }
738 764
739 - Integer a = Integer.valueOf(o1.get("lp").toString());  
740 - Integer b = Integer.valueOf(o2.get("lp").toString()); 765 + a = Integer.valueOf(str1);
  766 + b = Integer.valueOf(str2);
741 767
742 // 升序 768 // 升序
743 return a.compareTo(b); 769 return a.compareTo(b);
@@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
757 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 783 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
758 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 784 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
759 785
  786 + String company = map.get("company").toString();
  787 + String subCompany = map.get("subCompany").toString();
760 String line = map.get("line").toString(); 788 String line = map.get("line").toString();
761 String startDate = map.get("startDate").toString(); 789 String startDate = map.get("startDate").toString();
762 String endDate = map.get("endDate").toString(); 790 String endDate = map.get("endDate").toString();
@@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
774 times = "06:00-07:00"; 802 times = "06:00-07:00";
775 } 803 }
776 804
777 - list = getSchedule(line, startDate, endDate, model, times); 805 + list = getSchedule(company, subCompany, line, startDate, endDate, model, times);
778 806
779 String[] date1 = startDate.split("-"); 807 String[] date1 = startDate.split("-");
780 String[] date2 = endDate.split("-"); 808 String[] date2 = endDate.split("-");
@@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
807 qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0, 835 qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0,
808 qhbc = 0, qhlc = 0, wybc = 0, wylc = 0; 836 qhbc = 0, qhlc = 0, wybc = 0, wylc = 0;
809 int qtbc = 0, qtlc = 0; 837 int qtbc = 0, qtlc = 0;
810 - String company = "", subCompany = ""; 838 + String companyName = "", subCompanyName = "";
811 for(ScheduleRealInfo schedule : keyMap.get(key)){ 839 for(ScheduleRealInfo schedule : keyMap.get(key)){
812 - if(schedule.getGsName() != null && company.length() == 0)  
813 - company = schedule.getGsName();  
814 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
815 - subCompany = schedule.getFgsName(); 840 + if(schedule.getGsName() != null && companyName.length() == 0)
  841 + companyName = schedule.getGsName();
  842 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  843 + subCompanyName = schedule.getFgsName();
816 jhbc++; 844 jhbc++;
817 if(schedule.getJhlc() != null) 845 if(schedule.getJhlc() != null)
818 jhlc += schedule.getJhlc(); 846 jhlc += schedule.getJhlc();
@@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
861 tempMap.put("date", startDate); 889 tempMap.put("date", startDate);
862 else 890 else
863 tempMap.put("date", startDate + "--" + endDate); 891 tempMap.put("date", startDate + "--" + endDate);
864 - tempMap.put("company", company);  
865 - tempMap.put("subCompany", subCompany); 892 + tempMap.put("company", companyName);
  893 + tempMap.put("subCompany", subCompanyName);
866 tempMap.put("times", times); 894 tempMap.put("times", times);
867 tempMap.put("line", key); 895 tempMap.put("line", key);
868 tempMap.put("jhbc", jhbc); 896 tempMap.put("jhbc", jhbc);
@@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
919 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); 947 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>();
920 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); 948 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>();
921 949
  950 + String company = map.get("company").toString();
  951 + String subCompany = map.get("subCompany").toString();
922 String line = map.get("line").toString(); 952 String line = map.get("line").toString();
923 String startDate = map.get("startDate").toString(); 953 String startDate = map.get("startDate").toString();
924 String endDate = map.get("endDate").toString(); 954 String endDate = map.get("endDate").toString();
@@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
941 String[] split = times.split("-"); 971 String[] split = times.split("-");
942 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; 972 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'";
943 } 973 }
  974 + if(company.length() != 0){
  975 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  976 + }
944 sql += " and bc_type = 'normal'"; 977 sql += " and bc_type = 'normal'";
945 978
946 list =jdbcTemplate.query(sql, 979 list =jdbcTemplate.query(sql,
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
1 package com.bsth.service.oil.impl; 1 package com.bsth.service.oil.impl;
2 2
  3 +import java.sql.ResultSet;
  4 +import java.sql.SQLException;
3 import java.text.ParseException; 5 import java.text.ParseException;
4 import java.text.SimpleDateFormat; 6 import java.text.SimpleDateFormat;
5 import java.util.ArrayList; 7 import java.util.ArrayList;
  8 +import java.util.Arrays;
6 import java.util.HashMap; 9 import java.util.HashMap;
7 import java.util.List; 10 import java.util.List;
8 import java.util.Map; 11 import java.util.Map;
9 12
10 import org.springframework.beans.factory.annotation.Autowired; 13 import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.jdbc.core.JdbcTemplate;
  15 +import org.springframework.jdbc.core.RowMapper;
11 import org.springframework.stereotype.Service; 16 import org.springframework.stereotype.Service;
12 17
13 import com.bsth.common.ResponseCode; 18 import com.bsth.common.ResponseCode;
@@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
28 @Autowired 33 @Autowired
29 YlxxbRepository ylxxbRepository; 34 YlxxbRepository ylxxbRepository;
30 35
  36 + @Autowired
  37 + JdbcTemplate jdbcTemplate;
  38 +
31 @SuppressWarnings("unchecked") 39 @SuppressWarnings("unchecked")
32 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { 40 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) {
33 - // TODO Auto-generated method stub 41 + int page=Integer.parseInt(map.get("page").toString());
34 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); 42 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
35 - List<Ylxxb> yList=new ArrayList<Ylxxb>(); 43 +
36 String rq=map.get("rq").toString(); 44 String rq=map.get("rq").toString();
37 String nbbm=""; 45 String nbbm="";
38 - if(map.get("nbbm")!=null){  
39 - nbbm=map.get("nbbm").toString(); 46 + if(map.get("nbbh")!=null){
  47 + nbbm=map.get("nbbh").toString();
  48 + }
  49 +
  50 + Object gsdmIn=map.get("gsdm_in");
  51 + Object fgsdmIn=map.get("fgsdm_in");
  52 + String addSql="";
  53 + String gsdmLike="";
  54 + String fgsdmLike="";
  55 +
  56 + //选择了公司
  57 + if(gsdmIn==null){
  58 + gsdmLike=map.get("gsdm_like").toString();
  59 + addSql += " and a.gsdm = '"+gsdmLike+ "' ";
  60 +
  61 + //选择了分公司
  62 + if(fgsdmIn==null){
  63 + fgsdmLike=map.get("fgsdm_like").toString();;
  64 + addSql += " and a.fgsdm = '"+fgsdmLike+ "' ";
  65 + }else{
  66 + String fgsdmIns[]= fgsdmIn.toString().split(",");
  67 + addSql +=" and a.fgsdm in (";
  68 + for(int i=0;i<fgsdmIns.length;i++){
  69 + addSql +="'"+fgsdmIns[i]+"'";
  70 + if(i<fgsdmIns.length-1){
  71 + addSql +=",";
  72 + }
  73 + }
  74 + addSql +=")";
  75 + }
  76 + }else{
  77 + //没有选择公司 (分公司也没有选择)
  78 + String gsdmIns[]=gsdmIn.toString().split(",");
  79 + addSql += " and a.gsdm in (";
  80 + for(int i=0;i<gsdmIns.length;i++){
  81 + addSql +="'" +gsdmIns[i]+"'";
  82 + if(i<gsdmIns.length-1){
  83 + addSql+=",";
  84 + }
  85 + }
  86 + addSql +=")";
  87 + String fgsdmIns[]= fgsdmIn.toString().split(",");
  88 + addSql +=" and a.fgsdm in (";
  89 + for(int i=0;i<fgsdmIns.length;i++){
  90 + addSql +="'"+fgsdmIns[i]+"'";
  91 + if(i<fgsdmIns.length-1){
  92 + addSql +=",";
  93 + }
  94 + }
  95 + addSql +=")";
  96 +
  97 +
40 } 98 }
41 - List<Object[]> list=repository.obtainCwjycl(rq,nbbm); 99 + String countSql="SELECT ifnull(count(*),0) as countTs FROM bsth_c_cwjy a "+
  100 + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " +
  101 + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy "
  102 + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+
  103 + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql ;
  104 + int listsize=jdbcTemplate.queryForObject(countSql, Integer.class);
  105 + // TODO Auto-generated method stub
  106 + String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid,"
  107 + + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+
  108 + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " +
  109 + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy "
  110 + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+
  111 + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql+ " limit "+page*10+","+10;
  112 +
  113 +
  114 + List<Ylxxb> yList= jdbcTemplate.query(sql,
  115 + new RowMapper<Ylxxb>(){
  116 + @Override
  117 + public Ylxxb mapRow(ResultSet rs, int rowNum) throws SQLException {
  118 + Ylxxb t=new Ylxxb();
  119 + t.setGsdm(rs.getString("gsdm"));
  120 + t.setFgsdm(rs.getString("fgsdm"));
  121 + t.setNbbm(rs.getString("nbbm"));
  122 + t.setJsy(rs.getString("jsy"));
  123 + t.setJzl(rs.getDouble("jzl"));
  124 + t.setStationid(rs.getString("stationid"));
  125 + t.setNylx(rs.getInt("nylx"));
  126 + t.setYj(rs.getDouble("yj"));
  127 + t.setBz(rs.getString("bz"));
  128 + t.setLdgh(rs.getString("ldgh"));
  129 + return t;
  130 + }
  131 + });
  132 + /*List<Object[]> list=repository.obtainCwjycl(rq,nbbm);
42 for (int i = 0; i < list.size(); i++) { 133 for (int i = 0; i < list.size(); i++) {
43 Ylxxb y=new Ylxxb(); 134 Ylxxb y=new Ylxxb();
44 y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString()); 135 y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString());
@@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
57 e.printStackTrace(); 148 e.printStackTrace();
58 } 149 }
59 yList.add(y); 150 yList.add(y);
60 - }  
61 - PageHelper pageHelper = new PageHelper(yList.size(), map); 151 + }*/
  152 + PageHelper pageHelper = new PageHelper(listsize, map);
62 pageHelper.getMap(); 153 pageHelper.getMap();
63 PageObject<Ylxxb> pageObject=pageHelper.getPageObject(); 154 PageObject<Ylxxb> pageObject=pageHelper.getPageObject();
64 pageObject.setDataList(yList); 155 pageObject.setDataList(yList);
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
@@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements @@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
34 34
35 @Override 35 @Override
36 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { 36 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) {
  37 +
37 String rq=map.get("yyrq").toString(); 38 String rq=map.get("yyrq").toString();
38 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); 39 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
39 try { 40 try {
@@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements @@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
51 // TODO Auto-generated catch block 52 // TODO Auto-generated catch block
52 e.printStackTrace(); 53 e.printStackTrace();
53 } 54 }
  55 + /*if(map.get("gsdm_in")!=null){
  56 + map.put("ssgsdm_in", map.get("gsdm_in"));
  57 + map.remove("gsdm_in");
  58 +
  59 + }else{
  60 + map.put("ssgsdm_like", map.get("gsdm_like"));
  61 + map.remove("gsdm_like");
  62 + }*/
  63 +
54 //根具条件查询指定日期Ylb的数据 64 //根具条件查询指定日期Ylb的数据
55 List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); 65 List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map));
56 List<Ylxxb> list=new ArrayList<Ylxxb>(); 66 List<Ylxxb> list=new ArrayList<Ylxxb>();
src/main/java/com/bsth/service/realcontrol/RealMapService.java
@@ -9,4 +9,6 @@ public interface RealMapService { @@ -9,4 +9,6 @@ public interface RealMapService {
9 Map<String, Object> stationSpatialData(String idx); 9 Map<String, Object> stationSpatialData(String idx);
10 10
11 Map<String,Object> carParkSpatialData(); 11 Map<String,Object> carParkSpatialData();
  12 +
  13 + Map<String,Object> findRouteByLine(String lineCode);
12 } 14 }
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
1 package com.bsth.service.realcontrol; 1 package com.bsth.service.realcontrol;
2 2
3 -import java.util.Collection;  
4 -import java.util.List;  
5 -import java.util.Map;  
6 -  
7 -import org.springframework.stereotype.Service;  
8 -  
9 import com.bsth.controller.realcontrol.dto.ChangePersonCar; 3 import com.bsth.controller.realcontrol.dto.ChangePersonCar;
10 import com.bsth.controller.realcontrol.dto.DfsjChange; 4 import com.bsth.controller.realcontrol.dto.DfsjChange;
11 import com.bsth.entity.realcontrol.ScheduleRealInfo; 5 import com.bsth.entity.realcontrol.ScheduleRealInfo;
12 import com.bsth.service.BaseService; 6 import com.bsth.service.BaseService;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +import java.util.Collection;
  10 +import java.util.List;
  11 +import java.util.Map;
13 12
14 @Service 13 @Service
15 public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, Long>{ 14 public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, Long>{
@@ -98,7 +97,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -98,7 +97,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
98 97
99 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); 98 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code);
100 99
101 - List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date); 100 + List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String type);
102 101
103 Map<String, Object> removeChildTask(Long taskId); 102 Map<String, Object> removeChildTask(Long taskId);
104 103
src/main/java/com/bsth/service/realcontrol/dto/SectionRouteCoords.java 0 → 100644
  1 +package com.bsth.service.realcontrol.dto;
  2 +
  3 +/**
  4 + * 线调地图 路段路由DTO
  5 + * Created by panzhao on 2016/12/1.
  6 + */
  7 +public class SectionRouteCoords {
  8 +
  9 + private int id;
  10 +
  11 + private String lineCode;
  12 +
  13 + private String sectionCode;
  14 +
  15 + private String sectionrouteCode;
  16 +
  17 + private int directions;
  18 +
  19 + private String sectionName;
  20 +
  21 + private String gsectionVector;
  22 +
  23 + private Float sectionDistance;
  24 +
  25 + private Float sectionTime;
  26 +
  27 + public int getId() {
  28 + return id;
  29 + }
  30 +
  31 + public void setId(int id) {
  32 + this.id = id;
  33 + }
  34 +
  35 + public String getLineCode() {
  36 + return lineCode;
  37 + }
  38 +
  39 + public void setLineCode(String lineCode) {
  40 + this.lineCode = lineCode;
  41 + }
  42 +
  43 + public String getSectionCode() {
  44 + return sectionCode;
  45 + }
  46 +
  47 + public void setSectionCode(String sectionCode) {
  48 + this.sectionCode = sectionCode;
  49 + }
  50 +
  51 + public String getSectionrouteCode() {
  52 + return sectionrouteCode;
  53 + }
  54 +
  55 + public void setSectionrouteCode(String sectionrouteCode) {
  56 + this.sectionrouteCode = sectionrouteCode;
  57 + }
  58 +
  59 + public int getDirections() {
  60 + return directions;
  61 + }
  62 +
  63 + public void setDirections(int directions) {
  64 + this.directions = directions;
  65 + }
  66 +
  67 + public String getSectionName() {
  68 + return sectionName;
  69 + }
  70 +
  71 + public void setSectionName(String sectionName) {
  72 + this.sectionName = sectionName;
  73 + }
  74 +
  75 + public String getGsectionVector() {
  76 + return gsectionVector;
  77 + }
  78 +
  79 + public void setGsectionVector(String gsectionVector) {
  80 + this.gsectionVector = gsectionVector;
  81 + }
  82 +
  83 + public Float getSectionDistance() {
  84 + return sectionDistance;
  85 + }
  86 +
  87 + public void setSectionDistance(Float sectionDistance) {
  88 + this.sectionDistance = sectionDistance;
  89 + }
  90 +
  91 + public Float getSectionTime() {
  92 + return sectionTime;
  93 + }
  94 +
  95 + public void setSectionTime(Float sectionTime) {
  96 + this.sectionTime = sectionTime;
  97 + }
  98 +}
src/main/java/com/bsth/service/realcontrol/impl/RealMapServiceImpl.java
@@ -4,6 +4,8 @@ import com.bsth.common.ResponseCode; @@ -4,6 +4,8 @@ import com.bsth.common.ResponseCode;
4 import com.bsth.controller.realcontrol.dto.StationSpatialData; 4 import com.bsth.controller.realcontrol.dto.StationSpatialData;
5 import com.bsth.entity.CarPark; 5 import com.bsth.entity.CarPark;
6 import com.bsth.service.realcontrol.RealMapService; 6 import com.bsth.service.realcontrol.RealMapService;
  7 +import com.bsth.service.realcontrol.dto.SectionRouteCoords;
  8 +import com.bsth.util.TransGPS;
7 import com.google.common.base.Splitter; 9 import com.google.common.base.Splitter;
8 import org.slf4j.Logger; 10 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
@@ -12,9 +14,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper; @@ -12,9 +14,7 @@ import org.springframework.jdbc.core.BeanPropertyRowMapper;
12 import org.springframework.jdbc.core.JdbcTemplate; 14 import org.springframework.jdbc.core.JdbcTemplate;
13 import org.springframework.stereotype.Service; 15 import org.springframework.stereotype.Service;
14 16
15 -import java.util.HashMap;  
16 -import java.util.List;  
17 -import java.util.Map; 17 +import java.util.*;
18 18
19 /** 19 /**
20 * Created by panzhao on 2016/11/23. 20 * Created by panzhao on 2016/11/23.
@@ -36,13 +36,13 @@ public class RealMapServiceImpl implements RealMapService { @@ -36,13 +36,13 @@ public class RealMapServiceImpl implements RealMapService {
36 //拼接in语句 36 //拼接in语句
37 String inStr = ""; 37 String inStr = "";
38 for (String code : idArray) { 38 for (String code : idArray) {
39 - inStr += (",'" + code+"'"); 39 + inStr += (",'" + code + "'");
40 } 40 }
41 inStr = " (" + inStr.substring(1) + ")"; 41 inStr = " (" + inStr.substring(1) + ")";
42 42
43 - String sql = "select r.LINE_CODE,r.STATION_NAME,r.STATION_CODE,r.STATION_MARK,r.DIRECTIONS,r.DISTANCES,r.TO_TIME, r.VERSIONS,s.G_LONX,s.G_LATY,s.RADIUS,s.SHAPES_TYPE,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID, r.STATION_ROUTE_CODE from bsth_c_stationroute r inner join bsth_c_station s on r.station=s.id where r.line_code in "+inStr+" and r.destroy=0"; 43 + String sql = "select r.LINE_CODE,r.STATION_NAME,r.STATION_CODE,r.STATION_MARK,r.DIRECTIONS,r.DISTANCES,r.TO_TIME, r.VERSIONS,s.G_LONX,s.G_LATY,s.RADIUS,s.SHAPES_TYPE,ST_AsText(s.G_POLYGON_GRID) as G_POLYGON_GRID, r.STATION_ROUTE_CODE from bsth_c_stationroute r inner join bsth_c_station s on r.station=s.id where r.line_code in " + inStr + " and r.destroy=0";
44 44
45 - List<StationSpatialData> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(StationSpatialData.class)); 45 + List<StationSpatialData> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(StationSpatialData.class));
46 rs.put("status", ResponseCode.SUCCESS); 46 rs.put("status", ResponseCode.SUCCESS);
47 rs.put("list", list); 47 rs.put("list", list);
48 } catch (Exception e) { 48 } catch (Exception e) {
@@ -61,7 +61,7 @@ public class RealMapServiceImpl implements RealMapService { @@ -61,7 +61,7 @@ public class RealMapServiceImpl implements RealMapService {
61 try { 61 try {
62 String sql = "select ID, AREA,PARK_CODE,PARK_NAME,ST_AsText(G_PARK_POINT) as G_PARK_POINT,G_CENTER_POINT,RADIUS,SHAPES_TYPE from bsth_c_car_park WHERE destroy=0 and shapes_type='d'"; 62 String sql = "select ID, AREA,PARK_CODE,PARK_NAME,ST_AsText(G_PARK_POINT) as G_PARK_POINT,G_CENTER_POINT,RADIUS,SHAPES_TYPE from bsth_c_car_park WHERE destroy=0 and shapes_type='d'";
63 63
64 - List<CarPark> list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(CarPark.class)); 64 + List<CarPark> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(CarPark.class));
65 rs.put("status", ResponseCode.SUCCESS); 65 rs.put("status", ResponseCode.SUCCESS);
66 rs.put("list", list); 66 rs.put("list", list);
67 } catch (Exception e) { 67 } catch (Exception e) {
@@ -71,4 +71,99 @@ public class RealMapServiceImpl implements RealMapService { @@ -71,4 +71,99 @@ public class RealMapServiceImpl implements RealMapService {
71 } 71 }
72 return rs; 72 return rs;
73 } 73 }
  74 +
  75 + @Override
  76 + public Map<String, Object> findRouteByLine(String lineCode) {
  77 + Map<String, Object> rs = new HashMap<>();
  78 + String sql = "SELECT r.ID,r.LINE_CODE,r.SECTION_CODE,r.SECTIONROUTE_CODE,r.DIRECTIONS,s.SECTION_NAME,ST_AsText(s.GSECTION_VECTOR) GSECTION_VECTOR,s.SECTION_DISTANCE,s.SECTION_TIME FROM bsth_c_sectionroute r INNER JOIN bsth_c_section s on r.section_code=s.section_code WHERE r.line_code=? and r.destroy=0 order by sectionroute_code";
  79 + List<SectionRouteCoords> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(SectionRouteCoords.class), lineCode);
  80 +
  81 + //排序
  82 + Collections.sort(list, new Comparator<SectionRouteCoords>() {
  83 + @Override
  84 + public int compare(SectionRouteCoords o1, SectionRouteCoords o2) {
  85 + return Integer.parseInt(o1.getSectionrouteCode()) - Integer.parseInt(o2.getSectionrouteCode());
  86 + }
  87 + });
  88 +
  89 + List<String> upList = new ArrayList<>(),
  90 + downList = new ArrayList<>();
  91 +
  92 + String vectorStr = "";
  93 + for (SectionRouteCoords sr : list) {
  94 + vectorStr = sr.getGsectionVector();
  95 + vectorStr = vectorStr.substring(11, vectorStr.length() - 2);
  96 +
  97 + if (sr.getDirections() == 0)
  98 + upList.add(vectorStr);
  99 + else
  100 + downList.add(vectorStr);
  101 + }
  102 +
  103 + rs.put("up", upList);
  104 + rs.put("down", downList);
  105 + rs.put("up_bd", multiWgsToBd(upList));
  106 + rs.put("down_bd", multiWgsToBd(downList));
  107 + rs.put("up_gcj", multiWgsToGcj(upList));
  108 + rs.put("down_gcj", multiWgsToGcj(downList));
  109 +
  110 + rs.put("lineId", lineCode);
  111 + return rs;
  112 + }
  113 +
  114 + /**
  115 + * wgs 坐标数组转 百度
  116 + * @param list
  117 + * @return
  118 + */
  119 + private List<String> multiWgsToBd(List<String> list) {
  120 + List<String> bdList = new ArrayList<>();
  121 +
  122 + StringBuilder itemStr;
  123 + String[] subArr, cds;
  124 + TransGPS.Location location;
  125 + for(String item : list){
  126 + subArr = item.split(",");
  127 +
  128 + itemStr = new StringBuilder();
  129 + for(String coord : subArr){
  130 + cds = coord.split(" ");
  131 + //城建转经纬度
  132 + //Map<String, Double> map = JWDUtil.ConvertSHToJW(Double.parseDouble(cds[0]), Double.parseDouble(cds[1]));
  133 +
  134 +
  135 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1]))));
  136 + itemStr.append(location.getLng() + " " + location.getLat() + ",");
  137 + }
  138 +
  139 + bdList.add(itemStr.substring(0, itemStr.length() - 1));
  140 + }
  141 + return bdList;
  142 + }
  143 +
  144 + /**
  145 + * wgs 坐标数组转 Gcj
  146 + * @param list
  147 + * @return
  148 + */
  149 + private List<String> multiWgsToGcj(List<String> list) {
  150 + List<String> gcjList = new ArrayList<>();
  151 +
  152 + StringBuilder itemStr;
  153 + String[] subArr, cds;
  154 + TransGPS.Location location;
  155 + for(String item : list){
  156 + subArr = item.split(",");
  157 +
  158 + itemStr = new StringBuilder();
  159 + for(String coord : subArr){
  160 + cds = coord.split(" ");
  161 + location = TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1])));
  162 + itemStr.append(location.getLng() + " " + location.getLat() + ",");
  163 + }
  164 +
  165 + gcjList.add(itemStr.substring(0, itemStr.length() - 1));
  166 + }
  167 + return gcjList;
  168 + }
74 } 169 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -33,7 +33,6 @@ import com.bsth.service.SectionRouteService; @@ -33,7 +33,6 @@ import com.bsth.service.SectionRouteService;
33 import com.bsth.service.impl.BaseServiceImpl; 33 import com.bsth.service.impl.BaseServiceImpl;
34 import com.bsth.service.realcontrol.ScheduleRealInfoService; 34 import com.bsth.service.realcontrol.ScheduleRealInfoService;
35 import com.bsth.util.*; 35 import com.bsth.util.*;
36 -import com.bsth.util.TransGPS.Location;  
37 import com.bsth.websocket.handler.SendUtils; 36 import com.bsth.websocket.handler.SendUtils;
38 import com.google.common.base.Splitter; 37 import com.google.common.base.Splitter;
39 import com.google.common.collect.ArrayListMultimap; 38 import com.google.common.collect.ArrayListMultimap;
@@ -991,7 +990,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -991,7 +990,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
991 return ""; 990 return "";
992 991
993 String gcjStr = ""; 992 String gcjStr = "";
994 - Location location; 993 + TransGPS.Location location;
995 for(String crd : array){ 994 for(String crd : array){
996 subArray = crd.split(" "); 995 subArray = crd.split(" ");
997 if(subArray.length != 2) 996 if(subArray.length != 2)
@@ -1209,8 +1208,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1209,8 +1208,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1209 1208
1210 @Override 1209 @Override
1211 public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, 1210 public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh,
1212 - String lpName,String date) {  
1213 - return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date); 1211 + String lpName,String date,String type) {
  1212 + if(type.equals("qp")){
  1213 + return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date);
  1214 + }else{
  1215 + return scheduleRealInfoRepository.queryListWaybill(jName,clZbh,lpName,date);
  1216 + }
1214 } 1217 }
1215 1218
1216 @Override 1219 @Override
src/main/java/com/bsth/service/schedule/PeopleCarPlanService.java
@@ -5,15 +5,15 @@ import java.util.Map; @@ -5,15 +5,15 @@ import java.util.Map;
5 5
6 public interface PeopleCarPlanService { 6 public interface PeopleCarPlanService {
7 7
8 - List<Map<String, Object>> queryPeopleCar(String line, String date, String type); 8 + List<Map<String, Object>> queryPeopleCar(Map<String, Object> map);
9 9
10 - List<Map<String, Object>> workDaily(String line, String date, String type); 10 + List<Map<String, Object>> workDaily(Map<String, Object> map);
11 11
12 - Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type); 12 + Map<String, Object> scheduleAnaly(Map<String, Object> map);
13 13
14 - List<Map<String, Object>> getModel(String line, String startDate, String endDate); 14 + List<Map<String, Object>> getModel(Map<String, Object> map);
15 15
16 - List<Map<String, Object>> firstAndLastBus(String line, String date, String type); 16 + List<Map<String, Object>> firstAndLastBus(Map<String, Object> map);
17 17
18 - List<Map<String, Object>> commandState(String line, String date, String code); 18 + List<Map<String, Object>> commandState(Map<String, Object> map);
19 } 19 }
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
@@ -23,10 +23,8 @@ import org.springframework.stereotype.Service; @@ -23,10 +23,8 @@ import org.springframework.stereotype.Service;
23 23
24 import com.bsth.entity.realcontrol.ScheduleRealInfo; 24 import com.bsth.entity.realcontrol.ScheduleRealInfo;
25 import com.bsth.entity.schedule.SchedulePlanInfo; 25 import com.bsth.entity.schedule.SchedulePlanInfo;
26 -import com.bsth.entity.schedule.TTInfoDetail;  
27 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; 26 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
28 import com.bsth.util.ReportUtils; 27 import com.bsth.util.ReportUtils;
29 -import com.ibm.wsdl.util.xml.DOM2Writer;  
30 28
31 @Service 29 @Service
32 public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { 30 public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
@@ -37,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -37,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
37 @Autowired 35 @Autowired
38 private JdbcTemplate jdbcTemplate; 36 private JdbcTemplate jdbcTemplate;
39 37
  38 + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){
  39 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
  40 +
  41 + try {
  42 + String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
  43 +
  44 + if(line.length() != 0)
  45 + sql += " and xl_bm = '"+line+"'";
  46 + if(company.length() != 0)
  47 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  48 +
  49 + list =jdbcTemplate.query(sql,
  50 + new RowMapper<ScheduleRealInfo>(){
  51 + @Override
  52 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  53 + ScheduleRealInfo schedule = new ScheduleRealInfo();
  54 + schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  55 + schedule.setRealExecDate(rs.getString("real_exec_date"));
  56 + schedule.setXlName(rs.getString("xl_name"));
  57 + schedule.setLpName(rs.getString("lp_name"));
  58 + schedule.setBcType(rs.getString("bc_type"));
  59 + schedule.setBcs(rs.getInt("bcs"));
  60 + schedule.setBcsj(rs.getInt("bcsj"));
  61 + schedule.setJhlc(rs.getDouble("jhlc"));
  62 + schedule.setDfsj(rs.getString("dfsj"));
  63 + schedule.setFcsj(rs.getString("fcsj"));
  64 + schedule.setFcsjActual(rs.getString("fcsj_actual"));
  65 + schedule.setZdsj(rs.getString("zdsj"));
  66 + schedule.setZdsjActual(rs.getString("zdsj_actual"));
  67 + schedule.setQdzName(rs.getString("qdz_name"));
  68 + schedule.setZdzName(rs.getString("zdz_name"));
  69 + schedule.setXlDir(rs.getString("xl_dir"));
  70 + schedule.setStatus(rs.getInt("status"));
  71 + schedule.setRemarks(rs.getString("remarks"));
  72 + schedule.setGsName(rs.getString("gs_name"));
  73 + schedule.setFgsName(rs.getString("fgs_name"));
  74 + schedule.setClZbh(rs.getString("cl_zbh"));
  75 + schedule.setjGh(rs.getString("j_gh"));
  76 + schedule.setjName(rs.getString("j_name"));
  77 + schedule.setsGh(rs.getString("s_gh"));
  78 + schedule.setsName(rs.getString("s_name"));
  79 + schedule.setSpId(rs.getLong("sp_id"));
  80 + return schedule;
  81 + }
  82 + });
  83 +
  84 + } catch (Exception e) {
  85 + // TODO: handle exception
  86 + e.printStackTrace();
  87 + }
  88 +
  89 + return list;
  90 + }
  91 +
40 @Override 92 @Override
41 - public List<Map<String, Object>> queryPeopleCar(String line, String date, String type) { 93 + public List<Map<String, Object>> queryPeopleCar(Map<String, Object> map) {
42 Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); 94 Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>();
43 Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>(); 95 Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>();
44 List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>(); 96 List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>();
45 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 97 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
46 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); 98 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
47 99
  100 + String company = map.get("company").toString();
  101 + String subCompany = map.get("subCompany").toString();
  102 + String line = map.get("line").toString();
  103 + String date = map.get("date").toString();
  104 + String type = map.get("type").toString();
  105 +
48 if(date.length() == 0){ 106 if(date.length() == 0){
49 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 107 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
50 } 108 }
@@ -55,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -55,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
55 if(line.length() != 0){ 113 if(line.length() != 0){
56 sql += " and xl_bm = '"+line+"'"; 114 sql += " and xl_bm = '"+line+"'";
57 } 115 }
  116 + if(company.length() != 0){
  117 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  118 + }
58 119
59 list =jdbcTemplate.query(sql, 120 list =jdbcTemplate.query(sql,
60 new RowMapper<SchedulePlanInfo>(){ 121 new RowMapper<SchedulePlanInfo>(){
@@ -69,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -69,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
69 schedule.setjName(rs.getString("j_name")); 130 schedule.setjName(rs.getString("j_name"));
70 schedule.setsName(rs.getString("s_name")); 131 schedule.setsName(rs.getString("s_name"));
71 schedule.setJhlc(rs.getDouble("jhlc")); 132 schedule.setJhlc(rs.getDouble("jhlc"));
  133 + schedule.setGsName(rs.getString("gs_name"));
  134 + schedule.setFgsName(rs.getString("fgs_name"));
72 return schedule; 135 return schedule;
73 } 136 }
74 }); 137 });
@@ -90,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -90,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
90 for(String key : keyMap.keySet()){ 153 for(String key : keyMap.keySet()){
91 Map<String, Object> tempMap = new HashMap<String, Object>(); 154 Map<String, Object> tempMap = new HashMap<String, Object>();
92 BigDecimal jhlc = new BigDecimal(0); 155 BigDecimal jhlc = new BigDecimal(0);
  156 + String companyName = "", subCompanyName = "";
93 for(SchedulePlanInfo schedule : keyMap.get(key)){ 157 for(SchedulePlanInfo schedule : keyMap.get(key)){
  158 + if(schedule.getGsName() != null && companyName.length() == 0)
  159 + companyName = schedule.getGsName();
  160 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  161 + subCompanyName = schedule.getFgsName();
94 if(schedule.getJhlc() != null) 162 if(schedule.getJhlc() != null)
95 jhlc = jhlc.add(new BigDecimal(schedule.getJhlc())); 163 jhlc = jhlc.add(new BigDecimal(schedule.getJhlc()));
96 } 164 }
@@ -101,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -101,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
101 tempMap.put("clzbh", split[2]); 169 tempMap.put("clzbh", split[2]);
102 tempMap.put("jName", split[3]); 170 tempMap.put("jName", split[3]);
103 tempMap.put("sName", split[4]); 171 tempMap.put("sName", split[4]);
  172 + tempMap.put("company", companyName);
  173 + tempMap.put("subCompany", subCompanyName);
104 if(split[4].equals("null")) 174 if(split[4].equals("null"))
105 tempMap.put("sName", "/"); 175 tempMap.put("sName", "/");
106 tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP)); 176 tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP));
@@ -117,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -117,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
117 Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>(); 187 Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>();
118 List<Integer> keyList = new ArrayList<Integer>(); 188 List<Integer> keyList = new ArrayList<Integer>();
119 for(Map<String, Object> m : temp.get(key)){ 189 for(Map<String, Object> m : temp.get(key)){
120 - int i = Integer.valueOf(m.get("lp").toString()); 190 + String lp = m.get("lp").toString();
  191 + String str = "";
  192 + for(int i = 0; i < lp.length(); i++){
  193 + str += (int)lp.charAt(i);
  194 + }
  195 + int i = Integer.valueOf(str);
121 if(!tempList.containsKey(i)) 196 if(!tempList.containsKey(i))
122 tempList.put(i, new ArrayList<Map<String, Object>>()); 197 tempList.put(i, new ArrayList<Map<String, Object>>());
123 tempList.get(i).add(m); 198 tempList.get(i).add(m);
@@ -135,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -135,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
135 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 210 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
136 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 211 sdfSimple = new SimpleDateFormat("yyyyMMdd");
137 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 212 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
138 - Map<String,Object> map = new HashMap<String, Object>(); 213 + Map<String,Object> m = new HashMap<String, Object>();
139 ReportUtils ee = new ReportUtils(); 214 ReportUtils ee = new ReportUtils();
140 try { 215 try {
141 listI.add(resList.iterator()); 216 listI.add(resList.iterator());
142 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 217 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
143 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\peoCarPlan.xls", 218 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\peoCarPlan.xls",
144 path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 219 path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
145 } catch (Exception e) { 220 } catch (Exception e) {
146 // TODO: handle exception 221 // TODO: handle exception
@@ -152,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -152,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
152 } 227 }
153 228
154 @Override 229 @Override
155 - public List<Map<String, Object>> workDaily(String line, String date, String type) { 230 + public List<Map<String, Object>> workDaily(Map<String, Object> map) {
156 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 231 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
157 DecimalFormat df = new DecimalFormat("###0.##"); 232 DecimalFormat df = new DecimalFormat("###0.##");
  233 +
  234 + String company = map.get("company").toString();
  235 + String subCompany = map.get("subCompany").toString();
  236 + String line = map.get("line").toString();
  237 + String date = map.get("date").toString();
  238 + String type = map.get("type").toString();
  239 +
158 if(date.length() == 0){ 240 if(date.length() == 0){
159 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 241 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
160 } 242 }
161 - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();  
162 - if(line.length() != 0)  
163 - list = scheduleRealInfoRepository.scheduleDaily(line, date);  
164 - else  
165 - list = scheduleRealInfoRepository.findByDate(date); 243 +
  244 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
  245 +
166 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 246 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
167 for(ScheduleRealInfo schedule : list){ 247 for(ScheduleRealInfo schedule : list){
168 String key = schedule.getXlName(); 248 String key = schedule.getXlName();
@@ -179,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -179,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
179 Long wgfEnd = 0l; 259 Long wgfEnd = 0l;
180 try { 260 try {
181 //早晚高峰时段 261 //早晚高峰时段
182 - zgfBegin = sdf.parse(date + "07:30").getTime();  
183 - zgfEnd = sdf.parse(date + "09:30").getTime();  
184 - wgfBegin = sdf.parse(date + "16:30").getTime();  
185 - wgfEnd = sdf.parse(date + "18:30").getTime(); 262 + zgfBegin = sdf.parse(date + "06:30").getTime();
  263 + zgfEnd = sdf.parse(date + "08:30").getTime();
  264 + wgfBegin = sdf.parse(date + "16:00").getTime();
  265 + wgfEnd = sdf.parse(date + "18:00").getTime();
186 } catch (ParseException e) { 266 } catch (ParseException e) {
187 // TODO Auto-generated catch block 267 // TODO Auto-generated catch block
188 e.printStackTrace(); 268 e.printStackTrace();
@@ -190,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -190,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
190 for(String key : keyMap.keySet()){ 270 for(String key : keyMap.keySet()){
191 Map<String, Object> tempMap = new HashMap<String, Object>(); 271 Map<String, Object> tempMap = new HashMap<String, Object>();
192 Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>(); 272 Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>();
193 - int jhbc = 0;  
194 - int dftz = 0;  
195 - int jhcc = 0;  
196 - int sjcc = 0;  
197 - int upfk = 0;  
198 - int updk = 0;  
199 - int dnfk = 0;  
200 - int dndk = 0;  
201 - int upfm = 0;  
202 - int updm = 0;  
203 - int dnfm = 0;  
204 - int dndm = 0;  
205 - int jhsb = 0;  
206 - int sjsb = 0;  
207 - int jhmb = 0;  
208 - int sjmb = 0;  
209 - int jhzgf = 0;  
210 - int sjzgf = 0;  
211 - int jhwgf = 0;  
212 - int sjwgf = 0; 273 + int jhbc = 0, dftz = 0, jhcc = 0, sjcc = 0;
  274 + int upfk = 0, updk = 0, dnfk = 0, dndk = 0;
  275 + int upfm = 0, updm = 0, dnfm = 0, dndm = 0;
  276 + int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0;
  277 + int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0;
213 for(ScheduleRealInfo schedule : keyMap.get(key)){ 278 for(ScheduleRealInfo schedule : keyMap.get(key)){
214 schedule.setFcsjAll(schedule.getFcsj()); 279 schedule.setFcsjAll(schedule.getFcsj());
215 280
@@ -334,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -334,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
334 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 399 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
335 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 400 sdfSimple = new SimpleDateFormat("yyyyMMdd");
336 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 401 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
337 - Map<String,Object> map = new HashMap<String, Object>(); 402 + Map<String,Object> m = new HashMap<String, Object>();
338 ReportUtils ee = new ReportUtils(); 403 ReportUtils ee = new ReportUtils();
339 try { 404 try {
340 listI.add(resList.iterator()); 405 listI.add(resList.iterator());
341 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 406 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
342 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\workDaily.xls", 407 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\workDaily.xls",
343 path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 408 path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
344 } catch (Exception e) { 409 } catch (Exception e) {
345 // TODO: handle exception 410 // TODO: handle exception
@@ -351,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -351,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
351 } 416 }
352 417
353 @Override 418 @Override
354 - public Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type) { 419 + public Map<String, Object> scheduleAnaly(Map<String, Object> map) {
355 DecimalFormat df = new DecimalFormat("00"); 420 DecimalFormat df = new DecimalFormat("00");
356 - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); 421 +// List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>();
  422 + List<Long> ttList = new ArrayList<Long>();
357 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 423 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
358 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 424 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
359 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); 425 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
360 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 426 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
361 Map<String, Object> modelMap = new HashMap<String, Object>(); 427 Map<String, Object> modelMap = new HashMap<String, Object>();
362 428
  429 + String company = map.get("company").toString();
  430 + String subCompany = map.get("subCompany").toString();
  431 + String page = map.get("page").toString();
  432 + String line = map.get("line").toString();
  433 + String startDate = map.get("startDate").toString();
  434 + String endDate = map.get("endDate").toString();
  435 + String model = map.get("model").toString();
  436 + String type = map.get("type").toString();
  437 +
363 if(startDate.length() == 0){ 438 if(startDate.length() == 0){
364 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 439 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
365 } 440 }
@@ -372,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -372,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
372 if(line.length() != 0){ 447 if(line.length() != 0){
373 sql += " and xl_bm = '"+line+"'"; 448 sql += " and xl_bm = '"+line+"'";
374 } 449 }
  450 + if(company.length() != 0){
  451 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  452 + }
375 sql += " and bc_type = 'normal'"; 453 sql += " and bc_type = 'normal'";
376 454
377 list =jdbcTemplate.query(sql, 455 list =jdbcTemplate.query(sql,
@@ -390,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -390,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
390 schedule.setZdsjActual(rs.getString("zdsj_actual")); 468 schedule.setZdsjActual(rs.getString("zdsj_actual"));
391 schedule.setBcsj(rs.getInt("bcsj")); 469 schedule.setBcsj(rs.getInt("bcsj"));
392 schedule.setQdzName(rs.getString("qdz_name")); 470 schedule.setQdzName(rs.getString("qdz_name"));
  471 + schedule.setSpId(rs.getLong("sp_id"));
393 return schedule; 472 return schedule;
394 } 473 }
395 }); 474 });
396 475
397 if(model.length() != 0){ 476 if(model.length() != 0){
398 - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'";  
399 - } 477 +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'";
  478 + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'";
400 479
401 - ttList =jdbcTemplate.query(sql,  
402 - new RowMapper<TTInfoDetail>(){  
403 - @Override  
404 - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException {  
405 - TTInfoDetail ttInfo = new TTInfoDetail();  
406 - ttInfo.setBcType(rs.getString("bc_type"));  
407 - ttInfo.setBcs(rs.getInt("bcs"));  
408 - ttInfo.setFcno(rs.getInt("fcno"));  
409 - ttInfo.setFcsj(rs.getString("fcsj"));  
410 - ttInfo.setBcsj(rs.getInt("bcsj"));  
411 - return ttInfo;  
412 - }  
413 - }); 480 + ttList = jdbcTemplate.query(sql,
  481 + new RowMapper<Long>(){
  482 + @Override
  483 + public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
  484 + return rs.getLong("id");
  485 + }
  486 + });
  487 +
  488 + }
414 489
415 } catch (Exception e) { 490 } catch (Exception e) {
416 // TODO Auto-generated catch block 491 // TODO Auto-generated catch block
@@ -421,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -421,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
421 for(ScheduleRealInfo schedule : list){ 496 for(ScheduleRealInfo schedule : list){
422 DO:{ 497 DO:{
423 if(model.length() != 0){ 498 if(model.length() != 0){
424 - for(TTInfoDetail tt : ttList){  
425 - if(tt.getBcs() == schedule.getBcs() && tt.getFcno() == schedule.getFcno()  
426 - && tt.getFcsj().equals(schedule.getFcsj()) && tt.getBcsj() == schedule.getBcsj()){ 499 + for(Long tt : ttList){
  500 + if(tt == schedule.getSpId()){
427 String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); 501 String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj();
428 if(!keyMap.containsKey(key)) 502 if(!keyMap.containsKey(key))
429 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 503 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
@@ -534,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -534,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
534 } 608 }
535 Collections.sort(keyList); 609 Collections.sort(keyList);
536 for(Integer Int : keyList){ 610 for(Integer Int : keyList){
537 - Map<String, Object> map = tempMap.get(Int);  
538 - String str = map.get("line").toString(); 611 + Map<String, Object> m = tempMap.get(Int);
  612 + String str = m.get("line").toString();
539 if(!listMap2.containsKey(str)) 613 if(!listMap2.containsKey(str))
540 listMap2.put(str, new ArrayList<Map<String, Object>>()); 614 listMap2.put(str, new ArrayList<Map<String, Object>>());
541 - listMap2.get(str).add(map); 615 + listMap2.get(str).add(m);
542 } 616 }
543 } 617 }
544 for(String str : listMap2.keySet()){ 618 for(String str : listMap2.keySet()){
545 - for(Map<String, Object> map : listMap2.get(str)){  
546 - resList.add(map); 619 + for(Map<String, Object> m : listMap2.get(str)){
  620 + resList.add(m);
547 } 621 }
548 } 622 }
549 623
@@ -561,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -561,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
561 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 635 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
562 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 636 sdfSimple = new SimpleDateFormat("yyyyMMdd");
563 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 637 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
564 - Map<String,Object> map = new HashMap<String, Object>(); 638 + Map<String,Object> m = new HashMap<String, Object>();
565 ReportUtils ee = new ReportUtils(); 639 ReportUtils ee = new ReportUtils();
566 try { 640 try {
567 listI.add(resList.iterator()); 641 listI.add(resList.iterator());
568 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 642 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
569 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\scheduleAnaly.xls", 643 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\scheduleAnaly.xls",
570 path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); 644 path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls");
571 } catch (Exception e) { 645 } catch (Exception e) {
572 // TODO: handle exception 646 // TODO: handle exception
@@ -578,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -578,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
578 } 652 }
579 653
580 @Override 654 @Override
581 - public List<Map<String, Object>> getModel(String line, String startDate, String endDate) { 655 + public List<Map<String, Object>> getModel(Map<String, Object> map) {
582 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 656 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
583 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); 657 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
584 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 658 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
585 SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE"); 659 SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE");
586 660
  661 + String line = map.get("line").toString();
  662 + String startDate = map.get("startDate").toString();
  663 + String endDate = map.get("endDate").toString();
  664 +
587 if(startDate.length() == 0){ 665 if(startDate.length() == 0){
588 startDate = sdf.format(new Date()); 666 startDate = sdf.format(new Date());
589 } 667 }
@@ -650,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -650,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
650 ruleDays1.add(6); 728 ruleDays1.add(6);
651 specialDays1.add(sdf.format(tempDate)); 729 specialDays1.add(sdf.format(tempDate));
652 } 730 }
653 - for(Map<String, Object> map : list){  
654 - String[] ruleDays = map.get("ruleDays").toString().split(",");  
655 - String[] specialDays = map.get("specialDays").toString().split(","); 731 + for(Map<String, Object> m : list){
  732 + String[] ruleDays = m.get("ruleDays").toString().split(",");
  733 + String[] specialDays = m.get("specialDays").toString().split(",");
656 boolean flag = false; 734 boolean flag = false;
657 DO:{ 735 DO:{
658 try { 736 try {
659 - long qyrq = sdf.parse(map.get("qyrq").toString()).getTime(); 737 + long qyrq = sdf.parse(m.get("qyrq").toString()).getTime();
660 if(qyrq > date2.getTime()) 738 if(qyrq > date2.getTime())
661 break; 739 break;
662 } catch (ParseException e) { 740 } catch (ParseException e) {
@@ -681,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -681,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
681 } 759 }
682 } 760 }
683 if(flag) 761 if(flag)
684 - resList.add(map); 762 + resList.add(m);
685 } 763 }
686 764
687 return resList; 765 return resList;
688 } 766 }
689 767
690 @Override 768 @Override
691 - public List<Map<String, Object>> firstAndLastBus(String line, String date, String type) {  
692 - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 769 + public List<Map<String, Object>> firstAndLastBus(Map<String, Object> map) {
693 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 770 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
694 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 771 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
695 772
  773 + String company = map.get("company").toString();
  774 + String subCompany = map.get("subCompany").toString();
  775 + String line = map.get("line").toString();
  776 + String date = map.get("date").toString();
  777 + String type = map.get("type").toString();
  778 +
696 if(date.length() == 0) 779 if(date.length() == 0)
697 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 780 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
698 - if(line.length() != 0)  
699 - list = scheduleRealInfoRepository.scheduleDaily(line, date);  
700 - else  
701 - list = scheduleRealInfoRepository.findByDate(date); 781 +
  782 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
702 783
703 for(ScheduleRealInfo schedule : list){ 784 for(ScheduleRealInfo schedule : list){
704 if(!schedule.getBcType().equals("normal")) 785 if(!schedule.getBcType().equals("normal"))
@@ -714,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -714,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
714 List<Long> longList0 = new ArrayList<Long>(); 795 List<Long> longList0 = new ArrayList<Long>();
715 Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); 796 Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>();
716 List<Long> longList1 = new ArrayList<Long>(); 797 List<Long> longList1 = new ArrayList<Long>();
717 - String company = "", subCompany = ""; 798 + String companyName = "", subCompanyName = "";
718 for(ScheduleRealInfo schedule : keyMap.get(key)){ 799 for(ScheduleRealInfo schedule : keyMap.get(key)){
719 - if(schedule.getGsName() != null && company.length() == 0)  
720 - company = schedule.getGsName();  
721 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
722 - subCompany = schedule.getFgsName(); 800 + if(schedule.getGsName() != null && companyName.length() == 0)
  801 + companyName = schedule.getGsName();
  802 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  803 + subCompanyName = schedule.getFgsName();
723 String[] split = schedule.getFcsj().split(":"); 804 String[] split = schedule.getFcsj().split(":");
724 long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); 805 long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
725 schedule.setFcsjT(min); 806 schedule.setFcsjT(min);
@@ -738,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -738,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
738 ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); 819 ScheduleRealInfo shouban1 = temp1.get(longList1.get(0));
739 ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); 820 ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1));
740 tempMap.put("date", date); 821 tempMap.put("date", date);
741 - tempMap.put("company", company);  
742 - tempMap.put("subCompany", subCompany); 822 + tempMap.put("company", companyName);
  823 + tempMap.put("subCompany", subCompanyName);
743 tempMap.put("line", key); 824 tempMap.put("line", key);
744 tempMap.put("qdzFirst0", shouban0.getQdzName()); 825 tempMap.put("qdzFirst0", shouban0.getQdzName());
745 tempMap.put("jhfcFirst0", shouban0.getFcsj()); 826 tempMap.put("jhfcFirst0", shouban0.getFcsj());
@@ -808,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -808,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
808 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 889 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
809 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 890 sdfSimple = new SimpleDateFormat("yyyyMMdd");
810 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 891 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
811 - Map<String,Object> map = new HashMap<String, Object>(); 892 + Map<String,Object> m = new HashMap<String, Object>();
812 ReportUtils ee = new ReportUtils(); 893 ReportUtils ee = new ReportUtils();
813 try { 894 try {
814 listI.add(resList.iterator()); 895 listI.add(resList.iterator());
815 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 896 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
816 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\firstAndLastBus.xls", 897 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\firstAndLastBus.xls",
817 path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 898 path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
818 } catch (Exception e) { 899 } catch (Exception e) {
819 // TODO: handle exception 900 // TODO: handle exception
@@ -825,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -825,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
825 } 906 }
826 907
827 @Override 908 @Override
828 - public List<Map<String, Object>> commandState(String line, String date, String code) { 909 + public List<Map<String, Object>> commandState(Map<String, Object> map) {
829 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 910 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
830 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); 911 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
831 Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); 912 Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>();
832 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); 913 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
  914 +
  915 + String company = map.get("company").toString();
  916 + String subCompany = map.get("subCompany").toString();
  917 + String line = map.get("line").toString();
  918 + String date = map.get("date").toString();
  919 + String code = map.get("code").toString();
833 920
834 if(date.length() == 0) 921 if(date.length() == 0)
835 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 922 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
836 923
837 try { 924 try {
838 925
839 - String sql = "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + 926 + String sql =
  927 + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " +
840 "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; 928 "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
841 if(line.length() != 0){ 929 if(line.length() != 0){
842 sql += " and xl_bm = '"+line+"'"; 930 sql += " and xl_bm = '"+line+"'";
@@ -844,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -844,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
844 if(code.length() != 0){ 932 if(code.length() != 0){
845 sql += " and cl_zbh = '"+code+"'"; 933 sql += " and cl_zbh = '"+code+"'";
846 } 934 }
  935 + if(company.length() != 0){
  936 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  937 + }
847 sql += " union " + 938 sql += " union " +
848 - "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + 939 + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " +
849 "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; 940 "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
850 if(line.length() != 0){ 941 if(line.length() != 0){
851 sql += " and xl_bm = '"+line+"'"; 942 sql += " and xl_bm = '"+line+"'";
@@ -853,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -853,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
853 if(code.length() != 0){ 944 if(code.length() != 0){
854 sql += " and cl_zbh = '"+code+"'"; 945 sql += " and cl_zbh = '"+code+"'";
855 } 946 }
  947 + if(company.length() != 0){
  948 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  949 + }
856 sql += " order by fcsj"; 950 sql += " order by fcsj";
857 951
858 list = jdbcTemplate.query(sql, 952 list = jdbcTemplate.query(sql,
@@ -872,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -872,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
872 map.put("reply47", rs.getString("reply47")); 966 map.put("reply47", rs.getString("reply47"));
873 map.put("reply46time", rs.getString("reply46time")); 967 map.put("reply46time", rs.getString("reply46time"));
874 map.put("reply47time", rs.getString("reply47time")); 968 map.put("reply47time", rs.getString("reply47time"));
  969 + map.put("company", rs.getObject("gs_name"));
  970 + map.put("subCompany", rs.getObject("fgs_name"));
875 return map; 971 return map;
876 } 972 }
877 }); 973 });
@@ -881,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -881,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
881 e.printStackTrace(); 977 e.printStackTrace();
882 } 978 }
883 979
884 - for(Map<String, Object> map : list){  
885 - String key = map.get("line") + "/" + map.get("clZbh") + "/" + map.get("jGh") + "/" + map.get("jName"); 980 + for(Map<String, Object> m : list){
  981 + String key = m.get("line") + "/" + m.get("clZbh") + "/" + m.get("jGh") + "/" + m.get("jName");
886 if(!keyMap.containsKey(key)) 982 if(!keyMap.containsKey(key))
887 keyMap.put(key, new ArrayList<Map<String, Object>>()); 983 keyMap.put(key, new ArrayList<Map<String, Object>>());
888 - keyMap.get(key).add(map); 984 + keyMap.get(key).add(m);
889 } 985 }
890 for(String key : keyMap.keySet()){ 986 for(String key : keyMap.keySet()){
891 Map<String, Object> tempMap = new HashMap<String, Object>(); 987 Map<String, Object> tempMap = new HashMap<String, Object>();
892 Set<String> tempSet = new HashSet<String>(); 988 Set<String> tempSet = new HashSet<String>();
893 int sjf = 0; 989 int sjf = 0;
894 int wqr = 0; 990 int wqr = 0;
895 - for(Map<String, Object> map : keyMap.get(key)){  
896 - tempSet.add(map.get("id").toString());  
897 - if(map.get("timestamp") != null){ 991 + String companyName = "", subCompanyName = "";
  992 + for(Map<String, Object> m : keyMap.get(key)){
  993 + if(m.containsKey("company") && m.get("company").toString().length()!=0 && companyName.length()==0)
  994 + companyName = m.get("company").toString();
  995 + if(m.containsKey("subCompany") && m.get("subCompany").toString().length()!=0 && subCompanyName.length()==0)
  996 + subCompanyName = m.get("subCompany").toString();
  997 + tempSet.add(m.get("id").toString());
  998 + if(m.get("timestamp") != null){
898 sjf++; 999 sjf++;
899 - if(map.get("reply47").toString().equals("-1")) 1000 + if(m.get("reply47").toString().equals("-1"))
900 wqr++; 1001 wqr++;
901 - map.put("time", sdf.format(new Date(Long.valueOf(map.get("timestamp").toString())))); 1002 + m.put("time", sdf.format(new Date(Long.valueOf(m.get("timestamp").toString()))));
902 } else 1003 } else
903 - map.put("time", "/"); 1004 + m.put("time", "/");
904 1005
905 - if(map.get("reply46time") != null)  
906 - map.put("time46", sdf.format(new Date(Long.valueOf(map.get("reply46time").toString())))); 1006 + if(m.get("reply46time") != null)
  1007 + m.put("time46", sdf.format(new Date(Long.valueOf(m.get("reply46time").toString()))));
907 else 1008 else
908 - map.put("time46", "/"); 1009 + m.put("time46", "/");
909 1010
910 - if(map.get("reply47time") != null)  
911 - map.put("time47", sdf.format(new Date(Long.valueOf(map.get("reply47time").toString())))); 1011 + if(m.get("reply47time") != null)
  1012 + m.put("time47", sdf.format(new Date(Long.valueOf(m.get("reply47time").toString()))));
912 else 1013 else
913 - map.put("time47", "/"); 1014 + m.put("time47", "/");
914 1015
915 } 1016 }
  1017 + tempMap.put("company", companyName);
  1018 + tempMap.put("subCompany", subCompanyName);
916 String[] split = key.split("/"); 1019 String[] split = key.split("/");
917 tempMap.put("date", date); 1020 tempMap.put("date", date);
918 tempMap.put("line", split[0]); 1021 tempMap.put("line", split[0]);
src/main/resources/static/pages/control/lineallot/allot.html
@@ -404,6 +404,7 @@ $(function(){ @@ -404,6 +404,7 @@ $(function(){
404 var f = arguments.callee 404 var f = arguments.callee
405 ,item = lsData[i]; 405 ,item = lsData[i];
406 406
  407 + //$.get('/realMap/findRouteByLine', {lineCode: item.lineCode}, function(rs){
407 $.get('/realSchedule/findRouteByLine', {lineCode: item.lineCode}, function(rs){ 408 $.get('/realSchedule/findRouteByLine', {lineCode: item.lineCode}, function(rs){
408 if(rs && rs.lineId){ 409 if(rs && rs.lineId){
409 cacheData[item.lineCode] = rs; 410 cacheData[item.lineCode] = rs;
src/main/resources/static/pages/excep/offlineList.html
@@ -223,6 +223,7 @@ $(function(){ @@ -223,6 +223,7 @@ $(function(){
223 } 223 }
224 224
225 function showPagination(data){ 225 function showPagination(data){
  226 + console.log(data);
226 //分页 227 //分页
227 $('#pagination').jqPaginator({ 228 $('#pagination').jqPaginator({
228 totalPages: data.totalPage, 229 totalPages: data.totalPage,
@@ -299,11 +300,4 @@ $(function(){ @@ -299,11 +300,4 @@ $(function(){
299 } 300 }
300 }); 301 });
301 }); 302 });
302 -//改变状态  
303 -function changeEnabled(id,enabled){  
304 - debugger  
305 - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){  
306 - jsDoQuery(null, true);  
307 - })  
308 -}  
309 </script> 303 </script>
310 \ No newline at end of file 304 \ No newline at end of file
src/main/resources/static/pages/forms/statement/busInterval.html
@@ -128,13 +128,13 @@ @@ -128,13 +128,13 @@
128 var year = d.getFullYear(); 128 var year = d.getFullYear();
129 var month = d.getMonth() + 1; 129 var month = d.getMonth() + 1;
130 var day = d.getDate(); 130 var day = d.getDate();
131 - if(month > 9){  
132 - $("#startDate").val(year + "-" + month + "-" + day);  
133 - $("#endDate").val(year + "-" + month + "-" + day);  
134 - } else {  
135 - $("#startDate").val(year + "-0" + month + "-" + day);  
136 - $("#endDate").val(year + "-0" + month + "-" + day);  
137 - } 131 + if(month < 10)
  132 + month = "0" + month;
  133 + if(day < 10)
  134 + day = "0" + day;
  135 + $("#startDate").val(year + "-" + month + "-" + day);
  136 + $("#endDate").val(year + "-" + month + "-" + day);
  137 +
138 $("#times1").val("06:00"); 138 $("#times1").val("06:00");
139 $("#times2").val("07:00"); 139 $("#times2").val("07:00");
140 140
@@ -227,6 +227,8 @@ @@ -227,6 +227,8 @@
227 var endDate = $("#endDate").val(); 227 var endDate = $("#endDate").val();
228 var model = $("#model").val(); 228 var model = $("#model").val();
229 var times = $("#times1").val() + "-" + $("#times2").val(); 229 var times = $("#times1").val() + "-" + $("#times2").val();
  230 + var company = $("#company").val();
  231 + var subCompany = $("#subCompany").val();
230 function jsDoQuery(pagination){ 232 function jsDoQuery(pagination){
231 var params = {}; 233 var params = {};
232 // line = $("#line").val(); 234 // line = $("#line").val();
@@ -234,11 +236,15 @@ @@ -234,11 +236,15 @@
234 endDate = $("#endDate").val(); 236 endDate = $("#endDate").val();
235 model = $("#model").val(); 237 model = $("#model").val();
236 times = $("#times1").val() + "-" + $("#times2").val(); 238 times = $("#times1").val() + "-" + $("#times2").val();
  239 + company = $("#company").val();
  240 + subCompany = $("#subCompany").val();
237 params['line'] = line; 241 params['line'] = line;
238 params['startDate'] = startDate; 242 params['startDate'] = startDate;
239 params['endDate'] = endDate; 243 params['endDate'] = endDate;
240 params['model'] = model; 244 params['model'] = model;
241 params['times'] = times; 245 params['times'] = times;
  246 + params['company'] = company;
  247 + params['subCompany'] = subCompany;
242 params['type'] = "query"; 248 params['type'] = "query";
243 $(".hidden").removeClass("hidden"); 249 $(".hidden").removeClass("hidden");
244 $get('/busInterval/interval', params, function(result){ 250 $get('/busInterval/interval', params, function(result){
src/main/resources/static/pages/forms/statement/commandState.html
@@ -60,6 +60,8 @@ @@ -60,6 +60,8 @@
60 <thead> 60 <thead>
61 <tr class="hidden"> 61 <tr class="hidden">
62 <th>日期</th> 62 <th>日期</th>
  63 + <th>公司</th>
  64 + <th>分公司</th>
63 <th>线路</th> 65 <th>线路</th>
64 <th>车辆</th> 66 <th>车辆</th>
65 <th>人员</th> 67 <th>人员</th>
@@ -125,18 +127,20 @@ @@ -125,18 +127,20 @@
125 var year = d.getFullYear(); 127 var year = d.getFullYear();
126 var month = d.getMonth() + 1; 128 var month = d.getMonth() + 1;
127 var day = d.getDate(); 129 var day = d.getDate();
128 - if(month > 9){  
129 - $("#date").val(year + "-" + month + "-" + day);  
130 - } else {  
131 - $("#date").val(year + "-0" + month + "-" + day);  
132 - } 130 + if(month < 10)
  131 + month = "0" + month;
  132 + if(day < 10)
  133 + day = "0" + day;
  134 + $("#date").val(year + "-" + month + "-" + day);
133 135
134 $.get('/basic/lineCode2Name',function(result){ 136 $.get('/basic/lineCode2Name',function(result){
135 var data=[]; 137 var data=[];
136 138
  139 + data.push({id: "", text: "全部线路"});
137 for(var code in result){ 140 for(var code in result){
138 data.push({id: code, text: result[code]}); 141 data.push({id: code, text: result[code]});
139 } 142 }
  143 +
140 console.log(data); 144 console.log(data);
141 initPinYinSelect2('#line',data,''); 145 initPinYinSelect2('#line',data,'');
142 }) 146 })
@@ -215,9 +219,14 @@ @@ -215,9 +219,14 @@
215 219
216 function jsDoQuery(pagination){ 220 function jsDoQuery(pagination){
217 var params = {}; 221 var params = {};
218 - params['line'] = $("#line").val(); 222 + var line = $("#line").val();
  223 + if(line = " ")
  224 + line = "";
  225 + params['line'] = line;
219 params['date'] = $("#date").val(); 226 params['date'] = $("#date").val();
220 params['code'] = $("#code").val(); 227 params['code'] = $("#code").val();
  228 + params['company'] = $("#company").val();
  229 + params['subCompany'] = $("#subCompany").val();
221 $("#forms .hidden").removeClass("hidden"); 230 $("#forms .hidden").removeClass("hidden");
222 $get('/pcpc/commandState', params, function(result){ 231 $get('/pcpc/commandState', params, function(result){
223 // 把数据填充到模版中 232 // 把数据填充到模版中
@@ -260,6 +269,8 @@ @@ -260,6 +269,8 @@
260 {{each list as obj i}} 269 {{each list as obj i}}
261 <tr> 270 <tr>
262 <td>{{obj.date}}</td> 271 <td>{{obj.date}}</td>
  272 + <td>{{obj.company}}</td>
  273 + <td>{{obj.subCompany}}</td>
263 <td>{{obj.line}}</td> 274 <td>{{obj.line}}</td>
264 <td>{{obj.clZbh}}</td> 275 <td>{{obj.clZbh}}</td>
265 <td><a id="jsy">{{obj.jsy}}</a></td> 276 <td><a id="jsy">{{obj.jsy}}</a></td>
@@ -270,7 +281,7 @@ @@ -270,7 +281,7 @@
270 {{/each}} 281 {{/each}}
271 {{if list.length == 0}} 282 {{if list.length == 0}}
272 <tr> 283 <tr>
273 - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 284 + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
274 </tr> 285 </tr>
275 {{/if}} 286 {{/if}}
276 </script> 287 </script>
src/main/resources/static/pages/forms/statement/correctStatis.html
@@ -101,7 +101,6 @@ @@ -101,7 +101,6 @@
101 <script> 101 <script>
102 $(function(){ 102 $(function(){
103 103
104 -  
105 // 关闭左侧栏 104 // 关闭左侧栏
106 if (!$('body').hasClass('page-sidebar-closed')) 105 if (!$('body').hasClass('page-sidebar-closed'))
107 $('.menu-toggler.sidebar-toggler').click(); 106 $('.menu-toggler.sidebar-toggler').click();
@@ -127,13 +126,13 @@ @@ -127,13 +126,13 @@
127 var year = d.getFullYear(); 126 var year = d.getFullYear();
128 var month = d.getMonth() + 1; 127 var month = d.getMonth() + 1;
129 var day = d.getDate(); 128 var day = d.getDate();
130 - if(month > 9){  
131 - $("#startDate").val(year + "-" + month + "-" + day);  
132 - $("#endDate").val(year + "-" + month + "-" + day);  
133 - } else {  
134 - $("#startDate").val(year + "-0" + month + "-" + day);  
135 - $("#endDate").val(year + "-0" + month + "-" + day);  
136 - } 129 + if(month < 10)
  130 + month = "0" + month;
  131 + if(day < 10)
  132 + day = "0" + day;
  133 + $("#startDate").val(year + "-" + month + "-" + day);
  134 + $("#endDate").val(year + "-" + month + "-" + day);
  135 +
137 $("#times1").val("06:00"); 136 $("#times1").val("06:00");
138 $("#times2").val("07:00"); 137 $("#times2").val("07:00");
139 138
@@ -184,8 +183,8 @@ @@ -184,8 +183,8 @@
184 183
185 $("#query").on("click",jsDoQuery); 184 $("#query").on("click",jsDoQuery);
186 185
187 - var company;  
188 - var subCompany; 186 + var company = $("#company").val();
  187 + var subCompany = $("#subCompany").val();
189 var lines; 188 var lines;
190 var line = $("#line").val(); 189 var line = $("#line").val();
191 var startDate = $("#startDate").val(); 190 var startDate = $("#startDate").val();
@@ -197,10 +196,14 @@ @@ -197,10 +196,14 @@
197 startDate = $("#startDate").val(); 196 startDate = $("#startDate").val();
198 endDate = $("#endDate").val(); 197 endDate = $("#endDate").val();
199 times = $("#times1").val() + "-" + $("#times2").val(); 198 times = $("#times1").val() + "-" + $("#times2").val();
  199 + company = $("#company").val();
  200 + subCompany = $("#subCompany").val();
200 params['line'] = line; 201 params['line'] = line;
201 params['startDate'] = startDate; 202 params['startDate'] = startDate;
202 params['endDate'] = endDate; 203 params['endDate'] = endDate;
203 params['times'] = times; 204 params['times'] = times;
  205 + params['company'] = company;
  206 + params['subCompany'] = subCompany;
204 params['type'] = "query"; 207 params['type'] = "query";
205 // $(".hidden").removeClass("hidden"); 208 // $(".hidden").removeClass("hidden");
206 $get('/busInterval/correctStatis', params, function(result){ 209 $get('/busInterval/correctStatis', params, function(result){
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
@@ -111,15 +111,16 @@ @@ -111,15 +111,16 @@
111 var year = d.getFullYear(); 111 var year = d.getFullYear();
112 var month = d.getMonth() + 1; 112 var month = d.getMonth() + 1;
113 var day = d.getDate(); 113 var day = d.getDate();
114 - if(month > 9){  
115 - $("#date").val(year + "-" + month + "-" + day);  
116 - } else {  
117 - $("#date").val(year + "-0" + month + "-" + day);  
118 - } 114 + if(month < 10)
  115 + month = "0" + month;
  116 + if(day < 10)
  117 + day = "0" + day;
  118 + $("#date").val(year + "-" + month + "-" + day);
119 119
120 $.get('/basic/lineCode2Name',function(result){ 120 $.get('/basic/lineCode2Name',function(result){
121 var data=[]; 121 var data=[];
122 122
  123 + data.push({id: " ", text: "全部线路"});
123 for(var code in result){ 124 for(var code in result){
124 data.push({id: code, text: result[code]}); 125 data.push({id: code, text: result[code]});
125 } 126 }
@@ -160,12 +161,21 @@ @@ -160,12 +161,21 @@
160 161
161 $("#query").on("click",jsDoQuery); 162 $("#query").on("click",jsDoQuery);
162 163
  164 + var company = $("#company").val();
  165 + var subCompany = $("#subCompany").val();
163 var line = $("#line").val(); 166 var line = $("#line").val();
164 var date = $("#date").val(); 167 var date = $("#date").val();
165 function jsDoQuery(pagination){ 168 function jsDoQuery(pagination){
166 var params = {}; 169 var params = {};
  170 + company = $("#company").val();
  171 + subCompany = $("#subCompany").val();
167 line = $("#line").val(); 172 line = $("#line").val();
168 date = $("#date").val(); 173 date = $("#date").val();
  174 + if(line == " ")
  175 + line = "";
  176 + params['company'] = company;
  177 + params['subCompany'] = subCompany;
  178 + params['line'] = line;
169 params['line'] = line; 179 params['line'] = line;
170 params['date'] = date; 180 params['date'] = date;
171 params['type'] = "query"; 181 params['type'] = "query";
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -134,13 +134,13 @@ @@ -134,13 +134,13 @@
134 var year = d.getFullYear(); 134 var year = d.getFullYear();
135 var month = d.getMonth() + 1; 135 var month = d.getMonth() + 1;
136 var day = d.getDate(); 136 var day = d.getDate();
137 - if(month > 9){  
138 - $("#startDate").val(year + "-" + month + "-" + day);  
139 - $("#endDate").val(year + "-" + month + "-" + day);  
140 - } else {  
141 - $("#startDate").val(year + "-0" + month + "-" + day);  
142 - $("#endDate").val(year + "-0" + month + "-" + day);  
143 - } 137 + if(month < 10)
  138 + month = "0" + month;
  139 + if(day < 10)
  140 + day = "0" + day;
  141 + $("#startDate").val(year + "-" + month + "-" + day);
  142 + $("#endDate").val(year + "-" + month + "-" + day);
  143 +
144 $("#times1").val("06:00"); 144 $("#times1").val("06:00");
145 $("#times2").val("07:00"); 145 $("#times2").val("07:00");
146 146
@@ -222,6 +222,8 @@ @@ -222,6 +222,8 @@
222 var endDate = $("#endDate").val(); 222 var endDate = $("#endDate").val();
223 var model = $("#model").val(); 223 var model = $("#model").val();
224 var times = $("#times1").val() + "-" + $("#times2").val(); 224 var times = $("#times1").val() + "-" + $("#times2").val();
  225 + var company = $("#company").val();
  226 + var subCompany = $("#subCompany").val();
225 function jsDoQuery(pagination){ 227 function jsDoQuery(pagination){
226 var reason = $("input[name='reason']"); 228 var reason = $("input[name='reason']");
227 var params = {}; 229 var params = {};
@@ -230,11 +232,15 @@ @@ -230,11 +232,15 @@
230 endDate = $("#endDate").val(); 232 endDate = $("#endDate").val();
231 model = $("#model").val(); 233 model = $("#model").val();
232 times = $("#times1").val() + "-" + $("#times2").val(); 234 times = $("#times1").val() + "-" + $("#times2").val();
  235 + company = $("#company").val();
  236 + subCompany = $("#subCompany").val();
233 params['line'] = line; 237 params['line'] = line;
234 params['startDate'] = startDate; 238 params['startDate'] = startDate;
235 params['endDate'] = endDate; 239 params['endDate'] = endDate;
236 params['model'] = model; 240 params['model'] = model;
237 params['times'] = times; 241 params['times'] = times;
  242 + params['company'] = company;
  243 + params['subCompany'] = subCompany;
238 params['type'] = "query"; 244 params['type'] = "query";
239 // $(".hidden").removeClass("hidden"); 245 // $(".hidden").removeClass("hidden");
240 $get('/busInterval/lbStatuAnaly', params, function(result){ 246 $get('/busInterval/lbStatuAnaly', params, function(result){
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
@@ -192,13 +192,13 @@ @@ -192,13 +192,13 @@
192 var year = d.getFullYear(); 192 var year = d.getFullYear();
193 var month = d.getMonth() + 1; 193 var month = d.getMonth() + 1;
194 var day = d.getDate(); 194 var day = d.getDate();
195 - if(month > 9){  
196 - $("#startDate").val(year + "-" + month + "-" + day);  
197 - $("#endDate").val(year + "-" + month + "-" + day);  
198 - } else {  
199 - $("#startDate").val(year + "-0" + month + "-" + day);  
200 - $("#endDate").val(year + "-0" + month + "-" + day);  
201 - } 195 + if(month < 10)
  196 + month = "0" + month;
  197 + if(day < 10)
  198 + day = "0" + day;
  199 + $("#startDate").val(year + "-" + month + "-" + day);
  200 + $("#endDate").val(year + "-" + month + "-" + day);
  201 +
202 $("#times1").val("06:00"); 202 $("#times1").val("06:00");
203 $("#times2").val("07:00"); 203 $("#times2").val("07:00");
204 204
@@ -267,6 +267,8 @@ @@ -267,6 +267,8 @@
267 var model = $("#model").val(); 267 var model = $("#model").val();
268 var times = $("#times1").val() + "-" + $("#times2").val(); 268 var times = $("#times1").val() + "-" + $("#times2").val();
269 var upDown = $("#upDown").val(); 269 var upDown = $("#upDown").val();
  270 + var company = $("#company").val();
  271 + var subCompany = $("#subCompany").val();
270 function jsDoQuery(pagination){ 272 function jsDoQuery(pagination){
271 var params = {}; 273 var params = {};
272 // line = $("#line").val(); 274 // line = $("#line").val();
@@ -275,12 +277,16 @@ @@ -275,12 +277,16 @@
275 model = $("#model").val(); 277 model = $("#model").val();
276 times = $("#times1").val() + "-" + $("#times2").val(); 278 times = $("#times1").val() + "-" + $("#times2").val();
277 upDown = $("#upDown").val(); 279 upDown = $("#upDown").val();
  280 + company = $("#company").val();
  281 + subCompany = $("#subCompany").val();
278 params['line'] = line; 282 params['line'] = line;
279 params['startDate'] = startDate; 283 params['startDate'] = startDate;
280 params['endDate'] = endDate; 284 params['endDate'] = endDate;
281 params['model'] = model; 285 params['model'] = model;
282 params['times'] = times; 286 params['times'] = times;
283 params['upDown'] = upDown; 287 params['upDown'] = upDown;
  288 + params['company'] = company;
  289 + params['subCompany'] = subCompany;
284 params['type'] = "query"; 290 params['type'] = "query";
285 $("#forms .hidden").removeClass("hidden"); 291 $("#forms .hidden").removeClass("hidden");
286 $get('/busInterval/lineTimeAnaliy', params, function(result){ 292 $get('/busInterval/lineTimeAnaliy', params, function(result){
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
@@ -55,6 +55,8 @@ @@ -55,6 +55,8 @@
55 <thead> 55 <thead>
56 <tr class="hidden"> 56 <tr class="hidden">
57 <th>日期</th> 57 <th>日期</th>
  58 + <th>公司</th>
  59 + <th>分公司</th>
58 <th>线路</th> 60 <th>线路</th>
59 <th>路牌</th> 61 <th>路牌</th>
60 <th>车辆</th> 62 <th>车辆</th>
@@ -92,11 +94,11 @@ @@ -92,11 +94,11 @@
92 var year = d.getFullYear(); 94 var year = d.getFullYear();
93 var month = d.getMonth() + 1; 95 var month = d.getMonth() + 1;
94 var day = d.getDate(); 96 var day = d.getDate();
95 - if(month > 9){  
96 - $("#date").val(year + "-" + month + "-" + day);  
97 - } else {  
98 - $("#date").val(year + "-0" + month + "-" + day);  
99 - } 97 + if(month < 10)
  98 + month = "0" + month;
  99 + if(day < 10)
  100 + day = "0" + day;
  101 + $("#date").val(year + "-" + month + "-" + day);
100 102
101 $.get('/basic/lineCode2Name',function(result){ 103 $.get('/basic/lineCode2Name',function(result){
102 var data=[]; 104 var data=[];
@@ -144,12 +146,18 @@ @@ -144,12 +146,18 @@
144 146
145 var line = $("#line").val(); 147 var line = $("#line").val();
146 var date = $("#date").val(); 148 var date = $("#date").val();
  149 + var company = $("#company").val();
  150 + var subCompany = $("#subCompany").val();
147 function jsDoQuery(pagination){ 151 function jsDoQuery(pagination){
148 var params = {}; 152 var params = {};
  153 + company = $("#company").val();
  154 + subCompany = $("#subCompany").val();
149 line = $("#line").val(); 155 line = $("#line").val();
150 date = $("#date").val(); 156 date = $("#date").val();
151 if(line == " ") 157 if(line == " ")
152 line = ""; 158 line = "";
  159 + params['company'] = company;
  160 + params['subCompany'] = subCompany;
153 params['line'] = line; 161 params['line'] = line;
154 params['date'] = date; 162 params['date'] = date;
155 params['type'] = "query"; 163 params['type'] = "query";
@@ -177,6 +185,8 @@ @@ -177,6 +185,8 @@
177 {{each list as obj i}} 185 {{each list as obj i}}
178 <tr> 186 <tr>
179 <td>{{obj.date}}</td> 187 <td>{{obj.date}}</td>
  188 + <td>{{obj.company}}</td>
  189 + <td>{{obj.subCompany}}</td>
180 <td>{{obj.line}}</td> 190 <td>{{obj.line}}</td>
181 <td>{{obj.lp}}</td> 191 <td>{{obj.lp}}</td>
182 <td>{{obj.clzbh}}</td> 192 <td>{{obj.clzbh}}</td>
@@ -187,7 +197,7 @@ @@ -187,7 +197,7 @@
187 {{/each}} 197 {{/each}}
188 {{if list.length == 0}} 198 {{if list.length == 0}}
189 <tr> 199 <tr>
190 - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 200 + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
191 </tr> 201 </tr>
192 {{/if}} 202 {{/if}}
193 </script> 203 </script>
194 \ No newline at end of file 204 \ No newline at end of file
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
@@ -114,13 +114,12 @@ @@ -114,13 +114,12 @@
114 var year = d.getFullYear(); 114 var year = d.getFullYear();
115 var month = d.getMonth() + 1; 115 var month = d.getMonth() + 1;
116 var day = d.getDate(); 116 var day = d.getDate();
117 - if(month > 9){  
118 - $("#startDate").val(year + "-" + month + "-" + day);  
119 - $("#endDate").val(year + "-" + month + "-" + day);  
120 - } else {  
121 - $("#startDate").val(year + "-0" + month + "-" + day);  
122 - $("#endDate").val(year + "-0" + month + "-" + day);  
123 - } 117 + if(month < 10)
  118 + month = "0" + month;
  119 + if(day < 10)
  120 + day = "0" + day;
  121 + $("#startDate").val(year + "-" + month + "-" + day);
  122 + $("#endDate").val(year + "-" + month + "-" + day);
124 123
125 $.get('/basic/lineCode2Name',function(result){ 124 $.get('/basic/lineCode2Name',function(result){
126 var data=[]; 125 var data=[];
@@ -176,17 +175,23 @@ @@ -176,17 +175,23 @@
176 var startDate = $("#startDate").val(); 175 var startDate = $("#startDate").val();
177 var endDate = $("#endDate").val(); 176 var endDate = $("#endDate").val();
178 var model = $("#model").val(); 177 var model = $("#model").val();
  178 + var company = $("#company").val();
  179 + var subCompany = $("#subCompany").val();
179 function jsDoQuery(pagination){ 180 function jsDoQuery(pagination){
180 var params = {}; 181 var params = {};
181 // line = $("#line").val(); 182 // line = $("#line").val();
182 startDate = $("#startDate").val(); 183 startDate = $("#startDate").val();
183 endDate = $("#endDate").val(); 184 endDate = $("#endDate").val();
184 model = $("#model").val(); 185 model = $("#model").val();
  186 + company = $("#company").val();
  187 + subCompany = $("#subCompany").val();
185 params['page'] = page; 188 params['page'] = page;
186 params['line'] = line; 189 params['line'] = line;
187 params['startDate'] = startDate; 190 params['startDate'] = startDate;
188 params['endDate'] = endDate; 191 params['endDate'] = endDate;
189 params['model'] = model; 192 params['model'] = model;
  193 + params['company'] = company;
  194 + params['subCompany'] = subCompany;
190 params['type'] = "query"; 195 params['type'] = "query";
191 $(".hidden").removeClass("hidden"); 196 $(".hidden").removeClass("hidden");
192 $get('/pcpc/scheduleAnaly', params, function(result){ 197 $get('/pcpc/scheduleAnaly', params, function(result){
@@ -199,8 +204,12 @@ @@ -199,8 +204,12 @@
199 //重新分页 204 //重新分页
200 initPagination = true; 205 initPagination = true;
201 showPagination(result); 206 showPagination(result);
  207 +
  208 + $('#pagination').show();
  209 + } else if(result.dataList.length == 0){
  210 + $('#pagination').hide();
202 } 211 }
203 - }); 212 + });
204 } 213 }
205 214
206 $("#export").on("click",function(){ 215 $("#export").on("click",function(){
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
@@ -136,13 +136,13 @@ @@ -136,13 +136,13 @@
136 var year = d.getFullYear(); 136 var year = d.getFullYear();
137 var month = d.getMonth() + 1; 137 var month = d.getMonth() + 1;
138 var day = d.getDate(); 138 var day = d.getDate();
139 - if(month > 9){  
140 - $("#startDate").val(year + "-" + month + "-" + day);  
141 - $("#endDate").val(year + "-" + month + "-" + day);  
142 - } else {  
143 - $("#startDate").val(year + "-0" + month + "-" + day);  
144 - $("#endDate").val(year + "-0" + month + "-" + day);  
145 - } 139 + if(month < 10)
  140 + month = "0" + month;
  141 + if(day < 10)
  142 + day = "0" + day;
  143 + $("#startDate").val(year + "-" + month + "-" + day);
  144 + $("#endDate").val(year + "-" + month + "-" + day);
  145 +
146 $("#times1").val("06:00"); 146 $("#times1").val("06:00");
147 $("#times2").val("07:00"); 147 $("#times2").val("07:00");
148 148
@@ -211,6 +211,8 @@ @@ -211,6 +211,8 @@
211 var model = $("#model").val(); 211 var model = $("#model").val();
212 var times = $("#times1").val() + "-" + $("#times2").val(); 212 var times = $("#times1").val() + "-" + $("#times2").val();
213 var upDown = $("#upDown").val(); 213 var upDown = $("#upDown").val();
  214 + var company = $("#company").val();
  215 + var subCompany = $("#subCompany").val();
214 function jsDoQuery(pagination){ 216 function jsDoQuery(pagination){
215 var params = {}; 217 var params = {};
216 // line = $("#line").val(); 218 // line = $("#line").val();
@@ -219,12 +221,16 @@ @@ -219,12 +221,16 @@
219 model = $("#model").val(); 221 model = $("#model").val();
220 times = $("#times1").val() + "-" + $("#times2").val(); 222 times = $("#times1").val() + "-" + $("#times2").val();
221 upDown = $("#upDown").val(); 223 upDown = $("#upDown").val();
  224 + company = $("#company").val();
  225 + subCompany = $("#subCompany").val();
222 params['line'] = line; 226 params['line'] = line;
223 params['startDate'] = startDate; 227 params['startDate'] = startDate;
224 params['endDate'] = endDate; 228 params['endDate'] = endDate;
225 params['model'] = model; 229 params['model'] = model;
226 params['times'] = times; 230 params['times'] = times;
227 params['upDown'] = upDown; 231 params['upDown'] = upDown;
  232 + params['company'] = company;
  233 + params['subCompany'] = subCompany;
228 params['type'] = "query"; 234 params['type'] = "query";
229 $(".hidden").removeClass("hidden"); 235 $(".hidden").removeClass("hidden");
230 $get('/busInterval/timeAndSpeed', params, function(result){ 236 $get('/busInterval/timeAndSpeed', params, function(result){
src/main/resources/static/pages/forms/statement/waybillBf.html
1 -<style type="text/css">  
2 - .table-bordered {  
3 - border: 1px solid; }  
4 - .table-bordered > thead > tr > th,  
5 - .table-bordered > thead > tr > td,  
6 - .table-bordered > tbody > tr > th,  
7 - .table-bordered > tbody > tr > td,  
8 - .table-bordered > tfoot > tr > th,  
9 - .table-bordered > tfoot > tr > td {  
10 - border: 1px solid; }  
11 - .table-bordered > thead > tr > th,  
12 - .table-bordered > thead > tr > td {  
13 - border-bottom-width: 2px; }  
14 -  
15 - .table > tbody + tbody {  
16 - border-top: 1px solid; }  
17 -</style>  
18 -  
19 -<div class="page-head">  
20 - <div class="page-title">  
21 - <h1>行车路单</h1>  
22 - </div>  
23 -</div> 1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>行车路单</h1>
  22 + </div>
  23 +</div>
  24 +
24 25
25 <div class="row"> 26 <div class="row">
  27 +
26 <div class="col-md-12"> 28 <div class="col-md-12">
  29 +
27 <div class="portlet light porttlet-fit bordered"> 30 <div class="portlet light porttlet-fit bordered">
  31 +
28 <div class="portlet-title"> 32 <div class="portlet-title">
  33 +
29 <form class="form-inline" action=""> 34 <form class="form-inline" action="">
  35 +
30 <div style="display: inline-block;"> 36 <div style="display: inline-block;">
31 - <span class="item-label" style="width: 80px;">线路: </span> 37 +
  38 + <span class="item-label" style="width: 80px;">线路: </span>
32 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 39 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  40 +
33 </div> 41 </div>
  42 +
34 <div style="display: inline-block;margin-left: 15px;"> 43 <div style="display: inline-block;margin-left: 15px;">
  44 +
35 <span class="item-label" style="width: 80px;">时间: </span> 45 <span class="item-label" style="width: 80px;">时间: </span>
  46 +
36 <input class="form-control" type="text" id="date" style="width: 180px;"/> 47 <input class="form-control" type="text" id="date" style="width: 180px;"/>
  48 +
37 </div> 49 </div>
  50 +
38 <div class="form-group" style="display: inline-block;margin-left: 15px;"> 51 <div class="form-group" style="display: inline-block;margin-left: 15px;">
  52 +
39 <input class="btn btn-default" type="button" id="query" value="查询"/> 53 <input class="btn btn-default" type="button" id="query" value="查询"/>
  54 +
40 <input class="btn btn-default" type="button" id="export" value="导出"/> 55 <input class="btn btn-default" type="button" id="export" value="导出"/>
  56 +
41 <input class="btn btn-default" type="button" id="print" value="打印"/> 57 <input class="btn btn-default" type="button" id="print" value="打印"/>
  58 +
42 <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> 59 <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/>
  60 +
43 </div> 61 </div>
  62 +
44 </form> 63 </form>
  64 +
45 </div> 65 </div>
  66 +
46 <div class="portlet-body"> 67 <div class="portlet-body">
  68 +
47 <div class="row"> 69 <div class="row">
  70 +
48 <div class="col-md-3"> 71 <div class="col-md-3">
  72 +
49 <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> 73 <div class="" style="margin-top: 10px;overflow:auto;height: 860px">
  74 +
50 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> 75 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
  76 +
51 <thead> 77 <thead>
  78 +
52 <tr class="hidden"> 79 <tr class="hidden">
  80 +
53 <th>人员</th> 81 <th>人员</th>
  82 +
54 <th>自编号</th> 83 <th>自编号</th>
  84 +
55 <th>路牌</th> 85 <th>路牌</th>
  86 +
56 </tr> 87 </tr>
  88 +
57 </thead> 89 </thead>
  90 +
58 <tbody> 91 <tbody>
  92 +
59 93
  94 +
60 </tbody> 95 </tbody>
  96 +
61 </table> 97 </table>
  98 +
62 </div> 99 </div>
  100 +
63 </div> 101 </div>
  102 +
64 <div class="col-md-9" id="printArea"> 103 <div class="col-md-9" id="printArea">
  104 +
65 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> 105 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  106 +
66 <table class="table table-bordered table-checkable" id="forms"> 107 <table class="table table-bordered table-checkable" id="forms">
67 - <tbody class="ludan_1">  
68 -  
69 - </tbody>  
70 - <tbody class="ludan_2">  
71 -  
72 - </tbody>  
73 - <tbody class="ludan_3">  
74 -  
75 - </tbody>  
76 - <tbody class="ludan_4">  
77 - 108 +
  109 + <tbody class="ludan_1">
  110 +
  111 + </tbody>
  112 + <tbody class="ludan_2">
  113 +
  114 + </tbody>
  115 + <tbody class="ludan_3">
  116 +
  117 + </tbody>
  118 + <tbody class="ludan_4">
  119 +
78 </tbody> 120 </tbody>
  121 +
79 </table> 122 </table>
  123 +
80 </div> 124 </div>
  125 +
81 </div> 126 </div>
  127 +
82 </div> 128 </div>
  129 +
83 </div> 130 </div>
  131 +
84 </div> 132 </div>
  133 +
85 </div> 134 </div>
  135 +
86 </div> 136 </div>
87 137
  138 +
  139 +
88 <script> 140 <script>
  141 +
89 $(function(){ 142 $(function(){
  143 +
90 // 关闭左侧栏 144 // 关闭左侧栏
  145 +
91 if (!$('body').hasClass('page-sidebar-closed')) 146 if (!$('body').hasClass('page-sidebar-closed'))
92 - $('.menu-toggler.sidebar-toggler').click(); 147 +
  148 + $('.menu-toggler.sidebar-toggler').click();
93 149
  150 +
94 $("#date").datetimepicker({ 151 $("#date").datetimepicker({
  152 +
95 format : 'YYYY-MM-DD', 153 format : 'YYYY-MM-DD',
  154 +
96 locale : 'zh-cn' 155 locale : 'zh-cn'
97 - });  
98 -  
99 - $('#line').select2({  
100 - ajax: {  
101 - url: '/realSchedule/findLine',  
102 - type: 'post',  
103 - dataType: 'json',  
104 - delay: 150,  
105 - data: function(params){  
106 - return{line: params.term};  
107 - },  
108 - processResults: function (data) {  
109 - return {  
110 - results: data  
111 - };  
112 - },  
113 - cache: true  
114 - },  
115 - templateResult: function(repo){  
116 - if (repo.loading) return repo.text;  
117 - var h = '<span>'+repo.text+'</span>';  
118 - return h;  
119 - },  
120 - escapeMarkup: function (markup) { return markup; },  
121 - minimumInputLength: 1,  
122 - templateSelection: function(repo){  
123 - return repo.text;  
124 - },  
125 - language: {  
126 - noResults: function(){  
127 - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';  
128 - },  
129 - inputTooShort : function(e) {  
130 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';  
131 - },  
132 - searching : function() {  
133 - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';  
134 - }  
135 - }  
136 - });  
137 - 156 +
  157 + });
  158 +
  159 + $('#line').select2({
  160 + ajax: {
  161 + url: '/realSchedule/findLine',
  162 + type: 'post',
  163 + dataType: 'json',
  164 + delay: 150,
  165 + data: function(params){
  166 + return{line: params.term};
  167 + },
  168 + processResults: function (data) {
  169 + return {
  170 + results: data
  171 + };
  172 + },
  173 + cache: true
  174 + },
  175 + templateResult: function(repo){
  176 + if (repo.loading) return repo.text;
  177 + var h = '<span>'+repo.text+'</span>';
  178 + return h;
  179 + },
  180 + escapeMarkup: function (markup) { return markup; },
  181 + minimumInputLength: 1,
  182 + templateSelection: function(repo){
  183 + return repo.text;
  184 + },
  185 + language: {
  186 + noResults: function(){
  187 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  188 + },
  189 + inputTooShort : function(e) {
  190 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  191 + },
  192 + searching : function() {
  193 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  194 + }
  195 + }
  196 + });
  197 +
138 var date = ''; 198 var date = '';
  199 +
139 $("#query").on("click",function(){ 200 $("#query").on("click",function(){
  201 +
140 var line = $("#line").val(); 202 var line = $("#line").val();
141 - date = $("#date").val(); 203 +
  204 + date = $("#date").val();
142 $(".hidden").removeClass("hidden"); 205 $(".hidden").removeClass("hidden");
  206 +
143 $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ 207 $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){
  208 +
144 // 把数据填充到模版中 209 // 把数据填充到模版中
  210 +
145 var tbodyHtml = template('list_info',{list:result}); 211 var tbodyHtml = template('list_info',{list:result});
  212 +
146 // 把渲染好的模版html文本追加到表格中 213 // 把渲染好的模版html文本追加到表格中
  214 +
147 $('#info tbody').html(tbodyHtml); 215 $('#info tbody').html(tbodyHtml);
  216 +
148 }); 217 });
149 - });  
150 -  
151 - var params = new Array(); 218 +
  219 + });
  220 +
  221 + var params = new Array();
152 var jName = ''; 222 var jName = '';
153 - $("#info tbody").on("click","tr",function(){  
154 - if($(this).children().size() < 2){  
155 - return; 223 +
  224 + $("#info tbody").on("click","tr",function(){
  225 + if($(this).children().size() < 2){
  226 + return;
156 } 227 }
  228 +
157 229
  230 +
158 $(this).children().each(function(index){ 231 $(this).children().each(function(index){
  232 +
159 params[index] = $(this).text(); 233 params[index] = $(this).text();
160 - });  
161 - console.log(params);  
162 - jName = params[0].split("\\")[0];  
163 - var id = $("#"+params[1]).val();  
164 - $get('/realSchedule/'+id,null,function(result){  
165 - console.log(result);  
166 - result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");  
167 - var ludan_1 = template('ludan_1',result);  
168 - //var ludan_4 = template('ludan_4',result);  
169 - // 把渲染好的模版html文本追加到表格中  
170 - $('#forms .ludan_1').html(ludan_1);  
171 - //$('#forms .ludan_4').html(ludan_4); 234 +
  235 + });
  236 + console.log(params);
  237 + jName = params[0].split("\\")[0];
  238 + var id = $("#"+params[1]).val();
  239 + $get('/realSchedule/'+id,null,function(result){
  240 + console.log(result);
  241 + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
  242 + var ludan_1 = template('ludan_1',result);
  243 + //var ludan_4 = template('ludan_4',result);
  244 + // 把渲染好的模版html文本追加到表格中
  245 + $('#forms .ludan_1').html(ludan_1);
  246 + //$('#forms .ludan_4').html(ludan_4);
172 }); 247 });
173 - $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ 248 +
  249 + $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
174 getTime(result); 250 getTime(result);
  251 +
175 var ludan_2 = template('ludan_2',{list:result}); 252 var ludan_2 = template('ludan_2',{list:result});
  253 +
176 // 把渲染好的模版html文本追加到表格中 254 // 把渲染好的模版html文本追加到表格中
  255 +
177 $('#forms .ludan_2').html(ludan_2); 256 $('#forms .ludan_2').html(ludan_2);
178 - });  
179 - $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){  
180 - var ludan_3 = template('ludan_3',result);  
181 - $('#forms .ludan_3').html(ludan_3);  
182 - }); 257 +
  258 + });
  259 + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  260 + var ludan_3 = template('ludan_3',result);
  261 + $('#forms .ludan_3').html(ludan_3);
  262 + });
183 263
184 - });  
185 -  
186 - $("#export").on("click",function(){  
187 - if(params.length < 1){  
188 - return;  
189 - }  
190 - $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){  
191 - window.open("/downloadFile/download?fileName="+jName);  
192 - });  
193 - });  
194 -  
195 - $("#print").click(function(){  
196 - $("#printArea").printArea();  
197 - });  
198 -  
199 - $("#exportMore").on("click",function(){  
200 - return;  
201 - $post('/realSchedule/exportWaybillMore',{date:date},function(result){  
202 - window.open("/downloadFile/download?fileName="+jName);  
203 - });  
204 - });  
205 -  
206 - function getTime(list){  
207 - $.each(list, function(i, obj) {  
208 - if(obj.zdsj != null && obj.zdsjActual != null ){  
209 - var zdsjActual = (obj.zdsjActual).split(":");  
210 - var zdsj = (obj.zdsj).split(":");  
211 - if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){  
212 - obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));  
213 - }  
214 - else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){  
215 - obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));  
216 - }  
217 - }  
218 - }); 264 +
  265 + });
  266 +
  267 + $("#export").on("click",function(){
  268 + if(params.length < 1){
  269 + return;
  270 + }
  271 + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  272 + window.open("/downloadFile/download?fileName="+jName);
  273 + });
  274 + });
  275 +
  276 + $("#print").click(function(){
  277 + $("#printArea").printArea();
  278 + });
  279 +
  280 + $("#exportMore").on("click",function(){
  281 + return;
  282 + $post('/realSchedule/exportWaybillMore',{date:date},function(result){
  283 + window.open("/downloadFile/download?fileName="+jName);
  284 + });
  285 + });
  286 +
  287 + function getTime(list){
  288 + $.each(list, function(i, obj) {
  289 + if(obj.zdsj != null && obj.zdsjActual != null ){
  290 + var zdsjActual = (obj.zdsjActual).split(":");
  291 + var zdsj = (obj.zdsj).split(":");
  292 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  293 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  294 + }
  295 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  296 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  297 + }
  298 + }
  299 + });
219 } 300 }
  301 +
220 }); 302 });
  303 +
221 </script> 304 </script>
  305 +
222 <script type="text/html" id="list_info"> 306 <script type="text/html" id="list_info">
  307 +
223 {{each list as obj i}} 308 {{each list as obj i}}
  309 +
224 <tr> 310 <tr>
  311 +
225 <td width="45%">{{obj[4]}}\{{obj[1]}}</td> 312 <td width="45%">{{obj[4]}}\{{obj[1]}}</td>
  313 +
226 <td width="32%">{{obj[2]}}</td> 314 <td width="32%">{{obj[2]}}</td>
  315 +
227 <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td> 316 <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td>
  317 +
228 </tr> 318 </tr>
  319 +
229 {{/each}} 320 {{/each}}
  321 +
230 {{if list.length == 0}} 322 {{if list.length == 0}}
  323 +
231 <tr> 324 <tr>
  325 +
232 <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> 326 <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td>
  327 +
233 </tr> 328 </tr>
  329 +
234 {{/if}} 330 {{/if}}
235 -</script>  
236 -<script type="text/html" id="ludan_1">  
237 - <tr>  
238 - <td colspan="14">行车路单</td>  
239 - </tr>  
240 - <tr>  
241 - <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>  
242 - </tr>  
243 - <tr>  
244 - <td colspan="2">出场存油 &nbsp;升</td>  
245 - <td colspan="2">加注油量 &nbsp;升</td>  
246 - <td colspan="2">进场存油 &nbsp;升</td>  
247 - <td colspan="4">加注机油 &nbsp;升</td>  
248 - <td colspan="4">本日耗油 &nbsp;升</td>  
249 - </tr>  
250 - <tr>  
251 - <td rowspan="2">调度章</td>  
252 - <td colspan="1">&nbsp;</td>  
253 - <td rowspan="2">早班</td>  
254 - <td colspan="1">&nbsp;</td>  
255 - <td rowspan="2">夜班</td>  
256 - <td colspan="1">&nbsp;</td>  
257 - <td rowspan="2" colspan="2">交叉</td>  
258 - <td colspan="2">&nbsp;</td>  
259 - <td rowspan="2">其他</td>  
260 - <td colspan="1">&nbsp;</td>  
261 - <td colspan="1">&nbsp;</td>  
262 - <td colspan="1">&nbsp;</td>  
263 - </tr>  
264 - <tr>  
265 - <td colspan="1">&nbsp;</td>  
266 - <td colspan="1">&nbsp;</td>  
267 - <td colspan="1">&nbsp;</td>  
268 - <td colspan="2">&nbsp;</td>  
269 - <td colspan="1">&nbsp;</td>  
270 - <td colspan="1">&nbsp;</td>  
271 - <td colspan="1">&nbsp;</td>  
272 - </tr>  
273 - <tr>  
274 - <td rowspan="2">车次</td>  
275 - <td colspan="2">工号</td>  
276 - <td rowspan="2">公里耗油</td>  
277 - <td colspan="2">起讫站</td>  
278 - <td colspan="4">时间</td>  
279 - <td colspan="2">误点</td>  
280 - <td rowspan="2" width="66px">里程(公里)计划</td>  
281 - <td rowspan="2">备注</td>  
282 - </tr>  
283 - <tr>  
284 - <td colspan="1" width="60px">司&nbsp;机</td>  
285 - <td colspan="1" width="60px">售&nbsp;票</td>  
286 - <td colspan="1">起点</td>  
287 - <td colspan="1">终点</td>  
288 - <td colspan="1">计发</td>  
289 - <td colspan="1">实发</td>  
290 - <td colspan="1">应到</td>  
291 - <td colspan="1">实到</td>  
292 - <td colspan="1">快</td>  
293 - <td colspan="1">慢</td>  
294 - </tr> 331 +
295 </script> 332 </script>
  333 +<script type="text/html" id="ludan_1">
  334 + <tr>
  335 + <td colspan="14">行车路单</td>
  336 + </tr>
  337 + <tr>
  338 + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>
  339 + </tr>
  340 + <tr>
  341 + <td colspan="2">出场存油 &nbsp;升</td>
  342 + <td colspan="2">加注油量 &nbsp;升</td>
  343 + <td colspan="2">进场存油 &nbsp;升</td>
  344 + <td colspan="4">加注机油 &nbsp;升</td>
  345 + <td colspan="4">本日耗油 &nbsp;升</td>
  346 + </tr>
  347 + <tr>
  348 + <td rowspan="2">调度章</td>
  349 + <td colspan="1">&nbsp;</td>
  350 + <td rowspan="2">早班</td>
  351 + <td colspan="1">&nbsp;</td>
  352 + <td rowspan="2">夜班</td>
  353 + <td colspan="1">&nbsp;</td>
  354 + <td rowspan="2" colspan="2">交叉</td>
  355 + <td colspan="2">&nbsp;</td>
  356 + <td rowspan="2">其他</td>
  357 + <td colspan="1">&nbsp;</td>
  358 + <td colspan="1">&nbsp;</td>
  359 + <td colspan="1">&nbsp;</td>
  360 + </tr>
  361 + <tr>
  362 + <td colspan="1">&nbsp;</td>
  363 + <td colspan="1">&nbsp;</td>
  364 + <td colspan="1">&nbsp;</td>
  365 + <td colspan="2">&nbsp;</td>
  366 + <td colspan="1">&nbsp;</td>
  367 + <td colspan="1">&nbsp;</td>
  368 + <td colspan="1">&nbsp;</td>
  369 + </tr>
  370 + <tr>
  371 + <td rowspan="2">车次</td>
  372 + <td colspan="2">工号</td>
  373 + <td rowspan="2">公里耗油</td>
  374 + <td colspan="2">起讫站</td>
  375 + <td colspan="4">时间</td>
  376 + <td colspan="2">误点</td>
  377 + <td rowspan="2" width="66px">里程(公里)计划</td>
  378 + <td rowspan="2">备注</td>
  379 + </tr>
  380 + <tr>
  381 + <td colspan="1" width="60px">司&nbsp;机</td>
  382 + <td colspan="1" width="60px">售&nbsp;票</td>
  383 + <td colspan="1">起点</td>
  384 + <td colspan="1">终点</td>
  385 + <td colspan="1">计发</td>
  386 + <td colspan="1">实发</td>
  387 + <td colspan="1">应到</td>
  388 + <td colspan="1">实到</td>
  389 + <td colspan="1">快</td>
  390 + <td colspan="1">慢</td>
  391 + </tr>
  392 +</script>
  393 +
296 <script type="text/html" id="ludan_2"> 394 <script type="text/html" id="ludan_2">
  395 +
297 {{each list as obj i}} 396 {{each list as obj i}}
  397 +
298 <tr> 398 <tr>
  399 +
299 <td>{{i+1}}</td> 400 <td>{{i+1}}</td>
  401 +
300 <td>{{obj.jName}}</td> 402 <td>{{obj.jName}}</td>
  403 +
301 <td>{{obj.sName}}</td> 404 <td>{{obj.sName}}</td>
  405 +
302 <td>&nbsp;</td> 406 <td>&nbsp;</td>
  407 +
303 <td>{{obj.qdzName}}</td> 408 <td>{{obj.qdzName}}</td>
  409 +
304 <td>{{obj.zdzName}}</td> 410 <td>{{obj.zdzName}}</td>
  411 +
305 <td>{{obj.fcsj}}</td> 412 <td>{{obj.fcsj}}</td>
  413 +
306 <td>{{obj.fcsjActual}}</td> 414 <td>{{obj.fcsjActual}}</td>
  415 +
307 <td>{{obj.zdsj}}</td> 416 <td>{{obj.zdsj}}</td>
  417 +
308 <td>{{obj.zdsjActual}}</td> 418 <td>{{obj.zdsjActual}}</td>
  419 +
309 <td>{{obj.fast}}</td> 420 <td>{{obj.fast}}</td>
  421 +
310 <td>{{obj.slow}}</td> 422 <td>{{obj.slow}}</td>
311 - <td>{{obj.jhlc}}</td> 423 +
  424 + <td>{{obj.jhlc}}</td>
312 <td>{{obj.remarks}}</td> 425 <td>{{obj.remarks}}</td>
  426 +
  427 + </tr>
  428 +
  429 + {{/each}}
  430 + {{if list.length == 0}}
  431 + <tr>
  432 + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
313 </tr> 433 </tr>
314 - {{/each}}  
315 - {{if list.length == 0}}  
316 - <tr>  
317 - <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>  
318 - </tr>  
319 {{/if}} 434 {{/if}}
320 -</script>  
321 -<script type="text/html" id="ludan_3">  
322 - <tr>  
323 - <td colspan="2">计划公里</td>  
324 - <td>{{jhlc}}</td>  
325 - <td colspan="2">烂班公里</td>  
326 - <td>{{remMileage}}</td>  
327 - <td colspan="2">临加公里</td>  
328 - <td>{{addMileage}}</td>  
329 - <td colspan="2">营运公里</td>  
330 - <td colspan="3">{{yygl}}</td>  
331 - </tr>  
332 - <tr>  
333 - <td colspan="2">空驶公里</td>  
334 - <td>{{ksgl}}</td>  
335 - <td colspan="2">总公里</td>  
336 - <td>{{realMileage}}</td>  
337 - <td colspan="2">计划班次</td>  
338 - <td>{{jhbc}}</td>  
339 - <td colspan="2">烂班班次</td>  
340 - <td colspan="3">{{cjbc}}</td>  
341 - </tr>  
342 - <tr>  
343 - <td colspan="2">增加班次</td>  
344 - <td>{{ljbc}}</td>  
345 - <td colspan="2">实际班次</td>  
346 - <td>{{sjbc}}</td>  
347 - <td colspan="2"></td>  
348 - <td></td>  
349 - <td colspan="2"></td>  
350 - <td colspan="3"></td>  
351 - </tr>  
352 -</script>  
353 -<script type="text/html" id="ludan_4">  
354 - <tr>  
355 - <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>  
356 - <td>轮胎</td>  
357 - <td>&nbsp;</td>  
358 - </tr>  
359 - <tr>  
360 - <td colspan="3">重点例保项目</td>  
361 - <td>1</td>  
362 - <td>2</td>  
363 - <td>3</td>  
364 - <td colspan="3">重点例保项目</td>  
365 - <td>1</td>  
366 - <td>2</td>  
367 - <td>3</td>  
368 - <td>灭火机</td>  
369 - <td>&nbsp;</td>  
370 - </tr>  
371 - <tr>  
372 - <td colspan="3">各类制动</td>  
373 - <td>&nbsp;</td>  
374 - <td>&nbsp;</td>  
375 - <td>&nbsp;</td>  
376 - <td colspan="3">各类灯光</td>  
377 - <td>&nbsp;</td>  
378 - <td>&nbsp;</td>  
379 - <td>&nbsp;</td>  
380 - <td colspan="2">出场路码表里程</td>  
381 - </tr>  
382 - <tr>  
383 - <td colspan="3">方向机</td>  
384 - <td>&nbsp;</td>  
385 - <td>&nbsp;</td>  
386 - <td>&nbsp;</td>  
387 - <td colspan="3">各类仪表</td>  
388 - <td>&nbsp;</td>  
389 - <td>&nbsp;</td>  
390 - <td>&nbsp;</td>  
391 - <td colspan="2" rowspan="2">&nbsp;</td>  
392 - </tr>  
393 - <tr>  
394 - <td colspan="3">欠压报警器</td>  
395 - <td>&nbsp;</td>  
396 - <td>&nbsp;</td>  
397 - <td>&nbsp;</td>  
398 - <td colspan="3">各类皮带</td>  
399 - <td>&nbsp;</td>  
400 - <td>&nbsp;</td>  
401 - <td>&nbsp;</td>  
402 - </tr>  
403 - <tr>  
404 - <td colspan="3">发动机清洁及响声</td>  
405 - <td>&nbsp;</td>  
406 - <td>&nbsp;</td>  
407 - <td>&nbsp;</td>  
408 - <td colspan="3">油箱及托架</td>  
409 - <td>&nbsp;</td>  
410 - <td>&nbsp;</td>  
411 - <td>&nbsp;</td>  
412 - <td colspan="2">出场路码表里程</td>  
413 - </tr>  
414 - <tr>  
415 - <td colspan="3">地盘响声</td>  
416 - <td>&nbsp;</td>  
417 - <td>&nbsp;</td>  
418 - <td>&nbsp;</td>  
419 - <td colspan="3">轮胎、半轴螺栓螺母</td>  
420 - <td>&nbsp;</td>  
421 - <td>&nbsp;</td>  
422 - <td>&nbsp;</td>  
423 - <td colspan="2" rowspan="3">&nbsp;</td>  
424 - </tr>  
425 - <tr>  
426 - <td colspan="3">化油器及油路</td>  
427 - <td>&nbsp;</td>  
428 - <td>&nbsp;</td>  
429 - <td>&nbsp;</td>  
430 - <td colspan="3">油、电、水、气</td>  
431 - <td>&nbsp;</td>  
432 - <td>&nbsp;</td>  
433 - <td>&nbsp;</td>  
434 - </tr>  
435 - <tr>  
436 - <td colspan="3">进排歧管及排气管</td>  
437 - <td>&nbsp;</td>  
438 - <td>&nbsp;</td>  
439 - <td>&nbsp;</td>  
440 - <td colspan="3">内外车身及附件</td>  
441 - <td>&nbsp;</td>  
442 - <td>&nbsp;</td>  
443 - <td>&nbsp;</td>  
444 - </tr>  
445 - <tr>  
446 - <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>  
447 - </tr> 435 +
  436 +</script>
  437 +<script type="text/html" id="ludan_3">
  438 + <tr>
  439 + <td colspan="2">计划公里</td>
  440 + <td>{{jhlc}}</td>
  441 + <td colspan="2">烂班公里</td>
  442 + <td>{{remMileage}}</td>
  443 + <td colspan="2">临加公里</td>
  444 + <td>{{addMileage}}</td>
  445 + <td colspan="2">营运公里</td>
  446 + <td colspan="3">{{yygl}}</td>
  447 + </tr>
  448 + <tr>
  449 + <td colspan="2">空驶公里</td>
  450 + <td>{{ksgl}}</td>
  451 + <td colspan="2">总公里</td>
  452 + <td>{{realMileage}}</td>
  453 + <td colspan="2">计划班次</td>
  454 + <td>{{jhbc}}</td>
  455 + <td colspan="2">烂班班次</td>
  456 + <td colspan="3">{{cjbc}}</td>
  457 + </tr>
  458 + <tr>
  459 + <td colspan="2">增加班次</td>
  460 + <td>{{ljbc}}</td>
  461 + <td colspan="2">实际班次</td>
  462 + <td>{{sjbc}}</td>
  463 + <td colspan="2"></td>
  464 + <td></td>
  465 + <td colspan="2"></td>
  466 + <td colspan="3"></td>
  467 + </tr>
  468 +</script>
  469 +<script type="text/html" id="ludan_4">
  470 + <tr>
  471 + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>
  472 + <td>轮胎</td>
  473 + <td>&nbsp;</td>
  474 + </tr>
  475 + <tr>
  476 + <td colspan="3">重点例保项目</td>
  477 + <td>1</td>
  478 + <td>2</td>
  479 + <td>3</td>
  480 + <td colspan="3">重点例保项目</td>
  481 + <td>1</td>
  482 + <td>2</td>
  483 + <td>3</td>
  484 + <td>灭火机</td>
  485 + <td>&nbsp;</td>
  486 + </tr>
  487 + <tr>
  488 + <td colspan="3">各类制动</td>
  489 + <td>&nbsp;</td>
  490 + <td>&nbsp;</td>
  491 + <td>&nbsp;</td>
  492 + <td colspan="3">各类灯光</td>
  493 + <td>&nbsp;</td>
  494 + <td>&nbsp;</td>
  495 + <td>&nbsp;</td>
  496 + <td colspan="2">出场路码表里程</td>
  497 + </tr>
  498 + <tr>
  499 + <td colspan="3">方向机</td>
  500 + <td>&nbsp;</td>
  501 + <td>&nbsp;</td>
  502 + <td>&nbsp;</td>
  503 + <td colspan="3">各类仪表</td>
  504 + <td>&nbsp;</td>
  505 + <td>&nbsp;</td>
  506 + <td>&nbsp;</td>
  507 + <td colspan="2" rowspan="2">&nbsp;</td>
  508 + </tr>
  509 + <tr>
  510 + <td colspan="3">欠压报警器</td>
  511 + <td>&nbsp;</td>
  512 + <td>&nbsp;</td>
  513 + <td>&nbsp;</td>
  514 + <td colspan="3">各类皮带</td>
  515 + <td>&nbsp;</td>
  516 + <td>&nbsp;</td>
  517 + <td>&nbsp;</td>
  518 + </tr>
  519 + <tr>
  520 + <td colspan="3">发动机清洁及响声</td>
  521 + <td>&nbsp;</td>
  522 + <td>&nbsp;</td>
  523 + <td>&nbsp;</td>
  524 + <td colspan="3">油箱及托架</td>
  525 + <td>&nbsp;</td>
  526 + <td>&nbsp;</td>
  527 + <td>&nbsp;</td>
  528 + <td colspan="2">出场路码表里程</td>
  529 + </tr>
  530 + <tr>
  531 + <td colspan="3">地盘响声</td>
  532 + <td>&nbsp;</td>
  533 + <td>&nbsp;</td>
  534 + <td>&nbsp;</td>
  535 + <td colspan="3">轮胎、半轴螺栓螺母</td>
  536 + <td>&nbsp;</td>
  537 + <td>&nbsp;</td>
  538 + <td>&nbsp;</td>
  539 + <td colspan="2" rowspan="3">&nbsp;</td>
  540 + </tr>
  541 + <tr>
  542 + <td colspan="3">化油器及油路</td>
  543 + <td>&nbsp;</td>
  544 + <td>&nbsp;</td>
  545 + <td>&nbsp;</td>
  546 + <td colspan="3">油、电、水、气</td>
  547 + <td>&nbsp;</td>
  548 + <td>&nbsp;</td>
  549 + <td>&nbsp;</td>
  550 + </tr>
  551 + <tr>
  552 + <td colspan="3">进排歧管及排气管</td>
  553 + <td>&nbsp;</td>
  554 + <td>&nbsp;</td>
  555 + <td>&nbsp;</td>
  556 + <td colspan="3">内外车身及附件</td>
  557 + <td>&nbsp;</td>
  558 + <td>&nbsp;</td>
  559 + <td>&nbsp;</td>
  560 + </tr>
  561 + <tr>
  562 + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>
  563 + </tr>
448 </script> 564 </script>
449 \ No newline at end of file 565 \ No newline at end of file
src/main/resources/static/pages/forms/statement/waybillQp.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>行车路单</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block;">
  31 + <span class="item-label" style="width: 80px;">线路: </span>
  32 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 15px;">
  35 + <span class="item-label" style="width: 80px;">时间: </span>
  36 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  37 + </div>
  38 + <div class="form-group" style="display: inline-block;margin-left: 15px;">
  39 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  40 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  41 + <input class="btn btn-default" type="button" id="print" value="打印"/>
  42 + <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/>
  43 + </div>
  44 + </form>
  45 + </div>
  46 + <div class="portlet-body">
  47 + <div class="row">
  48 + <div class="col-md-3">
  49 + <div class="" style="margin-top: 10px;overflow:auto;height: 860px">
  50 + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
  51 + <thead>
  52 + <tr class="hidden">
  53 + <th>人员</th>
  54 + <th>自编号</th>
  55 + <th>路牌</th>
  56 + </tr>
  57 + </thead>
  58 + <tbody>
  59 +
  60 + </tbody>
  61 + </table>
  62 + </div>
  63 + </div>
  64 + <div class="col-md-9" id="printArea">
  65 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  66 + <table class="table table-bordered table-checkable" id="forms">
  67 + <tbody class="ludan_1">
  68 +
  69 + </tbody>
  70 + <tbody class="ludan_2">
  71 +
  72 + </tbody>
  73 + <tbody class="ludan_3">
  74 +
  75 + </tbody>
  76 + <tbody class="ludan_4">
  77 +
  78 + </tbody>
  79 + </table>
  80 + </div>
  81 + </div>
  82 + </div>
  83 + </div>
  84 + </div>
  85 + </div>
  86 +</div>
  87 +
  88 +<script>
  89 + $(function(){
  90 + // 关闭左侧栏
  91 + if (!$('body').hasClass('page-sidebar-closed'))
  92 + $('.menu-toggler.sidebar-toggler').click();
  93 +
  94 + $("#date").datetimepicker({
  95 + format : 'YYYY-MM-DD',
  96 + locale : 'zh-cn'
  97 + });
  98 +
  99 + $.get('/basic/lineCode2Name',function(result){
  100 + var data=[];
  101 +
  102 + for(var code in result){
  103 + data.push({id: code, text: result[code]});
  104 + }
  105 + console.log(data);
  106 + initPinYinSelect2('#line',data,'');
  107 +
  108 + })
  109 +
  110 + /* $('#line').select2({
  111 + ajax: {
  112 + url: '/realSchedule/findLine',
  113 + type: 'post',
  114 + dataType: 'json',
  115 + delay: 150,
  116 + data: function(params){
  117 + return{line: params.term};
  118 + },
  119 + processResults: function (data) {
  120 + return {
  121 + results: data
  122 + };
  123 + },
  124 + cache: true
  125 + },
  126 + templateResult: function(repo){
  127 + if (repo.loading) return repo.text;
  128 + var h = '<span>'+repo.text+'</span>';
  129 + return h;
  130 + },
  131 + escapeMarkup: function (markup) { return markup; },
  132 + minimumInputLength: 1,
  133 + templateSelection: function(repo){
  134 + return repo.text;
  135 + },
  136 + language: {
  137 + noResults: function(){
  138 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  139 + },
  140 + inputTooShort : function(e) {
  141 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  142 + },
  143 + searching : function() {
  144 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  145 + }
  146 + }
  147 + });
  148 + */
  149 +
  150 + var date = '';
  151 + $("#query").on("click",function(){
  152 + var line = $("#line").val();
  153 + date = $("#date").val();
  154 + $(".hidden").removeClass("hidden");
  155 + $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){
  156 + // 把数据填充到模版中
  157 + var tbodyHtml = template('list_info',{list:result});
  158 + // 把渲染好的模版html文本追加到表格中
  159 + $('#info tbody').html(tbodyHtml);
  160 + });
  161 + });
  162 +
  163 + var params = new Array();
  164 + var jName = '';
  165 + $("#info tbody").on("click","tr",function(){
  166 + if($(this).children().size() < 2){
  167 + return;
  168 + }
  169 +
  170 + $(this).children().each(function(index){
  171 + params[index] = $(this).text();
  172 + });
  173 + console.log(params);
  174 + jName = params[0].split("\\")[0];
  175 + var id = $("#"+params[1]).val();
  176 + $get('/realSchedule/'+id,null,function(result){
  177 + console.log(result);
  178 + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
  179 + var ludan_1 = template('ludan_1',result);
  180 + //var ludan_4 = template('ludan_4',result);
  181 + // 把渲染好的模版html文本追加到表格中
  182 + $('#forms .ludan_1').html(ludan_1);
  183 + //$('#forms .ludan_4').html(ludan_4);
  184 + });
  185 + $post('/realSchedule/queryListWaybillQp',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  186 + getTime(result);
  187 + var ludan_2 = template('ludan_2',{list:result});
  188 + // 把渲染好的模版html文本追加到表格中
  189 + $('#forms .ludan_2').html(ludan_2);
  190 + });
  191 + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  192 + var ludan_3 = template('ludan_3',result);
  193 + $('#forms .ludan_3').html(ludan_3);
  194 + });
  195 +
  196 + });
  197 +
  198 + $("#export").on("click",function(){
  199 + if(params.length < 1){
  200 + return;
  201 + }
  202 + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  203 + window.open("/downloadFile/download?fileName="+jName);
  204 + });
  205 + });
  206 +
  207 + $("#print").click(function(){
  208 + $("#printArea").printArea();
  209 + });
  210 +
  211 + $("#exportMore").on("click",function(){
  212 + return;
  213 + $post('/realSchedule/exportWaybillMore',{date:date},function(result){
  214 + window.open("/downloadFile/download?fileName="+jName);
  215 + });
  216 + });
  217 +
  218 + function getTime(list){
  219 + $.each(list, function(i, obj) {
  220 + if(obj.zdsj != null && obj.zdsjActual != null ){
  221 + var zdsjActual = (obj.zdsjActual).split(":");
  222 + var zdsj = (obj.zdsj).split(":");
  223 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  224 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  225 + }
  226 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  227 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  228 + }
  229 + }
  230 + });
  231 + }
  232 + });
  233 +</script>
  234 +<script type="text/html" id="list_info">
  235 + {{each list as obj i}}
  236 + <tr>
  237 + <td width="45%">{{obj[4]}}\{{obj[1]}}</td>
  238 + <td width="32%">{{obj[2]}}</td>
  239 + <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td>
  240 + </tr>
  241 + {{/each}}
  242 + {{if list.length == 0}}
  243 + <tr>
  244 + <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td>
  245 + </tr>
  246 + {{/if}}
  247 +</script>
  248 +<script type="text/html" id="ludan_1">
  249 + <tr>
  250 + <td colspan="14">行车路单</td>
  251 + </tr>
  252 + <tr>
  253 + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>
  254 + </tr>
  255 + <tr>
  256 + <td colspan="2">出场存油 &nbsp;升</td>
  257 + <td colspan="2">加注油量 &nbsp;升</td>
  258 + <td colspan="2">进场存油 &nbsp;升</td>
  259 + <td colspan="4">加注机油 &nbsp;升</td>
  260 + <td colspan="4">本日耗油 &nbsp;升</td>
  261 + </tr>
  262 + <tr>
  263 + <td rowspan="2">调度章</td>
  264 + <td colspan="1">&nbsp;</td>
  265 + <td rowspan="2">早班</td>
  266 + <td colspan="1">&nbsp;</td>
  267 + <td rowspan="2">夜班</td>
  268 + <td colspan="1">&nbsp;</td>
  269 + <td rowspan="2" colspan="2">交叉</td>
  270 + <td colspan="2">&nbsp;</td>
  271 + <td rowspan="2">其他</td>
  272 + <td colspan="1">&nbsp;</td>
  273 + <td colspan="1">&nbsp;</td>
  274 + <td colspan="1">&nbsp;</td>
  275 + </tr>
  276 + <tr>
  277 + <td colspan="1">&nbsp;</td>
  278 + <td colspan="1">&nbsp;</td>
  279 + <td colspan="1">&nbsp;</td>
  280 + <td colspan="2">&nbsp;</td>
  281 + <td colspan="1">&nbsp;</td>
  282 + <td colspan="1">&nbsp;</td>
  283 + <td colspan="1">&nbsp;</td>
  284 + </tr>
  285 + <tr>
  286 + <td rowspan="2">车次</td>
  287 + <td colspan="2">工号</td>
  288 + <td rowspan="2">公里耗油</td>
  289 + <td colspan="2">起讫站</td>
  290 + <td colspan="4">时间</td>
  291 + <td colspan="2">误点</td>
  292 + <td rowspan="2" width="66px">里程(公里)计划</td>
  293 + <td rowspan="2">备注</td>
  294 + </tr>
  295 + <tr>
  296 + <td colspan="1" width="60px">司&nbsp;机</td>
  297 + <td colspan="1" width="60px">售&nbsp;票</td>
  298 + <td colspan="1">起点</td>
  299 + <td colspan="1">终点</td>
  300 + <td colspan="1">计发</td>
  301 + <td colspan="1">实发</td>
  302 + <td colspan="1">应到</td>
  303 + <td colspan="1">实到</td>
  304 + <td colspan="1">快</td>
  305 + <td colspan="1">慢</td>
  306 + </tr>
  307 +</script>
  308 +<script type="text/html" id="ludan_2">
  309 + {{each list as obj i}}
  310 + <tr>
  311 + <td>{{i+1}}</td>
  312 + <td>{{obj.jName}}</td>
  313 + <td>{{obj.sName}}</td>
  314 + <td>&nbsp;</td>
  315 + <td>{{obj.qdzName}}</td>
  316 + <td>{{obj.zdzName}}</td>
  317 + <td>{{obj.fcsj}}</td>
  318 + <td>{{obj.fcsjActual}}</td>
  319 + <td>{{obj.zdsj}}</td>
  320 + <td>{{obj.zdsjActual}}</td>
  321 + <td>{{obj.fast}}</td>
  322 + <td>{{obj.slow}}</td>
  323 + <td>{{obj.jhlc}}</td>
  324 + <td>{{obj.remarks}}</td>
  325 + </tr>
  326 + {{/each}}
  327 + {{if list.length == 0}}
  328 + <tr>
  329 + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
  330 + </tr>
  331 + {{/if}}
  332 +</script>
  333 +<script type="text/html" id="ludan_3">
  334 + <tr>
  335 + <td colspan="2">计划公里</td>
  336 + <td>{{jhlc}}</td>
  337 + <td colspan="2">烂班公里</td>
  338 + <td>{{remMileage}}</td>
  339 + <td colspan="2">临加公里</td>
  340 + <td>{{addMileage}}</td>
  341 + <td colspan="2">营运公里</td>
  342 + <td colspan="3">{{yygl}}</td>
  343 + </tr>
  344 + <tr>
  345 + <td colspan="2">空驶公里</td>
  346 + <td>{{ksgl}}</td>
  347 + <td colspan="2">总公里</td>
  348 + <td>{{realMileage}}</td>
  349 + <td colspan="2">计划班次</td>
  350 + <td>{{jhbc}}</td>
  351 + <td colspan="2">烂班班次</td>
  352 + <td colspan="3">{{cjbc}}</td>
  353 + </tr>
  354 + <tr>
  355 + <td colspan="2">增加班次</td>
  356 + <td>{{ljbc}}</td>
  357 + <td colspan="2">实际班次</td>
  358 + <td>{{sjbc}}</td>
  359 + <td colspan="2"></td>
  360 + <td></td>
  361 + <td colspan="2"></td>
  362 + <td colspan="3"></td>
  363 + </tr>
  364 +</script>
  365 +<script type="text/html" id="ludan_4">
  366 + <tr>
  367 + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>
  368 + <td>轮胎</td>
  369 + <td>&nbsp;</td>
  370 + </tr>
  371 + <tr>
  372 + <td colspan="3">重点例保项目</td>
  373 + <td>1</td>
  374 + <td>2</td>
  375 + <td>3</td>
  376 + <td colspan="3">重点例保项目</td>
  377 + <td>1</td>
  378 + <td>2</td>
  379 + <td>3</td>
  380 + <td>灭火机</td>
  381 + <td>&nbsp;</td>
  382 + </tr>
  383 + <tr>
  384 + <td colspan="3">各类制动</td>
  385 + <td>&nbsp;</td>
  386 + <td>&nbsp;</td>
  387 + <td>&nbsp;</td>
  388 + <td colspan="3">各类灯光</td>
  389 + <td>&nbsp;</td>
  390 + <td>&nbsp;</td>
  391 + <td>&nbsp;</td>
  392 + <td colspan="2">出场路码表里程</td>
  393 + </tr>
  394 + <tr>
  395 + <td colspan="3">方向机</td>
  396 + <td>&nbsp;</td>
  397 + <td>&nbsp;</td>
  398 + <td>&nbsp;</td>
  399 + <td colspan="3">各类仪表</td>
  400 + <td>&nbsp;</td>
  401 + <td>&nbsp;</td>
  402 + <td>&nbsp;</td>
  403 + <td colspan="2" rowspan="2">&nbsp;</td>
  404 + </tr>
  405 + <tr>
  406 + <td colspan="3">欠压报警器</td>
  407 + <td>&nbsp;</td>
  408 + <td>&nbsp;</td>
  409 + <td>&nbsp;</td>
  410 + <td colspan="3">各类皮带</td>
  411 + <td>&nbsp;</td>
  412 + <td>&nbsp;</td>
  413 + <td>&nbsp;</td>
  414 + </tr>
  415 + <tr>
  416 + <td colspan="3">发动机清洁及响声</td>
  417 + <td>&nbsp;</td>
  418 + <td>&nbsp;</td>
  419 + <td>&nbsp;</td>
  420 + <td colspan="3">油箱及托架</td>
  421 + <td>&nbsp;</td>
  422 + <td>&nbsp;</td>
  423 + <td>&nbsp;</td>
  424 + <td colspan="2">出场路码表里程</td>
  425 + </tr>
  426 + <tr>
  427 + <td colspan="3">地盘响声</td>
  428 + <td>&nbsp;</td>
  429 + <td>&nbsp;</td>
  430 + <td>&nbsp;</td>
  431 + <td colspan="3">轮胎、半轴螺栓螺母</td>
  432 + <td>&nbsp;</td>
  433 + <td>&nbsp;</td>
  434 + <td>&nbsp;</td>
  435 + <td colspan="2" rowspan="3">&nbsp;</td>
  436 + </tr>
  437 + <tr>
  438 + <td colspan="3">化油器及油路</td>
  439 + <td>&nbsp;</td>
  440 + <td>&nbsp;</td>
  441 + <td>&nbsp;</td>
  442 + <td colspan="3">油、电、水、气</td>
  443 + <td>&nbsp;</td>
  444 + <td>&nbsp;</td>
  445 + <td>&nbsp;</td>
  446 + </tr>
  447 + <tr>
  448 + <td colspan="3">进排歧管及排气管</td>
  449 + <td>&nbsp;</td>
  450 + <td>&nbsp;</td>
  451 + <td>&nbsp;</td>
  452 + <td colspan="3">内外车身及附件</td>
  453 + <td>&nbsp;</td>
  454 + <td>&nbsp;</td>
  455 + <td>&nbsp;</td>
  456 + </tr>
  457 + <tr>
  458 + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>
  459 + </tr>
  460 +</script>
0 \ No newline at end of file 461 \ No newline at end of file
src/main/resources/static/pages/forms/statement/workDaily.html
@@ -102,15 +102,16 @@ @@ -102,15 +102,16 @@
102 var year = d.getFullYear(); 102 var year = d.getFullYear();
103 var month = d.getMonth() + 1; 103 var month = d.getMonth() + 1;
104 var day = d.getDate(); 104 var day = d.getDate();
105 - if(month > 9){  
106 - $("#date").val(year + "-" + month + "-" + day);  
107 - } else {  
108 - $("#date").val(year + "-0" + month + "-" + day);  
109 - } 105 + if(month < 10)
  106 + month = "0" + month;
  107 + if(day < 10)
  108 + day = "0" + day;
  109 + $("#date").val(year + "-" + month + "-" + day);
110 110
111 $.get('/basic/lineCode2Name',function(result){ 111 $.get('/basic/lineCode2Name',function(result){
112 var data=[]; 112 var data=[];
113 113
  114 + data.push({id: " ", text: "全部线路"});
114 for(var code in result){ 115 for(var code in result){
115 data.push({id: code, text: result[code]}); 116 data.push({id: code, text: result[code]});
116 } 117 }
@@ -153,13 +154,21 @@ @@ -153,13 +154,21 @@
153 154
154 var line = $("#line").val(); 155 var line = $("#line").val();
155 var date = $("#date").val(); 156 var date = $("#date").val();
  157 + var company = $("#company").val();
  158 + var subCompany = $("#subCompany").val();
156 function jsDoQuery(pagination){ 159 function jsDoQuery(pagination){
157 var params = {}; 160 var params = {};
158 line = $("#line").val(); 161 line = $("#line").val();
159 date = $("#date").val(); 162 date = $("#date").val();
  163 + company = $("#company").val();
  164 + subCompany = $("#subCompany").val();
  165 + if(line == " ")
  166 + line = "";
160 params['line'] = line; 167 params['line'] = line;
161 params['date'] = date; 168 params['date'] = date;
162 params['type'] = "query"; 169 params['type'] = "query";
  170 + params['company'] = company;
  171 + params['subCompany'] = subCompany;
163 $(".hidden").removeClass("hidden"); 172 $(".hidden").removeClass("hidden");
164 $get('/pcpc/workDaily', params, function(result){ 173 $get('/pcpc/workDaily', params, function(result){
165 // 把数据填充到模版中 174 // 把数据填充到模版中
src/main/resources/static/pages/oil/checkJyryList.html
@@ -56,14 +56,15 @@ @@ -56,14 +56,15 @@
56 <tr role="row" class="heading"> 56 <tr role="row" class="heading">
57 <th width="3%">#</th> 57 <th width="3%">#</th>
58 <th width="10%">日期</th> 58 <th width="10%">日期</th>
59 - <th width="8%">公司</th>  
60 - <th width="8%">车辆</th> 59 + <th width="10%">公司</th>
  60 + <th width="10%">分公司</th>
  61 + <th width="6%">车辆</th>
61 <th width="10%">驾驶员</th> 62 <th width="10%">驾驶员</th>
62 - <th width="5%">加注量</th>  
63 - <th width="5%">加油站</th>  
64 - <th width="5%">加油类型</th> 63 + <th width="2%">加注量</th>
  64 + <th width="4%">加油站</th>
  65 + <th width="4%">加油类型</th>
65 <th width="5%">加油工工号</th> 66 <th width="5%">加油工工号</th>
66 - <th width="5%">油价</th> 67 + <th width="2%">油价</th>
67 <th width="5%">路单工号</th> 68 <th width="5%">路单工号</th>
68 <th width="4%">备注</th> 69 <th width="4%">备注</th>
69 <th width="19%">操作</th> 70 <th width="19%">操作</th>
@@ -74,7 +75,10 @@ @@ -74,7 +75,10 @@
74 <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq"> 75 <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq">
75 </td> 76 </td>
76 <td> 77 <td>
77 - <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> 78 +<!-- <select class="form-control" name="gsdm_like" id="jyryListGsdmId" ></select> -->
  79 + </td>
  80 + <td>
  81 +<!-- <select class="form-control" name="fgsdm_like" id="jyryListFgsdmId" ></select> -->
78 </td> 82 </td>
79 <td> 83 <td>
80 </td> 84 </td>
@@ -114,7 +118,10 @@ @@ -114,7 +118,10 @@
114 </td> 118 </td>
115 <td>{{obj.yyrq}}</td> 119 <td>{{obj.yyrq}}</td>
116 <td> 120 <td>
117 - {{obj.gsdm}} 121 + {{obj.gsname}}
  122 + </td>
  123 + <td>
  124 + {{obj.fgsname}}
118 </td> 125 </td>
119 <td> 126 <td>
120 {{obj.nbbm}} 127 {{obj.nbbm}}
@@ -173,15 +180,54 @@ $(function(){ @@ -173,15 +180,54 @@ $(function(){
173 radioClass: 'iradio_square-blue icheck', 180 radioClass: 'iradio_square-blue icheck',
174 increaseArea: '20%' 181 increaseArea: '20%'
175 } 182 }
176 - if($("#yyrq").val()!=""){  
177 - jsDoQuery(null,true);  
178 - }  
179 //重置 183 //重置
180 $('tr.filter .filter-cancel').on('click', function(){ 184 $('tr.filter .filter-cancel').on('click', function(){
181 $('tr.filter input, select').val('').change(); 185 $('tr.filter input, select').val('').change();
182 - jsDoQuery(null, true); 186 +// jsDoQuery(null, true);
183 }); 187 });
184 188
  189 + var gsqx="";
  190 + var fgsqx="";
  191 +
  192 + $.get('/user/companyData', function(result){
  193 + obj = result;
  194 + var options = '<option value="">请选择</option>';
  195 + for(var i = 0; i < obj.length; i++){
  196 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  197 + setFgsqx(obj[i].companyCode);
  198 + gsqx +=obj[i].companyCode+",";
  199 + }
  200 + $('#jyryListGsdmId').html(options);
  201 + updateCompany();
  202 + });
  203 + function setFgsqx(gs){
  204 + var company =gs
  205 + var options = '';
  206 + for(var i = 0; i < obj.length; i++){
  207 + if(obj[i].companyCode == company){
  208 + var children = obj[i].children;
  209 + for(var j = 0; j < children.length; j++){
  210 + fgsqx +=children[j].code+",";
  211 + }
  212 + }
  213 + }
  214 + }
  215 + $("#jyryListGsdmId").on("change",updateCompany);
  216 + function updateCompany(){
  217 + var company = $('#jyryListGsdmId').val();
  218 + var options = '<option value="">请选择</option>';
  219 + for(var i = 0; i < obj.length; i++){
  220 + if(obj[i].companyCode == company){
  221 + var children = obj[i].children;
  222 + for(var j = 0; j < children.length; j++){
  223 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  224 + }
  225 + }
  226 + }
  227 + $('#jyryListFgsdmId').html(options);
  228 + }
  229 +
  230 +
185 //提交 231 //提交
186 $('tr.filter .filter-submit').on('click', function(){ 232 $('tr.filter .filter-submit').on('click', function(){
187 if($("#yyrq").val()!=""){ 233 if($("#yyrq").val()!=""){
@@ -216,7 +262,29 @@ $(function(){ @@ -216,7 +262,29 @@ $(function(){
216 params['order'] = 'nbbm'; 262 params['order'] = 'nbbm';
217 params['page'] = page; 263 params['page'] = page;
218 params['yyrq']=$("#yyrq").val(); 264 params['yyrq']=$("#yyrq").val();
219 - var i = layer.load(2); 265 +// var i = layer.load(2);
  266 +
  267 + var i = 2;
  268 + /* var jyryGsdm=$("#jyryListGsdmId").val();
  269 + var jyryFgsdm=$("#jyryListFgsdmId").val();
  270 + if(jyryGsdm=="" || jyryGsdm==null){
  271 + params['gsdm_in']=gsqx;
  272 + params['fgsdm_in']=fgsqx;
  273 + }else{
  274 + if(jyryFgsdm==''||jyryFgsdm==null){
  275 + var fgsqx1='';
  276 + for(var i = 0; i < obj.length; i++){
  277 + if(obj[i].companyCode == jyryGsdm){
  278 + var children = obj[i].children;
  279 + for(var j = 0; j < children.length; j++){
  280 + fgsqx1 +=children[j].code+",";
  281 + }
  282 + }
  283 + }
  284 + params['fgsdm_in']=fgsqx1;
  285 + }
  286 + } */
  287 +
220 $get('/ylxxb/pagequery' ,params, function(data){ 288 $get('/ylxxb/pagequery' ,params, function(data){
221 $.each(data.dataList, function(i, obj) { 289 $.each(data.dataList, function(i, obj) {
222 obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD"); 290 obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD");
src/main/resources/static/pages/oil/cylList.html
@@ -140,11 +140,10 @@ $(function(){ @@ -140,11 +140,10 @@ $(function(){
140 checkboxClass: 'icheckbox_flat-blue', 140 checkboxClass: 'icheckbox_flat-blue',
141 increaseArea: '20%' 141 increaseArea: '20%'
142 } 142 }
  143 +
143 var gsqx=""; 144 var gsqx="";
144 var fgsqx=""; 145 var fgsqx="";
145 146
146 -  
147 -  
148 $.get('/user/companyData', function(result){ 147 $.get('/user/companyData', function(result){
149 obj = result; 148 obj = result;
150 var options = '<option value="">请选择</option>'; 149 var options = '<option value="">请选择</option>';
@@ -223,7 +222,6 @@ $(function(){ @@ -223,7 +222,6 @@ $(function(){
223 params['order'] = 'nbbm'; 222 params['order'] = 'nbbm';
224 params['page'] = page; 223 params['page'] = page;
225 var i = 2; 224 var i = 2;
226 - console.log(i);  
227 var cylGsdm=$("#cylListGsdmId").val(); 225 var cylGsdm=$("#cylListGsdmId").val();
228 var cylFgsdm=$("#cylListFgsdmId").val(); 226 var cylFgsdm=$("#cylListFgsdmId").val();
229 if(cylGsdm==''|| cylGsdm==null){ 227 if(cylGsdm==''|| cylGsdm==null){
src/main/resources/static/pages/oil/jyglList.html
@@ -56,18 +56,19 @@ @@ -56,18 +56,19 @@
56 id="datatable_cwjy"> 56 id="datatable_cwjy">
57 <thead> 57 <thead>
58 <tr role="row" class="heading"> 58 <tr role="row" class="heading">
59 - <th width="3%">#</th> 59 + <th width="2%">#</th>
60 <th width="10%">日期</th> 60 <th width="10%">日期</th>
61 - <th width="6%">公司</th>  
62 - <th width="6%">车辆</th>  
63 - <th width="12%">驾驶员</th>  
64 - <th width="5%">加注量</th>  
65 - <th width="5%">加油站</th>  
66 - <th width="5%">加油类型</th> 61 + <th width="10%">公司</th>
  62 + <th width="10%">分公司</th>
  63 + <th width="8%">车辆</th>
  64 + <th width="8%">驾驶员</th>
  65 + <th width="3%">加注量</th>
  66 + <th width="3%">加油站</th>
  67 + <th width="3%">加油类型</th>
67 <th width="5%">加油工工号</th> 68 <th width="5%">加油工工号</th>
68 - <th width="5%">油价</th>  
69 - <th width="6%">路单工号</th>  
70 - <th width="5%">备注</th> 69 + <th width="3%">油价</th>
  70 + <th width="4%">路单工号</th>
  71 + <th width="4%">备注</th>
71 <th width="19%">操作</th> 72 <th width="19%">操作</th>
72 </tr> 73 </tr>
73 <tr role="row" class="filter"> 74 <tr role="row" class="filter">
@@ -76,10 +77,13 @@ @@ -76,10 +77,13 @@
76 <input type="text" id="rq" class="form-control form-filter input-sm" name="rq"> 77 <input type="text" id="rq" class="form-control form-filter input-sm" name="rq">
77 </td> 78 </td>
78 <td> 79 <td>
79 - <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> 80 + <select class="form-control" name="gsdm_like" id="jyglListGsdmId" ></select>
80 </td> 81 </td>
81 <td> 82 <td>
82 - <input type="hidden" class="form-control form-filter input-sm" name="nbbh" id="nbbh"> 83 + <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select>
  84 + </td>
  85 + <td>
  86 + <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh">
83 </td> 87 </td>
84 <td></td> 88 <td></td>
85 <td></td> 89 <td></td>
@@ -117,7 +121,10 @@ @@ -117,7 +121,10 @@
117 </td> 121 </td>
118 <td>{{obj.yyrq}}</td> 122 <td>{{obj.yyrq}}</td>
119 <td> 123 <td>
120 - {{obj.gsdm}} 124 + {{obj.gsname}}
  125 + </td>
  126 + <td>
  127 + {{obj.fgsname}}
121 </td> 128 </td>
122 <td> 129 <td>
123 {{obj.nbbm}} 130 {{obj.nbbm}}
@@ -162,7 +169,22 @@ $(function(){ @@ -162,7 +169,22 @@ $(function(){
162 params['jsy']=jsy; 169 params['jsy']=jsy;
163 params['id']=id; 170 params['id']=id;
164 $get('/ylxxb/check', params, function(){ 171 $get('/ylxxb/check', params, function(){
165 - jsDoQuery(null,true); 172 + if($("#rq").val()!=""){
  173 + var cells = $('tr.filter')[0].cells
  174 + ,params = {}
  175 + ,name;
  176 + $.each(cells, function(i, cell){
  177 + var items = $('input,select', cell);
  178 + for(var j = 0, item; item = items[j++];){
  179 + name = $(item).attr('name');
  180 + if(name){
  181 + params[name] = $(item).val();
  182 + }
  183 + }
  184 + });
  185 + jsDoQuery(params,true);
  186 + }
  187 +
166 }); 188 });
167 } 189 }
168 }) 190 })
@@ -180,9 +202,64 @@ $(function(){ @@ -180,9 +202,64 @@ $(function(){
180 //重置 202 //重置
181 $('tr.filter .filter-cancel').on('click', function(){ 203 $('tr.filter .filter-cancel').on('click', function(){
182 $('tr.filter input, select').val('').change(); 204 $('tr.filter input, select').val('').change();
183 - jsDoQuery(null, true); 205 + if($("#rq").val()!=""){
  206 + var cells = $('tr.filter')[0].cells
  207 + ,params = {}
  208 + ,name;
  209 + $.each(cells, function(i, cell){
  210 + var items = $('input,select', cell);
  211 + for(var j = 0, item; item = items[j++];){
  212 + name = $(item).attr('name');
  213 + if(name){
  214 + params[name] = $(item).val();
  215 + }
  216 + }
  217 + });
  218 + jsDoQuery(params, true);
  219 + }
184 }); 220 });
185 221
  222 +
  223 + var gsqx="";
  224 + var fgsqx="";
  225 +
  226 + $.get('/user/companyData', function(result){
  227 + obj = result;
  228 + var options = '<option value="">请选择</option>';
  229 + for(var i = 0; i < obj.length; i++){
  230 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  231 + setFgsqx(obj[i].companyCode);
  232 + gsqx +=obj[i].companyCode+",";
  233 + }
  234 + $('#jyglListGsdmId').html(options);
  235 + updateCompany();
  236 + });
  237 + function setFgsqx(gs){
  238 + var company =gs
  239 + var options = '';
  240 + for(var i = 0; i < obj.length; i++){
  241 + if(obj[i].companyCode == company){
  242 + var children = obj[i].children;
  243 + for(var j = 0; j < children.length; j++){
  244 + fgsqx +=children[j].code+",";
  245 + }
  246 + }
  247 + }
  248 + }
  249 + $("#jyglListGsdmId").on("change",updateCompany);
  250 + function updateCompany(){
  251 + var company = $('#jyglListGsdmId').val();
  252 + var options = '<option value="">请选择</option>';
  253 + for(var i = 0; i < obj.length; i++){
  254 + if(obj[i].companyCode == company){
  255 + var children = obj[i].children;
  256 + for(var j = 0; j < children.length; j++){
  257 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  258 + }
  259 + }
  260 + }
  261 + $('#jyglListFgsdmId').html(options);
  262 + }
186 //提交 263 //提交
187 $('tr.filter .filter-submit').on('click', function(){ 264 $('tr.filter .filter-submit').on('click', function(){
188 if($("#rq").val()!=""){ 265 if($("#rq").val()!=""){
@@ -217,10 +294,30 @@ $(function(){ @@ -217,10 +294,30 @@ $(function(){
217 params['order'] = 'nbbm'; 294 params['order'] = 'nbbm';
218 params['page'] = page; 295 params['page'] = page;
219 params['rq']=$("#rq").val(); 296 params['rq']=$("#rq").val();
220 - var i = layer.load(2); 297 +
  298 + var i = 2;
  299 + var jyglGsdm=$("#jyglListGsdmId").val();
  300 + var jyglFgsdm=$("#jyglListFgsdmId").val();
  301 + if(jyglGsdm=="" || jyglGsdm==null){
  302 + params['gsdm_in']=gsqx;
  303 + params['fgsdm_in']=fgsqx;
  304 + }else{
  305 + if(jyglFgsdm==''||jyglFgsdm==null){
  306 + var fgsqx1='';
  307 + for(var i = 0; i < obj.length; i++){
  308 + if(obj[i].companyCode == jyglGsdm){
  309 + var children = obj[i].children;
  310 + for(var j = 0; j < children.length; j++){
  311 + fgsqx1 +=children[j].code+",";
  312 + }
  313 + }
  314 + }
  315 + params['fgsdm_in']=fgsqx1;
  316 + }
  317 + }
221 $get('/cwjy/pagequery' ,params, function(data){ 318 $get('/cwjy/pagequery' ,params, function(data){
222 $.each(data.dataList, function(i, obj) { 319 $.each(data.dataList, function(i, obj) {
223 - obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD"); 320 + obj.yyrq = $("#rq").val();
224 }); 321 });
225 var bodyHtm = template('jygl_list_temp', {list: data.dataList}); 322 var bodyHtm = template('jygl_list_temp', {list: data.dataList});
226 $('#datatable_cwjy tbody').html(bodyHtm) 323 $('#datatable_cwjy tbody').html(bodyHtm)
@@ -271,22 +368,11 @@ $(function(){ @@ -271,22 +368,11 @@ $(function(){
271 return; 368 return;
272 } 369 }
273 page = num - 1; 370 page = num - 1;
274 - var cells = $('tr.filter')[0].cells  
275 - ,params = {}  
276 - ,name;  
277 - $.each(cells, function(i, cell){  
278 - var items = $('input,select', cell);  
279 - for(var j = 0, item; item = items[j++];){  
280 - name = $(item).attr('name');  
281 - if(name){  
282 - params[name] = $(item).val();  
283 - }  
284 - }  
285 - });  
286 - page = 0;  
287 - jsDoQuery(params, true); 371 +
  372 + jsDoQuery(null, false);
288 } 373 }
289 }); 374 });
  375 +
290 } 376 }
291 377
292 378
src/main/resources/static/real_control_v2/css/line_schedule.css
@@ -309,7 +309,7 @@ span.fcsj-diff { @@ -309,7 +309,7 @@ span.fcsj-diff {
309 309
310 .ct-form-modal form input, .ct-form-modal form select { 310 .ct-form-modal form input, .ct-form-modal form select {
311 width: 100%; 311 width: 100%;
312 - height: 34px!important; 312 + height: 34px;
313 } 313 }
314 314
315 .ct-form-modal form small.font-danger { 315 .ct-form-modal form small.font-danger {
@@ -690,7 +690,7 @@ i.add-temp-sch-icon:hover{ @@ -690,7 +690,7 @@ i.add-temp-sch-icon:hover{
690 690
691 input.i-cbox[type=checkbox]{ 691 input.i-cbox[type=checkbox]{
692 width: 20px; 692 width: 20px;
693 - height: 18px !important; 693 + height: 18px;
694 vertical-align: middle; 694 vertical-align: middle;
695 margin-top: -3px; 695 margin-top: -3px;
696 } 696 }
@@ -846,4 +846,23 @@ input.i-cbox[type=checkbox]{ @@ -846,4 +846,23 @@ input.i-cbox[type=checkbox]{
846 color: #bab6b6; 846 color: #bab6b6;
847 font-family: 微软雅黑; 847 font-family: 微软雅黑;
848 font-size: 13px; 848 font-size: 13px;
  849 +}
  850 +
  851 +#add-sub-task-inpark-modal .uk-panel-box{
  852 + background-color: #ffffff;
  853 +}
  854 +
  855 +#add-sub-task-inpark-modal .pl5{
  856 + padding-left: 5px;
  857 +}
  858 +
  859 +#add-sub-task-inpark-modal.uk-modal .uk-form.fv-form{
  860 + margin-bottom: 0px !important;
  861 +}
  862 +#add-sub-task-inpark-modal .uk-form select{
  863 + width: 100%
  864 +}
  865 +
  866 +#add-sub-task-inpark-modal .uk-grid{
  867 + margin-top: 10px;
849 } 868 }
850 \ No newline at end of file 869 \ No newline at end of file
src/main/resources/static/real_control_v2/css/main.css
@@ -314,4 +314,20 @@ li.map-panel{ @@ -314,4 +314,20 @@ li.map-panel{
314 .main-container .load-panel{ 314 .main-container .load-panel{
315 display: block; 315 display: block;
316 color: #999797; 316 color: #999797;
  317 +}
  318 +
  319 +.uk-panel-box-danger {
  320 + background-color: #fff1f0;
  321 + color: #d85030;
  322 + border-color: rgba(216,80,48,.3);
  323 +}
  324 +
  325 +.uk-panel-box-danger .uk-panel-title {
  326 + color: #d85030;
  327 +}
  328 +
  329 +.uk-badge-default {
  330 + background-color: #a09b9c;
  331 + background-image: -webkit-linear-gradient(top,#9a9898,#8c8687);
  332 + background-image: linear-gradient(to bottom,#9a9898,#8c8687);
317 } 333 }
318 \ No newline at end of file 334 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 <dl> 37 <dl>
38 <dt>序号</dt> 38 <dt>序号</dt>
39 <dt>开始时间 39 <dt>开始时间
40 - <i class="uk-icon-question-circle" data-uk-tooltip title="蓝色字为实发时间"></i></dt> 40 + <i class="uk-icon-question-circle" data-uk-tooltip title="蓝色字为实发时间"></i></dt>
41 <dt>结束时间</dt> 41 <dt>结束时间</dt>
42 <dt>起点</dt> 42 <dt>起点</dt>
43 <dt>终点</dt> 43 <dt>终点</dt>
@@ -79,9 +79,9 @@ @@ -79,9 +79,9 @@
79 <dd>{{i+1}}</dd> 79 <dd>{{i+1}}</dd>
80 <dd> 80 <dd>
81 {{if sch.fcsjActual==null}} 81 {{if sch.fcsjActual==null}}
82 - {{sch.dfsj}} 82 + {{sch.dfsj}}
83 {{else}} 83 {{else}}
84 - <span class="sjfc-time">{{sch.fcsjActual}}</span> 84 + <span class="sjfc-time">{{sch.fcsjActual}}</span>
85 {{/if}} 85 {{/if}}
86 86
87 {{if sch.bcType == "out"}} 87 {{if sch.bcType == "out"}}
@@ -98,7 +98,7 @@ @@ -98,7 +98,7 @@
98 {{/if}} 98 {{/if}}
99 99
100 {{if sch.cTasks.length > 0}} 100 {{if sch.cTasks.length > 0}}
101 - <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span> 101 + <span class="uk-badge uk-badge-notification">{{sch.cTasks.length}}</span>
102 {{/if}} 102 {{/if}}
103 </dd> 103 </dd>
104 <dd>{{sch.zdsj}}</dd> 104 <dd>{{sch.zdsj}}</dd>
@@ -111,67 +111,67 @@ @@ -111,67 +111,67 @@
111 {{/each}} 111 {{/each}}
112 </script> 112 </script>
113 <script id="sub_task-table-temp" type="text/html"> 113 <script id="sub_task-table-temp" type="text/html">
114 - {{each list as task i}} 114 + {{each list as task i}}
115 <dl data-id="{{task.id}}"> 115 <dl data-id="{{task.id}}">
116 - <dd>{{i+1}}</dd>  
117 - <dd><span class="nt-dictionary" data-group="ChildTaskType">{{task.type2}}</span></dd>  
118 - <dd>{{task.startStationName}}</dd>  
119 - <dd>{{task.endStationName}}</dd>  
120 - <dd>{{task.startDate}}</dd>  
121 - <dd>{{task.endDate}}</dd>  
122 - <dd>  
123 - {{task.mileage}}  
124 - (<span class="nt-dictionary" data-group="MileageType">{{task.mileageType}}</span>  
125 - {{if task.destroy}}  
126 - <small style="color:red;">烂班</small>  
127 - {{/if}}  
128 - )  
129 - </dd>  
130 - <dd title="{{task.remarks}}">{{task.remarks}}</dd> 116 + <dd>{{i+1}}</dd>
  117 + <dd><span class="nt-dictionary" data-group="ChildTaskType">{{task.type2}}</span></dd>
  118 + <dd>{{task.startStationName}}</dd>
  119 + <dd>{{task.endStationName}}</dd>
  120 + <dd>{{task.startDate}}</dd>
  121 + <dd>{{task.endDate}}</dd>
  122 + <dd>
  123 + {{task.mileage}}
  124 + (<span class="nt-dictionary" data-group="MileageType">{{task.mileageType}}</span>
  125 + {{if task.destroy}}
  126 + <small style="color:red;">烂班</small>
  127 + {{/if}}
  128 + )
  129 + </dd>
  130 + <dd title="{{task.remarks}}">{{task.remarks}}</dd>
131 </dl> 131 </dl>
132 - {{/each}} 132 + {{/each}}
133 </script> 133 </script>
134 <script> 134 <script>
135 - (function() {  
136 - var modal_opts = { center: false, bgclose: false, modal:false } 135 + (function () {
  136 + var modal_opts = {center: false, bgclose: false, modal: false}
137 var modal = '#schedule-lj_zrw-modal', 137 var modal = '#schedule-lj_zrw-modal',
138 - f,  
139 - m_t_body = '.main-schedule-table .ct_table_body',  
140 - s_t_body = '.sub-task-table .ct_table_body',  
141 - folder = '/real_control_v2/fragments/line_schedule/context_menu',  
142 - sch, schList, lp2SchMap;  
143 - $(modal).on('init', function(e, data) { 138 + f,
  139 + m_t_body = '.main-schedule-table .ct_table_body',
  140 + s_t_body = '.sub-task-table .ct_table_body',
  141 + folder = '/real_control_v2/fragments/line_schedule/context_menu',
  142 + sch, schList, lp2SchMap;
  143 + $(modal).on('init', function (e, data) {
144 sch = data.sch; 144 sch = data.sch;
145 145
146 f = $('.search-form', modal); 146 f = $('.search-form', modal);
147 //线路下拉框 147 //线路下拉框
148 var opts = ''; 148 var opts = '';
149 - $.each(gb_data_basic.activeLines, function() { 149 + $.each(gb_data_basic.activeLines, function () {
150 opts += '<option value="' + this.lineCode + '">' + this.name + '</option>'; 150 opts += '<option value="' + this.lineCode + '">' + this.name + '</option>';
151 }); 151 });
152 $('[name=lineSelect]', f).html(opts) 152 $('[name=lineSelect]', f).html(opts)
153 - .on('change', function() {  
154 - var lineCode = $(this).val();  
155 - schList = gb_schedule_table.findScheduleByLine(lineCode);  
156 - lp2SchMap = gb_common.groupBy(schList, 'lpName'); 153 + .on('change', function () {
  154 + var lineCode = $(this).val();
  155 + schList = gb_schedule_table.findScheduleByLine(lineCode);
  156 + lp2SchMap = gb_common.groupBy(schList, 'lpName');
157 157
158 - var opts = '';  
159 - for (var lpName in lp2SchMap)  
160 - opts += '<option value="' + lpName + '">' + lpName + '</option>';  
161 - $('[name=lpName]', f).html(opts).trigger('change');  
162 - }); 158 + var opts = '';
  159 + for (var lpName in lp2SchMap)
  160 + opts += '<option value="' + lpName + '">' + lpName + '</option>';
  161 + $('[name=lpName]', f).html(opts).trigger('change');
  162 + });
163 163
164 //路牌下拉框 164 //路牌下拉框
165 - $('[name=lpName]', f).on('change', function() { 165 + $('[name=lpName]', f).on('change', function () {
166 var list = lp2SchMap[$(this).val()].sort(gb_schedule_table.schedule_sort), 166 var list = lp2SchMap[$(this).val()].sort(gb_schedule_table.schedule_sort),
167 - htmlBody = template('schedule-main-table-temp', {  
168 - list: list  
169 - }); 167 + htmlBody = template('schedule-main-table-temp', {
  168 + list: list
  169 + });
170 $(m_t_body, modal).html(htmlBody); 170 $(m_t_body, modal).html(htmlBody);
171 $(s_t_body, modal).empty(); 171 $(s_t_body, modal).empty();
172 }); 172 });
173 //班次点击 173 //班次点击
174 - $(modal).on('click contextmenu', m_t_body + ' dl', function() { 174 + $(modal).on('click contextmenu', m_t_body + ' dl', function () {
175 $(this).parent().find('.active').removeClass('active'); 175 $(this).parent().find('.active').removeClass('active');
176 $(this).addClass('active'); 176 $(this).addClass('active');
177 //show 子任务 177 //show 子任务
@@ -186,122 +186,133 @@ @@ -186,122 +186,133 @@
186 selectedDl(sch); 186 selectedDl(sch);
187 }); 187 });
188 188
189 - function selectedDl(sch){  
190 - //默认选中项  
191 - $('[name=lineSelect]', f).val(sch.xlBm).trigger('change');  
192 - $('[name=lpName]', f).val(sch.lpName).trigger('change');  
193 - var dl = $('.main-schedule-table', modal).find('dl[data-id=' + sch.id + ']').trigger('click');  
194 - //滚动到可视区域  
195 - var cont = $('.main-schedule-wrap', modal);  
196 - cont.animate({  
197 - scrollTop: dl.offset().top - cont.offset().top + cont.scrollTop() - 38  
198 - }, 500); 189 + function selectedDl(sch) {
  190 + //默认选中项
  191 + $('[name=lineSelect]', f).val(sch.xlBm).trigger('change');
  192 + $('[name=lpName]', f).val(sch.lpName).trigger('change');
  193 + var dl = $('.main-schedule-table', modal).find('dl[data-id=' + sch.id + ']').trigger('click');
  194 + //滚动到可视区域
  195 + var cont = $('.main-schedule-wrap', modal);
  196 + cont.animate({
  197 + scrollTop: dl.offset().top - cont.offset().top + cont.scrollTop() - 38
  198 + }, 500);
199 } 199 }
200 200
201 - function getActiveSch(){  
202 - var dl=$('.main-schedule-table dl.active', modal)  
203 - ,sch, lineCode=$('[name=lineSelect]', f).val();  
204 - if(dl.length > 0)  
205 - sch=gb_schedule_table.findScheduleByLine(lineCode)[dl.data('id')]; 201 + function getActiveSch() {
  202 + var dl = $('.main-schedule-table dl.active', modal)
  203 + , sch, lineCode = $('[name=lineSelect]', f).val();
  204 + if (dl.length > 0)
  205 + sch = gb_schedule_table.findScheduleByLine(lineCode)[dl.data('id')];
206 206
207 - return sch; 207 + return sch;
208 } 208 }
209 209
210 //刷新主任务表格 210 //刷新主任务表格
211 - var m_s_table_update=function(e, opts){  
212 - var lineCode=$('[name=lineSelect]', f).val();  
213 - //重新获取班次数据  
214 - schList = gb_schedule_table.findScheduleByLine(lineCode);  
215 - lp2SchMap = gb_common.groupBy(schList, 'lpName');  
216 - $('[name=lpName]', f).trigger('change'); 211 + var m_s_table_update = function (e, opts) {
  212 + var lineCode = $('[name=lineSelect]', f).val();
  213 + //重新获取班次数据
  214 + schList = gb_schedule_table.findScheduleByLine(lineCode);
  215 + lp2SchMap = gb_common.groupBy(schList, 'lpName');
  216 + $('[name=lpName]', f).trigger('change');
217 217
218 - if(opts && opts.sch){  
219 - selectedDl(opts.sch);  
220 - } 218 + if (opts && opts.sch) {
  219 + selectedDl(opts.sch);
  220 + }
221 } 221 }
222 222
223 //刷新子任务表格 223 //刷新子任务表格
224 - var sub_task_update=function(){  
225 - var sch=getActiveSch()  
226 - ,htmlStr=''  
227 - ,tbody=$(s_t_body, modal);  
228 - sch.cTasks.sort(sub_task_sort);  
229 - htmlStr = template('sub_task-table-temp', {list: sch.cTasks});  
230 - tbody.html(htmlStr);  
231 - //字典转换  
232 - dictionaryUtils.transformDom($('.nt-dictionary', tbody)); 224 + var sub_task_update = function () {
  225 + var sch = getActiveSch()
  226 + , htmlStr = ''
  227 + , tbody = $(s_t_body, modal);
  228 + sch.cTasks.sort(sub_task_sort);
  229 + htmlStr = template('sub_task-table-temp', {list: sch.cTasks});
  230 + tbody.html(htmlStr);
  231 + //字典转换
  232 + dictionaryUtils.transformDom($('.nt-dictionary', tbody));
233 } 233 }
234 234
235 //新增临加 235 //新增临加
236 - var add_temp_sch=function(){  
237 - var sch=getActiveSch();  
238 - if(!sch)  
239 - sch={xlBm: $('[name=lineSelect]', f).val(), lpName: $('[name=lpName]', f).val()}; 236 + var add_temp_sch = function () {
  237 + var sch = getActiveSch();
  238 + if (!sch)
  239 + sch = {xlBm: $('[name=lineSelect]', f).val(), lpName: $('[name=lpName]', f).val()};
240 240
241 - open_modal(folder + '/add_temp_sch.html', {  
242 - sch:sch  
243 - }, modal_opts); 241 + open_modal(folder + '/add_temp_sch.html', {
  242 + sch: sch
  243 + }, modal_opts);
244 } 244 }
245 245
246 //删除临加班次 246 //删除临加班次
247 - var remove_sch=function(){  
248 - var sch = getActiveSch();  
249 - if(!sch || !sch.sflj)  
250 - return notify_err('只能删除临加班次!');  
251 - var str='<h3>确定要删除临加班次<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>?</h3>';  
252 - alt_confirm(str, function(){  
253 - gb_common.$del('/realSchedule/' + sch.id, function(rs){  
254 - //前端数据更新  
255 - gb_schedule_table.updateSchedule(rs.ts);  
256 - gb_schedule_table.deheteSchedule(rs.delete);  
257 - //m_s_table_update();  
258 - $('.main-schedule-table', modal).trigger('refresh');  
259 - });  
260 - }, '确定删除');  
261 - } 247 + var remove_sch = function () {
  248 + var sch = getActiveSch();
  249 + if (!sch || !sch.sflj)
  250 + return notify_err('只能删除临加班次!');
  251 + var str = '<h3>确定要删除临加班次<span style="color:red;margin: 0 5px;">' + sch.clZbh + '( ' + sch.dfsj + ' )</span>?</h3>';
  252 + alt_confirm(str, function () {
  253 + gb_common.$del('/realSchedule/' + sch.id, function (rs) {
  254 + //前端数据更新
  255 + gb_schedule_table.updateSchedule(rs.ts);
  256 + gb_schedule_table.deheteSchedule(rs.delete);
  257 + //m_s_table_update();
  258 + $('.main-schedule-table', modal).trigger('refresh');
  259 + });
  260 + }, '确定删除');
  261 + };
262 //添加自定义子任务 262 //添加自定义子任务
263 - var add_sub_task_other=function(){  
264 - var sch=getActiveSch();  
265 - if(!sch)  
266 - return notify_err('无法获取到主任务信息!');  
267 - open_modal(folder + '/sub_task/add_sub_task_other.html', {  
268 - sch:sch  
269 - }, modal_opts);  
270 - } 263 + var add_sub_task_other = function () {
  264 + var sch = getActiveSch();
  265 + if (!sch)
  266 + return notify_err('无法获取到主任务信息!');
  267 + open_modal(folder + '/sub_task/add_sub_task_other.html', {
  268 + sch: sch
  269 + }, modal_opts);
  270 + };
  271 +
  272 + //回场子任务
  273 + var add_sub_task_in = function () {
  274 + var sch = getActiveSch();
  275 + if (!sch)
  276 + return notify_err('无法获取到主任务信息!');
  277 + open_modal(folder + '/sub_task/add_sub_task_inpark.html', {
  278 + sch: sch
  279 + }, modal_opts);
  280 + };
271 281
272 //删除子任务 282 //删除子任务
273 - var remove_sub_task=function(){  
274 - var activeDl=$(s_t_body, modal).find('dl.context-menu-active');  
275 - if(activeDl.length==0)  
276 - return;  
277 - var dds=activeDl.find('dd');  
278 - console.log(dds);  
279 - var id=activeDl.data('id')  
280 - ,str='<h3>确定要删除子任务<span style="color:red;margin: 0 5px;">'+ $(dds[4]).text()+','+ $(dds[6]).text() +' </span>?</h3>';  
281 - alt_confirm(str, function(){  
282 - gb_common.$del('/childTask/' + id, function(rs){  
283 - gb_schedule_table.updateSchedule(rs.t);  
284 - notify_succ('删除子任务成功!');  
285 - //刷新班次列表  
286 - m_s_table_update();  
287 - //选中班次  
288 - selectedDl(rs.t);  
289 - });  
290 - }, '确定删除');  
291 - } 283 + var remove_sub_task = function () {
  284 + var activeDl = $(s_t_body, modal).find('dl.context-menu-active');
  285 + if (activeDl.length == 0)
  286 + return;
  287 + var dds = activeDl.find('dd');
  288 + console.log(dds);
  289 + var id = activeDl.data('id')
  290 + , str = '<h3>确定要删除子任务<span style="color:red;margin: 0 5px;">' + $(dds[4]).text() + ',' + $(dds[6]).text() + ' </span>?</h3>';
  291 + alt_confirm(str, function () {
  292 + gb_common.$del('/childTask/' + id, function (rs) {
  293 + gb_schedule_table.updateSchedule(rs.t);
  294 + notify_succ('删除子任务成功!');
  295 + //刷新班次列表
  296 + m_s_table_update();
  297 + //选中班次
  298 + selectedDl(rs.t);
  299 + });
  300 + }, '确定删除');
  301 + };
292 302
293 - var callbackHandler={  
294 - add_temp_sch:add_temp_sch,  
295 - remove_sch: remove_sch,  
296 - add_sub_task_other:add_sub_task_other,  
297 - remove_sub_task: remove_sub_task  
298 - } 303 + var callbackHandler = {
  304 + add_temp_sch: add_temp_sch,
  305 + remove_sch: remove_sch,
  306 + add_sub_task_other: add_sub_task_other,
  307 + add_sub_task_in: add_sub_task_in,
  308 + remove_sub_task: remove_sub_task
  309 + };
299 310
300 //右键菜单 311 //右键菜单
301 $.contextMenu({ 312 $.contextMenu({
302 - selector: modal+ ' '+m_t_body+' dl', 313 + selector: modal + ' ' + m_t_body + ' dl',
303 className: 'schedule-ct-menu', 314 className: 'schedule-ct-menu',
304 - callback: function(key, options) { 315 + callback: function (key, options) {
305 callbackHandler[key] && callbackHandler[key](); 316 callbackHandler[key] && callbackHandler[key]();
306 }, 317 },
307 items: { 318 items: {
@@ -313,11 +324,11 @@ @@ -313,11 +324,11 @@
313 items: { 324 items: {
314 'add_sub_task_in': { 325 'add_sub_task_in': {
315 name: '回场', 326 name: '回场',
316 - disabled:true 327 + disabled: true
317 }, 328 },
318 'add_sub_task_out': { 329 'add_sub_task_out': {
319 name: '出场', 330 name: '出场',
320 - disabled:true 331 + disabled: true
321 }, 332 },
322 'add_sub_task_other': { 333 'add_sub_task_other': {
323 name: '自定义' 334 name: '自定义'
@@ -325,16 +336,16 @@ @@ -325,16 +336,16 @@
325 } 336 }
326 }, 337 },
327 'remove_sch': { 338 'remove_sch': {
328 - name: '删除' 339 + name: '删除'
329 } 340 }
330 } 341 }
331 }); 342 });
332 343
333 //右键菜单 344 //右键菜单
334 $.contextMenu({ 345 $.contextMenu({
335 - selector: modal+' '+s_t_body+' dl', 346 + selector: modal + ' ' + s_t_body + ' dl',
336 className: 'schedule-ct-menu', 347 className: 'schedule-ct-menu',
337 - callback: function(key, options) { 348 + callback: function (key, options) {
338 callbackHandler[key] && callbackHandler[key](); 349 callbackHandler[key] && callbackHandler[key]();
339 }, 350 },
340 items: { 351 items: {
@@ -349,8 +360,8 @@ @@ -349,8 +360,8 @@
349 360
350 $('.add-temp-sch-icon', modal).on('click', add_temp_sch); 361 $('.add-temp-sch-icon', modal).on('click', add_temp_sch);
351 362
352 - function sub_task_sort(a, b){  
353 - return a.id - b.id; 363 + function sub_task_sort(a, b) {
  364 + return a.id - b.id;
354 } 365 }
355 })(); 366 })();
356 </script> 367 </script>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_inpark.html 0 → 100644
  1 +<div class="uk-modal" id="add-sub-task-inpark-modal">
  2 + <div class="uk-modal-dialog" style="width: 935px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>回场子任务</h2></div>
  6 +
  7 + <div class="uk-grid tm-grid-truncate" data-uk-grid-margin="">
  8 + <div class="uk-width-medium-1-3 uk-row-first">
  9 + <div class="uk-panel uk-panel-box uk-panel-box-primary">
  10 + <div class="uk-panel-badge uk-badge">营运</div>
  11 + <h3 class="uk-panel-title">线路上站点间</h3>
  12 + <form class="uk-form uk-form-horizontal">
  13 + <div class="uk-grid">
  14 + <div class="uk-width-3-10">
  15 + <div class="uk-form-row">
  16 + <label class="uk-form-label">起点 </label>
  17 + </div>
  18 + </div>
  19 + <div class="uk-width-7-10 pl5">
  20 + <select name="startStation" required></select>
  21 + </div>
  22 + </div>
  23 + <div class="uk-grid">
  24 + <div class="uk-width-3-10">
  25 + <div class="uk-form-row">
  26 + <label class="uk-form-label">终点 </label>
  27 + </div>
  28 + </div>
  29 + <div class="uk-width-7-10 pl5">
  30 + <select name="endStation" required></select>
  31 + </div>
  32 + </div>
  33 + <div class="uk-grid">
  34 + <div class="uk-width-3-10">
  35 + <div class="uk-form-row">
  36 + <label class="uk-form-label">营运里程</label>
  37 + </div>
  38 + </div>
  39 + <div class="uk-width-7-10 pl5">
  40 + <select name="endStation" required></select>
  41 + </div>
  42 + </div>
  43 + </form>
  44 + </div>
  45 + </div>
  46 + <div class="uk-width-medium-1-3">
  47 + <div class="uk-panel uk-panel-box uk-panel-box-secondary">
  48 + <div class="uk-panel-badge uk-badge uk-badge-default">空驶</div>
  49 + <h3 class="uk-panel-title">进场</h3>
  50 + Lorem ipsum dolor sit amet, consectetur adipisicing elit. <code>.uk-panel-box-primary</code>
  51 + </div>
  52 + </div>
  53 + <div class="uk-width-medium-1-3">
  54 + <div class="uk-panel uk-panel-box uk-panel-box-danger">
  55 + <div class="uk-panel-badge uk-badge uk-badge-danger">烂班</div>
  56 + <h3 class="uk-panel-title">线路上站点间</h3>
  57 + Lorem ipsum dolor sit amet, consectetur adipisicing elit. <code>.uk-panel-box-primary</code>
  58 + </div>
  59 + </div>
  60 + </div>
  61 + </div>
  62 +
  63 + <script id="sub-task-inpark-form-temp" type="text/html">
  64 + </script>
  65 +
  66 + <script>
  67 + (function() {
  68 + var modal = '#add-sub-task-inpark-modal',
  69 + sch, stationRoutes, parks, information;
  70 + var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
  71 + $(modal).on('init', function(e, data) {
  72 + sch = data.sch;
  73 + //var formHtml = template('sub-task-inpark-form-temp', {sch:sch, adjustExps: adjustExps});
  74 + //$('form', modal).html(formHtml);
  75 + //字典转换
  76 + //dictionaryUtils.transformDom($('.nt-dictionary', modal));
  77 +
  78 + //站点路由
  79 + stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function(a, b){
  80 + return a.stationRouteCode-b.stationRouteCode;
  81 + }), 'directions');
  82 + //停车场
  83 + $.get('/basic/parks', function(rs){
  84 + parks=rs;
  85 + });
  86 + //线路标准
  87 + information=gb_data_basic.getLineInformation(sch.xlBm);
  88 +
  89 + //submit
  90 + var f = $('form', modal).formValidation(gb_form_validation_opts);
  91 + f.on('success.form.fv', function(e) {
  92 + disabled_submit_btn(this);
  93 + e.preventDefault();
  94 + var data = $(this).serializeJSON();
  95 +/*
  96 + gb_common.$post('/childTask', data, function(rs){
  97 + notify_succ('子任务添加成功');
  98 + gb_schedule_table.updateSchedule(rs.t);
  99 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t});
  100 + UIkit.modal(modal).hide();
  101 + });*/
  102 + });
  103 + });
  104 + })();
  105 + </script>
  106 +</div>
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_other.html
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div class="uk-modal-dialog" style="width: 635px;"> 2 <div class="uk-modal-dialog" style="width: 635px;">
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 <form class="uk-form uk-form-horizontal"> 6 <form class="uk-form uk-form-horizontal">
7 </form> 7 </form>
8 </div> 8 </div>
src/main/resources/static/real_control_v2/js/common.js
@@ -124,8 +124,8 @@ var gb_common = (function () { @@ -124,8 +124,8 @@ var gb_common = (function () {
124 } 124 }
125 125
126 var get_device_tree_data = function (allGps, idBefore) { 126 var get_device_tree_data = function (allGps, idBefore) {
127 - if(!idBefore)  
128 - idBefore=''; 127 + if (!idBefore)
  128 + idBefore = '';
129 var treeData = []; 129 var treeData = [];
130 //var data = groupBy(get_vals(gb_data_gps.allGps), 'lineId'); 130 //var data = groupBy(get_vals(gb_data_gps.allGps), 'lineId');
131 var data = groupBy(get_vals(allGps), 'lineId'); 131 var data = groupBy(get_vals(allGps), 'lineId');
@@ -135,28 +135,28 @@ var gb_common = (function () { @@ -135,28 +135,28 @@ var gb_common = (function () {
135 data[name] = groupBy(data[code], 'upDown'); 135 data[name] = groupBy(data[code], 'upDown');
136 treeData.push({ 136 treeData.push({
137 'text': name, 137 'text': name,
138 - 'a_attr': {'type': 'line', 'id': idBefore+'line_'+code}, 138 + 'a_attr': {'type': 'line', 'id': idBefore + 'line_' + code},
139 'children': [{ 139 'children': [{
140 'text': '上行', 140 'text': '上行',
141 - 'children': grabs(data[name][0]), 141 + 'children': grabs(data[name][0], idBefore),
142 'a_attr': { 142 'a_attr': {
143 'type': 'route', 143 'type': 'route',
144 'route': code + '_0', 144 'route': code + '_0',
145 - 'id': idBefore+'route_' + code + '_0' 145 + 'id': idBefore + 'route_' + code + '_0'
146 } 146 }
147 }, { 147 }, {
148 'text': '下行', 148 'text': '下行',
149 - 'children': grabs(data[name][1]), 149 + 'children': grabs(data[name][1], idBefore),
150 'a_attr': { 150 'a_attr': {
151 'type': 'route', 151 'type': 'route',
152 'route': code + '_1', 152 'route': code + '_1',
153 - 'id': idBefore+'route_' + code + '_1' 153 + 'id': idBefore + 'route_' + code + '_1'
154 } 154 }
155 }] 155 }]
156 }); 156 });
157 } 157 }
158 158
159 - function grabs(array) { 159 + function grabs(array, idBefore) {
160 if (!array) 160 if (!array)
161 return; 161 return;
162 var rs = []; 162 var rs = [];
@@ -165,7 +165,8 @@ var gb_common = (function () { @@ -165,7 +165,8 @@ var gb_common = (function () {
165 'text': this.nbbm, 165 'text': this.nbbm,
166 'a_attr': { 166 'a_attr': {
167 'type': 'device', 167 'type': 'device',
168 - 'device': this.deviceId 168 + 'device': this.deviceId,
  169 + 'id': idBefore + 'device_' + this.nbbm
169 }, 170 },
170 'data': {lineId: this.lineId, upDown: this.upDown}, 171 'data': {lineId: this.lineId, upDown: this.upDown},
171 'icon': 'uk-icon-bus' 172 'icon': 'uk-icon-bus'
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
@@ -113,8 +113,17 @@ input[type=checkbox].disabled{ @@ -113,8 +113,17 @@ input[type=checkbox].disabled{
113 width: 240px; 113 width: 240px;
114 right: 327px; 114 right: 327px;
115 padding-left: 20px; 115 padding-left: 20px;
  116 + transition: all .07s linear;
116 } 117 }
117 118
  119 +.real_bottom_panel .telescopic{
  120 + position: absolute;
  121 + top: 4px;
  122 + right: 7px;
  123 + color: #827f7f;
  124 + cursor: pointer;
  125 + font-size: 16px;
  126 +}
118 127
119 .real_right_gps_panel>form{ 128 .real_right_gps_panel>form{
120 text-align: center; 129 text-align: center;
@@ -180,7 +189,7 @@ input[type=checkbox].disabled{ @@ -180,7 +189,7 @@ input[type=checkbox].disabled{
180 width: 100%; 189 width: 100%;
181 height: 100%; 190 height: 100%;
182 height: calc(100% - 7px); 191 height: calc(100% - 7px);
183 - overflow: auto; 192 + overflow: hidden;
184 padding-top: 7px; 193 padding-top: 7px;
185 font-size: 13px; 194 font-size: 13px;
186 position: relative; 195 position: relative;
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js
@@ -7,7 +7,7 @@ var gb_map_gps_tree = (function () { @@ -7,7 +7,7 @@ var gb_map_gps_tree = (function () {
7 var jstreeChanged = function (e, node, event) { 7 var jstreeChanged = function (e, node, event) {
8 gb_map_overlay_mge.refresh(); 8 gb_map_overlay_mge.refresh();
9 }; 9 };
10 - 10 +
11 var init = function (cb) { 11 var init = function (cb) {
12 var allGps = gb_data_gps.allGps; 12 var allGps = gb_data_gps.allGps;
13 _devices = gb_common.get_keys(allGps); 13 _devices = gb_common.get_keys(allGps);
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/baidu.js
@@ -73,20 +73,35 @@ var gb_map_baidu = (function(){ @@ -73,20 +73,35 @@ var gb_map_baidu = (function(){
73 if(polylines[opt.id]) 73 if(polylines[opt.id])
74 return; 74 return;
75 75
76 - var pos = [], temps;  
77 - var route = opt.upDown==0?opt.route.up:opt.route.down; 76 + var pos, temps;
  77 + var route = opt.upDown==0?opt.route.up_bd:opt.route.down_bd;
  78 + var polyline, _pLines=[];
  79 + $.each(route, function (i, item) {
  80 +
  81 + pos = [];
  82 + $.each(item.split(','), function () {
  83 + temps = this.split(' ');
  84 + pos.push(new BMap.Point(temps[0], temps[1]));
  85 + });
  86 + polyline = new BMap.Polyline(pos, opt.style);
  87 + map.addOverlay(polyline);
  88 + _pLines.push(polyline);
  89 +
  90 + });
78 91
79 - $.each(route.split(','), function(){ 92 + //根据ID保存映射
  93 + polylines[opt.id]=_pLines;
  94 + /*$.each(route.split(','), function(){
80 temps = this.split(' '); 95 temps = this.split(' ');
81 pos.push(new BMap.Point(temps[0], temps[1])); 96 pos.push(new BMap.Point(temps[0], temps[1]));
82 - }); 97 + });*/
83 98
84 - var polyline = new BMap.Polyline(pos, opt.style); 99 + /*var polyline = new BMap.Polyline(pos, opt.style);
85 //根据ID保存映射 100 //根据ID保存映射
86 polylines[opt.id]=polyline; 101 polylines[opt.id]=polyline;
87 if(opt.hide) 102 if(opt.hide)
88 polyline.hide(); 103 polyline.hide();
89 - map.addOverlay(polyline); 104 + map.addOverlay(polyline);*/
90 105
91 //延迟居中,避免多次调用时抖动 106 //延迟居中,避免多次调用时抖动
92 //delayToCenter(pos[parseInt(pos.length / 2)]); 107 //delayToCenter(pos[parseInt(pos.length / 2)]);
@@ -102,16 +117,24 @@ var gb_map_baidu = (function(){ @@ -102,16 +117,24 @@ var gb_map_baidu = (function(){
102 refreshPolyline: function (opt) { 117 refreshPolyline: function (opt) {
103 var idx = opt.idx; 118 var idx = opt.idx;
104 for(var id in polylines){ 119 for(var id in polylines){
105 - if(idx.indexOf(id) != -1)  
106 - polylines[id].show();  
107 - else  
108 - polylines[id].hide(); 120 + if(idx.indexOf(id) != -1){
  121 + $.each(polylines[id], function () {
  122 + this.show();
  123 + })
  124 + }
  125 + else{
  126 + $.each(polylines[id], function () {
  127 + this.hide();
  128 + })
  129 + }
109 } 130 }
110 }, 131 },
111 //定位到线路中间点 132 //定位到线路中间点
112 centerToLine: function (opt) { 133 centerToLine: function (opt) {
113 - var pos=polylines[opt.id].getPath();  
114 - delayToCenter(pos[parseInt(pos.length / 2)]); 134 + var _pLines = polylines[opt.id];
  135 + delayToCenter(_pLines[parseInt(_pLines.length/2)].getPath()[0]);
  136 + //var pos=polylines[opt.id].getPath();
  137 + //delayToCenter(pos[parseInt(pos.length / 2)]);
115 }, 138 },
116 //绘制GPS信号 139 //绘制GPS信号
117 drawRealGpsMarker: function(opts){ 140 drawRealGpsMarker: function(opts){
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/gaode.js
@@ -83,8 +83,31 @@ var gb_map_gaode = (function() { @@ -83,8 +83,31 @@ var gb_map_gaode = (function() {
83 map.clearMap(); 83 map.clearMap();
84 }, 84 },
85 drawLine: function(opt){ 85 drawLine: function(opt){
86 - //linePolyline = [];  
87 - var pos = [], temps; 86 + if(polylines[opt.id])
  87 + return;
  88 +
  89 + var pos, temps;
  90 + var route = opt.upDown==0?opt.route.up_gcj:opt.route.down_gcj;
  91 +
  92 + var polyline, _pLines=[];
  93 + $.each(route, function (i, item) {
  94 +
  95 + pos = [];
  96 + $.each(item.split(','), function () {
  97 + temps = this.split(' ');
  98 + pos.push([temps[0], temps[1]]);
  99 + });
  100 +
  101 + opt.style.path=pos;
  102 + var polyline = new AMap.Polyline(opt.style);
  103 + polyline.setMap(map);
  104 +
  105 + _pLines.push(polyline);
  106 + });
  107 +
  108 + polylines[opt.id]=_pLines;
  109 +
  110 + /*var pos = [], temps;
88 var route = opt.upDown==0?opt.route.up_gcj:opt.route.down_gcj; 111 var route = opt.upDown==0?opt.route.up_gcj:opt.route.down_gcj;
89 112
90 $.each(route.split(','), function(){ 113 $.each(route.split(','), function(){
@@ -99,21 +122,30 @@ var gb_map_gaode = (function() { @@ -99,21 +122,30 @@ var gb_map_gaode = (function() {
99 if(opt.hide) 122 if(opt.hide)
100 polyline.hide(); 123 polyline.hide();
101 124
102 - polyline.setMap(map); 125 + polyline.setMap(map);*/
103 }, 126 },
104 //定位到线路中间点 127 //定位到线路中间点
105 centerToLine: function (opt) { 128 centerToLine: function (opt) {
106 - var pos=polylines[opt.id].getPath();  
107 - map.setCenter(pos[parseInt(pos.length / 2)]); 129 + //var pos=polylines[opt.id].getPath();
  130 + //map.setCenter(pos[parseInt(pos.length / 2)]);
  131 +
  132 + var _pLines = polylines[opt.id];
  133 + map.setCenter(_pLines[parseInt(_pLines.length/2)].getPath()[0]);
108 }, 134 },
109 //根据id 显示polyline 135 //根据id 显示polyline
110 refreshPolyline: function (opt) { 136 refreshPolyline: function (opt) {
111 var idx = opt.idx; 137 var idx = opt.idx;
112 for(var id in polylines){ 138 for(var id in polylines){
113 - if(idx.indexOf(id) != -1)  
114 - polylines[id].show();  
115 - else  
116 - polylines[id].hide(); 139 + if(idx.indexOf(id) != -1){
  140 + $.each(polylines[id], function () {
  141 + this.show();
  142 + })
  143 + }
  144 + else{
  145 + $.each(polylines[id], function () {
  146 + this.hide();
  147 + })
  148 + }
117 } 149 }
118 }, 150 },
119 drawStationMarker: function (opt) { 151 drawStationMarker: function (opt) {
@@ -332,7 +364,6 @@ var gb_map_gaode = (function() { @@ -332,7 +364,6 @@ var gb_map_gaode = (function() {
332 if(config.carIcon.angle) { 364 if(config.carIcon.angle) {
333 marker.setIcon(gb_map_imap.busIcon); 365 marker.setIcon(gb_map_imap.busIcon);
334 marker.setAngle(gps.direction - 90); 366 marker.setAngle(gps.direction - 90);
335 - marker.setOffset(new AMap.Pixel(-(w / 2), -12));  
336 367
337 marker.setLabel({ 368 marker.setLabel({
338 content: gps.nbbm, 369 content: gps.nbbm,
@@ -345,6 +376,7 @@ var gb_map_gaode = (function() { @@ -345,6 +376,7 @@ var gb_map_gaode = (function() {
345 image: gb_map_imap.createCarIcon(gps, w) 376 image: gb_map_imap.createCarIcon(gps, w)
346 })); 377 }));
347 } 378 }
  379 + marker.setOffset(new AMap.Pixel(-(w / 2), -12.5));
348 } 380 }
349 381
350 //创建站点marker 382 //创建站点marker
src/main/resources/static/real_control_v2/mapmonitor/js/map_overlay_manager.js
@@ -203,11 +203,11 @@ var gb_map_overlay_mge = (function () { @@ -203,11 +203,11 @@ var gb_map_overlay_mge = (function () {
203 203
204 //地图居中至合理的位置 204 //地图居中至合理的位置
205 var centerToRational=function () { 205 var centerToRational=function () {
206 - var chs=gb_map_gps_tree.getChecked(); 206 + /*var chs=getCheckedDevice();
207 if(chs && chs.length > 0){ 207 if(chs && chs.length > 0){
208 var id=chs[0].data.lineId+'_'+chs[0].data.upDown; 208 var id=chs[0].data.lineId+'_'+chs[0].data.upDown;
209 gb_map_imap.call('centerToLine', {id: id}); 209 gb_map_imap.call('centerToLine', {id: id});
210 - } 210 + }*/
211 } 211 }
212 212
213 return { 213 return {
src/main/resources/static/real_control_v2/mapmonitor/js/real.js
@@ -10,11 +10,12 @@ var mapmonitor_load_ep = EventProxy.create(&#39;load_iMap&#39;, &#39;load_baidu&#39;, &#39;load_gaod @@ -10,11 +10,12 @@ var mapmonitor_load_ep = EventProxy.create(&#39;load_iMap&#39;, &#39;load_baidu&#39;, &#39;load_gaod
10 .changeMap(gb_map_config.getConfig().map_type); 10 .changeMap(gb_map_config.getConfig().map_type);
11 11
12 //init tree 12 //init tree
13 - gb_map_gps_tree.init(function () { 13 + /*gb_map_gps_tree.init(function () {
14 gb_map_overlay_mge.init(); 14 gb_map_overlay_mge.init();
15 gb_map_spatial_data.init(); 15 gb_map_spatial_data.init();
16 - }); 16 + });*/
17 17
  18 +/*
18 $(".real_bottom_panel").resizable({ 19 $(".real_bottom_panel").resizable({
19 handles: { 20 handles: {
20 'n': '.real_bottom_panel #handle' 21 'n': '.real_bottom_panel #handle'
@@ -22,6 +23,27 @@ var mapmonitor_load_ep = EventProxy.create(&#39;load_iMap&#39;, &#39;load_baidu&#39;, &#39;load_gaod @@ -22,6 +23,27 @@ var mapmonitor_load_ep = EventProxy.create(&#39;load_iMap&#39;, &#39;load_baidu&#39;, &#39;load_gaod
22 maxHeight: 384, 23 maxHeight: 384,
23 minHeight: 18 24 minHeight: 18
24 }); 25 });
  26 +*/
  27 +
  28 + var maxHeight=384, minHeight=124, threshold=8;
  29 + $(".real_bottom_panel").on('mousewheel', function (e) {
  30 + var event = e.originalEvent;
  31 + var code = delta = (event.wheelDelta) ? event.wheelDelta / 120 : -(event.detail || 0) / 3;
  32 +
  33 + if(code > 0){
  34 + var h = $(this).height()-threshold;
  35 + $(this).height(h>minHeight?h:minHeight);
  36 + }
  37 + else{
  38 + var h = $(this).height()+threshold;
  39 + $(this).height(h<maxHeight?h:maxHeight);
  40 + }
  41 + return false;
  42 + });
  43 +
  44 + $('.real_bottom_panel .telescopic').on('click', function () {
  45 +
  46 + });
25 }); 47 });
26 48
27 var gb_map_consts = { 49 var gb_map_consts = {
@@ -36,13 +58,13 @@ var gb_map_consts = { @@ -36,13 +58,13 @@ var gb_map_consts = {
36 CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) { 58 CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {
37 if (w < 2 * r) r = w / 2; 59 if (w < 2 * r) r = w / 2;
38 if (h < 2 * r) r = h / 2; 60 if (h < 2 * r) r = h / 2;
39 - this.strokeStyle ='rgba(0,102,0,.1)'; 61 + this.strokeStyle = 'rgba(0,102,0,.1)';
40 this.beginPath(); 62 this.beginPath();
41 - this.moveTo(x+r, y);  
42 - this.arcTo(x+w, y, x+w, y+h, r);  
43 - this.arcTo(x+w, y+h, x, y+h, r);  
44 - this.arcTo(x, y+h, x, y, r);  
45 - this.arcTo(x, y, x+w, y, r); 63 + this.moveTo(x + r, y);
  64 + this.arcTo(x + w, y, x + w, y + h, r);
  65 + this.arcTo(x + w, y + h, x, y + h, r);
  66 + this.arcTo(x, y + h, x, y, r);
  67 + this.arcTo(x, y, x + w, y, r);
46 this.closePath(); 68 this.closePath();
47 return this; 69 return this;
48 } 70 }
49 \ No newline at end of file 71 \ No newline at end of file
src/main/resources/static/real_control_v2/mapmonitor/js/spatial_data.js
@@ -126,7 +126,7 @@ var gb_map_spatial_data = (function () { @@ -126,7 +126,7 @@ var gb_map_spatial_data = (function () {
126 126
127 refresh(); 127 refresh();
128 }); 128 });
129 - } 129 + };
130 130
131 //计算多边形面积 131 //计算多边形面积
132 function calcPolygonArea(polygonStr) { 132 function calcPolygonArea(polygonStr) {
src/main/resources/static/real_control_v2/mapmonitor/real.html
@@ -32,8 +32,11 @@ @@ -32,8 +32,11 @@
32 </div> 32 </div>
33 33
34 <div class="real_bottom_panel"> 34 <div class="real_bottom_panel">
35 - <div id="handle" class="ui-resizable-handle ui-resizable-n"></div> 35 + <!--<div id="handle" class="ui-resizable-handle ui-resizable-n"></div>-->
36 <div class="real_br_cont map_config_wrap"></div> 36 <div class="real_br_cont map_config_wrap"></div>
  37 + <div class="telescopic">
  38 + <i class="uk-icon-angle-double-up" ></i>
  39 + </div>
37 </div> 40 </div>
38 41
39 <div class="real_spatial_panel"> 42 <div class="real_spatial_panel">