Commit ab043554cf59532689bd8ae6e843189efbb358b9

Authored by 廖磊
2 parents 7f786791 404e0e2f

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

minhang

# Conflicts:
#	src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task/add_sub_task_inpark.html
Showing 64 changed files with 2505 additions and 1022 deletions

Too many changes to show.

To preserve performance only 64 of 131 files are displayed.

src/main/java/com/bsth/controller/forms/ExportController.java
@@ -203,7 +203,7 @@ public class ExportController { @@ -203,7 +203,7 @@ public class ExportController {
203 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 203 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
204 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 204 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
205 ReportUtils ee = new ReportUtils(); 205 ReportUtils ee = new ReportUtils();
206 - List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), 206 + List<Vehicleloading> vehicleloading = formsService.vehicleloading(/*map.get("gsdmVehic").toString(),map.get("fgsdmVehic").toString(),*/map.get("line").toString(),
207 map.get("date").toString()); 207 map.get("date").toString());
208 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 208 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
209 int i = 1; 209 int i = 1;
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
@@ -26,93 +26,90 @@ import com.bsth.service.realcontrol.ScheduleRealInfoService; @@ -26,93 +26,90 @@ import com.bsth.service.realcontrol.ScheduleRealInfoService;
26 @RestController 26 @RestController
27 @RequestMapping("mcy_forms") 27 @RequestMapping("mcy_forms")
28 public class MCY_FormsController { 28 public class MCY_FormsController {
29 - 29 +
30 @Autowired 30 @Autowired
31 FormsService formsService; 31 FormsService formsService;
32 - 32 +
33 @Autowired 33 @Autowired
34 ScheduleRealInfoService scheduleRealInfoService; 34 ScheduleRealInfoService scheduleRealInfoService;
35 -  
36 - //行车路单日报表  
37 - @RequestMapping(value = "/waybillday",method = RequestMethod.POST)  
38 - public List<Waybillday> waybillday(@RequestParam Map<String, Object> map){  
39 -  
40 -  
41 -// scheduleRealInfoService.findKMBC(jName, clZbh, lpName, date) 35 +
  36 + // 行车路单日报表
  37 +
  38 + @RequestMapping(value = "/waybillday", method = RequestMethod.POST)
  39 + public List<Waybillday> waybillday(@RequestParam Map<String, Object> map) {
  40 +
  41 + // scheduleRealInfoService.findKMBC(jName, clZbh, lpName, date)
42 return formsService.waybillday(map); 42 return formsService.waybillday(map);
43 } 43 }
44 -  
45 - //线路客流量报表  
46 - @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST)  
47 - public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){  
48 - 44 +
  45 + // 线路客流量报表
  46 +
  47 + @RequestMapping(value = "/linepasswengerflow", method = RequestMethod.POST)
  48 + public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map) {
  49 +
49 return formsService.linepasswengerflow(map); 50 return formsService.linepasswengerflow(map);
50 } 51 }
51 -  
52 -  
53 -  
54 - //班次车辆人员月报表  
55 - @RequestMapping(value = "/shiftuehiclemanth",method = RequestMethod.POST)  
56 - public List<Shiftuehiclemanth> shiftuehiclemanth(@RequestParam Map<String, Object> map){  
57 - 52 +
  53 + // 班次车辆人员月报表
  54 + @RequestMapping(value = "/shiftuehiclemanth", method = RequestMethod.POST)
  55 + public List<Shiftuehiclemanth> shiftuehiclemanth(@RequestParam Map<String, Object> map) {
  56 +
58 return formsService.shiftuehiclemanth(map); 57 return formsService.shiftuehiclemanth(map);
59 } 58 }
60 -  
61 -  
62 - //班次车辆人员日统计  
63 - @RequestMapping(value = "/shifday",method = RequestMethod.POST)  
64 - public List<Shifday> shifday(@RequestParam Map<String, Object> map){  
65 - 59 +
  60 + // 班次车辆人员日统计
  61 + @RequestMapping(value = "/shifday", method = RequestMethod.POST)
  62 + public List<Shifday> shifday(@RequestParam Map<String, Object> map) {
  63 +
66 return formsService.shifday(map); 64 return formsService.shifday(map);
67 } 65 }
68 -  
69 - //换人换车情况统计表  
70 - @RequestMapping(value = "/changetochange",method = RequestMethod.POST)  
71 - public List<Changetochange> changetochange(@RequestParam Map<String, Object> map){  
72 - 66 +
  67 + // 换人换车情况统计表
  68 + @RequestMapping(value = "/changetochange", method = RequestMethod.POST)
  69 + public List<Changetochange> changetochange(@RequestParam Map<String, Object> map) {
  70 +
73 return formsService.changetochange(map); 71 return formsService.changetochange(map);
74 } 72 }
75 -  
76 - //路单数据  
77 - @RequestMapping(value = "/singledata",method = RequestMethod.POST)  
78 - public List<Singledata> singledata(@RequestParam Map<String, Object> map){  
79 - 73 +
  74 + // 路单数据
  75 + @RequestMapping(value = "/singledata", method = RequestMethod.POST)
  76 + public List<Singledata> singledata(@RequestParam Map<String, Object> map) {
  77 +
80 return formsService.singledata(map); 78 return formsService.singledata(map);
81 - }  
82 -  
83 - //车辆加注  
84 - @RequestMapping(value = "/vehicleloading",method = RequestMethod.POST)  
85 - public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){  
86 - return formsService.vehicleloading(line,data);  
87 } 79 }
88 -  
89 -  
90 - //运营服务阶段报表  
91 - @RequestMapping(value = "/operationservice",method = RequestMethod.POST)  
92 - public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){  
93 - 80 +
  81 + // 车辆加注
  82 + @RequestMapping(value = "/vehicleloading", method = RequestMethod.POST)
  83 + public List<Vehicleloading> vehicleloading(/*@RequestParam String gsdmVehic, @RequestParam String fgsdmVehic,*/
  84 + @RequestParam String line, @RequestParam String data) {
  85 + return formsService.vehicleloading(/*gsdmVehic, fgsdmVehic, */line, data);
  86 + }
  87 +
  88 + // 运营服务阶段报表
  89 + @RequestMapping(value = "/operationservice", method = RequestMethod.POST)
  90 + public List<Operationservice> operationservice(@RequestParam Map<String, Object> map) {
  91 +
94 return formsService.operationservice(map); 92 return formsService.operationservice(map);
95 } 93 }
96 -  
97 - //营运线路出车率统计表  
98 - @RequestMapping(value = "/turnoutrate",method = RequestMethod.POST)  
99 - public List<Turnoutrate> turnoutrate(@RequestParam Map<String, Object> map){  
100 -  
101 - return formsService.turnoutrate(map);  
102 - }  
103 -  
104 - //班次执行率统计表  
105 - @RequestMapping(value = "/executionrate",method = RequestMethod.POST)  
106 - public List<Executionrate> executionrate(@RequestParam Map<String, Object> map){  
107 -  
108 - return formsService.executionrate(map);  
109 - }  
110 -  
111 -  
112 - //营运线路名称统计表  
113 - @RequestMapping(value = "/allline",method = RequestMethod.POST)  
114 - public List<Allline> allline(@RequestParam Map<String, Object> map){  
115 -  
116 - return formsService.allline(map); 94 +
  95 + // 营运线路出车率统计表
  96 + @RequestMapping(value = "/turnoutrate", method = RequestMethod.POST)
  97 + public List<Turnoutrate> turnoutrate(@RequestParam Map<String, Object> map) {
  98 +
  99 + return formsService.turnoutrate(map);
  100 + }
  101 +
  102 + // 班次执行率统计表
  103 + @RequestMapping(value = "/executionrate", method = RequestMethod.POST)
  104 + public List<Executionrate> executionrate(@RequestParam Map<String, Object> map) {
  105 +
  106 + return formsService.executionrate(map);
  107 + }
  108 +
  109 + // 营运线路名称统计表
  110 + @RequestMapping(value = "/allline", method = RequestMethod.POST)
  111 + public List<Allline> allline(@RequestParam Map<String, Object> map) {
  112 +
  113 + return formsService.allline(map);
117 } 114 }
118 } 115 }
src/main/java/com/bsth/controller/realcontrol/RealMapController.java
@@ -23,29 +23,40 @@ public class RealMapController { @@ -23,29 +23,40 @@ public class RealMapController {
23 * 根据线路获取站点路由及空间数据 23 * 根据线路获取站点路由及空间数据
24 */ 24 */
25 @RequestMapping(value = "/stationSpatialData") 25 @RequestMapping(value = "/stationSpatialData")
26 - public Map<String, Object> stationSpatialData(@RequestParam String idx){ 26 + public Map<String, Object> stationSpatialData(@RequestParam String idx) {
27 return realMapService.stationSpatialData(idx); 27 return realMapService.stationSpatialData(idx);
28 } 28 }
29 29
30 /** 30 /**
31 * 停车场 31 * 停车场
  32 + *
32 * @return 33 * @return
33 */ 34 */
34 @RequestMapping(value = "/carParkSpatialData") 35 @RequestMapping(value = "/carParkSpatialData")
35 - public Map<String, Object> carParkSpatialData(){ 36 + public Map<String, Object> carParkSpatialData() {
36 return realMapService.carParkSpatialData(); 37 return realMapService.carParkSpatialData();
37 } 38 }
38 39
39 40
40 /** 41 /**
41 - *  
42 - * @Title: findRouteByLine  
43 - * @Description: TODO(获取线路的站点,路段路由)  
44 * @param @param lineCode 42 * @param @param lineCode
45 * @throws 43 * @throws
  44 + * @Title: findRouteByLine
  45 + * @Description: TODO(获取线路的站点,路段路由)
46 */ 46 */
47 - @RequestMapping(value = "/findRouteByLine")  
48 - public Map<String, Object> findRouteByLine(@RequestParam String lineCode){  
49 - return realMapService.findRouteByLine(lineCode);  
50 - } 47 + @RequestMapping(value = "/findRouteByLine")
  48 + public Map<String, Object> findRouteByLine(@RequestParam String lineCode) {
  49 + return realMapService.findRouteByLine(lineCode);
  50 + }
  51 +
  52 +
  53 + /**
  54 + * 获取线路的路段路由 和 站点路由信息 (为前端站间距计算提供数据源)
  55 + * @param lineCode
  56 + * @return
  57 + */
  58 + @RequestMapping(value = "/findRouteAndStationByLine")
  59 + public Map<String, Object> findRouteAndStationByLine(@RequestParam String lineCode){
  60 + return realMapService.findRouteAndStationByLine(lineCode);
  61 + }
51 } 62 }
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -74,8 +74,8 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo, @@ -74,8 +74,8 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
74 @RequestMapping(value = "/destroy", method = RequestMethod.POST) 74 @RequestMapping(value = "/destroy", method = RequestMethod.POST)
75 public Map<String, Object> destroy(@RequestParam String idsStr 75 public Map<String, Object> destroy(@RequestParam String idsStr
76 /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/, 76 /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/,
77 - @RequestParam String remarks/*, @RequestParam String reason, @RequestParam(defaultValue = "0") int spaceNum*/) {  
78 - return scheduleRealInfoService.destroy(idsStr/*, spaceAdjust*/, remarks/*, reason, spaceNum*/); 77 + @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) {
  78 + return scheduleRealInfoService.destroy(idsStr/*, spaceAdjust*/, remarks, adjustExps/*, spaceNum*/);
79 } 79 }
80 80
81 /** 81 /**
src/main/java/com/bsth/controller/schedule/BController.java 0 → 100644
  1 +package com.bsth.controller.schedule;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.service.schedule.BService;
  5 +import com.bsth.service.schedule.ScheduleException;
  6 +import com.google.common.base.Splitter;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.data.domain.PageRequest;
  9 +import org.springframework.data.domain.Sort;
  10 +import org.springframework.web.bind.annotation.*;
  11 +
  12 +import java.io.Serializable;
  13 +import java.util.ArrayList;
  14 +import java.util.HashMap;
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +
  18 +/**
  19 + * 基础控制器。
  20 + */
  21 +public class BController<T, ID extends Serializable> {
  22 + @Autowired
  23 + protected BService<T, ID> bService;
  24 +
  25 + // CRUD 操作
  26 + // Create操作
  27 + @RequestMapping(method = RequestMethod.POST)
  28 + public Map<String, Object> save(@RequestBody T t) {
  29 + T t_saved = bService.save(t);
  30 + Map<String, Object> rtn = new HashMap<>();
  31 + rtn.put("status", ResponseCode.SUCCESS);
  32 + rtn.put("data", t_saved);
  33 + return rtn;
  34 + }
  35 + // Update操作
  36 + @RequestMapping(value="/{id}", method = RequestMethod.POST)
  37 + public Map<String, Object> update(@RequestBody T t) {
  38 + return save(t);
  39 + }
  40 + // Research操作
  41 + @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  42 + public Map<String, Object> findById(@PathVariable("id") ID id) {
  43 + T t = bService.findById(id);
  44 + Map<String, Object> rtn = new HashMap<>();
  45 + rtn.put("status", ResponseCode.SUCCESS);
  46 + rtn.put("data", t);
  47 + return rtn;
  48 + }
  49 + @RequestMapping(value = "/all", method = RequestMethod.GET)
  50 + public Map<String, Object> list(@RequestParam Map<String, Object> param) {
  51 + List<T> tList = bService.list(param);
  52 + Map<String, Object> rtn = new HashMap<>();
  53 + rtn.put("status", ResponseCode.SUCCESS);
  54 + rtn.put("data", tList);
  55 + return rtn;
  56 + }
  57 + @RequestMapping(method = RequestMethod.GET)
  58 + public Map<String, Object> list(
  59 + @RequestParam Map<String, Object> map,
  60 + @RequestParam(defaultValue = "0") int page,
  61 + @RequestParam(defaultValue = "10") int size,
  62 + @RequestParam(defaultValue = "id") String order,
  63 + @RequestParam(defaultValue = "DESC") String direction) {
  64 + // 允许多个字段排序,order可以写单个字段,也可以写多个字段
  65 + // 多个字段格式:{col1},{col2},{col3},....,{coln}
  66 + List<String> order_columns = Splitter.on(",").trimResults().splitToList(order);
  67 + // 多字段排序:DESC,ASC...
  68 + List<String> order_dirs = Splitter.on(",").trimResults().splitToList(direction);
  69 +
  70 + Map<String, Object> rtn = new HashMap<>();
  71 +
  72 + if (order_dirs.size() == 1) { // 所有字段采用一种排序
  73 + rtn.put("status", ResponseCode.SUCCESS);
  74 + if (order_dirs.get(0).equals("ASC")) {
  75 + rtn.put("data", bService.list(map, new PageRequest(page, size, new Sort(Sort.Direction.ASC, order_columns))));
  76 + } else {
  77 + rtn.put("data", bService.list(map, new PageRequest(page, size, new Sort(Sort.Direction.DESC, order_columns))));
  78 + }
  79 + } else if (order_columns.size() == order_dirs.size()) {
  80 + List<Sort.Order> orderList = new ArrayList<>();
  81 + for (int i = 0; i < order_columns.size(); i++) {
  82 + if (null != order_dirs.get(i) && order_dirs.get(i).equals("ASC")) {
  83 + orderList.add(new Sort.Order(Sort.Direction.ASC, order_columns.get(i)));
  84 + } else {
  85 + orderList.add(new Sort.Order(Sort.Direction.DESC, order_columns.get(i)));
  86 + }
  87 + }
  88 + rtn.put("status", ResponseCode.SUCCESS);
  89 + rtn.put("data", bService.list(map, new PageRequest(page, size, new Sort(orderList))));
  90 + } else {
  91 + throw new RuntimeException("多字段排序参数格式问题,排序顺序和字段数不一致");
  92 + }
  93 +
  94 + return rtn;
  95 +
  96 + }
  97 +
  98 + // Delete操作
  99 + @RequestMapping(value = "/{id}", method = RequestMethod.DELETE)
  100 + public Map<String, Object> delete(@PathVariable("id") ID id) {
  101 + Map<String, Object> rtn = new HashMap<>();
  102 + try {
  103 + bService.delete(id);
  104 + rtn.put("status", ResponseCode.SUCCESS);
  105 + } catch (ScheduleException exp) {
  106 + rtn.put("status", ResponseCode.ERROR);
  107 + rtn.put("msg", exp.getMessage());
  108 + }
  109 +
  110 + return rtn;
  111 + }
  112 +
  113 +}
src/main/java/com/bsth/controller/schedule/CarConfigInfoController.java deleted 100644 → 0
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.CarConfigInfo;  
5 -import com.bsth.repository.schedule.CarConfigInfoRepository;  
6 -import com.bsth.service.schedule.utils.DataToolsProperties;  
7 -import org.springframework.beans.factory.annotation.Autowired;  
8 -import org.springframework.boot.context.properties.EnableConfigurationProperties;  
9 -import org.springframework.web.bind.annotation.*;  
10 -  
11 -import java.util.List;  
12 -import java.util.Map;  
13 -  
14 -/**  
15 - * Created by xu on 16/5/9.  
16 - */  
17 -@RestController  
18 -@RequestMapping("cci")  
19 -@EnableConfigurationProperties(DataToolsProperties.class)  
20 -public class CarConfigInfoController extends BaseController<CarConfigInfo, Long> {  
21 - @Autowired  
22 - private DataToolsProperties dataToolsProperties;  
23 - @Autowired  
24 - private CarConfigInfoRepository carConfigInfoRepository;  
25 -  
26 - @Override  
27 - protected String getDataImportKtrClasspath() {  
28 - return dataToolsProperties.getCarsconfigDatainputktr();  
29 - }  
30 -  
31 - @Override  
32 - public CarConfigInfo findById(@PathVariable("id") Long aLong) {  
33 - return carConfigInfoRepository.findOneExtend(aLong);  
34 - }  
35 -  
36 - /**  
37 - * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody  
38 - * @Title: save  
39 - * @Description: TODO(持久化对象)  
40 - * @param @param t  
41 - * @param @return 设定文件  
42 - * @return Map<String,Object> {status: 1(成功),-1(失败)}  
43 - * @throws  
44 - */  
45 - @RequestMapping(method = RequestMethod.POST)  
46 - public Map<String, Object> save(@RequestBody CarConfigInfo t){  
47 - return baseService.save(t);  
48 - }  
49 -  
50 - @RequestMapping(value = "/cars", method = RequestMethod.GET)  
51 - public List<Map<String, Object>> findCarConfigCars() {  
52 - return carConfigInfoRepository.findCarConfigCars();  
53 - }  
54 -  
55 - @RequestMapping(value = "/cars2", method = RequestMethod.GET)  
56 - public List<Map<String, Object>> findCarsFromConfig() {  
57 - return carConfigInfoRepository.findCarsFromConfig();  
58 - }  
59 -}  
src/main/java/com/bsth/controller/schedule/EmployeeConfigInfoController.java deleted 100644 → 0
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.EmployeeConfigInfo;  
5 -import com.bsth.repository.schedule.EmployeeConfigInfoRepository;  
6 -import com.bsth.service.schedule.utils.DataToolsProperties;  
7 -import org.springframework.beans.factory.annotation.Autowired;  
8 -import org.springframework.boot.context.properties.EnableConfigurationProperties;  
9 -import org.springframework.web.bind.annotation.*;  
10 -  
11 -import java.util.List;  
12 -import java.util.Map;  
13 -  
14 -/**  
15 - * Created by xu on 16/5/10.  
16 - */  
17 -@RestController  
18 -@RequestMapping("eci")  
19 -@EnableConfigurationProperties(DataToolsProperties.class)  
20 -public class EmployeeConfigInfoController extends BaseController<EmployeeConfigInfo, Long> {  
21 - @Autowired  
22 - private DataToolsProperties dataToolsProperties;  
23 - @Autowired  
24 - private EmployeeConfigInfoRepository employeeConfigInfoRepository;  
25 -  
26 - @Override  
27 - protected String getDataImportKtrClasspath() {  
28 - return dataToolsProperties.getEmployeesconfigDatainputktr();  
29 - }  
30 -  
31 - @Override  
32 - public EmployeeConfigInfo findById(@PathVariable("id") Long aLong) {  
33 - return employeeConfigInfoRepository.findOneExtend(aLong);  
34 - }  
35 -  
36 - /**  
37 - * 覆写方法,因为form提交的方式参数不全,改用 json形式提交 @RequestBody  
38 - * @Title: save  
39 - * @Description: TODO(持久化对象)  
40 - * @param @param t  
41 - * @param @return 设定文件  
42 - * @return Map<String,Object> {status: 1(成功),-1(失败)}  
43 - * @throws  
44 - */  
45 - @RequestMapping(method = RequestMethod.POST)  
46 - public Map<String, Object> save(@RequestBody EmployeeConfigInfo t){  
47 - return baseService.save(t);  
48 - }  
49 -  
50 - @RequestMapping(value = "/jsy", method = RequestMethod.GET)  
51 - public List<Map<String, Object>> findJsyFromConfig() {  
52 - return employeeConfigInfoRepository.findJsyFromConfig();  
53 - }  
54 -  
55 - @RequestMapping(value = "/spy", method = RequestMethod.GET)  
56 - public List<Map<String, Object>> findSpyFromConfig() {  
57 - return employeeConfigInfoRepository.findSpyFromConfig();  
58 - }  
59 -}  
src/main/java/com/bsth/controller/schedule/GuideboardInfoController.java deleted 100644 → 0
1 -package com.bsth.controller.schedule;  
2 -  
3 -import com.bsth.controller.BaseController;  
4 -import com.bsth.entity.schedule.GuideboardInfo;  
5 -import com.bsth.repository.schedule.GuideboardInfoRepository;  
6 -import com.bsth.service.schedule.utils.DataToolsProperties;  
7 -import org.springframework.beans.factory.annotation.Autowired;  
8 -import org.springframework.boot.context.properties.EnableConfigurationProperties;  
9 -import org.springframework.web.bind.annotation.PathVariable;  
10 -import org.springframework.web.bind.annotation.RequestMapping;  
11 -import org.springframework.web.bind.annotation.RequestMethod;  
12 -import org.springframework.web.bind.annotation.RestController;  
13 -  
14 -import java.util.List;  
15 -import java.util.Map;  
16 -  
17 -/**  
18 - * Created by xu on 16/5/11.  
19 - */  
20 -@RestController  
21 -@RequestMapping("gic")  
22 -@EnableConfigurationProperties(DataToolsProperties.class)  
23 -public class GuideboardInfoController extends BaseController<GuideboardInfo, Long> {  
24 - @Autowired  
25 - private DataToolsProperties dataToolsProperties;  
26 - @Autowired  
27 - private GuideboardInfoRepository guideboardInfoRepository;  
28 -  
29 - @Override  
30 - protected String getDataImportKtrClasspath() {  
31 - return dataToolsProperties.getGuideboardsDatainputktr();  
32 - }  
33 -  
34 - @Override  
35 - public GuideboardInfo findById(@PathVariable("id") Long aLong) {  
36 - return guideboardInfoRepository.findOneExtend(aLong);  
37 - }  
38 -  
39 -  
40 - @RequestMapping(value = "/ttlpnames", method = RequestMethod.GET)  
41 - public List<Map<String, Object>> findLpName(Long ttid) {  
42 - return guideboardInfoRepository.findLpName(ttid);  
43 - }  
44 -}  
src/main/java/com/bsth/controller/schedule/basicinfo/CarsController.java 0 → 100644
  1 +package com.bsth.controller.schedule.basicinfo;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.controller.schedule.BController;
  5 +import com.bsth.entity.Cars;
  6 +import com.bsth.service.schedule.CarsService;
  7 +import com.bsth.service.schedule.ScheduleException;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.web.bind.annotation.RequestMapping;
  10 +import org.springframework.web.bind.annotation.RequestMethod;
  11 +import org.springframework.web.bind.annotation.RequestParam;
  12 +import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import java.util.HashMap;
  15 +import java.util.Map;
  16 +
  17 +/**
  18 + * 车辆基础信息controller
  19 + */
  20 +@RestController(value = "carsController_sc")
  21 +@RequestMapping("cars_sc")
  22 +public class CarsController extends BController<Cars, Integer> {
  23 + @Autowired
  24 + private CarsService carsService;
  25 +
  26 + @RequestMapping(value = "/validate_zbh", method = RequestMethod.GET)
  27 + public Map<String, Object> validate_zbh(@RequestParam Map<String, Object> param) {
  28 + Map<String, Object> rtn = new HashMap<>();
  29 + try {
  30 + // 自编号验证
  31 + Cars cars = new Cars(
  32 + param.get("id_eq"),
  33 + param.get("insideCode_eq"),
  34 + null,
  35 + null,
  36 + null);
  37 + carsService.validate_nbbh(cars);
  38 + rtn.put("status", ResponseCode.SUCCESS);
  39 + } catch (ScheduleException exp) {
  40 + rtn.put("status", ResponseCode.ERROR);
  41 + rtn.put("msg", exp.getMessage());
  42 + }
  43 + return rtn;
  44 + }
  45 +
  46 + @RequestMapping(value = "/validate_clbh", method = RequestMethod.GET)
  47 + public Map<String, Object> validate_clbh(@RequestParam Map<String, Object> param) {
  48 + Map<String, Object> rtn = new HashMap<>();
  49 + try {
  50 + // 车辆编号验证
  51 + Cars cars = new Cars(
  52 + param.get("id_eq"),
  53 + null,
  54 + param.get("carCode_eq"),
  55 + null,
  56 + null);
  57 + carsService.validate_clbh(cars);
  58 + rtn.put("status", ResponseCode.SUCCESS);
  59 + } catch (ScheduleException exp) {
  60 + rtn.put("status", ResponseCode.ERROR);
  61 + rtn.put("msg", exp.getMessage());
  62 + }
  63 + return rtn;
  64 + }
  65 +
  66 + @RequestMapping(value = "/validate_cph", method = RequestMethod.GET)
  67 + public Map<String, Object> validate_cph(@RequestParam Map<String, Object> param) {
  68 + Map<String, Object> rtn = new HashMap<>();
  69 + try {
  70 + // 车牌号验证
  71 + Cars cars = new Cars(
  72 + param.get("id_eq"),
  73 + null,
  74 + null,
  75 + param.get("carPlate_eq"),
  76 + null);
  77 + carsService.validate_cph(cars);
  78 + rtn.put("status", ResponseCode.SUCCESS);
  79 + } catch (ScheduleException exp) {
  80 + rtn.put("status", ResponseCode.ERROR);
  81 + rtn.put("msg", exp.getMessage());
  82 + }
  83 + return rtn;
  84 + }
  85 +
  86 + @RequestMapping(value = "/validate_sbbh", method = RequestMethod.GET)
  87 + public Map<String, Object> validate_sbbh(@RequestParam Map<String, Object> param) {
  88 + Map<String, Object> rtn = new HashMap<>();
  89 + try {
  90 + // 设备编号验证
  91 + Cars cars = new Cars(
  92 + param.get("id_eq"),
  93 + null,
  94 + null,
  95 + null,
  96 + param.get("equipmentCode_eq")
  97 + );
  98 + carsService.validate_sbbh(cars);
  99 + rtn.put("status", ResponseCode.SUCCESS);
  100 + } catch (ScheduleException exp) {
  101 + rtn.put("status", ResponseCode.ERROR);
  102 + rtn.put("msg", exp.getMessage());
  103 + }
  104 + return rtn;
  105 + }
  106 +}
