Commit beca79d53917d3dd246acb371956400a101125a1

Authored by 娄高锋
1 parent de5c458a

报表-统计日报:添加导出全部公司的功能

src/main/java/com/bsth/entity/calc/CalcStatistics.java
1   -package com.bsth.entity.calc;
2   -
3   -import java.util.Date;
4   -
5   -import javax.persistence.*;
6   -
7   -@Entity
8   -@Table(name = "calc_statistics")
9   -public class CalcStatistics {
10   - /* 主键*/
11   - @Id
12   - @GeneratedValue(strategy = GenerationType.IDENTITY)
13   - private Long id;
14   - /* 日期*/
15   - private Date date;
16   - /* 日期字符串*/
17   - private String dateStr;
18   - /* 线路编码*/
19   - private String xl;
20   - /* 线路名称*/
21   - private String xlName;
22   - /* 公司代码*/
23   - private String gsdm;
24   - /* 分公司代码*/
25   - private String fgsdm;
26   - /* 计划总公里*/
27   - private Double jhzlc;
28   - /* 计划营运公里*/
29   - private Double jhyylc;
30   - /* 计划空驶公里*/
31   - private Double jhkslc;
32   - /* 实际总公里*/
33   - private Double sjzlc;
34   - /* 实际营运公里*/
35   - private Double sjyylc;
36   - /* 实际空驶公里*/
37   - private Double sjkslc;
38   - /* 少驶公里*/
39   - private Double sslc;
40   - /* 少驶班次*/
41   - private int ssbc;
42   - /* 路阻公里*/
43   - private Double lzlc;
44   - /* 吊慢公里*/
45   - private Double dmlc;
46   - /* 故障公里*/
47   - private Double gzlc;
48   - /* 纠纷公里*/
49   - private Double jflc;
50   - /* 肇事公里*/
51   - private Double zslc;
52   - /* 缺人公里*/
53   - private Double qrlc;
54   - /* 缺车公里*/
55   - private Double qclc;
56   - /* 客稀公里*/
57   - private Double kxlc;
58   - /* 气候公里*/
59   - private Double qhlc;
60   - /* 援外公里*/
61   - private Double ywlc;
62   - /* 其他公里*/
63   - private Double qtlc;
64   - /* 临加公里*/
65   - private Double ljlc;
66   - /* 临加空驶公里*/
67   - private Double ljkslc;
68   - /* 计划班次*/
69   - private int jhbcq;
70   - /* 计划班次(早高峰)*/
71   - private int jhbcz;
72   - /* 计划班次(晚高峰)*/
73   - private int jhbcw;
74   - /* 实际班次*/
75   - private int sjbcq;
76   - /* 实际班次(早高峰)*/
77   - private int sjbcz;
78   - /* 实际班次(晚高峰)*/
79   - private int sjbcw;
80   - /* 临加班次*/
81   - private int ljbcq;
82   - /* 临加班次(早高峰)*/
83   - private int ljbcz;
84   - /* 临加班次(晚高峰)*/
85   - private int ljbcw;
86   - /* 放站班次*/
87   - private int fzbcq;
88   - /* 放站班次(早高峰)*/
89   - private int fzbcz;
90   - /* 放站班次(晚高峰)*/
91   - private int fzbcw;
92   - /* 调头班次*/
93   - private int dtbcq;
94   - /* 调头班次(早高峰)*/
95   - private int dtbcz;
96   - /* 调头班次(晚高峰)*/
97   - private int dtbcw;
98   - /* 大间隔次数*/
99   - private int djgq;
100   - /* 大间隔次数(早高峰)*/
101   - private int djgz;
102   - /* 大间隔次数(晚高峰)*/
103   - private int djgw;
104   - /* 最大大间隔时间*/
105   - private int djgsj;
106   - /* 备注*/
107   - private String remark;
108   - /*分公司名字*/
109   - @Transient
110   - private String fgsName;
111   - public Long getId() {
112   - return id;
113   - }
114   - public void setId(Long id) {
115   - this.id = id;
116   - }
117   - public Date getDate() {
118   - return date;
119   - }
120   - public void setDate(Date date) {
121   - this.date = date;
122   - }
123   - public String getDateStr() {
124   - return dateStr;
125   - }
126   - public void setDateStr(String dateStr) {
127   - this.dateStr = dateStr;
128   - }
129   - public String getXl() {
130   - return xl;
131   - }
132   - public void setXl(String xl) {
133   - this.xl = xl;
134   - }
135   - public String getXlName() {
136   - return xlName;
137   - }
138   - public void setXlName(String xlName) {
139   - this.xlName = xlName;
140   - }
141   - public String getGsdm() {
142   - return gsdm;
143   - }
144   - public void setGsdm(String gsdm) {
145   - this.gsdm = gsdm;
146   - }
147   - public String getFgsdm() {
148   - return fgsdm;
149   - }
150   - public void setFgsdm(String fgsdm) {
151   - this.fgsdm = fgsdm;
152   - }
153   - public Double getJhzlc() {
154   - return jhzlc;
155   - }
156   - public void setJhzlc(Double jhzlc) {
157   - this.jhzlc = jhzlc;
158   - }
159   - public Double getJhyylc() {
160   - return jhyylc;
161   - }
162   - public void setJhyylc(Double jhyylc) {
163   - this.jhyylc = jhyylc;
164   - }
165   - public Double getJhkslc() {
166   - return jhkslc;
167   - }
168   - public void setJhkslc(Double jhkslc) {
169   - this.jhkslc = jhkslc;
170   - }
171   - public Double getSjzlc() {
172   - return sjzlc;
173   - }
174   - public void setSjzlc(Double sjzlc) {
175   - this.sjzlc = sjzlc;
176   - }
177   - public Double getSjyylc() {
178   - return sjyylc;
179   - }
180   - public void setSjyylc(Double sjyylc) {
181   - this.sjyylc = sjyylc;
182   - }
183   - public Double getSjkslc() {
184   - return sjkslc;
185   - }
186   - public void setSjkslc(Double sjkslc) {
187   - this.sjkslc = sjkslc;
188   - }
189   - public Double getSslc() {
190   - return sslc;
191   - }
192   - public void setSslc(Double sslc) {
193   - this.sslc = sslc;
194   - }
195   - public int getSsbc() {
196   - return ssbc;
197   - }
198   - public void setSsbc(int ssbc) {
199   - this.ssbc = ssbc;
200   - }
201   - public Double getLzlc() {
202   - return lzlc;
203   - }
204   - public void setLzlc(Double lzlc) {
205   - this.lzlc = lzlc;
206   - }
207   - public Double getDmlc() {
208   - return dmlc;
209   - }
210   - public void setDmlc(Double dmlc) {
211   - this.dmlc = dmlc;
212   - }
213   - public Double getGzlc() {
214   - return gzlc;
215   - }
216   - public void setGzlc(Double gzlc) {
217   - this.gzlc = gzlc;
218   - }
219   - public Double getJflc() {
220   - return jflc;
221   - }
222   - public void setJflc(Double jflc) {
223   - this.jflc = jflc;
224   - }
225   - public Double getZslc() {
226   - return zslc;
227   - }
228   - public void setZslc(Double zslc) {
229   - this.zslc = zslc;
230   - }
231   - public Double getQrlc() {
232   - return qrlc;
233   - }
234   - public void setQrlc(Double qrlc) {
235   - this.qrlc = qrlc;
236   - }
237   - public Double getQclc() {
238   - return qclc;
239   - }
240   - public void setQclc(Double qclc) {
241   - this.qclc = qclc;
242   - }
243   - public Double getKxlc() {
244   - return kxlc;
245   - }
246   - public void setKxlc(Double kxlc) {
247   - this.kxlc = kxlc;
248   - }
249   - public Double getQhlc() {
250   - return qhlc;
251   - }
252   - public void setQhlc(Double qhlc) {
253   - this.qhlc = qhlc;
254   - }
255   - public Double getYwlc() {
256   - return ywlc;
257   - }
258   - public void setYwlc(Double ywlc) {
259   - this.ywlc = ywlc;
260   - }
261   - public Double getQtlc() {
262   - return qtlc;
263   - }
264   - public void setQtlc(Double qtlc) {
265   - this.qtlc = qtlc;
266   - }
267   - public Double getLjlc() {
268   - return ljlc;
269   - }
270   - public void setLjlc(Double ljlc) {
271   - this.ljlc = ljlc;
272   - }
273   - public Double getLjkslc() {
274   - return ljkslc;
275   - }
276   - public void setLjkslc(Double ljkslc) {
277   - this.ljkslc = ljkslc;
278   - }
279   - public int getJhbcq() {
280   - return jhbcq;
281   - }
282   - public void setJhbcq(int jhbcq) {
283   - this.jhbcq = jhbcq;
284   - }
285   - public int getJhbcz() {
286   - return jhbcz;
287   - }
288   - public void setJhbcz(int jhbcz) {
289   - this.jhbcz = jhbcz;
290   - }
291   - public int getJhbcw() {
292   - return jhbcw;
293   - }
294   - public void setJhbcw(int jhbcw) {
295   - this.jhbcw = jhbcw;
296   - }
297   - public int getSjbcq() {
298   - return sjbcq;
299   - }
300   - public void setSjbcq(int sjbcq) {
301   - this.sjbcq = sjbcq;
302   - }
303   - public int getSjbcz() {
304   - return sjbcz;
305   - }
306   - public void setSjbcz(int sjbcz) {
307   - this.sjbcz = sjbcz;
308   - }
309   - public int getSjbcw() {
310   - return sjbcw;
311   - }
312   - public void setSjbcw(int sjbcw) {
313   - this.sjbcw = sjbcw;
314   - }
315   - public int getLjbcq() {
316   - return ljbcq;
317   - }
318   - public void setLjbcq(int ljbcq) {
319   - this.ljbcq = ljbcq;
320   - }
321   - public int getLjbcz() {
322   - return ljbcz;
323   - }
324   - public void setLjbcz(int ljbcz) {
325   - this.ljbcz = ljbcz;
326   - }
327   - public int getLjbcw() {
328   - return ljbcw;
329   - }
330   - public void setLjbcw(int ljbcw) {
331   - this.ljbcw = ljbcw;
332   - }
333   - public int getFzbcq() {
334   - return fzbcq;
335   - }
336   - public void setFzbcq(int fzbcq) {
337   - this.fzbcq = fzbcq;
338   - }
339   - public int getFzbcz() {
340   - return fzbcz;
341   - }
342   - public void setFzbcz(int fzbcz) {
343   - this.fzbcz = fzbcz;
344   - }
345   - public int getFzbcw() {
346   - return fzbcw;
347   - }
348   - public void setFzbcw(int fzbcw) {
349   - this.fzbcw = fzbcw;
350   - }
351   - public int getDtbcq() {
352   - return dtbcq;
353   - }
354   - public void setDtbcq(int dtbcq) {
355   - this.dtbcq = dtbcq;
356   - }
357   - public int getDtbcz() {
358   - return dtbcz;
359   - }
360   - public void setDtbcz(int dtbcz) {
361   - this.dtbcz = dtbcz;
362   - }
363   - public int getDtbcw() {
364   - return dtbcw;
365   - }
366   - public void setDtbcw(int dtbcw) {
367   - this.dtbcw = dtbcw;
368   - }
369   - public int getDjgq() {
370   - return djgq;
371   - }
372   - public void setDjgq(int djgq) {
373   - this.djgq = djgq;
374   - }
375   - public int getDjgz() {
376   - return djgz;
377   - }
378   - public void setDjgz(int djgz) {
379   - this.djgz = djgz;
380   - }
381   - public int getDjgw() {
382   - return djgw;
383   - }
384   - public void setDjgw(int djgw) {
385   - this.djgw = djgw;
386   - }
387   - public int getDjgsj() {
388   - return djgsj;
389   - }
390   - public void setDjgsj(int djgsj) {
391   - this.djgsj = djgsj;
392   - }
393   - public String getRemark() {
394   - return remark;
395   - }
396   - public void setRemark(String remark) {
397   - this.remark = remark;
398   - }
399   - public String getFgsName() {
400   - return fgsName;
401   - }
402   - public void setFgsName(String fgsName) {
403   - this.fgsName = fgsName;
404   - }
405   -
406   -}
  1 +package com.bsth.entity.calc;
  2 +
  3 +import java.util.Date;
  4 +
  5 +import javax.persistence.*;
  6 +
  7 +@Entity
  8 +@Table(name = "calc_statistics")
  9 +public class CalcStatistics {
  10 + /* 主键*/
  11 + @Id
  12 + @GeneratedValue(strategy = GenerationType.IDENTITY)
  13 + private Long id;
  14 + /* 日期*/
  15 + private Date date;
  16 + /* 日期字符串*/
  17 + private String dateStr;
  18 + /* 线路编码*/
  19 + private String xl;
  20 + /* 线路名称*/
  21 + private String xlName;
  22 + /* 公司代码*/
  23 + private String gsdm;
  24 + /* 分公司代码*/
  25 + private String fgsdm;
  26 + /* 计划总公里*/
  27 + private Double jhzlc;
  28 + /* 计划营运公里*/
  29 + private Double jhyylc;
  30 + /* 计划空驶公里*/
  31 + private Double jhkslc;
  32 + /* 实际总公里*/
  33 + private Double sjzlc;
  34 + /* 实际营运公里*/
  35 + private Double sjyylc;
  36 + /* 实际空驶公里*/
  37 + private Double sjkslc;
  38 + /* 少驶公里*/
  39 + private Double sslc;
  40 + /* 少驶班次*/
  41 + private int ssbc;
  42 + /* 路阻公里*/
  43 + private Double lzlc;
  44 + /* 吊慢公里*/
  45 + private Double dmlc;
  46 + /* 故障公里*/
  47 + private Double gzlc;
  48 + /* 纠纷公里*/
  49 + private Double jflc;
  50 + /* 肇事公里*/
  51 + private Double zslc;
  52 + /* 缺人公里*/
  53 + private Double qrlc;
  54 + /* 缺车公里*/
  55 + private Double qclc;
  56 + /* 客稀公里*/
  57 + private Double kxlc;
  58 + /* 气候公里*/
  59 + private Double qhlc;
  60 + /* 援外公里*/
  61 + private Double ywlc;
  62 + /* 其他公里*/
  63 + private Double qtlc;
  64 + /* 临加公里*/
  65 + private Double ljlc;
  66 + /* 临加空驶公里*/
  67 + private Double ljkslc;
  68 + /* 计划班次*/
  69 + private int jhbcq;
  70 + /* 计划班次(早高峰)*/
  71 + private int jhbcz;
  72 + /* 计划班次(晚高峰)*/
  73 + private int jhbcw;
  74 + /* 实际班次*/
  75 + private int sjbcq;
  76 + /* 实际班次(早高峰)*/
  77 + private int sjbcz;
  78 + /* 实际班次(晚高峰)*/
  79 + private int sjbcw;
  80 + /* 临加班次*/
  81 + private int ljbcq;
  82 + /* 临加班次(早高峰)*/
  83 + private int ljbcz;
  84 + /* 临加班次(晚高峰)*/
  85 + private int ljbcw;
  86 + /* 放站班次*/
  87 + private int fzbcq;
  88 + /* 放站班次(早高峰)*/
  89 + private int fzbcz;
  90 + /* 放站班次(晚高峰)*/
  91 + private int fzbcw;
  92 + /* 调头班次*/
  93 + private int dtbcq;
  94 + /* 调头班次(早高峰)*/
  95 + private int dtbcz;
  96 + /* 调头班次(晚高峰)*/
  97 + private int dtbcw;
  98 + /* 大间隔次数*/
  99 + private int djgq;
  100 + /* 大间隔次数(早高峰)*/
  101 + private int djgz;
  102 + /* 大间隔次数(晚高峰)*/
  103 + private int djgw;
  104 + /* 最大大间隔时间*/
  105 + private int djgsj;
  106 + /* 备注*/
  107 + private String remark;
  108 +
  109 + /*公司名字*/
  110 + @Transient
  111 + private String gsName;
  112 + /*分公司名字*/
  113 + @Transient
  114 + private String fgsName;
  115 + public Long getId() {
  116 + return id;
  117 + }
  118 + public void setId(Long id) {
  119 + this.id = id;
  120 + }
  121 + public Date getDate() {
  122 + return date;
  123 + }
  124 + public void setDate(Date date) {
  125 + this.date = date;
  126 + }
  127 + public String getDateStr() {
  128 + return dateStr;
  129 + }
  130 + public void setDateStr(String dateStr) {
  131 + this.dateStr = dateStr;
  132 + }
  133 + public String getXl() {
  134 + return xl;
  135 + }
  136 + public void setXl(String xl) {
  137 + this.xl = xl;
  138 + }
  139 + public String getXlName() {
  140 + return xlName;
  141 + }
  142 + public void setXlName(String xlName) {
  143 + this.xlName = xlName;
  144 + }
  145 + public String getGsdm() {
  146 + return gsdm;
  147 + }
  148 + public void setGsdm(String gsdm) {
  149 + this.gsdm = gsdm;
  150 + }
  151 + public String getFgsdm() {
  152 + return fgsdm;
  153 + }
  154 + public void setFgsdm(String fgsdm) {
  155 + this.fgsdm = fgsdm;
  156 + }
  157 + public Double getJhzlc() {
  158 + return jhzlc;
  159 + }
  160 + public void setJhzlc(Double jhzlc) {
  161 + this.jhzlc = jhzlc;
  162 + }
  163 + public Double getJhyylc() {
  164 + return jhyylc;
  165 + }
  166 + public void setJhyylc(Double jhyylc) {
  167 + this.jhyylc = jhyylc;
  168 + }
  169 + public Double getJhkslc() {
  170 + return jhkslc;
  171 + }
  172 + public void setJhkslc(Double jhkslc) {
  173 + this.jhkslc = jhkslc;
  174 + }
  175 + public Double getSjzlc() {
  176 + return sjzlc;
  177 + }
  178 + public void setSjzlc(Double sjzlc) {
  179 + this.sjzlc = sjzlc;
  180 + }
  181 + public Double getSjyylc() {
  182 + return sjyylc;
  183 + }
  184 + public void setSjyylc(Double sjyylc) {
  185 + this.sjyylc = sjyylc;
  186 + }
  187 + public Double getSjkslc() {
  188 + return sjkslc;
  189 + }
  190 + public void setSjkslc(Double sjkslc) {
  191 + this.sjkslc = sjkslc;
  192 + }
  193 + public Double getSslc() {
  194 + return sslc;
  195 + }
  196 + public void setSslc(Double sslc) {
  197 + this.sslc = sslc;
  198 + }
  199 + public int getSsbc() {
  200 + return ssbc;
  201 + }
  202 + public void setSsbc(int ssbc) {
  203 + this.ssbc = ssbc;
  204 + }
  205 + public Double getLzlc() {
  206 + return lzlc;
  207 + }
  208 + public void setLzlc(Double lzlc) {
  209 + this.lzlc = lzlc;
  210 + }
  211 + public Double getDmlc() {
  212 + return dmlc;
  213 + }
  214 + public void setDmlc(Double dmlc) {
  215 + this.dmlc = dmlc;
  216 + }
  217 + public Double getGzlc() {
  218 + return gzlc;
  219 + }
  220 + public void setGzlc(Double gzlc) {
  221 + this.gzlc = gzlc;
  222 + }
  223 + public Double getJflc() {
  224 + return jflc;
  225 + }
  226 + public void setJflc(Double jflc) {
  227 + this.jflc = jflc;
  228 + }
  229 + public Double getZslc() {
  230 + return zslc;
  231 + }
  232 + public void setZslc(Double zslc) {
  233 + this.zslc = zslc;
  234 + }
  235 + public Double getQrlc() {
  236 + return qrlc;
  237 + }
  238 + public void setQrlc(Double qrlc) {
  239 + this.qrlc = qrlc;
  240 + }
  241 + public Double getQclc() {
  242 + return qclc;
  243 + }
  244 + public void setQclc(Double qclc) {
  245 + this.qclc = qclc;
  246 + }
  247 + public Double getKxlc() {
  248 + return kxlc;
  249 + }
  250 + public void setKxlc(Double kxlc) {
  251 + this.kxlc = kxlc;
  252 + }
  253 + public Double getQhlc() {
  254 + return qhlc;
  255 + }
  256 + public void setQhlc(Double qhlc) {
  257 + this.qhlc = qhlc;
  258 + }
  259 + public Double getYwlc() {
  260 + return ywlc;
  261 + }
  262 + public void setYwlc(Double ywlc) {
  263 + this.ywlc = ywlc;
  264 + }
  265 + public Double getQtlc() {
  266 + return qtlc;
  267 + }
  268 + public void setQtlc(Double qtlc) {
  269 + this.qtlc = qtlc;
  270 + }
  271 + public Double getLjlc() {
  272 + return ljlc;
  273 + }
  274 + public void setLjlc(Double ljlc) {
  275 + this.ljlc = ljlc;
  276 + }
  277 + public Double getLjkslc() {
  278 + return ljkslc;
  279 + }
  280 + public void setLjkslc(Double ljkslc) {
  281 + this.ljkslc = ljkslc;
  282 + }
  283 + public int getJhbcq() {
  284 + return jhbcq;
  285 + }
  286 + public void setJhbcq(int jhbcq) {
  287 + this.jhbcq = jhbcq;
  288 + }
  289 + public int getJhbcz() {
  290 + return jhbcz;
  291 + }
  292 + public void setJhbcz(int jhbcz) {
  293 + this.jhbcz = jhbcz;
  294 + }
  295 + public int getJhbcw() {
  296 + return jhbcw;
  297 + }
  298 + public void setJhbcw(int jhbcw) {
  299 + this.jhbcw = jhbcw;
  300 + }
  301 + public int getSjbcq() {
  302 + return sjbcq;
  303 + }
  304 + public void setSjbcq(int sjbcq) {
  305 + this.sjbcq = sjbcq;
  306 + }
  307 + public int getSjbcz() {
  308 + return sjbcz;
  309 + }
  310 + public void setSjbcz(int sjbcz) {
  311 + this.sjbcz = sjbcz;
  312 + }
  313 + public int getSjbcw() {
  314 + return sjbcw;
  315 + }
  316 + public void setSjbcw(int sjbcw) {
  317 + this.sjbcw = sjbcw;
  318 + }
  319 + public int getLjbcq() {
  320 + return ljbcq;
  321 + }
  322 + public void setLjbcq(int ljbcq) {
  323 + this.ljbcq = ljbcq;
  324 + }
  325 + public int getLjbcz() {
  326 + return ljbcz;
  327 + }
  328 + public void setLjbcz(int ljbcz) {
  329 + this.ljbcz = ljbcz;
  330 + }
  331 + public int getLjbcw() {
  332 + return ljbcw;
  333 + }
  334 + public void setLjbcw(int ljbcw) {
  335 + this.ljbcw = ljbcw;
  336 + }
  337 + public int getFzbcq() {
  338 + return fzbcq;
  339 + }
  340 + public void setFzbcq(int fzbcq) {
  341 + this.fzbcq = fzbcq;
  342 + }
  343 + public int getFzbcz() {
  344 + return fzbcz;
  345 + }
  346 + public void setFzbcz(int fzbcz) {
  347 + this.fzbcz = fzbcz;
  348 + }
  349 + public int getFzbcw() {
  350 + return fzbcw;
  351 + }
  352 + public void setFzbcw(int fzbcw) {
  353 + this.fzbcw = fzbcw;
  354 + }
  355 + public int getDtbcq() {
  356 + return dtbcq;
  357 + }
  358 + public void setDtbcq(int dtbcq) {
  359 + this.dtbcq = dtbcq;
  360 + }
  361 + public int getDtbcz() {
  362 + return dtbcz;
  363 + }
  364 + public void setDtbcz(int dtbcz) {
  365 + this.dtbcz = dtbcz;
  366 + }
  367 + public int getDtbcw() {
  368 + return dtbcw;
  369 + }
  370 + public void setDtbcw(int dtbcw) {
  371 + this.dtbcw = dtbcw;
  372 + }
  373 + public int getDjgq() {
  374 + return djgq;
  375 + }
  376 + public void setDjgq(int djgq) {
  377 + this.djgq = djgq;
  378 + }
  379 + public int getDjgz() {
  380 + return djgz;
  381 + }
  382 + public void setDjgz(int djgz) {
  383 + this.djgz = djgz;
  384 + }
  385 + public int getDjgw() {
  386 + return djgw;
  387 + }
  388 + public void setDjgw(int djgw) {
  389 + this.djgw = djgw;
  390 + }
  391 + public int getDjgsj() {
  392 + return djgsj;
  393 + }
  394 + public void setDjgsj(int djgsj) {
  395 + this.djgsj = djgsj;
  396 + }
  397 + public String getRemark() {
  398 + return remark;
  399 + }
  400 + public void setRemark(String remark) {
  401 + this.remark = remark;
  402 + }
  403 + public String getGsName() {
  404 + return gsName;
  405 + }
  406 + public void setGsName(String gsName) {
  407 + this.gsName = gsName;
  408 + }
  409 + public String getFgsName() {
  410 + return fgsName;
  411 + }
  412 + public void setFgsName(String fgsName) {
  413 + this.fgsName = fgsName;
  414 + }
  415 +
  416 +}
