Commit 0511d4e24263a94c77314943916f2b7112664ceb

Authored by 潘钊
2 parents 339fc402 61bcb72b

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

# Conflicts:
#	src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
Showing 54 changed files with 4292 additions and 1215 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
@@ -13,12 +13,15 @@ import org.springframework.web.bind.annotation.RequestMethod; @@ -13,12 +13,15 @@ import org.springframework.web.bind.annotation.RequestMethod;
13 import org.springframework.web.bind.annotation.RequestParam; 13 import org.springframework.web.bind.annotation.RequestParam;
14 import org.springframework.web.bind.annotation.RestController; 14 import org.springframework.web.bind.annotation.RestController;
15 15
  16 +import com.bsth.entity.mcy_forms.Allline;
16 import com.bsth.entity.mcy_forms.Changetochange; 17 import com.bsth.entity.mcy_forms.Changetochange;
  18 +import com.bsth.entity.mcy_forms.Executionrate;
17 import com.bsth.entity.mcy_forms.Linepasswengerflow; 19 import com.bsth.entity.mcy_forms.Linepasswengerflow;
18 import com.bsth.entity.mcy_forms.Operationservice; 20 import com.bsth.entity.mcy_forms.Operationservice;
19 import com.bsth.entity.mcy_forms.Shifday; 21 import com.bsth.entity.mcy_forms.Shifday;
20 import com.bsth.entity.mcy_forms.Shiftuehiclemanth; 22 import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
21 import com.bsth.entity.mcy_forms.Singledata; 23 import com.bsth.entity.mcy_forms.Singledata;
  24 +import com.bsth.entity.mcy_forms.Turnoutrate;
22 import com.bsth.entity.mcy_forms.Vehicleloading; 25 import com.bsth.entity.mcy_forms.Vehicleloading;
23 import com.bsth.entity.mcy_forms.Waybillday; 26 import com.bsth.entity.mcy_forms.Waybillday;
24 import com.bsth.service.forms.ExportService; 27 import com.bsth.service.forms.ExportService;
@@ -28,33 +31,31 @@ import com.bsth.util.ReportUtils; @@ -28,33 +31,31 @@ import com.bsth.util.ReportUtils;
28 @RestController 31 @RestController
29 @RequestMapping("mcy_export") 32 @RequestMapping("mcy_export")
30 public class ExportController { 33 public class ExportController {
31 - 34 +
32 @Autowired 35 @Autowired
33 FormsService formsService; 36 FormsService formsService;
34 37
35 @Autowired 38 @Autowired
36 ExportService exportService; 39 ExportService exportService;
37 -  
38 - //行车路单日报表  
39 - @RequestMapping(value = "/waybilldayExport",method = RequestMethod.POST)  
40 - public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map){ 40 +
  41 + // 行车路单日报表
  42 + @RequestMapping(value = "/waybilldayExport", method = RequestMethod.POST)
  43 + public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map) {
41 List<Waybillday> waybillday = formsService.waybillday(map); 44 List<Waybillday> waybillday = formsService.waybillday(map);
42 exportService.waybillday(map.get("date").toString(), waybillday); 45 exportService.waybillday(map.get("date").toString(), waybillday);
43 return waybillday; 46 return waybillday;
44 } 47 }
45 -  
46 -  
47 - //线路客流量报表  
48 - @RequestMapping(value = "/linepasswengerflowExport",method = RequestMethod.POST)  
49 - public List<Map<String, Object>> linepasswengerflowExport(@RequestParam Map<String, Object> map){  
50 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
51 - sdfSimple = new SimpleDateFormat("yyyyMMdd"); 48 +
  49 + // 线路客流量报表
  50 + @RequestMapping(value = "/linepasswengerflowExport", method = RequestMethod.POST)
  51 + public List<Map<String, Object>> linepasswengerflowExport(@RequestParam Map<String, Object> map) {
  52 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
52 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 53 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
53 ReportUtils ee = new ReportUtils(); 54 ReportUtils ee = new ReportUtils();
54 List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map); 55 List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map);
55 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 56 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
56 - int i=1;  
57 - for(Linepasswengerflow l : linepasswengerflow){ 57 + int i = 1;
  58 + for (Linepasswengerflow l : linepasswengerflow) {
58 Map<String, Object> m = new HashMap<String, Object>(); 59 Map<String, Object> m = new HashMap<String, Object>();
59 m.put("i", i); 60 m.put("i", i);
60 m.put("stationName", l.getStationName()); 61 m.put("stationName", l.getStationName());
@@ -62,78 +63,74 @@ public class ExportController { @@ -62,78 +63,74 @@ public class ExportController {
62 m.put("2", " "); 63 m.put("2", " ");
63 resList.add(m); 64 resList.add(m);
64 i++; 65 i++;
65 - }  
66 -  
67 - try { 66 + }
  67 +
  68 + try {
68 listI.add(resList.iterator()); 69 listI.add(resList.iterator());
69 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
70 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\linepassengerflow.xls",  
71 - path+"export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");  
72 - } catch (Exception e) {  
73 - e.printStackTrace();  
74 - } 70 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  71 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\linepassengerflow.xls",
  72 + path + "export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  73 + } catch (Exception e) {
  74 + e.printStackTrace();
  75 + }
75 return resList; 76 return resList;
76 } 77 }
77 78
78 -  
79 -  
80 - //班次车辆人员日统计  
81 - @RequestMapping(value = "/shifdayExport",method = RequestMethod.POST)  
82 - public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map){  
83 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
84 - sdfSimple = new SimpleDateFormat("yyyyMMdd"); 79 + // 班次车辆人员日统计
  80 + @RequestMapping(value = "/shifdayExport", method = RequestMethod.POST)
  81 + public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) {
  82 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
85 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 83 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
86 ReportUtils ee = new ReportUtils(); 84 ReportUtils ee = new ReportUtils();
87 List<Shifday> shifday = formsService.shifday(map); 85 List<Shifday> shifday = formsService.shifday(map);
88 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 86 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
89 - for(Shifday l : shifday){ 87 + for (Shifday l : shifday) {
90 Map<String, Object> m = new HashMap<String, Object>(); 88 Map<String, Object> m = new HashMap<String, Object>();
91 - m.put("jName",l.getjName()); 89 + m.put("jName", l.getjName());
92 m.put("sName", l.getsName()); 90 m.put("sName", l.getsName());
93 m.put("lpName", l.getLpName()); 91 m.put("lpName", l.getLpName());
94 m.put("carPlate", l.getCarPlate()); 92 m.put("carPlate", l.getCarPlate());
95 m.put("jhlc", l.getJhlc()); 93 m.put("jhlc", l.getJhlc());
96 - //m.put("sjjhlc", l.getSjjhlc()); 94 + // m.put("sjjhlc", l.getSjjhlc());
97 m.put("yygl", l.getYygl()); 95 m.put("yygl", l.getYygl());
98 m.put("emptMileage", l.getEmptMileage()); 96 m.put("emptMileage", l.getEmptMileage());
99 m.put("remMileage", l.getRemMileage()); 97 m.put("remMileage", l.getRemMileage());
100 m.put("addMileage", l.getAddMileage()); 98 m.put("addMileage", l.getAddMileage());
101 m.put("totalm", l.getTotalm()); 99 m.put("totalm", l.getTotalm());
102 m.put("jhbc", l.getJhbc()); 100 m.put("jhbc", l.getJhbc());
103 - //m.put("sjjhbc", l.getSjjhbc()); 101 + // m.put("sjjhbc", l.getSjjhbc());
104 m.put("cjbc", l.getCjbc()); 102 m.put("cjbc", l.getCjbc());
105 m.put("ljbc", l.getLjbc()); 103 m.put("ljbc", l.getLjbc());
106 m.put("sjbc", l.getSjbc()); 104 m.put("sjbc", l.getSjbc());
107 resList.add(m); 105 resList.add(m);
108 - }  
109 -  
110 - try { 106 + }
  107 +
  108 + try {
111 listI.add(resList.iterator()); 109 listI.add(resList.iterator());
112 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
113 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\shifday.xls",  
114 - path+"export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");  
115 - } catch (Exception e) {  
116 - e.printStackTrace();  
117 - } 110 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  111 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\shifday.xls",
  112 + path + "export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  113 + } catch (Exception e) {
  114 + e.printStackTrace();
  115 + }
118 return resList; 116 return resList;
119 } 117 }
120 -  
121 - //班次车辆人员月统计  
122 - @RequestMapping(value = "/shiftuehiclemanthExport",method = RequestMethod.POST)  
123 - public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map){  
124 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
125 - sdfSimple = new SimpleDateFormat("yyyyMMdd"); 118 +
  119 + // 班次车辆人员月统计
  120 + @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.POST)
  121 + public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) {
  122 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
126 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 123 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
127 ReportUtils ee = new ReportUtils(); 124 ReportUtils ee = new ReportUtils();
128 List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map); 125 List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map);
129 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 126 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
130 - int i=1;  
131 - for(Shiftuehiclemanth l : shiftuehiclemanth){ 127 + int i = 1;
  128 + for (Shiftuehiclemanth l : shiftuehiclemanth) {
132 Map<String, Object> m = new HashMap<String, Object>(); 129 Map<String, Object> m = new HashMap<String, Object>();
133 m.put("i", i); 130 m.put("i", i);
134 - m.put("jName",l.getjName() ); 131 + m.put("jName", l.getjName());
135 m.put("jhlc", l.getJhlc()); 132 m.put("jhlc", l.getJhlc());
136 - m.put("emptMileage",l.getEmptMileage() ); 133 + m.put("emptMileage", l.getEmptMileage());
137 m.put("remMileage", l.getRemMileage()); 134 m.put("remMileage", l.getRemMileage());
138 m.put("addMileage", l.getAddMileage()); 135 m.put("addMileage", l.getAddMileage());
139 m.put("totalm", l.getTotalm()); 136 m.put("totalm", l.getTotalm());
@@ -142,39 +139,37 @@ public class ExportController { @@ -142,39 +139,37 @@ public class ExportController {
142 m.put("sjbc", l.getSjbc()); 139 m.put("sjbc", l.getSjbc());
143 resList.add(m); 140 resList.add(m);
144 i++; 141 i++;
145 - }  
146 -  
147 - try { 142 + }
  143 +
  144 + try {
148 listI.add(resList.iterator()); 145 listI.add(resList.iterator());
149 -  
150 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
151 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\shiftuehiclemanth.xls",  
152 - path+"export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");  
153 -  
154 - } catch (Exception e) {  
155 - e.printStackTrace();  
156 - }  
157 - 146 +
  147 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  148 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\shiftuehiclemanth.xls", path
  149 + + "export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  150 +
  151 + } catch (Exception e) {
  152 + e.printStackTrace();
  153 + }
  154 +
158 return resList; 155 return resList;
159 } 156 }
160 -  
161 157
162 - //路单数据报表  
163 - @RequestMapping(value = "/singledataExport",method = RequestMethod.POST)  
164 - public List<Map<String, Object>> singledataExport(@RequestParam Map<String, Object> map){  
165 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
166 - sdfSimple = new SimpleDateFormat("yyyyMMdd"); 158 + // 路单数据报表
  159 + @RequestMapping(value = "/singledataExport", method = RequestMethod.POST)
  160 + public List<Map<String, Object>> singledataExport(@RequestParam Map<String, Object> map) {
  161 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
167 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 162 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
168 ReportUtils ee = new ReportUtils(); 163 ReportUtils ee = new ReportUtils();
169 List<Singledata> singledata = formsService.singledata(map); 164 List<Singledata> singledata = formsService.singledata(map);
170 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 165 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
171 - int i=1;  
172 - for(Singledata l : singledata){ 166 + int i = 1;
  167 + for (Singledata l : singledata) {
173 Map<String, Object> m = new HashMap<String, Object>(); 168 Map<String, Object> m = new HashMap<String, Object>();
174 m.put("i", i); 169 m.put("i", i);
175 - m.put("rQ",l.getrQ()); 170 + m.put("rQ", l.getrQ());
176 m.put("gS", l.getgS()); 171 m.put("gS", l.getgS());
177 - m.put("xL",l.getxL() ); 172 + m.put("xL", l.getxL());
178 m.put("clzbh", l.getClzbh()); 173 m.put("clzbh", l.getClzbh());
179 m.put("jsy", l.getJsy()); 174 m.put("jsy", l.getJsy());
180 m.put("jName", l.getjName()); 175 m.put("jName", l.getjName());
@@ -184,35 +179,35 @@ public class ExportController { @@ -184,35 +179,35 @@ public class ExportController {
184 m.put("emptMileage", l.getEmptMileage()); 179 m.put("emptMileage", l.getEmptMileage());
185 m.put("hyl", l.getHyl()); 180 m.put("hyl", l.getHyl());
186 m.put("jzl", l.getJzl()); 181 m.put("jzl", l.getJzl());
187 - m.put("unyyyl",l.getUnyyyl()); 182 + m.put("unyyyl", l.getUnyyyl());
188 m.put("jhjl", l.getJhjl()); 183 m.put("jhjl", l.getJhjl());
189 resList.add(m); 184 resList.add(m);
190 i++; 185 i++;
191 - }  
192 -  
193 - try { 186 + }
  187 +
  188 + try {
194 listI.add(resList.iterator()); 189 listI.add(resList.iterator());
195 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
196 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\singledata.xls",  
197 - path+"export\\路单报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");  
198 - } catch (Exception e) {  
199 - e.printStackTrace();  
200 - }  
201 - 190 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  191 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\singledata.xls",
  192 + path + "export\\路单报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  193 + } catch (Exception e) {
  194 + e.printStackTrace();
  195 + }
  196 +
202 return resList; 197 return resList;
203 } 198 }
204 -  
205 - //车辆加注  
206 - @RequestMapping(value = "/vehicleloadingExport",method = RequestMethod.POST)  
207 - public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map){  
208 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
209 - sdfSimple = new SimpleDateFormat("yyyyMMdd"); 199 +
  200 + // 车辆加注
  201 + @RequestMapping(value = "/vehicleloadingExport", method = RequestMethod.POST)
  202 + public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map) {
  203 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
210 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 204 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
211 ReportUtils ee = new ReportUtils(); 205 ReportUtils ee = new ReportUtils();
212 - List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), map.get("date").toString()); 206 + List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(),
  207 + map.get("date").toString());
213 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 208 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
214 - int i=1;  
215 - for(Vehicleloading l : vehicleloading){ 209 + int i = 1;
  210 + for (Vehicleloading l : vehicleloading) {
216 Map<String, Object> m = new HashMap<String, Object>(); 211 Map<String, Object> m = new HashMap<String, Object>();
217 m.put("i", i); 212 m.put("i", i);
218 m.put("rQ", l.getrQ()); 213 m.put("rQ", l.getrQ());
@@ -228,96 +223,199 @@ public class ExportController { @@ -228,96 +223,199 @@ public class ExportController {
228 m.put("sjbc", l.getSjbc()); 223 m.put("sjbc", l.getSjbc());
229 resList.add(m); 224 resList.add(m);
230 i++; 225 i++;
231 - }  
232 -  
233 - try { 226 + }
  227 +
  228 + try {
234 listI.add(resList.iterator()); 229 listI.add(resList.iterator());
235 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
236 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\vehicleloading.xls",  
237 - path+"export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");  
238 - } catch (Exception e) {  
239 - e.printStackTrace();  
240 - } 230 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  231 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\vehicleloading.xls",
  232 + path + "export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  233 + } catch (Exception e) {
  234 + e.printStackTrace();
  235 + }
241 return resList; 236 return resList;
242 } 237 }
243 -  
244 - //运营服务阶段报表  
245 - @RequestMapping(value = "/operationserviceExport",method = RequestMethod.POST)  
246 - public List<Map<String, Object>> operationserviceExport(@RequestParam Map<String, Object> map){  
247 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
248 - sdfSimple = new SimpleDateFormat("yyyyMMdd"); 238 +
  239 + // 运营服务阶段报表
  240 + @RequestMapping(value = "/operationserviceExport", method = RequestMethod.POST)
  241 + public List<Map<String, Object>> operationserviceExport(@RequestParam Map<String, Object> map) {
  242 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
249 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 243 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
250 ReportUtils ee = new ReportUtils(); 244 ReportUtils ee = new ReportUtils();
251 List<Operationservice> operationservice = formsService.operationservice(map); 245 List<Operationservice> operationservice = formsService.operationservice(map);
252 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 246 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
253 - int i=1;  
254 - for(Operationservice l : operationservice){  
255 - Map<String, Object> m = new HashMap<String, Object>();  
256 - m.put("i", i);  
257 - m.put("xlName", l.getXlName());  
258 - m.put("jzl", l.getJzl());  
259 - m.put("xhl", l.getXhl());  
260 - m.put("xsgl", l.getXsgl());  
261 - m.put("emptMileage", l.getEmptMileage());  
262 - m.put("sjbc", l.getSjbc());  
263 - resList.add(m);  
264 - i++; 247 + int i = 1;
  248 + for (Operationservice l : operationservice) {
  249 + Map<String, Object> m = new HashMap<String, Object>();
  250 + m.put("i", i);
  251 + m.put("xlName", l.getXlName());
  252 + m.put("jzl", l.getJzl());
  253 + m.put("xhl", l.getXhl());
  254 + m.put("xsgl", l.getXsgl());
  255 + m.put("emptMileage", l.getEmptMileage());
  256 + m.put("sjbc", l.getSjbc());
  257 + resList.add(m);
  258 + i++;
265 } 259 }
266 - 260 +
267 try { 261 try {
268 listI.add(resList.iterator()); 262 listI.add(resList.iterator());
269 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
270 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\operationservice.xls",  
271 - path+"export\\运营服务阶段报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");  
272 - } catch (Exception e) {  
273 - e.printStackTrace();  
274 - } 263 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  264 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\operationservice.xls", path + "export\\运营服务阶段报表"
  265 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  266 + } catch (Exception e) {
  267 + e.printStackTrace();
  268 + }
275 return resList; 269 return resList;
276 } 270 }
277 -  
278 271
279 - //换人换车情况日统计  
280 - @RequestMapping(value = "/changetochangeExport",method = RequestMethod.POST)  
281 - public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map){  
282 - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),  
283 - sdfSimple = new SimpleDateFormat("yyyyMMdd");  
284 - List<Iterator<?>> listI = new ArrayList<Iterator<?>>();  
285 - ReportUtils ee = new ReportUtils();  
286 - List<Changetochange> changetochange = formsService.changetochange(map);  
287 - List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();  
288 - for(Changetochange l : changetochange){ 272 + // 换人换车情况日统计
  273 + @RequestMapping(value = "/changetochangeExport", method = RequestMethod.POST)
  274 + public List<Map<String, Object>> changetochangeExport(@RequestParam Map<String, Object> map) {
  275 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  276 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  277 + ReportUtils ee = new ReportUtils();
  278 + List<Changetochange> changetochange = formsService.changetochange(map);
  279 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  280 + for (Changetochange l : changetochange) {
289 Map<String, Object> m = new HashMap<String, Object>(); 281 Map<String, Object> m = new HashMap<String, Object>();
290 - m.put("rq",l.getRq());  
291 - m.put("gs",l.getGs());  
292 - m.put("fgs",l.getFgs());  
293 - m.put("xl",l.getXl());  
294 - m.put("lp",l.getLp());  
295 - m.put("fssj",l.getFssj());  
296 - m.put("xgsj",l.getXgsj());  
297 - m.put("pcch",l.getPcch());  
298 - m.put("pcry",l.getPcry());  
299 - m.put("jhch",l.getJhch());  
300 - m.put("jhgh",l.getJhgh());  
301 - m.put("sjch",l.getSjch());  
302 - m.put("sjgh",l.getSjgh());  
303 - m.put("yy",l.getYy());  
304 - m.put("xgr",l.getXgr()); 282 + m.put("rq", l.getRq());
  283 + m.put("gs", l.getGs());
  284 + m.put("fgs", l.getFgs());
  285 + m.put("xl", l.getXl());
  286 + m.put("lp", l.getLp());
  287 + m.put("fssj", l.getFssj());
  288 + m.put("xgsj", l.getXgsj());
  289 + m.put("pcch", l.getPcch());
  290 + m.put("pcry", l.getPcry());
  291 + m.put("jhch", l.getJhch());
  292 + m.put("jhgh", l.getJhgh());
  293 + m.put("sjch", l.getSjch());
  294 + m.put("sjgh", l.getSjgh());
  295 + m.put("yy", l.getYy());
  296 + m.put("xgr", l.getXgr());
305 resList.add(m); 297 resList.add(m);
306 - }  
307 -  
308 - try {  
309 - listI.add(resList.iterator());  
310 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
311 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\changetochange.xls",  
312 - path+"export\\换人换车情况日统计" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");  
313 - } catch (Exception e) {  
314 - e.printStackTrace();  
315 - }  
316 - return resList;  
317 } 298 }
318 -  
319 -  
320 -  
321 - 299 +
  300 + try {
  301 + listI.add(resList.iterator());
  302 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  303 + ee.excelReplace(listI, new Object[] { map }, path + "mould\\changetochange.xls", path + "export\\换人换车情况日统计"
  304 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  305 + } catch (Exception e) {
  306 + e.printStackTrace();
  307 + }
  308 + return resList;
  309 + }
  310 +
  311 + // 营运线路出车率统计表
  312 + @RequestMapping(value = "/turnoutrateExport", method = RequestMethod.POST)
  313 + public List<Map<String, Object>> turnoutrateExport(@RequestParam Map<String, Object> map) {
  314 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  315 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  316 + ReportUtils ee = new ReportUtils();
  317 + List<Turnoutrate> turnoutrate = formsService.turnoutrate(map);
  318 + Map<String, Object> map1 = new HashMap<String, Object>();
  319 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  320 + for (Turnoutrate l : turnoutrate) {
  321 + Map<String, Object> m = new HashMap<String, Object>();
  322 + m.put("rq", l.getRq());
  323 + m.put("gs", l.getGs());
  324 + m.put("zhgs", l.getZhgs());
  325 + m.put("xl", l.getXl());
  326 + m.put("cchjh", l.getCchjh());
  327 + m.put("cchsj", l.getCchsj());
  328 + m.put("cchqz", l.getCchqz());
  329 + m.put("chl", l.getChl());
  330 + m.put("bcjh", l.getBcjh());
  331 + m.put("bcsj", l.getBbzxl());
  332 + m.put("bbzxl", l.getBbzxl());
  333 + m.put("sm", l.getSm());
  334 + resList.add(m);
  335 + }
  336 +
  337 + try {
  338 + listI.add(resList.iterator());
  339 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  340 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\turnoutrate.xls", path + "export\\营运线路出车率统计表"
  341 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  342 + } catch (Exception e) {
  343 + e.printStackTrace();
  344 + }
  345 + return resList;
  346 + }
  347 +
  348 + //营运线路出车率统计表
  349 + @RequestMapping(value = "/executionrateExport", method = RequestMethod.POST)
  350 + public List<Map<String, Object>> executionrateExport(@RequestParam Map<String, Object> map) {
  351 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  352 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  353 + ReportUtils ee = new ReportUtils();
  354 + List<Executionrate> executionrate = formsService.executionrate(map);
  355 + Map<String, Object> map1 = new HashMap<String, Object>();
  356 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  357 + for (Executionrate l : executionrate) {
  358 + Map<String, Object> m = new HashMap<String, Object>();
  359 + m.put("rq", l.getRq());
  360 + m.put("gs", l.getGs());
  361 + m.put("zhgs", l.getZhgs());
  362 + m.put("xl", l.getXl());
  363 + m.put("cchjh", l.getCchjh());
  364 + m.put("cchsj", l.getCchsj());
  365 + m.put("chl", l.getChl());
  366 + m.put("bcjh", l.getBcjh());
  367 + m.put("bcsj", l.getBbzxl());
  368 + m.put("bbzxl", l.getBbzxl());
  369 + m.put("sm", l.getSm());
  370 + resList.add(m);
  371 + }
  372 +
  373 + try {
  374 + listI.add(resList.iterator());
  375 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  376 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\executionrate.xls", path + "export\\班次执行率统计表"
  377 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  378 + } catch (Exception e) {
  379 + e.printStackTrace();
  380 + }
  381 + return resList;
  382 + }
  383 +
322 384
  385 + ////营运线路名称统计表
  386 + @RequestMapping(value = "/alllineExport", method = RequestMethod.POST)
  387 + public List<Map<String, Object>> alllineExport(@RequestParam Map<String, Object> map) {
  388 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
  389 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  390 + ReportUtils ee = new ReportUtils();
  391 + List<Allline> allline = formsService.allline(map);
  392 + Map<String, Object> map1 = new HashMap<String, Object>();
  393 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  394 + for (Allline l : allline) {
  395 + Map<String, Object> m = new HashMap<String, Object>();
  396 + m.put("rq", l.getRq());
  397 + m.put("gs", l.getGs());
  398 + m.put("zhgs", l.getZhgs());
  399 + m.put("xl", l.getXl());
  400 + m.put("cchjh", l.getCchjh());
  401 + m.put("cchsj", l.getCchsj());
  402 + m.put("chl", l.getChl());
  403 + m.put("bcjh", l.getBcjh());
  404 + m.put("bcsj", l.getBbzxl());
  405 + m.put("bbzxl", l.getBbzxl());
  406 + m.put("sm", l.getSm());
  407 + resList.add(m);
  408 + }
  409 +
  410 + try {
  411 + listI.add(resList.iterator());
  412 + String path = this.getClass().getResource("/").getPath() + "static\\pages\\forms\\";
  413 + ee.excelReplace(listI, new Object[] { map1 }, path + "mould\\allline.xls", path + "export\\营运线路名称统计表"
  414 + + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  415 + } catch (Exception e) {
  416 + e.printStackTrace();
  417 + }
  418 + return resList;
  419 + }
  420 +
323 } 421 }
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
@@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod; @@ -9,12 +9,15 @@ import org.springframework.web.bind.annotation.RequestMethod;
9 import org.springframework.web.bind.annotation.RequestParam; 9 import org.springframework.web.bind.annotation.RequestParam;
10 import org.springframework.web.bind.annotation.RestController; 10 import org.springframework.web.bind.annotation.RestController;
11 11
  12 +import com.bsth.entity.mcy_forms.Allline;
12 import com.bsth.entity.mcy_forms.Changetochange; 13 import com.bsth.entity.mcy_forms.Changetochange;
  14 +import com.bsth.entity.mcy_forms.Executionrate;
13 import com.bsth.entity.mcy_forms.Linepasswengerflow; 15 import com.bsth.entity.mcy_forms.Linepasswengerflow;
14 import com.bsth.entity.mcy_forms.Operationservice; 16 import com.bsth.entity.mcy_forms.Operationservice;
15 import com.bsth.entity.mcy_forms.Shifday; 17 import com.bsth.entity.mcy_forms.Shifday;
16 import com.bsth.entity.mcy_forms.Shiftuehiclemanth; 18 import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
17 import com.bsth.entity.mcy_forms.Singledata; 19 import com.bsth.entity.mcy_forms.Singledata;
  20 +import com.bsth.entity.mcy_forms.Turnoutrate;
18 import com.bsth.entity.mcy_forms.Vehicleloading; 21 import com.bsth.entity.mcy_forms.Vehicleloading;
19 import com.bsth.entity.mcy_forms.Waybillday; 22 import com.bsth.entity.mcy_forms.Waybillday;
20 import com.bsth.service.forms.FormsService; 23 import com.bsth.service.forms.FormsService;
@@ -39,12 +42,6 @@ public class MCY_FormsController { @@ -39,12 +42,6 @@ public class MCY_FormsController {
39 return formsService.waybillday(map); 42 return formsService.waybillday(map);
40 } 43 }
41 44
42 - @RequestMapping(value = "/waybilldayExcel")  
43 - public List<Waybillday> dailyInfo(@RequestParam Map<String, Object> map) {  
44 - return formsService.waybilldayExcel(map);  
45 - }  
46 -  
47 -  
48 //线路客流量报表 45 //线路客流量报表
49 @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST) 46 @RequestMapping(value = "/linepasswengerflow",method = RequestMethod.POST)
50 public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){ 47 public List<Linepasswengerflow> linepasswengerflow(@RequestParam Map<String, Object> map){
@@ -88,6 +85,8 @@ public class MCY_FormsController { @@ -88,6 +85,8 @@ public class MCY_FormsController {
88 public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){ 85 public List<Vehicleloading> vehicleloading(@RequestParam String line ,@RequestParam String data){
89 return formsService.vehicleloading(line,data); 86 return formsService.vehicleloading(line,data);
90 } 87 }
  88 +
  89 +
91 //运营服务阶段报表 90 //运营服务阶段报表
92 @RequestMapping(value = "/operationservice",method = RequestMethod.POST) 91 @RequestMapping(value = "/operationservice",method = RequestMethod.POST)
93 public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){ 92 public List<Operationservice> operationservice(@RequestParam Map<String, Object> map){
@@ -95,5 +94,25 @@ public class MCY_FormsController { @@ -95,5 +94,25 @@ public class MCY_FormsController {
95 return formsService.operationservice(map); 94 return formsService.operationservice(map);
96 } 95 }
97 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 + }
98 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);
  117 + }
99 } 118 }
src/main/java/com/bsth/controller/oil/CwjyController.java
@@ -5,7 +5,6 @@ import java.util.Date; @@ -5,7 +5,6 @@ import java.util.Date;
5 import java.util.Map; 5 import java.util.Map;
6 6
7 import org.springframework.beans.factory.annotation.Autowired; 7 import org.springframework.beans.factory.annotation.Autowired;
8 -import org.springframework.web.bind.annotation.PathVariable;  
9 import org.springframework.web.bind.annotation.RequestMapping; 8 import org.springframework.web.bind.annotation.RequestMapping;
10 import org.springframework.web.bind.annotation.RequestMethod; 9 import org.springframework.web.bind.annotation.RequestMethod;
11 import org.springframework.web.bind.annotation.RequestParam; 10 import org.springframework.web.bind.annotation.RequestParam;
@@ -62,5 +61,4 @@ public class CwjyController extends BaseController&lt;Cwjy, Integer&gt;{ @@ -62,5 +61,4 @@ public class CwjyController extends BaseController&lt;Cwjy, Integer&gt;{
62 return map; 61 return map;
63 } 62 }
64 63
65 -  
66 } 64 }
src/main/java/com/bsth/controller/oil/CylController.java
@@ -22,7 +22,6 @@ public class CylController extends BaseController&lt;Cyl, Integer&gt;{ @@ -22,7 +22,6 @@ public class CylController extends BaseController&lt;Cyl, Integer&gt;{
22 @RequestMapping(value = "/save",method = RequestMethod.POST) 22 @RequestMapping(value = "/save",method = RequestMethod.POST)
23 public Map<String, Object> saveYlb(Cyl t){ 23 public Map<String, Object> saveYlb(Cyl t){
24 // SysUser user = SecurityUtils.getCurrentUser(); 24 // SysUser user = SecurityUtils.getCurrentUser();
25 - t.setGsdm("77");  
26 t.setUpdatetime(new Date()); 25 t.setUpdatetime(new Date());
27 /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); 26 /*SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
28 try { 27 try {
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo, @@ -351,7 +351,15 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
351 @RequestMapping(value="/queryListWaybill") 351 @RequestMapping(value="/queryListWaybill")
352 public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName 352 public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
353 ,@RequestParam String date){ 353 ,@RequestParam String date){
354 - return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date); 354 + String type="fqp";
  355 + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type);
  356 + }
  357 +
  358 + @RequestMapping(value="/queryListWaybillQp")
  359 + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
  360 + ,@RequestParam String date){
  361 + String type="qp";
  362 + return scheduleRealInfoService.queryListWaybill(jName, clZbh,lpName,date,type);
355 } 363 }
356 364
357 @RequestMapping(value="/statisticsDaily") 365 @RequestMapping(value="/statisticsDaily")
src/main/java/com/bsth/controller/schedule/PeopleCarPlanController.java
@@ -20,33 +20,33 @@ public class PeopleCarPlanController { @@ -20,33 +20,33 @@ public class PeopleCarPlanController {
20 private PeopleCarPlanService peopleCarPlanService; 20 private PeopleCarPlanService peopleCarPlanService;
21 21
22 @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET) 22 @RequestMapping(value = "/queryPeopleCar", method = RequestMethod.GET)
23 - public List<Map<String,Object>> queryPeopleCar(@RequestParam String line, @RequestParam String date, @RequestParam String type){  
24 - return peopleCarPlanService.queryPeopleCar(line, date, type); 23 + public List<Map<String,Object>> queryPeopleCar(@RequestParam Map<String, Object> map){
  24 + return peopleCarPlanService.queryPeopleCar(map);
25 } 25 }
26 26
27 @RequestMapping(value="/workDaily", method = RequestMethod.GET) 27 @RequestMapping(value="/workDaily", method = RequestMethod.GET)
28 - public List<Map<String,Object>> workDaily(@RequestParam String line, @RequestParam String date, @RequestParam String type){  
29 - return peopleCarPlanService.workDaily(line, date, type); 28 + public List<Map<String,Object>> workDaily(@RequestParam Map<String, Object> map){
  29 + return peopleCarPlanService.workDaily(map);
30 } 30 }
31 31
32 @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET) 32 @RequestMapping(value="/scheduleAnaly", method = RequestMethod.GET)
33 - public Map<String, Object> scheduleAnaly(@RequestParam String page, @RequestParam String line, @RequestParam String startDate, @RequestParam String endDate, @RequestParam String model, @RequestParam String type){  
34 - return peopleCarPlanService.scheduleAnaly(page, line, startDate, endDate, model, type); 33 + public Map<String, Object> scheduleAnaly(@RequestParam Map<String, Object> map){
  34 + return peopleCarPlanService.scheduleAnaly(map);
35 } 35 }
36 36
37 @RequestMapping(value="/getModel", method = RequestMethod.GET) 37 @RequestMapping(value="/getModel", method = RequestMethod.GET)
38 - public List<Map<String,Object>> getModel(@RequestParam String line, @RequestParam String startDate, @RequestParam String endDate){  
39 - return peopleCarPlanService.getModel(line, startDate, endDate); 38 + public List<Map<String,Object>> getModel(@RequestParam Map<String, Object> map){
  39 + return peopleCarPlanService.getModel(map);
40 } 40 }
41 41
42 @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET) 42 @RequestMapping(value="/firstAndLastBus", method = RequestMethod.GET)
43 - public List<Map<String,Object>> firstAndLastBus(@RequestParam String line, @RequestParam String date, @RequestParam String type){  
44 - return peopleCarPlanService.firstAndLastBus(line, date, type); 43 + public List<Map<String,Object>> firstAndLastBus(@RequestParam Map<String, Object> map){
  44 + return peopleCarPlanService.firstAndLastBus(map);
45 } 45 }
46 46
47 @RequestMapping(value="/commandState", method = RequestMethod.GET) 47 @RequestMapping(value="/commandState", method = RequestMethod.GET)
48 - public List<Map<String,Object>> commandState(@RequestParam String line, @RequestParam String date, @RequestParam String code){  
49 - return peopleCarPlanService.commandState(line, date, code); 48 + public List<Map<String,Object>> commandState(@RequestParam Map<String, Object> map){
  49 + return peopleCarPlanService.commandState(map);
50 } 50 }
51 51
52 } 52 }
src/main/java/com/bsth/data/BasicData.java
@@ -28,6 +28,9 @@ public class BasicData implements CommandLineRunner { @@ -28,6 +28,9 @@ public class BasicData implements CommandLineRunner {
28 28
29 //公司代码和公司名对照(K: 公司编码,V:公司名) 29 //公司代码和公司名对照(K: 公司编码,V:公司名)
30 public static Map<String, String> businessCodeNameMap; 30 public static Map<String, String> businessCodeNameMap;
  31 +
  32 + //分公司公司代码和分公司公司名对照(K: 公司编码+分公司编码,V:分公司公司名)
  33 + public static Map<String, String> businessFgsCodeNameMap;
31 34
32 //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号) 35 //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号)
33 public static BiMap<String, String> deviceId2NbbmMap; 36 public static BiMap<String, String> deviceId2NbbmMap;
@@ -177,13 +180,16 @@ public class BasicData implements CommandLineRunner { @@ -177,13 +180,16 @@ public class BasicData implements CommandLineRunner {
177 */ 180 */
178 public void loadBusinessInfo(){ 181 public void loadBusinessInfo(){
179 Map<String, String> businessMap=new HashMap<String,String>(); 182 Map<String, String> businessMap=new HashMap<String,String>();
  183 + Map<String, String> businessFgsMap=new HashMap<String,String>();
180 Iterator<Business> busIter=businessRepository.findAll().iterator(); 184 Iterator<Business> busIter=businessRepository.findAll().iterator();
181 Business t; 185 Business t;
182 while(busIter.hasNext()){ 186 while(busIter.hasNext()){
183 t=busIter.next(); 187 t=busIter.next();
184 businessMap.put(t.getBusinessCode(), t.getBusinessName()); 188 businessMap.put(t.getBusinessCode(), t.getBusinessName());
  189 + businessFgsMap.put(t.getBusinessCode()+"_"+t.getUpCode(), t.getBusinessName());
185 } 190 }
186 businessCodeNameMap=businessMap; 191 businessCodeNameMap=businessMap;
  192 + businessFgsCodeNameMap=businessFgsMap;
187 } 193 }
188 /** 194 /**
189 * @Title: loadDeviceInfo 195 * @Title: loadDeviceInfo
src/main/java/com/bsth/entity/mcy_forms/Allline.java 0 → 100644
  1 +package com.bsth.entity.mcy_forms;
  2 +
  3 +public class Allline {
  4 +
  5 + private String rq;//日期
  6 +
  7 + private String gs;//公司
  8 +
  9 + private String zhgs;//直属公司
  10 +
  11 + private String fgs;//分公司
  12 +
  13 + private String xl;//线路条数
  14 +
  15 + private String xlmc;//线路名称
  16 +
  17 + private String gsgs;
  18 + private String fgsgs;
  19 +
  20 + private String size;
  21 +
  22 +
  23 + public String getGsgs() {
  24 + return gsgs;
  25 + }
  26 +
  27 + public void setGsgs(String gsgs) {
  28 + this.gsgs = gsgs;
  29 + }
  30 +
  31 + public String getFgsgs() {
  32 + return fgsgs;
  33 + }
  34 +
  35 + public void setFgsgs(String fgsgs) {
  36 + this.fgsgs = fgsgs;
  37 + }
  38 +
  39 +
  40 + public String getSize() {
  41 + return size;
  42 + }
  43 +
  44 + public void setSize(String size) {
  45 + this.size = size;
  46 + }
  47 +
  48 + public String getZhgs() {
  49 + return zhgs;
  50 + }
  51 +
  52 + public void setZhgs(String zhgs) {
  53 + this.zhgs = zhgs;
  54 + }
  55 +
  56 + public String getXlmc() {
  57 + return xlmc;
  58 + }
  59 +
  60 + public void setXlmc(String xlmc) {
  61 + this.xlmc = xlmc;
  62 + }
  63 +
  64 + private String cchjh;//出车数计划
  65 +
  66 + private String cchsj;//出车数计划
  67 +
  68 + private String cchqz;//出车数权证
  69 +
  70 + private String chl;//出车率
  71 +
  72 + private String bcjh;//班次计划
  73 +
  74 + private String bcsj;//班次实际
  75 +
  76 + private String bbzxl;//班次执行率
  77 +
  78 + private String sm;//说明
  79 +
  80 + public String getRq() {
  81 + return rq;
  82 + }
  83 +
  84 + public void setRq(String rq) {
  85 + this.rq = rq;
  86 + }
  87 +
  88 + public String getGs() {
  89 + return gs;
  90 + }
  91 +
  92 + public void setGs(String gs) {
  93 + this.gs = gs;
  94 + }
  95 +
  96 + public String getFgs() {
  97 + return fgs;
  98 + }
  99 +
  100 + public void setFgs(String fgs) {
  101 + this.fgs = fgs;
  102 + }
  103 +
  104 + public String getXl() {
  105 + return xl;
  106 + }
  107 +
  108 + public void setXl(String xl) {
  109 + this.xl = xl;
  110 + }
  111 +
  112 + public String getCchjh() {
  113 + return cchjh;
  114 + }
  115 +
  116 + public void setCchjh(String cchjh) {
  117 + this.cchjh = cchjh;
  118 + }
  119 +
  120 + public String getCchsj() {
  121 + return cchsj;
  122 + }
  123 +
  124 + public void setCchsj(String cchsj) {
  125 + this.cchsj = cchsj;
  126 + }
  127 +
  128 + public String getCchqz() {
  129 + return cchqz;
  130 + }
  131 +
  132 + public void setCchqz(String cchqz) {
  133 + this.cchqz = cchqz;
  134 + }
  135 +
  136 + public String getChl() {
  137 + return chl;
  138 + }
  139 +
  140 + public void setChl(String chl) {
  141 + this.chl = chl;
  142 + }
  143 +
  144 + public String getBcjh() {
  145 + return bcjh;
  146 + }
  147 +
  148 + public void setBcjh(String bcjh) {
  149 + this.bcjh = bcjh;
  150 + }
  151 +
  152 + public String getBcsj() {
  153 + return bcsj;
  154 + }
  155 +
  156 + public void setBcsj(String bcsj) {
  157 + this.bcsj = bcsj;
  158 + }
  159 +
  160 + public String getBbzxl() {
  161 + return bbzxl;
  162 + }
  163 +
  164 + public void setBbzxl(String bbzxl) {
  165 + this.bbzxl = bbzxl;
  166 + }
  167 +
  168 + public String getSm() {
  169 + return sm;
  170 + }
  171 +
  172 + public void setSm(String sm) {
  173 + this.sm = sm;
  174 + }
  175 +
  176 +
  177 +
  178 +
  179 +}
src/main/java/com/bsth/entity/mcy_forms/Executionrate.java 0 → 100644
  1 +package com.bsth.entity.mcy_forms;
  2 +
  3 +public class Executionrate {
  4 +
  5 + private String rq;//日期
  6 +
  7 + private String gs;//公司
  8 +
  9 + private String zhgs;//直属公司
  10 +
  11 + private String fgs;//分公司
  12 +
  13 + private String xl;//线路条数
  14 +
  15 + private String xlmc;//线路名称
  16 +
  17 + private String gsgs;
  18 + private String fgsgs;
  19 +
  20 + private String size;
  21 +
  22 +
  23 + public String getGsgs() {
  24 + return gsgs;
  25 + }
  26 +
  27 + public void setGsgs(String gsgs) {
  28 + this.gsgs = gsgs;
  29 + }
  30 +
  31 + public String getFgsgs() {
  32 + return fgsgs;
  33 + }
  34 +
  35 + public void setFgsgs(String fgsgs) {
  36 + this.fgsgs = fgsgs;
  37 + }
  38 +
  39 +
  40 + public String getSize() {
  41 + return size;
  42 + }
  43 +
  44 + public void setSize(String size) {
  45 + this.size = size;
  46 + }
  47 +
  48 + public String getZhgs() {
  49 + return zhgs;
  50 + }
  51 +
  52 + public void setZhgs(String zhgs) {
  53 + this.zhgs = zhgs;
  54 + }
  55 +
  56 + public String getXlmc() {
  57 + return xlmc;
  58 + }
  59 +
  60 + public void setXlmc(String xlmc) {
  61 + this.xlmc = xlmc;
  62 + }
  63 +
  64 + private String cchjh;//出车数计划
  65 +
  66 + private String cchsj;//出车数计划
  67 +
  68 + private String cchqz;//出车数权证
  69 +
  70 + private String chl;//出车率
  71 +
  72 + private String bcjh;//班次计划
  73 +
  74 + private String bcsj;//班次实际
  75 +
  76 + private String bbzxl;//班次执行率
  77 +
  78 + private String sm;//说明
  79 +
  80 + public String getRq() {
  81 + return rq;
  82 + }
  83 +
  84 + public void setRq(String rq) {
  85 + this.rq = rq;
  86 + }
  87 +
  88 + public String getGs() {
  89 + return gs;
  90 + }
  91 +
  92 + public void setGs(String gs) {
  93 + this.gs = gs;
  94 + }
  95 +
  96 + public String getFgs() {
  97 + return fgs;
  98 + }
  99 +
  100 + public void setFgs(String fgs) {
  101 + this.fgs = fgs;
  102 + }
  103 +
  104 + public String getXl() {
  105 + return xl;
  106 + }
  107 +
  108 + public void setXl(String xl) {
  109 + this.xl = xl;
  110 + }
  111 +
  112 + public String getCchjh() {
  113 + return cchjh;
  114 + }
  115 +
  116 + public void setCchjh(String cchjh) {
  117 + this.cchjh = cchjh;
  118 + }
  119 +
  120 + public String getCchsj() {
  121 + return cchsj;
  122 + }
  123 +
  124 + public void setCchsj(String cchsj) {
  125 + this.cchsj = cchsj;
  126 + }
  127 +
  128 + public String getCchqz() {
  129 + return cchqz;
  130 + }
  131 +
  132 + public void setCchqz(String cchqz) {
  133 + this.cchqz = cchqz;
  134 + }
  135 +
  136 + public String getChl() {
  137 + return chl;
  138 + }
  139 +
  140 + public void setChl(String chl) {
  141 + this.chl = chl;
  142 + }
  143 +
  144 + public String getBcjh() {
  145 + return bcjh;
  146 + }
  147 +
  148 + public void setBcjh(String bcjh) {
  149 + this.bcjh = bcjh;
  150 + }
  151 +
  152 + public String getBcsj() {
  153 + return bcsj;
  154 + }
  155 +
  156 + public void setBcsj(String bcsj) {
  157 + this.bcsj = bcsj;
  158 + }
  159 +
  160 + public String getBbzxl() {
  161 + return bbzxl;
  162 + }
  163 +
  164 + public void setBbzxl(String bbzxl) {
  165 + this.bbzxl = bbzxl;
  166 + }
  167 +
  168 + public String getSm() {
  169 + return sm;
  170 + }
  171 +
  172 + public void setSm(String sm) {
  173 + this.sm = sm;
  174 + }
  175 +
  176 +
  177 +
  178 +}
src/main/java/com/bsth/entity/mcy_forms/Turnoutrate.java 0 → 100644
  1 +package com.bsth.entity.mcy_forms;
  2 +
  3 +public class Turnoutrate {
  4 +private String rq;//日期
  5 +
  6 + private String gs;//公司
  7 +
  8 + private String zhgs;//直属公司
  9 +
  10 + private String fgs;//分公司
  11 +
  12 + private String xl;//线路条数
  13 +
  14 + private String xlmc;//线路名称
  15 +
  16 + private String gsgs;
  17 + private String fgsgs;
  18 +
  19 + private String size;
  20 +
  21 +
  22 + public String getGsgs() {
  23 + return gsgs;
  24 + }
  25 +
  26 + public void setGsgs(String gsgs) {
  27 + this.gsgs = gsgs;
  28 + }
  29 +
  30 + public String getFgsgs() {
  31 + return fgsgs;
  32 + }
  33 +
  34 + public void setFgsgs(String fgsgs) {
  35 + this.fgsgs = fgsgs;
  36 + }
  37 +
  38 +
  39 + public String getSize() {
  40 + return size;
  41 + }
  42 +
  43 + public void setSize(String size) {
  44 + this.size = size;
  45 + }
  46 +
  47 + public String getZhgs() {
  48 + return zhgs;
  49 + }
  50 +
  51 + public void setZhgs(String zhgs) {
  52 + this.zhgs = zhgs;
  53 + }
  54 +
  55 + public String getXlmc() {
  56 + return xlmc;
  57 + }
  58 +
  59 + public void setXlmc(String xlmc) {
  60 + this.xlmc = xlmc;
  61 + }
  62 +
  63 + private String cchjh;//出车数计划
  64 +
  65 + private String cchsj;//出车数计划
  66 +
  67 + private String cchqz;//出车数权证
  68 +
  69 + private String chl;//出车率
  70 +
  71 + private String bcjh;//班次计划
  72 +
  73 + private String bcsj;//班次实际
  74 +
  75 + private String bbzxl;//班次执行率
  76 +
  77 + private String sm;//说明
  78 +
  79 + public String getRq() {
  80 + return rq;
  81 + }
  82 +
  83 + public void setRq(String rq) {
  84 + this.rq = rq;
  85 + }
  86 +
  87 + public String getGs() {
  88 + return gs;
  89 + }
  90 +
  91 + public void setGs(String gs) {
  92 + this.gs = gs;
  93 + }
  94 +
  95 + public String getFgs() {
  96 + return fgs;
  97 + }
  98 +
  99 + public void setFgs(String fgs) {
  100 + this.fgs = fgs;
  101 + }
  102 +
  103 + public String getXl() {
  104 + return xl;
  105 + }
  106 +
  107 + public void setXl(String xl) {
  108 + this.xl = xl;
  109 + }
  110 +
  111 + public String getCchjh() {
  112 + return cchjh;
  113 + }
  114 +
  115 + public void setCchjh(String cchjh) {
  116 + this.cchjh = cchjh;
  117 + }
  118 +
  119 + public String getCchsj() {
  120 + return cchsj;
  121 + }
  122 +
  123 + public void setCchsj(String cchsj) {
  124 + this.cchsj = cchsj;
  125 + }
  126 +
  127 + public String getCchqz() {
  128 + return cchqz;
  129 + }
  130 +
  131 + public void setCchqz(String cchqz) {
  132 + this.cchqz = cchqz;
  133 + }
  134 +
  135 + public String getChl() {
  136 + return chl;
  137 + }
  138 +
  139 + public void setChl(String chl) {
  140 + this.chl = chl;
  141 + }
  142 +
  143 + public String getBcjh() {
  144 + return bcjh;
  145 + }
  146 +
  147 + public void setBcjh(String bcjh) {
  148 + this.bcjh = bcjh;
  149 + }
  150 +
  151 + public String getBcsj() {
  152 + return bcsj;
  153 + }
  154 +
  155 + public void setBcsj(String bcsj) {
  156 + this.bcsj = bcsj;
  157 + }
  158 +
  159 + public String getBbzxl() {
  160 + return bbzxl;
  161 + }
  162 +
  163 + public void setBbzxl(String bbzxl) {
  164 + this.bbzxl = bbzxl;
  165 + }
  166 +
  167 + public String getSm() {
  168 + return sm;
  169 + }
  170 +
  171 + public void setSm(String sm) {
  172 + this.sm = sm;
  173 + }
  174 +
  175 +
  176 +}
src/main/java/com/bsth/entity/oil/Cwjy.java
@@ -6,6 +6,9 @@ import javax.persistence.Entity; @@ -6,6 +6,9 @@ import javax.persistence.Entity;
6 import javax.persistence.GeneratedValue; 6 import javax.persistence.GeneratedValue;
7 import javax.persistence.Id; 7 import javax.persistence.Id;
8 import javax.persistence.Table; 8 import javax.persistence.Table;
  9 +import javax.persistence.Transient;
  10 +
  11 +import com.bsth.data.BasicData;
9 12
10 @Entity 13 @Entity
11 @Table(name = "bsth_c_cwjy") 14 @Table(name = "bsth_c_cwjy")
@@ -24,6 +27,11 @@ public class Cwjy { @@ -24,6 +27,11 @@ public class Cwjy {
24 27
25 private Date createDate; 28 private Date createDate;
26 29
  30 + @Transient
  31 + private String gsname;
  32 +
  33 + @Transient
  34 + private String fgsname;
27 public Integer getId() { 35 public Integer getId() {
28 return id; 36 return id;
29 } 37 }
@@ -71,6 +79,22 @@ public class Cwjy { @@ -71,6 +79,22 @@ public class Cwjy {
71 public void setCreateDate(Date createDate) { 79 public void setCreateDate(Date createDate) {
72 this.createDate = createDate; 80 this.createDate = createDate;
73 } 81 }
  82 +
  83 + public String getGsname() {
  84 + return BasicData.businessCodeNameMap.get(this.gsdm);
  85 + }
  86 +
  87 + public void setGsname(String gsname) {
  88 + this.gsname = gsname;
  89 + }
  90 +
  91 + public String getFgsname() {
  92 + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm);
  93 + }
  94 +
  95 + public void setFgsname(String fgsname) {
  96 + this.fgsname = fgsname;
  97 + }
74 98
75 99
76 } 100 }
src/main/java/com/bsth/entity/oil/Cyl.java
@@ -6,6 +6,9 @@ import javax.persistence.Entity; @@ -6,6 +6,9 @@ import javax.persistence.Entity;
6 import javax.persistence.GeneratedValue; 6 import javax.persistence.GeneratedValue;
7 import javax.persistence.Id; 7 import javax.persistence.Id;
8 import javax.persistence.Table; 8 import javax.persistence.Table;
  9 +import javax.persistence.Transient;
  10 +
  11 +import com.bsth.data.BasicData;
9 12
10 @Entity 13 @Entity
11 @Table(name = "bsth_c_cyl") 14 @Table(name = "bsth_c_cyl")
@@ -25,6 +28,16 @@ public class Cyl { @@ -25,6 +28,16 @@ public class Cyl {
25 private Double cxrl; 28 private Double cxrl;
26 //公司代码 29 //公司代码
27 private String gsdm; 30 private String gsdm;
  31 +
  32 + @Transient
  33 + private String gsname;
  34 +
  35 + @Transient
  36 + private String fgsname;
  37 +
  38 + //分公司代码
  39 + private String fgsdm;
  40 +
28 public Integer getId() { 41 public Integer getId() {
29 return id; 42 return id;
30 } 43 }
@@ -72,4 +85,30 @@ public class Cyl { @@ -72,4 +85,30 @@ public class Cyl {
72 public void setGsdm(String gsdm){ 85 public void setGsdm(String gsdm){
73 this.gsdm=gsdm; 86 this.gsdm=gsdm;
74 } 87 }
  88 +
  89 + public String getFgsdm() {
  90 + return fgsdm;
  91 + }
  92 +
  93 + public void setFgsdm(String fgsdm) {
  94 + this.fgsdm = fgsdm;
  95 + }
  96 +
  97 + public String getGsname() {
  98 + return BasicData.businessCodeNameMap.get(this.gsdm);
  99 + }
  100 +
  101 + public void setGsname(String gsname) {
  102 + this.gsname = gsname;
  103 + }
  104 +
  105 + public String getFgsname() {
  106 + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm);
  107 + }
  108 +
  109 + public void setFgsname(String fgsname) {
  110 + this.fgsname = fgsname;
  111 + }
  112 +
  113 +
75 } 114 }
src/main/java/com/bsth/entity/oil/Ylxxb.java
@@ -10,6 +10,8 @@ import javax.persistence.Transient; @@ -10,6 +10,8 @@ import javax.persistence.Transient;
10 10
11 import org.springframework.format.annotation.DateTimeFormat; 11 import org.springframework.format.annotation.DateTimeFormat;
12 12
  13 +import com.bsth.data.BasicData;
  14 +
13 @Entity 15 @Entity
14 @Table(name = "bsth_c_ylxxb") 16 @Table(name = "bsth_c_ylxxb")
15 public class Ylxxb { 17 public class Ylxxb {
@@ -25,6 +27,7 @@ public class Ylxxb { @@ -25,6 +27,7 @@ public class Ylxxb {
25 private String stationid; 27 private String stationid;
26 private Date createtime; 28 private Date createtime;
27 private String gsdm; 29 private String gsdm;
  30 + private String fgsdm;
28 private String yp; 31 private String yp;
29 private String jyggh; 32 private String jyggh;
30 private Double yj; 33 private Double yj;
@@ -37,6 +40,10 @@ public class Ylxxb { @@ -37,6 +40,10 @@ public class Ylxxb {
37 private String ldgh; 40 private String ldgh;
38 //0为接口数据,1为手工输入 41 //0为接口数据,1为手工输入
39 private int jylx=0; 42 private int jylx=0;
  43 + @Transient
  44 + private String gsname;
  45 + @Transient
  46 + private String fgsname;
40 47
41 48
42 public Integer getId() { 49 public Integer getId() {
@@ -93,6 +100,14 @@ public class Ylxxb { @@ -93,6 +100,14 @@ public class Ylxxb {
93 public void setGsdm(String gsdm) { 100 public void setGsdm(String gsdm) {
94 this.gsdm = gsdm; 101 this.gsdm = gsdm;
95 } 102 }
  103 +
  104 +
  105 + public String getFgsdm() {
  106 + return fgsdm;
  107 + }
  108 + public void setFgsdm(String fgsdm) {
  109 + this.fgsdm = fgsdm;
  110 + }
96 public String getYp() { 111 public String getYp() {
97 return yp; 112 return yp;
98 } 113 }
@@ -154,6 +169,20 @@ public class Ylxxb { @@ -154,6 +169,20 @@ public class Ylxxb {
154 this.jylx = jylx; 169 this.jylx = jylx;
155 } 170 }
156 171
  172 + public String getGsname() {
  173 + return BasicData.businessCodeNameMap.get(this.gsdm);
  174 + }
  175 +
  176 + public void setGsname(String gsname) {
  177 + this.gsname = gsname;
  178 + }
157 179
  180 + public String getFgsname() {
  181 + return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm);
  182 + }
  183 +
  184 + public void setFgsname(String fgsname) {
  185 + this.fgsname = fgsname;
  186 + }
158 187
159 } 188 }
src/main/java/com/bsth/entity/search/PredicatesBuilder.java
@@ -8,7 +8,9 @@ import javax.persistence.criteria.Predicate; @@ -8,7 +8,9 @@ import javax.persistence.criteria.Predicate;
8 import java.text.NumberFormat; 8 import java.text.NumberFormat;
9 import java.text.ParseException; 9 import java.text.ParseException;
10 import java.text.SimpleDateFormat; 10 import java.text.SimpleDateFormat;
  11 +import java.util.ArrayList;
11 import java.util.Date; 12 import java.util.Date;
  13 +import java.util.List;
12 14
13 /** 15 /**
14 * 16 *
@@ -58,6 +60,15 @@ public class PredicatesBuilder { @@ -58,6 +60,15 @@ public class PredicatesBuilder {
58 return cb.notEqual(expression, object); 60 return cb.notEqual(expression, object);
59 } 61 }
60 62
  63 + public static Predicate in(CriteriaBuilder cb,Path<?> expression, Object object){
  64 + String[] obj=object.toString().split(",");
  65 + List<String> list=new ArrayList<String>();
  66 + for(int i=0;i<obj.length;i++){
  67 + list.add(obj[i]);
  68 + }
  69 + return cb.in(expression).value(list);
  70 + }
  71 +
61 public static Predicate gt(CriteriaBuilder cb,Path<Number> expression, Object object){ 72 public static Predicate gt(CriteriaBuilder cb,Path<Number> expression, Object object){
62 try { 73 try {
63 return cb.gt(expression, nf.parse(object.toString())); 74 return cb.gt(expression, nf.parse(object.toString()));
src/main/java/com/bsth/entity/search/SearchOperator.java
@@ -26,5 +26,6 @@ public enum SearchOperator { @@ -26,5 +26,6 @@ public enum SearchOperator {
26 isNotNull, // 非空 26 isNotNull, // 非空
27 isf, //假 isFalse,boolean 27 isf, //假 isFalse,boolean
28 ist, //真 isTrue,boolean 28 ist, //真 isTrue,boolean
29 - date //时间 29 + date, //时间
  30 + in //数组
30 } 31 }
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
@@ -82,7 +82,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI @@ -82,7 +82,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
82 @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and bcType='normal' order by bcs") 82 @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and bcType='normal' order by bcs")
83 List<ScheduleRealInfo> queryListWaybill2(String jName,String clZbh,String lpName,String date); 83 List<ScheduleRealInfo> queryListWaybill2(String jName,String clZbh,String lpName,String date);
84 84
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') and bcType='normal' 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.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2") 88 @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2")
src/main/java/com/bsth/service/forms/FormsService.java
@@ -3,12 +3,15 @@ package com.bsth.service.forms; @@ -3,12 +3,15 @@ package com.bsth.service.forms;
3 import java.util.List; 3 import java.util.List;
4 import java.util.Map; 4 import java.util.Map;
5 5
  6 +import com.bsth.entity.mcy_forms.Allline;
6 import com.bsth.entity.mcy_forms.Changetochange; 7 import com.bsth.entity.mcy_forms.Changetochange;
  8 +import com.bsth.entity.mcy_forms.Executionrate;
7 import com.bsth.entity.mcy_forms.Linepasswengerflow; 9 import com.bsth.entity.mcy_forms.Linepasswengerflow;
8 import com.bsth.entity.mcy_forms.Operationservice; 10 import com.bsth.entity.mcy_forms.Operationservice;
9 import com.bsth.entity.mcy_forms.Shifday; 11 import com.bsth.entity.mcy_forms.Shifday;
10 import com.bsth.entity.mcy_forms.Shiftuehiclemanth; 12 import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
11 import com.bsth.entity.mcy_forms.Singledata; 13 import com.bsth.entity.mcy_forms.Singledata;
  14 +import com.bsth.entity.mcy_forms.Turnoutrate;
12 import com.bsth.entity.mcy_forms.Vehicleloading; 15 import com.bsth.entity.mcy_forms.Vehicleloading;
13 import com.bsth.entity.mcy_forms.Waybillday; 16 import com.bsth.entity.mcy_forms.Waybillday;
14 17
@@ -17,8 +20,6 @@ public interface FormsService { @@ -17,8 +20,6 @@ public interface FormsService {
17 20
18 public List<Waybillday> waybillday(Map<String, Object> map); 21 public List<Waybillday> waybillday(Map<String, Object> map);
19 22
20 - List<Waybillday> waybilldayExcel(Map<String, Object> map);  
21 -  
22 public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map); 23 public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map);
23 24
24 public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map); 25 public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map);
@@ -32,4 +33,10 @@ public interface FormsService { @@ -32,4 +33,10 @@ public interface FormsService {
32 public List<Vehicleloading> vehicleloading(String line,String data); 33 public List<Vehicleloading> vehicleloading(String line,String data);
33 34
34 public List<Operationservice> operationservice(Map<String, Object> map); 35 public List<Operationservice> operationservice(Map<String, Object> map);
  36 +
  37 + public List<Turnoutrate> turnoutrate(Map<String, Object> map);
  38 +
  39 + public List<Executionrate> executionrate(Map<String, Object> map);
  40 +
  41 + public List<Allline> allline(Map<String, Object> map);
35 } 42 }
src/main/java/com/bsth/service/forms/impl/ExportServiceImpl.java
@@ -270,4 +270,5 @@ public class ExportServiceImpl implements ExportService{ @@ -270,4 +270,5 @@ public class ExportServiceImpl implements ExportService{
270 } 270 }
271 271
272 272
  273 +
273 } 274 }
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;
3 import java.sql.ResultSet; 6 import java.sql.ResultSet;
4 import java.sql.SQLException; 7 import java.sql.SQLException;
5 -import java.text.DecimalFormat; 8 +import java.text.NumberFormat;
6 import java.text.ParseException; 9 import java.text.ParseException;
7 import java.text.SimpleDateFormat; 10 import java.text.SimpleDateFormat;
8 import java.util.ArrayList; 11 import java.util.ArrayList;
9 import java.util.Date; 12 import java.util.Date;
10 import java.util.HashMap; 13 import java.util.HashMap;
11 -import java.util.Iterator;  
12 import java.util.List; 14 import java.util.List;
13 import java.util.Map; 15 import java.util.Map;
14 16
@@ -22,379 +24,522 @@ import com.bsth.entity.mcy_forms.Operationservice; @@ -22,379 +24,522 @@ import com.bsth.entity.mcy_forms.Operationservice;
22 import com.bsth.entity.mcy_forms.Shifday; 24 import com.bsth.entity.mcy_forms.Shifday;
23 import com.bsth.entity.mcy_forms.Shiftuehiclemanth; 25 import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
24 import com.bsth.entity.mcy_forms.Singledata; 26 import com.bsth.entity.mcy_forms.Singledata;
  27 +import com.bsth.entity.mcy_forms.Turnoutrate;
25 import com.bsth.entity.mcy_forms.Vehicleloading; 28 import com.bsth.entity.mcy_forms.Vehicleloading;
26 import com.bsth.entity.mcy_forms.Waybillday; 29 import com.bsth.entity.mcy_forms.Waybillday;
  30 +import com.bsth.entity.mcy_forms.Allline;
27 import com.bsth.entity.mcy_forms.Changetochange; 31 import com.bsth.entity.mcy_forms.Changetochange;
  32 +import com.bsth.entity.mcy_forms.Executionrate;
28 import com.bsth.service.forms.FormsService; 33 import com.bsth.service.forms.FormsService;
29 import com.bsth.service.realcontrol.ScheduleRealInfoService; 34 import com.bsth.service.realcontrol.ScheduleRealInfoService;
30 import com.bsth.util.ReportRelatedUtils; 35 import com.bsth.util.ReportRelatedUtils;
31 import com.bsth.util.ReportUtils; 36 import com.bsth.util.ReportUtils;
32 37
33 @Service 38 @Service
34 -public class FormsServiceImpl implements FormsService{  
35 - 39 +public class FormsServiceImpl implements FormsService {
  40 +
36 @Autowired 41 @Autowired
37 JdbcTemplate jdbcTemplate; 42 JdbcTemplate jdbcTemplate;
38 - 43 +
39 @Autowired 44 @Autowired
40 ScheduleRealInfoService scheduleRealInfoService; 45 ScheduleRealInfoService scheduleRealInfoService;
41 -  
42 - //行车路单日报表 46 +
  47 + // 行车路单日报表
43 @Override 48 @Override
44 public List<Waybillday> waybillday(Map<String, Object> map) { 49 public List<Waybillday> waybillday(Map<String, Object> map) {
45 - List list1=new ArrayList<>();//  
46 - String sql = "select y.RQ,y.XLBM,y.NBBM,y.JSY,y.JZL,y.YH,y.YH,c.personnel_name from bsth_c_ylb y" +  
47 - " LEFT JOIN bsth_c_personnel c ON c.job_code=y.JSY " +  
48 - " where to_days(y.RQ)=to_days('"+map.get("date").toString()+"') " +  
49 - " and y.XLBM="+map.get("line").toString()+  
50 - " GROUP BY y.NBBM";  
51 - 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"
  54 + + " 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";
52 List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { 58 List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() {
53 @Override 59 @Override
54 public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { 60 public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException {
55 Waybillday wbd = new Waybillday(); 61 Waybillday wbd = new Waybillday();
56 - wbd.setCarPlate(arg0.getString("NBBM")); 62 + wbd.setCarPlate(arg0.getString("cl_zbh"));
57 wbd.setJzl(arg0.getString("JZL")); 63 wbd.setJzl(arg0.getString("JZL"));
58 wbd.setYh(arg0.getString("YH")); 64 wbd.setYh(arg0.getString("YH"));
59 wbd.setjName(arg0.getString("personnel_name")); 65 wbd.setjName(arg0.getString("personnel_name"));
60 - //wbd.setZlc(arg0.getInt("zlc"));  
61 - //System.out.println(arg0.getObject("yl"));  
62 - //wbd.setYl(arg0.getString("yl"));  
63 - //wbd.setNbbm(arg0.getString("nbbm"));  
64 - Map<String, Object> maps=new HashMap<>();  
65 - maps=scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("nbbm"), arg0.getString("RQ")); 66 + // wbd.setZlc(arg0.getInt("zlc"));
  67 + // System.out.println(arg0.getObject("yl"));
  68 + // wbd.setYl(arg0.getString("yl"));
  69 + // wbd.setNbbm(arg0.getString("nbbm"));
  70 + Map<String, Object> maps = new HashMap<>();
  71 + maps = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"),
  72 + arg0.getString("schedule_date"));
66 wbd.setJzl1(maps.get("ksgl").toString()); 73 wbd.setJzl1(maps.get("ksgl").toString());
67 wbd.setZlc(maps.get("realMileage").toString()); 74 wbd.setZlc(maps.get("realMileage").toString());
68 -// {realMileage=211.20, cjbc=2, ljbc=0, remMileage=38.40, ksgl=0.00,  
69 -// jhlc=211.20, sjbc=9, jhbc=11, addMileage=0.00, yygl=211.20  
70 - 75 +
71 return wbd; 76 return wbd;
72 - 77 +
73 } 78 }
74 }); 79 });
75 return list; 80 return list;
76 } 81 }
77 -  
78 -  
79 -  
80 - //线路客流量报表 82 +
  83 + // 线路客流量报表
81 @Override 84 @Override
82 public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) { 85 public List<Linepasswengerflow> linepasswengerflow(Map<String, Object> map) {
83 - String sql = " SELECT s.station_name,l.name,l.create_date from bsth_c_stationroute s " +  
84 - " LEFT JOIN bsth_c_line l on s.line_code=l.line_code " +  
85 - " where to_days(l.create_date)=to_days('"+map.get("date").toString()+"') " +  
86 - " and l.line_code="+map.get("line").toString()+  
87 - " GROUP BY s.station_name ";  
88 - 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 "
  88 + + " 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 ";
  91 +
89 List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { 92 List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() {
90 93
91 @Override 94 @Override
92 public Linepasswengerflow mapRow(ResultSet arg0, int arg1) throws SQLException { 95 public Linepasswengerflow mapRow(ResultSet arg0, int arg1) throws SQLException {
93 Linepasswengerflow lin = new Linepasswengerflow(); 96 Linepasswengerflow lin = new Linepasswengerflow();
94 - lin.setStationName(arg0.getString("station_name"));  
95 - 97 + lin.setStationName(arg0.getString("station_name"));
  98 +
96 return lin; 99 return lin;
97 } 100 }
98 }); 101 });
99 return list; 102 return list;
100 } 103 }
101 104
  105 + // 班次车辆人员月统计
  106 + String startDate;
  107 + String endDate;
102 108
103 - //导出  
104 @Override 109 @Override
105 - public List<Waybillday> waybilldayExcel(Map<String,Object> map) {  
106 - ReportUtils ee = new ReportUtils();  
107 - ReportRelatedUtils rru = new ReportRelatedUtils();  
108 - List<Iterator<?>> list = new ArrayList<Iterator<?>>();  
109 - List<Waybillday> Waybilldays = waybillday(map);  
110 - List<Map<String,Object>> listMap = new ArrayList<Map<String,Object>>();  
111 -  
112 - DecimalFormat format = new DecimalFormat("0.00");  
113 - String jName=null;  
114 - Map<String,Object> map1 = new HashMap<>();  
115 - for(Waybillday Waybillday : Waybilldays){  
116 - map1.put("carPlate", Waybillday.getCarPlate());  
117 - map1.put("jzl1", Waybillday.getJzl1());  
118 - map1.put("jzl", Waybillday.getJzl());  
119 - map1.put("yh", Waybillday.getYh());  
120 - map1.put("jName", Waybillday.getjName());  
121 - jName=Waybillday.getjName();  
122 - map1.put("zlc", Waybillday.getZlc());  
123 - }  
124 -//  
125 -// //计算里程和班次数,并放入Map里  
126 -// map1 = new HashMap<String, Object>();  
127 -// map1.put("jhlc", format.format(jhlc));  
128 -// map1.put("remMileage", format.format(remMileage));  
129 -// map1.put("addMileage", format.format(addMileage));  
130 -// map1.put("yygl", format.format(yygl));  
131 -// map1.put("ksgl", format.format(ksgl));  
132 -// map1.put("realMileage", format.format(yygl+ksgl));  
133 -// map1.put("jhbc", jhbc);  
134 -// map1.put("cjbc", cjbc);  
135 -// map1.put("ljbc", ljbc);  
136 -// map1.put("sjbc", jhbc-cjbc+ljbc);  
137 -  
138 - String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";  
139 -  
140 - list.add(listMap.iterator());  
141 - ee.excelReplace(list, new Object[] { Waybilldays.get(0),map1 }, path+"mould\\waybill_minhang.xls",  
142 - path+"export\\" + jName + ".xls");  
143 - return Waybilldays;  
144 - } 110 + 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 "
  115 + + " 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";
  118 + startDate = map.get("startDate").toString();
  119 + endDate = map.get("endDate").toString();
  120 + List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() {
145 121
  122 + @Override
  123 + public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {
  124 + Shiftuehiclemanth shif = new Shiftuehiclemanth();
  125 + shif.setjName(arg0.getString("j_name"));
146 126
147 - //班次车辆人员月统计  
148 - String startDate;  
149 - String endDate; 127 + Map<String, Object> maps = new HashMap<>();
  128 +
  129 + maps = scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate,
  130 + endDate);
  131 + shif.setJhlc(maps.get("jhlc").toString());
  132 + shif.setEmptMileage(maps.get("ksgl").toString());
  133 + shif.setRemMileage(maps.get("remMileage").toString());
  134 + shif.setAddMileage(maps.get("addMileage").toString());
  135 + shif.setTotalm(maps.get("realMileage").toString());
  136 + shif.setCjbc(maps.get("cjbc").toString());
  137 + shif.setLjbc(maps.get("ljbc").toString());
  138 + shif.setSjbc(maps.get("sjbc").toString());
  139 +
  140 + return shif;
  141 +
  142 + }
  143 + });
  144 +
  145 + return list;
  146 + }
  147 +
  148 + // 班次车辆人员日统计
150 @Override 149 @Override
151 - public List<Shiftuehiclemanth> shiftuehiclemanth( Map<String, Object> map) {  
152 - List list1=new ArrayList<>();//  
153 - String sql = "select r.j_name,r.schedule_date_str,r.update_date,r.cl_zbh " +  
154 - " from bsth_c_s_sp_info_real r " +  
155 - " LEFT JOIN bsth_c_s_ttinfo_detail d on r.lp_name=d.lp " +  
156 - " LEFT JOIN bsth_c_line_information l on l.line=r.lp_name " +  
157 - " where to_days(r.schedule_date_str) BETWEEN to_days('"+map.get("startDate").toString()+"') " +  
158 - " and to_days('"+map.get("endDate").toString()+"') " +  
159 - " and r.xl_bm='"+map.get("line").toString() +"' " +  
160 - " GROUP BY r.j_name" +  
161 - " ORDER BY r.j_name";  
162 - startDate=map.get("startDate").toString();  
163 - endDate=map.get("endDate").toString();  
164 - List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() {  
165 -  
166 - @Override  
167 - public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {  
168 - Shiftuehiclemanth shif = new Shiftuehiclemanth();  
169 - shif.setjName(arg0.getString("j_name"));  
170 -  
171 - Map<String, Object> maps=new HashMap<>();  
172 -  
173 - maps=scheduleRealInfoService.findKMBC1(arg0.getString("j_name"), arg0.getString("cl_zbh"), startDate , endDate );  
174 - shif.setJhlc(maps.get("jhlc").toString());  
175 - shif.setEmptMileage(maps.get("ksgl").toString());  
176 - shif.setRemMileage(maps.get("remMileage").toString());  
177 - shif.setAddMileage(maps.get("addMileage").toString());  
178 - shif.setTotalm(maps.get("realMileage").toString());  
179 - shif.setCjbc(maps.get("cjbc").toString());  
180 - shif.setLjbc(maps.get("ljbc").toString());  
181 - shif.setSjbc(maps.get("sjbc").toString());  
182 -  
183 - return shif;  
184 -  
185 - }  
186 - });  
187 -  
188 - return list; 150 + 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 ";
  154 +
  155 + List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() {
  156 +
  157 + @Override
  158 + public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException {
  159 + Shifday shifday = new Shifday();
  160 + shifday.setjName(arg0.getString("j_name").toString());
  161 + shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString());
  162 + shifday.setLpName(arg0.getString("r.lp_name").toString());
  163 + shifday.setCarPlate(arg0.getString("cl_zbh").toString());
  164 +
  165 + Map<String, Object> map = new HashMap<>();
  166 + map = scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"),
  167 + arg0.getString("schedule_date"));
  168 + shifday.setJhlc(map.get("jhlc").toString());// 计划里程
  169 + // shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程
  170 + shifday.setYygl(map.get("yygl").toString());// 营运里程
  171 + shifday.setEmptMileage(map.get("ksgl").toString());// 空驶里程
  172 + shifday.setRemMileage(map.get("remMileage").toString());// 抽减里程
  173 + shifday.setAddMileage(map.get("addMileage").toString());// 增加里程
  174 + shifday.setTotalm(map.get("realMileage").toString());// 总里程
  175 + shifday.setJhbc(map.get("jhbc").toString());// 计划班次
  176 + // shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次
  177 + shifday.setCjbc(map.get("cjbc").toString());// 抽减班次
  178 + shifday.setLjbc(map.get("ljbc").toString());// 增加班次
  179 + shifday.setSjbc(map.get("sjbc").toString());// 实际班次
  180 + return shifday;
  181 + }
  182 + });
  183 + return list;
189 } 184 }
190 185
  186 + // 换人换车情况日统计
  187 + String rq;
191 188
192 - //班次车辆人员日统计  
193 @Override 189 @Override
194 - public List<Shifday> shifday(Map<String, Object> map) {  
195 - 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 " +  
196 - " FROM bsth_c_s_sp_info_real r " +  
197 - " where to_days(r.schedule_date)=to_days('"+map.get("date").toString()+"') and r.xl_bm="+map.get("line").toString()+  
198 - " GROUP BY r.j_name ";  
199 -  
200 - List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() {  
201 -  
202 - @Override  
203 - public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException {  
204 - Shifday shifday = new Shifday();  
205 - shifday.setjName(arg0.getString("j_name").toString());  
206 - shifday.setsName(arg0.getString("s_name")==null?"":arg0.getString("s_name").toString());  
207 - shifday.setLpName(arg0.getString("r.lp_name").toString());  
208 - shifday.setCarPlate(arg0.getString("cl_zbh").toString());  
209 -  
210 - Map<String, Object> map=new HashMap<>();  
211 - map=scheduleRealInfoService.findKMBC2(arg0.getString("j_gh"), arg0.getString("cl_zbh"), arg0.getString("schedule_date"));  
212 - shifday.setJhlc(map.get("jhlc").toString());//计划里程  
213 - //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程  
214 - shifday.setYygl(map.get("yygl").toString());//营运里程  
215 - shifday.setEmptMileage(map.get("ksgl").toString());//空驶里程  
216 - shifday.setRemMileage(map.get("remMileage").toString());//抽减里程  
217 - shifday.setAddMileage(map.get("addMileage").toString());//增加里程  
218 - shifday.setTotalm(map.get("realMileage").toString());//总里程  
219 - shifday.setJhbc(map.get("jhbc").toString());//计划班次  
220 - //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次  
221 - shifday.setCjbc(map.get("cjbc").toString());//抽减班次  
222 - shifday.setLjbc(map.get("ljbc").toString());//增加班次  
223 - shifday.setSjbc(map.get("sjbc").toString());//实际班次  
224 - return shifday; 190 + public List<Changetochange> changetochange(Map<String, Object> map) {
  191 +
  192 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  193 + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日");
  194 + Date d = null;
  195 + Date d1 = null;
  196 + try {
  197 + d = sdf.parse(map.get("startDate").toString());
  198 + d1 = sdf.parse(map.get("endDate").toString());
  199 + } catch (ParseException e) {
  200 +
  201 + e.printStackTrace();
225 } 202 }
226 - });  
227 - return list;  
228 - } 203 + String rq2 = sdf1.format(d);
  204 + String rq3 = sdf1.format(d1);
  205 +
  206 + rq = rq2 + "-" + rq3;
  207 +
  208 + String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 ";
  209 + if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) {
  210 + sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '"
  211 + + map.get("endDate").toString() + "'";
  212 + }
  213 + if (!map.get("line").equals("")) {
  214 + sql += "and line_code='" + map.get("line") + "'";
  215 + }
  216 + if (map.get("sel").equals("2")) {
  217 + sql += " and c.pcch!=c.pcry";
  218 + } else if (map.get("sel").equals("1")) {
  219 + sql += " and c.jhgh!=c.sjgh";
  220 + }
  221 +
  222 + List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() {
229 223
230 - //换人换车情况日统计  
231 - String rq;  
232 @Override 224 @Override
233 - public List<Changetochange> changetochange(Map<String, Object> map) {  
234 -  
235 - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd") ;  
236 - SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日") ;  
237 - Date d = null ;  
238 - Date d1 = null ;  
239 - try {  
240 - d = sdf.parse(map.get("startDate").toString());  
241 - d1 = sdf.parse(map.get("endDate").toString());  
242 - } catch (ParseException e) {  
243 -  
244 - e.printStackTrace();  
245 - }  
246 - String rq2=sdf1.format(d);  
247 - String rq3=sdf1.format(d1);  
248 -  
249 - rq=rq2+"-"+ rq3;  
250 -  
251 - String sql=" select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 ";  
252 - if(!map.get("startDate").toString().equals(" ")&&!map.get("endDate").toString().equals(" ")){  
253 - sql+= "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '"+map.get("startDate").toString()+"' and '"+map.get("endDate").toString()+"'";  
254 - }  
255 - if(!map.get("line").equals("")){  
256 - sql+="and line_code='"+map.get("line")+"'";  
257 - }  
258 - if(map.get("sel").equals("2")){  
259 - sql+=" and c.pcch!=c.pcry";  
260 - }else if(map.get("sel").equals("1")){  
261 - sql+=" and c.jhgh!=c.sjgh";  
262 - }  
263 -  
264 -  
265 - List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() {  
266 -  
267 - @Override  
268 - public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException {  
269 - Changetochange chan= new Changetochange();  
270 -  
271 - chan.setRq(rq);  
272 - chan.setGs(arg0.getString("gs").toString());  
273 - chan.setFgs(arg0.getString("fgs").toString());  
274 - chan.setXl(arg0.getString("xl").toString());  
275 - chan.setLp(arg0.getString("lp").toString());  
276 - chan.setFssj(arg0.getString("fssj").toString());  
277 - chan.setXgsj(arg0.getString("xgsj").toString());  
278 - chan.setPcch(arg0.getString("pcch").toString());  
279 - chan.setPcry(arg0.getString("pcry").toString());  
280 - chan.setJhch(arg0.getString("jhch").toString());  
281 - chan.setJhgh(arg0.getString("jhgh").toString());  
282 - chan.setSjch(arg0.getString("sjch").toString());  
283 - chan.setSjgh(arg0.getString("sjgh").toString());  
284 - chan.setYy(arg0.getString("yy").toString());  
285 - chan.setXgr(arg0.getString("xgr").toString());  
286 - return chan;  
287 - }  
288 - });  
289 - return list;  
290 - } 225 + public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException {
  226 + Changetochange chan = new Changetochange();
291 227
  228 + chan.setRq(rq);
  229 + chan.setGs(arg0.getString("gs").toString());
  230 + chan.setFgs(arg0.getString("fgs").toString());
  231 + chan.setXl(arg0.getString("xl").toString());
  232 + chan.setLp(arg0.getString("lp").toString());
  233 + chan.setFssj(arg0.getString("fssj").toString());
  234 + chan.setXgsj(arg0.getString("xgsj").toString());
  235 + chan.setPcch(arg0.getString("pcch").toString());
  236 + chan.setPcry(arg0.getString("pcry").toString());
  237 + chan.setJhch(arg0.getString("jhch").toString());
  238 + chan.setJhgh(arg0.getString("jhgh").toString());
  239 + chan.setSjch(arg0.getString("sjch").toString());
  240 + chan.setSjgh(arg0.getString("sjgh").toString());
  241 + chan.setYy(arg0.getString("yy").toString());
  242 + chan.setXgr(arg0.getString("xgr").toString());
  243 + return chan;
  244 + }
  245 + });
  246 + return list;
  247 + }
292 248
293 - //路单数据 249 + // 路单数据
294 @Override 250 @Override
295 public List<Singledata> singledata(Map<String, Object> map) { 251 public List<Singledata> singledata(Map<String, Object> map) {
296 -  
297 - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " +  
298 - " FROM bsth_c_ylb y" +  
299 - " where y.RQ BETWEEN '"+map.get("startDate").toString() +"'" +  
300 - " and '"+map.get("endDate").toString()+"'"+  
301 - " and y.XLBM='"+map.get("line").toString()+"'"+  
302 - " GROUP BY y.NBBM ";  
303 -  
304 - List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {  
305 - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");  
306 - @Override  
307 - public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {  
308 - Singledata sin = new Singledata();  
309 - sin.setrQ(sdf.format(arg0.getDate("rq")));  
310 - sin.setgS(arg0.getString("SSGSDM").toString());  
311 - sin.setxL(arg0.getString("XLBM").toString());  
312 - sin.setClzbh(arg0.getString("NBBM").toString());  
313 - sin.setJsy(arg0.getString("JSY").toString());  
314 - sin.setHyl(arg0.getString("YH").toString());  
315 - sin.setJzl(arg0.getString("JZL").toString());  
316 - // sin.setJzl(arg0.getString(""));//非营业性用油  
317 - sin.setJhjl(arg0.getString("JZL"));  
318 - Map<String, Object> maps=new HashMap<>();  
319 - maps=scheduleRealInfoService.findKMBC2(sin.getJsy(),sin.getClzbh(),sin.getrQ());  
320 - sin.setjName(maps.get("j_name")==null?"":maps.get("j_name").toString());  
321 - sin.setSgh(maps.get("s_gh")==null?"":maps.get("s_gh").toString());  
322 - sin.setsName(maps.get("s_name")==null?"":maps.get("s_name").toString());  
323 - sin.setJhlc(maps.get("yygl")==null?"":maps.get("yygl").toString());  
324 - sin.setEmptMileage(maps.get("ksgl")==null?"":maps.get("ksgl").toString());  
325 - sin.setJhjl(maps.get("jhlc")==null?"":maps.get("jhlc").toString());  
326 -  
327 - return sin;  
328 - }  
329 - });  
330 - return list;  
331 -}  
332 252
  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 ";
333 257
334 - //运营服务阶段报表 258 + List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
  259 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  260 +
  261 + @Override
  262 + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
  263 + 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());
  269 + sin.setHyl(arg0.getString("YH").toString());
  270 + sin.setJzl(arg0.getString("JZL").toString());
  271 + // sin.setJzl(arg0.getString(""));//非营业性用油
  272 + sin.setJhjl(arg0.getString("JZL"));
  273 + 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());
  276 + 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());
  278 + sin.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString());
  279 + sin.setEmptMileage(maps.get("ksgl") == null ? "" : maps.get("ksgl").toString());
  280 + sin.setJhjl(maps.get("jhlc") == null ? "" : maps.get("jhlc").toString());
  281 +
  282 + return sin;
  283 + }
  284 + });
  285 + return list;
  286 + }
  287 +
  288 + // 运营服务阶段报表
335 @Override 289 @Override
336 public List<Operationservice> operationservice(Map<String, Object> map) { 290 public List<Operationservice> operationservice(Map<String, Object> map) {
337 -  
338 - String sql = " SELECT y.RQ,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " +  
339 - " FROM bsth_c_ylb y" +  
340 - " where y.RQ BETWEEN '"+map.get("startDate").toString() +"'" +  
341 - " and '"+map.get("endDate").toString()+"'"+  
342 - " and y.XLBM='"+map.get("line").toString()+"'"+  
343 - " GROUP BY y.NBBM ";  
344 -  
345 - List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() {  
346 - SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");  
347 - @Override  
348 - public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException {  
349 - Singledata sin = new Singledata();  
350 - Operationservice op = new Operationservice();  
351 - op.setXlName(arg0.getString("XLBM").toString());  
352 - op.setJzl(arg0.getString("JZL").toString());  
353 - op.setXhl(arg0.getString("YH").toString());  
354 - Map<String, Object> maps=new HashMap<>();  
355 - maps=scheduleRealInfoService.findKMBC2(sin.getJsy(),sin.getClzbh(),sin.getrQ());  
356 - op.setXsgl(maps.get("yygl").toString()==null?"":maps.get("yygl").toString());  
357 - op.setEmptMileage(maps.get("ksgl").toString()==null?"":maps.get("ksgl").toString());  
358 - op.setSjbc(maps.get("sjbc").toString()==null?"":maps.get("sjbc").toString());  
359 - return op;  
360 - }  
361 - });  
362 - return list; 291 +
  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 +
  296 + List<Operationservice> list = jdbcTemplate.query(sql, new RowMapper<Operationservice>() {
  297 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  298 +
  299 + @Override
  300 + public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException {
  301 + Singledata sin = new Singledata();
  302 + Operationservice op = new Operationservice();
  303 + op.setXlName(arg0.getString("XLBM").toString());
  304 + op.setJzl(arg0.getString("JZL").toString());
  305 + op.setXhl(arg0.getString("YH").toString());
  306 + Map<String, Object> maps = new HashMap<>();
  307 + maps = scheduleRealInfoService.findKMBC2(sin.getJsy(), sin.getClzbh(), sin.getrQ());
  308 + op.setXsgl(maps.get("yygl").toString() == null ? "" : maps.get("yygl").toString());
  309 + op.setEmptMileage(maps.get("ksgl").toString() == null ? "" : maps.get("ksgl").toString());
  310 + op.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());
  311 + return op;
  312 + }
  313 + });
  314 + return list;
363 } 315 }
364 316
  317 + // 车辆加注
  318 + @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 +
  325 + List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() {
  326 + @Override
  327 + public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException {
  328 + 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());
  333 + ve.setHyl(arg0.getString("YH").toString());
  334 + ve.setJzl(arg0.getString("JZL").toString());
  335 + // ve.setLs(arg0.getString("").toString());//尿素
  336 + Map<String, Object> maps = new HashMap<>();
  337 + maps = scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"),
  338 + arg0.getString("RQ"));
  339 + ve.setJhlc(maps.get("yygl") == null ? "" : maps.get("yygl").toString());
  340 + ve.setJhbc(maps.get("jhbc").toString() == null ? "" : maps.get("jhbc").toString());// 计划班次
  341 + ve.setSjbc(maps.get("sjbc").toString() == null ? "" : maps.get("sjbc").toString());// 实际班次
  342 + return ve;
  343 + }
  344 + });
  345 + return list;
  346 + }
  347 +
  348 + // 营运线路出车率统计表
  349 + @Override
  350 + public List<Turnoutrate> turnoutrate(Map<String, Object> map) {
  351 +
  352 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  353 + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日");
  354 + Date d = null;
  355 + Date d1 = null;
  356 + try {
  357 + d = sdf.parse(map.get("startDate").toString());
  358 + d1 = sdf.parse(map.get("endDate").toString());
  359 + } catch (ParseException e) {
  360 +
  361 + e.printStackTrace();
  362 + }
  363 + String rq2 = sdf1.format(d);
  364 + String rq3 = sdf1.format(d1);
  365 +
  366 + rq = rq2 + "-" + rq3;
  367 +
  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 "
  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"
  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"
  373 + + " 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 '"
  377 + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString()
  378 + + "' 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 "
  380 + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm ";
  381 + List<Turnoutrate> list = jdbcTemplate.query(sql, new RowMapper<Turnoutrate>() {
  382 +
  383 + @Override
  384 + public Turnoutrate mapRow(ResultSet arg0, int arg1) throws SQLException {
  385 + Turnoutrate tu = new Turnoutrate();
  386 + NumberFormat numberFormat = NumberFormat.getInstance();
  387 + numberFormat.setMaximumFractionDigits(2);
  388 + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl"))
  389 + / (float) Integer.parseInt(arg0.getString("jcl")) * 100);
  390 + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc"))
  391 + / (float) Integer.parseInt(arg0.getString("jbc")) * 100);
  392 + tu.setRq(rq);
  393 + tu.setGs(arg0.getString("gs_name").toString());
  394 + tu.setZhgs(arg0.getString("fgs_name").toString());
  395 + tu.setXl(arg0.getString("xlgs"));
  396 + tu.setXlmc(arg0.getString("sxl"));
  397 + tu.setCchjh(arg0.getString("jcl").toString());
  398 + tu.setCchsj(arg0.getString("scl").toString());
  399 + tu.setCchqz(arg0.getString("sxl").toString());
  400 + tu.setChl(result1 + "%");// 出车率
  401 + tu.setBcjh(arg0.getString("jbc").toString());
  402 + tu.setBcsj(arg0.getString("sbc").toString());
  403 + tu.setBbzxl(result2 + "%");// 班次执行率
  404 + // tu.setSm(arg0.getString("gs_name").toString());
  405 + tu.setGsgs(arg0.getString("gslsbm").toString());
  406 + tu.setFgsgs(arg0.getString("fgsbm").toString());
  407 + return tu;
  408 + }
  409 +
  410 + });
  411 +
  412 + return list;
  413 + }
365 414
366 - //车辆加注  
367 @Override 415 @Override
368 - public List<Vehicleloading> vehicleloading(String line,String data) {  
369 -  
370 - String sql = " SELECT y.RQ,y.SSGSDM,y.XLBM,y.NBBM,y.JSY,y.YH,y.JZL " +  
371 - " FROM bsth_c_ylb y " +  
372 - " where to_days(y.RQ)=to_days('"+data +"')" +  
373 - " and y.XLBM='"+line+"' "+  
374 - " GROUP BY y.NBBM ";  
375 -  
376 - List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() {  
377 - @Override  
378 - public Vehicleloading mapRow(ResultSet arg0, int arg1) throws SQLException {  
379 - Vehicleloading ve = new Vehicleloading();  
380 - ve.setrQ(arg0.getString("RQ").toString());  
381 - ve.setgS(arg0.getString("SSGSDM").toString());  
382 - ve.setxL(arg0.getString("XLBM").toString());  
383 - ve.setClzbh(arg0.getString("NBBM").toString());  
384 - ve.setHyl(arg0.getString("YH").toString());  
385 - ve.setJzl(arg0.getString("JZL").toString());  
386 - //ve.setLs(arg0.getString("").toString());//尿素  
387 - Map<String, Object> maps=new HashMap<>();  
388 - maps=scheduleRealInfoService.findKMBC2(arg0.getString("JSY"), arg0.getString("NBBM"), arg0.getString("RQ"));  
389 - ve.setJhlc(maps.get("yygl")==null?"":maps.get("yygl").toString());  
390 - ve.setJhbc(maps.get("jhbc").toString()==null?"":maps.get("jhbc").toString());//计划班次  
391 - ve.setSjbc(maps.get("sjbc").toString()==null?"":maps.get("sjbc").toString());//实际班次  
392 - return ve; 416 + public List<Executionrate> executionrate(Map<String, Object> map) {
  417 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  418 + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日");
  419 + Date d = null;
  420 + Date d1 = null;
  421 + try {
  422 + d = sdf.parse(map.get("startDate").toString());
  423 + d1 = sdf.parse(map.get("endDate").toString());
  424 + } catch (ParseException e) {
  425 +
  426 + e.printStackTrace();
393 } 427 }
394 - });  
395 - return list; 428 + String rq2 = sdf1.format(d);
  429 + String rq3 = sdf1.format(d1);
  430 +
  431 + rq = rq2 + "-" + rq3;
  432 +
  433 + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from "
  434 + + " (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"
  435 + + " 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='"
  437 + + map.get("line").toString() + "' AND gs_bm is not null"
  438 + + " 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 "
  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 "
  441 + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '"
  442 + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString()
  443 + + "' AND gs_bm is not null "
  444 + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on "
  445 + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm ";
  446 + List<Executionrate> list = jdbcTemplate.query(sql, new RowMapper<Executionrate>() {
  447 +
  448 + @Override
  449 + public Executionrate mapRow(ResultSet arg0, int arg1) throws SQLException {
  450 + Executionrate tu = new Executionrate();
  451 + NumberFormat numberFormat = NumberFormat.getInstance();
  452 + numberFormat.setMaximumFractionDigits(2);
  453 + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl"))
  454 + / (float) Integer.parseInt(arg0.getString("jcl")) * 100);
  455 + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc"))
  456 + / (float) Integer.parseInt(arg0.getString("jbc")) * 100);
  457 + tu.setRq(rq);
  458 + tu.setGs(arg0.getString("gs_name").toString());
  459 + tu.setZhgs(arg0.getString("fgs_name").toString());
  460 + tu.setXl(arg0.getString("xlgs"));
  461 + tu.setXlmc(arg0.getString("sxl"));
  462 + tu.setCchjh(arg0.getString("jcl").toString());
  463 + tu.setCchsj(arg0.getString("scl").toString());
  464 + tu.setCchqz(arg0.getString("sxl").toString());
  465 + tu.setChl(result1 + "%");// 出车率
  466 + tu.setBcjh(arg0.getString("jbc").toString());
  467 + tu.setBcsj(arg0.getString("sbc").toString());
  468 + tu.setBbzxl(result2 + "%");// 班次执行率
  469 + tu.setSm(arg0.getString("xl_name").toString());
  470 + tu.setGsgs(arg0.getString("gslsbm").toString());
  471 + tu.setFgsgs(arg0.getString("fgsbm").toString());
  472 + return tu;
  473 + }
  474 +
  475 + });
  476 +
  477 + return list;
396 } 478 }
397 479
  480 + // 营运线路名称统计表
  481 + @Override
  482 + public List<Allline> allline(Map<String, Object> map) {
  483 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  484 + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy年MM月dd日");
  485 + Date d = null;
  486 + Date d1 = null;
  487 + try {
  488 + d = sdf.parse(map.get("startDate").toString());
  489 + d1 = sdf.parse(map.get("endDate").toString());
  490 + } catch (ParseException e) {
398 491
  492 + e.printStackTrace();
  493 + }
  494 + String rq2 = sdf1.format(d);
  495 + String rq3 = sdf1.format(d1);
399 496
  497 + rq = rq2 + "-" + rq3;
  498 +
  499 + String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm from "
  500 + + " (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"
  501 + + " 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='"
  503 + + map.get("line").toString() + "' AND gs_bm is not null"
  504 + + " 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 "
  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 "
  507 + + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '"
  508 + + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString()
  509 + + "' AND gs_bm is not null "
  510 + + "GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name) b ON t.company=b.gs_bm) b on "
  511 + + " a.gs_bm=b.gs_bm and a.fgs_bm=b.fgs_bm and a.xl_bm=b.xl_bm ";
  512 + List<Allline> list = jdbcTemplate.query(sql, new RowMapper<Allline>() {
  513 +
  514 + @Override
  515 + public Allline mapRow(ResultSet arg0, int arg1) throws SQLException {
  516 + Allline tu = new Allline();
  517 + NumberFormat numberFormat = NumberFormat.getInstance();
  518 + numberFormat.setMaximumFractionDigits(2);
  519 + String result1 = numberFormat.format((float) Integer.parseInt(arg0.getString("scl"))
  520 + / (float) Integer.parseInt(arg0.getString("jcl")) * 100);
  521 + String result2 = numberFormat.format((float) Integer.parseInt(arg0.getString("sbc"))
  522 + / (float) Integer.parseInt(arg0.getString("jbc")) * 100);
  523 + tu.setRq(rq);
  524 + tu.setGs(arg0.getString("gs_name").toString());
  525 + tu.setZhgs(arg0.getString("fgs_name").toString());
  526 + tu.setXl(arg0.getString("xl_name"));
  527 + tu.setXlmc(arg0.getString("sxl"));
  528 + tu.setCchjh(arg0.getString("jcl").toString());
  529 + tu.setCchsj(arg0.getString("scl").toString());
  530 + tu.setCchqz(arg0.getString("sxl").toString());
  531 + tu.setChl(result1 + "%");// 出车率
  532 + tu.setBcjh(arg0.getString("jbc").toString());
  533 + tu.setBcsj(arg0.getString("sbc").toString());
  534 + tu.setBbzxl(result2 + "%");// 班次执行率
  535 + // tu.setSm(arg0.getString("xl_name").toString());
  536 + tu.setGsgs(arg0.getString("gslsbm").toString());
  537 + tu.setFgsgs(arg0.getString("fgsbm").toString());
  538 + return tu;
  539 + }
  540 +
  541 + });
  542 +
  543 + return list;
  544 + }
400 } 545 }
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper; @@ -18,7 +18,6 @@ import org.springframework.jdbc.core.RowMapper;
18 import org.springframework.stereotype.Service; 18 import org.springframework.stereotype.Service;
19 19
20 import com.bsth.entity.realcontrol.ScheduleRealInfo; 20 import com.bsth.entity.realcontrol.ScheduleRealInfo;
21 -import com.bsth.entity.schedule.TTInfoDetail;  
22 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; 21 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
23 import com.bsth.service.BusIntervalService; 22 import com.bsth.service.BusIntervalService;
24 import com.bsth.service.schedule.PeopleCarPlanService; 23 import com.bsth.service.schedule.PeopleCarPlanService;
@@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -39,8 +38,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
39 private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 38 private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
40 private DecimalFormat df = new DecimalFormat("##0.00"); 39 private DecimalFormat df = new DecimalFormat("##0.00");
41 40
42 - public List<ScheduleRealInfo> getSchedule(String line, String startDate, String endDate, String model, String times){  
43 - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); 41 + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String startDate, String endDate, String model, String times){
  42 + List<Long> ttList = new ArrayList<Long>();
44 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 43 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
45 List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>(); 44 List<ScheduleRealInfo> resList = new ArrayList<ScheduleRealInfo>();
46 45
@@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -54,6 +53,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
54 String[] split = times.split("-"); 53 String[] split = times.split("-");
55 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; 54 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'";
56 } 55 }
  56 + if(company.length() != 0){
  57 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  58 + }
57 sql += " and bc_type = 'normal'"; 59 sql += " and bc_type = 'normal'";
58 60
59 list =jdbcTemplate.query(sql, 61 list =jdbcTemplate.query(sql,
@@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -85,23 +87,20 @@ public class BusIntervalServiceImpl implements BusIntervalService {
85 schedule.setClZbh(rs.getString("cl_zbh")); 87 schedule.setClZbh(rs.getString("cl_zbh"));
86 schedule.setjGh(rs.getString("j_gh")); 88 schedule.setjGh(rs.getString("j_gh"));
87 schedule.setjName(rs.getString("j_name")); 89 schedule.setjName(rs.getString("j_name"));
  90 + schedule.setSpId(rs.getLong("sp_id"));
88 return schedule; 91 return schedule;
89 } 92 }
90 }); 93 });
91 94
92 if(model.length() != 0){ 95 if(model.length() != 0){
93 - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'"; 96 +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'";
  97 + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'";
94 98
95 ttList =jdbcTemplate.query(sql, 99 ttList =jdbcTemplate.query(sql,
96 - new RowMapper<TTInfoDetail>(){ 100 + new RowMapper<Long>(){
97 @Override 101 @Override
98 - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException {  
99 - TTInfoDetail ttInfo = new TTInfoDetail();  
100 - ttInfo.setBcType(rs.getString("bc_type"));  
101 - ttInfo.setBcs(rs.getInt("bcs"));  
102 - ttInfo.setFcsj(rs.getString("fcsj"));  
103 - ttInfo.setBcsj(rs.getInt("bcsj"));  
104 - return ttInfo; 102 + public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
  103 + return rs.getLong("id");
105 } 104 }
106 }); 105 });
107 } 106 }
@@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -133,11 +132,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
133 } 132 }
134 DO:{ 133 DO:{
135 if(model.length() != 0){ 134 if(model.length() != 0){
136 - for(TTInfoDetail tt : ttList){  
137 - if(tt.getBcs() == schedule.getBcs() && tt.getFcsj().equals(schedule.getFcsj())  
138 - && tt.getBcsj() == schedule.getBcsj()){  
139 - resList.add(schedule);  
140 - break DO; 135 + for(Long tt : ttList){
  136 + if(tt == schedule.getSpId()){
  137 + resList.add(schedule);
  138 + break DO;
141 } 139 }
142 } 140 }
143 } else { 141 } else {
@@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -210,7 +208,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
210 public List<Map<String, Object>> interval(Map<String, Object> map) { 208 public List<Map<String, Object>> interval(Map<String, Object> map) {
211 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 209 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
212 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 210 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
213 - 211 +
  212 + String company = map.get("company").toString();
  213 + String subCompany = map.get("subCompany").toString();
214 String line = map.get("line").toString(); 214 String line = map.get("line").toString();
215 String startDate = map.get("startDate").toString(); 215 String startDate = map.get("startDate").toString();
216 String endDate = map.get("endDate").toString(); 216 String endDate = map.get("endDate").toString();
@@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -228,7 +228,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
228 times = "06:00-07:00"; 228 times = "06:00-07:00";
229 } 229 }
230 230
231 - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); 231 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times);
232 232
233 String[] date1 = startDate.split("-"); 233 String[] date1 = startDate.split("-");
234 String[] date2 = endDate.split("-"); 234 String[] date2 = endDate.split("-");
@@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -254,7 +254,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
254 long sjInterval = 0; 254 long sjInterval = 0;
255 int jhNum = 0; 255 int jhNum = 0;
256 int sjNum = 0; 256 int sjNum = 0;
257 - String company = "", subCompany = ""; 257 + String companyName = "", subCompanyName = "";
258 Map<String, Object> tempMap = new HashMap<String, Object>(); 258 Map<String, Object> tempMap = new HashMap<String, Object>();
259 Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>(); 259 Map<String, List<ScheduleRealInfo>> temp = new HashMap<String, List<ScheduleRealInfo>>();
260 for(ScheduleRealInfo schedule : keyMap.get(key)){ 260 for(ScheduleRealInfo schedule : keyMap.get(key)){
@@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -269,10 +269,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
269 jhNum++; 269 jhNum++;
270 ScheduleRealInfo schedule1 = tempList.get(i - 1); 270 ScheduleRealInfo schedule1 = tempList.get(i - 1);
271 ScheduleRealInfo schedule2 = tempList.get(i); 271 ScheduleRealInfo schedule2 = tempList.get(i);
272 - if(schedule1.getGsName() != null && company.length() == 0)  
273 - company = schedule1.getGsName();  
274 - if(schedule1.getFgsName() != null && subCompany.length() == 0)  
275 - subCompany = schedule1.getFgsName(); 272 +
  273 + if(schedule1.getGsName() != null && companyName.length() == 0)
  274 + companyName = schedule1.getGsName();
  275 + if(schedule1.getFgsName() != null && subCompanyName.length() == 0)
  276 + subCompanyName = schedule1.getFgsName();
  277 +
276 jhInterval += schedule2.getFcsjT(); 278 jhInterval += schedule2.getFcsjT();
277 jhInterval -= schedule1.getFcsjT(); 279 jhInterval -= schedule1.getFcsjT();
278 if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){ 280 if(schedule1.getFcsjActual()!=null && schedule2.getFcsjActual()!=null){
@@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -290,8 +292,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
290 tempMap.put("line", keys[0]); 292 tempMap.put("line", keys[0]);
291 tempMap.put("qdz", keys[1]); 293 tempMap.put("qdz", keys[1]);
292 tempMap.put("times", times); 294 tempMap.put("times", times);
293 - tempMap.put("company", company);  
294 - tempMap.put("subCompany", subCompany); 295 + tempMap.put("company", companyName);
  296 + tempMap.put("subCompany", subCompanyName);
295 if(jhNum != 0) 297 if(jhNum != 0)
296 tempMap.put("jhInterval", jhInterval/jhNum); 298 tempMap.put("jhInterval", jhInterval/jhNum);
297 else 299 else
@@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -333,6 +335,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
333 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 335 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
334 Map<String, Object> modelMap = new HashMap<String, Object>(); 336 Map<String, Object> modelMap = new HashMap<String, Object>();
335 337
  338 + String company = map.get("company").toString();
  339 + String subCompany = map.get("subCompany").toString();
336 String line = map.get("line").toString(); 340 String line = map.get("line").toString();
337 String startDate = map.get("startDate").toString(); 341 String startDate = map.get("startDate").toString();
338 String endDate = map.get("endDate").toString(); 342 String endDate = map.get("endDate").toString();
@@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -351,7 +355,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
351 times = "06:00-07:00"; 355 times = "06:00-07:00";
352 } 356 }
353 357
354 - List<ScheduleRealInfo> list = this.getSchedule(line, startDate, endDate, model, times); 358 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, startDate, endDate, model, times);
355 359
356 String[] date1 = startDate.split("-"); 360 String[] date1 = startDate.split("-");
357 String[] date2 = endDate.split("-"); 361 String[] date2 = endDate.split("-");
@@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -389,12 +393,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
389 double yssd = 0; 393 double yssd = 0;
390 int yyNum = 0; 394 int yyNum = 0;
391 int ysNum = 0; 395 int ysNum = 0;
392 - String company = "", subCompany = ""; 396 + String companyName = "", subCompanyName = "";
393 for(ScheduleRealInfo schedule : keyMap.get(key)){ 397 for(ScheduleRealInfo schedule : keyMap.get(key)){
394 - if(schedule.getGsName() != null && company.length() == 0)  
395 - company = schedule.getGsName();  
396 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
397 - subCompany = schedule.getFgsName(); 398 + if(schedule.getGsName() != null && companyName.length() == 0)
  399 + companyName = schedule.getGsName();
  400 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  401 + subCompanyName = schedule.getFgsName();
398 if(!tempMap.containsKey("xlDir")) 402 if(!tempMap.containsKey("xlDir"))
399 tempMap.put("xlDir", schedule.getXlDir()); 403 tempMap.put("xlDir", schedule.getXlDir());
400 if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0")) 404 if(!tempMap.containsKey("qdz_zdz") && schedule.getXlDir().equals("0"))
@@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -424,8 +428,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
424 tempMap.put("line", keys[0]); 428 tempMap.put("line", keys[0]);
425 tempMap.put("lp", keys[1]); 429 tempMap.put("lp", keys[1]);
426 tempMap.put("zdz", keys[2]); 430 tempMap.put("zdz", keys[2]);
427 - tempMap.put("company", company);  
428 - tempMap.put("subCompany", subCompany); 431 + tempMap.put("company", companyName);
  432 + tempMap.put("subCompany", subCompanyName);
429 433
430 tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟"); 434 tempMap.put("yysj", (yysj/60) + "小时" + (yysj%60) + "分钟");
431 yysjSum += yysj; 435 yysjSum += yysj;
@@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -465,7 +469,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
465 List<Integer> keyList = new ArrayList<Integer>(); 469 List<Integer> keyList = new ArrayList<Integer>();
466 Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>(); 470 Map<Integer, List<Map<String, Object>>> temp = new HashMap<Integer, List<Map<String,Object>>>();
467 for(Map<String, Object> m : keyMap2.get(key)){ 471 for(Map<String, Object> m : keyMap2.get(key)){
468 - Integer num = Integer.valueOf(m.get("lp").toString())*10+Integer.valueOf(m.get("xlDir").toString()); 472 + String lp = m.get("lp").toString();
  473 + String str = "";
  474 + for(int i = 0; i < lp.length(); i++){
  475 + str += (int)lp.charAt(i);
  476 + }
  477 + Integer num = Integer.valueOf(str)*10+Integer.valueOf(m.get("xlDir").toString());
469 if(!temp.containsKey(num)){ 478 if(!temp.containsKey(num)){
470 temp.put(num, new ArrayList<Map<String, Object>>()); 479 temp.put(num, new ArrayList<Map<String, Object>>());
471 keyList.add(num); 480 keyList.add(num);
@@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -494,6 +503,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
494 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); 503 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>();
495 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); 504 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>();
496 505
  506 + String company = map.get("company").toString();
  507 + String subCompany = map.get("subCompany").toString();
497 String line = map.get("line").toString(); 508 String line = map.get("line").toString();
498 String startDate = map.get("startDate").toString(); 509 String startDate = map.get("startDate").toString();
499 String endDate = map.get("endDate").toString(); 510 String endDate = map.get("endDate").toString();
@@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -512,7 +523,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
512 times = "06:00-07:00"; 523 times = "06:00-07:00";
513 } 524 }
514 525
515 - list = getSchedule(line, startDate, endDate, model, times); 526 + list = getSchedule(company, subCompany, line, startDate, endDate, model, times);
516 527
517 String[] date1 = startDate.split("-"); 528 String[] date1 = startDate.split("-");
518 String[] date2 = endDate.split("-"); 529 String[] date2 = endDate.split("-");
@@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -559,12 +570,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
559 long sjtz = 0l; 570 long sjtz = 0l;
560 long tzsjMax = 0l; 571 long tzsjMax = 0l;
561 long tzsjMin = 0l; 572 long tzsjMin = 0l;
562 - String company = "", subCompany = ""; 573 + String companyName = "", subCompanyName = "";
563 for(ScheduleRealInfo schedule : keyMap.get(key)){ 574 for(ScheduleRealInfo schedule : keyMap.get(key)){
564 - if(schedule.getGsName() != null && company.length() == 0)  
565 - company = schedule.getGsName();  
566 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
567 - subCompany = schedule.getFgsName(); 575 + if(schedule.getGsName() != null && companyName.length() == 0)
  576 + companyName = schedule.getGsName();
  577 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  578 + subCompanyName = schedule.getFgsName();
568 long tzsj = 0l; 579 long tzsj = 0l;
569 long yssj = 0l; 580 long yssj = 0l;
570 jhbc++; 581 jhbc++;
@@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -618,8 +629,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
618 tempMap.put("jhfc", keys[3]); 629 tempMap.put("jhfc", keys[3]);
619 tempMap.put("station", keys[4]); 630 tempMap.put("station", keys[4]);
620 tempMap.put("times", times); 631 tempMap.put("times", times);
621 - tempMap.put("company", company);  
622 - tempMap.put("subCompany", subCompany); 632 + tempMap.put("company", companyName);
  633 + tempMap.put("subCompany", subCompanyName);
623 if(startDate.equals(endDate)) 634 if(startDate.equals(endDate))
624 tempMap.put("dates", startDate); 635 tempMap.put("dates", startDate);
625 else 636 else
@@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -692,10 +703,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
692 int wdfc2 = 0; 703 int wdfc2 = 0;
693 int ys = 0; 704 int ys = 0;
694 int tz = 0; 705 int tz = 0;
695 - String company = ""; 706 + String companyName = "", subCompanyName = "";
696 for(Map<String, Object> m : keyMap0.get(key)){ 707 for(Map<String, Object> m : keyMap0.get(key)){
697 - if(m.containsKey("company") && company.length() == 0)  
698 - company = m.get("company").toString(); 708 + if(m.containsKey("company") && companyName.length() == 0)
  709 + companyName = m.get("company").toString();
  710 + if(m.containsKey("subCompany") && subCompanyName.length() == 0)
  711 + subCompanyName = m.get("subCompany").toString();
699 jhbc += Integer.valueOf(m.get("jhbc").toString()); 712 jhbc += Integer.valueOf(m.get("jhbc").toString());
700 sjbc += Integer.valueOf(m.get("sjbc").toString()); 713 sjbc += Integer.valueOf(m.get("sjbc").toString());
701 wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1)); 714 wddf1 += Integer.valueOf(m.get("wddf1").toString().substring(0, m.get("wddf1").toString().length() - 1));
@@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -709,7 +722,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
709 tempMap.put("dates", startDate); 722 tempMap.put("dates", startDate);
710 else 723 else
711 tempMap.put("dates", startDate + "--" + endDate); 724 tempMap.put("dates", startDate + "--" + endDate);
712 - tempMap.put("company", company); 725 + tempMap.put("company", companyName);
  726 + tempMap.put("subCompany", subCompanyName);
713 String[] keys = key.split("/"); 727 String[] keys = key.split("/");
714 tempMap.put("line", keys[0]); 728 tempMap.put("line", keys[0]);
715 tempMap.put("lp", keys[1]); 729 tempMap.put("lp", keys[1]);
@@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -733,11 +747,23 @@ public class BusIntervalServiceImpl implements BusIntervalService {
733 747
734 for(String key : keyMap1.keySet()){ 748 for(String key : keyMap1.keySet()){
735 Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() { 749 Collections.sort(keyMap1.get(key), new Comparator<Map<String, Object>>() {
736 - 750 +
737 public int compare(Map<String, Object> o1, Map<String, Object> o2) { 751 public int compare(Map<String, Object> o1, Map<String, Object> o2) {
  752 + Integer a;
  753 + Integer b;
  754 + String lp1 = o1.get("lp").toString();
  755 + String lp2 = o2.get("lp").toString();
  756 + String str1 = "";
  757 + String str2 = "";
  758 + for(int i = 0; i < lp1.length(); i++){
  759 + str1 += (int)lp1.charAt(i);
  760 + }
  761 + for(int i = 0; i < lp2.length(); i++){
  762 + str2 += (int)lp2.charAt(i);
  763 + }
738 764
739 - Integer a = Integer.valueOf(o1.get("lp").toString());  
740 - Integer b = Integer.valueOf(o2.get("lp").toString()); 765 + a = Integer.valueOf(str1);
  766 + b = Integer.valueOf(str2);
741 767
742 // 升序 768 // 升序
743 return a.compareTo(b); 769 return a.compareTo(b);
@@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -757,6 +783,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
757 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 783 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
758 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 784 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
759 785
  786 + String company = map.get("company").toString();
  787 + String subCompany = map.get("subCompany").toString();
760 String line = map.get("line").toString(); 788 String line = map.get("line").toString();
761 String startDate = map.get("startDate").toString(); 789 String startDate = map.get("startDate").toString();
762 String endDate = map.get("endDate").toString(); 790 String endDate = map.get("endDate").toString();
@@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -774,7 +802,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
774 times = "06:00-07:00"; 802 times = "06:00-07:00";
775 } 803 }
776 804
777 - list = getSchedule(line, startDate, endDate, model, times); 805 + list = getSchedule(company, subCompany, line, startDate, endDate, model, times);
778 806
779 String[] date1 = startDate.split("-"); 807 String[] date1 = startDate.split("-");
780 String[] date2 = endDate.split("-"); 808 String[] date2 = endDate.split("-");
@@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -807,12 +835,12 @@ public class BusIntervalServiceImpl implements BusIntervalService {
807 qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0, 835 qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0,
808 qhbc = 0, qhlc = 0, wybc = 0, wylc = 0; 836 qhbc = 0, qhlc = 0, wybc = 0, wylc = 0;
809 int qtbc = 0, qtlc = 0; 837 int qtbc = 0, qtlc = 0;
810 - String company = "", subCompany = ""; 838 + String companyName = "", subCompanyName = "";
811 for(ScheduleRealInfo schedule : keyMap.get(key)){ 839 for(ScheduleRealInfo schedule : keyMap.get(key)){
812 - if(schedule.getGsName() != null && company.length() == 0)  
813 - company = schedule.getGsName();  
814 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
815 - subCompany = schedule.getFgsName(); 840 + if(schedule.getGsName() != null && companyName.length() == 0)
  841 + companyName = schedule.getGsName();
  842 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  843 + subCompanyName = schedule.getFgsName();
816 jhbc++; 844 jhbc++;
817 if(schedule.getJhlc() != null) 845 if(schedule.getJhlc() != null)
818 jhlc += schedule.getJhlc(); 846 jhlc += schedule.getJhlc();
@@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -861,8 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
861 tempMap.put("date", startDate); 889 tempMap.put("date", startDate);
862 else 890 else
863 tempMap.put("date", startDate + "--" + endDate); 891 tempMap.put("date", startDate + "--" + endDate);
864 - tempMap.put("company", company);  
865 - tempMap.put("subCompany", subCompany); 892 + tempMap.put("company", companyName);
  893 + tempMap.put("subCompany", subCompanyName);
866 tempMap.put("times", times); 894 tempMap.put("times", times);
867 tempMap.put("line", key); 895 tempMap.put("line", key);
868 tempMap.put("jhbc", jhbc); 896 tempMap.put("jhbc", jhbc);
@@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -919,6 +947,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
919 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); 947 Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>();
920 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); 948 Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>();
921 949
  950 + String company = map.get("company").toString();
  951 + String subCompany = map.get("subCompany").toString();
922 String line = map.get("line").toString(); 952 String line = map.get("line").toString();
923 String startDate = map.get("startDate").toString(); 953 String startDate = map.get("startDate").toString();
924 String endDate = map.get("endDate").toString(); 954 String endDate = map.get("endDate").toString();
@@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -941,6 +971,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
941 String[] split = times.split("-"); 971 String[] split = times.split("-");
942 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; 972 sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'";
943 } 973 }
  974 + if(company.length() != 0){
  975 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  976 + }
944 sql += " and bc_type = 'normal'"; 977 sql += " and bc_type = 'normal'";
945 978
946 list =jdbcTemplate.query(sql, 979 list =jdbcTemplate.query(sql,
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
1 package com.bsth.service.oil.impl; 1 package com.bsth.service.oil.impl;
2 2
  3 +import java.sql.ResultSet;
  4 +import java.sql.SQLException;
3 import java.text.ParseException; 5 import java.text.ParseException;
4 import java.text.SimpleDateFormat; 6 import java.text.SimpleDateFormat;
5 import java.util.ArrayList; 7 import java.util.ArrayList;
  8 +import java.util.Arrays;
6 import java.util.HashMap; 9 import java.util.HashMap;
7 import java.util.List; 10 import java.util.List;
8 import java.util.Map; 11 import java.util.Map;
9 12
10 import org.springframework.beans.factory.annotation.Autowired; 13 import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.jdbc.core.JdbcTemplate;
  15 +import org.springframework.jdbc.core.RowMapper;
11 import org.springframework.stereotype.Service; 16 import org.springframework.stereotype.Service;
12 17
13 import com.bsth.common.ResponseCode; 18 import com.bsth.common.ResponseCode;
@@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -28,17 +33,103 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
28 @Autowired 33 @Autowired
29 YlxxbRepository ylxxbRepository; 34 YlxxbRepository ylxxbRepository;
30 35
  36 + @Autowired
  37 + JdbcTemplate jdbcTemplate;
  38 +
31 @SuppressWarnings("unchecked") 39 @SuppressWarnings("unchecked")
32 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { 40 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) {
33 - // TODO Auto-generated method stub 41 + int page=Integer.parseInt(map.get("page").toString());
34 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); 42 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
35 - List<Ylxxb> yList=new ArrayList<Ylxxb>(); 43 +
36 String rq=map.get("rq").toString(); 44 String rq=map.get("rq").toString();
37 String nbbm=""; 45 String nbbm="";
38 - if(map.get("nbbm")!=null){  
39 - nbbm=map.get("nbbm").toString(); 46 + if(map.get("nbbh")!=null){
  47 + nbbm=map.get("nbbh").toString();
  48 + }
  49 +
  50 + Object gsdmIn=map.get("gsdm_in");
  51 + Object fgsdmIn=map.get("fgsdm_in");
  52 + String addSql="";
  53 + String gsdmLike="";
  54 + String fgsdmLike="";
  55 +
  56 + //选择了公司
  57 + if(gsdmIn==null){
  58 + gsdmLike=map.get("gsdm_like").toString();
  59 + addSql += " and a.gsdm = '"+gsdmLike+ "' ";
  60 +
  61 + //选择了分公司
  62 + if(fgsdmIn==null){
  63 + fgsdmLike=map.get("fgsdm_like").toString();;
  64 + addSql += " and a.fgsdm = '"+fgsdmLike+ "' ";
  65 + }else{
  66 + String fgsdmIns[]= fgsdmIn.toString().split(",");
  67 + addSql +=" and a.fgsdm in (";
  68 + for(int i=0;i<fgsdmIns.length;i++){
  69 + addSql +="'"+fgsdmIns[i]+"'";
  70 + if(i<fgsdmIns.length-1){
  71 + addSql +=",";
  72 + }
  73 + }
  74 + addSql +=")";
  75 + }
  76 + }else{
  77 + //没有选择公司 (分公司也没有选择)
  78 + String gsdmIns[]=gsdmIn.toString().split(",");
  79 + addSql += " and a.gsdm in (";
  80 + for(int i=0;i<gsdmIns.length;i++){
  81 + addSql +="'" +gsdmIns[i]+"'";
  82 + if(i<gsdmIns.length-1){
  83 + addSql+=",";
  84 + }
  85 + }
  86 + addSql +=")";
  87 + String fgsdmIns[]= fgsdmIn.toString().split(",");
  88 + addSql +=" and a.fgsdm in (";
  89 + for(int i=0;i<fgsdmIns.length;i++){
  90 + addSql +="'"+fgsdmIns[i]+"'";
  91 + if(i<fgsdmIns.length-1){
  92 + addSql +=",";
  93 + }
  94 + }
  95 + addSql +=")";
  96 +
  97 +
40 } 98 }
41 - List<Object[]> list=repository.obtainCwjycl(rq,nbbm); 99 + String countSql="SELECT ifnull(count(*),0) as countTs FROM bsth_c_cwjy a "+
  100 + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " +
  101 + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy "
  102 + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+
  103 + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql ;
  104 + int listsize=jdbcTemplate.queryForObject(countSql, Integer.class);
  105 + // TODO Auto-generated method stub
  106 + String sql="SELECT a.gsdm as gsdm,a.fgsdm as fgsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid,"
  107 + + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+
  108 + " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days('"+rq+"') and jylx=1) b " +
  109 + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy "
  110 + + "from bsth_c_ylb where to_days(rq)= to_days('"+rq+"' ) group by nbbm "+
  111 + " ) c on a.nbbm=c.nbbm where a.nbbm like '%"+nbbm+"%' " +addSql+ " limit "+page*10+","+10;
  112 +
  113 +
  114 + List<Ylxxb> yList= jdbcTemplate.query(sql,
  115 + new RowMapper<Ylxxb>(){
  116 + @Override
  117 + public Ylxxb mapRow(ResultSet rs, int rowNum) throws SQLException {
  118 + Ylxxb t=new Ylxxb();
  119 + t.setGsdm(rs.getString("gsdm"));
  120 + t.setFgsdm(rs.getString("fgsdm"));
  121 + t.setNbbm(rs.getString("nbbm"));
  122 + t.setJsy(rs.getString("jsy"));
  123 + t.setJzl(rs.getDouble("jzl"));
  124 + t.setStationid(rs.getString("stationid"));
  125 + t.setNylx(rs.getInt("nylx"));
  126 + t.setYj(rs.getDouble("yj"));
  127 + t.setBz(rs.getString("bz"));
  128 + t.setLdgh(rs.getString("ldgh"));
  129 + return t;
  130 + }
  131 + });
  132 + /*List<Object[]> list=repository.obtainCwjycl(rq,nbbm);
42 for (int i = 0; i < list.size(); i++) { 133 for (int i = 0; i < list.size(); i++) {
43 Ylxxb y=new Ylxxb(); 134 Ylxxb y=new Ylxxb();
44 y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString()); 135 y.setGsdm(list.get(i)[0]==null?"":list.get(i)[0].toString());
@@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw @@ -57,8 +148,8 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
57 e.printStackTrace(); 148 e.printStackTrace();
58 } 149 }
59 yList.add(y); 150 yList.add(y);
60 - }  
61 - PageHelper pageHelper = new PageHelper(yList.size(), map); 151 + }*/
  152 + PageHelper pageHelper = new PageHelper(listsize, map);
62 pageHelper.getMap(); 153 pageHelper.getMap();
63 PageObject<Ylxxb> pageObject=pageHelper.getPageObject(); 154 PageObject<Ylxxb> pageObject=pageHelper.getPageObject();
64 pageObject.setDataList(yList); 155 pageObject.setDataList(yList);
src/main/java/com/bsth/service/oil/impl/YlxxbServiceImpl.java
@@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements @@ -34,6 +34,7 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
34 34
35 @Override 35 @Override
36 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) { 36 public PageObject<Ylxxb> Pagequery(Map<String, Object> map) {
  37 +
37 String rq=map.get("yyrq").toString(); 38 String rq=map.get("yyrq").toString();
38 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); 39 SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
39 try { 40 try {
@@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements @@ -51,6 +52,15 @@ public class YlxxbServiceImpl extends BaseServiceImpl&lt;Ylxxb,Integer&gt; implements
51 // TODO Auto-generated catch block 52 // TODO Auto-generated catch block
52 e.printStackTrace(); 53 e.printStackTrace();
53 } 54 }
  55 + /*if(map.get("gsdm_in")!=null){
  56 + map.put("ssgsdm_in", map.get("gsdm_in"));
  57 + map.remove("gsdm_in");
  58 +
  59 + }else{
  60 + map.put("ssgsdm_like", map.get("gsdm_like"));
  61 + map.remove("gsdm_like");
  62 + }*/
  63 +
54 //根具条件查询指定日期Ylb的数据 64 //根具条件查询指定日期Ylb的数据
55 List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map)); 65 List<Ylb> ylbIterator=(List<Ylb>) ylbRepository.findAll(new CustomerSpecs<Ylb>(map));
56 List<Ylxxb> list=new ArrayList<Ylxxb>(); 66 List<Ylxxb> list=new ArrayList<Ylxxb>();
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -97,7 +97,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -97,7 +97,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
97 97
98 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code); 98 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code);
99 99
100 - List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date); 100 + List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String type);
101 101
102 Map<String, Object> removeChildTask(Long taskId); 102 Map<String, Object> removeChildTask(Long taskId);
103 103
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -1208,8 +1208,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1208,8 +1208,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1208 1208
1209 @Override 1209 @Override
1210 public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, 1210 public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh,
1211 - String lpName,String date) {  
1212 - return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date); 1211 + String lpName,String date,String type) {
  1212 + if(type.equals("qp")){
  1213 + return scheduleRealInfoRepository.queryListWaybill2(jName,clZbh,lpName,date);
  1214 + }else{
  1215 + return scheduleRealInfoRepository.queryListWaybill(jName,clZbh,lpName,date);
  1216 + }
1213 } 1217 }
1214 1218
1215 @Override 1219 @Override
src/main/java/com/bsth/service/schedule/PeopleCarPlanService.java
@@ -5,15 +5,15 @@ import java.util.Map; @@ -5,15 +5,15 @@ import java.util.Map;
5 5
6 public interface PeopleCarPlanService { 6 public interface PeopleCarPlanService {
7 7
8 - List<Map<String, Object>> queryPeopleCar(String line, String date, String type); 8 + List<Map<String, Object>> queryPeopleCar(Map<String, Object> map);
9 9
10 - List<Map<String, Object>> workDaily(String line, String date, String type); 10 + List<Map<String, Object>> workDaily(Map<String, Object> map);
11 11
12 - Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type); 12 + Map<String, Object> scheduleAnaly(Map<String, Object> map);
13 13
14 - List<Map<String, Object>> getModel(String line, String startDate, String endDate); 14 + List<Map<String, Object>> getModel(Map<String, Object> map);
15 15
16 - List<Map<String, Object>> firstAndLastBus(String line, String date, String type); 16 + List<Map<String, Object>> firstAndLastBus(Map<String, Object> map);
17 17
18 - List<Map<String, Object>> commandState(String line, String date, String code); 18 + List<Map<String, Object>> commandState(Map<String, Object> map);
19 } 19 }
src/main/java/com/bsth/service/schedule/PeopleCarPlanServiceImpl.java
1 package com.bsth.service.schedule; 1 package com.bsth.service.schedule;
2 2
3 -import com.bsth.entity.realcontrol.ScheduleRealInfo;  
4 -import com.bsth.entity.schedule.SchedulePlanInfo;  
5 -import com.bsth.entity.schedule.TTInfoDetail;  
6 -import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;  
7 -import com.bsth.util.ReportUtils;  
8 -import org.springframework.beans.factory.annotation.Autowired;  
9 -import org.springframework.jdbc.core.JdbcTemplate;  
10 -import org.springframework.jdbc.core.RowMapper;  
11 -import org.springframework.stereotype.Service;  
12 -  
13 import java.math.BigDecimal; 3 import java.math.BigDecimal;
14 import java.sql.ResultSet; 4 import java.sql.ResultSet;
15 import java.sql.SQLException; 5 import java.sql.SQLException;
16 import java.text.DecimalFormat; 6 import java.text.DecimalFormat;
17 import java.text.ParseException; 7 import java.text.ParseException;
18 import java.text.SimpleDateFormat; 8 import java.text.SimpleDateFormat;
19 -import java.util.*; 9 +import java.util.ArrayList;
  10 +import java.util.Collections;
  11 +import java.util.Date;
  12 +import java.util.HashMap;
  13 +import java.util.HashSet;
  14 +import java.util.Iterator;
  15 +import java.util.List;
  16 +import java.util.Map;
  17 +import java.util.Set;
  18 +
  19 +import org.springframework.beans.factory.annotation.Autowired;
  20 +import org.springframework.jdbc.core.JdbcTemplate;
  21 +import org.springframework.jdbc.core.RowMapper;
  22 +import org.springframework.stereotype.Service;
  23 +
  24 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  25 +import com.bsth.entity.schedule.SchedulePlanInfo;
  26 +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
  27 +import com.bsth.util.ReportUtils;
20 28
21 @Service 29 @Service
22 public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { 30 public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
@@ -27,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -27,14 +35,74 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
27 @Autowired 35 @Autowired
28 private JdbcTemplate jdbcTemplate; 36 private JdbcTemplate jdbcTemplate;
29 37
  38 + public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){
  39 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
  40 +
  41 + try {
  42 + String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
  43 +
  44 + if(line.length() != 0)
  45 + sql += " and xl_bm = '"+line+"'";
  46 + if(company.length() != 0)
  47 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  48 +
  49 + list =jdbcTemplate.query(sql,
  50 + new RowMapper<ScheduleRealInfo>(){
  51 + @Override
  52 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  53 + ScheduleRealInfo schedule = new ScheduleRealInfo();
  54 + schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  55 + schedule.setRealExecDate(rs.getString("real_exec_date"));
  56 + schedule.setXlName(rs.getString("xl_name"));
  57 + schedule.setLpName(rs.getString("lp_name"));
  58 + schedule.setBcType(rs.getString("bc_type"));
  59 + schedule.setBcs(rs.getInt("bcs"));
  60 + schedule.setBcsj(rs.getInt("bcsj"));
  61 + schedule.setJhlc(rs.getDouble("jhlc"));
  62 + schedule.setDfsj(rs.getString("dfsj"));
  63 + schedule.setFcsj(rs.getString("fcsj"));
  64 + schedule.setFcsjActual(rs.getString("fcsj_actual"));
  65 + schedule.setZdsj(rs.getString("zdsj"));
  66 + schedule.setZdsjActual(rs.getString("zdsj_actual"));
  67 + schedule.setQdzName(rs.getString("qdz_name"));
  68 + schedule.setZdzName(rs.getString("zdz_name"));
  69 + schedule.setXlDir(rs.getString("xl_dir"));
  70 + schedule.setStatus(rs.getInt("status"));
  71 + schedule.setRemarks(rs.getString("remarks"));
  72 + schedule.setGsName(rs.getString("gs_name"));
  73 + schedule.setFgsName(rs.getString("fgs_name"));
  74 + schedule.setClZbh(rs.getString("cl_zbh"));
  75 + schedule.setjGh(rs.getString("j_gh"));
  76 + schedule.setjName(rs.getString("j_name"));
  77 + schedule.setsGh(rs.getString("s_gh"));
  78 + schedule.setsName(rs.getString("s_name"));
  79 + schedule.setSpId(rs.getLong("sp_id"));
  80 + return schedule;
  81 + }
  82 + });
  83 +
  84 + } catch (Exception e) {
  85 + // TODO: handle exception
  86 + e.printStackTrace();
  87 + }
  88 +
  89 + return list;
  90 + }
  91 +
30 @Override 92 @Override
31 - public List<Map<String, Object>> queryPeopleCar(String line, String date, String type) { 93 + public List<Map<String, Object>> queryPeopleCar(Map<String, Object> map) {
32 Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>(); 94 Map<String, List<SchedulePlanInfo>> keyMap = new HashMap<String, List<SchedulePlanInfo>>();
33 Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>(); 95 Map<String, List<Map<String, Object>>> temp = new HashMap<String, List<Map<String, Object>>>();
34 List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>(); 96 List<SchedulePlanInfo> list = new ArrayList<SchedulePlanInfo>();
35 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 97 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
36 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); 98 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
37 99
  100 + String company = map.get("company").toString();
  101 + String subCompany = map.get("subCompany").toString();
  102 + String line = map.get("line").toString();
  103 + String date = map.get("date").toString();
  104 + String type = map.get("type").toString();
  105 +
38 if(date.length() == 0){ 106 if(date.length() == 0){
39 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 107 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
40 } 108 }
@@ -45,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -45,6 +113,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
45 if(line.length() != 0){ 113 if(line.length() != 0){
46 sql += " and xl_bm = '"+line+"'"; 114 sql += " and xl_bm = '"+line+"'";
47 } 115 }
  116 + if(company.length() != 0){
  117 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  118 + }
48 119
49 list =jdbcTemplate.query(sql, 120 list =jdbcTemplate.query(sql,
50 new RowMapper<SchedulePlanInfo>(){ 121 new RowMapper<SchedulePlanInfo>(){
@@ -59,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -59,6 +130,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
59 schedule.setjName(rs.getString("j_name")); 130 schedule.setjName(rs.getString("j_name"));
60 schedule.setsName(rs.getString("s_name")); 131 schedule.setsName(rs.getString("s_name"));
61 schedule.setJhlc(rs.getDouble("jhlc")); 132 schedule.setJhlc(rs.getDouble("jhlc"));
  133 + schedule.setGsName(rs.getString("gs_name"));
  134 + schedule.setFgsName(rs.getString("fgs_name"));
62 return schedule; 135 return schedule;
63 } 136 }
64 }); 137 });
@@ -80,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -80,7 +153,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
80 for(String key : keyMap.keySet()){ 153 for(String key : keyMap.keySet()){
81 Map<String, Object> tempMap = new HashMap<String, Object>(); 154 Map<String, Object> tempMap = new HashMap<String, Object>();
82 BigDecimal jhlc = new BigDecimal(0); 155 BigDecimal jhlc = new BigDecimal(0);
  156 + String companyName = "", subCompanyName = "";
83 for(SchedulePlanInfo schedule : keyMap.get(key)){ 157 for(SchedulePlanInfo schedule : keyMap.get(key)){
  158 + if(schedule.getGsName() != null && companyName.length() == 0)
  159 + companyName = schedule.getGsName();
  160 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  161 + subCompanyName = schedule.getFgsName();
84 if(schedule.getJhlc() != null) 162 if(schedule.getJhlc() != null)
85 jhlc = jhlc.add(new BigDecimal(schedule.getJhlc())); 163 jhlc = jhlc.add(new BigDecimal(schedule.getJhlc()));
86 } 164 }
@@ -91,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -91,6 +169,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
91 tempMap.put("clzbh", split[2]); 169 tempMap.put("clzbh", split[2]);
92 tempMap.put("jName", split[3]); 170 tempMap.put("jName", split[3]);
93 tempMap.put("sName", split[4]); 171 tempMap.put("sName", split[4]);
  172 + tempMap.put("company", companyName);
  173 + tempMap.put("subCompany", subCompanyName);
94 if(split[4].equals("null")) 174 if(split[4].equals("null"))
95 tempMap.put("sName", "/"); 175 tempMap.put("sName", "/");
96 tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP)); 176 tempMap.put("jhlc", jhlc.setScale(2, BigDecimal.ROUND_UP));
@@ -107,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -107,7 +187,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
107 Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>(); 187 Map<Integer, List<Map<String, Object>>> tempList = new HashMap<Integer, List<Map<String,Object>>>();
108 List<Integer> keyList = new ArrayList<Integer>(); 188 List<Integer> keyList = new ArrayList<Integer>();
109 for(Map<String, Object> m : temp.get(key)){ 189 for(Map<String, Object> m : temp.get(key)){
110 - int i = Integer.valueOf(m.get("lp").toString()); 190 + String lp = m.get("lp").toString();
  191 + String str = "";
  192 + for(int i = 0; i < lp.length(); i++){
  193 + str += (int)lp.charAt(i);
  194 + }
  195 + int i = Integer.valueOf(str);
111 if(!tempList.containsKey(i)) 196 if(!tempList.containsKey(i))
112 tempList.put(i, new ArrayList<Map<String, Object>>()); 197 tempList.put(i, new ArrayList<Map<String, Object>>());
113 tempList.get(i).add(m); 198 tempList.get(i).add(m);
@@ -125,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -125,12 +210,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
125 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 210 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
126 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 211 sdfSimple = new SimpleDateFormat("yyyyMMdd");
127 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 212 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
128 - Map<String,Object> map = new HashMap<String, Object>(); 213 + Map<String,Object> m = new HashMap<String, Object>();
129 ReportUtils ee = new ReportUtils(); 214 ReportUtils ee = new ReportUtils();
130 try { 215 try {
131 listI.add(resList.iterator()); 216 listI.add(resList.iterator());
132 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 217 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
133 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\peoCarPlan.xls", 218 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\peoCarPlan.xls",
134 path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 219 path+"export\\计划车辆班次人员" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
135 } catch (Exception e) { 220 } catch (Exception e) {
136 // TODO: handle exception 221 // TODO: handle exception
@@ -142,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -142,17 +227,22 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
142 } 227 }
143 228
144 @Override 229 @Override
145 - public List<Map<String, Object>> workDaily(String line, String date, String type) { 230 + public List<Map<String, Object>> workDaily(Map<String, Object> map) {
146 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 231 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
147 DecimalFormat df = new DecimalFormat("###0.##"); 232 DecimalFormat df = new DecimalFormat("###0.##");
  233 +
  234 + String company = map.get("company").toString();
  235 + String subCompany = map.get("subCompany").toString();
  236 + String line = map.get("line").toString();
  237 + String date = map.get("date").toString();
  238 + String type = map.get("type").toString();
  239 +
148 if(date.length() == 0){ 240 if(date.length() == 0){
149 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 241 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
150 } 242 }
151 - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();  
152 - if(line.length() != 0)  
153 - list = scheduleRealInfoRepository.scheduleDaily(line, date);  
154 - else  
155 - list = scheduleRealInfoRepository.findByDate(date); 243 +
  244 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
  245 +
156 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 246 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
157 for(ScheduleRealInfo schedule : list){ 247 for(ScheduleRealInfo schedule : list){
158 String key = schedule.getXlName(); 248 String key = schedule.getXlName();
@@ -169,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -169,10 +259,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
169 Long wgfEnd = 0l; 259 Long wgfEnd = 0l;
170 try { 260 try {
171 //早晚高峰时段 261 //早晚高峰时段
172 - zgfBegin = sdf.parse(date + "07:30").getTime();  
173 - zgfEnd = sdf.parse(date + "09:30").getTime();  
174 - wgfBegin = sdf.parse(date + "16:30").getTime();  
175 - wgfEnd = sdf.parse(date + "18:30").getTime(); 262 + zgfBegin = sdf.parse(date + "06:30").getTime();
  263 + zgfEnd = sdf.parse(date + "08:30").getTime();
  264 + wgfBegin = sdf.parse(date + "16:00").getTime();
  265 + wgfEnd = sdf.parse(date + "18:00").getTime();
176 } catch (ParseException e) { 266 } catch (ParseException e) {
177 // TODO Auto-generated catch block 267 // TODO Auto-generated catch block
178 e.printStackTrace(); 268 e.printStackTrace();
@@ -180,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -180,26 +270,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
180 for(String key : keyMap.keySet()){ 270 for(String key : keyMap.keySet()){
181 Map<String, Object> tempMap = new HashMap<String, Object>(); 271 Map<String, Object> tempMap = new HashMap<String, Object>();
182 Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>(); 272 Map<String, List <ScheduleRealInfo>> listMap = new HashMap<String, List <ScheduleRealInfo>>();
183 - int jhbc = 0;  
184 - int dftz = 0;  
185 - int jhcc = 0;  
186 - int sjcc = 0;  
187 - int upfk = 0;  
188 - int updk = 0;  
189 - int dnfk = 0;  
190 - int dndk = 0;  
191 - int upfm = 0;  
192 - int updm = 0;  
193 - int dnfm = 0;  
194 - int dndm = 0;  
195 - int jhsb = 0;  
196 - int sjsb = 0;  
197 - int jhmb = 0;  
198 - int sjmb = 0;  
199 - int jhzgf = 0;  
200 - int sjzgf = 0;  
201 - int jhwgf = 0;  
202 - int sjwgf = 0; 273 + int jhbc = 0, dftz = 0, jhcc = 0, sjcc = 0;
  274 + int upfk = 0, updk = 0, dnfk = 0, dndk = 0;
  275 + int upfm = 0, updm = 0, dnfm = 0, dndm = 0;
  276 + int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0;
  277 + int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0;
203 for(ScheduleRealInfo schedule : keyMap.get(key)){ 278 for(ScheduleRealInfo schedule : keyMap.get(key)){
204 schedule.setFcsjAll(schedule.getFcsj()); 279 schedule.setFcsjAll(schedule.getFcsj());
205 280
@@ -324,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -324,12 +399,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
324 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 399 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
325 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 400 sdfSimple = new SimpleDateFormat("yyyyMMdd");
326 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 401 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
327 - Map<String,Object> map = new HashMap<String, Object>(); 402 + Map<String,Object> m = new HashMap<String, Object>();
328 ReportUtils ee = new ReportUtils(); 403 ReportUtils ee = new ReportUtils();
329 try { 404 try {
330 listI.add(resList.iterator()); 405 listI.add(resList.iterator());
331 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 406 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
332 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\workDaily.xls", 407 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\workDaily.xls",
333 path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 408 path+"export\\营运服务日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
334 } catch (Exception e) { 409 } catch (Exception e) {
335 // TODO: handle exception 410 // TODO: handle exception
@@ -341,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -341,15 +416,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
341 } 416 }
342 417
343 @Override 418 @Override
344 - public Map<String, Object> scheduleAnaly(String page, String line, String startDate, String endDate, String model, String type) { 419 + public Map<String, Object> scheduleAnaly(Map<String, Object> map) {
345 DecimalFormat df = new DecimalFormat("00"); 420 DecimalFormat df = new DecimalFormat("00");
346 - List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>(); 421 +// List<TTInfoDetail> ttList = new ArrayList<TTInfoDetail>();
  422 + List<Long> ttList = new ArrayList<Long>();
347 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 423 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
348 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 424 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
349 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); 425 List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
350 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 426 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
351 Map<String, Object> modelMap = new HashMap<String, Object>(); 427 Map<String, Object> modelMap = new HashMap<String, Object>();
352 428
  429 + String company = map.get("company").toString();
  430 + String subCompany = map.get("subCompany").toString();
  431 + String page = map.get("page").toString();
  432 + String line = map.get("line").toString();
  433 + String startDate = map.get("startDate").toString();
  434 + String endDate = map.get("endDate").toString();
  435 + String model = map.get("model").toString();
  436 + String type = map.get("type").toString();
  437 +
353 if(startDate.length() == 0){ 438 if(startDate.length() == 0){
354 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 439 startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
355 } 440 }
@@ -362,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -362,6 +447,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
362 if(line.length() != 0){ 447 if(line.length() != 0){
363 sql += " and xl_bm = '"+line+"'"; 448 sql += " and xl_bm = '"+line+"'";
364 } 449 }
  450 + if(company.length() != 0){
  451 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  452 + }
365 sql += " and bc_type = 'normal'"; 453 sql += " and bc_type = 'normal'";
366 454
367 list =jdbcTemplate.query(sql, 455 list =jdbcTemplate.query(sql,
@@ -380,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -380,27 +468,24 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
380 schedule.setZdsjActual(rs.getString("zdsj_actual")); 468 schedule.setZdsjActual(rs.getString("zdsj_actual"));
381 schedule.setBcsj(rs.getInt("bcsj")); 469 schedule.setBcsj(rs.getInt("bcsj"));
382 schedule.setQdzName(rs.getString("qdz_name")); 470 schedule.setQdzName(rs.getString("qdz_name"));
  471 + schedule.setSpId(rs.getLong("sp_id"));
383 return schedule; 472 return schedule;
384 } 473 }
385 }); 474 });
386 475
387 if(model.length() != 0){ 476 if(model.length() != 0){
388 - sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'";  
389 - } 477 +// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type = 'normal'";
  478 + sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type = 'normal'";
390 479
391 - ttList =jdbcTemplate.query(sql,  
392 - new RowMapper<TTInfoDetail>(){  
393 - @Override  
394 - public TTInfoDetail mapRow(ResultSet rs, int rowNum) throws SQLException {  
395 - TTInfoDetail ttInfo = new TTInfoDetail();  
396 - ttInfo.setBcType(rs.getString("bc_type"));  
397 - ttInfo.setBcs(rs.getInt("bcs"));  
398 - ttInfo.setFcno(rs.getInt("fcno"));  
399 - ttInfo.setFcsj(rs.getString("fcsj"));  
400 - ttInfo.setBcsj(rs.getInt("bcsj"));  
401 - return ttInfo;  
402 - }  
403 - }); 480 + ttList = jdbcTemplate.query(sql,
  481 + new RowMapper<Long>(){
  482 + @Override
  483 + public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
  484 + return rs.getLong("id");
  485 + }
  486 + });
  487 +
  488 + }
404 489
405 } catch (Exception e) { 490 } catch (Exception e) {
406 // TODO Auto-generated catch block 491 // TODO Auto-generated catch block
@@ -411,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -411,9 +496,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
411 for(ScheduleRealInfo schedule : list){ 496 for(ScheduleRealInfo schedule : list){
412 DO:{ 497 DO:{
413 if(model.length() != 0){ 498 if(model.length() != 0){
414 - for(TTInfoDetail tt : ttList){  
415 - if(tt.getBcs() == schedule.getBcs() && tt.getFcno() == schedule.getFcno()  
416 - && tt.getFcsj().equals(schedule.getFcsj()) && tt.getBcsj() == schedule.getBcsj()){ 499 + for(Long tt : ttList){
  500 + if(tt == schedule.getSpId()){
417 String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); 501 String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj();
418 if(!keyMap.containsKey(key)) 502 if(!keyMap.containsKey(key))
419 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 503 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
@@ -524,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -524,16 +608,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
524 } 608 }
525 Collections.sort(keyList); 609 Collections.sort(keyList);
526 for(Integer Int : keyList){ 610 for(Integer Int : keyList){
527 - Map<String, Object> map = tempMap.get(Int);  
528 - String str = map.get("line").toString(); 611 + Map<String, Object> m = tempMap.get(Int);
  612 + String str = m.get("line").toString();
529 if(!listMap2.containsKey(str)) 613 if(!listMap2.containsKey(str))
530 listMap2.put(str, new ArrayList<Map<String, Object>>()); 614 listMap2.put(str, new ArrayList<Map<String, Object>>());
531 - listMap2.get(str).add(map); 615 + listMap2.get(str).add(m);
532 } 616 }
533 } 617 }
534 for(String str : listMap2.keySet()){ 618 for(String str : listMap2.keySet()){
535 - for(Map<String, Object> map : listMap2.get(str)){  
536 - resList.add(map); 619 + for(Map<String, Object> m : listMap2.get(str)){
  620 + resList.add(m);
537 } 621 }
538 } 622 }
539 623
@@ -551,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -551,12 +635,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
551 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 635 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
552 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 636 sdfSimple = new SimpleDateFormat("yyyyMMdd");
553 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 637 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
554 - Map<String,Object> map = new HashMap<String, Object>(); 638 + Map<String,Object> m = new HashMap<String, Object>();
555 ReportUtils ee = new ReportUtils(); 639 ReportUtils ee = new ReportUtils();
556 try { 640 try {
557 listI.add(resList.iterator()); 641 listI.add(resList.iterator());
558 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 642 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
559 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\scheduleAnaly.xls", 643 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\scheduleAnaly.xls",
560 path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls"); 644 path+"export\\时刻表分析" + sdfSimple.format(sdfMonth.parse(startDate)) + "-" + sdfSimple.format(sdfMonth.parse(endDate)) + ".xls");
561 } catch (Exception e) { 645 } catch (Exception e) {
562 // TODO: handle exception 646 // TODO: handle exception
@@ -568,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -568,12 +652,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
568 } 652 }
569 653
570 @Override 654 @Override
571 - public List<Map<String, Object>> getModel(String line, String startDate, String endDate) { 655 + public List<Map<String, Object>> getModel(Map<String, Object> map) {
572 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 656 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
573 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); 657 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
574 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 658 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
575 SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE"); 659 SimpleDateFormat sdfEE = new SimpleDateFormat("EEEE");
576 660
  661 + String line = map.get("line").toString();
  662 + String startDate = map.get("startDate").toString();
  663 + String endDate = map.get("endDate").toString();
  664 +
577 if(startDate.length() == 0){ 665 if(startDate.length() == 0){
578 startDate = sdf.format(new Date()); 666 startDate = sdf.format(new Date());
579 } 667 }
@@ -640,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -640,13 +728,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
640 ruleDays1.add(6); 728 ruleDays1.add(6);
641 specialDays1.add(sdf.format(tempDate)); 729 specialDays1.add(sdf.format(tempDate));
642 } 730 }
643 - for(Map<String, Object> map : list){  
644 - String[] ruleDays = map.get("ruleDays").toString().split(",");  
645 - String[] specialDays = map.get("specialDays").toString().split(","); 731 + for(Map<String, Object> m : list){
  732 + String[] ruleDays = m.get("ruleDays").toString().split(",");
  733 + String[] specialDays = m.get("specialDays").toString().split(",");
646 boolean flag = false; 734 boolean flag = false;
647 DO:{ 735 DO:{
648 try { 736 try {
649 - long qyrq = sdf.parse(map.get("qyrq").toString()).getTime(); 737 + long qyrq = sdf.parse(m.get("qyrq").toString()).getTime();
650 if(qyrq > date2.getTime()) 738 if(qyrq > date2.getTime())
651 break; 739 break;
652 } catch (ParseException e) { 740 } catch (ParseException e) {
@@ -671,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -671,24 +759,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
671 } 759 }
672 } 760 }
673 if(flag) 761 if(flag)
674 - resList.add(map); 762 + resList.add(m);
675 } 763 }
676 764
677 return resList; 765 return resList;
678 } 766 }
679 767
680 @Override 768 @Override
681 - public List<Map<String, Object>> firstAndLastBus(String line, String date, String type) {  
682 - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 769 + public List<Map<String, Object>> firstAndLastBus(Map<String, Object> map) {
683 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 770 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
684 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); 771 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
685 772
  773 + String company = map.get("company").toString();
  774 + String subCompany = map.get("subCompany").toString();
  775 + String line = map.get("line").toString();
  776 + String date = map.get("date").toString();
  777 + String type = map.get("type").toString();
  778 +
686 if(date.length() == 0) 779 if(date.length() == 0)
687 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 780 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
688 - if(line.length() != 0)  
689 - list = scheduleRealInfoRepository.scheduleDaily(line, date);  
690 - else  
691 - list = scheduleRealInfoRepository.findByDate(date); 781 +
  782 + List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date);
692 783
693 for(ScheduleRealInfo schedule : list){ 784 for(ScheduleRealInfo schedule : list){
694 if(!schedule.getBcType().equals("normal")) 785 if(!schedule.getBcType().equals("normal"))
@@ -704,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -704,12 +795,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
704 List<Long> longList0 = new ArrayList<Long>(); 795 List<Long> longList0 = new ArrayList<Long>();
705 Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); 796 Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>();
706 List<Long> longList1 = new ArrayList<Long>(); 797 List<Long> longList1 = new ArrayList<Long>();
707 - String company = "", subCompany = ""; 798 + String companyName = "", subCompanyName = "";
708 for(ScheduleRealInfo schedule : keyMap.get(key)){ 799 for(ScheduleRealInfo schedule : keyMap.get(key)){
709 - if(schedule.getGsName() != null && company.length() == 0)  
710 - company = schedule.getGsName();  
711 - if(schedule.getFgsName() != null && subCompany.length() == 0)  
712 - subCompany = schedule.getFgsName(); 800 + if(schedule.getGsName() != null && companyName.length() == 0)
  801 + companyName = schedule.getGsName();
  802 + if(schedule.getFgsName() != null && subCompanyName.length() == 0)
  803 + subCompanyName = schedule.getFgsName();
713 String[] split = schedule.getFcsj().split(":"); 804 String[] split = schedule.getFcsj().split(":");
714 long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); 805 long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
715 schedule.setFcsjT(min); 806 schedule.setFcsjT(min);
@@ -728,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -728,8 +819,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
728 ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); 819 ScheduleRealInfo shouban1 = temp1.get(longList1.get(0));
729 ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); 820 ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1));
730 tempMap.put("date", date); 821 tempMap.put("date", date);
731 - tempMap.put("company", company);  
732 - tempMap.put("subCompany", subCompany); 822 + tempMap.put("company", companyName);
  823 + tempMap.put("subCompany", subCompanyName);
733 tempMap.put("line", key); 824 tempMap.put("line", key);
734 tempMap.put("qdzFirst0", shouban0.getQdzName()); 825 tempMap.put("qdzFirst0", shouban0.getQdzName());
735 tempMap.put("jhfcFirst0", shouban0.getFcsj()); 826 tempMap.put("jhfcFirst0", shouban0.getFcsj());
@@ -798,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -798,12 +889,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
798 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 889 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
799 sdfSimple = new SimpleDateFormat("yyyyMMdd"); 890 sdfSimple = new SimpleDateFormat("yyyyMMdd");
800 List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); 891 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
801 - Map<String,Object> map = new HashMap<String, Object>(); 892 + Map<String,Object> m = new HashMap<String, Object>();
802 ReportUtils ee = new ReportUtils(); 893 ReportUtils ee = new ReportUtils();
803 try { 894 try {
804 listI.add(resList.iterator()); 895 listI.add(resList.iterator());
805 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\"; 896 String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
806 - ee.excelReplace(listI, new Object[] { map }, path+"mould\\firstAndLastBus.xls", 897 + ee.excelReplace(listI, new Object[] { m }, path+"mould\\firstAndLastBus.xls",
807 path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); 898 path+"export\\线路首末班" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
808 } catch (Exception e) { 899 } catch (Exception e) {
809 // TODO: handle exception 900 // TODO: handle exception
@@ -815,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -815,18 +906,25 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
815 } 906 }
816 907
817 @Override 908 @Override
818 - public List<Map<String, Object>> commandState(String line, String date, String code) { 909 + public List<Map<String, Object>> commandState(Map<String, Object> map) {
819 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 910 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
820 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); 911 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
821 Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); 912 Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>();
822 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"); 913 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH-mm-ss");
  914 +
  915 + String company = map.get("company").toString();
  916 + String subCompany = map.get("subCompany").toString();
  917 + String line = map.get("line").toString();
  918 + String date = map.get("date").toString();
  919 + String code = map.get("code").toString();
823 920
824 if(date.length() == 0) 921 if(date.length() == 0)
825 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); 922 date = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
826 923
827 try { 924 try {
828 925
829 - String sql = "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + 926 + String sql =
  927 + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " +
830 "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; 928 "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
831 if(line.length() != 0){ 929 if(line.length() != 0){
832 sql += " and xl_bm = '"+line+"'"; 930 sql += " and xl_bm = '"+line+"'";
@@ -834,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -834,8 +932,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
834 if(code.length() != 0){ 932 if(code.length() != 0){
835 sql += " and cl_zbh = '"+code+"'"; 933 sql += " and cl_zbh = '"+code+"'";
836 } 934 }
  935 + if(company.length() != 0){
  936 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  937 + }
837 sql += " union " + 938 sql += " union " +
838 - "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time " + 939 + "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " +
839 "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"; 940 "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
840 if(line.length() != 0){ 941 if(line.length() != 0){
841 sql += " and xl_bm = '"+line+"'"; 942 sql += " and xl_bm = '"+line+"'";
@@ -843,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -843,6 +944,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
843 if(code.length() != 0){ 944 if(code.length() != 0){
844 sql += " and cl_zbh = '"+code+"'"; 945 sql += " and cl_zbh = '"+code+"'";
845 } 946 }
  947 + if(company.length() != 0){
  948 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  949 + }
846 sql += " order by fcsj"; 950 sql += " order by fcsj";
847 951
848 list = jdbcTemplate.query(sql, 952 list = jdbcTemplate.query(sql,
@@ -862,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -862,6 +966,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
862 map.put("reply47", rs.getString("reply47")); 966 map.put("reply47", rs.getString("reply47"));
863 map.put("reply46time", rs.getString("reply46time")); 967 map.put("reply46time", rs.getString("reply46time"));
864 map.put("reply47time", rs.getString("reply47time")); 968 map.put("reply47time", rs.getString("reply47time"));
  969 + map.put("company", rs.getObject("gs_name"));
  970 + map.put("subCompany", rs.getObject("fgs_name"));
865 return map; 971 return map;
866 } 972 }
867 }); 973 });
@@ -871,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -871,38 +977,45 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
871 e.printStackTrace(); 977 e.printStackTrace();
872 } 978 }
873 979
874 - for(Map<String, Object> map : list){  
875 - String key = map.get("line") + "/" + map.get("clZbh") + "/" + map.get("jGh") + "/" + map.get("jName"); 980 + for(Map<String, Object> m : list){
  981 + String key = m.get("line") + "/" + m.get("clZbh") + "/" + m.get("jGh") + "/" + m.get("jName");
876 if(!keyMap.containsKey(key)) 982 if(!keyMap.containsKey(key))
877 keyMap.put(key, new ArrayList<Map<String, Object>>()); 983 keyMap.put(key, new ArrayList<Map<String, Object>>());
878 - keyMap.get(key).add(map); 984 + keyMap.get(key).add(m);
879 } 985 }
880 for(String key : keyMap.keySet()){ 986 for(String key : keyMap.keySet()){
881 Map<String, Object> tempMap = new HashMap<String, Object>(); 987 Map<String, Object> tempMap = new HashMap<String, Object>();
882 Set<String> tempSet = new HashSet<String>(); 988 Set<String> tempSet = new HashSet<String>();
883 int sjf = 0; 989 int sjf = 0;
884 int wqr = 0; 990 int wqr = 0;
885 - for(Map<String, Object> map : keyMap.get(key)){  
886 - tempSet.add(map.get("id").toString());  
887 - if(map.get("timestamp") != null){ 991 + String companyName = "", subCompanyName = "";
  992 + for(Map<String, Object> m : keyMap.get(key)){
  993 + if(m.containsKey("company") && m.get("company").toString().length()!=0 && companyName.length()==0)
  994 + companyName = m.get("company").toString();
  995 + if(m.containsKey("subCompany") && m.get("subCompany").toString().length()!=0 && subCompanyName.length()==0)
  996 + subCompanyName = m.get("subCompany").toString();
  997 + tempSet.add(m.get("id").toString());
  998 + if(m.get("timestamp") != null){
888 sjf++; 999 sjf++;
889 - if(map.get("reply47").toString().equals("-1")) 1000 + if(m.get("reply47").toString().equals("-1"))
890 wqr++; 1001 wqr++;
891 - map.put("time", sdf.format(new Date(Long.valueOf(map.get("timestamp").toString())))); 1002 + m.put("time", sdf.format(new Date(Long.valueOf(m.get("timestamp").toString()))));
892 } else 1003 } else
893 - map.put("time", "/"); 1004 + m.put("time", "/");
894 1005
895 - if(map.get("reply46time") != null)  
896 - map.put("time46", sdf.format(new Date(Long.valueOf(map.get("reply46time").toString())))); 1006 + if(m.get("reply46time") != null)
  1007 + m.put("time46", sdf.format(new Date(Long.valueOf(m.get("reply46time").toString()))));
897 else 1008 else
898 - map.put("time46", "/"); 1009 + m.put("time46", "/");
899 1010
900 - if(map.get("reply47time") != null)  
901 - map.put("time47", sdf.format(new Date(Long.valueOf(map.get("reply47time").toString())))); 1011 + if(m.get("reply47time") != null)
  1012 + m.put("time47", sdf.format(new Date(Long.valueOf(m.get("reply47time").toString()))));
902 else 1013 else
903 - map.put("time47", "/"); 1014 + m.put("time47", "/");
904 1015
905 } 1016 }
  1017 + tempMap.put("company", companyName);
  1018 + tempMap.put("subCompany", subCompanyName);
906 String[] split = key.split("/"); 1019 String[] split = key.split("/");
907 tempMap.put("date", date); 1020 tempMap.put("date", date);
908 tempMap.put("line", split[0]); 1021 tempMap.put("line", split[0]);
src/main/resources/static/pages/excep/offlineList.html
@@ -223,6 +223,7 @@ $(function(){ @@ -223,6 +223,7 @@ $(function(){
223 } 223 }
224 224
225 function showPagination(data){ 225 function showPagination(data){
  226 + console.log(data);
226 //分页 227 //分页
227 $('#pagination').jqPaginator({ 228 $('#pagination').jqPaginator({
228 totalPages: data.totalPage, 229 totalPages: data.totalPage,
@@ -299,11 +300,4 @@ $(function(){ @@ -299,11 +300,4 @@ $(function(){
299 } 300 }
300 }); 301 });
301 }); 302 });
302 -//改变状态  
303 -function changeEnabled(id,enabled){  
304 - debugger  
305 - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){  
306 - jsDoQuery(null, true);  
307 - })  
308 -}  
309 </script> 303 </script>
310 \ No newline at end of file 304 \ No newline at end of file
src/main/resources/static/pages/forms/mould/allline.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/executionrate.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/turnoutrate.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/allline.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px;
  14 + 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;
  25 +}
  26 +
  27 +</style>
  28 +
  29 +<div class="page-head">
  30 + <div class="page-title">
  31 + <h1>营运线路名称统计表</h1>
  32 + </div>
  33 +</div>
  34 +
  35 +<div class="row">
  36 + <div class="col-md-12">
  37 + <div class="portlet light porttlet-fit bordered">
  38 + <div class="portlet-title">
  39 + <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>
  56 + </form>
  57 + </div>
  58 + <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">
  61 + <thead>
  62 + <tr>
  63 + <th colspan="15">营运线路名称统计表</th>
  64 + </tr>
  65 + <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>
  70 + <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>
  75 + </tr>
  76 + <tr>
  77 + <td>计划</td>
  78 + <td>实际</td>
  79 + <td>计划</td>
  80 + <td>实际</td>
  81 + </tr>
  82 + </thead>
  83 + <tbody id="tbody">
  84 +
  85 + </tbody>
  86 + <tr>
  87 + <td colspan="1">分类汇总</td>
  88 + <td><span id="total_gs">&nbsp;</span></td>
  89 + <td><span id="total_zhgs">&nbsp;</span></td>
  90 + <td><span id="total_xlts">&nbsp;</span></td>
  91 + <td><span id="total_jh">&nbsp;</span></td>
  92 + <td><span id="total_sj">&nbsp;</span></td>
  93 + <td><span id="total_ccl">&nbsp;</span></td>
  94 + <td><span id="total_bcjh">&nbsp;</span></td>
  95 + <td><span id="total_bcsj">&nbsp;</span></td>
  96 + <td><span id="total_bczxl">&nbsp;</span></td>
  97 + <td><span id="total_sm">&nbsp;</span></td>
  98 + </tr>
  99 + </table>
  100 + </div>
  101 + </div>
  102 + </div>
  103 + </div>
  104 +</div>
  105 +
  106 +<script>
  107 + $(function(){
  108 + // 关闭左侧栏
  109 + if (!$('body').hasClass('page-sidebar-closed'))
  110 + $('.menu-toggler.sidebar-toggler').click();
  111 +
  112 + $("#startDate,#endDate").datetimepicker({
  113 + format : 'YYYY-MM-DD',
  114 + locale : 'zh-cn'
  115 + });
  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]});
  122 + }
  123 + initPinYinSelect2('#line',data,'');
  124 +
  125 + })
  126 +
  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"));
  195 + });
  196 + });
  197 + });
  198 +</script>
  199 +<script type="text/html" id="allline">
  200 + {{each list as obj i}}
  201 + <tr>
  202 + <td>{{obj.rq}}</td>
  203 + <td>{{obj.gs}}</td>
  204 + <td>{{obj.zhgs}}</td>
  205 + <td>{{obj.xl}}</td>
  206 + <td>{{obj.cchjh}}</td>
  207 + <td>{{obj.cchsj}}</td>
  208 + <td>{{obj.chl}}</td>
  209 + <td>{{obj.bcjh}}</td>
  210 + <td>{{obj.bcsj}}</td>
  211 + <td>{{obj.bbzxl}}</td>
  212 + <td>{{obj.xl}}</td>
  213 + </tr>
  214 + {{/each}}
  215 + {{if list.length == 0}}
  216 + <tr>
  217 + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td>
  218 + </tr>
  219 + {{/if}}
  220 +</script>
src/main/resources/static/pages/forms/statement/busInterval.html
@@ -29,16 +29,16 @@ @@ -29,16 +29,16 @@
29 <div class="portlet light porttlet-fit bordered"> 29 <div class="portlet light porttlet-fit bordered">
30 <div class="portlet-title"> 30 <div class="portlet-title">
31 <form id="history" class="form-inline" action=""> 31 <form id="history" class="form-inline" action="">
32 - <div style="display: inline-block;">  
33 - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> 32 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  33 + <span class="item-label" style="width: 80px;">公司: </span>
34 <select class="form-control" name="company" id="company" style="width: 180px;"></select> 34 <select class="form-control" name="company" id="company" style="width: 180px;"></select>
35 </div> 35 </div>
36 - <div style="display: inline-block;">  
37 - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span> 36 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  37 + <span class="item-label" style="width: 80px;">分公司: </span>
38 <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> 38 <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select>
39 </div> 39 </div>
40 - <div style="display: inline-block;">  
41 - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span> 40 + <div style="display: inline-block; margin-left: 24px;">
  41 + <span class="item-label" style="width: 80px;">线路: </span>
42 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 42 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
43 </div> 43 </div>
44 <div style="display: inline-block; margin-left: 10px"> 44 <div style="display: inline-block; margin-left: 10px">
@@ -128,13 +128,13 @@ @@ -128,13 +128,13 @@
128 var year = d.getFullYear(); 128 var year = d.getFullYear();
129 var month = d.getMonth() + 1; 129 var month = d.getMonth() + 1;
130 var day = d.getDate(); 130 var day = d.getDate();
131 - if(month > 9){  
132 - $("#startDate").val(year + "-" + month + "-" + day);  
133 - $("#endDate").val(year + "-" + month + "-" + day);  
134 - } else {  
135 - $("#startDate").val(year + "-0" + month + "-" + day);  
136 - $("#endDate").val(year + "-0" + month + "-" + day);  
137 - } 131 + if(month < 10)
  132 + month = "0" + month;
  133 + if(day < 10)
  134 + day = "0" + day;
  135 + $("#startDate").val(year + "-" + month + "-" + day);
  136 + $("#endDate").val(year + "-" + month + "-" + day);
  137 +
138 $("#times1").val("06:00"); 138 $("#times1").val("06:00");
139 $("#times2").val("07:00"); 139 $("#times2").val("07:00");
140 140
@@ -145,6 +145,11 @@ @@ -145,6 +145,11 @@
145 for(var i = 0; i < obj.length; i++){ 145 for(var i = 0; i < obj.length; i++){
146 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 146 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
147 } 147 }
  148 + if(obj.length == 1){
  149 + $('#company1').hide();
  150 + if(obj[0].children.length == 1)
  151 + $('#subCompany1').hide();
  152 + }
148 $('#company').html(options); 153 $('#company').html(options);
149 updateCompany(); 154 updateCompany();
150 }); 155 });
@@ -222,6 +227,8 @@ @@ -222,6 +227,8 @@
222 var endDate = $("#endDate").val(); 227 var endDate = $("#endDate").val();
223 var model = $("#model").val(); 228 var model = $("#model").val();
224 var times = $("#times1").val() + "-" + $("#times2").val(); 229 var times = $("#times1").val() + "-" + $("#times2").val();
  230 + var company = $("#company").val();
  231 + var subCompany = $("#subCompany").val();
225 function jsDoQuery(pagination){ 232 function jsDoQuery(pagination){
226 var params = {}; 233 var params = {};
227 // line = $("#line").val(); 234 // line = $("#line").val();
@@ -229,11 +236,15 @@ @@ -229,11 +236,15 @@
229 endDate = $("#endDate").val(); 236 endDate = $("#endDate").val();
230 model = $("#model").val(); 237 model = $("#model").val();
231 times = $("#times1").val() + "-" + $("#times2").val(); 238 times = $("#times1").val() + "-" + $("#times2").val();
  239 + company = $("#company").val();
  240 + subCompany = $("#subCompany").val();
232 params['line'] = line; 241 params['line'] = line;
233 params['startDate'] = startDate; 242 params['startDate'] = startDate;
234 params['endDate'] = endDate; 243 params['endDate'] = endDate;
235 params['model'] = model; 244 params['model'] = model;
236 params['times'] = times; 245 params['times'] = times;
  246 + params['company'] = company;
  247 + params['subCompany'] = subCompany;
237 params['type'] = "query"; 248 params['type'] = "query";
238 $(".hidden").removeClass("hidden"); 249 $(".hidden").removeClass("hidden");
239 $get('/busInterval/interval', params, function(result){ 250 $get('/busInterval/interval', params, function(result){
src/main/resources/static/pages/forms/statement/changetochange.html
@@ -225,4 +225,4 @@ @@ -225,4 +225,4 @@
225 <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td> 225 <td colspan="15"><h6 class="muted">没有找到相关数据</h6></td>
226 </tr> 226 </tr>
227 {{/if}} 227 {{/if}}
228 -</script> 228 +</script>
229 \ No newline at end of file 229 \ No newline at end of file
src/main/resources/static/pages/forms/statement/commandState.html
@@ -27,19 +27,28 @@ @@ -27,19 +27,28 @@
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 id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;"> 30 + <div style="display: inline-block; margin-left: 15px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 22px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="display: inline-block; margin-left: 15px;">
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>
33 </div> 41 </div>
  42 + <div style="margin-top: 10px" />
34 <div style="display: inline-block;margin-left: 15px;"> 43 <div style="display: inline-block;margin-left: 15px;">
35 <span class="item-label" style="width: 80px;">时间: </span> 44 <span class="item-label" style="width: 80px;">时间: </span>
36 <input class="form-control" type="text" id="date" style="width: 180px;"/> 45 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37 </div> 46 </div>
38 - <div style="display: inline-block;margin-left: 15px">  
39 - <span class="item-label" style="width: 140px;">内部编码: </span> 47 + <div style="display: inline-block;margin-left: 8px">
  48 + <span class="item-label" style="width: 140px;">内部编码: </span>
40 <select class="form-control" name="code" id="code" style="width: 180px;"></select> 49 <select class="form-control" name="code" id="code" style="width: 180px;"></select>
41 </div> 50 </div>
42 - <div class="form-group"> 51 + <div class="form-group" style="margin-left: 9px">
43 <input class="btn btn-default" type="button" id="query" value="筛选"/> 52 <input class="btn btn-default" type="button" id="query" value="筛选"/>
44 <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> 53 <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
45 </div> 54 </div>
@@ -51,6 +60,8 @@ @@ -51,6 +60,8 @@
51 <thead> 60 <thead>
52 <tr class="hidden"> 61 <tr class="hidden">
53 <th>日期</th> 62 <th>日期</th>
  63 + <th>公司</th>
  64 + <th>分公司</th>
54 <th>线路</th> 65 <th>线路</th>
55 <th>车辆</th> 66 <th>车辆</th>
56 <th>人员</th> 67 <th>人员</th>
@@ -64,7 +75,7 @@ @@ -64,7 +75,7 @@
64 </tbody> 75 </tbody>
65 </table> 76 </table>
66 <div id="works_hidden" class="hidden"> 77 <div id="works_hidden" class="hidden">
67 - <span class="item-label" style="width: 80px;">明细: </span> 78 + <span class="item-label" style="width: 80px;margin-left: 20px;">明细: </span>
68 <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span> 79 <span class="item-label" style="width: 80px;margin-left: 60px;">日期 </span>
69 <span class="item-label" style="width: 80px;" id="date1"></span> 80 <span class="item-label" style="width: 80px;" id="date1"></span>
70 <span class="item-label" style="width: 80px;margin-left: 60px;">线路 </span> 81 <span class="item-label" style="width: 80px;margin-left: 60px;">线路 </span>
@@ -116,22 +127,54 @@ @@ -116,22 +127,54 @@
116 var year = d.getFullYear(); 127 var year = d.getFullYear();
117 var month = d.getMonth() + 1; 128 var month = d.getMonth() + 1;
118 var day = d.getDate(); 129 var day = d.getDate();
119 - if(month > 9){  
120 - $("#date").val(year + "-" + month + "-" + day);  
121 - } else {  
122 - $("#date").val(year + "-0" + month + "-" + day);  
123 - } 130 + if(month < 10)
  131 + month = "0" + month;
  132 + if(day < 10)
  133 + day = "0" + day;
  134 + $("#date").val(year + "-" + month + "-" + day);
124 135
125 $.get('/basic/lineCode2Name',function(result){ 136 $.get('/basic/lineCode2Name',function(result){
126 var data=[]; 137 var data=[];
127 138
  139 + data.push({id: "", text: "全部线路"});
128 for(var code in result){ 140 for(var code in result){
129 data.push({id: code, text: result[code]}); 141 data.push({id: code, text: result[code]});
130 } 142 }
  143 +
131 console.log(data); 144 console.log(data);
132 initPinYinSelect2('#line',data,''); 145 initPinYinSelect2('#line',data,'');
133 }) 146 })
134 147
  148 + var obj = [];
  149 + $.get('/user/companyData', function(result){
  150 + obj = result;
  151 + var options = '';
  152 + for(var i = 0; i < obj.length; i++){
  153 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  154 + }
  155 + if(obj.length == 1){
  156 + $('#company1').hide();
  157 + if(obj[0].children.length == 1)
  158 + $('#subCompany1').hide();
  159 + }
  160 + $('#company').html(options);
  161 + updateCompany();
  162 + });
  163 + $("#company").on("change",updateCompany);
  164 + function updateCompany(){
  165 + var company = $('#company').val();
  166 + var options = '';
  167 + for(var i = 0; i < obj.length; i++){
  168 + if(obj[i].companyCode == company){
  169 + var children = obj[i].children;
  170 + for(var j = 0; j < children.length; j++){
  171 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  172 + }
  173 + }
  174 + }
  175 + $('#subCompany').html(options);
  176 + }
  177 +
135 $('#code').select2({ 178 $('#code').select2({
136 ajax: { 179 ajax: {
137 url: '/realSchedule/sreachVehic', 180 url: '/realSchedule/sreachVehic',
@@ -176,9 +219,14 @@ @@ -176,9 +219,14 @@
176 219
177 function jsDoQuery(pagination){ 220 function jsDoQuery(pagination){
178 var params = {}; 221 var params = {};
179 - params['line'] = $("#line").val(); 222 + var line = $("#line").val();
  223 + if(line = " ")
  224 + line = "";
  225 + params['line'] = line;
180 params['date'] = $("#date").val(); 226 params['date'] = $("#date").val();
181 params['code'] = $("#code").val(); 227 params['code'] = $("#code").val();
  228 + params['company'] = $("#company").val();
  229 + params['subCompany'] = $("#subCompany").val();
182 $("#forms .hidden").removeClass("hidden"); 230 $("#forms .hidden").removeClass("hidden");
183 $get('/pcpc/commandState', params, function(result){ 231 $get('/pcpc/commandState', params, function(result){
184 // 把数据填充到模版中 232 // 把数据填充到模版中
@@ -221,6 +269,8 @@ @@ -221,6 +269,8 @@
221 {{each list as obj i}} 269 {{each list as obj i}}
222 <tr> 270 <tr>
223 <td>{{obj.date}}</td> 271 <td>{{obj.date}}</td>
  272 + <td>{{obj.company}}</td>
  273 + <td>{{obj.subCompany}}</td>
224 <td>{{obj.line}}</td> 274 <td>{{obj.line}}</td>
225 <td>{{obj.clZbh}}</td> 275 <td>{{obj.clZbh}}</td>
226 <td><a id="jsy">{{obj.jsy}}</a></td> 276 <td><a id="jsy">{{obj.jsy}}</a></td>
@@ -231,7 +281,7 @@ @@ -231,7 +281,7 @@
231 {{/each}} 281 {{/each}}
232 {{if list.length == 0}} 282 {{if list.length == 0}}
233 <tr> 283 <tr>
234 - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 284 + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
235 </tr> 285 </tr>
236 {{/if}} 286 {{/if}}
237 </script> 287 </script>
src/main/resources/static/pages/forms/statement/correctStatis.html
@@ -101,7 +101,6 @@ @@ -101,7 +101,6 @@
101 <script> 101 <script>
102 $(function(){ 102 $(function(){
103 103
104 -  
105 // 关闭左侧栏 104 // 关闭左侧栏
106 if (!$('body').hasClass('page-sidebar-closed')) 105 if (!$('body').hasClass('page-sidebar-closed'))
107 $('.menu-toggler.sidebar-toggler').click(); 106 $('.menu-toggler.sidebar-toggler').click();
@@ -127,13 +126,13 @@ @@ -127,13 +126,13 @@
127 var year = d.getFullYear(); 126 var year = d.getFullYear();
128 var month = d.getMonth() + 1; 127 var month = d.getMonth() + 1;
129 var day = d.getDate(); 128 var day = d.getDate();
130 - if(month > 9){  
131 - $("#startDate").val(year + "-" + month + "-" + day);  
132 - $("#endDate").val(year + "-" + month + "-" + day);  
133 - } else {  
134 - $("#startDate").val(year + "-0" + month + "-" + day);  
135 - $("#endDate").val(year + "-0" + month + "-" + day);  
136 - } 129 + if(month < 10)
  130 + month = "0" + month;
  131 + if(day < 10)
  132 + day = "0" + day;
  133 + $("#startDate").val(year + "-" + month + "-" + day);
  134 + $("#endDate").val(year + "-" + month + "-" + day);
  135 +
137 $("#times1").val("06:00"); 136 $("#times1").val("06:00");
138 $("#times2").val("07:00"); 137 $("#times2").val("07:00");
139 138
@@ -166,7 +165,6 @@ @@ -166,7 +165,6 @@
166 $('#company').html(options); 165 $('#company').html(options);
167 updateCompany(); 166 updateCompany();
168 }); 167 });
169 -  
170 $("#company").on("change",updateCompany); 168 $("#company").on("change",updateCompany);
171 function updateCompany(){ 169 function updateCompany(){
172 var company = $('#company').val(); 170 var company = $('#company').val();
@@ -185,8 +183,8 @@ @@ -185,8 +183,8 @@
185 183
186 $("#query").on("click",jsDoQuery); 184 $("#query").on("click",jsDoQuery);
187 185
188 - var company;  
189 - var subCompany; 186 + var company = $("#company").val();
  187 + var subCompany = $("#subCompany").val();
190 var lines; 188 var lines;
191 var line = $("#line").val(); 189 var line = $("#line").val();
192 var startDate = $("#startDate").val(); 190 var startDate = $("#startDate").val();
@@ -198,10 +196,14 @@ @@ -198,10 +196,14 @@
198 startDate = $("#startDate").val(); 196 startDate = $("#startDate").val();
199 endDate = $("#endDate").val(); 197 endDate = $("#endDate").val();
200 times = $("#times1").val() + "-" + $("#times2").val(); 198 times = $("#times1").val() + "-" + $("#times2").val();
  199 + company = $("#company").val();
  200 + subCompany = $("#subCompany").val();
201 params['line'] = line; 201 params['line'] = line;
202 params['startDate'] = startDate; 202 params['startDate'] = startDate;
203 params['endDate'] = endDate; 203 params['endDate'] = endDate;
204 params['times'] = times; 204 params['times'] = times;
  205 + params['company'] = company;
  206 + params['subCompany'] = subCompany;
205 params['type'] = "query"; 207 params['type'] = "query";
206 // $(".hidden").removeClass("hidden"); 208 // $(".hidden").removeClass("hidden");
207 $get('/busInterval/correctStatis', params, function(result){ 209 $get('/busInterval/correctStatis', params, function(result){
src/main/resources/static/pages/forms/statement/executionrate.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px;
  14 + 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;
  25 +}
  26 +
  27 +</style>
  28 +
  29 +<div class="page-head">
  30 + <div class="page-title">
  31 + <h1>班次执行率统计表</h1>
  32 + </div>
  33 +</div>
  34 +
  35 +<div class="row">
  36 + <div class="col-md-12">
  37 + <div class="portlet light porttlet-fit bordered">
  38 + <div class="portlet-title">
  39 + <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>
  56 + </form>
  57 + </div>
  58 + <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">
  61 + <thead>
  62 + <tr>
  63 + <th colspan="11">班次执行率统计表</th>
  64 + </tr>
  65 + <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>
  70 + <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>
  75 + </tr>
  76 + <tr>
  77 + <td>计划</td>
  78 + <td>实际</td>
  79 + <td>计划</td>
  80 + <td>实际</td>
  81 + </tr>
  82 + </thead>
  83 + <tbody id="tbody">
  84 +
  85 + </tbody>
  86 + <tr>
  87 + <td colspan="1">分类汇总</td>
  88 + <td><span id="total_gs">&nbsp;</span></td>
  89 + <td><span id="total_zhgs">&nbsp;</span></td>
  90 + <td><span id="total_xlts">&nbsp;</span></td>
  91 + <td><span id="total_jh">&nbsp;</span></td>
  92 + <td><span id="total_sj">&nbsp;</span></td>
  93 + <td><span id="total_ccl">&nbsp;</span></td>
  94 + <td><span id="total_bcjh">&nbsp;</span></td>
  95 + <td><span id="total_bcsj">&nbsp;</span></td>
  96 + <td><span id="total_bczxl">&nbsp;</span></td>
  97 + <td><span id="total_sm">&nbsp;</span></td>
  98 + </tr>
  99 + </table>
  100 + </div>
  101 + </div>
  102 + </div>
  103 + </div>
  104 +</div>
  105 +
  106 +<script>
  107 + $(function(){
  108 + // 关闭左侧栏
  109 + if (!$('body').hasClass('page-sidebar-closed'))
  110 + $('.menu-toggler.sidebar-toggler').click();
  111 +
  112 + $("#startDate,#endDate").datetimepicker({
  113 + format : 'YYYY-MM-DD',
  114 + locale : 'zh-cn'
  115 + });
  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]});
  122 + }
  123 + initPinYinSelect2('#line',data,'');
  124 +
  125 + })
  126 +
  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/executionrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){
  138 + // 把数据填充到模版中
  139 + var tbodyHtml = template('executionrate',{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_xlts = 0,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_xlts += Number(obj.xl);
  157 + total_jh = Number(obj.cchjh)+Number(total_jh);
  158 + total_sj = Number(obj.cchsj)+Number(total_sj);
  159 +
  160 + total_ccl =(Number(total_sj)/Number(total_jh))*100;
  161 + total_bcjh = Number(obj.bcjh)+Number(total_bcjh);
  162 + total_bcsj = Number(obj.bcsj)+Number(total_bcsj);
  163 + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100;
  164 +
  165 + });
  166 + $("#total_gs").text(total_gs);
  167 + $("#total_zhgs").text(total_zhgs);
  168 + $("#total_xlts").text(total_xlts);
  169 + $("#total_jh").text(total_jh);
  170 + $("#total_sj").text(total_sj);
  171 + $("#total_ccl").text(total_ccl.toFixed(2)+'%');
  172 + $("#total_bcjh").text(total_bcjh);
  173 + $("#total_bcsj").text(total_bcsj);
  174 + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%');
  175 +
  176 + var temp = {};
  177 + var today_account = 0;
  178 +
  179 + temp["line"] = $("#line").text();
  180 + $.each(result, function(i, obj) {
  181 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  182 + today_account++;
  183 + }
  184 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  185 + });
  186 +
  187 + })
  188 +
  189 + }else{
  190 + alert("请选择时间范围!");
  191 + }
  192 + });
  193 +
  194 + $("#export").on("click",function(){
  195 + $post('/mcy_export/executionrateExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){
  196 + window.open("/downloadFile/download?fileName=班次执行率统计表"+moment(startDate).format("YYYYMMDD"));
  197 + });
  198 + });
  199 + });
  200 +</script>
  201 +<script type="text/html" id="executionrate">
  202 + {{each list as obj i}}
  203 + <tr>
  204 + <td>{{obj.rq}}</td>
  205 + <td>{{obj.gs}}</td>
  206 + <td>{{obj.zhgs}}</td>
  207 + <td>{{obj.xl}}</td>
  208 + <td>{{obj.cchjh}}</td>
  209 + <td>{{obj.cchsj}}</td>
  210 + <td>{{obj.chl}}</td>
  211 + <td>{{obj.bcjh}}</td>
  212 + <td>{{obj.bcsj}}</td>
  213 + <td>{{obj.bbzxl}}</td>
  214 + <td>{{obj.sm}}</td>
  215 + </tr>
  216 + {{/each}}
  217 + {{if list.length == 0}}
  218 + <tr>
  219 + <td colspan="11"><h6 class="muted">没有找到相关数据</h6></td>
  220 + </tr>
  221 + {{/if}}
  222 +</script>
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
@@ -27,19 +27,19 @@ @@ -27,19 +27,19 @@
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 id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;margin-left: 10px;"> 30 + <div style="display: inline-block;margin-left: 10px;" id="company1">
31 <span class="item-label" style="width: 80px;">公司: </span> 31 <span class="item-label" style="width: 80px;">公司: </span>
32 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 32 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
33 </div> 33 </div>
34 - <div style="display: inline-block;margin-left: 15px;"> 34 + <div style="display: inline-block;margin-left: 10px;" id="subCompany1">
35 <span class="item-label" style="width: 80px;">分公司: </span> 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
37 </div> 37 </div>
38 - <div style="display: inline-block;margin-left: 15px;"> 38 + <div style="display: inline-block;margin-left: 10px;">
39 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
40 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 </div> 41 </div>
42 - <div style="display: inline-block;margin-left: 15px;"> 42 + <div style="display: inline-block;margin-left: 10px;">
43 <span class="item-label" style="width: 80px;">时间: </span> 43 <span class="item-label" style="width: 80px;">时间: </span>
44 <input class="form-control" type="text" id="date" style="width: 160px;"/> 44 <input class="form-control" type="text" id="date" style="width: 160px;"/>
45 </div> 45 </div>
@@ -111,15 +111,16 @@ @@ -111,15 +111,16 @@
111 var year = d.getFullYear(); 111 var year = d.getFullYear();
112 var month = d.getMonth() + 1; 112 var month = d.getMonth() + 1;
113 var day = d.getDate(); 113 var day = d.getDate();
114 - if(month > 9){  
115 - $("#date").val(year + "-" + month + "-" + day);  
116 - } else {  
117 - $("#date").val(year + "-0" + month + "-" + day);  
118 - } 114 + if(month < 10)
  115 + month = "0" + month;
  116 + if(day < 10)
  117 + day = "0" + day;
  118 + $("#date").val(year + "-" + month + "-" + day);
119 119
120 $.get('/basic/lineCode2Name',function(result){ 120 $.get('/basic/lineCode2Name',function(result){
121 var data=[]; 121 var data=[];
122 122
  123 + data.push({id: " ", text: "全部线路"});
123 for(var code in result){ 124 for(var code in result){
124 data.push({id: code, text: result[code]}); 125 data.push({id: code, text: result[code]});
125 } 126 }
@@ -134,6 +135,11 @@ @@ -134,6 +135,11 @@
134 for(var i = 0; i < obj.length; i++){ 135 for(var i = 0; i < obj.length; i++){
135 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 136 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
136 } 137 }
  138 + if(obj.length == 1){
  139 + $('#company1').hide();
  140 + if(obj[0].children.length == 1)
  141 + $('#subCompany1').hide();
  142 + }
137 $('#company').html(options); 143 $('#company').html(options);
138 updateCompany(); 144 updateCompany();
139 }); 145 });
@@ -155,12 +161,21 @@ @@ -155,12 +161,21 @@
155 161
156 $("#query").on("click",jsDoQuery); 162 $("#query").on("click",jsDoQuery);
157 163
  164 + var company = $("#company").val();
  165 + var subCompany = $("#subCompany").val();
158 var line = $("#line").val(); 166 var line = $("#line").val();
159 var date = $("#date").val(); 167 var date = $("#date").val();
160 function jsDoQuery(pagination){ 168 function jsDoQuery(pagination){
161 var params = {}; 169 var params = {};
  170 + company = $("#company").val();
  171 + subCompany = $("#subCompany").val();
162 line = $("#line").val(); 172 line = $("#line").val();
163 date = $("#date").val(); 173 date = $("#date").val();
  174 + if(line == " ")
  175 + line = "";
  176 + params['company'] = company;
  177 + params['subCompany'] = subCompany;
  178 + params['line'] = line;
164 params['line'] = line; 179 params['line'] = line;
165 params['date'] = date; 180 params['date'] = date;
166 params['type'] = "query"; 181 params['type'] = "query";
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
@@ -45,16 +45,16 @@ @@ -45,16 +45,16 @@
45 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他 45 <input class="form-control" type="checkbox" name="reason" style="width: 20px;" value="10" checked="true"/>其他
46 </div> 46 </div>
47 <div style="margin-top: 5px"></div> 47 <div style="margin-top: 5px"></div>
48 - <div style="display: inline-block;">  
49 - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> 48 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  49 + <span class="item-label" style="width: 80px;">公司: </span>
50 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 50 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
51 </div> 51 </div>
52 - <div style="display: inline-block;">  
53 - <span class="item-label" style="width: 80px; margin-left: 24px">分公司: </span> 52 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  53 + <span class="item-label" style="width: 80px;">分公司: </span>
54 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> 54 <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
55 </div> 55 </div>
56 - <div style="display: inline-block;">  
57 - <span class="item-label" style="width: 80px; margin-left: 24px">线路: </span> 56 + <div style="display: inline-block; margin-left: 24px;">
  57 + <span class="item-label" style="width: 80px;">线路: </span>
58 <select class="form-control" name="line" id="line" style="width: 140px;"></select> 58 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
59 </div> 59 </div>
60 <div style="display: inline-block; margin-left: 10px"> 60 <div style="display: inline-block; margin-left: 10px">
@@ -134,13 +134,13 @@ @@ -134,13 +134,13 @@
134 var year = d.getFullYear(); 134 var year = d.getFullYear();
135 var month = d.getMonth() + 1; 135 var month = d.getMonth() + 1;
136 var day = d.getDate(); 136 var day = d.getDate();
137 - if(month > 9){  
138 - $("#startDate").val(year + "-" + month + "-" + day);  
139 - $("#endDate").val(year + "-" + month + "-" + day);  
140 - } else {  
141 - $("#startDate").val(year + "-0" + month + "-" + day);  
142 - $("#endDate").val(year + "-0" + month + "-" + day);  
143 - } 137 + if(month < 10)
  138 + month = "0" + month;
  139 + if(day < 10)
  140 + day = "0" + day;
  141 + $("#startDate").val(year + "-" + month + "-" + day);
  142 + $("#endDate").val(year + "-" + month + "-" + day);
  143 +
144 $("#times1").val("06:00"); 144 $("#times1").val("06:00");
145 $("#times2").val("07:00"); 145 $("#times2").val("07:00");
146 146
@@ -165,6 +165,11 @@ @@ -165,6 +165,11 @@
165 for(var i = 0; i < obj.length; i++){ 165 for(var i = 0; i < obj.length; i++){
166 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 166 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
167 } 167 }
  168 + if(obj.length == 1){
  169 + $('#company1').hide();
  170 + if(obj[0].children.length == 1)
  171 + $('#subCompany1').hide();
  172 + }
168 $('#company').html(options); 173 $('#company').html(options);
169 updateCompany(); 174 updateCompany();
170 }); 175 });
@@ -217,6 +222,8 @@ @@ -217,6 +222,8 @@
217 var endDate = $("#endDate").val(); 222 var endDate = $("#endDate").val();
218 var model = $("#model").val(); 223 var model = $("#model").val();
219 var times = $("#times1").val() + "-" + $("#times2").val(); 224 var times = $("#times1").val() + "-" + $("#times2").val();
  225 + var company = $("#company").val();
  226 + var subCompany = $("#subCompany").val();
220 function jsDoQuery(pagination){ 227 function jsDoQuery(pagination){
221 var reason = $("input[name='reason']"); 228 var reason = $("input[name='reason']");
222 var params = {}; 229 var params = {};
@@ -225,11 +232,15 @@ @@ -225,11 +232,15 @@
225 endDate = $("#endDate").val(); 232 endDate = $("#endDate").val();
226 model = $("#model").val(); 233 model = $("#model").val();
227 times = $("#times1").val() + "-" + $("#times2").val(); 234 times = $("#times1").val() + "-" + $("#times2").val();
  235 + company = $("#company").val();
  236 + subCompany = $("#subCompany").val();
228 params['line'] = line; 237 params['line'] = line;
229 params['startDate'] = startDate; 238 params['startDate'] = startDate;
230 params['endDate'] = endDate; 239 params['endDate'] = endDate;
231 params['model'] = model; 240 params['model'] = model;
232 params['times'] = times; 241 params['times'] = times;
  242 + params['company'] = company;
  243 + params['subCompany'] = subCompany;
233 params['type'] = "query"; 244 params['type'] = "query";
234 // $(".hidden").removeClass("hidden"); 245 // $(".hidden").removeClass("hidden");
235 $get('/busInterval/lbStatuAnaly', params, function(result){ 246 $get('/busInterval/lbStatuAnaly', params, function(result){
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
@@ -33,16 +33,20 @@ @@ -33,16 +33,20 @@
33 <div class="portlet light porttlet-fit bordered"> 33 <div class="portlet light porttlet-fit bordered">
34 <div class="portlet-title"> 34 <div class="portlet-title">
35 <form id="history" class="form-inline" action=""> 35 <form id="history" class="form-inline" action="">
36 - <div style="display: inline-block;">  
37 - <span class="item-label" style="width: 80px; margin-left: 33px">公司: </span> 36 + <div style="display: inline-block; margin-left: 33px;" id="company1">
  37 + <span class="item-label" style="width: 80px;">公司: </span>
38 <select class="form-control" name="company" id="company" style="width: 140px;"></select> 38 <select class="form-control" name="company" id="company" style="width: 140px;"></select>
39 </div> 39 </div>
40 - <div style="display: inline-block;">  
41 - <span class="item-label" style="width: 80px; margin-left: 38px">线路: </span> 40 + <div style="display: inline-block; margin-left: 24px;" id="subCompany1">
  41 + <span class="item-label" style="width: 80px;">分公司: </span>
  42 + <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select>
  43 + </div>
  44 + <div style="display: inline-block; margin-left: 24px;">
  45 + <span class="item-label" style="width: 80px;">线路: </span>
42 <select class="form-control" name="line" id="line" style="width: 140px;"></select> 46 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
43 </div> 47 </div>
44 - <div style="display: inline-block;">  
45 - <span class="item-label" style="width: 80px; margin-left: 24px">方向: </span> 48 + <div style="display: inline-block; margin-left: 15px;">
  49 + <span class="item-label" style="width: 80px;">方向: </span>
46 <select class="form-control" name="upDown" id="upDown" style="width: 140px;"> 50 <select class="form-control" name="upDown" id="upDown" style="width: 140px;">
47 <option value="">请先选择线路</option> 51 <option value="">请先选择线路</option>
48 </select> 52 </select>
@@ -188,13 +192,13 @@ @@ -188,13 +192,13 @@
188 var year = d.getFullYear(); 192 var year = d.getFullYear();
189 var month = d.getMonth() + 1; 193 var month = d.getMonth() + 1;
190 var day = d.getDate(); 194 var day = d.getDate();
191 - if(month > 9){  
192 - $("#startDate").val(year + "-" + month + "-" + day);  
193 - $("#endDate").val(year + "-" + month + "-" + day);  
194 - } else {  
195 - $("#startDate").val(year + "-0" + month + "-" + day);  
196 - $("#endDate").val(year + "-0" + month + "-" + day);  
197 - } 195 + if(month < 10)
  196 + month = "0" + month;
  197 + if(day < 10)
  198 + day = "0" + day;
  199 + $("#startDate").val(year + "-" + month + "-" + day);
  200 + $("#endDate").val(year + "-" + month + "-" + day);
  201 +
198 $("#times1").val("06:00"); 202 $("#times1").val("06:00");
199 $("#times2").val("07:00"); 203 $("#times2").val("07:00");
200 204
@@ -205,9 +209,28 @@ @@ -205,9 +209,28 @@
205 for(var i = 0; i < obj.length; i++){ 209 for(var i = 0; i < obj.length; i++){
206 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 210 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
207 } 211 }
  212 + if(obj.length == 1){
  213 + $('#company1').hide();
  214 + if(obj[0].children.length == 1)
  215 + $('#subCompany1').hide();
  216 + }
208 $('#company').html(options); 217 $('#company').html(options);
209 updateCompany(); 218 updateCompany();
210 }); 219 });
  220 + $("#company").on("change",updateCompany);
  221 + function updateCompany(){
  222 + var company = $('#company').val();
  223 + var options = '';
  224 + for(var i = 0; i < obj.length; i++){
  225 + if(obj[i].companyCode == company){
  226 + var children = obj[i].children;
  227 + for(var j = 0; j < children.length; j++){
  228 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  229 + }
  230 + }
  231 + }
  232 + $('#subCompany').html(options);
  233 + }
211 234
212 $.get('/basic/lineCode2Name',function(result){ 235 $.get('/basic/lineCode2Name',function(result){
213 var data=[]; 236 var data=[];
@@ -244,6 +267,8 @@ @@ -244,6 +267,8 @@
244 var model = $("#model").val(); 267 var model = $("#model").val();
245 var times = $("#times1").val() + "-" + $("#times2").val(); 268 var times = $("#times1").val() + "-" + $("#times2").val();
246 var upDown = $("#upDown").val(); 269 var upDown = $("#upDown").val();
  270 + var company = $("#company").val();
  271 + var subCompany = $("#subCompany").val();
247 function jsDoQuery(pagination){ 272 function jsDoQuery(pagination){
248 var params = {}; 273 var params = {};
249 // line = $("#line").val(); 274 // line = $("#line").val();
@@ -252,12 +277,16 @@ @@ -252,12 +277,16 @@
252 model = $("#model").val(); 277 model = $("#model").val();
253 times = $("#times1").val() + "-" + $("#times2").val(); 278 times = $("#times1").val() + "-" + $("#times2").val();
254 upDown = $("#upDown").val(); 279 upDown = $("#upDown").val();
  280 + company = $("#company").val();
  281 + subCompany = $("#subCompany").val();
255 params['line'] = line; 282 params['line'] = line;
256 params['startDate'] = startDate; 283 params['startDate'] = startDate;
257 params['endDate'] = endDate; 284 params['endDate'] = endDate;
258 params['model'] = model; 285 params['model'] = model;
259 params['times'] = times; 286 params['times'] = times;
260 params['upDown'] = upDown; 287 params['upDown'] = upDown;
  288 + params['company'] = company;
  289 + params['subCompany'] = subCompany;
261 params['type'] = "query"; 290 params['type'] = "query";
262 $("#forms .hidden").removeClass("hidden"); 291 $("#forms .hidden").removeClass("hidden");
263 $get('/busInterval/lineTimeAnaliy', params, function(result){ 292 $get('/busInterval/lineTimeAnaliy', params, function(result){
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
@@ -27,19 +27,19 @@ @@ -27,19 +27,19 @@
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 id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;"> 30 + <div style="display: inline-block; margin-left: 10px;" id="company1">
31 <span class="item-label" style="width: 80px;">公司: </span> 31 <span class="item-label" style="width: 80px;">公司: </span>
32 <select class="form-control" name="company" id="company" style="width: 160px;"></select> 32 <select class="form-control" name="company" id="company" style="width: 160px;"></select>
33 </div> 33 </div>
34 - <div style="display: inline-block;"> 34 + <div style="display: inline-block; margin-left: 10px;" id="subCompany1">
35 <span class="item-label" style="width: 80px;">分公司: </span> 35 <span class="item-label" style="width: 80px;">分公司: </span>
36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> 36 <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
37 </div> 37 </div>
38 - <div style="display: inline-block;"> 38 + <div style="display: inline-block; margin-left: 10px;">
39 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
40 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 </div> 41 </div>
42 - <div style="display: inline-block;margin-left: 15px;"> 42 + <div style="display: inline-block; margin-left: 10px;">
43 <span class="item-label" style="width: 80px;">时间: </span> 43 <span class="item-label" style="width: 80px;">时间: </span>
44 <input class="form-control" type="text" id="date" style="width: 160px;"/> 44 <input class="form-control" type="text" id="date" style="width: 160px;"/>
45 </div> 45 </div>
@@ -55,6 +55,8 @@ @@ -55,6 +55,8 @@
55 <thead> 55 <thead>
56 <tr class="hidden"> 56 <tr class="hidden">
57 <th>日期</th> 57 <th>日期</th>
  58 + <th>公司</th>
  59 + <th>分公司</th>
58 <th>线路</th> 60 <th>线路</th>
59 <th>路牌</th> 61 <th>路牌</th>
60 <th>车辆</th> 62 <th>车辆</th>
@@ -92,11 +94,11 @@ @@ -92,11 +94,11 @@
92 var year = d.getFullYear(); 94 var year = d.getFullYear();
93 var month = d.getMonth() + 1; 95 var month = d.getMonth() + 1;
94 var day = d.getDate(); 96 var day = d.getDate();
95 - if(month > 9){  
96 - $("#date").val(year + "-" + month + "-" + day);  
97 - } else {  
98 - $("#date").val(year + "-0" + month + "-" + day);  
99 - } 97 + if(month < 10)
  98 + month = "0" + month;
  99 + if(day < 10)
  100 + day = "0" + day;
  101 + $("#date").val(year + "-" + month + "-" + day);
100 102
101 $.get('/basic/lineCode2Name',function(result){ 103 $.get('/basic/lineCode2Name',function(result){
102 var data=[]; 104 var data=[];
@@ -116,6 +118,11 @@ @@ -116,6 +118,11 @@
116 for(var i = 0; i < obj.length; i++){ 118 for(var i = 0; i < obj.length; i++){
117 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 119 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
118 } 120 }
  121 + if(obj.length == 1){
  122 + $('#company1').hide();
  123 + if(obj[0].children.length == 1)
  124 + $('#subCompany1').hide();
  125 + }
119 $('#company').html(options); 126 $('#company').html(options);
120 updateCompany(); 127 updateCompany();
121 }); 128 });
@@ -139,12 +146,18 @@ @@ -139,12 +146,18 @@
139 146
140 var line = $("#line").val(); 147 var line = $("#line").val();
141 var date = $("#date").val(); 148 var date = $("#date").val();
  149 + var company = $("#company").val();
  150 + var subCompany = $("#subCompany").val();
142 function jsDoQuery(pagination){ 151 function jsDoQuery(pagination){
143 var params = {}; 152 var params = {};
  153 + company = $("#company").val();
  154 + subCompany = $("#subCompany").val();
144 line = $("#line").val(); 155 line = $("#line").val();
145 date = $("#date").val(); 156 date = $("#date").val();
146 if(line == " ") 157 if(line == " ")
147 line = ""; 158 line = "";
  159 + params['company'] = company;
  160 + params['subCompany'] = subCompany;
148 params['line'] = line; 161 params['line'] = line;
149 params['date'] = date; 162 params['date'] = date;
150 params['type'] = "query"; 163 params['type'] = "query";
@@ -172,6 +185,8 @@ @@ -172,6 +185,8 @@
172 {{each list as obj i}} 185 {{each list as obj i}}
173 <tr> 186 <tr>
174 <td>{{obj.date}}</td> 187 <td>{{obj.date}}</td>
  188 + <td>{{obj.company}}</td>
  189 + <td>{{obj.subCompany}}</td>
175 <td>{{obj.line}}</td> 190 <td>{{obj.line}}</td>
176 <td>{{obj.lp}}</td> 191 <td>{{obj.lp}}</td>
177 <td>{{obj.clzbh}}</td> 192 <td>{{obj.clzbh}}</td>
@@ -182,7 +197,7 @@ @@ -182,7 +197,7 @@
182 {{/each}} 197 {{/each}}
183 {{if list.length == 0}} 198 {{if list.length == 0}}
184 <tr> 199 <tr>
185 - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> 200 + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
186 </tr> 201 </tr>
187 {{/if}} 202 {{/if}}
188 </script> 203 </script>
189 \ No newline at end of file 204 \ No newline at end of file
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
@@ -27,28 +27,28 @@ @@ -27,28 +27,28 @@
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 id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 -<!-- <div style="display: inline-block;margin-left: 38px;"> -->  
31 -<!-- <span class="item-label" style="width: 80px;">公司: </span> -->  
32 -<!-- <select class="form-control" name="company" id="company" style="width: 160px;"></select> -->  
33 -<!-- </div> -->  
34 -<!-- <div style="display: inline-block;margin-left: 29px;"> -->  
35 -<!-- <span class="item-label" style="width: 80px;">分公司: </span> -->  
36 -<!-- <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> -->  
37 -<!-- </div> -->  
38 - <div style="display: inline-block;margin-left: 43px;"> 30 + <div style="display: inline-block;margin-left: 38px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 160px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 24px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
  37 + </div>
  38 + <div style="display: inline-block;margin-left: 38px;">
39 <span class="item-label" style="width: 80px;">线路: </span> 39 <span class="item-label" style="width: 80px;">线路: </span>
40 <select class="form-control" name="line" id="line" style="width: 160px;"></select> 40 <select class="form-control" name="line" id="line" style="width: 160px;"></select>
41 </div> 41 </div>
42 -<!-- <div style="margin-top: 10px"></div> --> 42 + <div style="margin-top: 10px"></div>
43 <div style="display: inline-block;margin-left: 10px;"> 43 <div style="display: inline-block;margin-left: 10px;">
44 <span class="item-label" style="width: 80px;">开始时间: </span> 44 <span class="item-label" style="width: 80px;">开始时间: </span>
45 <input class="form-control" type="text" id="startDate" style="width: 160px;"/> 45 <input class="form-control" type="text" id="startDate" style="width: 160px;"/>
46 </div> 46 </div>
47 - <div style="display: inline-block;margin-left: 15px;"> 47 + <div style="display: inline-block;margin-left: 10px;">
48 <span class="item-label" style="width: 80px;">结束时间: </span> 48 <span class="item-label" style="width: 80px;">结束时间: </span>
49 <input class="form-control" type="text" id="endDate" style="width: 160px;"/> 49 <input class="form-control" type="text" id="endDate" style="width: 160px;"/>
50 </div> 50 </div>
51 - <div style="display: inline-block;margin-left: 15px;"> 51 + <div style="display: inline-block;margin-left: 10px;">
52 <span class="item-label" style="width: 80px;">模板类型: </span> 52 <span class="item-label" style="width: 80px;">模板类型: </span>
53 <select class="form-control" name="model" id="model" style="width: 160px;"> 53 <select class="form-control" name="model" id="model" style="width: 160px;">
54 <option value="">请选择...</option> 54 <option value="">请选择...</option>
@@ -114,13 +114,12 @@ @@ -114,13 +114,12 @@
114 var year = d.getFullYear(); 114 var year = d.getFullYear();
115 var month = d.getMonth() + 1; 115 var month = d.getMonth() + 1;
116 var day = d.getDate(); 116 var day = d.getDate();
117 - if(month > 9){  
118 - $("#startDate").val(year + "-" + month + "-" + day);  
119 - $("#endDate").val(year + "-" + month + "-" + day);  
120 - } else {  
121 - $("#startDate").val(year + "-0" + month + "-" + day);  
122 - $("#endDate").val(year + "-0" + month + "-" + day);  
123 - } 117 + if(month < 10)
  118 + month = "0" + month;
  119 + if(day < 10)
  120 + day = "0" + day;
  121 + $("#startDate").val(year + "-" + month + "-" + day);
  122 + $("#endDate").val(year + "-" + month + "-" + day);
124 123
125 $.get('/basic/lineCode2Name',function(result){ 124 $.get('/basic/lineCode2Name',function(result){
126 var data=[]; 125 var data=[];
@@ -143,6 +142,11 @@ @@ -143,6 +142,11 @@
143 for(var i = 0; i < obj.length; i++){ 142 for(var i = 0; i < obj.length; i++){
144 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; 143 options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
145 } 144 }
  145 + if(obj.length == 1){
  146 + $('#company1').hide();
  147 + if(obj[0].children.length == 1)
  148 + $('#subCompany1').hide();
  149 + }
146 $('#company').html(options); 150 $('#company').html(options);
147 updateCompany(); 151 updateCompany();
148 }); 152 });
@@ -171,17 +175,23 @@ @@ -171,17 +175,23 @@
171 var startDate = $("#startDate").val(); 175 var startDate = $("#startDate").val();
172 var endDate = $("#endDate").val(); 176 var endDate = $("#endDate").val();
173 var model = $("#model").val(); 177 var model = $("#model").val();
  178 + var company = $("#company").val();
  179 + var subCompany = $("#subCompany").val();
174 function jsDoQuery(pagination){ 180 function jsDoQuery(pagination){
175 var params = {}; 181 var params = {};
176 // line = $("#line").val(); 182 // line = $("#line").val();
177 startDate = $("#startDate").val(); 183 startDate = $("#startDate").val();
178 endDate = $("#endDate").val(); 184 endDate = $("#endDate").val();
179 model = $("#model").val(); 185 model = $("#model").val();
  186 + company = $("#company").val();
  187 + subCompany = $("#subCompany").val();
180 params['page'] = page; 188 params['page'] = page;
181 params['line'] = line; 189 params['line'] = line;
182 params['startDate'] = startDate; 190 params['startDate'] = startDate;
183 params['endDate'] = endDate; 191 params['endDate'] = endDate;
184 params['model'] = model; 192 params['model'] = model;
  193 + params['company'] = company;
  194 + params['subCompany'] = subCompany;
185 params['type'] = "query"; 195 params['type'] = "query";
186 $(".hidden").removeClass("hidden"); 196 $(".hidden").removeClass("hidden");
187 $get('/pcpc/scheduleAnaly', params, function(result){ 197 $get('/pcpc/scheduleAnaly', params, function(result){
@@ -194,8 +204,12 @@ @@ -194,8 +204,12 @@
194 //重新分页 204 //重新分页
195 initPagination = true; 205 initPagination = true;
196 showPagination(result); 206 showPagination(result);
  207 +
  208 + $('#pagination').show();
  209 + } else if(result.dataList.length == 0){
  210 + $('#pagination').hide();
197 } 211 }
198 - }); 212 + });
199 } 213 }
200 214
201 $("#export").on("click",function(){ 215 $("#export").on("click",function(){
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
@@ -136,13 +136,13 @@ @@ -136,13 +136,13 @@
136 var year = d.getFullYear(); 136 var year = d.getFullYear();
137 var month = d.getMonth() + 1; 137 var month = d.getMonth() + 1;
138 var day = d.getDate(); 138 var day = d.getDate();
139 - if(month > 9){  
140 - $("#startDate").val(year + "-" + month + "-" + day);  
141 - $("#endDate").val(year + "-" + month + "-" + day);  
142 - } else {  
143 - $("#startDate").val(year + "-0" + month + "-" + day);  
144 - $("#endDate").val(year + "-0" + month + "-" + day);  
145 - } 139 + if(month < 10)
  140 + month = "0" + month;
  141 + if(day < 10)
  142 + day = "0" + day;
  143 + $("#startDate").val(year + "-" + month + "-" + day);
  144 + $("#endDate").val(year + "-" + month + "-" + day);
  145 +
146 $("#times1").val("06:00"); 146 $("#times1").val("06:00");
147 $("#times2").val("07:00"); 147 $("#times2").val("07:00");
148 148
@@ -211,6 +211,8 @@ @@ -211,6 +211,8 @@
211 var model = $("#model").val(); 211 var model = $("#model").val();
212 var times = $("#times1").val() + "-" + $("#times2").val(); 212 var times = $("#times1").val() + "-" + $("#times2").val();
213 var upDown = $("#upDown").val(); 213 var upDown = $("#upDown").val();
  214 + var company = $("#company").val();
  215 + var subCompany = $("#subCompany").val();
214 function jsDoQuery(pagination){ 216 function jsDoQuery(pagination){
215 var params = {}; 217 var params = {};
216 // line = $("#line").val(); 218 // line = $("#line").val();
@@ -219,12 +221,16 @@ @@ -219,12 +221,16 @@
219 model = $("#model").val(); 221 model = $("#model").val();
220 times = $("#times1").val() + "-" + $("#times2").val(); 222 times = $("#times1").val() + "-" + $("#times2").val();
221 upDown = $("#upDown").val(); 223 upDown = $("#upDown").val();
  224 + company = $("#company").val();
  225 + subCompany = $("#subCompany").val();
222 params['line'] = line; 226 params['line'] = line;
223 params['startDate'] = startDate; 227 params['startDate'] = startDate;
224 params['endDate'] = endDate; 228 params['endDate'] = endDate;
225 params['model'] = model; 229 params['model'] = model;
226 params['times'] = times; 230 params['times'] = times;
227 params['upDown'] = upDown; 231 params['upDown'] = upDown;
  232 + params['company'] = company;
  233 + params['subCompany'] = subCompany;
228 params['type'] = "query"; 234 params['type'] = "query";
229 $(".hidden").removeClass("hidden"); 235 $(".hidden").removeClass("hidden");
230 $get('/busInterval/timeAndSpeed', params, function(result){ 236 $get('/busInterval/timeAndSpeed', params, function(result){
src/main/resources/static/pages/forms/statement/turnoutrate.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px;
  14 + 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;
  25 +}
  26 +
  27 +</style>
  28 +
  29 +<div class="page-head">
  30 + <div class="page-title">
  31 + <h1>营运线路出车率统计表</h1>
  32 + </div>
  33 +</div>
  34 +
  35 +<div class="row">
  36 + <div class="col-md-12">
  37 + <div class="portlet light porttlet-fit bordered">
  38 + <div class="portlet-title">
  39 + <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>
  56 + </form>
  57 + </div>
  58 + <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">
  61 + <thead>
  62 + <tr>
  63 + <th colspan="15">营运线路出车率统计表</th>
  64 + </tr>
  65 + <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>
  70 + <td colspan="3">出车数</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>
  75 + </tr>
  76 + <tr>
  77 + <td>计划</td>
  78 + <td>实际</td>
  79 + <td>权证</td>
  80 + <td>计划</td>
  81 + <td>实际</td>
  82 + </tr>
  83 + </thead>
  84 + <tbody id="tbody">
  85 +
  86 + </tbody>
  87 + <tr>
  88 + <td colspan="1">分类汇总</td>
  89 + <td><span id="total_gs">&nbsp;</span></td>
  90 + <td><span id="total_zhgs">&nbsp;</span></td>
  91 + <td><span id="total_xlts">&nbsp;</span></td>
  92 + <td><span id="total_jh">&nbsp;</span></td>
  93 + <td><span id="total_sj">&nbsp;</span></td>
  94 + <td><span id="total_qz">&nbsp;</span></td>
  95 + <td><span id="total_ccl">&nbsp;</span></td>
  96 + <td><span id="total_bcjh">&nbsp;</span></td>
  97 + <td><span id="total_bcsj">&nbsp;</span></td>
  98 + <td><span id="total_bczxl">&nbsp;</span></td>
  99 + <td><span id="total_sm">&nbsp;</span></td>
  100 + </tr>
  101 + </table>
  102 + </div>
  103 + </div>
  104 + </div>
  105 + </div>
  106 +</div>
  107 +
  108 +<script>
  109 + $(function(){
  110 + // 关闭左侧栏
  111 + if (!$('body').hasClass('page-sidebar-closed'))
  112 + $('.menu-toggler.sidebar-toggler').click();
  113 +
  114 + $("#startDate,#endDate").datetimepicker({
  115 + format : 'YYYY-MM-DD',
  116 + locale : 'zh-cn'
  117 + });
  118 +
  119 + $.get('/basic/lineCode2Name',function(result){
  120 + var data=[];
  121 +
  122 + for(var code in result){
  123 + data.push({id: code, text: result[code]});
  124 + }
  125 + initPinYinSelect2('#line',data,'');
  126 +
  127 + })
  128 +
  129 + var line;
  130 + var startDate;
  131 + var endDate;
  132 + $("#query").on("click",function(){
  133 +
  134 + line = $("#line").val();
  135 + startDate1=$("#startDate").val();
  136 + endDate1=$("#endDate").val();
  137 +
  138 + if(startDate1!=''&&endDate1!=''){
  139 + $post('/mcy_forms/turnoutrate',{line:line,startDate:$("#startDate").val(),endDate:$("#endDate").val(),type:'query'},function(result){
  140 + // 把数据填充到模版中
  141 + var tbodyHtml = template('turnoutrate',{list:result});
  142 + // 把渲染好的模版html文本追加到表格中
  143 + $('#tbody').html(tbodyHtml);
  144 + line = $("#line").val();
  145 + startDate = $("#startDate").val();
  146 + endDate = $("#endDate").val();
  147 + $("#sDate").text(startDate);
  148 + $("#eDate").text(endDate);
  149 +
  150 + var total_xlts = 0,total_jh = 0;
  151 + var total_sj = 0,total_qz = 0,total_ccl = 0,total_bcjh = 0;
  152 + var total_bcjh = 0,total_bcsj = 0,total_bczxl = 0;
  153 + var total_gs=0;
  154 + var total_zhgs=0;
  155 + $.each(result, function(i, obj) {
  156 + total_gs +=Number(obj.gsgs);
  157 + total_zhgs +=Number(obj.fgsgs);
  158 + total_xlts += Number(obj.xl);
  159 + total_jh = Number(obj.cchjh)+Number(total_jh);
  160 + total_sj = Number(obj.cchsj)+Number(total_sj);
  161 + total_qz = Number(obj.cchqz)+Number(total_qz);
  162 +
  163 + total_ccl =(Number(total_sj)/Number(total_jh))*100;
  164 + total_bcjh = Number(obj.bcjh)+Number(total_bcjh);
  165 + total_bcsj = Number(obj.bcsj)+Number(total_bcsj);
  166 + total_bczxl = (Number(total_bcsj)/Number(total_bcjh))*100;
  167 +
  168 + });
  169 + $("#total_gs").text(total_gs);
  170 + $("#total_zhgs").text(total_zhgs);
  171 + $("#total_xlts").text(total_xlts);
  172 + $("#total_jh").text(total_jh);
  173 + $("#total_sj").text(total_sj);
  174 + $("#total_qz").text(total_qz);
  175 + $("#total_ccl").text(total_ccl.toFixed(2)+'%');
  176 + $("#total_bcjh").text(total_bcjh);
  177 + $("#total_bcsj").text(total_bcsj);
  178 + $("#total_bczxl").text(total_bczxl.toFixed(2)+'%');
  179 +
  180 + var temp = {};
  181 + var today_account = 0;
  182 +
  183 + temp["line"] = $("#line").text();
  184 + $.each(result, function(i, obj) {
  185 + if(moment(obj.schedule_date_str).format("YYYY-MM-DD") == moment(obj.startDate).format("YYYY-MM-DD")){
  186 + today_account++;
  187 + }
  188 + obj.updateDate = moment(obj.startDate).format("YYYY-MM-DD HH:mm:ss");
  189 + });
  190 +
  191 + })
  192 +
  193 + }else{
  194 + alert("请选择时间范围!");
  195 + }
  196 + });
  197 +
  198 + $("#export").on("click",function(){
  199 + $post('/mcy_export/turnoutrateExport',{line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){
  200 + window.open("/downloadFile/download?fileName=营运线路出车率统计表"+moment(startDate).format("YYYYMMDD"));
  201 + });
  202 + });
  203 + });
  204 +</script>
  205 +<script type="text/html" id="turnoutrate">
  206 + {{each list as obj i}}
  207 + <tr>
  208 + <td>{{obj.rq}}</td>
  209 + <td>{{obj.gs}}</td>
  210 + <td>{{obj.zhgs}}</td>
  211 + <td>{{obj.xl}}</td>
  212 + <td>{{obj.cchjh}}</td>
  213 + <td>{{obj.cchsj}}</td>
  214 + <td>{{obj.cchqz}}</td>
  215 + <td>{{obj.chl}}</td>
  216 + <td>{{obj.bcjh}}</td>
  217 + <td>{{obj.bcsj}}</td>
  218 + <td>{{obj.bbzxl}}</td>
  219 + <td>{{obj.gs}}</td>
  220 + </tr>
  221 + {{/each}}
  222 + {{if list.length == 0}}
  223 + <tr>
  224 + <td colspan="12"><h6 class="muted">没有找到相关数据</h6></td>
  225 + </tr>
  226 + {{/if}}
  227 +</script>
src/main/resources/static/pages/forms/statement/waybillBf.html
1 -<style type="text/css">  
2 - .table-bordered {  
3 - border: 1px solid; }  
4 - .table-bordered > thead > tr > th,  
5 - .table-bordered > thead > tr > td,  
6 - .table-bordered > tbody > tr > th,  
7 - .table-bordered > tbody > tr > td,  
8 - .table-bordered > tfoot > tr > th,  
9 - .table-bordered > tfoot > tr > td {  
10 - border: 1px solid; }  
11 - .table-bordered > thead > tr > th,  
12 - .table-bordered > thead > tr > td {  
13 - border-bottom-width: 2px; }  
14 -  
15 - .table > tbody + tbody {  
16 - border-top: 1px solid; }  
17 -</style>  
18 -  
19 -<div class="page-head">  
20 - <div class="page-title">  
21 - <h1>行车路单</h1>  
22 - </div>  
23 -</div> 1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>行车路单</h1>
  22 + </div>
  23 +</div>
  24 +
24 25
25 <div class="row"> 26 <div class="row">
  27 +
26 <div class="col-md-12"> 28 <div class="col-md-12">
  29 +
27 <div class="portlet light porttlet-fit bordered"> 30 <div class="portlet light porttlet-fit bordered">
  31 +
28 <div class="portlet-title"> 32 <div class="portlet-title">
  33 +
29 <form class="form-inline" action=""> 34 <form class="form-inline" action="">
  35 +
30 <div style="display: inline-block;"> 36 <div style="display: inline-block;">
31 - <span class="item-label" style="width: 80px;">线路: </span> 37 +
  38 + <span class="item-label" style="width: 80px;">线路: </span>
32 <select class="form-control" name="line" id="line" style="width: 180px;"></select> 39 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  40 +
33 </div> 41 </div>
  42 +
34 <div style="display: inline-block;margin-left: 15px;"> 43 <div style="display: inline-block;margin-left: 15px;">
  44 +
35 <span class="item-label" style="width: 80px;">时间: </span> 45 <span class="item-label" style="width: 80px;">时间: </span>
  46 +
36 <input class="form-control" type="text" id="date" style="width: 180px;"/> 47 <input class="form-control" type="text" id="date" style="width: 180px;"/>
  48 +
37 </div> 49 </div>
  50 +
38 <div class="form-group" style="display: inline-block;margin-left: 15px;"> 51 <div class="form-group" style="display: inline-block;margin-left: 15px;">
  52 +
39 <input class="btn btn-default" type="button" id="query" value="查询"/> 53 <input class="btn btn-default" type="button" id="query" value="查询"/>
  54 +
40 <input class="btn btn-default" type="button" id="export" value="导出"/> 55 <input class="btn btn-default" type="button" id="export" value="导出"/>
  56 +
41 <input class="btn btn-default" type="button" id="print" value="打印"/> 57 <input class="btn btn-default" type="button" id="print" value="打印"/>
  58 +
42 <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/> 59 <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/>
  60 +
43 </div> 61 </div>
  62 +
44 </form> 63 </form>
  64 +
45 </div> 65 </div>
  66 +
46 <div class="portlet-body"> 67 <div class="portlet-body">
  68 +
47 <div class="row"> 69 <div class="row">
  70 +
48 <div class="col-md-3"> 71 <div class="col-md-3">
  72 +
49 <div class="" style="margin-top: 10px;overflow:auto;height: 860px"> 73 <div class="" style="margin-top: 10px;overflow:auto;height: 860px">
  74 +
50 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info"> 75 <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
  76 +
51 <thead> 77 <thead>
  78 +
52 <tr class="hidden"> 79 <tr class="hidden">
  80 +
53 <th>人员</th> 81 <th>人员</th>
  82 +
54 <th>自编号</th> 83 <th>自编号</th>
  84 +
55 <th>路牌</th> 85 <th>路牌</th>
  86 +
56 </tr> 87 </tr>
  88 +
57 </thead> 89 </thead>
  90 +
58 <tbody> 91 <tbody>
  92 +
59 93
  94 +
60 </tbody> 95 </tbody>
  96 +
61 </table> 97 </table>
  98 +
62 </div> 99 </div>
  100 +
63 </div> 101 </div>
  102 +
64 <div class="col-md-9" id="printArea"> 103 <div class="col-md-9" id="printArea">
  104 +
65 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> 105 <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  106 +
66 <table class="table table-bordered table-checkable" id="forms"> 107 <table class="table table-bordered table-checkable" id="forms">
67 - <tbody class="ludan_1">  
68 -  
69 - </tbody>  
70 - <tbody class="ludan_2">  
71 -  
72 - </tbody>  
73 - <tbody class="ludan_3">  
74 -  
75 - </tbody>  
76 - <tbody class="ludan_4">  
77 - 108 +
  109 + <tbody class="ludan_1">
  110 +
  111 + </tbody>
  112 + <tbody class="ludan_2">
  113 +
  114 + </tbody>
  115 + <tbody class="ludan_3">
  116 +
  117 + </tbody>
  118 + <tbody class="ludan_4">
  119 +
78 </tbody> 120 </tbody>
  121 +
79 </table> 122 </table>
  123 +
80 </div> 124 </div>
  125 +
81 </div> 126 </div>
  127 +
82 </div> 128 </div>
  129 +
83 </div> 130 </div>
  131 +
84 </div> 132 </div>
  133 +
85 </div> 134 </div>
  135 +
86 </div> 136 </div>
87 137
  138 +
  139 +
88 <script> 140 <script>
  141 +
89 $(function(){ 142 $(function(){
  143 +
90 // 关闭左侧栏 144 // 关闭左侧栏
  145 +
91 if (!$('body').hasClass('page-sidebar-closed')) 146 if (!$('body').hasClass('page-sidebar-closed'))
92 - $('.menu-toggler.sidebar-toggler').click(); 147 +
  148 + $('.menu-toggler.sidebar-toggler').click();
93 149
  150 +
94 $("#date").datetimepicker({ 151 $("#date").datetimepicker({
  152 +
95 format : 'YYYY-MM-DD', 153 format : 'YYYY-MM-DD',
  154 +
96 locale : 'zh-cn' 155 locale : 'zh-cn'
97 - });  
98 -  
99 - $('#line').select2({  
100 - ajax: {  
101 - url: '/realSchedule/findLine',  
102 - type: 'post',  
103 - dataType: 'json',  
104 - delay: 150,  
105 - data: function(params){  
106 - return{line: params.term};  
107 - },  
108 - processResults: function (data) {  
109 - return {  
110 - results: data  
111 - };  
112 - },  
113 - cache: true  
114 - },  
115 - templateResult: function(repo){  
116 - if (repo.loading) return repo.text;  
117 - var h = '<span>'+repo.text+'</span>';  
118 - return h;  
119 - },  
120 - escapeMarkup: function (markup) { return markup; },  
121 - minimumInputLength: 1,  
122 - templateSelection: function(repo){  
123 - return repo.text;  
124 - },  
125 - language: {  
126 - noResults: function(){  
127 - return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';  
128 - },  
129 - inputTooShort : function(e) {  
130 - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';  
131 - },  
132 - searching : function() {  
133 - return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';  
134 - }  
135 - }  
136 - });  
137 - 156 +
  157 + });
  158 +
  159 + $('#line').select2({
  160 + ajax: {
  161 + url: '/realSchedule/findLine',
  162 + type: 'post',
  163 + dataType: 'json',
  164 + delay: 150,
  165 + data: function(params){
  166 + return{line: params.term};
  167 + },
  168 + processResults: function (data) {
  169 + return {
  170 + results: data
  171 + };
  172 + },
  173 + cache: true
  174 + },
  175 + templateResult: function(repo){
  176 + if (repo.loading) return repo.text;
  177 + var h = '<span>'+repo.text+'</span>';
  178 + return h;
  179 + },
  180 + escapeMarkup: function (markup) { return markup; },
  181 + minimumInputLength: 1,
  182 + templateSelection: function(repo){
  183 + return repo.text;
  184 + },
  185 + language: {
  186 + noResults: function(){
  187 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  188 + },
  189 + inputTooShort : function(e) {
  190 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  191 + },
  192 + searching : function() {
  193 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  194 + }
  195 + }
  196 + });
  197 +
138 var date = ''; 198 var date = '';
  199 +
139 $("#query").on("click",function(){ 200 $("#query").on("click",function(){
  201 +
140 var line = $("#line").val(); 202 var line = $("#line").val();
141 - date = $("#date").val(); 203 +
  204 + date = $("#date").val();
142 $(".hidden").removeClass("hidden"); 205 $(".hidden").removeClass("hidden");
  206 +
143 $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){ 207 $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){
  208 +
144 // 把数据填充到模版中 209 // 把数据填充到模版中
  210 +
145 var tbodyHtml = template('list_info',{list:result}); 211 var tbodyHtml = template('list_info',{list:result});
  212 +
146 // 把渲染好的模版html文本追加到表格中 213 // 把渲染好的模版html文本追加到表格中
  214 +
147 $('#info tbody').html(tbodyHtml); 215 $('#info tbody').html(tbodyHtml);
  216 +
148 }); 217 });
149 - });  
150 -  
151 - var params = new Array(); 218 +
  219 + });
  220 +
  221 + var params = new Array();
152 var jName = ''; 222 var jName = '';
153 - $("#info tbody").on("click","tr",function(){  
154 - if($(this).children().size() < 2){  
155 - return; 223 +
  224 + $("#info tbody").on("click","tr",function(){
  225 + if($(this).children().size() < 2){
  226 + return;
156 } 227 }
  228 +
157 229
  230 +
158 $(this).children().each(function(index){ 231 $(this).children().each(function(index){
  232 +
159 params[index] = $(this).text(); 233 params[index] = $(this).text();
160 - });  
161 - console.log(params);  
162 - jName = params[0].split("\\")[0];  
163 - var id = $("#"+params[1]).val();  
164 - $get('/realSchedule/'+id,null,function(result){  
165 - console.log(result);  
166 - result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");  
167 - var ludan_1 = template('ludan_1',result);  
168 - //var ludan_4 = template('ludan_4',result);  
169 - // 把渲染好的模版html文本追加到表格中  
170 - $('#forms .ludan_1').html(ludan_1);  
171 - //$('#forms .ludan_4').html(ludan_4); 234 +
  235 + });
  236 + console.log(params);
  237 + jName = params[0].split("\\")[0];
  238 + var id = $("#"+params[1]).val();
  239 + $get('/realSchedule/'+id,null,function(result){
  240 + console.log(result);
  241 + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
  242 + var ludan_1 = template('ludan_1',result);
  243 + //var ludan_4 = template('ludan_4',result);
  244 + // 把渲染好的模版html文本追加到表格中
  245 + $('#forms .ludan_1').html(ludan_1);
  246 + //$('#forms .ludan_4').html(ludan_4);
172 }); 247 });
173 - $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){ 248 +
  249 + $post('/realSchedule/queryListWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
174 getTime(result); 250 getTime(result);
  251 +
175 var ludan_2 = template('ludan_2',{list:result}); 252 var ludan_2 = template('ludan_2',{list:result});
  253 +
176 // 把渲染好的模版html文本追加到表格中 254 // 把渲染好的模版html文本追加到表格中
  255 +
177 $('#forms .ludan_2').html(ludan_2); 256 $('#forms .ludan_2').html(ludan_2);
178 - });  
179 - $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){  
180 - var ludan_3 = template('ludan_3',result);  
181 - $('#forms .ludan_3').html(ludan_3);  
182 - }); 257 +
  258 + });
  259 + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  260 + var ludan_3 = template('ludan_3',result);
  261 + $('#forms .ludan_3').html(ludan_3);
  262 + });
183 263
184 - });  
185 -  
186 - $("#export").on("click",function(){  
187 - if(params.length < 1){  
188 - return;  
189 - }  
190 - $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){  
191 - window.open("/downloadFile/download?fileName="+jName);  
192 - });  
193 - });  
194 -  
195 - $("#print").click(function(){  
196 - $("#printArea").printArea();  
197 - });  
198 -  
199 - $("#exportMore").on("click",function(){  
200 - return;  
201 - $post('/realSchedule/exportWaybillMore',{date:date},function(result){  
202 - window.open("/downloadFile/download?fileName="+jName);  
203 - });  
204 - });  
205 -  
206 - function getTime(list){  
207 - $.each(list, function(i, obj) {  
208 - if(obj.zdsj != null && obj.zdsjActual != null ){  
209 - var zdsjActual = (obj.zdsjActual).split(":");  
210 - var zdsj = (obj.zdsj).split(":");  
211 - if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){  
212 - obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));  
213 - }  
214 - else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){  
215 - obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));  
216 - }  
217 - }  
218 - }); 264 +
  265 + });
  266 +
  267 + $("#export").on("click",function(){
  268 + if(params.length < 1){
  269 + return;
  270 + }
  271 + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  272 + window.open("/downloadFile/download?fileName="+jName);
  273 + });
  274 + });
  275 +
  276 + $("#print").click(function(){
  277 + $("#printArea").printArea();
  278 + });
  279 +
  280 + $("#exportMore").on("click",function(){
  281 + return;
  282 + $post('/realSchedule/exportWaybillMore',{date:date},function(result){
  283 + window.open("/downloadFile/download?fileName="+jName);
  284 + });
  285 + });
  286 +
  287 + function getTime(list){
  288 + $.each(list, function(i, obj) {
  289 + if(obj.zdsj != null && obj.zdsjActual != null ){
  290 + var zdsjActual = (obj.zdsjActual).split(":");
  291 + var zdsj = (obj.zdsj).split(":");
  292 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  293 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  294 + }
  295 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  296 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  297 + }
  298 + }
  299 + });
219 } 300 }
  301 +
220 }); 302 });
  303 +
221 </script> 304 </script>
  305 +
222 <script type="text/html" id="list_info"> 306 <script type="text/html" id="list_info">
  307 +
223 {{each list as obj i}} 308 {{each list as obj i}}
  309 +
224 <tr> 310 <tr>
  311 +
225 <td width="45%">{{obj[4]}}\{{obj[1]}}</td> 312 <td width="45%">{{obj[4]}}\{{obj[1]}}</td>
  313 +
226 <td width="32%">{{obj[2]}}</td> 314 <td width="32%">{{obj[2]}}</td>
  315 +
227 <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td> 316 <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td>
  317 +
228 </tr> 318 </tr>
  319 +
229 {{/each}} 320 {{/each}}
  321 +
230 {{if list.length == 0}} 322 {{if list.length == 0}}
  323 +
231 <tr> 324 <tr>
  325 +
232 <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td> 326 <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td>
  327 +
233 </tr> 328 </tr>
  329 +
234 {{/if}} 330 {{/if}}
235 -</script>  
236 -<script type="text/html" id="ludan_1">  
237 - <tr>  
238 - <td colspan="14">行车路单</td>  
239 - </tr>  
240 - <tr>  
241 - <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>  
242 - </tr>  
243 - <tr>  
244 - <td colspan="2">出场存油 &nbsp;升</td>  
245 - <td colspan="2">加注油量 &nbsp;升</td>  
246 - <td colspan="2">进场存油 &nbsp;升</td>  
247 - <td colspan="4">加注机油 &nbsp;升</td>  
248 - <td colspan="4">本日耗油 &nbsp;升</td>  
249 - </tr>  
250 - <tr>  
251 - <td rowspan="2">调度章</td>  
252 - <td colspan="1">&nbsp;</td>  
253 - <td rowspan="2">早班</td>  
254 - <td colspan="1">&nbsp;</td>  
255 - <td rowspan="2">夜班</td>  
256 - <td colspan="1">&nbsp;</td>  
257 - <td rowspan="2" colspan="2">交叉</td>  
258 - <td colspan="2">&nbsp;</td>  
259 - <td rowspan="2">其他</td>  
260 - <td colspan="1">&nbsp;</td>  
261 - <td colspan="1">&nbsp;</td>  
262 - <td colspan="1">&nbsp;</td>  
263 - </tr>  
264 - <tr>  
265 - <td colspan="1">&nbsp;</td>  
266 - <td colspan="1">&nbsp;</td>  
267 - <td colspan="1">&nbsp;</td>  
268 - <td colspan="2">&nbsp;</td>  
269 - <td colspan="1">&nbsp;</td>  
270 - <td colspan="1">&nbsp;</td>  
271 - <td colspan="1">&nbsp;</td>  
272 - </tr>  
273 - <tr>  
274 - <td rowspan="2">车次</td>  
275 - <td colspan="2">工号</td>  
276 - <td rowspan="2">公里耗油</td>  
277 - <td colspan="2">起讫站</td>  
278 - <td colspan="4">时间</td>  
279 - <td colspan="2">误点</td>  
280 - <td rowspan="2" width="66px">里程(公里)计划</td>  
281 - <td rowspan="2">备注</td>  
282 - </tr>  
283 - <tr>  
284 - <td colspan="1" width="60px">司&nbsp;机</td>  
285 - <td colspan="1" width="60px">售&nbsp;票</td>  
286 - <td colspan="1">起点</td>  
287 - <td colspan="1">终点</td>  
288 - <td colspan="1">计发</td>  
289 - <td colspan="1">实发</td>  
290 - <td colspan="1">应到</td>  
291 - <td colspan="1">实到</td>  
292 - <td colspan="1">快</td>  
293 - <td colspan="1">慢</td>  
294 - </tr> 331 +
295 </script> 332 </script>
  333 +<script type="text/html" id="ludan_1">
  334 + <tr>
  335 + <td colspan="14">行车路单</td>
  336 + </tr>
  337 + <tr>
  338 + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>
  339 + </tr>
  340 + <tr>
  341 + <td colspan="2">出场存油 &nbsp;升</td>
  342 + <td colspan="2">加注油量 &nbsp;升</td>
  343 + <td colspan="2">进场存油 &nbsp;升</td>
  344 + <td colspan="4">加注机油 &nbsp;升</td>
  345 + <td colspan="4">本日耗油 &nbsp;升</td>
  346 + </tr>
  347 + <tr>
  348 + <td rowspan="2">调度章</td>
  349 + <td colspan="1">&nbsp;</td>
  350 + <td rowspan="2">早班</td>
  351 + <td colspan="1">&nbsp;</td>
  352 + <td rowspan="2">夜班</td>
  353 + <td colspan="1">&nbsp;</td>
  354 + <td rowspan="2" colspan="2">交叉</td>
  355 + <td colspan="2">&nbsp;</td>
  356 + <td rowspan="2">其他</td>
  357 + <td colspan="1">&nbsp;</td>
  358 + <td colspan="1">&nbsp;</td>
  359 + <td colspan="1">&nbsp;</td>
  360 + </tr>
  361 + <tr>
  362 + <td colspan="1">&nbsp;</td>
  363 + <td colspan="1">&nbsp;</td>
  364 + <td colspan="1">&nbsp;</td>
  365 + <td colspan="2">&nbsp;</td>
  366 + <td colspan="1">&nbsp;</td>
  367 + <td colspan="1">&nbsp;</td>
  368 + <td colspan="1">&nbsp;</td>
  369 + </tr>
  370 + <tr>
  371 + <td rowspan="2">车次</td>
  372 + <td colspan="2">工号</td>
  373 + <td rowspan="2">公里耗油</td>
  374 + <td colspan="2">起讫站</td>
  375 + <td colspan="4">时间</td>
  376 + <td colspan="2">误点</td>
  377 + <td rowspan="2" width="66px">里程(公里)计划</td>
  378 + <td rowspan="2">备注</td>
  379 + </tr>
  380 + <tr>
  381 + <td colspan="1" width="60px">司&nbsp;机</td>
  382 + <td colspan="1" width="60px">售&nbsp;票</td>
  383 + <td colspan="1">起点</td>
  384 + <td colspan="1">终点</td>
  385 + <td colspan="1">计发</td>
  386 + <td colspan="1">实发</td>
  387 + <td colspan="1">应到</td>
  388 + <td colspan="1">实到</td>
  389 + <td colspan="1">快</td>
  390 + <td colspan="1">慢</td>
  391 + </tr>
  392 +</script>
  393 +
296 <script type="text/html" id="ludan_2"> 394 <script type="text/html" id="ludan_2">
  395 +
297 {{each list as obj i}} 396 {{each list as obj i}}
  397 +
298 <tr> 398 <tr>
  399 +
299 <td>{{i+1}}</td> 400 <td>{{i+1}}</td>
  401 +
300 <td>{{obj.jName}}</td> 402 <td>{{obj.jName}}</td>
  403 +
301 <td>{{obj.sName}}</td> 404 <td>{{obj.sName}}</td>
  405 +
302 <td>&nbsp;</td> 406 <td>&nbsp;</td>
  407 +
303 <td>{{obj.qdzName}}</td> 408 <td>{{obj.qdzName}}</td>
  409 +
304 <td>{{obj.zdzName}}</td> 410 <td>{{obj.zdzName}}</td>
  411 +
305 <td>{{obj.fcsj}}</td> 412 <td>{{obj.fcsj}}</td>
  413 +
306 <td>{{obj.fcsjActual}}</td> 414 <td>{{obj.fcsjActual}}</td>
  415 +
307 <td>{{obj.zdsj}}</td> 416 <td>{{obj.zdsj}}</td>
  417 +
308 <td>{{obj.zdsjActual}}</td> 418 <td>{{obj.zdsjActual}}</td>
  419 +
309 <td>{{obj.fast}}</td> 420 <td>{{obj.fast}}</td>
  421 +
310 <td>{{obj.slow}}</td> 422 <td>{{obj.slow}}</td>
311 - <td>{{obj.jhlc}}</td> 423 +
  424 + <td>{{obj.jhlc}}</td>
312 <td>{{obj.remarks}}</td> 425 <td>{{obj.remarks}}</td>
  426 +
  427 + </tr>
  428 +
  429 + {{/each}}
  430 + {{if list.length == 0}}
  431 + <tr>
  432 + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
313 </tr> 433 </tr>
314 - {{/each}}  
315 - {{if list.length == 0}}  
316 - <tr>  
317 - <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>  
318 - </tr>  
319 {{/if}} 434 {{/if}}
320 -</script>  
321 -<script type="text/html" id="ludan_3">  
322 - <tr>  
323 - <td colspan="2">计划公里</td>  
324 - <td>{{jhlc}}</td>  
325 - <td colspan="2">烂班公里</td>  
326 - <td>{{remMileage}}</td>  
327 - <td colspan="2">临加公里</td>  
328 - <td>{{addMileage}}</td>  
329 - <td colspan="2">营运公里</td>  
330 - <td colspan="3">{{yygl}}</td>  
331 - </tr>  
332 - <tr>  
333 - <td colspan="2">空驶公里</td>  
334 - <td>{{ksgl}}</td>  
335 - <td colspan="2">总公里</td>  
336 - <td>{{realMileage}}</td>  
337 - <td colspan="2">计划班次</td>  
338 - <td>{{jhbc}}</td>  
339 - <td colspan="2">烂班班次</td>  
340 - <td colspan="3">{{cjbc}}</td>  
341 - </tr>  
342 - <tr>  
343 - <td colspan="2">增加班次</td>  
344 - <td>{{ljbc}}</td>  
345 - <td colspan="2">实际班次</td>  
346 - <td>{{sjbc}}</td>  
347 - <td colspan="2"></td>  
348 - <td></td>  
349 - <td colspan="2"></td>  
350 - <td colspan="3"></td>  
351 - </tr>  
352 -</script>  
353 -<script type="text/html" id="ludan_4">  
354 - <tr>  
355 - <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>  
356 - <td>轮胎</td>  
357 - <td>&nbsp;</td>  
358 - </tr>  
359 - <tr>  
360 - <td colspan="3">重点例保项目</td>  
361 - <td>1</td>  
362 - <td>2</td>  
363 - <td>3</td>  
364 - <td colspan="3">重点例保项目</td>  
365 - <td>1</td>  
366 - <td>2</td>  
367 - <td>3</td>  
368 - <td>灭火机</td>  
369 - <td>&nbsp;</td>  
370 - </tr>  
371 - <tr>  
372 - <td colspan="3">各类制动</td>  
373 - <td>&nbsp;</td>  
374 - <td>&nbsp;</td>  
375 - <td>&nbsp;</td>  
376 - <td colspan="3">各类灯光</td>  
377 - <td>&nbsp;</td>  
378 - <td>&nbsp;</td>  
379 - <td>&nbsp;</td>  
380 - <td colspan="2">出场路码表里程</td>  
381 - </tr>  
382 - <tr>  
383 - <td colspan="3">方向机</td>  
384 - <td>&nbsp;</td>  
385 - <td>&nbsp;</td>  
386 - <td>&nbsp;</td>  
387 - <td colspan="3">各类仪表</td>  
388 - <td>&nbsp;</td>  
389 - <td>&nbsp;</td>  
390 - <td>&nbsp;</td>  
391 - <td colspan="2" rowspan="2">&nbsp;</td>  
392 - </tr>  
393 - <tr>  
394 - <td colspan="3">欠压报警器</td>  
395 - <td>&nbsp;</td>  
396 - <td>&nbsp;</td>  
397 - <td>&nbsp;</td>  
398 - <td colspan="3">各类皮带</td>  
399 - <td>&nbsp;</td>  
400 - <td>&nbsp;</td>  
401 - <td>&nbsp;</td>  
402 - </tr>  
403 - <tr>  
404 - <td colspan="3">发动机清洁及响声</td>  
405 - <td>&nbsp;</td>  
406 - <td>&nbsp;</td>  
407 - <td>&nbsp;</td>  
408 - <td colspan="3">油箱及托架</td>  
409 - <td>&nbsp;</td>  
410 - <td>&nbsp;</td>  
411 - <td>&nbsp;</td>  
412 - <td colspan="2">出场路码表里程</td>  
413 - </tr>  
414 - <tr>  
415 - <td colspan="3">地盘响声</td>  
416 - <td>&nbsp;</td>  
417 - <td>&nbsp;</td>  
418 - <td>&nbsp;</td>  
419 - <td colspan="3">轮胎、半轴螺栓螺母</td>  
420 - <td>&nbsp;</td>  
421 - <td>&nbsp;</td>  
422 - <td>&nbsp;</td>  
423 - <td colspan="2" rowspan="3">&nbsp;</td>  
424 - </tr>  
425 - <tr>  
426 - <td colspan="3">化油器及油路</td>  
427 - <td>&nbsp;</td>  
428 - <td>&nbsp;</td>  
429 - <td>&nbsp;</td>  
430 - <td colspan="3">油、电、水、气</td>  
431 - <td>&nbsp;</td>  
432 - <td>&nbsp;</td>  
433 - <td>&nbsp;</td>  
434 - </tr>  
435 - <tr>  
436 - <td colspan="3">进排歧管及排气管</td>  
437 - <td>&nbsp;</td>  
438 - <td>&nbsp;</td>  
439 - <td>&nbsp;</td>  
440 - <td colspan="3">内外车身及附件</td>  
441 - <td>&nbsp;</td>  
442 - <td>&nbsp;</td>  
443 - <td>&nbsp;</td>  
444 - </tr>  
445 - <tr>  
446 - <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>  
447 - </tr> 435 +
  436 +</script>
  437 +<script type="text/html" id="ludan_3">
  438 + <tr>
  439 + <td colspan="2">计划公里</td>
  440 + <td>{{jhlc}}</td>
  441 + <td colspan="2">烂班公里</td>
  442 + <td>{{remMileage}}</td>
  443 + <td colspan="2">临加公里</td>
  444 + <td>{{addMileage}}</td>
  445 + <td colspan="2">营运公里</td>
  446 + <td colspan="3">{{yygl}}</td>
  447 + </tr>
  448 + <tr>
  449 + <td colspan="2">空驶公里</td>
  450 + <td>{{ksgl}}</td>
  451 + <td colspan="2">总公里</td>
  452 + <td>{{realMileage}}</td>
  453 + <td colspan="2">计划班次</td>
  454 + <td>{{jhbc}}</td>
  455 + <td colspan="2">烂班班次</td>
  456 + <td colspan="3">{{cjbc}}</td>
  457 + </tr>
  458 + <tr>
  459 + <td colspan="2">增加班次</td>
  460 + <td>{{ljbc}}</td>
  461 + <td colspan="2">实际班次</td>
  462 + <td>{{sjbc}}</td>
  463 + <td colspan="2"></td>
  464 + <td></td>
  465 + <td colspan="2"></td>
  466 + <td colspan="3"></td>
  467 + </tr>
  468 +</script>
  469 +<script type="text/html" id="ludan_4">
  470 + <tr>
  471 + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>
  472 + <td>轮胎</td>
  473 + <td>&nbsp;</td>
  474 + </tr>
  475 + <tr>
  476 + <td colspan="3">重点例保项目</td>
  477 + <td>1</td>
  478 + <td>2</td>
  479 + <td>3</td>
  480 + <td colspan="3">重点例保项目</td>
  481 + <td>1</td>
  482 + <td>2</td>
  483 + <td>3</td>
  484 + <td>灭火机</td>
  485 + <td>&nbsp;</td>
  486 + </tr>
  487 + <tr>
  488 + <td colspan="3">各类制动</td>
  489 + <td>&nbsp;</td>
  490 + <td>&nbsp;</td>
  491 + <td>&nbsp;</td>
  492 + <td colspan="3">各类灯光</td>
  493 + <td>&nbsp;</td>
  494 + <td>&nbsp;</td>
  495 + <td>&nbsp;</td>
  496 + <td colspan="2">出场路码表里程</td>
  497 + </tr>
  498 + <tr>
  499 + <td colspan="3">方向机</td>
  500 + <td>&nbsp;</td>
  501 + <td>&nbsp;</td>
  502 + <td>&nbsp;</td>
  503 + <td colspan="3">各类仪表</td>
  504 + <td>&nbsp;</td>
  505 + <td>&nbsp;</td>
  506 + <td>&nbsp;</td>
  507 + <td colspan="2" rowspan="2">&nbsp;</td>
  508 + </tr>
  509 + <tr>
  510 + <td colspan="3">欠压报警器</td>
  511 + <td>&nbsp;</td>
  512 + <td>&nbsp;</td>
  513 + <td>&nbsp;</td>
  514 + <td colspan="3">各类皮带</td>
  515 + <td>&nbsp;</td>
  516 + <td>&nbsp;</td>
  517 + <td>&nbsp;</td>
  518 + </tr>
  519 + <tr>
  520 + <td colspan="3">发动机清洁及响声</td>
  521 + <td>&nbsp;</td>
  522 + <td>&nbsp;</td>
  523 + <td>&nbsp;</td>
  524 + <td colspan="3">油箱及托架</td>
  525 + <td>&nbsp;</td>
  526 + <td>&nbsp;</td>
  527 + <td>&nbsp;</td>
  528 + <td colspan="2">出场路码表里程</td>
  529 + </tr>
  530 + <tr>
  531 + <td colspan="3">地盘响声</td>
  532 + <td>&nbsp;</td>
  533 + <td>&nbsp;</td>
  534 + <td>&nbsp;</td>
  535 + <td colspan="3">轮胎、半轴螺栓螺母</td>
  536 + <td>&nbsp;</td>
  537 + <td>&nbsp;</td>
  538 + <td>&nbsp;</td>
  539 + <td colspan="2" rowspan="3">&nbsp;</td>
  540 + </tr>
  541 + <tr>
  542 + <td colspan="3">化油器及油路</td>
  543 + <td>&nbsp;</td>
  544 + <td>&nbsp;</td>
  545 + <td>&nbsp;</td>
  546 + <td colspan="3">油、电、水、气</td>
  547 + <td>&nbsp;</td>
  548 + <td>&nbsp;</td>
  549 + <td>&nbsp;</td>
  550 + </tr>
  551 + <tr>
  552 + <td colspan="3">进排歧管及排气管</td>
  553 + <td>&nbsp;</td>
  554 + <td>&nbsp;</td>
  555 + <td>&nbsp;</td>
  556 + <td colspan="3">内外车身及附件</td>
  557 + <td>&nbsp;</td>
  558 + <td>&nbsp;</td>
  559 + <td>&nbsp;</td>
  560 + </tr>
  561 + <tr>
  562 + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>
  563 + </tr>
448 </script> 564 </script>
449 \ No newline at end of file 565 \ No newline at end of file
src/main/resources/static/pages/forms/statement/waybillQp.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>行车路单</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block;">
  31 + <span class="item-label" style="width: 80px;">线路: </span>
  32 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 15px;">
  35 + <span class="item-label" style="width: 80px;">时间: </span>
  36 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  37 + </div>
  38 + <div class="form-group" style="display: inline-block;margin-left: 15px;">
  39 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  40 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  41 + <input class="btn btn-default" type="button" id="print" value="打印"/>
  42 + <input class="btn btn-default" type="button" id="exportMore" value="批量导出"/>
  43 + </div>
  44 + </form>
  45 + </div>
  46 + <div class="portlet-body">
  47 + <div class="row">
  48 + <div class="col-md-3">
  49 + <div class="" style="margin-top: 10px;overflow:auto;height: 860px">
  50 + <table class="table table-bordered table-hover table-checkable pre-scrollable" id="info">
  51 + <thead>
  52 + <tr class="hidden">
  53 + <th>人员</th>
  54 + <th>自编号</th>
  55 + <th>路牌</th>
  56 + </tr>
  57 + </thead>
  58 + <tbody>
  59 +
  60 + </tbody>
  61 + </table>
  62 + </div>
  63 + </div>
  64 + <div class="col-md-9" id="printArea">
  65 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  66 + <table class="table table-bordered table-checkable" id="forms">
  67 + <tbody class="ludan_1">
  68 +
  69 + </tbody>
  70 + <tbody class="ludan_2">
  71 +
  72 + </tbody>
  73 + <tbody class="ludan_3">
  74 +
  75 + </tbody>
  76 + <tbody class="ludan_4">
  77 +
  78 + </tbody>
  79 + </table>
  80 + </div>
  81 + </div>
  82 + </div>
  83 + </div>
  84 + </div>
  85 + </div>
  86 +</div>
  87 +
  88 +<script>
  89 + $(function(){
  90 + // 关闭左侧栏
  91 + if (!$('body').hasClass('page-sidebar-closed'))
  92 + $('.menu-toggler.sidebar-toggler').click();
  93 +
  94 + $("#date").datetimepicker({
  95 + format : 'YYYY-MM-DD',
  96 + locale : 'zh-cn'
  97 + });
  98 +
  99 + $.get('/basic/lineCode2Name',function(result){
  100 + var data=[];
  101 +
  102 + for(var code in result){
  103 + data.push({id: code, text: result[code]});
  104 + }
  105 + console.log(data);
  106 + initPinYinSelect2('#line',data,'');
  107 +
  108 + })
  109 +
  110 + /* $('#line').select2({
  111 + ajax: {
  112 + url: '/realSchedule/findLine',
  113 + type: 'post',
  114 + dataType: 'json',
  115 + delay: 150,
  116 + data: function(params){
  117 + return{line: params.term};
  118 + },
  119 + processResults: function (data) {
  120 + return {
  121 + results: data
  122 + };
  123 + },
  124 + cache: true
  125 + },
  126 + templateResult: function(repo){
  127 + if (repo.loading) return repo.text;
  128 + var h = '<span>'+repo.text+'</span>';
  129 + return h;
  130 + },
  131 + escapeMarkup: function (markup) { return markup; },
  132 + minimumInputLength: 1,
  133 + templateSelection: function(repo){
  134 + return repo.text;
  135 + },
  136 + language: {
  137 + noResults: function(){
  138 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  139 + },
  140 + inputTooShort : function(e) {
  141 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  142 + },
  143 + searching : function() {
  144 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  145 + }
  146 + }
  147 + });
  148 + */
  149 +
  150 + var date = '';
  151 + $("#query").on("click",function(){
  152 + var line = $("#line").val();
  153 + date = $("#date").val();
  154 + $(".hidden").removeClass("hidden");
  155 + $get('/realSchedule/queryUserInfo',{line:line,date:date},function(result){
  156 + // 把数据填充到模版中
  157 + var tbodyHtml = template('list_info',{list:result});
  158 + // 把渲染好的模版html文本追加到表格中
  159 + $('#info tbody').html(tbodyHtml);
  160 + });
  161 + });
  162 +
  163 + var params = new Array();
  164 + var jName = '';
  165 + $("#info tbody").on("click","tr",function(){
  166 + if($(this).children().size() < 2){
  167 + return;
  168 + }
  169 +
  170 + $(this).children().each(function(index){
  171 + params[index] = $(this).text();
  172 + });
  173 + console.log(params);
  174 + jName = params[0].split("\\")[0];
  175 + var id = $("#"+params[1]).val();
  176 + $get('/realSchedule/'+id,null,function(result){
  177 + console.log(result);
  178 + result.scheduleDate = moment(result.scheduleDate).format("YYYY/MM/DD");
  179 + var ludan_1 = template('ludan_1',result);
  180 + //var ludan_4 = template('ludan_4',result);
  181 + // 把渲染好的模版html文本追加到表格中
  182 + $('#forms .ludan_1').html(ludan_1);
  183 + //$('#forms .ludan_4').html(ludan_4);
  184 + });
  185 + $post('/realSchedule/queryListWaybillQp',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  186 + getTime(result);
  187 + var ludan_2 = template('ludan_2',{list:result});
  188 + // 把渲染好的模版html文本追加到表格中
  189 + $('#forms .ludan_2').html(ludan_2);
  190 + });
  191 + $post('/realSchedule/findKMBC',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  192 + var ludan_3 = template('ludan_3',result);
  193 + $('#forms .ludan_3').html(ludan_3);
  194 + });
  195 +
  196 + });
  197 +
  198 + $("#export").on("click",function(){
  199 + if(params.length < 1){
  200 + return;
  201 + }
  202 + $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  203 + window.open("/downloadFile/download?fileName="+jName);
  204 + });
  205 + });
  206 +
  207 + $("#print").click(function(){
  208 + $("#printArea").printArea();
  209 + });
  210 +
  211 + $("#exportMore").on("click",function(){
  212 + return;
  213 + $post('/realSchedule/exportWaybillMore',{date:date},function(result){
  214 + window.open("/downloadFile/download?fileName="+jName);
  215 + });
  216 + });
  217 +
  218 + function getTime(list){
  219 + $.each(list, function(i, obj) {
  220 + if(obj.zdsj != null && obj.zdsjActual != null ){
  221 + var zdsjActual = (obj.zdsjActual).split(":");
  222 + var zdsj = (obj.zdsj).split(":");
  223 + if(zdsjActual[0]*60+Number(zdsjActual[1]) > zdsj[0]*60+Number(zdsj[1])){
  224 + obj["slow"] = (zdsjActual[0]*60+Number(zdsjActual[1])) - (zdsj[0]*60+Number(zdsj[1]));
  225 + }
  226 + else if(zdsjActual[0]*60+Number(zdsjActual[1]) < zdsj[0]*60+Number(zdsj[1])){
  227 + obj["fast"] = (zdsj[0]*60+Number(zdsj[1])) - (zdsjActual[0]*60+Number(zdsjActual[1]));
  228 + }
  229 + }
  230 + });
  231 + }
  232 + });
  233 +</script>
  234 +<script type="text/html" id="list_info">
  235 + {{each list as obj i}}
  236 + <tr>
  237 + <td width="45%">{{obj[4]}}\{{obj[1]}}</td>
  238 + <td width="32%">{{obj[2]}}</td>
  239 + <td width="23%">{{obj[3]}}<input type="hidden" id="{{obj[2]}}" value="{{obj[0]}}"></td>
  240 + </tr>
  241 + {{/each}}
  242 + {{if list.length == 0}}
  243 + <tr>
  244 + <td colspan="3"><h6 class="muted">没有找到相关数据</h6></td>
  245 + </tr>
  246 + {{/if}}
  247 +</script>
  248 +<script type="text/html" id="ludan_1">
  249 + <tr>
  250 + <td colspan="14">行车路单</td>
  251 + </tr>
  252 + <tr>
  253 + <td colspan="14">路别:{{xlName}} 路牌:{{lpName}} 车号:{{clZbh}} 出场时间:{{fcsjActual}} 到达站名:{{zdzName}} 当班调派:&nbsp; 日期:{{scheduleDate}}</td>
  254 + </tr>
  255 + <tr>
  256 + <td colspan="2">出场存油 &nbsp;升</td>
  257 + <td colspan="2">加注油量 &nbsp;升</td>
  258 + <td colspan="2">进场存油 &nbsp;升</td>
  259 + <td colspan="4">加注机油 &nbsp;升</td>
  260 + <td colspan="4">本日耗油 &nbsp;升</td>
  261 + </tr>
  262 + <tr>
  263 + <td rowspan="2">调度章</td>
  264 + <td colspan="1">&nbsp;</td>
  265 + <td rowspan="2">早班</td>
  266 + <td colspan="1">&nbsp;</td>
  267 + <td rowspan="2">夜班</td>
  268 + <td colspan="1">&nbsp;</td>
  269 + <td rowspan="2" colspan="2">交叉</td>
  270 + <td colspan="2">&nbsp;</td>
  271 + <td rowspan="2">其他</td>
  272 + <td colspan="1">&nbsp;</td>
  273 + <td colspan="1">&nbsp;</td>
  274 + <td colspan="1">&nbsp;</td>
  275 + </tr>
  276 + <tr>
  277 + <td colspan="1">&nbsp;</td>
  278 + <td colspan="1">&nbsp;</td>
  279 + <td colspan="1">&nbsp;</td>
  280 + <td colspan="2">&nbsp;</td>
  281 + <td colspan="1">&nbsp;</td>
  282 + <td colspan="1">&nbsp;</td>
  283 + <td colspan="1">&nbsp;</td>
  284 + </tr>
  285 + <tr>
  286 + <td rowspan="2">车次</td>
  287 + <td colspan="2">工号</td>
  288 + <td rowspan="2">公里耗油</td>
  289 + <td colspan="2">起讫站</td>
  290 + <td colspan="4">时间</td>
  291 + <td colspan="2">误点</td>
  292 + <td rowspan="2" width="66px">里程(公里)计划</td>
  293 + <td rowspan="2">备注</td>
  294 + </tr>
  295 + <tr>
  296 + <td colspan="1" width="60px">司&nbsp;机</td>
  297 + <td colspan="1" width="60px">售&nbsp;票</td>
  298 + <td colspan="1">起点</td>
  299 + <td colspan="1">终点</td>
  300 + <td colspan="1">计发</td>
  301 + <td colspan="1">实发</td>
  302 + <td colspan="1">应到</td>
  303 + <td colspan="1">实到</td>
  304 + <td colspan="1">快</td>
  305 + <td colspan="1">慢</td>
  306 + </tr>
  307 +</script>
  308 +<script type="text/html" id="ludan_2">
  309 + {{each list as obj i}}
  310 + <tr>
  311 + <td>{{i+1}}</td>
  312 + <td>{{obj.jName}}</td>
  313 + <td>{{obj.sName}}</td>
  314 + <td>&nbsp;</td>
  315 + <td>{{obj.qdzName}}</td>
  316 + <td>{{obj.zdzName}}</td>
  317 + <td>{{obj.fcsj}}</td>
  318 + <td>{{obj.fcsjActual}}</td>
  319 + <td>{{obj.zdsj}}</td>
  320 + <td>{{obj.zdsjActual}}</td>
  321 + <td>{{obj.fast}}</td>
  322 + <td>{{obj.slow}}</td>
  323 + <td>{{obj.jhlc}}</td>
  324 + <td>{{obj.remarks}}</td>
  325 + </tr>
  326 + {{/each}}
  327 + {{if list.length == 0}}
  328 + <tr>
  329 + <td colspan="14"><h6 class="muted">没有找到相关数据</h6></td>
  330 + </tr>
  331 + {{/if}}
  332 +</script>
  333 +<script type="text/html" id="ludan_3">
  334 + <tr>
  335 + <td colspan="2">计划公里</td>
  336 + <td>{{jhlc}}</td>
  337 + <td colspan="2">烂班公里</td>
  338 + <td>{{remMileage}}</td>
  339 + <td colspan="2">临加公里</td>
  340 + <td>{{addMileage}}</td>
  341 + <td colspan="2">营运公里</td>
  342 + <td colspan="3">{{yygl}}</td>
  343 + </tr>
  344 + <tr>
  345 + <td colspan="2">空驶公里</td>
  346 + <td>{{ksgl}}</td>
  347 + <td colspan="2">总公里</td>
  348 + <td>{{realMileage}}</td>
  349 + <td colspan="2">计划班次</td>
  350 + <td>{{jhbc}}</td>
  351 + <td colspan="2">烂班班次</td>
  352 + <td colspan="3">{{cjbc}}</td>
  353 + </tr>
  354 + <tr>
  355 + <td colspan="2">增加班次</td>
  356 + <td>{{ljbc}}</td>
  357 + <td colspan="2">实际班次</td>
  358 + <td>{{sjbc}}</td>
  359 + <td colspan="2"></td>
  360 + <td></td>
  361 + <td colspan="2"></td>
  362 + <td colspan="3"></td>
  363 + </tr>
  364 +</script>
  365 +<script type="text/html" id="ludan_4">
  366 + <tr>
  367 + <td colspan="12">认真做好终点项目的例保保修工作,杜绝机械火警事故!</td>
  368 + <td>轮胎</td>
  369 + <td>&nbsp;</td>
  370 + </tr>
  371 + <tr>
  372 + <td colspan="3">重点例保项目</td>
  373 + <td>1</td>
  374 + <td>2</td>
  375 + <td>3</td>
  376 + <td colspan="3">重点例保项目</td>
  377 + <td>1</td>
  378 + <td>2</td>
  379 + <td>3</td>
  380 + <td>灭火机</td>
  381 + <td>&nbsp;</td>
  382 + </tr>
  383 + <tr>
  384 + <td colspan="3">各类制动</td>
  385 + <td>&nbsp;</td>
  386 + <td>&nbsp;</td>
  387 + <td>&nbsp;</td>
  388 + <td colspan="3">各类灯光</td>
  389 + <td>&nbsp;</td>
  390 + <td>&nbsp;</td>
  391 + <td>&nbsp;</td>
  392 + <td colspan="2">出场路码表里程</td>
  393 + </tr>
  394 + <tr>
  395 + <td colspan="3">方向机</td>
  396 + <td>&nbsp;</td>
  397 + <td>&nbsp;</td>
  398 + <td>&nbsp;</td>
  399 + <td colspan="3">各类仪表</td>
  400 + <td>&nbsp;</td>
  401 + <td>&nbsp;</td>
  402 + <td>&nbsp;</td>
  403 + <td colspan="2" rowspan="2">&nbsp;</td>
  404 + </tr>
  405 + <tr>
  406 + <td colspan="3">欠压报警器</td>
  407 + <td>&nbsp;</td>
  408 + <td>&nbsp;</td>
  409 + <td>&nbsp;</td>
  410 + <td colspan="3">各类皮带</td>
  411 + <td>&nbsp;</td>
  412 + <td>&nbsp;</td>
  413 + <td>&nbsp;</td>
  414 + </tr>
  415 + <tr>
  416 + <td colspan="3">发动机清洁及响声</td>
  417 + <td>&nbsp;</td>
  418 + <td>&nbsp;</td>
  419 + <td>&nbsp;</td>
  420 + <td colspan="3">油箱及托架</td>
  421 + <td>&nbsp;</td>
  422 + <td>&nbsp;</td>
  423 + <td>&nbsp;</td>
  424 + <td colspan="2">出场路码表里程</td>
  425 + </tr>
  426 + <tr>
  427 + <td colspan="3">地盘响声</td>
  428 + <td>&nbsp;</td>
  429 + <td>&nbsp;</td>
  430 + <td>&nbsp;</td>
  431 + <td colspan="3">轮胎、半轴螺栓螺母</td>
  432 + <td>&nbsp;</td>
  433 + <td>&nbsp;</td>
  434 + <td>&nbsp;</td>
  435 + <td colspan="2" rowspan="3">&nbsp;</td>
  436 + </tr>
  437 + <tr>
  438 + <td colspan="3">化油器及油路</td>
  439 + <td>&nbsp;</td>
  440 + <td>&nbsp;</td>
  441 + <td>&nbsp;</td>
  442 + <td colspan="3">油、电、水、气</td>
  443 + <td>&nbsp;</td>
  444 + <td>&nbsp;</td>
  445 + <td>&nbsp;</td>
  446 + </tr>
  447 + <tr>
  448 + <td colspan="3">进排歧管及排气管</td>
  449 + <td>&nbsp;</td>
  450 + <td>&nbsp;</td>
  451 + <td>&nbsp;</td>
  452 + <td colspan="3">内外车身及附件</td>
  453 + <td>&nbsp;</td>
  454 + <td>&nbsp;</td>
  455 + <td>&nbsp;</td>
  456 + </tr>
  457 + <tr>
  458 + <td colspan="14">1 首次出场,2 复使中途,3 某次进场。√正常,ⓧ报修,×尚未报修</td>
  459 + </tr>
  460 +</script>
0 \ No newline at end of file 461 \ No newline at end of file
src/main/resources/static/pages/forms/statement/waybillday.html
@@ -94,7 +94,7 @@ @@ -94,7 +94,7 @@
94 $("#query").on("click",function(){ 94 $("#query").on("click",function(){
95 line = $("#line").val(); 95 line = $("#line").val();
96 date = $("#date").val(); 96 date = $("#date").val();
97 - $post('/mcy_forms/waybillday',{line:line,date:date},function(result){ 97 + $post('/mcy_forms/waybillday',{line:line,date:$("#date").val(),type:'query'},function(result){
98 $.each(result, function(i, obj) { 98 $.each(result, function(i, obj) {
99 obj.requestType = reqCodeMap[obj.requestType]; 99 obj.requestType = reqCodeMap[obj.requestType];
100 }); 100 });
src/main/resources/static/pages/forms/statement/workDaily.html
@@ -27,11 +27,19 @@ @@ -27,11 +27,19 @@
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 id="history" class="form-inline" action=""> 29 <form id="history" class="form-inline" action="">
30 - <div style="display: inline-block;"> 30 + <div style="display: inline-block; margin-left: 10px;" id="company1">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="company" style="width: 160px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 10px;" id="subCompany1">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select>
  37 + </div>
  38 + <div style="display: inline-block; margin-left: 10px;">
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>
33 </div> 41 </div>
34 - <div style="display: inline-block;margin-left: 15px;"> 42 + <div style="display: inline-block;margin-left: 10px;">
35 <span class="item-label" style="width: 80px;">时间: </span> 43 <span class="item-label" style="width: 80px;">时间: </span>
36 <input class="form-control" type="text" id="date" style="width: 180px;"/> 44 <input class="form-control" type="text" id="date" style="width: 180px;"/>
37 </div> 45 </div>
@@ -94,15 +102,16 @@ @@ -94,15 +102,16 @@
94 var year = d.getFullYear(); 102 var year = d.getFullYear();
95 var month = d.getMonth() + 1; 103 var month = d.getMonth() + 1;
96 var day = d.getDate(); 104 var day = d.getDate();
97 - if(month > 9){  
98 - $("#date").val(year + "-" + month + "-" + day);  
99 - } else {  
100 - $("#date").val(year + "-0" + month + "-" + day);  
101 - } 105 + if(month < 10)
  106 + month = "0" + month;
  107 + if(day < 10)
  108 + day = "0" + day;
  109 + $("#date").val(year + "-" + month + "-" + day);
102 110
103 $.get('/basic/lineCode2Name',function(result){ 111 $.get('/basic/lineCode2Name',function(result){
104 var data=[]; 112 var data=[];
105 113
  114 + data.push({id: " ", text: "全部线路"});
106 for(var code in result){ 115 for(var code in result){
107 data.push({id: code, text: result[code]}); 116 data.push({id: code, text: result[code]});
108 } 117 }
@@ -110,17 +119,56 @@ @@ -110,17 +119,56 @@
110 initPinYinSelect2('#line',data,''); 119 initPinYinSelect2('#line',data,'');
111 }) 120 })
112 121
  122 + var obj = [];
  123 + $.get('/user/companyData', function(result){
  124 + obj = result;
  125 + var options = '';
  126 + for(var i = 0; i < obj.length; i++){
  127 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  128 + }
  129 + if(obj.length == 1){
  130 + $('#company1').hide();
  131 + if(obj[0].children.length == 1)
  132 + $('#subCompany1').hide();
  133 + }
  134 + $('#company').html(options);
  135 + updateCompany();
  136 + });
  137 + $("#company").on("change",updateCompany);
  138 + function updateCompany(){
  139 + var company = $('#company').val();
  140 + var options = '';
  141 + for(var i = 0; i < obj.length; i++){
  142 + if(obj[i].companyCode == company){
  143 + var children = obj[i].children;
  144 + for(var j = 0; j < children.length; j++){
  145 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  146 + }
  147 + }
  148 + }
  149 + $('#subCompany').html(options);
  150 + }
  151 +
  152 +
113 $("#query").on("click",jsDoQuery); 153 $("#query").on("click",jsDoQuery);
114 154
115 var line = $("#line").val(); 155 var line = $("#line").val();
116 var date = $("#date").val(); 156 var date = $("#date").val();
  157 + var company = $("#company").val();
  158 + var subCompany = $("#subCompany").val();
117 function jsDoQuery(pagination){ 159 function jsDoQuery(pagination){
118 var params = {}; 160 var params = {};
119 line = $("#line").val(); 161 line = $("#line").val();
120 date = $("#date").val(); 162 date = $("#date").val();
  163 + company = $("#company").val();
  164 + subCompany = $("#subCompany").val();
  165 + if(line == " ")
  166 + line = "";
121 params['line'] = line; 167 params['line'] = line;
122 params['date'] = date; 168 params['date'] = date;
123 params['type'] = "query"; 169 params['type'] = "query";
  170 + params['company'] = company;
  171 + params['subCompany'] = subCompany;
124 $(".hidden").removeClass("hidden"); 172 $(".hidden").removeClass("hidden");
125 $get('/pcpc/workDaily', params, function(result){ 173 $get('/pcpc/workDaily', params, function(result){
126 // 把数据填充到模版中 174 // 把数据填充到模版中
src/main/resources/static/pages/oil/checkJyryList.html
@@ -56,14 +56,15 @@ @@ -56,14 +56,15 @@
56 <tr role="row" class="heading"> 56 <tr role="row" class="heading">
57 <th width="3%">#</th> 57 <th width="3%">#</th>
58 <th width="10%">日期</th> 58 <th width="10%">日期</th>
59 - <th width="8%">公司</th>  
60 - <th width="8%">车辆</th> 59 + <th width="10%">公司</th>
  60 + <th width="10%">分公司</th>
  61 + <th width="6%">车辆</th>
61 <th width="10%">驾驶员</th> 62 <th width="10%">驾驶员</th>
62 - <th width="5%">加注量</th>  
63 - <th width="5%">加油站</th>  
64 - <th width="5%">加油类型</th> 63 + <th width="2%">加注量</th>
  64 + <th width="4%">加油站</th>
  65 + <th width="4%">加油类型</th>
65 <th width="5%">加油工工号</th> 66 <th width="5%">加油工工号</th>
66 - <th width="5%">油价</th> 67 + <th width="2%">油价</th>
67 <th width="5%">路单工号</th> 68 <th width="5%">路单工号</th>
68 <th width="4%">备注</th> 69 <th width="4%">备注</th>
69 <th width="19%">操作</th> 70 <th width="19%">操作</th>
@@ -74,7 +75,10 @@ @@ -74,7 +75,10 @@
74 <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq"> 75 <input type="text" id="yyrq" class="form-control form-filter input-sm" name="yyrq">
75 </td> 76 </td>
76 <td> 77 <td>
77 - <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> 78 +<!-- <select class="form-control" name="gsdm_like" id="jyryListGsdmId" ></select> -->
  79 + </td>
  80 + <td>
  81 +<!-- <select class="form-control" name="fgsdm_like" id="jyryListFgsdmId" ></select> -->
78 </td> 82 </td>
79 <td> 83 <td>
80 </td> 84 </td>
@@ -114,7 +118,10 @@ @@ -114,7 +118,10 @@
114 </td> 118 </td>
115 <td>{{obj.yyrq}}</td> 119 <td>{{obj.yyrq}}</td>
116 <td> 120 <td>
117 - {{obj.gsdm}} 121 + {{obj.gsname}}
  122 + </td>
  123 + <td>
  124 + {{obj.fgsname}}
118 </td> 125 </td>
119 <td> 126 <td>
120 {{obj.nbbm}} 127 {{obj.nbbm}}
@@ -173,15 +180,54 @@ $(function(){ @@ -173,15 +180,54 @@ $(function(){
173 radioClass: 'iradio_square-blue icheck', 180 radioClass: 'iradio_square-blue icheck',
174 increaseArea: '20%' 181 increaseArea: '20%'
175 } 182 }
176 - if($("#yyrq").val()!=""){  
177 - jsDoQuery(null,true);  
178 - }  
179 //重置 183 //重置
180 $('tr.filter .filter-cancel').on('click', function(){ 184 $('tr.filter .filter-cancel').on('click', function(){
181 $('tr.filter input, select').val('').change(); 185 $('tr.filter input, select').val('').change();
182 - jsDoQuery(null, true); 186 +// jsDoQuery(null, true);
183 }); 187 });
184 188
  189 + var gsqx="";
  190 + var fgsqx="";
  191 +
  192 + $.get('/user/companyData', function(result){
  193 + obj = result;
  194 + var options = '<option value="">请选择</option>';
  195 + for(var i = 0; i < obj.length; i++){
  196 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  197 + setFgsqx(obj[i].companyCode);
  198 + gsqx +=obj[i].companyCode+",";
  199 + }
  200 + $('#jyryListGsdmId').html(options);
  201 + updateCompany();
  202 + });
  203 + function setFgsqx(gs){
  204 + var company =gs
  205 + var options = '';
  206 + for(var i = 0; i < obj.length; i++){
  207 + if(obj[i].companyCode == company){
  208 + var children = obj[i].children;
  209 + for(var j = 0; j < children.length; j++){
  210 + fgsqx +=children[j].code+",";
  211 + }
  212 + }
  213 + }
  214 + }
  215 + $("#jyryListGsdmId").on("change",updateCompany);
  216 + function updateCompany(){
  217 + var company = $('#jyryListGsdmId').val();
  218 + var options = '<option value="">请选择</option>';
  219 + for(var i = 0; i < obj.length; i++){
  220 + if(obj[i].companyCode == company){
  221 + var children = obj[i].children;
  222 + for(var j = 0; j < children.length; j++){
  223 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  224 + }
  225 + }
  226 + }
  227 + $('#jyryListFgsdmId').html(options);
  228 + }
  229 +
  230 +
185 //提交 231 //提交
186 $('tr.filter .filter-submit').on('click', function(){ 232 $('tr.filter .filter-submit').on('click', function(){
187 if($("#yyrq").val()!=""){ 233 if($("#yyrq").val()!=""){
@@ -216,7 +262,29 @@ $(function(){ @@ -216,7 +262,29 @@ $(function(){
216 params['order'] = 'nbbm'; 262 params['order'] = 'nbbm';
217 params['page'] = page; 263 params['page'] = page;
218 params['yyrq']=$("#yyrq").val(); 264 params['yyrq']=$("#yyrq").val();
219 - var i = layer.load(2); 265 +// var i = layer.load(2);
  266 +
  267 + var i = 2;
  268 + /* var jyryGsdm=$("#jyryListGsdmId").val();
  269 + var jyryFgsdm=$("#jyryListFgsdmId").val();
  270 + if(jyryGsdm=="" || jyryGsdm==null){
  271 + params['gsdm_in']=gsqx;
  272 + params['fgsdm_in']=fgsqx;
  273 + }else{
  274 + if(jyryFgsdm==''||jyryFgsdm==null){
  275 + var fgsqx1='';
  276 + for(var i = 0; i < obj.length; i++){
  277 + if(obj[i].companyCode == jyryGsdm){
  278 + var children = obj[i].children;
  279 + for(var j = 0; j < children.length; j++){
  280 + fgsqx1 +=children[j].code+",";
  281 + }
  282 + }
  283 + }
  284 + params['fgsdm_in']=fgsqx1;
  285 + }
  286 + } */
  287 +
220 $get('/ylxxb/pagequery' ,params, function(data){ 288 $get('/ylxxb/pagequery' ,params, function(data){
221 $.each(data.dataList, function(i, obj) { 289 $.each(data.dataList, function(i, obj) {
222 obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD"); 290 obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD");
src/main/resources/static/pages/oil/cylAdd.html
@@ -25,6 +25,20 @@ @@ -25,6 +25,20 @@
25 您的输入有误,请检查下面的输入项 25 您的输入有误,请检查下面的输入项
26 </div> 26 </div>
27 <div class="form-body"> 27 <div class="form-body">
  28 + <div class="form-group" id="gsdmDivId">
  29 + <label class="col-md-3 control-label">公司</label>
  30 + <div class="col-md-4">
  31 + <select class="form-control" name="gsdm" id="gsdm" ></select>
  32 + <span class="help-block"> 公司</span>
  33 + </div>
  34 + </div>
  35 + <div class="form-group" id="fgsdmDivId">
  36 + <label class="col-md-3 control-label">分公司</label>
  37 + <div class="col-md-4">
  38 + <select class="form-control" name="fgsdm" id="fgsdm" ></select>
  39 + <span class="help-block"> 分公司</span>
  40 + </div>
  41 + </div>
28 <div class="form-group"> 42 <div class="form-group">
29 <label class="col-md-3 control-label">内部编号</label> 43 <label class="col-md-3 control-label">内部编号</label>
30 <div class="col-md-4"> 44 <div class="col-md-4">
@@ -63,11 +77,64 @@ @@ -63,11 +77,64 @@
63 var form = $('#cyl_add_form'); 77 var form = $('#cyl_add_form');
64 var error = $('.alert-danger', form); 78 var error = $('.alert-danger', form);
65 79
  80 + var obj = [];
  81 + $.get('/user/companyData', function(result){
  82 + obj = result;
  83 + var options = '';
  84 + for(var i = 0; i < obj.length; i++){
  85 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  86 + }
  87 +
  88 + if(obj.length ==0){
  89 + $("#gsdmDivId").css('display','none');
  90 + $('#fgsdmDivId').css('display','none');
  91 + }else if(obj.length ==1){
  92 + $("#gsdmDivId").css('display','none');
  93 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  94 + $('#fgsdmDivId').css('display','none');
  95 + }
  96 + $('#gsdm').html(options);
  97 + updateCompany();
  98 + });
  99 +
  100 + $("#gsdm").on("change",updateCompany);
  101 + function updateCompany(){
  102 + var company = $('#gsdm').val();
  103 + var options = '';
  104 + for(var i = 0; i < obj.length; i++){
  105 + if(obj[i].companyCode == company){
  106 + var children = obj[i].children;
  107 + for(var j = 0; j < children.length; j++){
  108 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  109 + }
  110 + }
  111 + }
  112 + $('#fgsdm').html(options);
  113 + }
  114 +
  115 +
66 //表单 validate 116 //表单 validate
67 form.validate({ 117 form.validate({
68 errorElement : 'span', 118 errorElement : 'span',
69 errorClass : 'help-block help-block-error', 119 errorClass : 'help-block help-block-error',
70 focusInvalid : false, 120 focusInvalid : false,
  121 + rules : {
  122 + 'nbbm' : {
  123 + minlength : 2,
  124 + required : true,
  125 + maxlength : 10
  126 + },
  127 + 'cyl' : {
  128 + number:true,
  129 + required : true,
  130 + min:0
  131 + },
  132 + 'cxrl' : {
  133 + number:true,
  134 + required : true,
  135 + min:0
  136 + }
  137 + },
71 invalidHandler : function(event, validator) { 138 invalidHandler : function(event, validator) {
72 error.show(); 139 error.show();
73 App.scrollTo(error, -200); 140 App.scrollTo(error, -200);
@@ -88,7 +155,7 @@ @@ -88,7 +155,7 @@
88 submitHandler : function(f) { 155 submitHandler : function(f) {
89 var params = form.serializeJSON(); 156 var params = form.serializeJSON();
90 error.hide(); 157 error.hide();
91 - //检查一下用户是否存在 158 + //检查一下车辆是否存在
92 $get('/cyl/all', {nbbm_eq: params.nbbm}, function(list){ 159 $get('/cyl/all', {nbbm_eq: params.nbbm}, function(list){
93 if(!list || list.length == 0){ 160 if(!list || list.length == 0){
94 console.log(params); 161 console.log(params);
src/main/resources/static/pages/oil/cylList.html
@@ -55,16 +55,20 @@ @@ -55,16 +55,20 @@
55 <tr role="row" class="heading"> 55 <tr role="row" class="heading">
56 <th width="3%">#</th> 56 <th width="3%">#</th>
57 <th width="15%">公司</th> 57 <th width="15%">公司</th>
58 - <th width="15%">车辆编码</th>  
59 - <th width="15%">油箱存油</th>  
60 - <th width="15%">车辆容量</th> 58 + <th width="15%">分公司</th>
  59 + <th width="14%">车辆编码</th>
  60 + <th width="8%">油箱存油</th>
  61 + <th width="8%">车辆容量</th>
61 <th width="18%">最后更新时间</th> 62 <th width="18%">最后更新时间</th>
62 <th width="19%">操作</th> 63 <th width="19%">操作</th>
63 </tr> 64 </tr>
64 <tr role="row" class="filter"> 65 <tr role="row" class="filter">
65 <td></td> 66 <td></td>
66 <td> 67 <td>
67 - <input type="text" class="form-control form-filter input-sm" name="gsdm_like"> 68 + <select class="form-control" name="gsdm_like" id="cylListGsdmId" ></select>
  69 + </td>
  70 + <td>
  71 + <select class="form-control" name="fgsdm_like" id="cylListFgsdmId" ></select>
68 </td> 72 </td>
69 <td> 73 <td>
70 <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> 74 <input type="text" class="form-control form-filter input-sm" name="nbbm_like">
@@ -100,7 +104,10 @@ @@ -100,7 +104,10 @@
100 <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}"> 104 <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}">
101 </td> 105 </td>
102 <td> 106 <td>
103 - {{obj.gsdm}} 107 + {{obj.gsname}}
  108 + </td>
  109 + <td>
  110 + {{obj.fgsname}}
104 </td> 111 </td>
105 <td> 112 <td>
106 {{obj.nbbm}} 113 {{obj.nbbm}}
@@ -115,7 +122,7 @@ @@ -115,7 +122,7 @@
115 {{obj.updatetime}} 122 {{obj.updatetime}}
116 </td> 123 </td>
117 <td> 124 <td>
118 - <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a> 125 + <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>-->
119 </td> 126 </td>
120 </tr> 127 </tr>
121 {{/each}} 128 {{/each}}
@@ -134,8 +141,50 @@ $(function(){ @@ -134,8 +141,50 @@ $(function(){
134 increaseArea: '20%' 141 increaseArea: '20%'
135 } 142 }
136 143
137 - jsDoQuery(null,true); 144 + var gsqx="";
  145 + var fgsqx="";
138 146
  147 + $.get('/user/companyData', function(result){
  148 + obj = result;
  149 + var options = '<option value="">请选择</option>';
  150 + for(var i = 0; i < obj.length; i++){
  151 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  152 + setFgsqx(obj[i].companyCode);
  153 + gsqx +=obj[i].companyCode+",";
  154 + }
  155 + $('#cylListGsdmId').html(options);
  156 + updateCompany();
  157 + jsDoQuery(null,true);
  158 + });
  159 +
  160 + function setFgsqx(gs){
  161 + var company =gs
  162 + var options = '';
  163 + for(var i = 0; i < obj.length; i++){
  164 + if(obj[i].companyCode == company){
  165 + var children = obj[i].children;
  166 + for(var j = 0; j < children.length; j++){
  167 + fgsqx +=children[j].code+",";
  168 + }
  169 + }
  170 + }
  171 + }
  172 +
  173 + $("#cylListGsdmId").on("change",updateCompany);
  174 + function updateCompany(){
  175 + var company = $('#cylListGsdmId').val();
  176 + var options = '<option value="">请选择</option>';
  177 + for(var i = 0; i < obj.length; i++){
  178 + if(obj[i].companyCode == company){
  179 + var children = obj[i].children;
  180 + for(var j = 0; j < children.length; j++){
  181 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  182 + }
  183 + }
  184 + }
  185 + $('#cylListFgsdmId').html(options);
  186 + }
  187 +
139 //重置 188 //重置
140 $('tr.filter .filter-cancel').on('click', function(){ 189 $('tr.filter .filter-cancel').on('click', function(){
141 $('tr.filter input, select').val('').change(); 190 $('tr.filter input, select').val('').change();
@@ -160,6 +209,8 @@ $(function(){ @@ -160,6 +209,8 @@ $(function(){
160 jsDoQuery(params, true); 209 jsDoQuery(params, true);
161 }); 210 });
162 211
  212 +
  213 +
163 /* 214 /*
164 * 获取数据 p: 要提交的参数, pagination: 是否重新分页 215 * 获取数据 p: 要提交的参数, pagination: 是否重新分页
165 */ 216 */
@@ -170,7 +221,27 @@ $(function(){ @@ -170,7 +221,27 @@ $(function(){
170 //更新时间排序 221 //更新时间排序
171 params['order'] = 'nbbm'; 222 params['order'] = 'nbbm';
172 params['page'] = page; 223 params['page'] = page;
173 - var i = layer.load(2); 224 + var i = 2;
  225 + var cylGsdm=$("#cylListGsdmId").val();
  226 + var cylFgsdm=$("#cylListFgsdmId").val();
  227 + if(cylGsdm==''|| cylGsdm==null){
  228 + params['gsdm_in']=gsqx;
  229 + params['fgsdm_in']=fgsqx;
  230 + }else{
  231 + if(cylFgsdm==''||cylFgsdm==null){
  232 + var fgsqx1='';
  233 + for(var i = 0; i < obj.length; i++){
  234 + if(obj[i].companyCode == cylGsdm){
  235 + var children = obj[i].children;
  236 + for(var j = 0; j < children.length; j++){
  237 + fgsqx1 +=children[j].code+",";
  238 + }
  239 + }
  240 + }
  241 + params['fgsdm_in']=fgsqx1;
  242 + }
  243 + }
  244 + console.log(params);
174 $get('/cyl' ,params, function(data){ 245 $get('/cyl' ,params, function(data){
175 $.each(data.content, function(i, obj) { 246 $.each(data.content, function(i, obj) {
176 obj.updatetime = moment(obj.updatetime).format("YYYY-MM-DD"); 247 obj.updatetime = moment(obj.updatetime).format("YYYY-MM-DD");
@@ -219,7 +290,19 @@ $(function(){ @@ -219,7 +290,19 @@ $(function(){
219 return; 290 return;
220 } 291 }
221 page = num - 1; 292 page = num - 1;
222 - jsDoQuery(null, false); 293 + var cells = $('tr.filter')[0].cells
  294 + ,params = {}
  295 + ,name;
  296 + $.each(cells, function(i, cell){
  297 + var items = $('input,select', cell);
  298 + for(var j = 0, item; item = items[j++];){
  299 + name = $(item).attr('name');
  300 + if(name){
  301 + params[name] = $(item).val();
  302 + }
  303 + }
  304 + });
  305 + jsDoQuery(params, false);
223 } 306 }
224 }); 307 });
225 } 308 }
src/main/resources/static/pages/oil/jyglList.html
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 class="caption-subject font-dark sbold uppercase">场外加油管理</span> 22 class="caption-subject font-dark sbold uppercase">场外加油管理</span>
23 </div> 23 </div>
24 <div class="actions"> 24 <div class="actions">
25 - <a class="btn btn-circle blue" href="cylAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> 25 +<!-- <a class="btn btn-circle blue" href="cylAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> -->
26 <button type="button" class="btn btn-circle blue" id="saveButton"><i class="fa fa-minus-square"></i> 保存</button> 26 <button type="button" class="btn btn-circle blue" id="saveButton"><i class="fa fa-minus-square"></i> 保存</button>
27 <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> --> 27 <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> -->
28 <!-- <div class="btn-group"> 28 <!-- <div class="btn-group">
@@ -56,18 +56,19 @@ @@ -56,18 +56,19 @@
56 id="datatable_cwjy"> 56 id="datatable_cwjy">
57 <thead> 57 <thead>
58 <tr role="row" class="heading"> 58 <tr role="row" class="heading">
59 - <th width="3%">#</th> 59 + <th width="2%">#</th>
60 <th width="10%">日期</th> 60 <th width="10%">日期</th>
61 - <th width="6%">公司</th>  
62 - <th width="6%">车辆</th>  
63 - <th width="12%">驾驶员</th>  
64 - <th width="5%">加注量</th>  
65 - <th width="5%">加油站</th>  
66 - <th width="5%">加油类型</th> 61 + <th width="10%">公司</th>
  62 + <th width="10%">分公司</th>
  63 + <th width="8%">车辆</th>
  64 + <th width="8%">驾驶员</th>
  65 + <th width="3%">加注量</th>
  66 + <th width="3%">加油站</th>
  67 + <th width="3%">加油类型</th>
67 <th width="5%">加油工工号</th> 68 <th width="5%">加油工工号</th>
68 - <th width="5%">油价</th>  
69 - <th width="6%">路单工号</th>  
70 - <th width="5%">备注</th> 69 + <th width="3%">油价</th>
  70 + <th width="4%">路单工号</th>
  71 + <th width="4%">备注</th>
71 <th width="19%">操作</th> 72 <th width="19%">操作</th>
72 </tr> 73 </tr>
73 <tr role="row" class="filter"> 74 <tr role="row" class="filter">
@@ -76,10 +77,13 @@ @@ -76,10 +77,13 @@
76 <input type="text" id="rq" class="form-control form-filter input-sm" name="rq"> 77 <input type="text" id="rq" class="form-control form-filter input-sm" name="rq">
77 </td> 78 </td>
78 <td> 79 <td>
79 - <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> 80 + <select class="form-control" name="gsdm_like" id="jyglListGsdmId" ></select>
80 </td> 81 </td>
81 <td> 82 <td>
82 - <input type="hidden" class="form-control form-filter input-sm" name="nbbh" id="nbbh"> 83 + <select class="form-control" name="fgsdm_like" id="jyglListFgsdmId" ></select>
  84 + </td>
  85 + <td>
  86 + <input type="text" class="form-control form-filter input-sm" name="nbbh" id="nbbh">
83 </td> 87 </td>
84 <td></td> 88 <td></td>
85 <td></td> 89 <td></td>
@@ -117,7 +121,10 @@ @@ -117,7 +121,10 @@
117 </td> 121 </td>
118 <td>{{obj.yyrq}}</td> 122 <td>{{obj.yyrq}}</td>
119 <td> 123 <td>
120 - {{obj.gsdm}} 124 + {{obj.gsname}}
  125 + </td>
  126 + <td>
  127 + {{obj.fgsname}}
121 </td> 128 </td>
122 <td> 129 <td>
123 {{obj.nbbm}} 130 {{obj.nbbm}}
@@ -162,7 +169,22 @@ $(function(){ @@ -162,7 +169,22 @@ $(function(){
162 params['jsy']=jsy; 169 params['jsy']=jsy;
163 params['id']=id; 170 params['id']=id;
164 $get('/ylxxb/check', params, function(){ 171 $get('/ylxxb/check', params, function(){
165 - jsDoQuery(null,true); 172 + if($("#rq").val()!=""){
  173 + var cells = $('tr.filter')[0].cells
  174 + ,params = {}
  175 + ,name;
  176 + $.each(cells, function(i, cell){
  177 + var items = $('input,select', cell);
  178 + for(var j = 0, item; item = items[j++];){
  179 + name = $(item).attr('name');
  180 + if(name){
  181 + params[name] = $(item).val();
  182 + }
  183 + }
  184 + });
  185 + jsDoQuery(params,true);
  186 + }
  187 +
166 }); 188 });
167 } 189 }
168 }) 190 })
@@ -176,15 +198,68 @@ $(function(){ @@ -176,15 +198,68 @@ $(function(){
176 radioClass: 'iradio_square-blue icheck', 198 radioClass: 'iradio_square-blue icheck',
177 increaseArea: '20%' 199 increaseArea: '20%'
178 } 200 }
179 - if($("#rq").val()!=""){  
180 - jsDoQuery(null,true);  
181 - } 201 +
182 //重置 202 //重置
183 $('tr.filter .filter-cancel').on('click', function(){ 203 $('tr.filter .filter-cancel').on('click', function(){
184 $('tr.filter input, select').val('').change(); 204 $('tr.filter input, select').val('').change();
185 - jsDoQuery(null, true); 205 + if($("#rq").val()!=""){
  206 + var cells = $('tr.filter')[0].cells
  207 + ,params = {}
  208 + ,name;
  209 + $.each(cells, function(i, cell){
  210 + var items = $('input,select', cell);
  211 + for(var j = 0, item; item = items[j++];){
  212 + name = $(item).attr('name');
  213 + if(name){
  214 + params[name] = $(item).val();
  215 + }
  216 + }
  217 + });
  218 + jsDoQuery(params, true);
  219 + }
186 }); 220 });
187 221
  222 +
  223 + var gsqx="";
  224 + var fgsqx="";
  225 +
  226 + $.get('/user/companyData', function(result){
  227 + obj = result;
  228 + var options = '<option value="">请选择</option>';
  229 + for(var i = 0; i < obj.length; i++){
  230 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  231 + setFgsqx(obj[i].companyCode);
  232 + gsqx +=obj[i].companyCode+",";
  233 + }
  234 + $('#jyglListGsdmId').html(options);
  235 + updateCompany();
  236 + });
  237 + function setFgsqx(gs){
  238 + var company =gs
  239 + var options = '';
  240 + for(var i = 0; i < obj.length; i++){
  241 + if(obj[i].companyCode == company){
  242 + var children = obj[i].children;
  243 + for(var j = 0; j < children.length; j++){
  244 + fgsqx +=children[j].code+",";
  245 + }
  246 + }
  247 + }
  248 + }
  249 + $("#jyglListGsdmId").on("change",updateCompany);
  250 + function updateCompany(){
  251 + var company = $('#jyglListGsdmId').val();
  252 + var options = '<option value="">请选择</option>';
  253 + for(var i = 0; i < obj.length; i++){
  254 + if(obj[i].companyCode == company){
  255 + var children = obj[i].children;
  256 + for(var j = 0; j < children.length; j++){
  257 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  258 + }
  259 + }
  260 + }
  261 + $('#jyglListFgsdmId').html(options);
  262 + }
188 //提交 263 //提交
189 $('tr.filter .filter-submit').on('click', function(){ 264 $('tr.filter .filter-submit').on('click', function(){
190 if($("#rq").val()!=""){ 265 if($("#rq").val()!=""){
@@ -219,10 +294,30 @@ $(function(){ @@ -219,10 +294,30 @@ $(function(){
219 params['order'] = 'nbbm'; 294 params['order'] = 'nbbm';
220 params['page'] = page; 295 params['page'] = page;
221 params['rq']=$("#rq").val(); 296 params['rq']=$("#rq").val();
222 - var i = layer.load(2); 297 +
  298 + var i = 2;
  299 + var jyglGsdm=$("#jyglListGsdmId").val();
  300 + var jyglFgsdm=$("#jyglListFgsdmId").val();
  301 + if(jyglGsdm=="" || jyglGsdm==null){
  302 + params['gsdm_in']=gsqx;
  303 + params['fgsdm_in']=fgsqx;
  304 + }else{
  305 + if(jyglFgsdm==''||jyglFgsdm==null){
  306 + var fgsqx1='';
  307 + for(var i = 0; i < obj.length; i++){
  308 + if(obj[i].companyCode == jyglGsdm){
  309 + var children = obj[i].children;
  310 + for(var j = 0; j < children.length; j++){
  311 + fgsqx1 +=children[j].code+",";
  312 + }
  313 + }
  314 + }
  315 + params['fgsdm_in']=fgsqx1;
  316 + }
  317 + }
223 $get('/cwjy/pagequery' ,params, function(data){ 318 $get('/cwjy/pagequery' ,params, function(data){
224 $.each(data.dataList, function(i, obj) { 319 $.each(data.dataList, function(i, obj) {
225 - obj.yyrq = moment(obj.yyrq).format("YYYY-MM-DD"); 320 + obj.yyrq = $("#rq").val();
226 }); 321 });
227 var bodyHtm = template('jygl_list_temp', {list: data.dataList}); 322 var bodyHtm = template('jygl_list_temp', {list: data.dataList});
228 $('#datatable_cwjy tbody').html(bodyHtm) 323 $('#datatable_cwjy tbody').html(bodyHtm)
@@ -273,9 +368,11 @@ $(function(){ @@ -273,9 +368,11 @@ $(function(){
273 return; 368 return;
274 } 369 }
275 page = num - 1; 370 page = num - 1;
276 - jsDoQuery(null, false); 371 +
  372 + jsDoQuery(null, false);
277 } 373 }
278 }); 374 });
  375 +
279 } 376 }
280 377
281 378
src/main/resources/static/pages/oil/jyszAdd.html
@@ -17,15 +17,18 @@ @@ -17,15 +17,18 @@
17 您的输入有误,请检查下面的输入项 17 您的输入有误,请检查下面的输入项
18 </div> 18 </div>
19 <div class="form-body"> 19 <div class="form-body">
20 - <div class="form-group"> 20 + <div class="form-group" id="gsdmDivId">
21 <label class="col-md-3 control-label">公司</label> 21 <label class="col-md-3 control-label">公司</label>
22 - <div class="col-md-9">  
23 - <select class="form-control input-medium " name="gsdm">  
24 - <option value="22">金高公交</option>  
25 - <option value="05">杨高公交</option>  
26 - <option value="55">上南公交</option>  
27 - <option value="26">南汇公交</option>  
28 - </select> 22 + <div class="col-md-4">
  23 + <select class="form-control" name="gsdm" id="gsdm" ></select>
  24 + <span class="help-block"> 公司</span>
  25 + </div>
  26 + </div>
  27 + <div class="form-group" id="fgsdmDivId">
  28 + <label class="col-md-3 control-label">分公司</label>
  29 + <div class="col-md-4">
  30 + <select class="form-control" name="fgsdm" id="fgsdm" ></select>
  31 + <span class="help-block"> 分公司</span>
29 </div> 32 </div>
30 </div> 33 </div>
31 <div class="form-group"> 34 <div class="form-group">
@@ -51,7 +54,41 @@ $(function(){ @@ -51,7 +54,41 @@ $(function(){
51 54
52 var form = $('#jysz_add_form'); 55 var form = $('#jysz_add_form');
53 var error = $('.alert-danger', form); 56 var error = $('.alert-danger', form);
54 - 57 + var obj = [];
  58 + $.get('/user/companyData', function(result){
  59 + obj = result;
  60 + var options = '';
  61 + for(var i = 0; i < obj.length; i++){
  62 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  63 + }
  64 +
  65 + if(obj.length ==0){
  66 + $("#gsdmDivId").css('display','none');
  67 + $('#fgsdmDivId').css('display','none');
  68 + }else if(obj.length ==1){
  69 + $("#gsdmDivId").css('display','none');
  70 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  71 + $('#fgsdmDivId').css('display','none');
  72 + }
  73 + $('#gsdm').html(options);
  74 + updateCompany();
  75 + });
  76 +
  77 + $("#gsdm").on("change",updateCompany);
  78 + function updateCompany(){
  79 + var company = $('#gsdm').val();
  80 + var options = '';
  81 + for(var i = 0; i < obj.length; i++){
  82 + if(obj[i].companyCode == company){
  83 + var children = obj[i].children;
  84 + for(var j = 0; j < children.length; j++){
  85 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  86 + }
  87 + }
  88 + }
  89 + $('#fgsdm').html(options);
  90 + }
  91 +
55 //提交 92 //提交
56 $('#addJyszModuleButton').on('click', function() { 93 $('#addJyszModuleButton').on('click', function() {
57 form.submit(); 94 form.submit();
@@ -95,6 +132,11 @@ $(function(){ @@ -95,6 +132,11 @@ $(function(){
95 }); 132 });
96 } 133 }
97 }); 134 });
  135 +
  136 + function refreshJsTree(){
  137 + var pjaxContainer = '#monde-page';
  138 + $.pjax({url: "/pages/oil/jyszList.html", container: pjaxContainer})
  139 + }
98 /* $('#nbbm').select2({ 140 /* $('#nbbm').select2({
99 placeholder: '搜索车辆...', 141 placeholder: '搜索车辆...',
100 ajax: { 142 ajax: {
src/main/resources/static/pages/oil/jyszList.html
@@ -57,8 +57,9 @@ @@ -57,8 +57,9 @@
57 <thead> 57 <thead>
58 <tr role="row" class="heading"> 58 <tr role="row" class="heading">
59 <th width="3%">#</th> 59 <th width="3%">#</th>
60 - <th width="18%">公司</th>  
61 - <th width="20%">车辆</th> 60 + <th width="15%">公司</th>
  61 + <th width="13%">分公司</th>
  62 + <th width="10%">车辆</th>
62 <th width="10%">修改人</th> 63 <th width="10%">修改人</th>
63 <th width="20%">日期</th> 64 <th width="20%">日期</th>
64 <th width="19%">操作</th> 65 <th width="19%">操作</th>
@@ -66,7 +67,10 @@ @@ -66,7 +67,10 @@
66 <tr role="row" class="filter"> 67 <tr role="row" class="filter">
67 <td></td> 68 <td></td>
68 <td> 69 <td>
69 - <input type="text" class="form-control form-filter input-sm" name="gsdm_like"> 70 + <select class="form-control" name="gsdm_like" id="jyszListGsdmId" ></select>
  71 + </td>
  72 + <td>
  73 + <select class="form-control" name="fgsdm_like" id="jyszListFgsdmId" ></select>
70 </td> 74 </td>
71 <td> 75 <td>
72 <input type="text" class="form-control form-filter input-sm" name="nbbm_like"> 76 <input type="text" class="form-control form-filter input-sm" name="nbbm_like">
@@ -100,7 +104,8 @@ @@ -100,7 +104,8 @@
100 <td style="vertical-align: middle;"> 104 <td style="vertical-align: middle;">
101 <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}"> 105 <input type="checkbox" class="group-checkable icheck" data-id="{{obj.id}}">
102 </td> 106 </td>
103 - <td>{{obj.gsdm}}</td> 107 + <td>{{obj.gsname}}</td>
  108 + <td>{{obj.fgsname}}</td>
104 <td>{{obj.nbbm}}</td> 109 <td>{{obj.nbbm}}</td>
105 <td>{{obj.xgr}}</td> 110 <td>{{obj.xgr}}</td>
106 <td>{{obj.createDate}}</td> 111 <td>{{obj.createDate}}</td>
@@ -122,8 +127,48 @@ $(function(){ @@ -122,8 +127,48 @@ $(function(){
122 checkboxClass: 'icheckbox_flat-blue', 127 checkboxClass: 'icheckbox_flat-blue',
123 increaseArea: '20%' 128 increaseArea: '20%'
124 } 129 }
  130 + var gsqx="";
  131 + var fgsqx="";
  132 + $.get('/user/companyData', function(result){
  133 + obj = result;
  134 + var options = '<option value="">请选择</option>';
  135 + for(var i = 0; i < obj.length; i++){
  136 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  137 + setFgsqx(obj[i].companyCode);
  138 + gsqx +=obj[i].companyCode+",";
  139 + }
  140 + $('#jyszListGsdmId').html(options);
  141 + updateCompany();
  142 + jsDoQuery(null,true);
  143 + });
  144 +
  145 + function setFgsqx(gs){
  146 + var company =gs
  147 + for(var i = 0; i < obj.length; i++){
  148 + if(obj[i].companyCode == company){
  149 + var children = obj[i].children;
  150 + for(var j = 0; j < children.length; j++){
  151 + fgsqx +=children[j].code+",";
  152 + }
  153 + }
  154 + }
  155 + }
  156 + $("#jyszListGsdmId").on("change",updateCompany);
  157 + function updateCompany(){
  158 + var company = $('#jyszListGsdmId').val();
  159 + var options = '';
  160 + for(var i = 0; i < obj.length; i++){
  161 + if(obj[i].companyCode == company){
  162 + var children = obj[i].children;
  163 + options += '<option value="">请选择</option>';
  164 + for(var j = 0; j < children.length; j++){
  165 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  166 + }
  167 + }
  168 + }
  169 + $('#jyszListFgsdmId').html(options);
  170 + }
125 171
126 - jsDoQuery(null,true);  
127 172
128 //重置 173 //重置
129 $('tr.filter .filter-cancel').on('click', function(){ 174 $('tr.filter .filter-cancel').on('click', function(){
@@ -153,6 +198,7 @@ $(function(){ @@ -153,6 +198,7 @@ $(function(){
153 * 获取数据 p: 要提交的参数, pagination: 是否重新分页 198 * 获取数据 p: 要提交的参数, pagination: 是否重新分页
154 */ 199 */
155 function jsDoQuery(p, pagination){ 200 function jsDoQuery(p, pagination){
  201 +
156 var params = {}; 202 var params = {};
157 if(p) 203 if(p)
158 params = p; 204 params = p;
@@ -160,6 +206,25 @@ $(function(){ @@ -160,6 +206,25 @@ $(function(){
160 params['order'] = 'nbbm'; 206 params['order'] = 'nbbm';
161 params['page'] = page; 207 params['page'] = page;
162 var i = layer.load(2); 208 var i = layer.load(2);
  209 + var jyszGsdm=$("#jyszListGsdmId").val();
  210 + var jyszFgsdm=$("#jyszListFgsdmId").val();
  211 + if(jyszGsdm==''|| jyszGsdm==null){
  212 + params['gsdm_in']=gsqx;
  213 + params['fgsdm_in']=fgsqx;
  214 + }else{
  215 + if(jyszFgsdm==''||jyszFgsdm==null){
  216 + var fgsqx1='';
  217 + for(var i = 0; i < obj.length; i++){
  218 + if(obj[i].companyCode == jyszGsdm){
  219 + var children = obj[i].children;
  220 + for(var j = 0; j < children.length; j++){
  221 + fgsqx1 +=children[j].code+",";
  222 + }
  223 + }
  224 + }
  225 + params['fgsdm_in']=fgsqx1;
  226 + }
  227 + }
163 $get('/cwjy' ,params, function(data){ 228 $get('/cwjy' ,params, function(data){
164 $.each(data.content, function(i, obj) { 229 $.each(data.content, function(i, obj) {
165 obj.createDate = moment(obj.createDate).format("YYYY-MM-DD"); 230 obj.createDate = moment(obj.createDate).format("YYYY-MM-DD");
@@ -208,7 +273,19 @@ $(function(){ @@ -208,7 +273,19 @@ $(function(){
208 return; 273 return;
209 } 274 }
210 page = num - 1; 275 page = num - 1;
211 - jsDoQuery(null, false); 276 + var cells = $('tr.filter')[0].cells
  277 + ,params = {}
  278 + ,name;
  279 + $.each(cells, function(i, cell){
  280 + var items = $('input,select', cell);
  281 + for(var j = 0, item; item = items[j++];){
  282 + name = $(item).attr('name');
  283 + if(name){
  284 + params[name] = $(item).val();
  285 + }
  286 + }
  287 + });
  288 + jsDoQuery(params, false);
212 } 289 }
213 }); 290 });
214 } 291 }
@@ -230,19 +307,10 @@ $(function(){ @@ -230,19 +307,10 @@ $(function(){
230 $('#addJysz').on('click', function(){ 307 $('#addJysz').on('click', function(){
231 $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);}); 308 $.get('jyszAdd.html', function(m){$(pjaxContainer).append(m);});
232 }); 309 });
  310 +
  311 +
233 }); 312 });
234 313
235 -function refreshJsTree(){  
236 - var pjaxContainer = '#monde-page';  
237 - $.pjax({url: "/pages/oil/jyszList.html", container: pjaxContainer})  
238 -}  
239 -//改变状态  
240 -function changeEnabled(id,enabled){  
241 - debugger  
242 - $get('/user/changeEnabled',{id:id,enabled:enabled},function(result){  
243 - jsDoQuery(null, true);  
244 - })  
245 -}  
246 314
247 315
248 </script> 316 </script>
249 \ No newline at end of file 317 \ No newline at end of file
src/main/resources/static/pages/report/timetable/timetable.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_time">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdmTime" style="width: 140px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_time">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdmTime" 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>
@@ -193,7 +201,40 @@ @@ -193,7 +201,40 @@
193 locale : 'zh-cn' 201 locale : 'zh-cn'
194 }); 202 });
195 203
  204 + var obj = [];
  205 + $.get('/user/companyData', function(result){
  206 + obj = result;
  207 + var options = '';
  208 + for(var i = 0; i < obj.length; i++){
  209 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  210 + }
  211 +
  212 + if(obj.length ==0){
  213 + $("#gsdmDiv_time").css('display','none');
  214 + $('#fgsdmDiv_time').css('display','none');
  215 + }else if(obj.length ==1){
  216 + $("#gsdmDiv_time").css('display','none');
  217 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  218 + $('#fgsdmDiv_time').css('display','none');
  219 + }
  220 + $('#gsdmTime').html(options);
  221 + updateCompany();
  222 + });
196 223
  224 + $("#gsdmTime").on("change",updateCompany);
  225 + function updateCompany(){
  226 + var company = $('#gsdmTime').val();
  227 + var options = '';
  228 + for(var i = 0; i < obj.length; i++){
  229 + if(obj[i].companyCode == company){
  230 + var children = obj[i].children;
  231 + for(var j = 0; j < children.length; j++){
  232 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  233 + }
  234 + }
  235 + }
  236 + $('#fgsdmTime').html(options);
  237 + }
197 238
198 $.get('/basic/lineCode2Name',function(result){ 239 $.get('/basic/lineCode2Name',function(result){
199 var data=[]; 240 var data=[];
@@ -206,6 +247,8 @@ @@ -206,6 +247,8 @@
206 }) 247 })
207 //查询 248 //查询
208 $("#query").on('click',function(){ 249 $("#query").on('click',function(){
  250 + console.log($("#gsdmTime").val());
  251 + console.log($("#fgsdmTime").val());
209 var line = $("#line").val(); 252 var line = $("#line").val();
210 var xlName = $("#select2-line-container").html(); 253 var xlName = $("#select2-line-container").html();
211 var date = $("#date").val(); 254 var date = $("#date").val();