src/main/java/com/bsth/controller/schedule/core/CarConfigInfoController.java 0 → 100644
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.controller.schedule.BController;
  5 +import com.bsth.entity.schedule.CarConfigInfo;
  6 +import com.bsth.repository.schedule.CarConfigInfoRepository;
  7 +import com.bsth.service.schedule.CarConfigInfoService;
  8 +import com.bsth.service.schedule.ScheduleException;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
  12 +import org.springframework.web.bind.annotation.RequestParam;
  13 +import org.springframework.web.bind.annotation.RestController;
  14 +
  15 +import java.util.HashMap;
  16 +import java.util.List;
  17 +import java.util.Map;
  18 +
  19 +/**
  20 + * Created by xu on 16/5/9.
  21 + */
  22 +@RestController
  23 +@RequestMapping("cci")
  24 +public class CarConfigInfoController extends BController<CarConfigInfo, Long> {
  25 + @Autowired
  26 + private CarConfigInfoRepository carConfigInfoRepository;
  27 + @Autowired
  28 + private CarConfigInfoService carConfigInfoService;
  29 +
  30 +
  31 + @RequestMapping(value = "/cars", method = RequestMethod.GET)
  32 + public List<Map<String, Object>> findCarConfigCars() {
  33 + return carConfigInfoRepository.findCarConfigCars();
  34 + }
  35 +
  36 + @RequestMapping(value = "/cars2", method = RequestMethod.GET)
  37 + public List<Map<String, Object>> findCarsFromConfig() {
  38 + return carConfigInfoRepository.findCarsFromConfig();
  39 + }
  40 +
  41 + @RequestMapping(value = "/validate_cars", method = RequestMethod.GET)
  42 + public Map<String, Object> validate_cars(@RequestParam Map<String, Object> param) {
  43 + Map<String, Object> rtn = new HashMap<>();
  44 + try {
  45 + // 车辆重复配置验证
  46 + CarConfigInfo carConfigInfo = new CarConfigInfo(
  47 + param.get("id_eq"),
  48 + param.get("xl.id_eq"),
  49 + param.get("xl.name_eq"),
  50 + param.get("cl.id_eq")
  51 + );
  52 + carConfigInfoService.validate_cars(carConfigInfo);
  53 + rtn.put("status", ResponseCode.SUCCESS);
  54 + } catch (ScheduleException exp) {
  55 + rtn.put("status", ResponseCode.ERROR);
  56 + rtn.put("msg", exp.getMessage());
  57 + }
  58 +
  59 + return rtn;
  60 + }
  61 +}
src/main/java/com/bsth/controller/schedule/core/EmployeeConfigInfoController.java 0 → 100644
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.controller.schedule.BController;
  5 +import com.bsth.entity.schedule.EmployeeConfigInfo;
  6 +import com.bsth.repository.schedule.EmployeeConfigInfoRepository;
  7 +import com.bsth.service.schedule.EmployeeConfigInfoService;
  8 +import com.bsth.service.schedule.ScheduleException;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestMethod;
  12 +import org.springframework.web.bind.annotation.RequestParam;
  13 +import org.springframework.web.bind.annotation.RestController;
  14 +
  15 +import java.util.HashMap;
  16 +import java.util.List;
  17 +import java.util.Map;
  18 +
  19 +/**
  20 + * Created by xu on 16/5/10.
  21 + */
  22 +@RestController
  23 +@RequestMapping("eci")
  24 +public class EmployeeConfigInfoController extends BController<EmployeeConfigInfo, Long> {
  25 + @Autowired
  26 + private EmployeeConfigInfoRepository employeeConfigInfoRepository;
  27 + @Autowired
  28 + private EmployeeConfigInfoService employeeConfigInfoService;
  29 +
  30 + @RequestMapping(value = "/jsy", method = RequestMethod.GET)
  31 + public List<Map<String, Object>> findJsyFromConfig() {
  32 + return employeeConfigInfoRepository.findJsyFromConfig();
  33 + }
  34 +
  35 + @RequestMapping(value = "/spy", method = RequestMethod.GET)
  36 + public List<Map<String, Object>> findSpyFromConfig() {
  37 + return employeeConfigInfoRepository.findSpyFromConfig();
  38 + }
  39 +
  40 +
  41 +
  42 + @RequestMapping(value = "/validate_jsy", method = RequestMethod.GET)
  43 + public Map<String, Object> validate_jsy(@RequestParam Map<String, Object> param) {
  44 + Map<String, Object> rtn = new HashMap<>();
  45 + try {
  46 + EmployeeConfigInfo employeeConfigInfo = new EmployeeConfigInfo(
  47 + param.get("id_eq"),
  48 + param.get("xl.id_eq"),
  49 + param.get("xl.name_eq"),
  50 + param.get("jsy.id_eq"),
  51 + null
  52 + );
  53 + employeeConfigInfoService.validate_jsy(employeeConfigInfo);
  54 + rtn.put("status", ResponseCode.SUCCESS);
  55 + } catch (ScheduleException exp) {
  56 + rtn.put("status", ResponseCode.ERROR);
  57 + rtn.put("msg", exp.getMessage());
  58 + }
  59 +
  60 + return rtn;
  61 + }
  62 +
  63 + @RequestMapping(value = "/validate_spy", method = RequestMethod.GET)
  64 + public Map<String, Object> validate_spy(@RequestParam Map<String, Object> param) {
  65 + Map<String, Object> rtn = new HashMap<>();
  66 + try {
  67 + EmployeeConfigInfo employeeConfigInfo = new EmployeeConfigInfo(
  68 + param.get("id_eq"),
  69 + param.get("xl.id_eq"),
  70 + param.get("xl.name_eq"),
  71 + null,
  72 + param.get("spy.id_eq")
  73 + );
  74 + employeeConfigInfoService.validate_spy(employeeConfigInfo);
  75 + rtn.put("status", ResponseCode.SUCCESS);
  76 + } catch (ScheduleException exp) {
  77 + rtn.put("status", ResponseCode.ERROR);
  78 + rtn.put("msg", exp.getMessage());
  79 + }
  80 + return rtn;
  81 + }
  82 +}