... ...
src/main/java/com/bsth/repository/calc/CalcIntervalRepository.java
... ... @@ -33,6 +33,12 @@ public interface CalcIntervalRepository extends BaseRepository<CalcInterval, Int
33 33 @Query(value="select DISTINCT c from CalcInterval c where c.xlBm = ?1 and c.date = ?2 and c.level like %?3% order by c.xlBm")
34 34 List<CalcInterval> selectByDateAndLine(String line,String date,String level);
35 35  
  36 + //按照时间段统计
  37 + @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
  38 + + " from bsth_c_calc_interval where date >=?1 and date <=?2 "
  39 + + " group by xl_bm,gsbm,fgsbm",nativeQuery=true)
  40 + List<Object[]> countByDate(String date,String date2);
  41 +
36 42 //按照时间段,公司统计
37 43 @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
38 44 + " from bsth_c_calc_interval where gsbm like %?1% and fgsbm like %?2% and date >=?3 and date <=?4 "
... ...
src/main/java/com/bsth/repository/calc/CalcStatisticsRepository.java
... ... @@ -28,6 +28,10 @@ public interface CalcStatisticsRepository extends BaseRepository&lt;CalcStatistics,
28 28 @Query(value="select DISTINCT c from CalcStatistics c where c.xl = ?1 and c.dateStr between ?2 and ?3 order by c.fgsdm,c.xl")
29 29 List<CalcStatistics> selectByDateAndLineTj2(String line,String date,String date2);
30 30  
  31 + //按照时间段统计
  32 + @Query(value="select DISTINCT c from CalcStatistics c where c.dateStr between ?1 and ?2 order by c.gsdm,c.fgsdm,c.xl")
  33 + List<CalcStatistics> selectByDateAndLineTj3(String date,String date2);
  34 +
31 35 //按照日期和线路删除数据
32 36 @Modifying
33 37 @Transactional
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -188,6 +188,11 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
188 188 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
189 189 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.fgsBm,s.xlBm")
190 190 List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2);
  191 +
  192 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  193 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.scheduleDateStr >= ?1 and s.scheduleDateStr<= ?2 order by s.gsBm,s.fgsBm,s.xlBm")
  194 + List<ScheduleRealInfo> scheduleByDateAndLineTj3(String date,String date2);
  195 +
191 196 //月报表
192 197 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
193 198 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.xlBm")
... ...
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
... ... @@ -47,6 +47,8 @@ import org.springframework.jdbc.core.RowMapper;
47 47 import org.springframework.stereotype.Service;
48 48  
49 49 import javax.transaction.Transactional;
  50 +
  51 +import java.math.BigDecimal;
50 52 import java.sql.ResultSet;
51 53 import java.sql.SQLException;
52 54 import java.text.DecimalFormat;
... ... @@ -738,7 +740,9 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
738 740 String line, String date, String date2, String xlName, String type,String nature) {
739 741 // TODO Auto-generated method stub
740 742 List<CalcStatistics> listAll = new ArrayList<CalcStatistics>();
741   - if(line.length() > 0){
  743 + if(gsdm.equals("") && fgsdm.equals("") && line.equals("")){
  744 + listAll = calcStatisticsRepository.selectByDateAndLineTj3(date, date2);
  745 + } else if(line.length() > 0){
742 746 listAll = calcStatisticsRepository.selectByDateAndLineTj2(line, date, date2);
743 747 } else {
744 748 listAll = calcStatisticsRepository.selectByDateAndLineTj(line, date, date2, gsdm, fgsdm);
... ... @@ -767,13 +771,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
767 771  
768 772 for(CalcStatistics s : list){
769 773 try {
770   -// String key = PinyinHelper.convertToPinyinString(s.getXl(), "" , PinyinFormat.WITHOUT_TONE);
771   - String key =s.getFgsdm()+s.getXl();
772   -// if(line.equals("")){
773   -// key =s.getFgsdm()+s.getXl();
774   -// }else{
775   -// key =s.getXl();
776   -// }
  774 +// String key =s.getGsdm()+"/"+s.getFgsdm()+"/"+s.getXl();
  775 + String key = PinyinHelper.convertToPinyinString(s.getGsdm()+s.getFgsdm()+s.getXlName(), "", PinyinFormat.WITHOUT_TONE);
777 776 if(!keyMap.containsKey(key)){
778 777 keyMap.put(key, new ArrayList<CalcStatistics>());
779 778 keyList.add(key);
... ... @@ -789,18 +788,14 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
789 788 for(String key : keyList){
790 789 if(keyMap.get(key).size() > 0){
791 790 CalcStatistics s = keyMap.get(key).get(0);
792   - if(keyMap.get(key).size() > 1)
  791 + if(keyMap.get(key).size() > 1){
793 792 for(int i = 1; i < keyMap.get(key).size(); i++){
794 793 CalcStatistics s_ = keyMap.get(key).get(i);
795 794 s = addStatistics(s, s_);
796 795 }
797   -// if(line.equals("")){
798   - s.setFgsName(BasicData.businessFgsCodeNameMap.get(s.getFgsdm()+"_"+s.getGsdm()));
799   - /*}else{
800   - List<Line> l=lineRepository.findLineByCode(line);
801   - if(l.size()>0)
802   - s.setFgsName(BasicData.businessFgsCodeNameMap.get(l.get(0).getBrancheCompany()+"_"+l.get(0).getCompany()));
803   - }*/
  796 + }
  797 + s.setGsName(BasicData.businessCodeNameMap.get(s.getGsdm()));
  798 + s.setFgsName(BasicData.businessFgsCodeNameMap.get(s.getFgsdm()+"_"+s.getGsdm()));
804 799 resList.add(s);
805 800 }
806 801 }
... ... @@ -809,6 +804,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
809 804 CalcStatistics temp = new CalcStatistics();
810 805 temp.setXlName("合计");
811 806 temp.setFgsName("");
  807 + temp.setGsName("");
812 808 for(CalcStatistics s : resList){
813 809 temp = addStatistics(temp, s);
814 810 }
... ... @@ -818,6 +814,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
818 814 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
819 815 for(CalcStatistics c : resList){
820 816 Map<String, Object> m = new HashMap<String, Object>();
  817 + m.put("gsName", c.getGsName());
821 818 m.put("fgsName", c.getFgsName());
822 819 m.put("xlName", c.getXlName());
823 820 m.put("jhzlc", c.getJhzlc());
... ... @@ -888,6 +885,59 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
888 885 logger.info("" , e);
889 886 }
890 887 }
  888 +
  889 + if (type != null && type.length() != 0 && type.equals("exportAll")) {
  890 + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
  891 + Map<String, Map<String, Object>> tempMap = new HashMap<String, Map<String, Object>>();
  892 + for(Map<String, Object> m : mapList){
  893 + if(m.get("gsName") != null && m.get("gsName").toString().trim().length() > 0){
  894 + String gsName = m.get("gsName").toString().trim();
  895 + Map<String, Object> temp = new HashMap<String, Object>();
  896 + if(tempMap.get(gsName) != null){
  897 + temp = tempMap.get(gsName);
  898 + } else {
  899 + temp.put("gsName", gsName);
  900 + temp.put("fgsName", "小计");
  901 + temp.put("xlName", "");
  902 + tempList.add(temp);
  903 + tempMap.put(gsName, temp);
  904 + }
  905 + for(String key : m.keySet()){
  906 + try {
  907 + temp.put(key, new BigDecimal(m.get(key).toString()).add(
  908 + new BigDecimal(temp.get(key)!=null?temp.get(key).toString():"0")));
  909 + } catch (Exception e) {
  910 + // TODO: handle exception
  911 + }
  912 + }
  913 + }
  914 + }
  915 + mapList.addAll(mapList.size()>0?mapList.size()-1:0, tempList);
  916 +
  917 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  918 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  919 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  920 + Map<String, Object> m = new HashMap<String, Object>();
  921 + m.put("date", date + "至" + date2);
  922 + ReportUtils ee = new ReportUtils();
  923 + try {
  924 + String dateTime = "";
  925 + if (date.equals(date2)) {
  926 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  927 + } else {
  928 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  929 + + "-" + sdfSimple.format(sdfMonth.parse(date2));
  930 + }
  931 + listI.add(mapList.iterator());
  932 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  933 + ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_4.xls",
  934 + path + "export/" + dateTime + "-全部公司-统计日报.xls");
  935 + } catch (Exception e) {
  936 + // TODO: handle exception
  937 + //e.printStackTrace();
  938 + logger.info("", e);
  939 + }
  940 + }
891 941  
892 942 return resList;
893 943 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
1 1 package com.bsth.service.realcontrol.impl;
2 2  
3 3 import java.io.*;
  4 +import java.math.BigDecimal;
4 5 import java.net.HttpURLConnection;
5 6 import java.net.MalformedURLException;
6 7 import java.net.URL;
... ... @@ -2863,12 +2864,15 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2863 2864 }
2864 2865 Map<String, Object> map = new HashMap<String, Object>();
2865 2866 if (list.size() > 0) {
  2867 + map.put("gsBm", list.get(0).getGsBm());
2866 2868 map.put("fgsBm", list.get(0).getFgsBm());
2867 2869 map.put("xlBm", list.get(0).getXlBm());
2868 2870 map.put("xlName", list.get(0).getXlName());
2869 2871 map.put("fgsName", list.get(0).getFgsName());
  2872 + map.put("gsName", list.get(0).getGsName());
  2873 +
2870 2874 try {
2871   - map.put("xlNamePy", PinyinHelper.convertToPinyinString(list.get(0).getFgsBm()+list.get(0).getXlName(), "", PinyinFormat.WITHOUT_TONE));
  2875 + map.put("xlNamePy", PinyinHelper.convertToPinyinString(list.get(0).getGsBm()+list.get(0).getFgsBm()+list.get(0).getXlName(), "", PinyinFormat.WITHOUT_TONE));
2872 2876 } catch (PinyinException e) {
2873 2877 // TODO Auto-generated catch block
2874 2878 e.printStackTrace();
... ... @@ -2957,7 +2961,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2957 2961 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
2958 2962 List<Object[]> listInterval=new ArrayList<Object[]>();
2959 2963 line = line.trim();
2960   - if (line.equals("")) {
  2964 + if(gsdm.equals("") && fgsdm.equals("") && line.equals("")){
  2965 + //查询所有公司
  2966 + listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj3(date, date2);
  2967 + listInterval = calcIntervalRepository.countByDate(date, date2);
  2968 + } else if (line.equals("")) {
2961 2969 //查询所有线路
2962 2970 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm);
2963 2971 listInterval = calcIntervalRepository.countByDateAndLine(gsdm, fgsdm, date, date2);
... ... @@ -3012,7 +3020,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3012 3020 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>();
3013 3021 for (int i = 0; i < list.size(); i++) {
3014 3022 if (i < list.size() - 1) {
3015   - if ((list.get(i+1).getFgsBm()+list.get(i + 1).getXlBm()).equals(list.get(i).getFgsBm()+list.get(i).getXlBm())) {
  3023 + if ((list.get(i+1).getGsBm()+"/"+list.get(i+1).getFgsBm()+"/"+list.get(i+1).getXlBm()).equals(
  3024 + list.get(i).getGsBm()+"/"+list.get(i).getFgsBm()+"/"+list.get(i).getXlBm())) {
3016 3025 lists.add(list.get(i));
3017 3026 } else {
3018 3027 lists.add(list.get(i));
... ... @@ -3025,7 +3034,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3025 3034 lists = new ArrayList<ScheduleRealInfo>();
3026 3035 }
3027 3036 } else {
3028   - if ((list.get(i).getFgsBm()+list.get(i).getXlBm()).equals(list.get(i - 1).getFgsBm()+list.get(i - 1).getXlBm())) {
  3037 + if ((list.get(i).getGsBm()+"/"+list.get(i).getFgsBm()+"/"+list.get(i).getXlBm()).equals(
  3038 + list.get(i-1).getGsBm()+"/"+list.get(i-1).getFgsBm()+"/"+list.get(i-1).getXlBm())) {
3029 3039 lists.add(list.get(i));
3030 3040 Map<String, Object> mm=new HashMap<String,Object>();
3031 3041 if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){
... ... @@ -3045,15 +3055,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3045 3055 }
3046 3056 }
3047 3057 }
3048   - /*if(!line.equals("")){
3049   - List<Line> l=lineRepository.findLineByCode(line);
3050   - if(l.size()>0)
3051   - lMap.get(0).put("fgsName", BasicData.businessFgsCodeNameMap.get(l.get(0).getBrancheCompany()+"_"+l.get(0).getCompany()));
3052   - }*/
  3058 +
3053 3059 Collections.sort(lMap, new AccountXlbm());
3054 3060 Map<String, Object> map = new HashMap<String, Object>();
3055 3061 map.put("xlName", "合计");
3056 3062 map.put("fgsName", "");
  3063 + map.put("gsName", "");
3057 3064 double jhyygl = culateService.culateJhgl(list);//计划营运公里
3058 3065 double jhjcclc = culateService.culateJhJccgl(list);//计划进出场公里(计划空驶公里)
3059 3066 map.put("jhlc", jhyygl);
... ... @@ -3145,6 +3152,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3145 3152 map.put("djg_time", "0");
3146 3153 }
3147 3154 lMap.add(map);
  3155 +
3148 3156 if (type != null && type.length() != 0 && type.equals("export")) {
3149 3157 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
3150 3158 sdfSimple = new SimpleDateFormat("yyyyMMdd");
... ... @@ -3170,8 +3178,61 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3170 3178 logger.info("", e);
3171 3179 }
3172 3180 }
3173   -
3174   - return lMap;
  3181 +
  3182 + if (type != null && type.length() != 0 && type.equals("exportAll")) {
  3183 + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
  3184 + Map<String, Map<String, Object>> tempMap = new HashMap<String, Map<String, Object>>();
  3185 + for(Map<String, Object> m : lMap){
  3186 + if(m.get("gsName") != null && m.get("gsName").toString().trim().length() > 0){
  3187 + String gsName = m.get("gsName").toString().trim();
  3188 + Map<String, Object> temp = new HashMap<String, Object>();
  3189 + if(tempMap.get(gsName) != null){
  3190 + temp = tempMap.get(gsName);
  3191 + } else {
  3192 + temp.put("gsName", gsName);
  3193 + temp.put("fgsName", "小计");
  3194 + temp.put("xlName", "");
  3195 + tempList.add(temp);
  3196 + tempMap.put(gsName, temp);
  3197 + }
  3198 + for(String key : m.keySet()){
  3199 + try {
  3200 + temp.put(key, new BigDecimal(m.get(key).toString()).add(
  3201 + new BigDecimal(temp.get(key)!=null?temp.get(key).toString():"0")));
  3202 + } catch (Exception e) {
  3203 + // TODO: handle exception
  3204 + }
  3205 + }
  3206 + }
  3207 + }
  3208 + lMap.addAll(lMap.size()>0?lMap.size()-1:0, tempList);
  3209 +
  3210 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  3211 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  3212 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  3213 + Map<String, Object> m = new HashMap<String, Object>();
  3214 + m.put("date", date + "至" + date2);
  3215 + ReportUtils ee = new ReportUtils();
  3216 + try {
  3217 + String dateTime = "";
  3218 + if (date.equals(date2)) {
  3219 + dateTime = sdfSimple.format(sdfMonth.parse(date));
  3220 + } else {
  3221 + dateTime = sdfSimple.format(sdfMonth.parse(date))
  3222 + + "-" + sdfSimple.format(sdfMonth.parse(date2));
  3223 + }
  3224 + listI.add(lMap.iterator());
  3225 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  3226 + ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_4.xls",
  3227 + path + "export/" + dateTime + "-全部公司-统计日报.xls");
  3228 + } catch (Exception e) {
  3229 + // TODO: handle exception
  3230 + //e.printStackTrace();
  3231 + logger.info("", e);
  3232 + }
  3233 + }
  3234 +
  3235 + return lMap;
3175 3236 }
3176 3237  
3177 3238 @Override
... ...
src/main/resources/static/pages/forms/mould/statisticsDaily_4.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/statisticsDaily.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   -
18   - #forms > thead > tr> td >span{
19   - width: 5px;
20   - word-wrap: break-word;
21   - letter-spacing: 20px;
22   - }
23   -
24   - #forms > thead > tr> td >label{
25   - word-break: keep-all;white-space:nowrap;
26   - }
27   -</style>
28   -
29   -<div class="page-head">
30   - <div class="page-title">
31   - <h1>统计日报(按年、月、季度查询请点击<a href="statisticsDailyCalc2.html" target="_blank">【统计查询】</a>)</h1>
32   - </div>
33   -</div>
34   -
35   -<!-- <div class="row"> -->
36   - <div class="col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)">
37   -<!-- <div> -->
38   - <div class="portlet-title">
39   - <form class="form-inline" action="">
40   - <div style="display: inline-block;margin-left: 29px; " id="gsdmDiv">
41   - <span class="item-label" style="width: 80px;">公司: </span>
42   - <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
43   - </div>
44   - <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
45   - <span class="item-label" style="width: 80px;">分公司: </span>
46   - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>
47   - </div>
48   - <div style="display: inline-block;margin-left: 42px;">
49   - <span class="item-label" style="width: 80px;">线路: </span>
50   - <select class="form-control" name="line" id="line" style="width: 180px;"></select>
51   - </div>
52   - <div style="margin-top: 3px"></div>
53   - <div style="display: inline-block;">
54   - <span class="item-label" style="width: 80px;">线路性质: </span>
55   - <select
56   - class="form-control" name="nature" id="nature"
57   - style="width: 180px;">
58   - <option value="0">全部线路</option>
59   - <option value="1" selected="selected">营运线路</option>
60   - <option value="2">非营运线路</option>
61   - </select>
62   - </div>
63   - <div style="display: inline-block;margin-left: 15px;">
64   - <span class="item-label" style="width: 80px;">开始时间: </span>
65   - <input class="form-control" type="text" id="date" style="width: 180px;"/>
66   - </div>
67   - <div style="display: inline-block;margin-left: 15px;">
68   - <span class="item-label" style="width: 80px;">结束时间: </span>
69   - <input class="form-control" type="text" id="date2" style="width: 180px;"/>
70   - </div>
71   - <div class="form-group">
72   - <input class="btn btn-default" type="button" id="query" value="查询"/>
73   - <input class="btn btn-default" type="button" id="export" value="导出"/>
74   - </div>
75   - </form>
76   - </div>
77   - <div class="portlet-body" id="tjrbBody" style="overflow:auto;height: calc(100% - 80px)">
78   - <div class="table-container" style="margin-top: 10px;min-width: 906px">
79   - <label>早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
80   - <table class="table table-bordered table-hover table-checkable" id="forms">
81   - <thead>
82   - <tr>
83   - <th colspan="45"><label id="tjrq"></label> 线路统计日报</th>
84   - </tr>
85   - <tr>
86   - <td rowspan="3"><span >分公司</span></td>
87   - <td rowspan="3"><span >路线名</span></td>
88   - <td colspan="21">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td>
89   - <td colspan="15">全日营运班次</td>
90   - <td colspan="9">大间隔情况</td>
91   - </tr>
92   - <tr>
93   - <td rowspan="2"><label>计划总</label>
94   - <label>公里&nbsp;&nbsp;&nbsp;</label></td>
95   - <td rowspan="2"><label>计划营</label><label>运公里</label></td>
96   - <td rowspan="2"><label>计划空</label><label>驶公里</label></td>
97   - <td rowspan="2"><label>实际</label><label>总公里</label></td>
98   - <td rowspan="2"><label>实际营</label><label>运公里</label></td>
99   - <td rowspan="2"><label>实际空</label><label>驶公里</label></td>
100   - <td rowspan="2"><span>少驶公里</span></td>
101   - <td rowspan="2"><span>少驶班次</span></td>
102   - <td colspan="11">少驶原因(公里)</td>
103   - <td colspan="2">临加公里</td>
104   - <td colspan="3">计划班次</td>
105   - <td colspan="3">实际班次</td>
106   - <td colspan="3">临加班次</td>
107   - <td colspan="3">放站班次</td>
108   - <td colspan="3">调头班次</td>
109   - <td colspan="3">发生次数</td>
110   - <td rowspan="2">最大间隔时间(分)</td>
111   - <td rowspan="2">原因</td>
112   - </tr>
113   - <tr>
114   - <td><span >路阻</span></td>
115   - <td><span>吊慢</span></td>
116   - <td><span >故障</span></td>
117   - <td><span >纠纷</span></td>
118   - <td><span >肇事</span></td>
119   - <td><span>缺人</span></td>
120   - <td><span>缺车</span></td>
121   - <td><span >客稀</span></td>
122   - <td><span>气候</span></td>
123   - <td><span>援外</span></td>
124   - <td><span>其他</span></td>
125   - <td><span>营运</span></td>
126   - <td><span>空驶</span></td>
127   - <td><span>全日</span></td>
128   - <td><span>早高峰</span></td>
129   - <td><span>晚高峰</span></td>
130   - <td><span>全日</span></td>
131   - <td><span>早高峰</span></td>
132   - <td><span>晚高峰</span></td>
133   - <td><span>全日</span></td>
134   - <td><span>早高峰</span></td>
135   - <td><span>晚高峰</span></td>
136   - <td><span>全日</span></td>
137   - <td><span>早高峰</span></td>
138   - <td><span>晚高峰</span></td>
139   - <td><span>全日</span></td>
140   - <td><span>早高峰</span></td>
141   - <td><span>晚高峰</span></td>
142   - <td><span>全日</span></td>
143   - <td><span>早高峰</span></td>
144   - <td><span>晚高峰</span></td>
145   - </tr>
146   - </thead>
147   - <tbody class="statisticsDaily">
148   -
149   - </tbody>
150   - </table>
151   - </div>
152   - </div>
153   - </div>
154   -
155   -<script>
156   - $(function(){
157   - $('#export').attr('disabled', "true");
158   -
159   - // 关闭左侧栏
160   - if (!$('body').hasClass('page-sidebar-closed'))
161   - $('.menu-toggler.sidebar-toggler').click();
162   - var d = new Date();
163   - var year = d.getFullYear();
164   - var month = d.getMonth() + 1;
165   - var day = d.getDate();
166   - if(month < 10)
167   - month = "0" + month;
168   - if(day < 10)
169   - day = "0" + day;
170   -
171   - var dateTime=year + "-" + month + "-" + day;
172   - $("#date").val(dateTime);
173   - $("#date2").val(dateTime);
174   - $("#date").datetimepicker({
175   - format : 'YYYY-MM-DD',
176   - locale : 'zh-cn',
177   - maxDate : dateTime
178   - });
179   -
180   - $("#date2").datetimepicker({
181   - format : 'YYYY-MM-DD',
182   - locale : 'zh-cn',
183   - maxDate : dateTime
184   - });
185   -
186   -
187   - var fage=true;
188   - var obj = [];
189   - var xlList;
190   - $.get('/report/lineList',function(result){
191   - xlList=result;
192   - $.get('/user/companyData', function(result){
193   - obj = result;
194   - var options = '';
195   - for(var i = 0; i < obj.length; i++){
196   - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
197   - }
198   -
199   - if(obj.length ==0){
200   - $("#gsdmDiv").css('display','none');
201   - }else if(obj.length ==1){
202   - $("#gsdmDiv").css('display','none');
203   - if(obj[0].children.length == 1 || obj[0].children.length ==0){
204   - fage=false;
205   - $('#fgsdmDiv').css('display','none');
206   - }
207   - }
208   - $('#gsdm').html(options);
209   - updateCompany();
210   - });
211   - })
212   - $("#gsdm").on("change",updateCompany);
213   - function updateCompany(){
214   - var company = $('#gsdm').val();
215   - var options = '';
216   - if(fage){
217   - options = '<option value="">请选择</option>';
218   - }
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   - $('#fgsdm').html(options);
228   -// initXl();
229   - }
230   -
231   - var tempData = {};
232   - $.get('/report/lineList',function(xlList){
233   - var data = [];
234   - data.push({id: " ", text: "全部线路"});
235   - $.get('/user/companyData', function(result){
236   - for(var i = 0; i < result.length; i++){
237   - var companyCode = result[i].companyCode;
238   - var children = result[i].children;
239   - for(var j = 0; j < children.length; j++){
240   - var code = children[j].code;
241   - for(var k=0;k < xlList.length;k++ ){
242   - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
243   - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
244   - tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
245   - }
246   - }
247   - }
248   - }
249   - initPinYinSelect2('#line',data,'');
250   -
251   - });
252   - });
253   -
254   - $("#line").on("change", function(){
255   - if($("#line").val() == " "){
256   - $("#gsdm").attr("disabled", false);
257   - $("#fgsdm").attr("disabled", false);
258   - } else {
259   - var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
260   - $("#gsdm").val(temp[0]);
261   - updateCompany();
262   - $("#nature").val(0);
263   - $("#fgsdm").val(temp[1]);
264   - $("#gsdm").attr("disabled", true);
265   - $("#fgsdm").attr("disabled", true);
266   - }
267   - });
268   -
269   -
270   - var line ="";
271   - var xlName ="";
272   - var date = "";
273   - var date2 ="";
274   - var gsdm="";
275   - var fgsdm="";
276   - var nature="";
277   - var time1="";
278   - var time2="";
279   - $("#query").on("click",function(){
280   - if($("#date").val() == null || $("#date").val().trim().length == 0){
281   - layer.msg("请选择时间范围!");
282   - return;
283   - }
284   - if($("#date2").val() == null || $("#date2").val().trim().length == 0){
285   - layer.msg("请选择时间范围!");
286   - return;
287   - }
288   -// $("#tjrbBody").height($(window).height()-100);
289   - line = $("#line").val();
290   - date = $("#date").val();
291   - date2 =$("#date2").val();
292   - gsdm =$("#gsdm").val();
293   - fgsdm=$("#fgsdm").val();
294   - nature=$("#nature").val();
295   - xlName = $("#select2-line-container").html();
296   - if(xlName == "全部线路")
297   - xlName = $('#fgsdm option:selected').text();
298   - if(xlName == "请选择")
299   - xlName = $('#gsdm option:selected').text();
300   - if(line=="请选择"){
301   - line="";
302   - }
303   - time1 = Date.parse(new Date(date));
304   - time2 = Date.parse(new Date(date2));
305   - if(date==null || date =="" ||date2==null || date2 ==""){
306   - layer.msg('请选择时间段.');
307   - }else if(time2<time1){
308   - layer.msg('结束日期不能小于开始日期.');
309   - }else{
310   - if((time2-time1)>2678400000){
311   - layer.msg('查询超过一个月请点击【统计查询】.');
312   - }else{
313   - $("#tjrq").html(date+"至"+date2);
314   - var params = {};
315   - params['gsdm'] = gsdm;
316   - params['fgsdm'] =fgsdm ;
317   - params['line'] = line;
318   - params['date'] = date;
319   - params['date2'] = date2;
320   - params['xlName'] = xlName;
321   - params['nature'] = nature;
322   - params['type'] = "query";
323   - var i = layer.load(2);
324   - $get('/realSchedule/statisticsDailyTj',params,function(result){
325   - // 把数据填充到模版中
326   - var tbodyHtml = template('statisticsDaily',{list:result});
327   - // 把渲染好的模版html文本追加到表格中
328   - $('#forms .statisticsDaily').html(tbodyHtml);
329   - layer.close(i);
330   -
331   - if(result.length == 0)
332   - $("#export").attr('disabled',"true");
333   - else
334   - $("#export").removeAttr("disabled");
335   - });
336   - }
337   -
338   - }
339   -
340   - });
341   -// $("#tjrbBody").height($(window).height()-100);
342   - $("#export").on("click",function(){
343   - var params = {};
344   - params['gsdm'] = gsdm;
345   - params['fgsdm'] =fgsdm;
346   - params['line'] = line;
347   - date = $("#date").val();
348   - date2 =$("#date2").val();
349   - params['date'] = date;
350   - params['date2'] = date2;
351   - params['xlName'] = xlName;
352   - params['nature'] = nature;
353   - params['type'] = "export";
354   - if((time2-time1)>2678400000){
355   - layer.msg('查询超过一个月请点击【统计查询】.');
356   - }else{
357   - var i = layer.load(2);
358   - $get('/realSchedule/statisticsDailyTj',params,function(result){
359   - var dateTime = "";
360   - if(date == date2){
361   - dateTime = moment(date).format("YYYYMMDD");
362   - } else {
363   - dateTime = moment(date).format("YYYYMMDD")
364   - +"-"+moment(date2).format("YYYYMMDD");
365   - }
366   - window.open("/downloadFile/download?fileName="
367   - +dateTime+"-"+xlName+"-统计日报");
368   - layer.close(i);
369   - });
370   - }
371   - });
372   -
373   - });
374   -</script>
375   -<script type="text/html" id="statisticsDaily">
376   - {{each list as obj i}}
377   - <tr {{if obj.zt==1}}style='color: red'{{/if}}>
378   - <td>{{obj.fgsName}}</td>
379   - <td>{{obj.xlName}}</td>
380   - <td>{{obj.jhzlc}}</td>
381   - <td>{{obj.jhlc}}</td>
382   - <td>{{obj.jcclc}}</td>
383   - <td>{{obj.sjzgl}}</td>
384   - <td>{{obj.sjgl}}</td>
385   - <td>{{obj.sjksgl}}</td>
386   - <td>{{obj.ssgl}}</td>
387   - <td>{{obj.ssbc}}</td>
388   - <td>{{obj.ssgl_lz}}</td>
389   - <td>{{obj.ssgl_dm}}</td>
390   - <td>{{obj.ssgl_gz}}</td>
391   - <td>{{obj.ssgl_jf}}</td>
392   - <td>{{obj.ssgl_zs}}</td>
393   - <td>{{obj.ssgl_qr}}</td>
394   - <td>{{obj.ssgl_qc}}</td>
395   - <td>{{obj.ssgl_kx}}</td>
396   - <td>{{obj.ssgl_qh}}</td>
397   - <td>{{obj.ssgl_yw}}</td>
398   - <td>{{obj.ssgl_other}}</td>
399   - <td>{{obj.ljgl}}</td>
400   - <td>{{obj.ljks}}</td>
401   - <td>{{obj.jhbc}}</td>
402   - <td>{{obj.jhbc_m}}</td>
403   - <td>{{obj.jhbc_a}}</td>
404   - <td>{{obj.sjbc}}</td>
405   - <td>{{obj.sjbc_m}}</td>
406   - <td>{{obj.sjbc_a}}</td>
407   - <td>{{obj.ljbc}}</td>
408   - <td>{{obj.ljbc_m}}</td>
409   - <td>{{obj.ljbc_a}}</td>
410   - <td>{{obj.fzbc}}</td>
411   - <td>{{obj.fzbc_m}}</td>
412   - <td>{{obj.fzbc_a}}</td>
413   - <td>{{obj.dtbc}}</td>
414   - <td>{{obj.dtbc_m}}</td>
415   - <td>{{obj.dtbc_a}}</td>
416   - <td>{{obj.djg}}</td>
417   - <td>{{obj.djg_m}}</td>
418   - <td>{{obj.djg_a}}</td>
419   - <td>{{obj.djg_time}}</td>
420   - <td>&nbsp;</td>
421   - </tr>
422   - {{/each}}
423   - {{if list.length == 0}}
424   - <tr>
425   - <td colspan="44"><h6 class="muted">没有找到相关数据</h6></td>
426   - </tr>
427   - {{/if}}
  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 +
  18 + #forms > thead > tr> td >span{
  19 + width: 5px;
  20 + word-wrap: break-word;
  21 + letter-spacing: 20px;
  22 + }
  23 +
  24 + #forms > thead > tr> td >label{
  25 + word-break: keep-all;white-space:nowrap;
  26 + }
  27 +</style>
  28 +
  29 +<div class="page-head">
  30 + <div class="page-title">
  31 + <h1>统计日报(按年、月、季度查询请点击<a href="statisticsDailyCalc2.html" target="_blank">【统计查询】</a>)</h1>
  32 + </div>
  33 +</div>
  34 +
  35 +<!-- <div class="row"> -->
  36 + <div class="col-md-12 portlet light porttlet-fit bordered" style="height:calc(100% - 56px)">
  37 +<!-- <div> -->
  38 + <div class="portlet-title">
  39 + <form class="form-inline" action="">
  40 + <div style="display: inline-block;margin-left: 29px; " id="gsdmDiv">
  41 + <span class="item-label" style="width: 80px;">公司: </span>
  42 + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
  43 + </div>
  44 + <div style="display: inline-block; margin-left: 29px;" id="fgsdmDiv">
  45 + <span class="item-label" style="width: 80px;">分公司: </span>
  46 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>
  47 + </div>
  48 + <div style="display: inline-block;margin-left: 42px;">
  49 + <span class="item-label" style="width: 80px;">线路: </span>
  50 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  51 + </div>
  52 + <div style="margin-top: 3px"></div>
  53 + <div style="display: inline-block;">
  54 + <span class="item-label" style="width: 80px;">线路性质: </span>
  55 + <select
  56 + class="form-control" name="nature" id="nature"
  57 + style="width: 180px;">
  58 + <option value="0">全部线路</option>
  59 + <option value="1" selected="selected">营运线路</option>
  60 + <option value="2">非营运线路</option>
  61 + </select>
  62 + </div>
  63 + <div style="display: inline-block;margin-left: 15px;">
  64 + <span class="item-label" style="width: 80px;">开始时间: </span>
  65 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  66 + </div>
  67 + <div style="display: inline-block;margin-left: 15px;">
  68 + <span class="item-label" style="width: 80px;">结束时间: </span>
  69 + <input class="form-control" type="text" id="date2" style="width: 180px;"/>
  70 + </div>
  71 + <div class="form-group">
  72 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  73 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  74 + <input class="btn btn-default" type="button" id="exportAll" value="导出全部公司" style="display: none;"/>
  75 + </div>
  76 + </form>
  77 + </div>
  78 + <div class="portlet-body" id="tjrbBody" style="overflow:auto;height: calc(100% - 80px)">
  79 + <div class="table-container" style="margin-top: 10px;min-width: 906px">
  80 + <label>早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
  81 + <table class="table table-bordered table-hover table-checkable" id="forms">
  82 + <thead>
  83 + <tr>
  84 + <th colspan="45"><label id="tjrq"></label> 线路统计日报</th>
  85 + </tr>
  86 + <tr>
  87 + <td rowspan="3"><span >分公司</span></td>
  88 + <td rowspan="3"><span >路线名</span></td>
  89 + <td colspan="21">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td>
  90 + <td colspan="15">全日营运班次</td>
  91 + <td colspan="9">大间隔情况</td>
  92 + </tr>
  93 + <tr>
  94 + <td rowspan="2"><label>计划总</label>
  95 + <label>公里&nbsp;&nbsp;&nbsp;</label></td>
  96 + <td rowspan="2"><label>计划营</label><label>运公里</label></td>
  97 + <td rowspan="2"><label>计划空</label><label>驶公里</label></td>
  98 + <td rowspan="2"><label>实际</label><label>总公里</label></td>
  99 + <td rowspan="2"><label>实际营</label><label>运公里</label></td>
  100 + <td rowspan="2"><label>实际空</label><label>驶公里</label></td>
  101 + <td rowspan="2"><span>少驶公里</span></td>
  102 + <td rowspan="2"><span>少驶班次</span></td>
  103 + <td colspan="11">少驶原因(公里)</td>
  104 + <td colspan="2">临加公里</td>
  105 + <td colspan="3">计划班次</td>
  106 + <td colspan="3">实际班次</td>
  107 + <td colspan="3">临加班次</td>
  108 + <td colspan="3">放站班次</td>
  109 + <td colspan="3">调头班次</td>
  110 + <td colspan="3">发生次数</td>
  111 + <td rowspan="2">最大间隔时间(分)</td>
  112 + <td rowspan="2">原因</td>
  113 + </tr>
  114 + <tr>
  115 + <td><span >路阻</span></td>
  116 + <td><span>吊慢</span></td>
  117 + <td><span >故障</span></td>
  118 + <td><span >纠纷</span></td>
  119 + <td><span >肇事</span></td>
  120 + <td><span>缺人</span></td>
  121 + <td><span>缺车</span></td>
  122 + <td><span >客稀</span></td>
  123 + <td><span>气候</span></td>
  124 + <td><span>援外</span></td>
  125 + <td><span>其他</span></td>
  126 + <td><span>营运</span></td>
  127 + <td><span>空驶</span></td>
  128 + <td><span>全日</span></td>
  129 + <td><span>早高峰</span></td>
  130 + <td><span>晚高峰</span></td>
  131 + <td><span>全日</span></td>
  132 + <td><span>早高峰</span></td>
  133 + <td><span>晚高峰</span></td>
  134 + <td><span>全日</span></td>
  135 + <td><span>早高峰</span></td>
  136 + <td><span>晚高峰</span></td>
  137 + <td><span>全日</span></td>
  138 + <td><span>早高峰</span></td>
  139 + <td><span>晚高峰</span></td>
  140 + <td><span>全日</span></td>
  141 + <td><span>早高峰</span></td>
  142 + <td><span>晚高峰</span></td>
  143 + <td><span>全日</span></td>
  144 + <td><span>早高峰</span></td>
  145 + <td><span>晚高峰</span></td>
  146 + </tr>
  147 + </thead>
  148 + <tbody class="statisticsDaily">
  149 +
  150 + </tbody>
  151 + </table>
  152 + </div>
  153 + </div>
  154 + </div>
  155 +
  156 +<script>
  157 + $(function(){
  158 + $('#export').attr('disabled', "true");
  159 +
  160 + // 关闭左侧栏
  161 + if (!$('body').hasClass('page-sidebar-closed'))
  162 + $('.menu-toggler.sidebar-toggler').click();
  163 + var d = new Date();
  164 + var year = d.getFullYear();
  165 + var month = d.getMonth() + 1;
  166 + var day = d.getDate();
  167 + if(month < 10)
  168 + month = "0" + month;
  169 + if(day < 10)
  170 + day = "0" + day;
  171 +
  172 + var dateTime=year + "-" + month + "-" + day;
  173 + $("#date").val(dateTime);
  174 + $("#date2").val(dateTime);
  175 + $("#date").datetimepicker({
  176 + format : 'YYYY-MM-DD',
  177 + locale : 'zh-cn',
  178 + maxDate : dateTime
  179 + });
  180 +
  181 + $("#date2").datetimepicker({
  182 + format : 'YYYY-MM-DD',
  183 + locale : 'zh-cn',
  184 + maxDate : dateTime
  185 + });
  186 +
  187 +
  188 + var fage=true;
  189 + var obj = [];
  190 + var xlList;
  191 + $.get('/report/lineList',function(result){
  192 + xlList=result;
  193 + $.get('/user/companyData', function(result){
  194 + obj = result;
  195 + var options = '';
  196 + for(var i = 0; i < obj.length; i++){
  197 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  198 + }
  199 +
  200 + if(obj.length ==0){
  201 + $("#gsdmDiv").css('display','none');
  202 + }else if(obj.length ==1){
  203 + $("#gsdmDiv").css('display','none');
  204 + if(obj[0].children.length == 1 || obj[0].children.length ==0){
  205 + fage=false;
  206 + $('#fgsdmDiv').css('display','none');
  207 + }
  208 + }
  209 + $('#gsdm').html(options);
  210 + updateCompany();
  211 + });
  212 + })
  213 + $("#gsdm").on("change",updateCompany);
  214 + function updateCompany(){
  215 + var company = $('#gsdm').val();
  216 + var options = '';
  217 + if(fage){
  218 + options = '<option value="">请选择</option>';
  219 + }
  220 + for(var i = 0; i < obj.length; i++){
  221 + if(obj[i].companyCode == company){
  222 + var children = obj[i].children;
  223 + for(var j = 0; j < children.length; j++){
  224 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  225 + }
  226 + }
  227 + }
  228 + $('#fgsdm').html(options);
  229 +// initXl();
  230 + }
  231 +
  232 + var tempData = {};
  233 + $.get('/report/lineList',function(xlList){
  234 + var data = [];
  235 + data.push({id: " ", text: "全部线路"});
  236 + $.get('/user/companyData', function(result){
  237 + for(var i = 0; i < result.length; i++){
  238 + var companyCode = result[i].companyCode;
  239 + var children = result[i].children;
  240 + for(var j = 0; j < children.length; j++){
  241 + var code = children[j].code;
  242 + for(var k=0;k < xlList.length;k++ ){
  243 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  244 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  245 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  246 + }
  247 + }
  248 + }
  249 + }
  250 + initPinYinSelect2('#line',data,'');
  251 +
  252 + });
  253 + });
  254 +
  255 + $("#line").on("change", function(){
  256 + if($("#line").val() == " "){
  257 + $("#gsdm").attr("disabled", false);
  258 + $("#fgsdm").attr("disabled", false);
  259 + } else {
  260 + var temp = (tempData[$("#line").val()] ? tempData[$("#line").val()] : " : ").split(":");
  261 + $("#gsdm").val(temp[0]);
  262 + updateCompany();
  263 + $("#nature").val(0);
  264 + $("#fgsdm").val(temp[1]);
  265 + $("#gsdm").attr("disabled", true);
  266 + $("#fgsdm").attr("disabled", true);
  267 + }
  268 + });
  269 +
  270 +
  271 + var line ="";
  272 + var xlName ="";
  273 + var date = "";
  274 + var date2 ="";
  275 + var gsdm="";
  276 + var fgsdm="";
  277 + var nature="";
  278 + var time1="";
  279 + var time2="";
  280 + $("#query").on("click",function(){
  281 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  282 + layer.msg("请选择时间范围!");
  283 + return;
  284 + }
  285 + if($("#date2").val() == null || $("#date2").val().trim().length == 0){
  286 + layer.msg("请选择时间范围!");
  287 + return;
  288 + }
  289 +// $("#tjrbBody").height($(window).height()-100);
  290 + line = $("#line").val();
  291 + date = $("#date").val();
  292 + date2 =$("#date2").val();
  293 + gsdm =$("#gsdm").val();
  294 + fgsdm=$("#fgsdm").val();
  295 + nature=$("#nature").val();
  296 + xlName = $("#select2-line-container").html();
  297 + if(xlName == "全部线路")
  298 + xlName = $('#fgsdm option:selected').text();
  299 + if(xlName == "请选择")
  300 + xlName = $('#gsdm option:selected').text();
  301 + if(line=="请选择"){
  302 + line="";
  303 + }
  304 + time1 = Date.parse(new Date(date));
  305 + time2 = Date.parse(new Date(date2));
  306 + if(date==null || date =="" ||date2==null || date2 ==""){
  307 + layer.msg('请选择时间段.');
  308 + }else if(time2<time1){
  309 + layer.msg('结束日期不能小于开始日期.');
  310 + }else{
  311 + if((time2-time1)>2678400000){
  312 + layer.msg('查询超过一个月请点击【统计查询】.');
  313 + }else{
  314 + $("#tjrq").html(date+"至"+date2);
  315 + var params = {};
  316 + params['gsdm'] = gsdm;
  317 + params['fgsdm'] =fgsdm ;
  318 + params['line'] = line;
  319 + params['date'] = date;
  320 + params['date2'] = date2;
  321 + params['xlName'] = xlName;
  322 + params['nature'] = nature;
  323 + params['type'] = "query";
  324 + var i = layer.load(2);
  325 + $get('/realSchedule/statisticsDailyTj',params,function(result){
  326 + // 把数据填充到模版中
  327 + var tbodyHtml = template('statisticsDaily',{list:result});
  328 + // 把渲染好的模版html文本追加到表格中
  329 + $('#forms .statisticsDaily').html(tbodyHtml);
  330 + layer.close(i);
  331 +
  332 + if(result.length == 0){
  333 + $("#export").attr('disabled',"true");
  334 + }else{
  335 + $("#export").removeAttr("disabled");
  336 + }
  337 + });
  338 + }
  339 +
  340 + }
  341 +
  342 + });
  343 +// $("#tjrbBody").height($(window).height()-100);
  344 + $("#export").on("click",function(){
  345 + var params = {};
  346 + params['gsdm'] = gsdm;
  347 + params['fgsdm'] =fgsdm;
  348 + params['line'] = line;
  349 + date = $("#date").val();
  350 + date2 =$("#date2").val();
  351 + params['date'] = date;
  352 + params['date2'] = date2;
  353 + params['xlName'] = xlName;
  354 + params['nature'] = nature;
  355 + params['type'] = "export";
  356 + if((time2-time1)>2678400000){
  357 + layer.msg('查询超过一个月请点击【统计查询】.');
  358 + }else{
  359 + var i = layer.load(2);
  360 + $get('/realSchedule/statisticsDailyTj',params,function(result){
  361 + var dateTime = "";
  362 + if(date == date2){
  363 + dateTime = moment(date).format("YYYYMMDD");
  364 + } else {
  365 + dateTime = moment(date).format("YYYYMMDD")
  366 + +"-"+moment(date2).format("YYYYMMDD");
  367 + }
  368 + window.open("/downloadFile/download?fileName="
  369 + +dateTime+"-"+xlName+"-统计日报");
  370 + layer.close(i);
  371 + });
  372 + }
  373 + });
  374 +
  375 +
  376 + $.get('/user/getCurrentUser', function(result){
  377 + var roleName = "";
  378 + $(result.roles).each(function(i, e){
  379 + roleName += e.roleName + "、";
  380 + });
  381 + if(roleName.indexOf("浦交") > -1 || roleName.indexOf("拓华") > -1){
  382 + $("#exportAll").show();
  383 + }
  384 + });
  385 + $("#exportAll").on("click",function(){
  386 + var params = {};
  387 + date = $("#date").val();
  388 + date2 =$("#date2").val();
  389 + params['date'] = date;
  390 + params['date2'] = date2;
  391 + params['nature'] = nature;
  392 + params['type'] = "exportAll";
  393 + if((time2-time1)>2678400000){
  394 + layer.msg('查询超过一个月请点击【统计查询】.');
  395 + }else{
  396 + var i = layer.load(2);
  397 + $get('/realSchedule/statisticsDailyTj',params,function(result){
  398 + var dateTime = "";
  399 + if(date == date2){
  400 + dateTime = moment(date).format("YYYYMMDD");
  401 + } else {
  402 + dateTime = moment(date).format("YYYYMMDD")
  403 + +"-"+moment(date2).format("YYYYMMDD");
  404 + }
  405 + window.open("/downloadFile/download?fileName="
  406 + +dateTime+"-全部公司-统计日报");
  407 + layer.close(i);
  408 + });
  409 + }
  410 + });
  411 +
  412 + });
  413 +</script>
  414 +<script type="text/html" id="statisticsDaily">
  415 + {{each list as obj i}}
  416 + <tr {{if obj.zt==1}}style='color: red'{{/if}}>
  417 + <td>{{obj.fgsName}}</td>
  418 + <td>{{obj.xlName}}</td>
  419 + <td>{{obj.jhzlc}}</td>
  420 + <td>{{obj.jhlc}}</td>
  421 + <td>{{obj.jcclc}}</td>
  422 + <td>{{obj.sjzgl}}</td>
  423 + <td>{{obj.sjgl}}</td>
  424 + <td>{{obj.sjksgl}}</td>
  425 + <td>{{obj.ssgl}}</td>
  426 + <td>{{obj.ssbc}}</td>
  427 + <td>{{obj.ssgl_lz}}</td>
  428 + <td>{{obj.ssgl_dm}}</td>
  429 + <td>{{obj.ssgl_gz}}</td>
  430 + <td>{{obj.ssgl_jf}}</td>
  431 + <td>{{obj.ssgl_zs}}</td>
  432 + <td>{{obj.ssgl_qr}}</td>
  433 + <td>{{obj.ssgl_qc}}</td>
  434 + <td>{{obj.ssgl_kx}}</td>
  435 + <td>{{obj.ssgl_qh}}</td>
  436 + <td>{{obj.ssgl_yw}}</td>
  437 + <td>{{obj.ssgl_other}}</td>
  438 + <td>{{obj.ljgl}}</td>
  439 + <td>{{obj.ljks}}</td>
  440 + <td>{{obj.jhbc}}</td>
  441 + <td>{{obj.jhbc_m}}</td>
  442 + <td>{{obj.jhbc_a}}</td>
  443 + <td>{{obj.sjbc}}</td>
  444 + <td>{{obj.sjbc_m}}</td>
  445 + <td>{{obj.sjbc_a}}</td>
  446 + <td>{{obj.ljbc}}</td>
  447 + <td>{{obj.ljbc_m}}</td>
  448 + <td>{{obj.ljbc_a}}</td>
  449 + <td>{{obj.fzbc}}</td>
  450 + <td>{{obj.fzbc_m}}</td>
  451 + <td>{{obj.fzbc_a}}</td>
  452 + <td>{{obj.dtbc}}</td>
  453 + <td>{{obj.dtbc_m}}</td>
  454 + <td>{{obj.dtbc_a}}</td>
  455 + <td>{{obj.djg}}</td>
  456 + <td>{{obj.djg_m}}</td>
  457 + <td>{{obj.djg_a}}</td>
  458 + <td>{{obj.djg_time}}</td>
  459 + <td>&nbsp;</td>
  460 + </tr>
  461 + {{/each}}
  462 + {{if list.length == 0}}
  463 + <tr>
  464 + <td colspan="44"><h6 class="muted">没有找到相关数据</h6></td>
  465 + </tr>
  466 + {{/if}}