src/main/java/com/bsth/controller/schedule/core/GuideboardInfoController.java 0 → 100644
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.controller.schedule.BController;
  5 +import com.bsth.entity.schedule.GuideboardInfo;
  6 +import com.bsth.repository.schedule.GuideboardInfoRepository;
  7 +import com.bsth.service.schedule.GuideboardInfoService;
  8 +import com.bsth.service.schedule.ScheduleException;
  9 +import com.bsth.service.schedule.utils.DataToolsProperties;
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.boot.context.properties.EnableConfigurationProperties;
  12 +import org.springframework.web.bind.annotation.RequestMapping;
  13 +import org.springframework.web.bind.annotation.RequestMethod;
  14 +import org.springframework.web.bind.annotation.RequestParam;
  15 +import org.springframework.web.bind.annotation.RestController;
  16 +
  17 +import java.util.HashMap;
  18 +import java.util.List;
  19 +import java.util.Map;
  20 +
  21 +/**
  22 + * 路牌管理控制器。
  23 + */
  24 +@RestController
  25 +@RequestMapping("gic")
  26 +@EnableConfigurationProperties(DataToolsProperties.class)
  27 +public class GuideboardInfoController extends BController<GuideboardInfo, Long> {
  28 + @Autowired
  29 + private GuideboardInfoService guideboardInfoService;
  30 +// @Autowired
  31 +// private DataToolsProperties dataToolsProperties;
  32 + @Autowired
  33 + private GuideboardInfoRepository guideboardInfoRepository;
  34 +//
  35 +// @Override
  36 +// protected String getDataImportKtrClasspath() {
  37 +// return dataToolsProperties.getGuideboardsDatainputktr();
  38 +// }
  39 +//
  40 +// @Override
  41 +// public GuideboardInfo findById(@PathVariable("id") Long aLong) {
  42 +// return guideboardInfoRepository.findOneExtend(aLong);
  43 +// }
  44 +//
  45 +//
  46 + @RequestMapping(value = "/ttlpnames", method = RequestMethod.GET)
  47 + public List<Map<String, Object>> findLpName(Long ttid) {
  48 + return guideboardInfoRepository.findLpName(ttid);
  49 + }
  50 +
  51 + @RequestMapping(value = "/validate1", method = RequestMethod.GET)
  52 + public Map<String, Object> validate1(@RequestParam Map<String, Object> param) {
  53 + Map<String, Object> rtn = new HashMap<>();
  54 + try {
  55 + // 路牌编号验证
  56 + GuideboardInfo guideboardInfo = new GuideboardInfo(
  57 + param.get("id_eq"),
  58 + param.get("xl.id_eq"),
  59 + param.get("lpNo_eq"),
  60 + null
  61 + );
  62 + guideboardInfoService.validate(guideboardInfo);
  63 + rtn.put("status", ResponseCode.SUCCESS);
  64 + } catch (ScheduleException exp) {
  65 + rtn.put("status", ResponseCode.ERROR);
  66 + rtn.put("msg", exp.getMessage());
  67 + }
  68 + return rtn;
  69 + }
  70 +
  71 + @RequestMapping(value = "/validate2", method = RequestMethod.GET)
  72 + public Map<String, Object> validate2(@RequestParam Map<String, Object> param) {
  73 + Map<String, Object> rtn = new HashMap<>();
  74 + try {
  75 + // 路牌名称验证
  76 + GuideboardInfo guideboardInfo = new GuideboardInfo(
  77 + param.get("id_eq"),
  78 + param.get("xl.id_eq"),
  79 + null,
  80 + param.get("lpName_eq")
  81 + );
  82 + guideboardInfoService.validate(guideboardInfo);
  83 + rtn.put("status", ResponseCode.SUCCESS);
  84 + } catch (ScheduleException exp) {
  85 + rtn.put("status", ResponseCode.ERROR);
  86 + rtn.put("msg", exp.getMessage());
  87 + }
  88 + return rtn;
  89 + }
  90 +}
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -117,7 +117,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -117,7 +117,7 @@ public class DayOfSchedule implements CommandLineRunner {
117 @Override 117 @Override
118 public void run(String... arg0) throws Exception { 118 public void run(String... arg0) throws Exception {
119 //翻班线程 119 //翻班线程
120 -// Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 120 + Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
121 //入库 121 //入库
122 // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS); 122 // Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
123 //首班出场指令补发器 123 //首班出场指令补发器
src/main/java/com/bsth/entity/Cars.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
3 import com.bsth.entity.sys.SysUser; 3 import com.bsth.entity.sys.SysUser;
  4 +import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 5
5 import javax.persistence.*; 6 import javax.persistence.*;
6 import java.io.Serializable; 7 import java.io.Serializable;
@@ -22,6 +23,7 @@ import java.util.Date; @@ -22,6 +23,7 @@ import java.util.Date;
22 23
23 @Entity 24 @Entity
24 @Table(name = "bsth_c_cars") 25 @Table(name = "bsth_c_cars")
  26 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
25 public class Cars implements Serializable { 27 public class Cars implements Serializable {
26 28
27 /** 主键Id */ 29 /** 主键Id */
@@ -30,7 +32,7 @@ public class Cars implements Serializable { @@ -30,7 +32,7 @@ public class Cars implements Serializable {
30 private Integer id; 32 private Integer id;
31 33
32 /** 自编号/内部编号 */ 34 /** 自编号/内部编号 */
33 - @Column(nullable = false, length = 8, unique = true) 35 + @Column(nullable = false, length = 20, unique = true)
34 private String insideCode; 36 private String insideCode;
35 37
36 // 公司、分公司暂时不用关联实体 38 // 公司、分公司暂时不用关联实体
@@ -150,6 +152,26 @@ public class Cars implements Serializable { @@ -150,6 +152,26 @@ public class Cars implements Serializable {
150 /** 修改日期 */ 152 /** 修改日期 */
151 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 153 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
152 private Date updateDate; 154 private Date updateDate;
  155 +
  156 + public Cars() {}
  157 +
  158 + public Cars(Object id, Object nbbh, Object clbh, Object cph, Object sbbh) {
  159 + if (id != null) {
  160 + this.id = Integer.valueOf(id.toString());
  161 + }
  162 + if (nbbh != null) {
  163 + this.insideCode = nbbh.toString();
  164 + }
  165 + if (clbh != null) {
  166 + this.carCode = clbh.toString();
  167 + }
  168 + if (cph != null) {
  169 + this.carPlate = cph.toString();
  170 + }
  171 + if (sbbh != null) {
  172 + this.equipmentCode = sbbh.toString();
  173 + }
  174 + }
153 175
154 public String getServiceNo() { 176 public String getServiceNo() {
155 return serviceNo; 177 return serviceNo;
src/main/java/com/bsth/entity/Line.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
  3 +import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
3 import org.springframework.format.annotation.DateTimeFormat; 4 import org.springframework.format.annotation.DateTimeFormat;
4 5
5 import javax.persistence.*; 6 import javax.persistence.*;
@@ -23,6 +24,7 @@ import java.util.Date; @@ -23,6 +24,7 @@ import java.util.Date;
23 24
24 @Entity 25 @Entity
25 @Table(name = "bsth_c_line") 26 @Table(name = "bsth_c_line")
  27 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
26 public class Line implements Serializable { 28 public class Line implements Serializable {
27 29
28 @Id 30 @Id
src/main/java/com/bsth/entity/Personnel.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
3 import com.bsth.entity.sys.SysUser; 3 import com.bsth.entity.sys.SysUser;
  4 +import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
4 5
5 import javax.persistence.*; 6 import javax.persistence.*;
6 import java.util.Date; 7 import java.util.Date;
@@ -21,6 +22,7 @@ import java.util.Date; @@ -21,6 +22,7 @@ import java.util.Date;
21 22
22 @Entity 23 @Entity
23 @Table(name = "bsth_c_personnel") 24 @Table(name = "bsth_c_personnel")
  25 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
24 public class Personnel { 26 public class Personnel {
25 27
26 /** 主键Id */ 28 /** 主键Id */
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
@@ -128,6 +128,8 @@ public class ScheduleRealInfo { @@ -128,6 +128,8 @@ public class ScheduleRealInfo {
128 128
129 /**班次状态 0 未执行 1 正在执行 2 已执行 -1 已烂班 */ 129 /**班次状态 0 未执行 1 正在执行 2 已执行 -1 已烂班 */
130 private int status; 130 private int status;
  131 +
  132 + private String adjustExps;
131 133
132 /** 是否是临加班次 */ 134 /** 是否是临加班次 */
133 private boolean sflj; 135 private boolean sflj;
@@ -817,4 +819,12 @@ public class ScheduleRealInfo { @@ -817,4 +819,12 @@ public class ScheduleRealInfo {
817 public void setLate(boolean late) { 819 public void setLate(boolean late) {
818 this.late = late; 820 this.late = late;
819 } 821 }
  822 +
  823 + public String getAdjustExps() {
  824 + return adjustExps;
  825 + }
  826 +
  827 + public void setAdjustExps(String adjustExps) {
  828 + this.adjustExps = adjustExps;
  829 + }
820 } 830 }
src/main/java/com/bsth/entity/schedule/CarConfigInfo.java
@@ -3,6 +3,7 @@ package com.bsth.entity.schedule; @@ -3,6 +3,7 @@ package com.bsth.entity.schedule;
3 import com.bsth.entity.Cars; 3 import com.bsth.entity.Cars;
4 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
5 import com.bsth.entity.sys.SysUser; 5 import com.bsth.entity.sys.SysUser;
  6 +import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
6 7
7 import javax.persistence.*; 8 import javax.persistence.*;
8 import java.io.Serializable; 9 import java.io.Serializable;
@@ -19,6 +20,7 @@ import java.util.Date; @@ -19,6 +20,7 @@ import java.util.Date;
19 @NamedAttributeNode("cl") 20 @NamedAttributeNode("cl")
20 }) 21 })
21 }) 22 })
  23 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
22 public class CarConfigInfo implements Serializable { 24 public class CarConfigInfo implements Serializable {
23 25
24 /** 主健Id */ 26 /** 主健Id */
@@ -71,6 +73,25 @@ public class CarConfigInfo implements Serializable { @@ -71,6 +73,25 @@ public class CarConfigInfo implements Serializable {
71 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 73 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
72 private Date updateDate; 74 private Date updateDate;
73 75
  76 + public CarConfigInfo() {}
  77 + public CarConfigInfo(Object id, Object xlid, Object xlname, Object clid) {
  78 + if (id != null) {
  79 + this.id = Long.parseLong(id.toString());
  80 + }
  81 + if (xlid != null && xlname != null) {
  82 + Line line = new Line();
  83 + line.setId(Integer.valueOf(xlid.toString()));
  84 + line.setName(xlname.toString());
  85 + this.xl = line;
  86 + }
  87 + if (clid != null) {
  88 + Cars cars = new Cars();
  89 + cars.setId(Integer.valueOf(clid.toString()));
  90 + this.cl = cars;
  91 + }
  92 +
  93 + }
  94 +
74 public Long getId() { 95 public Long getId() {
75 return id; 96 return id;
76 } 97 }
src/main/java/com/bsth/entity/schedule/EmployeeConfigInfo.java
@@ -4,6 +4,7 @@ import com.bsth.entity.Cars; @@ -4,6 +4,7 @@ import com.bsth.entity.Cars;
4 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
5 import com.bsth.entity.Personnel; 5 import com.bsth.entity.Personnel;
6 import com.bsth.entity.sys.SysUser; 6 import com.bsth.entity.sys.SysUser;
  7 +import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
7 import org.hibernate.annotations.Formula; 8 import org.hibernate.annotations.Formula;
8 9
9 import javax.persistence.*; 10 import javax.persistence.*;
@@ -22,6 +23,7 @@ import java.util.Date; @@ -22,6 +23,7 @@ import java.util.Date;
22 @NamedAttributeNode("xl") 23 @NamedAttributeNode("xl")
23 }) 24 })
24 }) 25 })
  26 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
25 public class EmployeeConfigInfo { 27 public class EmployeeConfigInfo {
26 28
27 /** 主键Id */ 29 /** 主键Id */
@@ -67,6 +69,30 @@ public class EmployeeConfigInfo { @@ -67,6 +69,30 @@ public class EmployeeConfigInfo {
67 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP") 69 @Column(name = "update_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
68 private Date updateDate; 70 private Date updateDate;
69 71
  72 + public EmployeeConfigInfo() {}
  73 +
  74 + public EmployeeConfigInfo(Object id, Object xlid, Object xlname, Object jsyid, Object spyid) {
  75 + if (id != null) {
  76 + this.id = Long.parseLong(id.toString());
  77 + }
  78 + if (xlid != null && xlname != null) {
  79 + Line line = new Line();
  80 + line.setId(Integer.valueOf(xlid.toString()));
  81 + line.setName(xlname.toString());
  82 + this.xl = line;
  83 + }
  84 + if (jsyid != null) {
  85 + Personnel personnel = new Personnel();
  86 + personnel.setId(Integer.valueOf(jsyid.toString()));
  87 + this.jsy = personnel;
  88 + }
  89 + if (spyid != null) {
  90 + Personnel personnel = new Personnel();
  91 + personnel.setId(Integer.valueOf(spyid.toString()));
  92 + this.spy = personnel;
  93 + }
  94 + }
  95 +
70 public Long getId() { 96 public Long getId() {
71 return id; 97 return id;
72 } 98 }
src/main/java/com/bsth/entity/schedule/GuideboardInfo.java
@@ -2,9 +2,9 @@ package com.bsth.entity.schedule; @@ -2,9 +2,9 @@ package com.bsth.entity.schedule;
2 2
3 import com.bsth.entity.Line; 3 import com.bsth.entity.Line;
4 import com.bsth.entity.sys.SysUser; 4 import com.bsth.entity.sys.SysUser;
  5 +import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
5 6
6 import javax.persistence.*; 7 import javax.persistence.*;
7 -import javax.persistence.Table;  
8 import java.util.Date; 8 import java.util.Date;
9 9
10 /** 10 /**
@@ -17,6 +17,7 @@ import java.util.Date; @@ -17,6 +17,7 @@ import java.util.Date;
17 @NamedAttributeNode("xl") 17 @NamedAttributeNode("xl")
18 }) 18 })
19 }) 19 })
  20 +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"})
20 public class GuideboardInfo { 21 public class GuideboardInfo {
21 22
22 /** 主键Id */ 23 /** 主键Id */
@@ -38,6 +39,10 @@ public class GuideboardInfo { @@ -38,6 +39,10 @@ public class GuideboardInfo {
38 @Column(nullable = false) 39 @Column(nullable = false)
39 private String lpType; 40 private String lpType;
40 41
  42 + /** 是否删除(标记) */
  43 + @Column(nullable = false)
  44 + private Boolean isCancel = false;
  45 +
41 /** 创建人 */ 46 /** 创建人 */
42 @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST) 47 @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.PERSIST)
43 private SysUser createBy; 48 private SysUser createBy;
@@ -53,6 +58,34 @@ public class GuideboardInfo { @@ -53,6 +58,34 @@ public class GuideboardInfo {
53 private Date updateDate; 58 private Date updateDate;
54 59
55 60
  61 + public GuideboardInfo() {}
  62 +
  63 + public GuideboardInfo(Object id, Object xlid, Object lpNo, Object lpName) {
  64 + if (id != null) {
  65 + this.id = Long.parseLong(id.toString());
  66 + }
  67 +
  68 + Integer xlid_ = xlid == null ? null : Integer.valueOf(xlid.toString());
  69 + Integer lpNo_ = lpNo == null ? null : Integer.valueOf(lpNo.toString());
  70 + String lpName_ = lpName == null ? null : String.valueOf(lpName);
  71 +
  72 + if (xlid_ != null) {
  73 + Line line = new Line();
  74 + line.setId(xlid_);
  75 + this.xl = line;
  76 + }
  77 +
  78 + this.lpNo = lpNo_;
  79 + this.lpName = lpName_;
  80 + }
  81 +
  82 + public GuideboardInfo(Object id, Integer xlid, Integer lpNo) {
  83 + this(id, xlid, lpNo, null);
  84 + }
  85 + public GuideboardInfo(Object id, Integer xlid, String lpName) {
  86 + this(id, xlid, null, lpName);
  87 + }
  88 +
56 public Long getId() { 89 public Long getId() {
57 return id; 90 return id;
58 } 91 }
@@ -124,4 +157,12 @@ public class GuideboardInfo { @@ -124,4 +157,12 @@ public class GuideboardInfo {
124 public void setUpdateDate(Date updateDate) { 157 public void setUpdateDate(Date updateDate) {
125 this.updateDate = updateDate; 158 this.updateDate = updateDate;
126 } 159 }
  160 +
  161 + public Boolean getIsCancel() {
  162 + return isCancel;
  163 + }
  164 +
  165 + public void setIsCancel(Boolean isCancel) {
  166 + this.isCancel = isCancel;
  167 + }
127 } 168 }
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
@@ -163,8 +163,10 @@ public class SchedulePlanInfo { @@ -163,8 +163,10 @@ public class SchedulePlanInfo {
163 163
164 // TODO:关联的公司名称 164 // TODO:关联的公司名称
165 // TODO:关联的公司编码 165 // TODO:关联的公司编码
  166 + this.gsBm = xl.getCompany();
166 // TODO:关联的分公司名称 167 // TODO:关联的分公司名称
167 // TODO:关联的分公司编码 168 // TODO:关联的分公司编码
  169 + this.fgsBm = xl.getBrancheCompany();
168 // TODO:关联的出场顺序号 170 // TODO:关联的出场顺序号
169 171
170 // 关联的排班计划 172 // 关联的排班计划
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -85,6 +85,9 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI @@ -85,6 +85,9 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
85 @Query(value="select s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.scheduleDate = str_to_date(?3,'%Y-%m-%d') order by bcs") 85 @Query(value="select s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.scheduleDate = str_to_date(?3,'%Y-%m-%d') order by bcs")
86 List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date); 86 List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date);
87 87
  88 + @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between str_to_date(?3,'%Y-%m-%d') and str_to_date(?4,'%Y-%m-%d') order by bcs")
  89 + List<ScheduleRealInfo> queryListWaybill4(String jName,String clZbh,String date,String enddate);
  90 +
88 @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") 91 @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2")
89 List<ScheduleRealInfo> scheduleDaily(String line,String date); 92 List<ScheduleRealInfo> scheduleDaily(String line,String date);
90 93
src/main/java/com/bsth/service/forms/FormsService.java
@@ -30,7 +30,7 @@ public interface FormsService { @@ -30,7 +30,7 @@ public interface FormsService {
30 30
31 public List<Singledata> singledata(Map<String, Object> map); 31 public List<Singledata> singledata(Map<String, Object> map);
32 32
33 - public List<Vehicleloading> vehicleloading(String line,String data); 33 + public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line,String data);
34 34
35 public List<Operationservice> operationservice(Map<String, Object> map); 35 public List<Operationservice> operationservice(Map<String, Object> map);
36 36
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
1 package com.bsth.service.forms.impl; 1 package com.bsth.service.forms.impl;
2 2
3 -import java.math.BigDecimal;  
4 -import java.math.MathContext;  
5 -import java.math.RoundingMode;  
6 import java.sql.ResultSet; 3 import java.sql.ResultSet;
7 import java.sql.SQLException; 4 import java.sql.SQLException;
8 import java.text.NumberFormat; 5 import java.text.NumberFormat;
9 import java.text.ParseException; 6 import java.text.ParseException;
10 import java.text.SimpleDateFormat; 7 import java.text.SimpleDateFormat;
11 -import java.util.ArrayList;  
12 import java.util.Date; 8 import java.util.Date;
13 import java.util.HashMap; 9 import java.util.HashMap;
14 import java.util.List; 10 import java.util.List;
@@ -32,8 +28,6 @@ import com.bsth.entity.mcy_forms.Changetochange; @@ -32,8 +28,6 @@ import com.bsth.entity.mcy_forms.Changetochange;
32 import com.bsth.entity.mcy_forms.Executionrate; 28 import com.bsth.entity.mcy_forms.Executionrate;
33 import com.bsth.service.forms.FormsService; 29 import com.bsth.service.forms.FormsService;
34 import com.bsth.service.realcontrol.ScheduleRealInfoService; 30 import com.bsth.service.realcontrol.ScheduleRealInfoService;
35 -import com.bsth.util.ReportRelatedUtils;  
36 -import com.bsth.util.ReportUtils;  
37 31
38 @Service 32 @Service
39 public class FormsServiceImpl implements FormsService { 33 public class FormsServiceImpl implements FormsService {
@@ -47,14 +41,17 @@ public class FormsServiceImpl implements FormsService { @@ -47,14 +41,17 @@ public class FormsServiceImpl implements FormsService {
47 // 行车路单日报表 41 // 行车路单日报表
48 @Override 42 @Override
49 public List<Waybillday> waybillday(Map<String, Object> map) { 43 public List<Waybillday> waybillday(Map<String, Object> map) {
50 - List list1 = new ArrayList<>();//  
51 - String sql ="select x.schedule_date,x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name "  
52 - + "from bsth_c_s_sp_info_real x INNER join "  
53 - + "( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from" 44 + String sql ="select x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name,x.schedule_date,x.gs_bm,x.gs_name,x.fgs_bm,x.fgs_name "
  45 + + " from bsth_c_s_sp_info_real x INNER join "
  46 + + " ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,c.personnel_name from"
54 + " bsth_c_ylb y LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " 47 + " bsth_c_ylb y LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY "
55 - + "where to_days(y.RQ)=to_days('"+map.get("date").toString() + "') and y.XLBM= '"+ map.get("line").toString()+"' GROUP BY y.NBBM) "  
56 - + "z on x.cl_zbh=z.nbbm where to_days( x.schedule_date)=to_days('"+map.get("date").toString()+"') "  
57 - + "and x.xl_bm='"+map.get("line").toString()+"' GROUP BY x.cl_zbh,j_gh"; 48 + + " where to_days(y.RQ)=to_days('"+map.get("date").toString() + "') and y.XLBM= '"+ map.get("line").toString()+"' GROUP BY y.NBBM) "
  49 + + " z on x.cl_zbh=z.nbbm where to_days( x.schedule_date)=to_days('"+map.get("date").toString()+"') "
  50 + + " and x.xl_bm='"+map.get("line").toString()+"'"
  51 + /*+ " and x.gs_bm='"+map.get("gsdmWaybillday").toString()+"'"
  52 + + " and x.fgs_bm='"+map.get("fgsdmWaybillday").toString()+"'"*/
  53 + + " GROUP BY x.j_gh,x.cl_zbh,z.JZL,z.YH,z.personnel_name,x.schedule_date,x.gs_bm,x.gs_name,x.fgs_bm,x.fgs_name";
  54 + //x.cl_zbh,j_gh
58 List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { 55 List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() {
59 @Override 56 @Override
60 public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { 57 public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -83,12 +80,18 @@ public class FormsServiceImpl implements FormsService { @@ -83,12 +80,18 @@ public class FormsServiceImpl implements FormsService {
83 // 线路客流量报表 80 // 线路客流量报表
84 @Override 81 @Override
85 public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { 82 public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) {
86 - String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s "  
87 - + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " 83 + String sql = " SELECT s.station_name,l.name,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name"
  84 + + " from bsth_c_stationroute s "
  85 + + " LEFT JOIN bsth_c_line l on s.line_code=l.line_code "
  86 + + " LEFT JOIN bsth_c_s_sp_info_real r on r.xl_bm=l.line_code"
88 + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') " 87 + " where to_days(l.create_date)=to_days('"+map.get("date").toString() + "') "
89 - + " and l.line_code=" + map.get("line").toString()  
90 - + " GROUP BY s.station_name "; 88 + + " and l.line_code=" + map.get("line").toString()
  89 + + " AND r.gs_bm is not null"
  90 + /*+ " and r.gs_bm='"+map.get("gsdmLine").toString()+"'"
  91 + + " and r.fgs_bm='"+map.get("fgsdmLine").toString()+"'"*/
  92 + + " GROUP BY s.station_name,l.name,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name ";
91 93
  94 + //s.station_name
92 List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { 95 List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() {
93 96
94 @Override 97 @Override
@@ -108,13 +111,17 @@ public class FormsServiceImpl implements FormsService { @@ -108,13 +111,17 @@ public class FormsServiceImpl implements FormsService {
108 111
109 @Override 112 @Override
110 public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) { 113 public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) {
111 - List list1 = new ArrayList<>();//  
112 - String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " + " from bsth_c_s_sp_info_real r "  
113 - + " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp "  
114 - + " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " 114 + String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "
  115 + + " from bsth_c_s_sp_info_real r "
115 + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') " 116 + " where to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') "
116 - + " and to_days('" + map.get("endDate").toString() + "') " + " and r.xl_bm='"  
117 - + map.get("line").toString() + "' " + " GROUP BY r.j_name" + " ORDER BY r.j_name"; 117 + + " and to_days('" + map.get("endDate").toString() + "') "
  118 + + " and r.xl_bm='"+ map.get("line").toString() + "'"
  119 + + " AND r.gs_bm is not null"
  120 + /* + " and r.gs_bm='"+map.get("gsdmManth").toString()+"'"
  121 + + " and r.fgs_bm='"+map.get("fgsdmManth").toString()+"'"*/
  122 + + " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name"
  123 + + " ORDER BY r.j_name";
  124 + //r.j_name
118 startDate = map.get("startDate").toString(); 125 startDate = map.get("startDate").toString();
119 endDate = map.get("endDate").toString(); 126 endDate = map.get("endDate").toString();
120 List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() { 127 List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() {
@@ -123,11 +130,12 @@ public class FormsServiceImpl implements FormsService { @@ -123,11 +130,12 @@ public class FormsServiceImpl implements FormsService {
123 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { 130 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {
124 Shiftuehiclemanth shif = new Shiftuehiclemanth(); 131 Shiftuehiclemanth shif = new Shiftuehiclemanth();
125 shif.setjName(arg0.getString("j_name")); 132 shif.setjName(arg0.getString("j_name"));
126 - 133 +
127 Map<String, Object> maps = new HashMap<>(); 134 Map<String, Object> maps = new HashMap<>();
128 135
129 maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate, 136 maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate,
130 endDate); 137 endDate);
  138 +
131 shif.setJhlc(maps.get("jhlc").toString()); 139 shif.setJhlc(maps.get("jhlc").toString());
132 shif.setEmptMileage(maps.get("ksgl").toString()); 140 shif.setEmptMileage(maps.get("ksgl").toString());
133 shif.setRemMileage(maps.get("remMileage").toString()); 141 shif.setRemMileage(maps.get("remMileage").toString());
@@ -148,9 +156,15 @@ public class FormsServiceImpl implements FormsService { @@ -148,9 +156,15 @@ public class FormsServiceImpl implements FormsService {
148 // 班次车辆人员日统计 156 // 班次车辆人员日统计
149 @Override 157 @Override
150 public List<Shifday> shifday(Map<String, Object> map) { 158 public List<Shifday> shifday(Map<String, Object> map) {
151 - String sql = " select r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.schedule_date,r.cl_zbh,r.j_gh "  
152 - + " FROM bsth_c_s_sp_info_real r " + " where to_days(r.schedule_date)=to_days('"  
153 - + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString() + " GROUP BY r.j_name "; 159 + String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,"
  160 + + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "
  161 + + " FROM bsth_c_s_sp_info_real r "
  162 + + " where to_days(r.schedule_date)=to_days('"
  163 + + map.get("date").toString() + "') and r.xl_bm=" + map.get("line").toString()
  164 + /*+ " and r.gs_bm='"+map.get("gsdmShif").toString()+"'"
  165 + + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'"*/
  166 + + " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "
  167 + + " ORDER BY r.lp_name asc";
154 168
155 List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { 169 List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() {
156 170
@@ -166,14 +180,14 @@ public class FormsServiceImpl implements FormsService { @@ -166,14 +180,14 @@ public class FormsServiceImpl implements FormsService {
166 map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), 180 map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"),
167 arg0.getString("schedule_date")); 181 arg0.getString("schedule_date"));
168 shifday.setJhlc(map.get("jhlc").toString());// 计划里程 182 shifday.setJhlc(map.get("jhlc").toString());// 计划里程
169 - // shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程 183 + //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程
170 shifday.setYygl(map.get("yygl").toString());// 营运里程 184 shifday.setYygl(map.get("yygl").toString());// 营运里程
171 shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程 185 shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程
172 shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程 186 shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程
173 shifday.setAddMileage(map.get("addMileage").toString());// 增加里程 187 shifday.setAddMileage(map.get("addMileage").toString());// 增加里程
174 shifday.setTotalm(map.get("realMileage").toString());// 总里程 188 shifday.setTotalm(map.get("realMileage").toString());// 总里程
175 shifday.setJhbc(map.get("jhbc").toString());// 计划班次 189 shifday.setJhbc(map.get("jhbc").toString());// 计划班次
176 - // shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次 190 + //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次
177 shifday.setCjbc(map.get("cjbc").toString());// 抽减班次 191 shifday.setCjbc(map.get("cjbc").toString());// 抽减班次
178 shifday.setLjbc(map.get("ljbc").toString());// 增加班次 192 shifday.setLjbc(map.get("ljbc").toString());// 增加班次
179 shifday.setSjbc(map.get("sjbc").toString());// 实际班次 193 shifday.setSjbc(map.get("sjbc").toString());// 实际班次
@@ -249,30 +263,56 @@ public class FormsServiceImpl implements FormsService { @@ -249,30 +263,56 @@ public class FormsServiceImpl implements FormsService {
249 // 路单数据 263 // 路单数据
250 @Override 264 @Override
251 public List<Singledata> singledata(Map<String, Object> map) { 265 public List<Singledata> singledata(Map<String, Object> map) {
  266 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  267 + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日");
  268 + Date d = null;
  269 + Date d1 = null;
  270 + try {
  271 + d = sdf.parse(map.get("startDate").toString());
  272 + d1 = sdf.parse(map.get("endDate").toString());
  273 + } catch (ParseException e) {
252 274
253 - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y"  
254 - + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "'" + " and '"  
255 - + map.get("endDate").toString() + "'" + " and y.XLBM='" + map.get("line").toString() + "'"  
256 - + " GROUP BY y.NBBM "; 275 + e.printStackTrace();
  276 + }
  277 + String rq2 = sdf1.format(d);
  278 + String rq3 = sdf1.format(d1);
257 279
  280 + rq = rq2 + "-" + rq3;
  281 +
  282 + String sql = " SELECT r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "
  283 + + " FROM bsth_c_s_sp_info_real r "
  284 + + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y "
  285 + + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'"
  286 + + " and y.XLBM= '" + map.get("line").toString() + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y on r.cl_zbh=y.nbbm "
  287 + + " where r.schedule_date_str BETWEEN '" + map.get("startDate").toString() + "'"
  288 + + " and '"+ map.get("endDate").toString() + "'"
  289 + + " and r.xl_bm='" + map.get("line").toString() + "'"
  290 + + " AND r.gs_bm is not null"
  291 + /* + " and r.gs_bm='"+map.get("gsdmSing").toString()+"'"
  292 + + " and r.fgs_bm='"+map.get("fgsdmSing").toString()+"'"*/
  293 + + " GROUP BY r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name ";
  294 +
  295 + startDate = map.get("startDate").toString();
  296 + endDate = map.get("endDate").toString();
258 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 297 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
259 - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");  
260 - 298 + //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
261 @Override 299 @Override
262 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { 300 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
263 Singledata sin = new Singledata(); 301 Singledata sin = new Singledata();
264 - sin.setrQ(sdf.format(arg0.getDate("rq")));  
265 - sin.setgS(arg0.getString("SSGSDM").toString());  
266 - sin.setxL(arg0.getString("XLBM").toString());  
267 - sin.setClzbh(arg0.getString("NBBM").toString());  
268 - sin.setJsy(arg0.getString("JSY").toString()); 302 + sin.setrQ(rq);
  303 + sin.setgS(arg0.getString("gs_name").toString());
  304 + sin.setxL(arg0.getString("xl_bm").toString());
  305 + sin.setClzbh(arg0.getString("cl_zbh").toString());
  306 + sin.setJsy(arg0.getString("j_gh").toString());
  307 + sin.setjName(arg0.getString("j_name").toString());
269 sin.setHyl(arg0.getString("YH").toString()); 308 sin.setHyl(arg0.getString("YH").toString());
270 sin.setJzl(arg0.getString("JZL").toString()); 309 sin.setJzl(arg0.getString("JZL").toString());
271 // sin.setJzl(arg0.getString(""));//非营业性用油 310 // sin.setJzl(arg0.getString(""));//非营业性用油
272 sin.setJhjl(arg0.getString("JZL")); 311 sin.setJhjl(arg0.getString("JZL"));
273 Map<String, Object> maps = new HashMap<>(); 312 Map<String, Object> maps = new HashMap<>();
274 - maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ());  
275 - sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString()); 313 + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate,
  314 + endDate);
  315 + //sin.setjName(maps.get("j_name") == null ? "" : maps.get("j_name").toString());
276 sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString()); 316 sin.setSgh(maps.get("s_gh") == null ? "" : maps.get("s_gh").toString());
277 sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString()); 317 sin.setsName(maps.get("s_name") == null ? "" : maps.get("s_name").toString());
278 sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); 318 sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString());
@@ -289,22 +329,34 @@ public class FormsServiceImpl implements FormsService { @@ -289,22 +329,34 @@ public class FormsServiceImpl implements FormsService {
289 @Override 329 @Override
290 public List<Operationservice> operationservice(Map<String, Object> map) { 330 public List<Operationservice> operationservice(Map<String, Object> map) {
291 331
292 - String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y" + " where y.RQ BETWEEN '"  
293 - + map.get("startDate").toString() + "'" + " and '" + map.get("endDate").toString() + "'"  
294 - + " and y.XLBM='" + map.get("line").toString() + "'" + " GROUP BY y.NBBM ";  
295 - 332 + String sql = " SELECT r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "
  333 + + " FROM bsth_c_s_sp_info_real r "
  334 + // + "LEFT JOIN bsth_c_s_sp_info_real r on r.cl_zbh=y.NBBM"
  335 + + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y "
  336 + + " where y.RQ BETWEEN '" + map.get("startDate").toString() + "' and '"+ map.get("endDate").toString() + "'"
  337 + + " and y.XLBM= '" + map.get("line").toString() + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y on r.cl_zbh=y.nbbm "
  338 + + " where r.schedule_date_str BETWEEN '"+ map.get("startDate").toString()
  339 + + "'" + " and '" + map.get("endDate").toString() + "'"
  340 + + " and r.xl_bm='" + map.get("line").toString() + "'"
  341 + /* + " and r.gs_bm='"+map.get("gsdmOperat").toString()+"'"
  342 + + " and r.fgs_bm='"+map.get("fgsdmOperat").toString()+"'"*/
  343 + + " AND r.gs_bm is not null"
  344 + + " GROUP BY r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,y.YH,y.JZL,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name";
  345 +
  346 + //r.j_name
  347 + startDate = map.get("startDate").toString();
  348 + endDate = map.get("endDate").toString();
296 List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { 349 List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() {
297 - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");  
298 350
299 @Override 351 @Override
300 public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { 352 public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException {
301 - Singledata sin = new Singledata();  
302 Operationservice op = new Operationservice(); 353 Operationservice op = new Operationservice();
303 - op.setXlName(arg0.getString("XLBM").toString()); 354 + op.setXlName(arg0.getString("xl_name").toString());
304 op.setJzl(arg0.getString("JZL").toString()); 355 op.setJzl(arg0.getString("JZL").toString());
305 op.setXhl(arg0.getString("YH").toString()); 356 op.setXhl(arg0.getString("YH").toString());
306 Map<String, Object> maps = new HashMap<>(); 357 Map<String, Object> maps = new HashMap<>();
307 - maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ()); 358 + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate,
  359 + endDate);
308 op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString()); 360 op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString());
309 op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString()); 361 op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString());
310 op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString()); 362 op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());
@@ -316,26 +368,36 @@ public class FormsServiceImpl implements FormsService { @@ -316,26 +368,36 @@ public class FormsServiceImpl implements FormsService {
316 368
317 // 车辆加注 369 // 车辆加注
318 @Override 370 @Override
319 - public List<Vehicleloading> vehicleloading(String line, String data) {  
320 -  
321 - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " + " FROM bsth_c_ylb y "  
322 - + " where to_days(y.RQ)=to_days('" + data + "')" + " and y.XLBM='" + line + "' "  
323 - + " GROUP BY y.NBBM ";  
324 - 371 + public List<Vehicleloading> vehicleloading(/*String gsdmVehic,String fgsdmVehic,*/String line, String date) {
  372 +
  373 + String sql = " SELECT r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "
  374 + + " FROM bsth_c_s_sp_info_real r "
  375 + + " INNER join ( select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH from bsth_c_ylb y "
  376 + + " where to_days(y.RQ)=to_days('" + date + "') and y.XLBM= '" + line + "' GROUP BY y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH) y "
  377 + + " on r.cl_zbh=y.nbbm "
  378 + + " where to_days(r.schedule_date_str)=to_days('" + date + "')"
  379 + + " and r.xl_bm='" + line + "' "
  380 + + " AND r.gs_bm is not null"
  381 + /* + " and r.gs_bm='"+gsdmVehic +"'"
  382 + + " and r.fgs_bm='"+fgsdmVehic +"'"*/
  383 + + " GROUP BY r.schedule_date_str,r.xl_bm,r.xl_name,r.cl_zbh,r.j_name,y.YH,y.JZL,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name ";
  384 +
  385 +
  386 + //r.cl_zbh
325 List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { 387 List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() {
326 @Override 388 @Override
327 public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException { 389 public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException {
328 Vehicleloading ve = new Vehicleloading(); 390 Vehicleloading ve = new Vehicleloading();
329 - ve.setrQ(arg0.getString("RQ").toString());  
330 - ve.setgS(arg0.getString("SSDM").toString());  
331 - ve.setxL(arg0.getString("XLBM").toString());  
332 - ve.setClzbh(arg0.getString("NBBM").toString()); 391 + ve.setrQ(arg0.getString("schedule_date_str").toString());
  392 + ve.setgS(arg0.getString("gs_name").toString());
  393 + ve.setxL(arg0.getString("xl_name").toString());
  394 + ve.setClzbh(arg0.getString("cl_zbh").toString());
333 ve.setHyl(arg0.getString("YH").toString()); 395 ve.setHyl(arg0.getString("YH").toString());
334 ve.setJzl(arg0.getString("JZL").toString()); 396 ve.setJzl(arg0.getString("JZL").toString());
335 // ve.setLs(arg0.getString("").toString());//尿素 397 // ve.setLs(arg0.getString("").toString());//尿素
336 Map<String, Object> maps = new HashMap<>(); 398 Map<String, Object> maps = new HashMap<>();
337 - maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"),  
338 - arg0.getString("RQ")); 399 + maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"),
  400 + arg0.getString("schedule_date_str"));
339 ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString()); 401 ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString());
340 ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次 402 ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次
341 ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次 403 ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次
@@ -367,13 +429,15 @@ public class FormsServiceImpl implements FormsService { @@ -367,13 +429,15 @@ public class FormsServiceImpl implements FormsService {
367 429
368 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from " 430 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,b.warrant_car from "
369 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl" 431 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl"
370 - + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"  
371 - + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='"  
372 - + map.get("line").toString() + "' AND gs_bm is not null" 432 + + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+ map.get("startDate").toString() + "' "
  433 + + " and '" + map.get("endDate").toString() + "' and xl_bm='"+ map.get("line").toString() + "' "
  434 + + " AND gs_bm is not null "
  435 + /*+ " and gs_bm='"+ map.get("gsdmTurn").toString() + "'"
  436 + + " and fgs_bm='"+ map.get("fgsdmTurn").toString() + "'"*/
373 + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" 437 + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN ("
374 - + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car "  
375 - + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real "  
376 - + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '" 438 + + " SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl,t.warrant_car "
  439 + + " from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real "
  440 + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '"
377 + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString() 441 + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString()
378 + "' AND gs_bm is not null " 442 + "' AND gs_bm is not null "
379 + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on " 443 + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on "
@@ -412,6 +476,8 @@ public class FormsServiceImpl implements FormsService { @@ -412,6 +476,8 @@ public class FormsServiceImpl implements FormsService {
412 return list; 476 return list;
413 } 477 }
414 478
  479 +
  480 + //班次执行率统计表
415 @Override 481 @Override
416 public List<Executionrate> executionrate(Map<String, Object> map) { 482 public List<Executionrate> executionrate(Map<String, Object> map) {
417 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 483 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -435,6 +501,8 @@ public class FormsServiceImpl implements FormsService { @@ -435,6 +501,8 @@ public class FormsServiceImpl implements FormsService {
435 + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" 501 + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"
436 + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" 502 + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='"
437 + map.get("line").toString() + "' AND gs_bm is not null" 503 + map.get("line").toString() + "' AND gs_bm is not null"
  504 + /*+ " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'"
  505 + + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"*/
438 + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" 506 + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN ("
439 + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " 507 + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl "
440 + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " 508 + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real "
@@ -457,7 +525,8 @@ public class FormsServiceImpl implements FormsService { @@ -457,7 +525,8 @@ public class FormsServiceImpl implements FormsService {
457 tu.setRq(rq); 525 tu.setRq(rq);
458 tu.setGs(arg0.getString("gs_name").toString()); 526 tu.setGs(arg0.getString("gs_name").toString());
459 tu.setZhgs(arg0.getString("fgs_name").toString()); 527 tu.setZhgs(arg0.getString("fgs_name").toString());
460 - tu.setXl(arg0.getString("xlgs")); 528 + //tu.setXl(arg0.getString("xlgs"));这个是根据公司判断线路有几条
  529 + tu.setXl(arg0.getString("sxl"));
461 tu.setXlmc(arg0.getString("sxl")); 530 tu.setXlmc(arg0.getString("sxl"));
462 tu.setCchjh(arg0.getString("jcl").toString()); 531 tu.setCchjh(arg0.getString("jcl").toString());
463 tu.setCchsj(arg0.getString("scl").toString()); 532 tu.setCchsj(arg0.getString("scl").toString());
@@ -501,6 +570,8 @@ public class FormsServiceImpl implements FormsService { @@ -501,6 +570,8 @@ public class FormsServiceImpl implements FormsService {
501 + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" 570 + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"
502 + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='" 571 + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='"
503 + map.get("line").toString() + "' AND gs_bm is not null" 572 + map.get("line").toString() + "' AND gs_bm is not null"
  573 + /*+ " and gs_bm='"+ map.get("gsdmAllline").toString() + "'"
  574 + + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"*/
504 + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN (" 575 + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name ) a left JOIN ("
505 + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " 576 + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl "
506 + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real " 577 + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl from bsth_c_s_sp_info_real "
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -133,7 +133,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -133,7 +133,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
133 DO:{ 133 DO:{
134 if(model.length() != 0){ 134 if(model.length() != 0){
135 for(Long tt : ttList){ 135 for(Long tt : ttList){
136 - if(tt == schedule.getSpId()){ 136 + if((long)tt == (long)schedule.getSpId()){
137 resList.add(schedule); 137 resList.add(schedule);
138 break DO; 138 break DO;
139 } 139 }
src/main/java/com/bsth/service/realcontrol/RealMapService.java
@@ -11,4 +11,6 @@ public interface RealMapService { @@ -11,4 +11,6 @@ public interface RealMapService {
11 Map<String,Object> carParkSpatialData(); 11 Map<String,Object> carParkSpatialData();
12 12
13 Map<String,Object> findRouteByLine(String lineCode); 13 Map<String,Object> findRouteByLine(String lineCode);
  14 +
  15 + Map<String,Object> findRouteAndStationByLine(String lineCode);
14 } 16 }
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -17,7 +17,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -17,7 +17,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
17 17
18 Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj/*,String nbbm,String jsy,String spy*/); 18 Map<String, Object> outgoAdjust(Long id, String remarks, String dfsj/*,String nbbm,String jsy,String spy*/);
19 19
20 - Map<String, Object> destroy(String idsStr/*, int spaceAdjust*/, String remarks/*, String reason, int spaceNum*/); 20 + Map<String, Object> destroy(String idsStr/*, int spaceAdjust*/, String remarks, String reason/*, int spaceNum*/);
21 21
22 List<Map<String, String>> findDriverByLine(String lineCode); 22 List<Map<String, String>> findDriverByLine(String lineCode);
23 23
src/main/java/com/bsth/service/realcontrol/impl/RealChartsServiceImpl.java
@@ -218,7 +218,7 @@ public class RealChartsServiceImpl implements RealChartsService { @@ -218,7 +218,7 @@ public class RealChartsServiceImpl implements RealChartsService {
218 } 218 }
219 inStr = " (" + inStr.substring(1) + ")"; 219 inStr = " (" + inStr.substring(1) + ")";
220 220
221 - String sql = "select min(DFSJ) as STARTDATE,max(DFSJ) as ENDDATE,SCHEDULE_DATE_STR,XL_BM,XL_DIR,REAL_EXEC_DATE from (SELECT SCHEDULE_DATE_STR,concat_ws('_',concat_ws('/', dfsj, fcsj_actual),fcno) AS DFSJ,XL_BM,XL_DIR,REAL_EXEC_DATE FROM bsth_c_s_sp_info_real WHERE schedule_date_str LIKE :month AND bc_type = 'normal' AND dfsj IS NOT NULL AND xl_bm IN "+inStr+") t group by SCHEDULE_DATE_STR,XL_BM,XL_DIR,REAL_EXEC_DATE"; 221 + String sql = "select min(DFSJ) as STARTDATE,max(DFSJ) as ENDDATE,SCHEDULE_DATE_STR,XL_BM,XL_DIR,REAL_EXEC_DATE from (SELECT SCHEDULE_DATE_STR,concat_ws('_',concat_ws('/', dfsj, fcsj_actual),fcno) AS DFSJ,XL_BM,XL_DIR,REAL_EXEC_DATE FROM bsth_c_s_sp_info_real WHERE schedule_date_str LIKE :month AND bc_type = 'normal' AND dfsj IS NOT NULL AND xl_bm IN "+inStr+" AND status !=-1) t group by SCHEDULE_DATE_STR,XL_BM,XL_DIR,REAL_EXEC_DATE";
222 MapSqlParameterSource parameters = new MapSqlParameterSource(); 222 MapSqlParameterSource parameters = new MapSqlParameterSource();
223 parameters.addValue("month", month+"-%"); 223 parameters.addValue("month", month+"-%");
224 224
src/main/java/com/bsth/service/realcontrol/impl/RealMapServiceImpl.java
@@ -10,6 +10,7 @@ import com.google.common.base.Splitter; @@ -10,6 +10,7 @@ import com.google.common.base.Splitter;
10 import org.slf4j.Logger; 10 import org.slf4j.Logger;
11 import org.slf4j.LoggerFactory; 11 import org.slf4j.LoggerFactory;
12 import org.springframework.beans.factory.annotation.Autowired; 12 import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.dao.DataAccessException;
13 import org.springframework.jdbc.core.BeanPropertyRowMapper; 14 import org.springframework.jdbc.core.BeanPropertyRowMapper;
14 import org.springframework.jdbc.core.JdbcTemplate; 15 import org.springframework.jdbc.core.JdbcTemplate;
15 import org.springframework.stereotype.Service; 16 import org.springframework.stereotype.Service;
@@ -111,8 +112,31 @@ public class RealMapServiceImpl implements RealMapService { @@ -111,8 +112,31 @@ public class RealMapServiceImpl implements RealMapService {
111 return rs; 112 return rs;
112 } 113 }
113 114
  115 + @Override
  116 + public Map<String, Object> findRouteAndStationByLine(String lineCode) {
  117 + Map<String, Object> rs = new HashMap<>();
  118 + try {
  119 + //查询路段信息
  120 + String sql = "select r.LINE_CODE,r.SECTION_CODE,r.SECTIONROUTE_CODE,s.SECTION_NAME,ST_AsText(s.GSECTION_VECTOR) as GSECTION_VECTOR, r.DIRECTIONS from bsth_c_sectionroute r INNER JOIN bsth_c_section s on r.section=s.id where r.line_code=? and r.destroy=0";
  121 + List<Map<String, Object>> secList = jdbcTemplate.queryForList(sql, lineCode);
  122 + rs.put("section", secList);
  123 +
  124 + //查询站点信息
  125 + sql="select r.STATION_NAME,r.STATION_ROUTE_CODE,r.LINE_CODE,r.STATION_CODE,r.STATION_MARK,s.G_LONX,s.G_LATY, r.DIRECTIONS from bsth_c_stationroute r INNER JOIN bsth_c_station s on r.station=s.id and r.line_code=? and r.destroy=0";
  126 + List<Map<String, Object>> stationList = jdbcTemplate.queryForList(sql, lineCode);
  127 + rs.put("station", stationList);
  128 +
  129 + rs.put("status", ResponseCode.SUCCESS);
  130 + } catch (DataAccessException e) {
  131 + logger.error("", e);
  132 + rs.put("status", ResponseCode.ERROR);
  133 + }
  134 + return rs;
  135 + }
  136 +
114 /** 137 /**
115 * wgs 坐标数组转 百度 138 * wgs 坐标数组转 百度
  139 + *
116 * @param list 140 * @param list
117 * @return 141 * @return
118 */ 142 */
@@ -122,11 +146,11 @@ public class RealMapServiceImpl implements RealMapService { @@ -122,11 +146,11 @@ public class RealMapServiceImpl implements RealMapService {
122 StringBuilder itemStr; 146 StringBuilder itemStr;
123 String[] subArr, cds; 147 String[] subArr, cds;
124 TransGPS.Location location; 148 TransGPS.Location location;
125 - for(String item : list){ 149 + for (String item : list) {
126 subArr = item.split(","); 150 subArr = item.split(",");
127 151
128 itemStr = new StringBuilder(); 152 itemStr = new StringBuilder();
129 - for(String coord : subArr){ 153 + for (String coord : subArr) {
130 cds = coord.split(" "); 154 cds = coord.split(" ");
131 //城建转经纬度 155 //城建转经纬度
132 //Map<String, Double> map = JWDUtil.ConvertSHToJW(Double.parseDouble(cds[0]), Double.parseDouble(cds[1])); 156 //Map<String, Double> map = JWDUtil.ConvertSHToJW(Double.parseDouble(cds[0]), Double.parseDouble(cds[1]));
@@ -143,6 +167,7 @@ public class RealMapServiceImpl implements RealMapService { @@ -143,6 +167,7 @@ public class RealMapServiceImpl implements RealMapService {
143 167
144 /** 168 /**
145 * wgs 坐标数组转 Gcj 169 * wgs 坐标数组转 Gcj
  170 + *
146 * @param list 171 * @param list
147 * @return 172 * @return
148 */ 173 */
@@ -152,11 +177,11 @@ public class RealMapServiceImpl implements RealMapService { @@ -152,11 +177,11 @@ public class RealMapServiceImpl implements RealMapService {
152 StringBuilder itemStr; 177 StringBuilder itemStr;
153 String[] subArr, cds; 178 String[] subArr, cds;
154 TransGPS.Location location; 179 TransGPS.Location location;
155 - for(String item : list){ 180 + for (String item : list) {
156 subArr = item.split(","); 181 subArr = item.split(",");
157 182
158 itemStr = new StringBuilder(); 183 itemStr = new StringBuilder();
159 - for(String coord : subArr){ 184 + for (String coord : subArr) {
160 cds = coord.split(" "); 185 cds = coord.split(" ");
161 location = TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1]))); 186 location = TransGPS.transformFromWGSToGCJ(TransGPS.LocationMake(Double.parseDouble(cds[0]), Double.parseDouble(cds[1])));
162 itemStr.append(location.getLng() + " " + location.getLat() + ","); 187 itemStr.append(location.getLng() + " " + location.getLat() + ",");
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -154,7 +154,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -154,7 +154,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
154 } 154 }
155 155
156 @Override 156 @Override
157 - public Map<String, Object> destroy(String idsStr, /*int spaceAdjust, */String remarks/*, String reason, int spaceNum*/) { 157 + public Map<String, Object> destroy(String idsStr, /*int spaceAdjust, */String remarks, String reason/*, int spaceNum*/) {
158 158
159 Map<String, Object> map = new HashMap<>(); 159 Map<String, Object> map = new HashMap<>();
160 List<ScheduleRealInfo> rsList = new ArrayList<>(); 160 List<ScheduleRealInfo> rsList = new ArrayList<>();
@@ -170,7 +170,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -170,7 +170,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
170 map.put("msg", "不必要的重复烂班!"); 170 map.put("msg", "不必要的重复烂班!");
171 return map; 171 return map;
172 } 172 }
173 - 173 +
  174 + schedule.setAdjustExps(reason);
174 schedule.destroy(); 175 schedule.destroy();
175 schedule.addRemarks(remarks); 176 schedule.addRemarks(remarks);
176 177
@@ -1683,7 +1684,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1683,7 +1684,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1683 @Override 1684 @Override
1684 public Map<String, Object> findKMBC1(String jName, String clZbh, 1685 public Map<String, Object> findKMBC1(String jName, String clZbh,
1685 String date, String enddate) { 1686 String date, String enddate) {
1686 - List<ScheduleRealInfo> list = scheduleRealInfoRepository.queryListWaybill2(jName, clZbh, date, enddate); 1687 + List<ScheduleRealInfo> list = scheduleRealInfoRepository.queryListWaybill4(jName, clZbh, date, enddate);
1687 DecimalFormat format = new DecimalFormat("0.00"); 1688 DecimalFormat format = new DecimalFormat("0.00");
1688 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName); 1689 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName);
1689 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName); 1690 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
src/main/java/com/bsth/service/schedule/BService.java 0 → 100644
  1 +package com.bsth.service.schedule;
  2 +
  3 +import org.springframework.data.domain.Page;
  4 +import org.springframework.data.domain.Pageable;
  5 +
  6 +import java.io.Serializable;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
  10 +/**
  11 + * 基础service接口。
  12 + */
  13 +public interface BService<T, ID extends Serializable> {
  14 + // CRUD 操作
  15 + // Create,Update操作
  16 + T save(T t);
  17 + <S extends T> List<S> bulkSave(List<S> entities); // 批量保存(TODO:待测试)
  18 + // Research操作
  19 + T findById(ID id);
  20 + List<T> findAll();
  21 + Page<T> list(Map<String, Object> param, Pageable pageable);
  22 + List<T> list(Map<String, Object> param);
  23 + // Delete操作
  24 + void delete(ID id) throws ScheduleException;
  25 +}
src/main/java/com/bsth/service/schedule/CarConfigInfoService.java
1 package com.bsth.service.schedule; 1 package com.bsth.service.schedule;
2 2
3 import com.bsth.entity.schedule.CarConfigInfo; 3 import com.bsth.entity.schedule.CarConfigInfo;
4 -import com.bsth.service.BaseService;  
5 4
6 /** 5 /**
7 * Created by xu on 16/5/9. 6 * Created by xu on 16/5/9.
8 */ 7 */
9 -public interface CarConfigInfoService extends BaseService<CarConfigInfo, Long> { 8 +public interface CarConfigInfoService extends BService<CarConfigInfo, Long> {
  9 + public void validate_cars(CarConfigInfo carConfigInfo) throws ScheduleException;
  10 + public void toggleCancel(Long id) throws ScheduleException;
10 } 11 }
src/main/java/com/bsth/service/schedule/CarConfigInfoServiceImpl.java deleted 100644 → 0
1 -package com.bsth.service.schedule;  
2 -  
3 -import com.bsth.common.ResponseCode;  
4 -import com.bsth.entity.schedule.CarConfigInfo;  
5 -import com.bsth.entity.schedule.rule.ScheduleRule1Flat;  
6 -import com.bsth.repository.schedule.CarConfigInfoRepository;  
7 -import com.bsth.service.impl.BaseServiceImpl;  
8 -import org.springframework.beans.factory.annotation.Autowired;  
9 -import org.springframework.stereotype.Service;  
10 -  
11 -import javax.transaction.Transactional;  
12 -import java.util.*;  
13 -  
14 -/**  
15 - * Created by xu on 16/5/9.  
16 - */  
17 -@Service  
18 -public class CarConfigInfoServiceImpl extends BaseServiceImpl<CarConfigInfo, Long> implements CarConfigInfoService {  
19 - @Autowired  
20 - private CarConfigInfoRepository carConfigInfoRepository;  
21 - @Autowired  
22 - private ScheduleRule1FlatService scheduleRule1FlatService;  
23 -  
24 - @Override  
25 - @Transactional  
26 - public Map<String, Object> delete(Long aLong) {  
27 - // 获取待作废的车辆配置  
28 - CarConfigInfo carConfigInfo = carConfigInfoRepository.findOne(aLong);  
29 - // 查询有无规则使用过此车辆配置  
30 - Map<String, Object> param = new HashMap<>();  
31 - param.put("carConfigInfo.id_eq", carConfigInfo.getId());  
32 - Iterator<ScheduleRule1Flat> scheduleRule1FlatIterator =  
33 - scheduleRule1FlatService.list(param).iterator();  
34 - boolean isExist = false;  
35 - while (scheduleRule1FlatIterator.hasNext()) {  
36 - ScheduleRule1Flat scheduleRule1Flat = scheduleRule1FlatIterator.next();  
37 - if (scheduleRule1Flat.getCarConfigInfo().getId().equals(carConfigInfo.getId())) {  
38 - isExist = true;  
39 - break;  
40 - }  
41 - }  
42 -  
43 - Map<String, Object> map = new HashMap<>();  
44 -  
45 - if (isExist) {  
46 - throw new RuntimeException("车辆配置已被规则使用,不能删除,请先修改规则!");  
47 - } else {  
48 - carConfigInfo.setIsCancel(true);  
49 - map.put("status", ResponseCode.SUCCESS);  
50 - }  
51 -  
52 - return map;  
53 -  
54 - }  
55 -}  
src/main/java/com/bsth/service/schedule/CarsService.java 0 → 100644
  1 +package com.bsth.service.schedule;
  2 +
  3 +import com.bsth.entity.Cars;
  4 +
  5 +/**
  6 + * Created by xu on 16/12/8.
  7 + */
  8 +public interface CarsService extends BService<Cars, Integer> {
  9 + public void validate_nbbh(Cars cars) throws ScheduleException;
  10 + public void validate_clbh(Cars cars) throws ScheduleException;
  11 + public void validate_cph(Cars cars) throws ScheduleException;
  12 + public void validate_sbbh(Cars cars) throws ScheduleException;
  13 +}
src/main/java/com/bsth/service/schedule/EmployeeConfigInfoService.java
1 package com.bsth.service.schedule; 1 package com.bsth.service.schedule;
2 2
3 import com.bsth.entity.schedule.EmployeeConfigInfo; 3 import com.bsth.entity.schedule.EmployeeConfigInfo;
4 -import com.bsth.service.BaseService;  
5 4
6 /** 5 /**
7 * Created by xu on 16/5/10. 6 * Created by xu on 16/5/10.
8 */ 7 */
9 -public interface EmployeeConfigInfoService extends BaseService<EmployeeConfigInfo, Long> { 8 +public interface EmployeeConfigInfoService extends BService<EmployeeConfigInfo, Long> {
  9 + void validate_jsy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException;
  10 + void validate_spy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException;
  11 + public void toggleCancel(Long id) throws ScheduleException;
10 } 12 }
src/main/java/com/bsth/service/schedule/EmployeeConfigInfoServiceImpl.java deleted 100644 → 0
1 -package com.bsth.service.schedule;  
2 -  
3 -import com.bsth.common.ResponseCode;  
4 -import com.bsth.entity.Line;  
5 -import com.bsth.entity.schedule.EmployeeConfigInfo;  
6 -import com.bsth.entity.schedule.rule.ScheduleRule1Flat;  
7 -import com.bsth.repository.schedule.EmployeeConfigInfoRepository;  
8 -import com.bsth.service.impl.BaseServiceImpl;  
9 -import org.springframework.beans.factory.annotation.Autowired;  
10 -import org.springframework.stereotype.Service;  
11 -  
12 -import javax.transaction.Transactional;  
13 -import java.util.*;  
14 -  
15 -/**  
16 - * Created by xu on 16/5/10.  
17 - */  
18 -@Service  
19 -public class EmployeeConfigInfoServiceImpl extends BaseServiceImpl<EmployeeConfigInfo, Long> implements EmployeeConfigInfoService {  
20 - @Autowired  
21 - private EmployeeConfigInfoRepository employeeConfigInfoRepository;  
22 - @Autowired  
23 - private ScheduleRule1FlatService scheduleRule1FlatService;  
24 -  
25 -  
26 - @Override  
27 - @Transactional  
28 - public Map<String, Object> delete(Long aLong) {  
29 - // 获取待作废的人员配置  
30 - EmployeeConfigInfo employeeConfigInfo = employeeConfigInfoRepository.findOne(aLong);  
31 - // 获取线路  
32 - Line xl = employeeConfigInfo.getXl();  
33 - // 查找线路的规则,比较人员配置信息  
34 - Map<String, Object> param = new HashMap<>();  
35 - param.put("xl.id_eq", xl.getId());  
36 - Iterator<ScheduleRule1Flat> employeeConfigInfoIterator = scheduleRule1FlatService.list(param).iterator();  
37 - List<String> ryConfigIds = new ArrayList<>();  
38 - while (employeeConfigInfoIterator.hasNext()) {  
39 - ScheduleRule1Flat scheduleRule1Flat = employeeConfigInfoIterator.next();  
40 - ryConfigIds.addAll(Arrays.asList(scheduleRule1Flat.getRyConfigIds().split(",")));  
41 - }  
42 -  
43 - Map<String, Object> map = new HashMap<>();  
44 -  
45 - if (ryConfigIds.contains(employeeConfigInfo.getId().toString())) {  
46 - throw new RuntimeException("人员配置已被规则使用,不能删除,请先修改规则!");  
47 - } else {  
48 - employeeConfigInfo.setIsCancel(true);  
49 - map.put("status", ResponseCode.SUCCESS);  
50 - }  
51 -  
52 - return map;  
53 - }  
54 -  
55 -}  
src/main/java/com/bsth/service/schedule/GuideboardInfoService.java
1 package com.bsth.service.schedule; 1 package com.bsth.service.schedule;
2 2
3 import com.bsth.entity.schedule.GuideboardInfo; 3 import com.bsth.entity.schedule.GuideboardInfo;
4 -import com.bsth.service.BaseService;  
5 4
6 /** 5 /**
7 * Created by xu on 16/5/11. 6 * Created by xu on 16/5/11.
8 */ 7 */
9 -public interface GuideboardInfoService extends BaseService<GuideboardInfo, Long> { 8 +public interface GuideboardInfoService extends BService<GuideboardInfo, Long> {
  9 + public void validate(GuideboardInfo guideboardInfo) throws ScheduleException;
  10 + public void toggleCancel(Long id) throws ScheduleException;
10 } 11 }
src/main/java/com/bsth/service/schedule/GuideboardInfoServiceImpl.java deleted 100644 → 0
1 -package com.bsth.service.schedule;  
2 -  
3 -import com.bsth.entity.schedule.GuideboardInfo;  
4 -import com.bsth.service.impl.BaseServiceImpl;  
5 -import org.springframework.stereotype.Service;  
6 -  
7 -/**  
8 - * Created by xu on 16/5/11.  
9 - */  
10 -@Service  
11 -public class GuideboardInfoServiceImpl extends BaseServiceImpl<GuideboardInfo, Long> implements GuideboardInfoService {  
12 -}  
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
@@ -497,7 +497,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -497,7 +497,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
497 DO:{ 497 DO:{
498 if(model.length() != 0){ 498 if(model.length() != 0){
499 for(Long tt : ttList){ 499 for(Long tt : ttList){
500 - if(tt == schedule.getSpId()){ 500 + if((long)tt == (long)schedule.getSpId()){
501 String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); 501 String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj();
502 if(!keyMap.containsKey(key)) 502 if(!keyMap.containsKey(key))
503 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 503 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
src/main/java/com/bsth/service/schedule/ScheduleException.java 0 → 100644
  1 +package com.bsth.service.schedule;
  2 +
  3 +/**
  4 + * Created by xu on 16/12/5.
  5 + */
  6 +public class ScheduleException extends Exception {
  7 + public ScheduleException(String message) {
  8 + super("计划调度业务错误==>>" + message);
  9 + }
  10 +}
src/main/java/com/bsth/service/schedule/impl/BServiceImpl.java 0 → 100644
  1 +package com.bsth.service.schedule.impl;
  2 +
  3 +import com.bsth.entity.search.CustomerSpecs;
  4 +import com.bsth.repository.BaseRepository;
  5 +import com.bsth.service.schedule.BService;
  6 +import com.bsth.service.schedule.ScheduleException;
  7 +import org.slf4j.Logger;
  8 +import org.slf4j.LoggerFactory;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.beans.factory.annotation.Value;
  11 +import org.springframework.data.domain.Page;
  12 +import org.springframework.data.domain.Pageable;
  13 +import org.springframework.data.jpa.domain.Specification;
  14 +
  15 +import javax.persistence.EntityManager;
  16 +import java.io.Serializable;
  17 +import java.util.ArrayList;
  18 +import java.util.List;
  19 +import java.util.Map;
  20 +
  21 +/**
  22 + * 基础BService实现。
  23 + */
  24 +public class BServiceImpl<T, ID extends Serializable> implements BService<T, ID> {
  25 + @Autowired
  26 + private BaseRepository<T, ID> baseRepository;
  27 + @Autowired
  28 + private EntityManager entityManager;
  29 + @Value("${hibernate.jdbc.batch_size}")
  30 + private int batchSize;
  31 +
  32 + /** 日志记录器 */
  33 + protected Logger logger = LoggerFactory.getLogger(this.getClass());
  34 +
  35 + // CRUD 操作
  36 + // Create,Update操作
  37 + @Override
  38 + public T save(T t) {
  39 + if (logger.isDebugEnabled()) {
  40 + logger.debug("save...");
  41 + }
  42 + return baseRepository.save(t);
  43 + }
  44 + @Override
  45 + public <S extends T> List<S> bulkSave(List<S> entities) {
  46 + if (logger.isDebugEnabled()) {
  47 + logger.debug("bulkSave...");
  48 + }
  49 +
  50 + // 不使用内部批量保存,自己实现批量保存
  51 + final List<S> savedEntities = new ArrayList<>(entities.size());
  52 + int i = 0;
  53 + for (S t : entities) {
  54 + entityManager.persist(t);
  55 + savedEntities.add(t);
  56 + i++;
  57 + if (i % batchSize == 0) {
  58 + entityManager.flush();
  59 + entityManager.clear();
  60 + }
  61 + }
  62 + return savedEntities;
  63 + }
  64 +
  65 + // Research操作
  66 + @Override
  67 + public T findById(ID id) {
  68 + if (logger.isDebugEnabled()) {
  69 + logger.debug("findById...");
  70 + }
  71 +
  72 + return baseRepository.findOne(id);
  73 + }
  74 + @Override
  75 + public List<T> findAll() {
  76 + if (logger.isDebugEnabled()) {
  77 + logger.debug("findAll...");
  78 + }
  79 +
  80 + return (List<T>) baseRepository.findAll();
  81 + }
  82 + @Override
  83 + public Page<T> list(Map<String, Object> param, Pageable pageable) {
  84 + if (logger.isDebugEnabled()) {
  85 + logger.debug("list(...,pageable)...");
  86 + }
  87 +
  88 + // 自定义查询参数
  89 + Specification<T> specification = new CustomerSpecs<>(param);
  90 + return baseRepository.findAll(specification, pageable);
  91 + }
  92 + @Override
  93 + public List<T> list(Map<String, Object> param) {
  94 + if (logger.isDebugEnabled()) {
  95 + logger.debug("list...");
  96 + }
  97 +
  98 + // 自定义查询参数
  99 + Specification<T> specification = new CustomerSpecs<>(param);
  100 + return baseRepository.findAll(specification);
  101 + }
  102 + // Delete操作
  103 + @Override
  104 + public void delete(ID id) throws ScheduleException {
  105 + if (logger.isDebugEnabled()) {
  106 + logger.debug("delete...");
  107 + }
  108 +
  109 + baseRepository.delete(id);
  110 + }
  111 +}
src/main/java/com/bsth/service/schedule/impl/CarConfigInfoServiceImpl.java 0 → 100644
  1 +package com.bsth.service.schedule.impl;
  2 +
  3 +import com.bsth.entity.schedule.CarConfigInfo;
  4 +import com.bsth.entity.schedule.rule.ScheduleRule1Flat;
  5 +import com.bsth.service.schedule.CarConfigInfoService;
  6 +import com.bsth.service.schedule.ScheduleException;
  7 +import com.bsth.service.schedule.ScheduleRule1FlatService;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.CollectionUtils;
  12 +
  13 +import java.util.HashMap;
  14 +import java.util.List;
  15 +import java.util.Map;
  16 +
  17 +/**
  18 + * Created by xu on 16/5/9.
  19 + */
  20 +@Service
  21 +public class CarConfigInfoServiceImpl extends BServiceImpl<CarConfigInfo, Long> implements CarConfigInfoService {
  22 + @Autowired
  23 + private ScheduleRule1FlatService scheduleRule1FlatService;
  24 +
  25 + @Transactional
  26 + public void validate_cars(CarConfigInfo carConfigInfo) throws ScheduleException {
  27 + // 相同车辆不能同时配置
  28 + Map<String, Object> param = new HashMap<>();
  29 + if (carConfigInfo.getId() != null) {
  30 + param.put("id_ne", carConfigInfo.getId());
  31 + }
  32 +
  33 + if (carConfigInfo.getXl() == null ||
  34 + carConfigInfo.getXl().getId() == null ||
  35 + carConfigInfo.getXl().getName() == null) {
  36 + throw new ScheduleException("线路未选择");
  37 + } else {
  38 +// param.put("xl.id_eq", carConfigInfo.getXl().getId());
  39 + if (carConfigInfo.getCl() == null || carConfigInfo.getCl().getId() == null) {
  40 + throw new ScheduleException("车辆未选择");
  41 + } else {
  42 + param.put("cl.id_eq", carConfigInfo.getCl().getId());
  43 + if (!CollectionUtils.isEmpty(list(param))) {
  44 + throw new ScheduleException("车辆已经配置在" + carConfigInfo.getXl().getName() + "线路中!");
  45 + }
  46 + }
  47 + }
  48 +
  49 + }
  50 +
  51 + @Transactional
  52 + @Override
  53 + public void delete(Long aLong) throws ScheduleException {
  54 + toggleCancel(aLong);
  55 + }
  56 +
  57 + @Transactional
  58 + public void toggleCancel(Long id) throws ScheduleException {
  59 + CarConfigInfo carConfigInfo = findById(id);
  60 + Map<String, Object> param = new HashMap<>();
  61 + if (carConfigInfo.getIsCancel()) {
  62 + validate_cars(carConfigInfo);
  63 + carConfigInfo.setIsCancel(false);
  64 + } else {
  65 + param.clear();
  66 + param.put("carConfigInfo.id_eq", carConfigInfo.getId());
  67 + List<ScheduleRule1Flat> scheduleRule1Flats = (List<ScheduleRule1Flat>) scheduleRule1FlatService.list(param);
  68 + if (CollectionUtils.isEmpty(scheduleRule1Flats)) {
  69 + carConfigInfo.setIsCancel(true);
  70 + } else {
  71 + throw new ScheduleException("车辆配置已被规则使用,不能作废,请先修改规则!");
  72 + }
  73 + }
  74 + }
  75 +
  76 +}
src/main/java/com/bsth/service/schedule/impl/CarsServiceImpl.java 0 → 100644
  1 +package com.bsth.service.schedule.impl;
  2 +
  3 +import com.bsth.entity.Cars;
  4 +import com.bsth.service.schedule.CarsService;
  5 +import com.bsth.service.schedule.ScheduleException;
  6 +import org.springframework.stereotype.Service;
  7 +import org.springframework.transaction.annotation.Transactional;
  8 +import org.springframework.util.CollectionUtils;
  9 +
  10 +import java.util.HashMap;
  11 +import java.util.Map;
  12 +
  13 +/**
  14 + * Created by xu on 16/12/8.
  15 + */
  16 +@Service(value = "carsServiceImpl_sc")
  17 +public class CarsServiceImpl extends BServiceImpl<Cars, Integer> implements CarsService {
  18 +
  19 + @Override
  20 + @Transactional
  21 + public void validate_nbbh(Cars cars) throws ScheduleException {
  22 + // 查询条件
  23 + Map<String, Object> param = new HashMap<>();
  24 + if (cars.getId() != null) {
  25 + param.put("id_ne", cars.getId());
  26 + }
  27 + param.put("insideCode_eq", cars.getInsideCode());
  28 + if (!CollectionUtils.isEmpty(list(param))) {
  29 + throw new ScheduleException("车辆内部编号/自编号重复");
  30 + }
  31 + }
  32 +
  33 + @Override
  34 + @Transactional
  35 + public void validate_clbh(Cars cars) throws ScheduleException {
  36 + // 查询条件
  37 + Map<String, Object> param = new HashMap<>();
  38 + if (cars.getId() != null) {
  39 + param.put("id_ne", cars.getId());
  40 + }
  41 + param.put("carCode_eq", cars.getCarCode());
  42 + if (!CollectionUtils.isEmpty(list(param))) {
  43 + throw new ScheduleException("车辆编号重复");
  44 + }
  45 + }
  46 +
  47 + @Override
  48 + @Transactional
  49 + public void validate_cph(Cars cars) throws ScheduleException {
  50 + // 查询条件
  51 + Map<String, Object> param = new HashMap<>();
  52 + if (cars.getId() != null) {
  53 + param.put("id_ne", cars.getId());
  54 + }
  55 + param.put("carPlate_eq", cars.getCarPlate());
  56 + if (!CollectionUtils.isEmpty(list(param))) {
  57 + throw new ScheduleException("车牌号重复");
  58 + }
  59 + }
  60 +
  61 + @Override
  62 + @Transactional
  63 + public void validate_sbbh(Cars cars) throws ScheduleException {
  64 + // 查询条件
  65 + Map<String, Object> param = new HashMap<>();
  66 + if (cars.getId() != null) {
  67 + param.put("id_ne", cars.getId());
  68 + }
  69 + param.put("equipmentCode_eq", cars.getEquipmentCode());
  70 + if (!CollectionUtils.isEmpty(list(param))) {
  71 + throw new ScheduleException("设备编号重复");
  72 + }
  73 + }
  74 +}
src/main/java/com/bsth/service/schedule/impl/EmployeeConfigInfoServiceImpl.java 0 → 100644
  1 +package com.bsth.service.schedule.impl;
  2 +
  3 +import com.bsth.entity.schedule.EmployeeConfigInfo;
  4 +import com.bsth.entity.schedule.rule.ScheduleRule1Flat;
  5 +import com.bsth.service.schedule.EmployeeConfigInfoService;
  6 +import com.bsth.service.schedule.ScheduleException;
  7 +import com.bsth.service.schedule.ScheduleRule1FlatService;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
  11 +import org.springframework.util.CollectionUtils;
  12 +
  13 +import java.util.*;
  14 +
  15 +/**
  16 + * Created by xu on 16/5/10.
  17 + */
  18 +@Service
  19 +public class EmployeeConfigInfoServiceImpl extends BServiceImpl<EmployeeConfigInfo, Long> implements EmployeeConfigInfoService {
  20 + @Autowired
  21 + private ScheduleRule1FlatService scheduleRule1FlatService;
  22 +
  23 + @Transactional
  24 + @Override
  25 + public void validate_jsy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException {
  26 + // 驾驶员不能重复配置
  27 + Map<String, Object> param = new HashMap<>();
  28 + if (employeeConfigInfo.getId() != null) {
  29 + param.put("id_ne", employeeConfigInfo.getId());
  30 + }
  31 +
  32 + if (employeeConfigInfo.getXl() == null ||
  33 + employeeConfigInfo.getXl().getId() == null ||
  34 + employeeConfigInfo.getXl().getName() == null) {
  35 + throw new ScheduleException("线路未选择");
  36 + } else {
  37 + if (employeeConfigInfo.getJsy() == null || employeeConfigInfo.getJsy().getId() == null) {
  38 + throw new ScheduleException("驾驶员未选择");
  39 + } else {
  40 + param.put("jsy.id_eq", employeeConfigInfo.getJsy().getId());
  41 + if (!CollectionUtils.isEmpty(list(param))) {
  42 + throw new ScheduleException("驾驶员已经配置在" + employeeConfigInfo.getXl().getName() + "线路中!");
  43 + }
  44 + }
  45 + }
  46 + }
  47 +
  48 + @Transactional
  49 + @Override
  50 + public void validate_spy(EmployeeConfigInfo employeeConfigInfo) throws ScheduleException {
  51 + // 售票员不能重复配置
  52 + Map<String, Object> param = new HashMap<>();
  53 + if (employeeConfigInfo.getId() != null) {
  54 + param.put("id_ne", employeeConfigInfo.getId());
  55 + }
  56 +
  57 + if (employeeConfigInfo.getXl() == null ||
  58 + employeeConfigInfo.getXl().getId() == null ||
  59 + employeeConfigInfo.getXl().getName() == null) {
  60 + throw new ScheduleException("线路未选择");
  61 + } else {
  62 + if (employeeConfigInfo.getSpy() == null || employeeConfigInfo.getSpy().getId() == null) {
  63 + throw new ScheduleException("售票员未选择");
  64 + } else {
  65 + param.put("spy.id_eq", employeeConfigInfo.getSpy().getId());
  66 + if (!CollectionUtils.isEmpty(list(param))) {
  67 + throw new ScheduleException("售票员已经配置在" + employeeConfigInfo.getXl().getName() + "线路中!");
  68 + }
  69 + }
  70 + }
  71 + }
  72 +
  73 + @Transactional
  74 + @Override
  75 + public void delete(Long aLong) throws ScheduleException {
  76 + toggleCancel(aLong);
  77 + }
  78 +
  79 + @Transactional
  80 + @Override
  81 + public void toggleCancel(Long id) throws ScheduleException {
  82 + EmployeeConfigInfo employeeConfigInfo = findById(id);
  83 + Map<String, Object> param = new HashMap<>();
  84 + if (employeeConfigInfo.getIsCancel()) {
  85 + validate_jsy(employeeConfigInfo);
  86 + validate_spy(employeeConfigInfo);
  87 + employeeConfigInfo.setIsCancel(false);
  88 + } else {
  89 + param.clear();
  90 + param.put("xl.id_eq", employeeConfigInfo.getXl().getId());
  91 + List<ScheduleRule1Flat> scheduleRule1Flats = (List<ScheduleRule1Flat>) scheduleRule1FlatService.list(param);
  92 + List<String> ryConfigIds = new ArrayList<>();
  93 + for (ScheduleRule1Flat scheduleRule1Flat : scheduleRule1Flats) {
  94 + ryConfigIds.addAll(Arrays.asList(scheduleRule1Flat.getRyConfigIds().split(",")));
  95 + }
  96 +
  97 + if (ryConfigIds.contains(String.valueOf(id))) {
  98 + throw new ScheduleException("人员配置已被规则使用,不能作废,请先修改规则!");
  99 + } else {
  100 + employeeConfigInfo.setIsCancel(true);
  101 + }
  102 + }
  103 + }
  104 +
  105 +}
src/main/java/com/bsth/service/schedule/impl/GuideboardInfoServiceImpl.java 0 → 100644
  1 +package com.bsth.service.schedule.impl;
  2 +
  3 +import com.bsth.entity.schedule.GuideboardInfo;
  4 +import com.bsth.entity.schedule.TTInfoDetail;
  5 +import com.bsth.service.schedule.GuideboardInfoService;
  6 +import com.bsth.service.schedule.ScheduleException;
  7 +import com.bsth.service.schedule.TTInfoDetailService;
  8 +import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.stereotype.Service;
  10 +import org.springframework.util.CollectionUtils;
  11 +
  12 +import javax.transaction.Transactional;
  13 +import java.util.HashMap;
  14 +import java.util.List;
  15 +import java.util.Map;
  16 +
  17 +/**
  18 + * 路牌信息服务。
  19 + */
  20 +@Service
  21 +public class GuideboardInfoServiceImpl extends BServiceImpl<GuideboardInfo, Long> implements GuideboardInfoService {
  22 + @Autowired
  23 + private TTInfoDetailService ttInfoDetailService;
  24 +
  25 + // 验证方法
  26 + @Transactional
  27 + public void validate(GuideboardInfo guideboardInfo) throws ScheduleException {
  28 + // 查询条件
  29 + Map<String, Object> param = new HashMap<>();
  30 + if (guideboardInfo.getId() != null)
  31 + param.put("id_ne", guideboardInfo.getId());
  32 +
  33 + if (guideboardInfo.getXl() == null || guideboardInfo.getXl().getId() == null) {
  34 + throw new ScheduleException("线路未选择");
  35 + } else {
  36 + param.put("xl.id_eq", guideboardInfo.getXl().getId());
  37 +
  38 +// param.put("isCancel_eq", false); // 作废的也算入判定区
  39 + if (guideboardInfo.getLpNo() != null) {
  40 + if (guideboardInfo.getLpName() != null) {
  41 + // 如果两个都写了,分开查询
  42 + param.put("lpNo_eq", guideboardInfo.getLpNo());
  43 + if (!CollectionUtils.isEmpty(list(param))) {
  44 + throw new ScheduleException("路牌编号重复");
  45 + }
  46 + param.remove("lpNo_eq");
  47 + param.put("lpName_eq", guideboardInfo.getLpName());
  48 + if (!CollectionUtils.isEmpty(list(param))) {
  49 + throw new ScheduleException("路牌名称重复");
  50 + }
  51 +
  52 + } else {
  53 + param.put("lpNo_eq", guideboardInfo.getLpNo());
  54 + if (!CollectionUtils.isEmpty(list(param))) {
  55 + throw new ScheduleException("路牌编号重复");
  56 + }
  57 + }
  58 + } else {
  59 + if (guideboardInfo.getLpName() != null) {
  60 + param.put("lpName_eq", guideboardInfo.getLpName());
  61 + if (!CollectionUtils.isEmpty(list(param))) {
  62 + throw new ScheduleException("路牌名字重复");
  63 + }
  64 + } else {
  65 + // 都为空
  66 + throw new ScheduleException("路牌编号名字都为空");
  67 + }
  68 + }
  69 + }
  70 +
  71 + }
  72 +
  73 + @Transactional
  74 + @Override
  75 + public void delete(Long aLong) throws ScheduleException {
  76 + // 删除操作就是作废操作
  77 + toggleCancel(aLong);
  78 + }
  79 +
  80 + // 作废方法
  81 + @Transactional
  82 + public void toggleCancel(Long id) throws ScheduleException {
  83 + GuideboardInfo guideboardInfo = findById(id);
  84 + Map<String, Object> param = new HashMap<>();
  85 + if (guideboardInfo.getIsCancel()) {
  86 + validate(guideboardInfo);
  87 + guideboardInfo.setIsCancel(false);
  88 + } else {
  89 + param.clear();
  90 + param.put("xl.id_eq", guideboardInfo.getXl().getId());
  91 + param.put("ttinfo.isCancel_eq", false);
  92 + param.put("lp.id_eq", guideboardInfo.getId());
  93 + List<TTInfoDetail> ttInfoDetailList = (List<TTInfoDetail>) ttInfoDetailService.list(param);
  94 + if (CollectionUtils.isEmpty(ttInfoDetailList)) {
  95 + guideboardInfo.setIsCancel(true);
  96 + } else {
  97 + throw new ScheduleException("在时刻表" +
  98 + ttInfoDetailList.get(0).getTtinfo().getName() +
  99 + "已使用,无法删除!");
  100 + }
  101 + }
  102 + }
  103 +
  104 +}
src/main/resources/static/pages/control/lineallot/allot.html
@@ -403,9 +403,9 @@ $(function(){ @@ -403,9 +403,9 @@ $(function(){
403 } 403 }
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('/realMap/findRouteByLine', {lineCode: item.lineCode}, function(rs){
408 - $.get('/realSchedule/findRouteByLine', {lineCode: item.lineCode}, function(rs){ 408 + $.get('/realSchedule/findRouteByLine', {lineCode: item.lineCode}, function(rs){
409 if(rs && rs.lineId){ 409 if(rs && rs.lineId){
410 cacheData[item.lineCode] = rs; 410 cacheData[item.lineCode] = rs;
411 i ++; 411 i ++;
src/main/resources/static/pages/forms/statement/allline.html
1 <style type="text/css"> 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 - text-align: center;}  
15 -  
16 - .table > tbody + tbody {  
17 - border-top: 1px solid; }  
18 - .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; }  
19 -.table-checkable tr > th:first-child, .table-checkable tr > td:first-child {  
20 - text-align: center;  
21 - max-width: initial;  
22 - min-width: 40px;  
23 - padding-left: 0;  
24 - padding-right: 0; 2 +.table-bordered {
  3 + border: 1px solid;
25 } 4 }
26 5
  6 +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td,
  7 + .table-bordered>tbody>tr>th, .table-bordered>tbody>tr>td,
  8 + .table-bordered>tfoot>tr>th, .table-bordered>tfoot>tr>td {
  9 + border: 1px solid;
  10 +}
  11 +
  12 +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td {
  13 + border-bottom-width: 2px;
  14 + text-align: center;
  15 +}
  16 +
  17 +.table>tbody+tbody {
  18 + border-top: 1px solid;
  19 +}
  20 +
  21 +.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th,
  22 + .table>thead>tr>td, .table>thead>tr>th {
  23 + text-align: center;
  24 +}
  25 +
  26 +.table-checkable tr>th:first-child, .table-checkable tr>td:first-child {
  27 + text-align: center;
  28 + max-width: initial;
  29 + min-width: 40px;
  30 + padding-left: 0;
  31 + padding-right: 0;
  32 +}
27 </style> 33 </style>
28 34
29 <div class="page-head"> 35 <div class="page-head">
@@ -37,51 +43,64 @@ @@ -37,51 +43,64 @@
37 <div class="portlet light porttlet-fit bordered"> 43 <div class="portlet light porttlet-fit bordered">
38 <div class="portlet-title"> 44 <div class="portlet-title">
39 <form class="form-inline" action="" method="post"> 45 <form class="form-inline" action="" method="post">
40 - <div style="display: inline-block;">  
41 - <span class="item-label" style="width: 80px;">线路: </span>  
42 - <select class="form-control" name="line" id="line" style="width: 120px;"></select>  
43 - </div>  
44 - <div style="display: inline-block;margin-left: 15px;">  
45 - <span class="item-label" style="width: 80px;">开始时间: </span>  
46 - <input class="form-control" type="text" id="startDate" style="width: 120px;"/>  
47 - </div>  
48 - <div style="display: inline-block;margin-left: 15px;">  
49 - <span class="item-label" style="width: 80px;">结束时间: </span>  
50 - <input class="form-control" type="text" id="endDate" style="width: 120px;"/>  
51 - </div>  
52 - <div class="form-group">  
53 - <input class="btn btn-default" type="button" id="query" value="筛选"/>  
54 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
55 - </div> 46 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_allline">
  47 + <span class="item-label" style="width: 80px;">公司: </span>
  48 + <select class="form-control" name="company" id="gsdmAllline" style="width: 140px;"></select>
  49 + </div>
  50 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_allline">
  51 + <span class="item-label" style="width: 80px;">分公司: </span>
  52 + <select class="form-control" name="subCompany" id="fgsdmAllline" style="width: 140px;"></select>
  53 + </div> -->
  54 + <div style="display: inline-block;">
  55 + <span class="item-label" style="width: 80px;">线路: </span> <select
  56 + class="form-control" name="line" id="line" style="width: 120px;"></select>
  57 + </div>
  58 + <div style="display: inline-block; margin-left: 15px;">
  59 + <span class="item-label" style="width: 80px;">开始时间: </span> <input
  60 + class="form-control" type="text" id="startDate"
  61 + style="width: 120px;" />
  62 + </div>
  63 + <div style="display: inline-block; margin-left: 15px;">
  64 + <span class="item-label" style="width: 80px;">结束时间: </span> <input
  65 + class="form-control" type="text" id="endDate"
  66 + style="width: 120px;" />
  67 + </div>
  68 + <div class="form-group">
  69 + <input class="btn btn-default" type="button" id="query" value="筛选" />
  70 + <input class="btn btn-default" type="button" id="export"
  71 + value="导出" />
  72 + </div>
56 </form> 73 </form>
57 </div> 74 </div>
58 <div class="portlet-body"> 75 <div class="portlet-body">
59 - <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px">  
60 - <table class="table table-bordered table-hover table-checkable" id="forms1"> 76 + <div class="table-container"
  77 + style="margin-top: 20px; overflow: auto; min-width: 1000px">
  78 + <table class="table table-bordered table-hover table-checkable"
  79 + id="forms1">
61 <thead> 80 <thead>
62 <tr> 81 <tr>
63 <th colspan="15">营运线路名称统计表</th> 82 <th colspan="15">营运线路名称统计表</th>
64 </tr> 83 </tr>
65 <tr> 84 <tr>
66 - <td rowspan="2" style=" padding-top: 20px;">日期</td>  
67 - <td rowspan="2" style=" padding-top: 20px;">公司</td>  
68 - <td rowspan="2" style=" padding-top: 20px;">直属公司</td>  
69 - <td rowspan="2" style=" padding-top: 20px;">线路名称</td> 85 + <td rowspan="2" style="padding-top: 20px;">日期</td>
  86 + <td rowspan="2" style="padding-top: 20px;">公司</td>
  87 + <td rowspan="2" style="padding-top: 20px;">直属公司</td>
  88 + <td rowspan="2" style="padding-top: 20px;">线路名称</td>
70 <td colspan="2">出车数</td> 89 <td colspan="2">出车数</td>
71 - <td rowspan="2" >出车率</td>  
72 - <td colspan="2" >班次数</td>  
73 - <td rowspan="2" style=" padding-top: 20px;">班次执行率</td>  
74 - <td rowspan="2" style=" padding-top: 20px;">说明</td> 90 + <td rowspan="2">出车率</td>
  91 + <td colspan="2">班次数</td>
  92 + <td rowspan="2" style="padding-top: 20px;">班次执行率</td>
  93 + <td rowspan="2" style="padding-top: 20px;">说明</td>
75 </tr> 94 </tr>
76 <tr> 95 <tr>
77 <td>计划</td> 96 <td>计划</td>
78 <td>实际</td> 97 <td>实际</td>
79 - <td>计划</td> 98 + <td>计划</td>
80 <td>实际</td> 99 <td>实际</td>
81 </tr> 100 </tr>
82 </thead> 101 </thead>
83 <tbody id="tbody"> 102 <tbody id="tbody">
84 - 103 +
85 </tbody> 104 </tbody>
86 <tr> 105 <tr>
87 <td colspan="1">分类汇总</td> 106 <td colspan="1">分类汇总</td>
@@ -104,96 +123,178 @@ @@ -104,96 +123,178 @@
104 </div> 123 </div>
105 124
106 <script> 125 <script>
107 - $(function(){ 126 + $(function() {
108 // 关闭左侧栏 127 // 关闭左侧栏
109 if (!$('body').hasClass('page-sidebar-closed')) 128 if (!$('body').hasClass('page-sidebar-closed'))
110 $('.menu-toggler.sidebar-toggler').click(); 129 $('.menu-toggler.sidebar-toggler').click();
111 - 130 +
112 $("#startDate,#endDate").datetimepicker({ 131 $("#startDate,#endDate").datetimepicker({
113 format : 'YYYY-MM-DD', 132 format : 'YYYY-MM-DD',
114 locale : 'zh-cn' 133 locale : 'zh-cn'
115 }); 134 });
116 -  
117 - $.get('/basic/lineCode2Name',function(result){  
118 - var data=[];  
119 -  
120 - for(var code in result){  
121 - data.push({id: code, text: result[code]}); 135 +
  136 + var obj = [];
  137 + $.get('/user/companyData', function(result) {
  138 + obj = result;
  139 + var options = '';
  140 + for (var i = 0; i < obj.length; i++) {
  141 + options += '<option value="'+obj[i].companyCode+'">'
  142 + + obj[i].companyName + '</option>';
122 } 143 }
123 - initPinYinSelect2('#line',data,'');  
124 -  
125 - })  
126 144
127 - var line;  
128 - var startDate;  
129 - var endDate;  
130 - $("#query").on("click",function(){  
131 -  
132 - line = $("#line").val();  
133 - startDate1=$("#startDate").val();  
134 - endDate1=$("#endDate").val();  
135 -  
136 - if(startDate1!=''&&endDate1!=''){  
137 - $post('/mcy_forms/allline',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){  
138 - // 把数据填充到模版中  
139 - var tbodyHtml = template('allline',{list:result});  
140 - // 把渲染好的模版html文本追加到表格中  
141 - $('#tbody').html(tbodyHtml);  
142 - line = $("#line").val();  
143 - startDate = $("#startDate").val();  
144 - endDate = $("#endDate").val();  
145 - $("#sDate").text(startDate);  
146 - $("#eDate").text(endDate);  
147 -  
148 - var total_jh = 0;  
149 - var total_sj = 0,total_ccl = 0,total_bcjh = 0;  
150 - var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0;  
151 - var total_gs=0;  
152 - var total_zhgs=0;  
153 - $.each(result, function(i, obj) {  
154 - total_gs +=Number(obj.gsgs);  
155 - total_zhgs +=Number(obj.fgsgs);  
156 - total_jh = Number(obj.cchjh)+Number(total_jh);  
157 - total_sj = Number(obj.cchsj)+Number(total_sj);  
158 -  
159 - total_ccl =(Number(total_sj)/Number(total_jh))*100;  
160 - total_bcjh = Number(obj.bcjh)+Number(total_bcjh);  
161 - total_bcsj = Number(obj.bcsj)+Number(total_bcsj);  
162 - total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100;  
163 -  
164 - });  
165 - $("#total_gs").text(total_gs);  
166 - $("#total_zhgs").text(total_zhgs);  
167 - $("#total_jh").text(total_jh);  
168 - $("#total_sj").text(total_sj);  
169 - $("#total_ccl").text(total_ccl.toFixed(2)+'%');  
170 - $("#total_bcjh").text(total_bcjh);  
171 - $("#total_bcsj").text(total_bcsj);  
172 - $("#total_bczxl").text(total_bczxl.toFixed(2)+'%');  
173 -  
174 - var temp = {};  
175 - var today_account = 0;  
176 -  
177 - temp["line"] = $("#line").text();  
178 - $.each(result, function(i, obj) {  
179 - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){  
180 - today_account++;  
181 - }  
182 - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");  
183 - });  
184 -  
185 - })  
186 -  
187 - }else{  
188 - alert("请选择时间范围!");  
189 - }  
190 - });  
191 -  
192 - $("#export").on("click",function(){  
193 - $post('/mcy_export/alllineExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){  
194 - window.open("/downloadFile/download?fileName=营运线路名称统计表"+moment(startDate).format("YYYYMMDD")); 145 + if (obj.length == 0) {
  146 + $("#gsdmDiv_allline").css('display', 'none');
  147 + $('#fgsdmDiv_allline').css('display', 'none');
  148 + } else if (obj.length == 1) {
  149 + $("#gsdmDiv_allline").css('display', 'none');
  150 + if (obj[0].children.length == 1 || obj[0].children.length == 0)
  151 + $('#fgsdmDiv_allline').css('display', 'none');
  152 + }
  153 + $('#gsdmAllline').html(options);
  154 + updateCompany();
195 }); 155 });
196 - }); 156 +
  157 + $("#gsdmAllline").on("change", updateCompany);
  158 + function updateCompany() {
  159 + var company = $('#gsdmAllline').val();
  160 + var options = '';
  161 + for (var i = 0; i < obj.length; i++) {
  162 + if (obj[i].companyCode == company) {
  163 + var children = obj[i].children;
  164 + for (var j = 0; j < children.length; j++) {
  165 + options += '<option value="'+children[j].code+'">'
  166 + + children[j].name + '</option>';
  167 + }
  168 + }
  169 + }
  170 + $('#fgsdmAllline').html(options);
  171 + }
  172 +
  173 + $.get('/basic/lineCode2Name', function(result) {
  174 + var data = [];
  175 +
  176 + for ( var code in result) {
  177 + data.push({
  178 + id : code,
  179 + text : result[code]
  180 + });
  181 + }
  182 + initPinYinSelect2('#line', data, '');
  183 +
  184 + })
  185 +
  186 + var line;
  187 + var startDate;
  188 + var endDate;
  189 + var gsdmAllline;
  190 + var fgsdmAllline;
  191 + $("#query").on("click",function() {
  192 + line = $("#line").val();
  193 + startDate1 = $("#startDate").val();
  194 + endDate1 = $("#endDate").val();
  195 + gsdmAllline = $("#gsdmAllline").val();
  196 + fgsdmAllline = $("#fgsdmAllline").val();
  197 + if (startDate1 != '' && endDate1 != '') {
  198 + $post('/mcy_forms/allline',{
  199 + /* gsdmAllline:gsdmAllline,fgsdmAllline:fgsdmAllline, */
  200 + line : line,
  201 + startDate : $("#startDate").val(),
  202 + endDate : $("#endDate").val(),
  203 + type : 'query'
  204 + },
  205 + function(result) {
  206 + // 把数据填充到模版中
  207 + var tbodyHtml = template('allline',
  208 + {
  209 + list : result
  210 + });
  211 + // 把渲染好的模版html文本追加到表格中
  212 + $('#tbody').html(tbodyHtml);
  213 + line = $("#line").val();
  214 + startDate = $("#startDate").val();
  215 + endDate = $("#endDate").val();
  216 + $("#sDate").text(startDate);
  217 + $("#eDate").text(endDate);
  218 +
  219 + var total_jh = 0;
  220 + var total_sj = 0, total_ccl = 0, total_bcjh = 0;
  221 + var total_bcjh = 0, total_bcsj = 0, total_bczxl = 0;
  222 + var total_gs = 0;
  223 + var total_zhgs = 0;
  224 + $
  225 + .each(
  226 + result,
  227 + function(i, obj) {
  228 + total_gs += Number(obj.gsgs);
  229 + total_zhgs += Number(obj.fgsgs);
  230 + total_jh = Number(obj.cchjh)
  231 + + Number(total_jh);
  232 + total_sj = Number(obj.cchsj)
  233 + + Number(total_sj);
  234 +
  235 + total_ccl = (Number(total_sj) / Number(total_jh)) * 100;
  236 + total_bcjh = Number(obj.bcjh)
  237 + + Number(total_bcjh);
  238 + total_bcsj = Number(obj.bcsj)
  239 + + Number(total_bcsj);
  240 + total_bczxl = (Number(total_bcsj) / Number(total_bcjh)) * 100;
  241 +
  242 + });
  243 + $("#total_gs").text(total_gs);
  244 + $("#total_zhgs").text(total_zhgs);
  245 + $("#total_jh").text(total_jh);
  246 + $("#total_sj").text(total_sj);
  247 + $("#total_ccl").text(
  248 + total_ccl.toFixed(2) + '%');
  249 + $("#total_bcjh").text(total_bcjh);
  250 + $("#total_bcsj").text(total_bcsj);
  251 + $("#total_bczxl").text(
  252 + total_bczxl.toFixed(2)
  253 + + '%');
  254 +
  255 + var temp = {};
  256 + var today_account = 0;
  257 +
  258 + temp["line"] = $("#line").text();
  259 + $
  260 + .each(
  261 + result,
  262 + function(i, obj) {
  263 + if (moment(
  264 + obj.schedule_date_str)
  265 + .format(
  266 + "YYYY-MM-DD") == moment(
  267 + obj.startDate)
  268 + .format(
  269 + "YYYY-MM-DD")) {
  270 + today_account++;
  271 + }
  272 + obj.updateDate = moment(
  273 + obj.startDate)
  274 + .format(
  275 + "YYYY-MM-DD HH:mm:ss");
  276 + });
  277 +
  278 + })
  279 +
  280 + } else {
  281 + alert("请选择时间范围!");
  282 + }
  283 + });
  284 +
  285 + $("#export").on(
  286 + "click",
  287 + function() {
  288 + $post('/mcy_export/alllineExport', {
  289 + line : line,
  290 + startDate : startDate,
  291 + endDate : endDate,
  292 + type : 'export'
  293 + }, function(result) {
  294 + window.open("/downloadFile/download?fileName=营运线路名称统计表"
  295 + + moment(startDate).format("YYYYMMDD"));
  296 + });
  297 + });
197 }); 298 });
198 </script> 299 </script>
199 <script type="text/html" id="allline"> 300 <script type="text/html" id="allline">
src/main/resources/static/pages/forms/statement/changetochange.html
1 <style type="text/css"> 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 - text-align: center;}  
15 -  
16 - .table > tbody + tbody {  
17 - border-top: 1px solid; }  
18 - .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{ text-align: center; }  
19 -.table-checkable tr > th:first-child, .table-checkable tr > td:first-child {  
20 - text-align: center;  
21 - max-width: initial;  
22 - min-width: 40px;  
23 - padding-left: 0;  
24 - padding-right: 0; 2 +.table-bordered {
  3 + border: 1px solid;
25 } 4 }
26 5
  6 +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td,
  7 + .table-bordered>tbody>tr>th, .table-bordered>tbody>tr>td,
  8 + .table-bordered>tfoot>tr>th, .table-bordered>tfoot>tr>td {
  9 + border: 1px solid;
  10 +}
  11 +
  12 +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td {
  13 + border-bottom-width: 2px;
  14 + text-align: center;
  15 +}
  16 +
  17 +.table>tbody+tbody {
  18 + border-top: 1px solid;
  19 +}
  20 +
  21 +.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th,
  22 + .table>thead>tr>td, .table>thead>tr>th {
  23 + text-align: center;
  24 +}
  25 +
  26 +.table-checkable tr>th:first-child, .table-checkable tr>td:first-child {
  27 + text-align: center;
  28 + max-width: initial;
  29 + min-width: 40px;
  30 + padding-left: 0;
  31 + padding-right: 0;
  32 +}
27 </style> 33 </style>
28 34
29 <div class="page-head"> 35 <div class="page-head">
@@ -37,58 +43,71 @@ @@ -37,58 +43,71 @@
37 <div class="portlet light porttlet-fit bordered"> 43 <div class="portlet light porttlet-fit bordered">
38 <div class="portlet-title"> 44 <div class="portlet-title">
39 <form class="form-inline" action="" method="post"> 45 <form class="form-inline" action="" method="post">
40 - <div style="display: inline-block;"> 46 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_change">
  47 + <span class="item-label" style="width: 80px;">公司: </span>
  48 + <select class="form-control" name="company" id="gsdmChange" style="width: 140px;"></select>
  49 + </div>
  50 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_change">
  51 + <span class="item-label" style="width: 80px;">分公司: </span>
  52 + <select class="form-control" name="subCompany" id="fgsdmChange" style="width: 140px;"></select>
  53 + </div>
  54 + <div style="display: inline-block;">
41 <span class="item-label" style="width: 80px;">线路: </span> 55 <span class="item-label" style="width: 80px;">线路: </span>
42 - <select class="form-control" name="line" id="line" style="width: 120px;"></select>  
43 - </div>  
44 - <div style="display: inline-block;margin-left: 15px;">  
45 - <span class="item-label" style="width: 80px;">开始时间: </span>  
46 - <input class="form-control" type="text" id="startDate" style="width: 120px;"/> 56 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
47 </div> 57 </div>
48 - <div style="display: inline-block;margin-left: 15px;">  
49 - <span class="item-label" style="width: 80px;">结束时间: </span>  
50 - <input class="form-control" type="text" id="endDate" style="width: 120px;"/>  
51 - </div>  
52 - <div style="display: inline-block;">  
53 - <span class="item-label" style="width: 120px;">类型: </span>  
54 - <select class="form-control" id="sel">  
55 - <option value="">请选择</option>  
56 - <option value="1">换人</option>  
57 - <option value="2">换车</option> 58 + <div style="display: inline-block; margin-left: 15px;">
  59 + <span class="item-label" style="width: 80px;">开始时间: </span> <input
  60 + class="form-control" type="text" id="startDate"
  61 + style="width: 120px;" />
  62 + </div>
  63 + <div style="display: inline-block; margin-left: 15px;">
  64 + <span class="item-label" style="width: 80px;">结束时间: </span> <input
  65 + class="form-control" type="text" id="endDate"
  66 + style="width: 120px;" />
  67 + </div>
  68 + <div style="display: inline-block;">
  69 + <span class="item-label" style="width: 120px;">类型: </span> <select
  70 + class="form-control" id="sel">
  71 + <option value="">请选择</option>
  72 + <option value="1">换人</option>
  73 + <option value="2">换车</option>
58 </select> 74 </select>
59 </div> 75 </div>
60 - <div class="form-group">  
61 - <input class="btn btn-default" type="button" id="query" value="筛选"/>  
62 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
63 - </div> 76 + <div class="form-group">
  77 + <input class="btn btn-default" type="button" id="query" value="筛选" />
  78 + <input class="btn btn-default" type="button" id="export"
  79 + value="导出" />
  80 + </div>
64 </form> 81 </form>
65 </div> 82 </div>
66 <div class="portlet-body"> 83 <div class="portlet-body">
67 - <div class="table-container" style="margin-top: 20px;overflow:auto;min-width: 1000px">  
68 - <table class="table table-bordered table-hover table-checkable" id="forms"> 84 + <div class="table-container"
  85 + style="margin-top: 20px; overflow: auto; min-width: 1000px">
  86 + <table class="table table-bordered table-hover table-checkable"
  87 + id="forms">
69 <thead> 88 <thead>
70 <tr> 89 <tr>
71 <th colspan="15">换人换车情况统计表</th> 90 <th colspan="15">换人换车情况统计表</th>
72 </tr> 91 </tr>
73 <tr> 92 <tr>
74 - <td rowspan="3" style=" padding-top: 50px;">日期</td>  
75 - <td rowspan="3" style=" padding-top: 50px;">公司</td>  
76 - <td rowspan="3" style=" padding-top: 50px;">分公司</td>  
77 - <td rowspan="3" style=" padding-top: 50px;">线路</td>  
78 - <td rowspan="3" style=" padding-top: 50px;">路牌</td>  
79 - <td rowspan="3" style=" padding-top: 50px;">发生时间</td>  
80 - <td rowspan="3" style=" padding-top: 50px;">修改时间</td> 93 + <td rowspan="3" style="padding-top: 50px;">日期</td>
  94 + <td rowspan="3" style="padding-top: 50px;">公司</td>
  95 + <td rowspan="3" style="padding-top: 50px;">分公司</td>
  96 + <td rowspan="3" style="padding-top: 50px;">线路</td>
  97 + <td rowspan="3" style="padding-top: 50px;">路牌</td>
  98 + <td rowspan="3" style="padding-top: 50px;">发生时间</td>
  99 + <td rowspan="3" style="padding-top: 50px;">修改时间</td>
81 <td colspan="2">配车</td> 100 <td colspan="2">配车</td>
82 <td colspan="4">人员</td> 101 <td colspan="4">人员</td>
83 - <td rowspan="3" style=" padding-top: 50px;">原因</td>  
84 - <td rowspan="3" style=" padding-top: 50px;">修改人</td> 102 + <td rowspan="3" style="padding-top: 50px;">原因</td>
  103 + <td rowspan="3" style="padding-top: 50px;">修改人</td>
85 </tr> 104 </tr>
86 <tr> 105 <tr>
87 <td>计划</td> 106 <td>计划</td>
88 <td>实际</td> 107 <td>实际</td>
89 <td colspan="2">计划</td> 108 <td colspan="2">计划</td>
90 <td colspan="2">实际</td> 109 <td colspan="2">实际</td>
91 - 110 +
92 </tr> 111 </tr>
93 <tr> 112 <tr>
94 <td>车号</td> 113 <td>车号</td>
@@ -100,7 +119,7 @@ @@ -100,7 +119,7 @@
100 </tr> 119 </tr>
101 </thead> 120 </thead>
102 <tbody> 121 <tbody>
103 - 122 +
104 </tbody> 123 </tbody>
105 </table> 124 </table>
106 </div> 125 </div>
@@ -110,94 +129,121 @@ @@ -110,94 +129,121 @@
110 </div> 129 </div>
111 130
112 <script> 131 <script>
113 - $(function(){ 132 + $(function() {
114 // 关闭左侧栏 133 // 关闭左侧栏
115 if (!$('body').hasClass('page-sidebar-closed')) 134 if (!$('body').hasClass('page-sidebar-closed'))
116 $('.menu-toggler.sidebar-toggler').click(); 135 $('.menu-toggler.sidebar-toggler').click();
117 - 136 +
118 $("#startDate,#endDate").datetimepicker({ 137 $("#startDate,#endDate").datetimepicker({
119 format : 'YYYY-MM-DD', 138 format : 'YYYY-MM-DD',
120 locale : 'zh-cn' 139 locale : 'zh-cn'
121 }); 140 });
  141 +
122 142
123 - $('#line').select2({  
124 - ajax: {  
125 - url: '/realSchedule/findLine',  
126 - type: 'post',  
127 - dataType: 'json',  
128 - delay: 150,  
129 - data: function(params){  
130 - return{line: params.term};  
131 - },  
132 - processResults: function (data) {  
133 - return {  
134 - results: data  
135 - };  
136 - },  
137 - cache: true  
138 - },  
139 - templateResult: function(repo){  
140 - if (repo.loading) return repo.text;  
141 - var h = '<span>'+repo.text+'</span>';  
142 - return h;  
143 - },  
144 - escapeMarkup: function (markup) { return markup; },  
145 - minimumInputLength: 1,  
146 - templateSelection: function(repo){  
147 - return repo.text;  
148 - },  
149 - language: {  
150 - noResults: function(){  
151 - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';  
152 - },  
153 - inputTooShort : function(e) {  
154 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';  
155 - },  
156 - searching : function() {  
157 - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';  
158 - }  
159 - }  
160 - });  
161 - var line;  
162 - var startDate;  
163 - var endDate;  
164 - $("#query").on("click",function(){  
165 - line = $("#line").val();  
166 - sel = $("#sel").val();  
167 - var startDate1=$("#startDate").val();  
168 - var endDate1=$("#endDate").val(); 143 + var obj = [];
  144 + $.get('/user/companyData', function(result){
  145 + obj = result;
  146 + var options = '';
  147 + for(var i = 0; i < obj.length; i++){
  148 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  149 + }
  150 + if(obj.length ==0){
  151 + $("#gsdmDiv_change").css('display','none');
  152 + $('#fgsdmDiv_change').css('display','none');
  153 + }else if(obj.length ==1){
  154 + $("#gsdmDiv_change").css('display','none');
  155 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  156 + $('#fgsdmDiv_change').css('display','none');
  157 + }
  158 + $('#gsdmChange').html(options);
  159 + updateCompany();
  160 + });
  161 +
  162 + $("#gsdmChange").on("change",updateCompany);
  163 + function updateCompany(){
  164 + var company = $('#gsdmChange').val();
  165 + var options = '';
  166 + for(var i = 0; i < obj.length; i++){
  167 + if(obj[i].companyCode == company){
  168 + var children = obj[i].children;
  169 + for(var j = 0; j < children.length; j++){
  170 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  171 + }
  172 + }
  173 + }
  174 + $('#fgsdmChange').html(options);
  175 + }
  176 +
  177 + $.get('/basic/lineCode2Name',function(result){
  178 + var data=[];
169 179
170 - if(startDate1!=''&&endDate1!=''){  
171 - $post('/mcy_forms/changetochange',{sel:sel,line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){  
172 - startDate = $("#startDate").val();  
173 - endDate = $("#endDate").val();  
174 - $("#sDate").text(startDate);  
175 - $("#eDate").text(endDate);  
176 - var temp = {};  
177 - var today_account = 0;  
178 - temp["line"] = $("#line").text();  
179 - $.each(result, function(i, obj) {  
180 - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){  
181 - today_account++;  
182 - }  
183 - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");  
184 - });  
185 - // 把数据填充到模版中  
186 - var tbodyHtml = template('changetochange',{list:result});  
187 - // 把渲染好的模版html文本追加到表格中  
188 - $('#forms tbody').html(tbodyHtml);  
189 - }) 180 + for(var code in result){
  181 + data.push({id: code, text: result[code]});
  182 + }
  183 + initPinYinSelect2('#line',data,'');
  184 +
  185 + })
190 186
191 - }else{  
192 - alert("请选择时间范围!");  
193 - }  
194 - });  
195 -  
196 - $("#export").on("click",function(){  
197 - $post('/mcy_export/changetochangeExport',{startDate:startDate,endDate:endDate,type:'export'},function(result){  
198 - window.open("/downloadFile/download?fileName=换人换车情况日统计"+moment(startDate).format("YYYYMMDD"));  
199 - });  
200 - }); 187 + var line;
  188 + var startDate;
  189 + var endDate;
  190 + $("#query").on(
  191 + "click",
  192 + function() {
  193 + line = $("#line").val();
  194 + sel = $("#sel").val();
  195 + var startDate1 = $("#startDate").val();
  196 + var endDate1 = $("#endDate").val();
  197 +
  198 + if (startDate1 != '' && endDate1 != '') {
  199 + $post('/mcy_forms/changetochange', {
  200 + sel : sel,
  201 + line : line,
  202 + startDate : $("#startDate").val(),
  203 + endDate : $("#endDate").val(),
  204 + type : 'query'
  205 + }, function(result) {
  206 + startDate = $("#startDate").val();
  207 + endDate = $("#endDate").val();
  208 + $("#sDate").text(startDate);
  209 + $("#eDate").text(endDate);
  210 + var temp = {};
  211 + var today_account = 0;
  212 + temp["line"] = $("#line").text();
  213 + $.each(result, function(i, obj) {
  214 + if (moment(obj.schedule_date_str).format(
  215 + "YYYY-MM-DD") == moment(obj.startDate)
  216 + .format("YYYY-MM-DD")) {
  217 + today_account++;
  218 + }
  219 + obj.updateDate = moment(obj.startDate).format(
  220 + "YYYY-MM-DD HH:mm:ss");
  221 + });
  222 + // 把数据填充到模版中
  223 + var tbodyHtml = template('changetochange', {
  224 + list : result
  225 + });
  226 + // 把渲染好的模版html文本追加到表格中
  227 + $('#forms tbody').html(tbodyHtml);
  228 + })
  229 +
  230 + } else {
  231 + alert("请选择时间范围!");
  232 + }
  233 + });
  234 +
  235 + $("#export").on(
  236 + "click",
  237 + function() {
  238 + $post('/mcy_export/changetochangeExport', {
  239 + startDate : startDate,
  240 + endDate : endDate,
  241 + type : 'export'
  242 + }, function(result) {
  243 + window.open("/downloadFile/download?fileName=换人换车情况日统计"
  244 + + moment(startDate).format("YYYYMMDD"));
  245 + });
  246 + });
201 }); 247 });
202 </script> 248 </script>
203 <script type="text/html" id="changetochange"> 249 <script type="text/html" id="changetochange">
src/main/resources/static/pages/forms/statement/correctStatis.html
@@ -147,7 +147,7 @@ @@ -147,7 +147,7 @@
147 initPinYinSelect2('#line',data,''); 147 initPinYinSelect2('#line',data,'');
148 148
149 line = ""; 149 line = "";
150 - updateModel(); 150 +// updateModel();
151 }); 151 });
152 152
153 var obj = []; 153 var obj = [];
@@ -285,17 +285,17 @@ @@ -285,17 +285,17 @@
285 line = $("#line").val(); 285 line = $("#line").val();
286 if(line == " ") 286 if(line == " ")
287 line = ""; 287 line = "";
288 - updateModel(); 288 +// updateModel();
289 }); 289 });
290 $('#startDate').on("blur", function(){ 290 $('#startDate').on("blur", function(){
291 startDate = $("#startDate").val(); 291 startDate = $("#startDate").val();
292 endDate = $("#endDate").val(); 292 endDate = $("#endDate").val();
293 - updateModel(); 293 +// updateModel();
294 }); 294 });
295 $('#endDate').on("blur", function(){ 295 $('#endDate').on("blur", function(){
296 startDate = $("#startDate").val(); 296 startDate = $("#startDate").val();
297 endDate = $("#endDate").val(); 297 endDate = $("#endDate").val();
298 - updateModel(); 298 +// updateModel();
299 }); 299 });
300 300
301 301
src/main/resources/static/pages/forms/statement/daily.html
@@ -98,7 +98,6 @@ @@ -98,7 +98,6 @@
98 for(var code in result){ 98 for(var code in result){
99 data.push({id: code, text: result[code]}); 99 data.push({id: code, text: result[code]});
100 } 100 }
101 - console.log(data);  
102 initPinYinSelect2('#line',data,''); 101 initPinYinSelect2('#line',data,'');
103 102
104 }) 103 })
@@ -106,9 +105,10 @@ @@ -106,9 +105,10 @@
106 var date; 105 var date;
107 $("#query").on("click",function(){ 106 $("#query").on("click",function(){
108 line = $("#line").val(); 107 line = $("#line").val();
  108 + var lineName=$("#select2-line-container").html();
109 date = $("#date").val(); 109 date = $("#date").val();
110 $get('/realSchedule/dailyInfo',{line:line,date:date,type:'query'},function(result){ 110 $get('/realSchedule/dailyInfo',{line:line,date:date,type:'query'},function(result){
111 - $("#form_line").text(line); 111 + $("#form_line").text(lineName);
112 $("#form_date").text(date); 112 $("#form_date").text(date);
113 var total_zgl = 0,total_ksgl = 0,total_yh = 0,total_bcs = 0; 113 var total_zgl = 0,total_ksgl = 0,total_yh = 0,total_bcs = 0;
114 $.each(result, function(i, obj) { 114 $.each(result, function(i, obj) {
src/main/resources/static/pages/forms/statement/executionrate.html
@@ -37,6 +37,14 @@ @@ -37,6 +37,14 @@
37 <div class="portlet light porttlet-fit bordered"> 37 <div class="portlet light porttlet-fit bordered">
38 <div class="portlet-title"> 38 <div class="portlet-title">
39 <form class="form-inline" action="" method="post"> 39 <form class="form-inline" action="" method="post">
  40 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_ececut">
  41 + <span class="item-label" style="width: 80px;">公司: </span>
  42 + <select class="form-control" name="company" id="gsdmEcecut" style="width: 140px;"></select>
  43 + </div>
  44 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_ececut">
  45 + <span class="item-label" style="width: 80px;">分公司: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdmEcecut" style="width: 140px;"></select>
  47 + </div> -->
40 <div style="display: inline-block;"> 48 <div style="display: inline-block;">
41 <span class="item-label" style="width: 80px;">线路: </span> 49 <span class="item-label" style="width: 80px;">线路: </span>
42 <select class="form-control" name="line" id="line" style="width: 120px;"></select> 50 <select class="form-control" name="line" id="line" style="width: 120px;"></select>
@@ -114,6 +122,42 @@ @@ -114,6 +122,42 @@
114 locale : 'zh-cn' 122 locale : 'zh-cn'
115 }); 123 });
116 124
  125 +
  126 + var obj = [];
  127 + $.get('/user/companyData', function(result){
  128 + obj = result;
  129 + var options = '';
  130 + for(var i = 0; i < obj.length; i++){
  131 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  132 + }
  133 +
  134 + if(obj.length ==0){
  135 + $("#gsdmDiv_ececut").css('display','none');
  136 + $('#fgsdmDiv_ececut').css('display','none');
  137 + }else if(obj.length ==1){
  138 + $("#gsdmDiv_ececut").css('display','none');
  139 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  140 + $('#fgsdmDiv_ececut').css('display','none');
  141 + }
  142 + $('#gsdmEcecut').html(options);
  143 + updateCompany();
  144 + });
  145 +
  146 + $("#gsdmEcecut").on("change",updateCompany);
  147 + function updateCompany(){
  148 + var company = $('#gsdmEcecut').val();
  149 + var options = '';
  150 + for(var i = 0; i < obj.length; i++){
  151 + if(obj[i].companyCode == company){
  152 + var children = obj[i].children;
  153 + for(var j = 0; j < children.length; j++){
  154 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  155 + }
  156 + }
  157 + }
  158 + $('#fgsdmEcecut').html(options);
  159 + }
  160 +
117 $.get('/basic/lineCode2Name',function(result){ 161 $.get('/basic/lineCode2Name',function(result){
118 var data=[]; 162 var data=[];
119 163
@@ -127,19 +171,23 @@ @@ -127,19 +171,23 @@
127 var line; 171 var line;
128 var startDate; 172 var startDate;
129 var endDate; 173 var endDate;
  174 + var gsdmEcecut;
  175 + var fgsdmEcecut;
130 $("#query").on("click",function(){ 176 $("#query").on("click",function(){
131 177
132 line = $("#line").val(); 178 line = $("#line").val();
133 startDate1=$("#startDate").val(); 179 startDate1=$("#startDate").val();
134 endDate1=$("#endDate").val(); 180 endDate1=$("#endDate").val();
135 - 181 + gsdmEcecut=$("#gsdmEcecut").val();
  182 + fgsdmEcecut=$("#fgsdmEcecut").val();
136 if(startDate1!=''&&endDate1!=''){ 183 if(startDate1!=''&&endDate1!=''){
137 - $post('/mcy_forms/executionrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ 184 + $post('/mcy_forms/executionrate',{/* gsdmEcecut:gsdmEcecut,fgsdmEcecut:fgsdmEcecut, */line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){
138 // 把数据填充到模版中 185 // 把数据填充到模版中
139 var tbodyHtml = template('executionrate',{list:result}); 186 var tbodyHtml = template('executionrate',{list:result});
140 // 把渲染好的模版html文本追加到表格中 187 // 把渲染好的模版html文本追加到表格中
141 $('#tbody').html(tbodyHtml); 188 $('#tbody').html(tbodyHtml);
142 line = $("#line").val(); 189 line = $("#line").val();
  190 +
143 startDate = $("#startDate").val(); 191 startDate = $("#startDate").val();
144 endDate = $("#endDate").val(); 192 endDate = $("#endDate").val();
145 $("#sDate").text(startDate); 193 $("#sDate").text(startDate);
src/main/resources/static/pages/forms/statement/linepassengerflow.html
@@ -27,6 +27,14 @@ @@ -27,6 +27,14 @@
27 <div class="portlet light porttlet-fit bordered"> 27 <div class="portlet light porttlet-fit bordered">
28 <div class="portlet-title"> 28 <div class="portlet-title">
29 <form class="form-inline" action=""> 29 <form class="form-inline" action="">
  30 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_line">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdmLine" style="width: 140px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_line">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdmLine" style="width: 140px;"></select>
  37 + </div> -->
30 <div style="display: inline-block;"> 38 <div style="display: inline-block;">
31 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
32 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
@@ -74,6 +82,43 @@ @@ -74,6 +82,43 @@
74 locale : 'zh-cn' 82 locale : 'zh-cn'
75 }); 83 });
76 84
  85 + var obj = [];
  86 + $.get('/user/companyData', function(result){
  87 + obj = result;
  88 + var options = '';
  89 + for(var i = 0; i < obj.length; i++){
  90 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  91 + }
  92 +
  93 + if(obj.length ==0){
  94 + $("#gsdmDiv_line").css('display','none');
  95 + $('#fgsdmDiv_line').css('display','none');
  96 + }else if(obj.length ==1){
  97 + $("#gsdmDiv_line").css('display','none');
  98 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  99 + $('#fgsdmDiv_line').css('display','none');
  100 + }
  101 + $('#gsdmLine').html(options);
  102 + updateCompany();
  103 + });
  104 +
  105 + $("#gsdmLine").on("change",updateCompany);
  106 + function updateCompany(){
  107 + var company = $('#gsdmLine').val();
  108 + var options = '';
  109 + for(var i = 0; i < obj.length; i++){
  110 + if(obj[i].companyCode == company){
  111 + var children = obj[i].children;
  112 + for(var j = 0; j < children.length; j++){
  113 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  114 + }
  115 + }
  116 + }
  117 + $('#fgsdmLine').html(options);
  118 + }
  119 +
  120 +
  121 +
77 $.get('/basic/lineCode2Name',function(result){ 122 $.get('/basic/lineCode2Name',function(result){
78 var data=[]; 123 var data=[];
79 124
@@ -85,10 +130,17 @@ @@ -85,10 +130,17 @@
85 130
86 }) 131 })
87 132
  133 +
  134 + var line;
  135 + var date;
  136 + var gsdmLine;
  137 + var fgsdmLine;
88 $("#query").on("click",function(){ 138 $("#query").on("click",function(){
89 var line = $("#line").val(); 139 var line = $("#line").val();
90 var date = $("#date").val(); 140 var date = $("#date").val();
91 - $post('/mcy_forms/linepasswengerflow',{line:line,date:date},function(result){ 141 + var gsdmLine = $("#gsdmLine").val();
  142 + var fgsdmLine = $("#fgsdmLine").val();
  143 + $post('/mcy_forms/linepasswengerflow',{/* gsdmLine:gsdmLine,fgsdmLine:fgsdmLine, */line:line,date:date,type:'query'},function(result){
92 $.each(result, function(i, obj) { 144 $.each(result, function(i, obj) {
93 obj.requestType = reqCodeMap[obj.requestType]; 145 obj.requestType = reqCodeMap[obj.requestType];
94 }); 146 });
src/main/resources/static/pages/forms/statement/operationservice.html
1 <style type="text/css"> 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 - text-align: center; }  
15 -  
16 - .table > tbody + tbody {  
17 - border-top: 1px solid; } 2 +.table-bordered {
  3 + border: 1px solid;
  4 +}
  5 +
  6 +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td,
  7 + .table-bordered>tbody>tr>th, .table-bordered>tbody>tr>td,
  8 + .table-bordered>tfoot>tr>th, .table-bordered>tfoot>tr>td {
  9 + border: 1px solid;
  10 +}
  11 +
  12 +.table-bordered>thead>tr>th, .table-bordered>thead>tr>td {
  13 + border-bottom-width: 2px;
  14 + text-align: center;
  15 +}
  16 +
  17 +.table>tbody+tbody {
  18 + border-top: 1px solid;
  19 +}
18 </style> 20 </style>
19 21
20 <div class="page-head"> 22 <div class="page-head">
@@ -22,54 +24,53 @@ @@ -22,54 +24,53 @@
22 <h1>运营服务阶段报表</h1> 24 <h1>运营服务阶段报表</h1>
23 </div> 25 </div>
24 </div> 26 </div>
25 -  
26 -<div class="row">  
27 - <div class="col-md-12">  
28 - <div class="portlet light porttlet-fit bordered">  
29 - <div class="portlet-title">  
30 - <form class="form-inline" action="">  
31 - <!-- <div style="display: inline-block;">  
32 - <span class="item-label" style="width: 120px;">公司: </span>  
33 - <select class="form-control">  
34 - <option value="normal">请选择</option>  
35 - <option value="22">金高公司</option>  
36 - <option value="05">杨高公司</option>  
37 - <option value="26">南汇公司</option>  
38 - <option value="55">上南公司</option>  
39 - <option value="77">闵行公司</option>  
40 - </select>  
41 - <select class="form-control">  
42 - <option value="22">金高公司</option>  
43 - <option value="05">杨高公司</option>  
44 - <option value="26">南汇公司</option>  
45 - <option value="55">上南公司</option>  
46 - <option value="77">闵行公司</option>  
47 - </select>  
48 - </div> -->  
49 - <div style="display: inline-block;">  
50 - <span class="item-label" style="width: 80px;">线路: </span>  
51 - <select class="form-control" name="line" id="line" style="width: 136px;"></select>  
52 - </div>  
53 - <div style="display: inline-block;margin-left: 15px;">  
54 - <span class="item-label" style="width: 80px;">开始时间: </span>  
55 - <input class="form-control" type="text" id="startDate" style="width: 120px;"/>  
56 - </div>  
57 - <div style="display: inline-block;margin-left: 15px;">  
58 - <span class="item-label" style="width: 80px;">结束时间: </span>  
59 - <input class="form-control" type="text" id="endDate" style="width: 120px;"/>  
60 - </div>  
61 - <div style="display: inline-block;margin-left: 15px">  
62 - <span class="item-label" style="width: 150px;">统计: </span>  
63 - </div>  
64 - <div class="form-group">  
65 - <input class="btn btn-default" type="button" id="query" value="筛选"/>  
66 - <input class="btn btn-default" type="button" id="export" value="导出"/>  
67 - </div>  
68 - </form>  
69 - </div>  
70 - <div class="portlet-body">  
71 - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">  
72 - <table class="table table-bordered table-hover table-checkable" id="forms"> 27 +
  28 +<div class="row">
  29 + <div class="col-md-12">
  30 + <div class="portlet light porttlet-fit bordered">
  31 + <div class="portlet-title">
  32 + <form class="form-inline" action="" method="post">
  33 + <!--<div style="display: inline-block; margin-left: 33px;"
  34 + id="gsdmDiv_operat">
  35 + <span class="item-label" style="width: 80px;">公司: </span> <select
  36 + class="form-control" name="company" id="gsdmOperat"
  37 + style="width: 140px;"></select>
  38 + </div>
  39 + <div style="display: inline-block; margin-left: 24px;"
  40 + id="fgsdmDiv_operat">
  41 + <span class="item-label" style="width: 80px;">分公司: </span> <select
  42 + class="form-control" name="subCompany" id="fgsdmOperat"
  43 + style="width: 140px;"></select>
  44 + </div> -->
  45 + <div style="display: inline-block;">
  46 + <span class="item-label" style="width: 80px;">线路: </span> <select
  47 + class="form-control" name="line" id="line" style="width: 180px;"></select>
  48 + </div>
  49 + <div style="display: inline-block; margin-left: 15px;">
  50 + <span class="item-label" style="width: 80px;">开始时间: </span> <input
  51 + class="form-control" type="text" id="startDate"
  52 + style="width: 120px;" />
  53 + </div>
  54 + <div style="display: inline-block; margin-left: 15px;">
  55 + <span class="item-label" style="width: 80px;">结束时间: </span> <input
  56 + class="form-control" type="text" id="endDate"
  57 + style="width: 120px;" />
  58 + </div>
  59 + <div style="display: inline-block; margin-left: 15px">
  60 + <span class="item-label" style="width: 150px;">统计: </span>
  61 + </div>
  62 + <div class="form-group">
  63 + <input class="btn btn-default" type="button" id="query" value="筛选" />
  64 + <input class="btn btn-default" type="button" id="export"
  65 + value="导出" />
  66 + </div>
  67 + </form>
  68 + </div>
  69 + <div class="portlet-body">
  70 + <div class="table-container"
  71 + style="margin-top: 10px; overflow: auto; min-width: 906px">
  72 + <table class="table table-bordered table-hover table-checkable"
  73 + id="forms">
73 <thead> 74 <thead>
74 <tr> 75 <tr>
75 <th>序号</th> 76 <th>序号</th>
@@ -82,102 +83,133 @@ @@ -82,102 +83,133 @@
82 </tr> 83 </tr>
83 </thead> 84 </thead>
84 <tbody> 85 <tbody>
85 - 86 +
86 </tbody> 87 </tbody>
87 </table> 88 </table>
88 - </div>  
89 - </div>  
90 - </div>  
91 - </div>  
92 -</div>  
93 -  
94 -<script>  
95 - $(function(){  
96 - // 关闭左侧栏  
97 - if (!$('body').hasClass('page-sidebar-closed')) 89 + </div>
  90 + </div>
  91 + </div>
  92 + </div>
  93 +</div>
  94 +
  95 +<script>
  96 + $(function() {
  97 + // 关闭左侧栏
  98 + if (!$('body').hasClass('page-sidebar-closed'))
98 $('.menu-toggler.sidebar-toggler').click(); 99 $('.menu-toggler.sidebar-toggler').click();
99 -  
100 - $("#startDate,#endDate").datetimepicker({  
101 - format : 'YYYY-MM-DD',  
102 - locale : 'zh-cn' 100 +
  101 + $("#startDate,#endDate").datetimepicker({
  102 + format : 'YYYY-MM-DD',
  103 + locale : 'zh-cn'
103 }); 104 });
104 -  
105 -  
106 - $.get('/basic/lineCode2Name',function(result){  
107 - var data=[];  
108 -  
109 - for(var code in result){  
110 - data.push({id: code, text: result[code]}); 105 +
  106 + $.get('/basic/lineCode2Name', function(result) {
  107 + var data = [];
  108 +
  109 + for ( var code in result) {
  110 + data.push({
  111 + id : code,
  112 + text : result[code]
  113 + });
111 } 114 }
112 console.log(data); 115 console.log(data);
113 - initPinYinSelect2('#line',data,'');  
114 - 116 + initPinYinSelect2('#line', data, '');
  117 +
115 }) 118 })
116 -  
117 - $('#lpName').select2({  
118 - ajax: {  
119 - url: '/realSchedule/findLpName',  
120 - type: 'post',  
121 - dataType: 'json',  
122 - delay: 150,  
123 - data: function(params){  
124 - return{lpName: params.term};  
125 - },  
126 - processResults: function (data) {  
127 - return {  
128 - results: data  
129 - };  
130 - },  
131 - cache: true  
132 - },  
133 - templateResult: function(repo){  
134 - if (repo.loading) return repo.text;  
135 - var h = '<span>'+repo.text+'</span>';  
136 - return h;  
137 - },  
138 - escapeMarkup: function (markup) { return markup; },  
139 - minimumInputLength: 1,  
140 - templateSelection: function(repo){  
141 - return repo.text;  
142 - },  
143 - language: {  
144 - noResults: function(){  
145 - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>';  
146 - },  
147 - inputTooShort : function(e) {  
148 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>';  
149 - },  
150 - searching : function() {  
151 - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>';  
152 - }  
153 - }  
154 - });  
155 - $("#query").on("click",function(){  
156 - var line = $("#line").val();  
157 - var startDate = $("#startDate").val();  
158 - var endDate = $("#endDate").val();  
159 - var lpName = $("#lpName").val();  
160 - $post("/mcy_forms/operationservice",{line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){  
161 - $("#sDate").text(startDate);  
162 - $("#eDate").text(endDate);  
163 - var temp = {};  
164 - var today_account = 0;  
165 - temp["line"] = $("#line").text();  
166 - $.each(result, function(i, obj) {  
167 - if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){  
168 - today_account++;  
169 - }  
170 - obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");  
171 - });  
172 - console.log(result);  
173 - var operationservice = template('operationservice',{list:result});  
174 - // 把渲染好的模版html文本追加到表格中  
175 - $('#forms tbody').html(operationservice);  
176 -  
177 - });  
178 - });  
179 - });  
180 -</script> 119 +
  120 + var obj = [];
  121 + $.get('/user/companyData', function(result) {
  122 + obj = result;
  123 + var options = '';
  124 + for (var i = 0; i < obj.length; i++) {
  125 + options += '<option value="'+obj[i].companyCode+'">'
  126 + + obj[i].companyName + '</option>';
  127 + }
  128 +
  129 + if (obj.length == 0) {
  130 + $("#gsdmDiv_operat").css('display', 'none');
  131 + $('#fgsdmDiv_operat').css('display', 'none');
  132 + } else if (obj.length == 1) {
  133 + $("#gsdmDiv_operat").css('display', 'none');
  134 + if (obj[0].children.length == 1 || obj[0].children.length == 0)
  135 + $('#fgsdmDiv_operat').css('display', 'none');
  136 + }
  137 + $('#gsdmOperat').html(options);
  138 + updateCompany();
  139 + });
  140 +
  141 + $("#gsdmOperat").on("change", updateCompany);
  142 + function updateCompany() {
  143 + var company = $('#gsdmOperat').val();
  144 + var options = '';
  145 + for (var i = 0; i < obj.length; i++) {
  146 + if (obj[i].companyCode == company) {
  147 + var children = obj[i].children;
  148 + for (var j = 0; j < children.length; j++) {
  149 + options += '<option value="'+children[j].code+'">'
  150 + + children[j].name + '</option>';
  151 + }
  152 + }
  153 + }
  154 + $('#fgsdmOperat').html(options);
  155 + }
  156 +
  157 + $.get('/basic/lineCode2Name', function(result) {
  158 + var data = [];
  159 +
  160 + for ( var code in result) {
  161 + data.push({
  162 + id : code,
  163 + text : result[code]
  164 + });
  165 + }
  166 + initPinYinSelect2('#line', data, '');
  167 +
  168 + })
  169 +
  170 + $("#query").on(
  171 + "click",
  172 + function() {
  173 + var line = $("#line").val();
  174 + var startDate = $("#startDate").val();
  175 + var endDate = $("#endDate").val();
  176 + var lpName = $("#lpName").val();
  177 + /* var gsdmOperat = $("#gsdmOperat").val();
  178 + var fgsdmOperat = $("#fgsdmOperat").val(); */
  179 + $post("/mcy_forms/operationservice", {
  180 + /* gsdmOperat : gsdmOperat,
  181 + fgsdmOperat : fgsdmOperat, */
  182 + line : line,
  183 + startDate : startDate,
  184 + endDate : endDate,
  185 + lpName : lpName,
  186 + type:'query'
  187 + }, function(result) {
  188 + $("#sDate").text(startDate);
  189 + $("#eDate").text(endDate);
  190 + var temp = {};
  191 + var today_account = 0;
  192 + temp["line"] = $("#line").text();
  193 + $.each(result, function(i, obj) {
  194 + if (moment(obj.schedule_date_str).format(
  195 + "YYYY-MM-DD") == moment(obj.startDate)
  196 + .format("YYYY-MM-DD")) {
  197 + today_account++;
  198 + }
  199 + obj.updateDate = moment(obj.startDate).format(
  200 + "YYYY-MM-DD HH:mm:ss");
  201 + });
  202 + console.log(result);
  203 + var operationservice = template('operationservice', {
  204 + list : result
  205 + });
  206 + // 把渲染好的模版html文本追加到表格中
  207 + $('#forms tbody').html(operationservice);
  208 +
  209 + });
  210 + });
  211 + });
  212 +</script>
181 <script type="text/html" id="operationservice"> 213 <script type="text/html" id="operationservice">
182 {{each list as obj i}} 214 {{each list as obj i}}
183 <tr> 215 <tr>
@@ -192,7 +224,7 @@ @@ -192,7 +224,7 @@
192 {{/each}} 224 {{/each}}
193 {{if list.length == 0}} 225 {{if list.length == 0}}
194 <tr> 226 <tr>
195 - <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> 227 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
196 </tr> 228 </tr>
197 {{/if}} 229 {{/if}}
198 </script> 230 </script>
src/main/resources/static/pages/forms/statement/shifday.html
@@ -28,6 +28,14 @@ @@ -28,6 +28,14 @@
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 <form class="form-inline" action="" method="post"> 30 <form class="form-inline" action="" method="post">
  31 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_shif">
  32 + <span class="item-label" style="width: 80px;">公司: </span>
  33 + <select class="form-control" name="company" id="gsdmShif" style="width: 140px;"></select>
  34 + </div>
  35 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_shif">
  36 + <span class="item-label" style="width: 80px;">分公司: </span>
  37 + <select class="form-control" name="subCompany" id="fgsdmShif" style="width: 140px;"></select>
  38 + </div> -->
31 <div style="display: inline-block;"> 39 <div style="display: inline-block;">
32 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
33 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
@@ -97,6 +105,41 @@ $(function(){ @@ -97,6 +105,41 @@ $(function(){
97 locale : 'zh-cn' 105 locale : 'zh-cn'
98 }); 106 });
99 107
  108 + var obj = [];
  109 + $.get('/user/companyData', function(result){
  110 + obj = result;
  111 + var options = '';
  112 + for(var i = 0; i < obj.length; i++){
  113 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  114 + }
  115 +
  116 + if(obj.length ==0){
  117 + $("#gsdmDiv_shif").css('display','none');
  118 + $('#fgsdmDiv_shif').css('display','none');
  119 + }else if(obj.length ==1){
  120 + $("#gsdmDiv_shif").css('display','none');
  121 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  122 + $('#fgsdmDiv_shif').css('display','none');
  123 + }
  124 + $('#gsdmShif').html(options);
  125 + updateCompany();
  126 + });
  127 +
  128 + $("#gsdmShif").on("change",updateCompany);
  129 + function updateCompany(){
  130 + var company = $('#gsdmShif').val();
  131 + var options = '';
  132 + for(var i = 0; i < obj.length; i++){
  133 + if(obj[i].companyCode == company){
  134 + var children = obj[i].children;
  135 + for(var j = 0; j < children.length; j++){
  136 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  137 + }
  138 + }
  139 + }
  140 + $('#fgsdmShif').html(options);
  141 + }
  142 +
100 143
101 $.get('/basic/lineCode2Name',function(result){ 144 $.get('/basic/lineCode2Name',function(result){
102 var data=[]; 145 var data=[];
@@ -112,7 +155,9 @@ $(function(){ @@ -112,7 +155,9 @@ $(function(){
112 $("#query").on("click",function(){ 155 $("#query").on("click",function(){
113 var line = $("#line").val(); 156 var line = $("#line").val();
114 var date = $("#date").val(); 157 var date = $("#date").val();
115 - $post('/mcy_forms/shifday',{line:line,date:date},function(result){ 158 + /* var gsdmShif = $("#gsdmShif").val();
  159 + var fgsdmShif = $("#fgsdmShif").val(); */
  160 + $post('/mcy_forms/shifday',{/* gsdmShif:gsdmShif,fgsdmShif:fgsdmShif, */line:line,date:date},function(result){
116 $.each(result, function(i, obj) { 161 $.each(result, function(i, obj) {
117 obj.requestType = reqCodeMap[obj.requestType]; 162 obj.requestType = reqCodeMap[obj.requestType];
118 }); 163 });
src/main/resources/static/pages/forms/statement/shiftuehiclemanth.html
@@ -27,7 +27,15 @@ @@ -27,7 +27,15 @@
27 <div class="col-md-12"> 27 <div class="col-md-12">
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 - <form class="form-inline" action=""> 30 + <form class="form-inline" action="">
  31 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_manth">
  32 + <span class="item-label" style="width: 80px;">公司: </span>
  33 + <select class="form-control" name="company" id="gsdmManth" style="width: 140px;"></select>
  34 + </div>
  35 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_manth">
  36 + <span class="item-label" style="width: 80px;">分公司: </span>
  37 + <select class="form-control" name="subCompany" id="fgsdmManth" style="width: 140px;"></select>
  38 + </div> -->
31 <div style="display: inline-block;"> 39 <div style="display: inline-block;">
32 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
33 <select class="form-control" name="line" id="line" style="width: 136px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 136px;"></select>
@@ -87,6 +95,41 @@ @@ -87,6 +95,41 @@
87 locale : 'zh-cn' 95 locale : 'zh-cn'
88 }); 96 });
89 97
  98 + var obj = [];
  99 + $.get('/user/companyData', function(result){
  100 + obj = result;
  101 + var options = '';
  102 + for(var i = 0; i < obj.length; i++){
  103 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  104 + }
  105 +
  106 + if(obj.length ==0){
  107 + $("#gsdmDiv_manth").css('display','none');
  108 + $('#fgsdmDiv_manth').css('display','none');
  109 + }else if(obj.length ==1){
  110 + $("#gsdmDiv_manth").css('display','none');
  111 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  112 + $('#fgsdmDiv_manth').css('display','none');
  113 + }
  114 + $('#gsdmManth').html(options);
  115 + updateCompany();
  116 + });
  117 +
  118 + $("#gsdmManth").on("change",updateCompany);
  119 + function updateCompany(){
  120 + var company = $('#gsdmManth').val();
  121 + var options = '';
  122 + for(var i = 0; i < obj.length; i++){
  123 + if(obj[i].companyCode == company){
  124 + var children = obj[i].children;
  125 + for(var j = 0; j < children.length; j++){
  126 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  127 + }
  128 + }
  129 + }
  130 + $('#fgsdmManth').html(options);
  131 + }
  132 +
90 133
91 $.get('/basic/lineCode2Name',function(result){ 134 $.get('/basic/lineCode2Name',function(result){
92 var data=[]; 135 var data=[];
@@ -141,7 +184,9 @@ @@ -141,7 +184,9 @@
141 var startDate = $("#startDate").val(); 184 var startDate = $("#startDate").val();
142 var endDate = $("#endDate").val(); 185 var endDate = $("#endDate").val();
143 var lpName = $("#lpName").val(); 186 var lpName = $("#lpName").val();
144 - $post("/mcy_forms/shiftuehiclemanth",{line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ 187 + /* var gsdmManth= $("#gsdmManth").val();
  188 + var fgsdmManth= $("#fgsdmManth").val(); */
  189 + $post("/mcy_forms/shiftuehiclemanth",{/* gsdmManth:gsdmManth,fgsdmManth:fgsdmManth, */line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){
145 $("#sDate").text(startDate); 190 $("#sDate").text(startDate);
146 $("#eDate").text(endDate); 191 $("#eDate").text(endDate);
147 var temp = {}; 192 var temp = {};
@@ -153,7 +198,7 @@ @@ -153,7 +198,7 @@
153 } 198 }
154 obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss"); 199 obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
155 }); 200 });
156 - console.log(result); 201 +
157 var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result}); 202 var list_shiftuehiclemanth = template('list_shiftuehiclemanth',{list:result});
158 // 把渲染好的模版html文本追加到表格中 203 // 把渲染好的模版html文本追加到表格中
159 $('#forms tbody').html(list_shiftuehiclemanth); 204 $('#forms tbody').html(list_shiftuehiclemanth);
src/main/resources/static/pages/forms/statement/singledata.html
@@ -28,6 +28,14 @@ @@ -28,6 +28,14 @@
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 <form class="form-inline" action=""> 30 <form class="form-inline" action="">
  31 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_sing">
  32 + <span class="item-label" style="width: 80px;">公司: </span>
  33 + <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select>
  34 + </div>
  35 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_sing">
  36 + <span class="item-label" style="width: 80px;">分公司: </span>
  37 + <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select>
  38 + </div> -->
31 <div style="display: inline-block;"> 39 <div style="display: inline-block;">
32 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
33 <select class="form-control" name="line" id="line" style="width: 136px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 136px;"></select>
@@ -92,6 +100,41 @@ @@ -92,6 +100,41 @@
92 locale : 'zh-cn' 100 locale : 'zh-cn'
93 }); 101 });
94 102
  103 + var obj = [];
  104 + $.get('/user/companyData', function(result){
  105 + obj = result;
  106 + var options = '';
  107 + for(var i = 0; i < obj.length; i++){
  108 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  109 + }
  110 +
  111 + if(obj.length ==0){
  112 + $("#gsdmDiv_sing").css('display','none');
  113 + $('#fgsdmDiv_sing').css('display','none');
  114 + }else if(obj.length ==1){
  115 + $("#gsdmDiv_sing").css('display','none');
  116 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  117 + $('#fgsdmDiv_sing').css('display','none');
  118 + }
  119 + $('#gsdmSing').html(options);
  120 + updateCompany();
  121 + });
  122 +
  123 + $("#gsdmSing").on("change",updateCompany);
  124 + function updateCompany(){
  125 + var company = $('#gsdmSing').val();
  126 + var options = '';
  127 + for(var i = 0; i < obj.length; i++){
  128 + if(obj[i].companyCode == company){
  129 + var children = obj[i].children;
  130 + for(var j = 0; j < children.length; j++){
  131 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  132 + }
  133 + }
  134 + }
  135 + $('#fgsdmSing').html(options);
  136 + }
  137 +
95 138
96 $.get('/basic/lineCode2Name',function(result){ 139 $.get('/basic/lineCode2Name',function(result){
97 var data=[]; 140 var data=[];
@@ -104,50 +147,15 @@ @@ -104,50 +147,15 @@
104 147
105 }) 148 })
106 149
107 - $('#lpName').select2({  
108 - ajax: {  
109 - url: '/realSchedule/findLpName',  
110 - type: 'post',  
111 - dataType: 'json',  
112 - delay: 150,  
113 - data: function(params){  
114 - return{lpName: params.term};  
115 - },  
116 - processResults: function (data) {  
117 - return {  
118 - results: data  
119 - };  
120 - },  
121 - cache: true  
122 - },  
123 - templateResult: function(repo){  
124 - if (repo.loading) return repo.text;  
125 - var h = '<span>'+repo.text+'</span>';  
126 - return h;  
127 - },  
128 - escapeMarkup: function (markup) { return markup; },  
129 - minimumInputLength: 1,  
130 - templateSelection: function(repo){  
131 - return repo.text;  
132 - },  
133 - language: {  
134 - noResults: function(){  
135 - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>';  
136 - },  
137 - inputTooShort : function(e) {  
138 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>';  
139 - },  
140 - searching : function() {  
141 - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>';  
142 - }  
143 - }  
144 - }); 150 +
145 $("#query").on("click",function(){ 151 $("#query").on("click",function(){
146 var line = $("#line").val(); 152 var line = $("#line").val();
147 var startDate = $("#startDate").val(); 153 var startDate = $("#startDate").val();
148 var endDate = $("#endDate").val(); 154 var endDate = $("#endDate").val();
149 var lpName = $("#lpName").val(); 155 var lpName = $("#lpName").val();
150 - $post("/mcy_forms/singledata",{line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){ 156 + /* var gsdmSing = $("#gsdmSing").val();
  157 + var fgsdmSing = $("#fgsdmSing").val(); */
  158 + $post("/mcy_forms/singledata",{/* gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, */line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){
151 $("#sDate").text(startDate); 159 $("#sDate").text(startDate);
152 $("#eDate").text(endDate); 160 $("#eDate").text(endDate);
153 var temp = {}; 161 var temp = {};
src/main/resources/static/pages/forms/statement/turnoutrate.html
@@ -37,6 +37,14 @@ @@ -37,6 +37,14 @@
37 <div class="portlet light porttlet-fit bordered"> 37 <div class="portlet light porttlet-fit bordered">
38 <div class="portlet-title"> 38 <div class="portlet-title">
39 <form class="form-inline" action="" method="post"> 39 <form class="form-inline" action="" method="post">
  40 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_turn">
  41 + <span class="item-label" style="width: 80px;">公司: </span>
  42 + <select class="form-control" name="company" id="gsdmTurn" style="width: 140px;"></select>
  43 + </div>
  44 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_turn">
  45 + <span class="item-label" style="width: 80px;">分公司: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdmTurn" style="width: 140px;"></select>
  47 + </div> -->
40 <div style="display: inline-block;"> 48 <div style="display: inline-block;">
41 <span class="item-label" style="width: 80px;">线路: </span> 49 <span class="item-label" style="width: 80px;">线路: </span>
42 <select class="form-control" name="line" id="line" style="width: 120px;"></select> 50 <select class="form-control" name="line" id="line" style="width: 120px;"></select>
@@ -116,6 +124,42 @@ @@ -116,6 +124,42 @@
116 locale : 'zh-cn' 124 locale : 'zh-cn'
117 }); 125 });
118 126
  127 + var obj = [];
  128 + $.get('/user/companyData', function(result){
  129 + obj = result;
  130 + var options = '';
  131 + for(var i = 0; i < obj.length; i++){
  132 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  133 + }
  134 +
  135 + if(obj.length ==0){
  136 + $("#gsdmDiv_turn").css('display','none');
  137 + $('#fgsdmDiv_turn').css('display','none');
  138 + }else if(obj.length ==1){
  139 + $("#gsdmDiv_turn").css('display','none');
  140 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  141 + $('#fgsdmDiv_turn').css('display','none');
  142 + }
  143 + $('#gsdmTurn').html(options);
  144 + updateCompany();
  145 + });
  146 +
  147 + $("#gsdmTurn").on("change",updateCompany);
  148 + function updateCompany(){
  149 + var company = $('#gsdmTurn').val();
  150 + var options = '';
  151 + for(var i = 0; i < obj.length; i++){
  152 + if(obj[i].companyCode == company){
  153 + var children = obj[i].children;
  154 + for(var j = 0; j < children.length; j++){
  155 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  156 + }
  157 + }
  158 + }
  159 + $('#fgsdmTurn').html(options);
  160 + }
  161 +
  162 +
119 $.get('/basic/lineCode2Name',function(result){ 163 $.get('/basic/lineCode2Name',function(result){
120 var data=[]; 164 var data=[];
121 165
@@ -129,14 +173,17 @@ @@ -129,14 +173,17 @@
129 var line; 173 var line;
130 var startDate; 174 var startDate;
131 var endDate; 175 var endDate;
  176 + var gsdmTurn;
  177 + var fgsdmTurn;
132 $("#query").on("click",function(){ 178 $("#query").on("click",function(){
133 179
134 line = $("#line").val(); 180 line = $("#line").val();
135 startDate1=$("#startDate").val(); 181 startDate1=$("#startDate").val();
136 endDate1=$("#endDate").val(); 182 endDate1=$("#endDate").val();
137 - 183 + gsdmTurn=$("#gsdmTurn").val();
  184 + fgsdmTurn=$("#fgsdmTurn").val();
138 if(startDate1!=''&&endDate1!=''){ 185 if(startDate1!=''&&endDate1!=''){
139 - $post('/mcy_forms/turnoutrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){ 186 + $post('/mcy_forms/turnoutrate',{/* gsdmTurn:gsdmTurn,fgsdmTurn:fgsdmTurn, */line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){
140 // 把数据填充到模版中 187 // 把数据填充到模版中
141 var tbodyHtml = template('turnoutrate',{list:result}); 188 var tbodyHtml = template('turnoutrate',{list:result});
142 // 把渲染好的模版html文本追加到表格中 189 // 把渲染好的模版html文本追加到表格中
src/main/resources/static/pages/forms/statement/vehicleloading.html
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 19
20 <div class="page-head"> 20 <div class="page-head">
21 <div class="page-title"> 21 <div class="page-title">
22 - <h1>车辆加注</h1> 22 + <h1>车辆加注/消耗量</h1>
23 </div> 23 </div>
24 </div> 24 </div>
25 25
@@ -28,6 +28,14 @@ @@ -28,6 +28,14 @@
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 <form class="form-inline" action="" method="post"> 30 <form class="form-inline" action="" method="post">
  31 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_vehic">
  32 + <span class="item-label" style="width: 80px;">公司: </span>
  33 + <select class="form-control" name="company" id="gsdmVehic" style="width: 140px;"></select>
  34 + </div>
  35 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_vehic">
  36 + <span class="item-label" style="width: 80px;">分公司: </span>
  37 + <select class="form-control" name="subCompany" id="fgsdmVehic" style="width: 140px;"></select>
  38 + </div> -->
31 <div style="display: inline-block;"> 39 <div style="display: inline-block;">
32 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
33 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
@@ -82,7 +90,40 @@ @@ -82,7 +90,40 @@
82 locale : 'zh-cn' 90 locale : 'zh-cn'
83 }); 91 });
84 92
85 - 93 + $.get('/user/companyData', function(result){
  94 + obj = result;
  95 + var options = '';
  96 + for(var i = 0; i < obj.length; i++){
  97 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  98 + }
  99 +
  100 + if(obj.length ==0){
  101 + $("#gsdmDiv_vehic").css('display','none');
  102 + $('#fgsdmDiv_vehic').css('display','none');
  103 + }else if(obj.length ==1){
  104 + $("#gsdmDiv_vehic").css('display','none');
  105 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  106 + $('#fgsdmDiv_vehic').css('display','none');
  107 + }
  108 + $('#gsdmVehic').html(options);
  109 + updateCompany();
  110 + });
  111 +
  112 + $("#gsdmVehic").on("change",updateCompany);
  113 + function updateCompany(){
  114 + var company = $('#gsdmVehic').val();
  115 + var options = '';
  116 + for(var i = 0; i < obj.length; i++){
  117 + if(obj[i].companyCode == company){
  118 + var children = obj[i].children;
  119 + for(var j = 0; j < children.length; j++){
  120 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  121 + }
  122 + }
  123 + }
  124 + $('#fgsdmVehic').html(options);
  125 + }
  126 +
86 $.get('/basic/lineCode2Name',function(result){ 127 $.get('/basic/lineCode2Name',function(result){
87 var data=[]; 128 var data=[];
88 129
@@ -94,50 +135,13 @@ @@ -94,50 +135,13 @@
94 135
95 }) 136 })
96 137
97 -  
98 - $('#lpName').select2({  
99 - ajax: {  
100 - url: '/realSchedule/findLpName',  
101 - type: 'post',  
102 - dataType: 'json',  
103 - delay: 150,  
104 - data: function(params){  
105 - return{lpName: params.term};  
106 - },  
107 - processResults: function (data) {  
108 - return {  
109 - results: data  
110 - };  
111 - },  
112 - cache: true  
113 - },  
114 - templateResult: function(repo){  
115 - if (repo.loading) return repo.text;  
116 - var h = '<span>'+repo.text+'</span>';  
117 - return h;  
118 - },  
119 - escapeMarkup: function (markup) { return markup; },  
120 - minimumInputLength: 1,  
121 - templateSelection: function(repo){  
122 - return repo.text;  
123 - },  
124 - language: {  
125 - noResults: function(){  
126 - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>';  
127 - },  
128 - inputTooShort : function(e) {  
129 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>';  
130 - },  
131 - searching : function() {  
132 - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>';  
133 - }  
134 - }  
135 - }); 138 +
136 $("#query").on("click",function(){ 139 $("#query").on("click",function(){
137 var line = $("#line").val(); 140 var line = $("#line").val();
138 var date = $("#date").val(); 141 var date = $("#date").val();
139 - $(".hidden").removeClass("hidden");  
140 - $post("/mcy_forms/vehicleloading",{line:line,data:date},function(result){ 142 + /* var gsdmVehic = $("#gsdmVehic").val();
  143 + var fgsdmVehic = $("#fgsdmVehic").val(); */
  144 + $post('/mcy_forms/vehicleloading',{line:line,data:date},function(result){
141 // 把数据填充到模版中 145 // 把数据填充到模版中
142 var tbodyHtml = template('vehicleloading',{list:result}); 146 var tbodyHtml = template('vehicleloading',{list:result});
143 // 把渲染好的模版html文本追加到表格中 147 // 把渲染好的模版html文本追加到表格中
src/main/resources/static/pages/forms/statement/waybillday.html
@@ -28,6 +28,14 @@ @@ -28,6 +28,14 @@
28 <div class="portlet light porttlet-fit bordered"> 28 <div class="portlet light porttlet-fit bordered">
29 <div class="portlet-title"> 29 <div class="portlet-title">
30 <form class="form-inline" action="" method="post"> 30 <form class="form-inline" action="" method="post">
  31 + <!-- <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_waybillday">
  32 + <span class="item-label" style="width: 80px;">公司: </span>
  33 + <select class="form-control" name="company" id="gsdmWaybillday" style="width: 140px;"></select>
  34 + </div>
  35 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_waybillday">
  36 + <span class="item-label" style="width: 80px;">分公司: </span>
  37 + <select class="form-control" name="subCompany" id="fgsdmWaybillday" style="width: 140px;"></select>
  38 + </div> -->
31 <div style="display: inline-block;"> 39 <div style="display: inline-block;">
32 <span class="item-label" style="width: 80px;">线路: </span> 40 <span class="item-label" style="width: 80px;">线路: </span>
33 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 41 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
@@ -79,6 +87,42 @@ @@ -79,6 +87,42 @@
79 locale : 'zh-cn' 87 locale : 'zh-cn'
80 }); 88 });
81 89
  90 + var obj = [];
  91 + $.get('/user/companyData', function(result){
  92 + obj = result;
  93 + var options = '';
  94 + for(var i = 0; i < obj.length; i++){
  95 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  96 + }
  97 +
  98 + if(obj.length ==0){
  99 + $("#gsdmDiv_waybillday").css('display','none');
  100 + $('#fgsdmDiv_waybillday').css('display','none');
  101 + }else if(obj.length ==1){
  102 + $("#gsdmDiv_waybillday").css('display','none');
  103 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  104 + $('#fgsdmDiv_waybillday').css('display','none');
  105 + }
  106 + $('#gsdmWaybillday').html(options);
  107 + updateCompany();
  108 + });
  109 +
  110 + $("#gsdmWaybillday").on("change",updateCompany);
  111 + function updateCompany(){
  112 + var company = $('#gsdmWaybillday').val();
  113 + var options = '';
  114 + for(var i = 0; i < obj.length; i++){
  115 + if(obj[i].companyCode == company){
  116 + var children = obj[i].children;
  117 + for(var j = 0; j < children.length; j++){
  118 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  119 + }
  120 + }
  121 + }
  122 + $('#fgsdmWaybillday').html(options);
  123 + }
  124 +
  125 +
82 $.get('/basic/lineCode2Name',function(result){ 126 $.get('/basic/lineCode2Name',function(result){
83 var data=[]; 127 var data=[];
84 128
@@ -91,10 +135,15 @@ @@ -91,10 +135,15 @@
91 }) 135 })
92 var line; 136 var line;
93 var date; 137 var date;
  138 + var gsdmWaybillday;
  139 + var fgsdmWaybillday;
94 $("#query").on("click",function(){ 140 $("#query").on("click",function(){
95 line = $("#line").val(); 141 line = $("#line").val();
96 date = $("#date").val(); 142 date = $("#date").val();
97 - $post('/mcy_forms/waybillday',{line:line,date:$("#date").val(),type:'query'},function(result){ 143 + gsdmWaybillday=$("#gsdmWaybillday").val();
  144 + fgsdmWaybillday = $("#fgsdmWaybillday").val();
  145 +
  146 + $post('/mcy_forms/waybillday',{/* gsdmWaybillday:gsdmWaybillday,fgsdmWaybillday:fgsdmWaybillday, */line:line,date:$("#date").val(),type:'query'},function(result){
98 $.each(result, function(i, obj) { 147 $.each(result, function(i, obj) {
99 obj.requestType = reqCodeMap[obj.requestType]; 148 obj.requestType = reqCodeMap[obj.requestType];
100 }); 149 });
src/main/resources/static/pages/report/timetable/timetable.html
@@ -245,6 +245,7 @@ @@ -245,6 +245,7 @@
245 initPinYinSelect2('#line',data,''); 245 initPinYinSelect2('#line',data,'');
246 246
247 }) 247 })
  248 +
248 //查询 249 //查询
249 $("#query").on('click',function(){ 250 $("#query").on('click',function(){
250 console.log($("#gsdmTime").val()); 251 console.log($("#gsdmTime").val());
src/main/resources/static/pages/scheduleApp/Gruntfile.js
@@ -14,6 +14,9 @@ module.exports = function (grunt) { @@ -14,6 +14,9 @@ module.exports = function (grunt) {
14 }, 14 },
15 concat_route: { // 所有模块的route配置合并的js文件 15 concat_route: { // 所有模块的route配置合并的js文件
16 src: ['module/common/prj-common-ui-route-state.js'] 16 src: ['module/common/prj-common-ui-route-state.js']
  17 + },
  18 + concat_service: { // 所有模块的servie服务合并的js文件
  19 + src: ['module/common/prj-common-globalservice.js']
17 } 20 }
18 21
19 //, 22 //,
@@ -69,11 +72,13 @@ module.exports = function (grunt) { @@ -69,11 +72,13 @@ module.exports = function (grunt) {
69 'module/common/dts1/load/loadingWidget.js', // loading界面指令 72 'module/common/dts1/load/loadingWidget.js', // loading界面指令
70 'module/common/dts1/validation/remoteValidation.js',// 服务端验证指令 73 'module/common/dts1/validation/remoteValidation.js',// 服务端验证指令
71 'module/common/dts1/validation/remoteValidationt2.js',// 服务端验证指令(时刻表专用) 74 'module/common/dts1/validation/remoteValidationt2.js',// 服务端验证指令(时刻表专用)
  75 + 'module/common/dts1/validation/remoteValidation3.js',// 服务端验证指令
72 'module/common/dts1/select/saSelect.js', // select整合指令1 76 'module/common/dts1/select/saSelect.js', // select整合指令1
73 'module/common/dts1/select/saSelect2.js', // select整合指令2 77 'module/common/dts1/select/saSelect2.js', // select整合指令2
74 'module/common/dts1/select/saSelect3.js', // select整合指令3 78 'module/common/dts1/select/saSelect3.js', // select整合指令3
75 'module/common/dts1/select/saSelect4.js', // select整合指令4 79 'module/common/dts1/select/saSelect4.js', // select整合指令4
76 'module/common/dts1/select/saSelect5.js', // select整合指令5 80 'module/common/dts1/select/saSelect5.js', // select整合指令5
  81 + 'module/common/dts2/ttinfotable/mySelect.js', // select整合指令
77 'module/common/dts1/radioButton/saRadiogroup.js', // 单选框组整合指令 82 'module/common/dts1/radioButton/saRadiogroup.js', // 单选框组整合指令
78 'module/common/dts1/checkbox/saCheckboxgroup.js', // 多选框组整合指令 83 'module/common/dts1/checkbox/saCheckboxgroup.js', // 多选框组整合指令
79 'module/common/dts2/dateGroup/saDategroup.js', // 特殊日期选择指令 84 'module/common/dts2/dateGroup/saDategroup.js', // 特殊日期选择指令
@@ -104,6 +109,26 @@ module.exports = function (grunt) { @@ -104,6 +109,26 @@ module.exports = function (grunt) {
104 'module/core/ttInfoManage/detailedit/route.js' // 时刻表明细管理模块 109 'module/core/ttInfoManage/detailedit/route.js' // 时刻表明细管理模块
105 ], 110 ],
106 dest: 'module/common/prj-common-ui-route-state.js' 111 dest: 'module/common/prj-common-ui-route-state.js'
  112 + },
  113 + service: {
  114 + options: {
  115 + banner: '//所有模块service配置\n'
  116 + },
  117 + src: [
  118 + 'module/basicInfo/busInfoManage/service.js', // 车辆基础信息管理service
  119 + 'module/basicInfo/deviceInfoManage/service.js', // 设备信息管理service
  120 + 'module/basicInfo/employeeInfoManage/service.js', // 人员基础信息管理service
  121 + 'module/core/busConfig/service.js', // 车辆配置service
  122 + 'module/core/busLineInfoStat/service.js', // 线路运营概览service
  123 + 'module/core/employeeConfig/service.js', // 人员配置service
  124 + 'module/core/guideboardManage/service.js', // 路牌管理service
  125 + 'module/core/rerunManage/service.js', // 套跑管理service
  126 + 'module/core/schedulePlanManage/service.js', // 排班计划管理service
  127 + 'module/core/scheduleRuleManage/service.js', // 排班规则管理service
  128 + 'module/core/ttInfoManage/service.js', // 时刻表管理service
  129 + 'module/common/prj-common-globalservice-legacy.js' // 其他用service
  130 + ],
  131 + dest: 'module/common/prj-common-globalservice.js'
107 } 132 }
108 }, 133 },
109 134
@@ -440,4 +465,14 @@ module.exports = function (grunt) { @@ -440,4 +465,14 @@ module.exports = function (grunt) {
440 'clean:concat_route', 'concat:route' 465 'clean:concat_route', 'concat:route'
441 ]); 466 ]);
442 467
  468 + /*
  469 + 定义了一个service的grunt任务
  470 + 任务组有顺序,如下说明:
  471 + 1、clean:concat_route,清除合并生成的prj-common-globalservice.js文件
  472 + 2、concat:route,重新合并prj-common-globalservice.js文件
  473 + */
  474 + grunt.registerTask('service', [
  475 + 'clean:concat_service', 'concat:service'
  476 + ]);
  477 +
443 }; 478 };
444 \ No newline at end of file 479 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/edit.html
@@ -33,8 +33,8 @@ @@ -33,8 +33,8 @@
33 <div class="portlet-body form"> 33 <div class="portlet-body form">
34 <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm"> 34 <form ng-submit="ctrl.submit()" class="form-horizontal" novalidate name="myForm">
35 <!--<div class="alert alert-danger display-hide">--> 35 <!--<div class="alert alert-danger display-hide">-->
36 - <!--<button class="close" data-close="alert"></button>-->  
37 - <!--您的输入有误,请检查下面的输入项--> 36 + <!--<button class="close" data-close="alert"></button>-->
  37 + <!--您的输入有误,请检查下面的输入项-->
38 <!--</div>--> 38 <!--</div>-->
39 39
40 40
@@ -45,9 +45,9 @@ @@ -45,9 +45,9 @@
45 <div class="col-md-3"> 45 <div class="col-md-3">
46 <input type="text" class="form-control" 46 <input type="text" class="form-control"
47 name="insideCode" ng-model="ctrl.busInfoForSave.insideCode" 47 name="insideCode" ng-model="ctrl.busInfoForSave.insideCode"
48 - required ng-maxlength="8" 48 + required ng-maxlength="20"
49 remote-Validation 49 remote-Validation
50 - remotevtype="cl1" 50 + remotevtype="cars_zbh"
51 remotevparam="{{ {'insideCode_eq': ctrl.busInfoForSave.insideCode} | json}}" 51 remotevparam="{{ {'insideCode_eq': ctrl.busInfoForSave.insideCode} | json}}"
52 placeholder="请输入车辆内部编码"/> 52 placeholder="请输入车辆内部编码"/>
53 </div> 53 </div>
@@ -56,10 +56,10 @@ @@ -56,10 +56,10 @@
56 内部编号必须填写 56 内部编号必须填写
57 </div> 57 </div>
58 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.maxlength"> 58 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.maxlength">
59 - 内部编号长度不能超过8 59 + 内部编号长度不能超过20
60 </div> 60 </div>
61 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.remote"> 61 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.remote">
62 - 内部编号不能重复 62 + {{$remote_msg}}
63 </div> 63 </div>
64 </div> 64 </div>
65 65
@@ -78,6 +78,7 @@ @@ -78,6 +78,7 @@
78 datatype="gsType" 78 datatype="gsType"
79 required > 79 required >
80 </sa-Select3> 80 </sa-Select3>
  81 +
81 </div> 82 </div>
82 <!-- 隐藏块,显示验证信息 --> 83 <!-- 隐藏块,显示验证信息 -->
83 <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required"> 84 <div class="alert alert-danger well-sm" ng-show="myForm.gs.$error.required">
@@ -103,26 +104,40 @@ @@ -103,26 +104,40 @@
103 <label class="col-md-2 control-label">车辆编码*:</label> 104 <label class="col-md-2 control-label">车辆编码*:</label>
104 <div class="col-md-3"> 105 <div class="col-md-3">
105 <input type="text" class="form-control" 106 <input type="text" class="form-control"
106 - name="carCode" ng-model="ctrl.busInfoForSave.carCode"  
107 - required placeholder="请输入车辆编码"/> 107 + name="carCode" ng-model="ctrl.busInfoForSave.carCode"
  108 + required placeholder="请输入车辆编码"
  109 + remote-Validation
  110 + remotevtype="cars_clbh"
  111 + remotevparam="{{ {'carCode_eq': ctrl.busInfoForSave.carCode} | json}}"
  112 + />
108 </div> 113 </div>
109 <!-- 隐藏块,显示验证信息 --> 114 <!-- 隐藏块,显示验证信息 -->
110 <div class="alert alert-danger well-sm" ng-show="myForm.carCode.$error.required"> 115 <div class="alert alert-danger well-sm" ng-show="myForm.carCode.$error.required">
111 车辆编码必须填写 116 车辆编码必须填写
112 </div> 117 </div>
  118 + <div class="alert alert-danger well-sm" ng-show="myForm.carCode.$error.remote">
  119 + {{$remote_msg}}
  120 + </div>
113 </div> 121 </div>
114 122
115 <div class="form-group has-success has-feedback"> 123 <div class="form-group has-success has-feedback">
116 <label class="col-md-2 control-label">车牌号*:</label> 124 <label class="col-md-2 control-label">车牌号*:</label>
117 <div class="col-md-3"> 125 <div class="col-md-3">
118 <input type="text" class="form-control" 126 <input type="text" class="form-control"
119 - name="carPlate" ng-model="ctrl.busInfoForSave.carPlate"  
120 - required placeholder="请输入车牌号"/> 127 + name="carPlate" ng-model="ctrl.busInfoForSave.carPlate"
  128 + required placeholder="请输入车牌号"
  129 + remote-Validation
  130 + remotevtype="cars_cph"
  131 + remotevparam="{{ {'carPlate_eq': ctrl.busInfoForSave.carPlate} | json}}"
  132 + />
121 </div> 133 </div>
122 <!-- 隐藏快,显示验证信息 --> 134 <!-- 隐藏快,显示验证信息 -->
123 <div class="alert alert-danger well-sm" ng-show="myForm.carPlate.$error.required"> 135 <div class="alert alert-danger well-sm" ng-show="myForm.carPlate.$error.required">
124 车牌号必须填写 136 车牌号必须填写
125 </div> 137 </div>
  138 + <div class="alert alert-danger well-sm" ng-show="myForm.carPlate.$error.remote">
  139 + {{$remote_msg}}
  140 + </div>
126 </div> 141 </div>
127 142
128 <div class="form-group has-success has-feedback"> 143 <div class="form-group has-success has-feedback">
@@ -149,62 +164,69 @@ @@ -149,62 +164,69 @@
149 <label class="col-md-2 control-label">终端号*:</label> 164 <label class="col-md-2 control-label">终端号*:</label>
150 <div class="col-md-3"> 165 <div class="col-md-3">
151 <input type="text" class="form-control" 166 <input type="text" class="form-control"
152 - name="equipmentCode" ng-model="ctrl.busInfoForSave.equipmentCode"  
153 - required placeholder="请输入设备终端号"/> 167 + name="equipmentCode" ng-model="ctrl.busInfoForSave.equipmentCode"
  168 + required placeholder="请输入设备终端号"
  169 + remote-Validation
  170 + remotevtype="cars_sbbh"
  171 + remotevparam="{{ {'equipmentCode_eq': ctrl.busInfoForSave.equipmentCode} | json}}"
  172 + />
154 </div> 173 </div>
155 <!-- 隐藏块,显示验证信息 --> 174 <!-- 隐藏块,显示验证信息 -->
156 <div class="alert alert-danger well-sm" ng-show="myForm.equipmentCode.$error.required"> 175 <div class="alert alert-danger well-sm" ng-show="myForm.equipmentCode.$error.required">
157 设备终端号必须填写 176 设备终端号必须填写
158 </div> 177 </div>
  178 + <div class="alert alert-danger well-sm" ng-show="myForm.equipmentCode.$error.remote">
  179 + {{$remote_msg}}
  180 + </div>
159 </div> 181 </div>
160 182
161 <div class="form-group"> 183 <div class="form-group">
162 <label class="col-md-2 control-label">车型类别:</label> 184 <label class="col-md-2 control-label">车型类别:</label>
163 <div class="col-md-4"> 185 <div class="col-md-4">
164 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carClass" 186 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carClass"
165 - placeholder="请输入车型类别"/> 187 + placeholder="请输入车型类别"/>
166 </div> 188 </div>
167 </div> 189 </div>
168 <div class="form-group"> 190 <div class="form-group">
169 <label class="col-md-2 control-label">技术速度:</label> 191 <label class="col-md-2 control-label">技术速度:</label>
170 <div class="col-md-4"> 192 <div class="col-md-4">
171 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.speed" 193 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.speed"
172 - placeholder="请输入技术速度"/> 194 + placeholder="请输入技术速度"/>
173 </div> 195 </div>
174 </div> 196 </div>
175 <div class="form-group"> 197 <div class="form-group">
176 <label class="col-md-2 control-label">座位数:</label> 198 <label class="col-md-2 control-label">座位数:</label>
177 <div class="col-md-4"> 199 <div class="col-md-4">
178 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carSeatnNumber" 200 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carSeatnNumber"
179 - placeholder="请输入座位数"/> 201 + placeholder="请输入座位数"/>
180 </div> 202 </div>
181 </div> 203 </div>
182 <div class="form-group"> 204 <div class="form-group">
183 <label class="col-md-2 control-label">载客标准:</label> 205 <label class="col-md-2 control-label">载客标准:</label>
184 <div class="col-md-4"> 206 <div class="col-md-4">
185 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carStandard" 207 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carStandard"
186 - placeholder="请输入载客标准"/> 208 + placeholder="请输入载客标准"/>
187 </div> 209 </div>
188 </div> 210 </div>
189 <div class="form-group"> 211 <div class="form-group">
190 <label class="col-md-2 control-label">标准油耗/开空调:</label> 212 <label class="col-md-2 control-label">标准油耗/开空调:</label>
191 <div class="col-md-4"> 213 <div class="col-md-4">
192 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.kburnStandard" 214 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.kburnStandard"
193 - placeholder="请输入标准油耗/开空调"/> 215 + placeholder="请输入标准油耗/开空调"/>
194 </div> 216 </div>
195 </div> 217 </div>
196 <div class="form-group"> 218 <div class="form-group">
197 <label class="col-md-2 control-label">标准油耗/关空调:</label> 219 <label class="col-md-2 control-label">标准油耗/关空调:</label>
198 <div class="col-md-4"> 220 <div class="col-md-4">
199 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.gburnStandard" 221 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.gburnStandard"
200 - placeholder="请输入标准油耗/关空调"/> 222 + placeholder="请输入标准油耗/关空调"/>
201 </div> 223 </div>
202 </div> 224 </div>
203 <div class="form-group"> 225 <div class="form-group">
204 <label class="col-md-2 control-label">报废号:</label> 226 <label class="col-md-2 control-label">报废号:</label>
205 <div class="col-md-4"> 227 <div class="col-md-4">
206 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.scrapCode" 228 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.scrapCode"
207 - placeholder="请输入报废号"/> 229 + placeholder="请输入报废号"/>
208 </div> 230 </div>
209 </div> 231 </div>
210 232
@@ -229,56 +251,56 @@ @@ -229,56 +251,56 @@
229 <label class="col-md-2 control-label">厂牌型号1:</label> 251 <label class="col-md-2 control-label">厂牌型号1:</label>
230 <div class="col-md-4"> 252 <div class="col-md-4">
231 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.makeCodeOne" 253 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.makeCodeOne"
232 - placeholder="请输入厂牌型号1"/> 254 + placeholder="请输入厂牌型号1"/>
233 </div> 255 </div>
234 </div> 256 </div>
235 <div class="form-group"> 257 <div class="form-group">
236 <label class="col-md-2 control-label">厂牌型号2:</label> 258 <label class="col-md-2 control-label">厂牌型号2:</label>
237 <div class="col-md-4"> 259 <div class="col-md-4">
238 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.makeCodeTwo" 260 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.makeCodeTwo"
239 - placeholder="请输入厂牌型号2"/> 261 + placeholder="请输入厂牌型号2"/>
240 </div> 262 </div>
241 </div> 263 </div>
242 <div class="form-group"> 264 <div class="form-group">
243 <label class="col-md-2 control-label">车辆等级标准:</label> 265 <label class="col-md-2 control-label">车辆等级标准:</label>
244 <div class="col-md-4"> 266 <div class="col-md-4">
245 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carGride" 267 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carGride"
246 - placeholder="请输入车辆等级标准"/> 268 + placeholder="请输入车辆等级标准"/>
247 </div> 269 </div>
248 </div> 270 </div>
249 <div class="form-group"> 271 <div class="form-group">
250 <label class="col-md-2 control-label">出厂排放标准:</label> 272 <label class="col-md-2 control-label">出厂排放标准:</label>
251 <div class="col-md-4"> 273 <div class="col-md-4">
252 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.emissionsStandard" 274 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.emissionsStandard"
253 - placeholder="请输入出场排放标准"/> 275 + placeholder="请输入出场排放标准"/>
254 </div> 276 </div>
255 </div> 277 </div>
256 <div class="form-group"> 278 <div class="form-group">
257 <label class="col-md-2 control-label">发动机号码1:</label> 279 <label class="col-md-2 control-label">发动机号码1:</label>
258 <div class="col-md-4"> 280 <div class="col-md-4">
259 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.engineCodeOne" 281 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.engineCodeOne"
260 - placeholder="请输入发动机号码1"/> 282 + placeholder="请输入发动机号码1"/>
261 </div> 283 </div>
262 </div> 284 </div>
263 <div class="form-group"> 285 <div class="form-group">
264 <label class="col-md-2 control-label">发动机号码2:</label> 286 <label class="col-md-2 control-label">发动机号码2:</label>
265 <div class="col-md-4"> 287 <div class="col-md-4">
266 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.engineCodeTwo" 288 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.engineCodeTwo"
267 - placeholder="请输入发动机号码2"/> 289 + placeholder="请输入发动机号码2"/>
268 </div> 290 </div>
269 </div> 291 </div>
270 <div class="form-group"> 292 <div class="form-group">
271 <label class="col-md-2 control-label">车架号码1:</label> 293 <label class="col-md-2 control-label">车架号码1:</label>
272 <div class="col-md-4"> 294 <div class="col-md-4">
273 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carNumberOne" 295 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carNumberOne"
274 - placeholder="请输入车架号码1"/> 296 + placeholder="请输入车架号码1"/>
275 </div> 297 </div>
276 </div> 298 </div>
277 <div class="form-group"> 299 <div class="form-group">
278 <label class="col-md-2 control-label">车架号码2:</label> 300 <label class="col-md-2 control-label">车架号码2:</label>
279 <div class="col-md-4"> 301 <div class="col-md-4">
280 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carNumberTwo" 302 <input type="text" class="form-control" ng-model="ctrl.busInfoForSave.carNumberTwo"
281 - placeholder="请输入车架号码2"/> 303 + placeholder="请输入车架号码2"/>
282 </div> 304 </div>
283 </div> 305 </div>
284 <div class="form-group"> 306 <div class="form-group">
@@ -422,5 +444,4 @@ @@ -422,5 +444,4 @@
422 444
423 </div> 445 </div>
424 446
425 -  
426 </div> 447 </div>
427 \ No newline at end of file 448 \ No newline at end of file
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/form.html
@@ -45,9 +45,9 @@ @@ -45,9 +45,9 @@
45 <div class="col-md-3"> 45 <div class="col-md-3">
46 <input type="text" class="form-control" 46 <input type="text" class="form-control"
47 name="insideCode" ng-model="ctrl.busInfoForSave.insideCode" 47 name="insideCode" ng-model="ctrl.busInfoForSave.insideCode"
48 - required ng-maxlength="8" 48 + required ng-maxlength="20"
49 remote-Validation 49 remote-Validation
50 - remotevtype="cl1" 50 + remotevtype="cars_zbh"
51 remotevparam="{{ {'insideCode_eq': ctrl.busInfoForSave.insideCode} | json}}" 51 remotevparam="{{ {'insideCode_eq': ctrl.busInfoForSave.insideCode} | json}}"
52 placeholder="请输入车辆内部编码"/> 52 placeholder="请输入车辆内部编码"/>
53 </div> 53 </div>
@@ -56,10 +56,10 @@ @@ -56,10 +56,10 @@
56 内部编号必须填写 56 内部编号必须填写
57 </div> 57 </div>
58 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.maxlength"> 58 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.maxlength">
59 - 内部编号长度不能超过8 59 + 内部编号长度不能超过20
60 </div> 60 </div>
61 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.remote"> 61 <div class="alert alert-danger well-sm" ng-show="myForm.insideCode.$error.remote">
62 - 内部编号不能重复 62 + {{$remote_msg}}
63 </div> 63 </div>
64 </div> 64 </div>
65 65
@@ -105,12 +105,19 @@ @@ -105,12 +105,19 @@
105 <div class="col-md-3"> 105 <div class="col-md-3">
106 <input type="text" class="form-control" 106 <input type="text" class="form-control"
107 name="carCode" ng-model="ctrl.busInfoForSave.carCode" 107 name="carCode" ng-model="ctrl.busInfoForSave.carCode"
108 - required placeholder="请输入车辆编码"/> 108 + required placeholder="请输入车辆编码"
  109 + remote-Validation
  110 + remotevtype="cars_clbh"
  111 + remotevparam="{{ {'carCode_eq': ctrl.busInfoForSave.carCode} | json}}"
  112 + />
109 </div> 113 </div>
110 <!-- 隐藏块,显示验证信息 --> 114 <!-- 隐藏块,显示验证信息 -->
111 <div class="alert alert-danger well-sm" ng-show="myForm.carCode.$error.required"> 115 <div class="alert alert-danger well-sm" ng-show="myForm.carCode.$error.required">
112 车辆编码必须填写 116 车辆编码必须填写
113 </div> 117 </div>
  118 + <div class="alert alert-danger well-sm" ng-show="myForm.carCode.$error.remote">
  119 + {{$remote_msg}}
  120 + </div>
114 </div> 121 </div>
115 122
116 <div class="form-group has-success has-feedback"> 123 <div class="form-group has-success has-feedback">
@@ -118,12 +125,19 @@ @@ -118,12 +125,19 @@
118 <div class="col-md-3"> 125 <div class="col-md-3">
119 <input type="text" class="form-control" 126 <input type="text" class="form-control"
120 name="carPlate" ng-model="ctrl.busInfoForSave.carPlate" 127 name="carPlate" ng-model="ctrl.busInfoForSave.carPlate"
121 - required placeholder="请输入车牌号"/> 128 + required placeholder="请输入车牌号"
  129 + remote-Validation
  130 + remotevtype="cars_cph"
  131 + remotevparam="{{ {'carPlate_eq': ctrl.busInfoForSave.carPlate} | json}}"
  132 + />
122 </div> 133 </div>
123 <!-- 隐藏快,显示验证信息 --> 134 <!-- 隐藏快,显示验证信息 -->
124 <div class="alert alert-danger well-sm" ng-show="myForm.carPlate.$error.required"> 135 <div class="alert alert-danger well-sm" ng-show="myForm.carPlate.$error.required">
125 车牌号必须填写 136 车牌号必须填写
126 </div> 137 </div>
  138 + <div class="alert alert-danger well-sm" ng-show="myForm.carPlate.$error.remote">
  139 + {{$remote_msg}}
  140 + </div>
127 </div> 141 </div>
128 142
129 <div class="form-group has-success has-feedback"> 143 <div class="form-group has-success has-feedback">
@@ -151,12 +165,19 @@ @@ -151,12 +165,19 @@
151 <div class="col-md-3"> 165 <div class="col-md-3">
152 <input type="text" class="form-control" 166 <input type="text" class="form-control"
153 name="equipmentCode" ng-model="ctrl.busInfoForSave.equipmentCode" 167 name="equipmentCode" ng-model="ctrl.busInfoForSave.equipmentCode"
154 - required placeholder="请输入设备终端号"/> 168 + required placeholder="请输入设备终端号"
  169 + remote-Validation
  170 + remotevtype="cars_sbbh"
  171 + remotevparam="{{ {'equipmentCode_eq': ctrl.busInfoForSave.equipmentCode} | json}}"
  172 + />
155 </div> 173 </div>
156 <!-- 隐藏块,显示验证信息 --> 174 <!-- 隐藏块,显示验证信息 -->
157 <div class="alert alert-danger well-sm" ng-show="myForm.equipmentCode.$error.required"> 175 <div class="alert alert-danger well-sm" ng-show="myForm.equipmentCode.$error.required">
158 设备终端号必须填写 176 设备终端号必须填写
159 </div> 177 </div>
  178 + <div class="alert alert-danger well-sm" ng-show="myForm.equipmentCode.$error.remote">
  179 + {{$remote_msg}}
  180 + </div>
160 </div> 181 </div>
161 182
162 <div class="form-group"> 183 <div class="form-group">
src/main/resources/static/pages/scheduleApp/module/basicInfo/busInfoManage/list.html
@@ -7,12 +7,12 @@ @@ -7,12 +7,12 @@
7 <th style="width: 50px;">序号</th> 7 <th style="width: 50px;">序号</th>
8 <th style="width: 130px;">车辆编号</th> 8 <th style="width: 130px;">车辆编号</th>
9 <th style="width: 130px;">内部编号</th> 9 <th style="width: 130px;">内部编号</th>
10 - <th >设备编号</th>  
11 - <th >车牌号</th>  
12 - <th style="width: 15%;">所在公司</th>  
13 - <th >所在分公司</th>  
14 - <th style="width: 10%">是否电车</th>  
15 - <th style="width: 21%">操作</th> 10 + <th style="width: 130px;">设备编号</th>
  11 + <th style="width: 130px;">车牌号</th>
  12 + <th style="width: 150px;">所在公司</th>
  13 + <th style="width: 100px;">所在分公司</th>
  14 + <th style="width: 80px">是否电车</th>
  15 + <th style="width: 100%">操作</th>
16 </tr> 16 </tr>
17 <tr role="row" class="filter"> 17 <tr role="row" class="filter">
18 <td></td> 18 <td></td>
@@ -23,8 +23,10 @@ @@ -23,8 +23,10 @@
23 <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition().insideCode_like" placeholder="输入内部编号..."/> 23 <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition().insideCode_like" placeholder="输入内部编号..."/>
24 </td> 24 </td>
25 <td> 25 <td>
  26 + <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition().equipmentCode_like" placeholder="输入设备编号..."/>
26 </td> 27 </td>
27 <td> 28 <td>
  29 + <input type="text" class="form-control form-filter input-sm" ng-model="ctrl.searchCondition().carCode_like" placeholder="输入车牌号..."/>
28 </td> 30 </td>
29 <td> 31 <td>
30 <div> 32 <div>
@@ -47,18 +49,18 @@ @@ -47,18 +49,18 @@
47 </td> 49 </td>
48 <td> 50 <td>
49 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" 51 <button class="btn btn-sm green btn-outline filter-submit margin-bottom"
50 - ng-click="ctrl.pageChanaged()"> 52 + ng-click="ctrl.doPage()">
51 <i class="fa fa-search"></i> 搜索</button> 53 <i class="fa fa-search"></i> 搜索</button>
52 54
53 <button class="btn btn-sm red btn-outline filter-cancel" 55 <button class="btn btn-sm red btn-outline filter-cancel"
54 - ng-click="ctrl.resetSearchCondition()"> 56 + ng-click="ctrl.reset()">
55 <i class="fa fa-times"></i> 重置</button> 57 <i class="fa fa-times"></i> 重置</button>
56 </td> 58 </td>
57 59
58 </tr> 60 </tr>
59 </thead> 61 </thead>
60 <tbody> 62 <tbody>
61 - <tr ng-repeat="info in ctrl.pageInfo.infos" class="odd gradeX"> 63 + <tr ng-repeat="info in ctrl.page()['content']" class="odd gradeX">
62 <td> 64 <td>
63 <span ng-bind="$index + 1"></span> 65 <span ng-bind="$index + 1"></span>
64 </td> 66 </td>
@@ -96,9 +98,9 @@ @@ -96,9 +98,9 @@
96 </div> 98 </div>
97 99
98 <div style="text-align: right;"> 100 <div style="text-align: right;">
99 - <uib-pagination total-items="ctrl.pageInfo.totalItems"  
100 - ng-model="ctrl.pageInfo.currentPage"  
101 - ng-change="ctrl.pageChanaged()" 101 + <uib-pagination total-items="ctrl.page()['totalElements']"
  102 + ng-model="ctrl.page()['uiNumber']"
  103 + ng-change="ctrl.doPage()"
102 rotate="false" 104 rotate="false"
103 max-size="10" 105 max-size="10"
104 boundary-links="true" 106 boundary-links="true"