428 467 </script>
429 468 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
... ... @@ -71,6 +71,7 @@
71 71 <div class="form-group">
72 72 <input class="btn btn-default" type="button" id="query" value="查询"/>
73 73 <input class="btn btn-default" type="button" id="export" value="导出"/>
  74 + <input class="btn btn-default" type="button" id="exportAll" value="导出全部公司" style="display: none;"/>
74 75 </div>
75 76 </form>
76 77 </div>
... ... @@ -353,6 +354,40 @@
353 354 layer.close(i);
354 355 });
355 356 });
  357 +
  358 +
  359 + $.get('/user/getCurrentUser', function(result){
  360 + var roleName = "";
  361 + $(result.roles).each(function(i, e){
  362 + roleName += e.roleName + "、";
  363 + });
  364 + if(roleName.indexOf("浦交") > -1 || roleName.indexOf("拓华") > -1){
  365 + $("#exportAll").show();
  366 + }
  367 + });
  368 + $("#exportAll").on("click",function(){
  369 + var params = {};
  370 + date = $("#date").val();
  371 + date2 =$("#date2").val();
  372 + params['date'] = date;
  373 + params['date2'] = date2;
  374 + params['nature'] = nature;
  375 + params['type'] = "exportAll";
  376 + var i = layer.load(2);
  377 +// $get('/realSchedule/statisticsDailyTj',params,function(result){
  378 + $get('/calcWaybill/calcStatisticsDaily',params,function(result){
  379 + var dateTime = "";
  380 + if(date == date2){
  381 + dateTime = moment(date).format("YYYYMMDD");
  382 + } else {
  383 + dateTime = moment(date).format("YYYYMMDD")
  384 + +"-"+moment(date2).format("YYYYMMDD");
  385 + }
  386 + window.open("/downloadFile/download?fileName="
  387 + +dateTime+"-全部公司-统计日报");
  388 + layer.close(i);
  389 + });
  390 + });
356 391  
357 392 });
358 393 </script>
... ...