Commit 8e3f5c4941ed8523f0ac131c63da696c816ae957

Authored by 廖磊
1 parent cf8d49f2

调度日报添加青浦格式导出

src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
@@ -515,6 +515,11 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, @@ -515,6 +515,11 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo,
515 return scheduleRealInfoService.realScheduleList(line,date); 515 return scheduleRealInfoService.realScheduleList(line,date);
516 } 516 }
517 517
  518 + @RequestMapping(value="/realScheduleList_zrw")
  519 + public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){
  520 + return scheduleRealInfoService.realScheduleList_zrw(line,date);
  521 + }
  522 +
518 @RequestMapping(value="/realScheduleList_mh_2") 523 @RequestMapping(value="/realScheduleList_mh_2")
519 public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){ 524 public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){
520 return scheduleRealInfoService.realScheduleList_mh_2(line,date); 525 return scheduleRealInfoService.realScheduleList_mh_2(line,date);
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
@@ -132,8 +132,8 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L @@ -132,8 +132,8 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
132 132
133 Long getMaxId(); 133 Long getMaxId();
134 Map<String,Object> scheduleDaily(String line,String date); 134 Map<String,Object> scheduleDaily(String line,String date);
135 -  
136 List<ScheduleRealInfo> realScheduleList(String line,String date); 135 List<ScheduleRealInfo> realScheduleList(String line,String date);
  136 + List<ScheduleRealInfo> realScheduleList_zrw(String line,String date);
137 List<ScheduleRealInfo> realScheduleListQp(String line,String date); 137 List<ScheduleRealInfo> realScheduleListQp(String line,String date);
138 138
139 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm,String jGh,String nbbm); 139 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm,String jGh,String nbbm);
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -3433,6 +3433,195 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3433,6 +3433,195 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3433 } 3433 }
3434 3434
3435 @Override 3435 @Override
  3436 + public List<ScheduleRealInfo> realScheduleList_zrw(String line, String date) {
  3437 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
  3438 + String lpName = "lpName";
  3439 + String zdsj = "";
  3440 + String zdsjActual = "";
  3441 + String zdsj1 = "";
  3442 + String zdsjActual1 = "";
  3443 + List<ScheduleRealInfo> listInfo = scheduleRealInfoRepository.scheduleDdrb(line, date);
  3444 +
  3445 + /*
  3446 + * 对计划发车时间相同的班次进行排序 out最前 in最后
  3447 + */
  3448 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
  3449 + String minfcsj = "02:00";
  3450 + List<Line> lineList = lineRepository.findLineByCode(line);
  3451 + if (lineList.size() > 0) {
  3452 + String sqlMinYysj = "select start_opt from bsth_c_line_config where "
  3453 + + " id = ("
  3454 + + "select max(id) from bsth_c_line_config where line ='" + lineList.get(0).getId() + "'"
  3455 + + ")";
  3456 + minfcsj = jdbcTemplate.queryForObject(sqlMinYysj, String.class);
  3457 + }
  3458 + String[] minSjs = minfcsj.split(":");
  3459 + Long minSj = Long.parseLong(minSjs[0]) * 60 + Long.parseLong(minSjs[1]);
  3460 + for (int i = 0; i < listInfo.size(); i++) {
  3461 + ScheduleRealInfo s = listInfo.get(i);
  3462 + if (s.getBcType().equals("out")) {
  3463 + s.setRemark("1");
  3464 + } else if (s.getBcType().equals("in")) {
  3465 + s.setRemark("3");
  3466 + } else {
  3467 + s.setRemark("2");
  3468 + }
  3469 + String[] fcsj = s.getFcsj().split(":");
  3470 + Long fcsjL = Long.parseLong(fcsj[0]) * 60 + Long.parseLong(fcsj[1]);
  3471 +
  3472 + Long fscjT = 0L;
  3473 + if (fcsjL < minSj) {
  3474 + Calendar calendar = new GregorianCalendar();
  3475 + calendar.setTime(s.getScheduleDate());
  3476 + calendar.add(calendar.DATE, 1);
  3477 + s.setScheduleDate(calendar.getTime());
  3478 + try {
  3479 + fscjT = sdf.parse(sdf.format(s.getScheduleDate()) + " " + s.getFcsj()).getTime();
  3480 + } catch (ParseException e) {
  3481 + // TODO Auto-generated catch block
  3482 + e.printStackTrace();
  3483 + }
  3484 +
  3485 + } else {
  3486 + try {
  3487 + fscjT = sdf.parse(s.getScheduleDateStr() + " " + s.getFcsj()).getTime();
  3488 + } catch (ParseException e) {
  3489 + // TODO Auto-generated catch block
  3490 + e.printStackTrace();
  3491 + }
  3492 + ;
  3493 + }
  3494 + s.setFcsjT(fscjT);
  3495 + }
  3496 +
  3497 +// Collections.sort(listInfo, new compareLpFcsjType());
  3498 + List<ScheduleRealInfo> listInfo2=new ArrayList<ScheduleRealInfo>();
  3499 +
  3500 + Collections.sort(listInfo, new compareLpFcsjType());
  3501 + for (int i = 0; i < listInfo.size(); i++) {
  3502 + ScheduleRealInfo t = listInfo.get(i);
  3503 + if (!lpName.equals(t.getLpName())) {
  3504 + zdsjActual = t.getZdsjActual();
  3505 + zdsj = t.getZdsj();
  3506 + t.setZdsjActual("");
  3507 + t.setZdsj("");
  3508 + } else {
  3509 + zdsj1 = t.getZdsj();
  3510 + zdsjActual1 = t.getZdsjActual();
  3511 + t.setZdsjActual(zdsjActual);
  3512 + t.setZdsj(zdsj);
  3513 + zdsj = zdsj1;
  3514 + zdsjActual = zdsjActual1;
  3515 + }
  3516 +
  3517 +
  3518 +
  3519 + lpName = t.getLpName();
  3520 + listInfo2.add(t);
  3521 +
  3522 + }
  3523 +
  3524 + Collections.sort(listInfo2,new compareDirLpFcsjType());
  3525 + for (int i = 0; i < listInfo2.size(); i++) {
  3526 + ScheduleRealInfo t=listInfo2.get(i);
  3527 + list.add(t);
  3528 + Set<ChildTaskPlan> childTaskPlans = t.getcTasks();
  3529 + //计算营运里程,空驶里程
  3530 + if (!childTaskPlans.isEmpty()) {
  3531 + List<ChildTaskPlan> listit = new ArrayList<ChildTaskPlan>(childTaskPlans);
  3532 + Collections.sort(listit, new ComparableChild());
  3533 + for (int j = 0; j < listit.size(); j++) {
  3534 + ScheduleRealInfo s = new ScheduleRealInfo();
  3535 + ChildTaskPlan childTaskPlan = listit.get(j);
  3536 + if (childTaskPlan.getCcId() == null) {
  3537 + if (childTaskPlan.isDestroy()) {
  3538 + s.setFcsjActual("");
  3539 + s.setZdsjActual("");
  3540 + } else {
  3541 + s.setFcsjActual(childTaskPlan.getStartDate());
  3542 + s.setZdsjActual("");
  3543 + s.setJhlc(Double.parseDouble(String.valueOf(childTaskPlan.getMileage())));
  3544 + }
  3545 + s.setFcsj(childTaskPlan.getStartDate());
  3546 + s.setZdsj("");
  3547 + s.setQdzName(childTaskPlan.getStartStationName());
  3548 + s.setZdzName(childTaskPlan.getEndStationName());
  3549 + s.setRemarks(childTaskPlan.getRemarks());
  3550 + s.setAdjustExps("子");
  3551 + s.setLpName("");
  3552 + list.add(s);
  3553 + }
  3554 + }
  3555 + }
  3556 + }
  3557 + List<ScheduleRealInfo> xList = new ArrayList<ScheduleRealInfo>();
  3558 + List<ScheduleRealInfo> yList = new ArrayList<ScheduleRealInfo>();
  3559 + List<ScheduleRealInfo> zList = new ArrayList<ScheduleRealInfo>();
  3560 + List<ScheduleRealInfo> newList = new ArrayList<ScheduleRealInfo>();
  3561 + if (list.size() > 0) {
  3562 + int a = list.size() % 3;
  3563 + int b = list.size() / 3;
  3564 + int x = 0, y = 0;
  3565 + if (a == 2) {
  3566 + x = b + 1;
  3567 + y = x * 2;
  3568 + } else if (a == 1) {
  3569 + x = b + 1;
  3570 + y = x * 2 - 1;
  3571 + } else {
  3572 + x = b;
  3573 + y = 2 * x;
  3574 +
  3575 + }
  3576 + for (int i = 0; i < list.size(); i++) {
  3577 + ScheduleRealInfo s = list.get(i);
  3578 + if (i + 1 <= x) {
  3579 + xList.add(s);
  3580 + } else if ((i + 1) > x && (i + 1) <= y) {
  3581 + yList.add(s);
  3582 + } else {
  3583 + zList.add(s);
  3584 + }
  3585 + }
  3586 + for (int i = 0; i < x; i++) {
  3587 + newList.add(xList.get(i));
  3588 + if (yList.size() > i) {
  3589 + newList.add(yList.get(i));
  3590 + } else {
  3591 + newList.add(new ScheduleRealInfo());
  3592 + }
  3593 + if (zList.size() > i) {
  3594 + newList.add(zList.get(i));
  3595 + } else {
  3596 + newList.add(new ScheduleRealInfo());
  3597 + }
  3598 +
  3599 + }
  3600 + }
  3601 + /* for (int i = 0; i < newList.size(); i++) {
  3602 + ScheduleRealInfo t1 = newList.get(i);
  3603 + for (int j = 0; j < list.size(); j++) {
  3604 + ScheduleRealInfo t2 = list.get(j);
  3605 + if (t1.getId() == t2.getId()) {
  3606 + t1 = t2;
  3607 + }
  3608 + }
  3609 + }*/
  3610 +
  3611 + for (int i = 0; i < newList.size(); i++) {
  3612 + ScheduleRealInfo t1 = newList.get(i);
  3613 + String reamrks1 = t1.getRemarks() == null ? "" : t1.getRemarks();
  3614 + if (reamrks1.length() > 4) {
  3615 + t1.setRemarks(reamrks1.substring(0, 4));
  3616 + t1.setRemark(reamrks1);
  3617 + } else {
  3618 + t1.setRemark(reamrks1);
  3619 + }
  3620 + }
  3621 + return newList;
  3622 + }
  3623 +
  3624 + @Override
3436 public List<ScheduleRealInfo> realScheduleList_mh_2(String line, String date) { 3625 public List<ScheduleRealInfo> realScheduleList_mh_2(String line, String date) {
3437 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); 3626 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
3438 String lpName = "lpName"; 3627 String lpName = "lpName";
@@ -4774,13 +4963,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4774,13 +4963,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4774 String xlName = map.get("xlName").toString(); 4963 String xlName = map.get("xlName").toString();
4775 String state = map.get("state").toString(); 4964 String state = map.get("state").toString();
4776 String type = map.get("type").toString(); 4965 String type = map.get("type").toString();
4777 - 4966 + String genre =map.get("genre").toString();
4778 List<Map<String, Object>> dataList2 = new ArrayList<Map<String, Object>>(); 4967 List<Map<String, Object>> dataList2 = new ArrayList<Map<String, Object>>();
4779 List<Map<String, Object>> dataList3 = new ArrayList<Map<String, Object>>(); 4968 List<Map<String, Object>> dataList3 = new ArrayList<Map<String, Object>>();
4780 List<Map<String, Object>> list1 = this.statisticsDaily(line, date, xlName, null); 4969 List<Map<String, Object>> list1 = this.statisticsDaily(line, date, xlName, null);
4781 List<ScheduleRealInfo> list2 = this.queryUserInfo(line, date, state); 4970 List<ScheduleRealInfo> list2 = this.queryUserInfo(line, date, state);
4782 - List<ScheduleRealInfo> list3 = this.realScheduleList(line, date);  
4783 - 4971 + List<ScheduleRealInfo> list3 = new ArrayList<ScheduleRealInfo>();
  4972 + if(genre.equals("qp"))
  4973 + list3=this.realScheduleListQp(line, date);
  4974 + else if(genre.equals("zrw"))
  4975 + list3=this.realScheduleList_zrw(line, date);
  4976 + else
  4977 + list3=this.realScheduleList(line, date);
4784 Map<String, Object> nMap = new HashMap<String, Object>(); 4978 Map<String, Object> nMap = new HashMap<String, Object>();
4785 nMap.put("date", xlName + date); 4979 nMap.put("date", xlName + date);
4786 nMap.put("jls", list1.get(0).get("jls")); 4980 nMap.put("jls", list1.get(0).get("jls"));
@@ -4908,7 +5102,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4908,7 +5102,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4908 } 5102 }
4909 } 5103 }
4910 tempMap.put("zdsjk" + x, zdsjk); 5104 tempMap.put("zdsjk" + x, zdsjk);
4911 - tempMap.put("zdsjm" + x, zdsjm); 5105 + tempMap.put("zdsjm" + x, zdsjm.equals("0")?"":zdsjm);
4912 tempMap.put("fcsj" + x, schedule.getFcsj()); 5106 tempMap.put("fcsj" + x, schedule.getFcsj());
4913 String fcsjActural = schedule.getFcsjActual() != null ? schedule.getFcsjActual() : ""; 5107 String fcsjActural = schedule.getFcsjActual() != null ? schedule.getFcsjActual() : "";
4914 String bcType = schedule.getBcType() != null ? schedule.getBcType() : ""; 5108 String bcType = schedule.getBcType() != null ? schedule.getBcType() : "";
@@ -4935,7 +5129,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -4935,7 +5129,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4935 } 5129 }
4936 } 5130 }
4937 tempMap.put("fcsjk" + x, fcsjk); 5131 tempMap.put("fcsjk" + x, fcsjk);
4938 - tempMap.put("fcsjm" + x, fcsjm); 5132 + tempMap.put("fcsjm" + x, fcsjm.equals("0")?"":fcsjm);
4939 tempMap.put("remarks" + x, schedule.getRemark() != null ? schedule.getRemark() : ""); 5133 tempMap.put("remarks" + x, schedule.getRemark() != null ? schedule.getRemark() : "");
4940 5134
4941 size++; 5135 size++;
src/main/resources/static/pages/electricity/list/list.html
@@ -273,7 +273,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -273,7 +273,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
273 if ($("#rq").val() != "") { 273 if ($("#rq").val() != "") {
274 var params=getParamsList(); 274 var params=getParamsList();
275 $get('/ylb/checkDate',params,function(status){ 275 $get('/ylb/checkDate',params,function(status){
276 - if(status=='3'){ 276 + if(status=='2'){
277 layer.msg('只能操作三天内数据.'); 277 layer.msg('只能操作三天内数据.');
278 }else{ 278 }else{
279 var i = layer.load(2); 279 var i = layer.load(2);
@@ -294,7 +294,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -294,7 +294,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
294 if ($("#rq").val() != "") { 294 if ($("#rq").val() != "") {
295 var params=getParamsList(); 295 var params=getParamsList();
296 $get('/ylb/checkDate',params,function(status){ 296 $get('/ylb/checkDate',params,function(status){
297 - if(status=='3'){ 297 + if(status=='2'){
298 layer.msg('只能操作三天内数据.'); 298 layer.msg('只能操作三天内数据.');
299 }else{ 299 }else{
300 var i = layer.load(2); 300 var i = layer.load(2);
@@ -314,7 +314,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -314,7 +314,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
314 $("#saveButton").on('click',function(){ 314 $("#saveButton").on('click',function(){
315 var params_=getParamsList(); 315 var params_=getParamsList();
316 $get('/ylb/checkDate',params_,function(status){ 316 $get('/ylb/checkDate',params_,function(status){
317 - if(status=='3'){ 317 + if(status=='2'){
318 layer.msg('只能操作三天内数据.'); 318 layer.msg('只能操作三天内数据.');
319 }else{ 319 }else{
320 var ylArray = []; 320 var ylArray = [];
@@ -426,7 +426,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -426,7 +426,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
426 if ($("#rq").val() != "") { 426 if ($("#rq").val() != "") {
427 var params=getParamsList(); 427 var params=getParamsList();
428 $get('/ylb/checkDate',params,function(status){ 428 $get('/ylb/checkDate',params,function(status){
429 - if(status=='3'){ 429 + if(status=='2'){
430 layer.msg('只能操作三天内数据.'); 430 layer.msg('只能操作三天内数据.');
431 }else{ 431 }else{
432 var i = layer.load(2); 432 var i = layer.load(2);
@@ -590,7 +590,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -590,7 +590,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
590 var params=getParamsList(); 590 var params=getParamsList();
591 var id = $(this).data('id'); 591 var id = $(this).data('id');
592 $get('/ylb/checkDate',params,function(status){ 592 $get('/ylb/checkDate',params,function(status){
593 - if(status=='3'){ 593 + if(status=='2'){
594 layer.msg('只能操作三天内数据.'); 594 layer.msg('只能操作三天内数据.');
595 }else{ 595 }else{
596 var jsy=$('.in_carpark_jsy[data-id='+id+']', '#dl_oil_list').val(); 596 var jsy=$('.in_carpark_jsy[data-id='+id+']', '#dl_oil_list').val();
@@ -734,7 +734,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep @@ -734,7 +734,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
734 $('#removeButton').on('click', function () { 734 $('#removeButton').on('click', function () {
735 var params_=getParamsList(); 735 var params_=getParamsList();
736 $get('/ylb/checkDate',params_,function(status){ 736 $get('/ylb/checkDate',params_,function(status){
737 - if(status=='3'){ 737 + if(status=='2'){
738 layer.msg('只能操作三天内数据.'); 738 layer.msg('只能操作三天内数据.');
739 }else{ 739 }else{
740 var idArray = []; 740 var idArray = [];
src/main/resources/static/pages/forms/statement/historyMessage.html
@@ -159,7 +159,7 @@ @@ -159,7 +159,7 @@
159 var type = "query"; 159 var type = "query";
160 $(".hidden").removeClass("hidden"); 160 $(".hidden").removeClass("hidden");
161 var i = layer.load(2); 161 var i = layer.load(2);
162 - if(code==""||code==null){ 162 +// if(code==""||code==null){
163 $get('/realSchedule/historyMessage',{line:line,date:date,code:code,type:type},function(result){ 163 $get('/realSchedule/historyMessage',{line:line,date:date,code:code,type:type},function(result){
164 // 把数据填充到模版中 164 // 把数据填充到模版中
165 var tbodyHtml = template('list_history',{list:result}); 165 var tbodyHtml = template('list_history',{list:result});
@@ -173,7 +173,7 @@ @@ -173,7 +173,7 @@
173 $("#export").removeAttr("disabled"); 173 $("#export").removeAttr("disabled");
174 174
175 }); 175 });
176 - }else{ 176 + /* }else{
177 $get('/report/historyMessageList',{line:line,date:date,code:code,type:type},function(result){ 177 $get('/report/historyMessageList',{line:line,date:date,code:code,type:type},function(result){
178 // 把数据填充到模版中 178 // 把数据填充到模版中
179 var tbodyHtml = template('list_history_msg',{list:result}); 179 var tbodyHtml = template('list_history_msg',{list:result});
@@ -187,21 +187,21 @@ @@ -187,21 +187,21 @@
187 $("#export").removeAttr("disabled"); 187 $("#export").removeAttr("disabled");
188 188
189 }); 189 });
190 - } 190 + } */
191 191
192 }); 192 });
193 193
194 $("#export").on("click",function(){ 194 $("#export").on("click",function(){
195 var type = "export"; 195 var type = "export";
196 var i = layer.load(2); 196 var i = layer.load(2);
197 - if(code==""||code==null){ 197 +// if(code==""||code==null){
198 $get('/realSchedule/historyMessage', {line:line,date:date,code:code,type:type}, function(result){ 198 $get('/realSchedule/historyMessage', {line:line,date:date,code:code,type:type}, function(result){
199 window.open("/downloadFile/download?fileName=" 199 window.open("/downloadFile/download?fileName="
200 +moment(date).format("YYYYMMDD") 200 +moment(date).format("YYYYMMDD")
201 +"-"+lineName+"-调度历史消息"); 201 +"-"+lineName+"-调度历史消息");
202 layer.close(i); 202 layer.close(i);
203 }); 203 });
204 - }else{ 204 + /* }else{
205 $get('/report/historyMessageList',{line:line,date:date,code:code,type:"export_msg"},function(result){ 205 $get('/report/historyMessageList',{line:line,date:date,code:code,type:"export_msg"},function(result){
206 window.open("/downloadFile/download?fileName=" 206 window.open("/downloadFile/download?fileName="
207 +moment(date).format("YYYYMMDD")+"-"+lineName+"-调度消息分析"); 207 +moment(date).format("YYYYMMDD")+"-"+lineName+"-调度消息分析");
@@ -209,7 +209,7 @@ @@ -209,7 +209,7 @@
209 209
210 }); 210 });
211 211
212 - } 212 + } */
213 }); 213 });
214 214
215 }); 215 });
src/main/resources/static/pages/forms/statement/scheduleDaily.html
@@ -446,7 +446,7 @@ @@ -446,7 +446,7 @@
446 divFrom2 = window.document.getElementById('forms_1'); 446 divFrom2 = window.document.getElementById('forms_1');
447 divFrom2.style.width=divFrom1.offsetWidth+"px"; 447 divFrom2.style.width=divFrom1.offsetWidth+"px";
448 }); 448 });
449 - $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){ 449 + $.get('/realSchedule/realScheduleList_zrw',{line:line,date:date,type:"query"},function(result){
450 getTime(result); 450 getTime(result);
451 var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); 451 var scheduleDaily_3 = template('scheduleDaily_3',{list:result});
452 $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3); 452 $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3);
@@ -492,6 +492,7 @@ @@ -492,6 +492,7 @@
492 params['xlName'] = xlName; 492 params['xlName'] = xlName;
493 params['type'] = "export"; 493 params['type'] = "export";
494 params['state'] = '2'; 494 params['state'] = '2';
  495 + params['genre'] = 'fqp';
495 $get('/realSchedule/scheduleDailyExport', params, function(result){ 496 $get('/realSchedule/scheduleDailyExport', params, function(result){
496 if(date.length == 10) 497 if(date.length == 10)
497 window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报"); 498 window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报");
src/main/resources/static/pages/forms/statement/scheduleDailyQp.html
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 </div> 42 </div>
43 </form> 43 </form>
44 </div> 44 </div>
45 - <div class="portlet-body"> 45 + <div class="portlet-body" id="ddrbExport">
46 <div class="table-container" id="ddrbBody" style="margin-top: 10px;overflow:auto;min-width: 906px"> 46 <div class="table-container" id="ddrbBody" style="margin-top: 10px;overflow:auto;min-width: 906px">
47 <label>日期:<span id="rqxs"></span>&nbsp;&nbsp;&nbsp;&nbsp;早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label> 47 <label>日期:<span id="rqxs"></span>&nbsp;&nbsp;&nbsp;&nbsp;早高峰:6:31~8:30&nbsp;&nbsp;&nbsp;&nbsp;晚高峰:16:01~18:00</label>
48 <table class="table table-bordered table-hover table-checkable" id="forms"> 48 <table class="table table-bordered table-hover table-checkable" id="forms">
@@ -111,54 +111,6 @@ @@ -111,54 +111,6 @@
111 <tr> 111 <tr>
112 <td colspan="40">&nbsp;</td> 112 <td colspan="40">&nbsp;</td>
113 </tr> 113 </tr>
114 - <!-- <tr>  
115 - <td colspan="40">合计</td>  
116 - </tr>  
117 - <tr>  
118 - <td>售票</td>  
119 - <td colspan="2">1元</td>  
120 - <td colspan="2">2元</td>  
121 - <td colspan="2">3元</td>  
122 - <td colspan="2">4元</td>  
123 - <td colspan="2">5元</td>  
124 - <td colspan="2">6元</td>  
125 - <td colspan="2">7元</td>  
126 - <td colspan="2">8元</td>  
127 - <td colspan="2">9元</td>  
128 - <td colspan="2">10元</td>  
129 - <td colspan="2">&nbsp;</td>  
130 - <td colspan="2">合计张数</td>  
131 - <td colspan="2">&nbsp;</td>  
132 - <td colspan="2">预售票</td>  
133 - <td colspan="2">1元</td>  
134 - <td colspan="2">1.5元</td>  
135 - <td colspan="2">合计张数</td>  
136 - <td colspan="5">&nbsp;</td>  
137 - </tr>  
138 - <tr>  
139 - <td>张数</td>  
140 - <td colspan="2">&nbsp;</td>  
141 - <td colspan="2">&nbsp;</td>  
142 - <td colspan="2">&nbsp;</td>  
143 - <td colspan="2">&nbsp;</td>  
144 - <td colspan="2">&nbsp;</td>  
145 - <td colspan="2">&nbsp;</td>  
146 - <td colspan="2">&nbsp;</td>  
147 - <td colspan="2">&nbsp;</td>  
148 - <td colspan="2">&nbsp;</td>  
149 - <td colspan="2">&nbsp;</td>  
150 - <td colspan="2">&nbsp;</td>  
151 - <td colspan="2">合计金额</td>  
152 - <td colspan="2">&nbsp;</td>  
153 - <td colspan="2">张数</td>  
154 - <td colspan="2">&nbsp;</td>  
155 - <td colspan="2">&nbsp;</td>  
156 - <td colspan="2">合计金额</td>  
157 - <td colspan="5">&nbsp;</td>  
158 - </tr>  
159 - <tr>  
160 - <td colspan="40">&nbsp;</td>  
161 - </tr> -->  
162 <tr> 114 <tr>
163 <td colspan="2">路牌</td> 115 <td colspan="2">路牌</td>
164 <td colspan="2">车号</td> 116 <td colspan="2">车号</td>
@@ -251,7 +203,7 @@ @@ -251,7 +203,7 @@
251 </div> 203 </div>
252 </div> 204 </div>
253 </div> 205 </div>
254 - 206 +<script src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script>
255 <script> 207 <script>
256 $(function(){ 208 $(function(){
257 209
@@ -363,17 +315,28 @@ @@ -363,17 +315,28 @@
363 layer.msg("请选择时间"); 315 layer.msg("请选择时间");
364 return; 316 return;
365 } 317 }
  318 + /* $("#ddrbExport").table2excel({
  319 + // 不被导出的表格行的CSS class类
  320 + exclude: ".noExl",
  321 + // 导出的Excel文档的名称,(没看到作用)
  322 + name: "Excel Document Name.xlsx",
  323 + // Excel文件的名称
  324 + filename: date+"调度日报"
  325 + }); */
  326 + var lineName = $('#line option:selected').text();
366 params['line'] = line; 327 params['line'] = line;
  328 + params['lineName'] = lineName;
367 params['date'] = date; 329 params['date'] = date;
368 params['xlName'] = xlName; 330 params['xlName'] = xlName;
369 params['type'] = "export"; 331 params['type'] = "export";
370 params['state'] = '2'; 332 params['state'] = '2';
  333 + params['genre'] = 'qp';
371 $get('/realSchedule/scheduleDailyExport', params, function(result){ 334 $get('/realSchedule/scheduleDailyExport', params, function(result){
372 if(date.length == 10) 335 if(date.length == 10)
373 - window.open("/downloadFile/download?fileName=调度日报"+moment(date).format("YYYYMMDD")); 336 + window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报");
374 else 337 else
375 - window.open("/downloadFile/download?fileName=调度日报"+moment(date).format("YYYYMM"));  
376 - }); 338 + window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报");
  339 + });
377 }); 340 });
378 341
379 }); 342 });
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
@@ -312,7 +312,7 @@ @@ -312,7 +312,7 @@
312 params['nature']=nature; 312 params['nature']=nature;
313 var i = layer.load(2); 313 var i = layer.load(2);
314 // $get('/realSchedule/statisticsDailyTj',params,function(result){ 314 // $get('/realSchedule/statisticsDailyTj',params,function(result){
315 - $get('/calcWaybill/calcStatisticsDaily2',params,function(result){ 315 + $get('/calcWaybill/calcStatisticsDaily',params,function(result){
316 // 把数据填充到模版中 316 // 把数据填充到模版中
317 var tbodyHtml = template('statisticsDailyCalc2',{list:result}); 317 var tbodyHtml = template('statisticsDailyCalc2',{list:result});
318 // 把渲染好的模版html文本追加到表格中 318 // 把渲染好的模版html文本追加到表格中
@@ -340,7 +340,7 @@ @@ -340,7 +340,7 @@
340 params['nature']=nature; 340 params['nature']=nature;
341 var i = layer.load(2); 341 var i = layer.load(2);
342 // $get('/realSchedule/statisticsDailyTj',params,function(result){ 342 // $get('/realSchedule/statisticsDailyTj',params,function(result){
343 - $get('/calcWaybill/calcStatisticsDaily2',params,function(result){ 343 + $get('/calcWaybill/calcStatisticsDaily',params,function(result){
344 var dateTime = ""; 344 var dateTime = "";
345 if(date == date2){ 345 if(date == date2){
346 dateTime = moment(date).format("YYYYMMDD"); 346 dateTime = moment(date).format("YYYYMMDD");
@@ -362,45 +362,45 @@ @@ -362,45 +362,45 @@
362 <td>{{obj.fgsName}}</td> 362 <td>{{obj.fgsName}}</td>
363 <td>{{obj.xlName}}</td> 363 <td>{{obj.xlName}}</td>
364 <td>{{obj.jhzlc}}</td> 364 <td>{{obj.jhzlc}}</td>
365 - <td>{{obj.jhlc}}</td>  
366 - <td>{{obj.jcclc}}</td>  
367 - <td>{{obj.sjzgl}}</td>  
368 - <td>{{obj.sjgl}}</td>  
369 - <td>{{obj.sjksgl}}</td>  
370 - <td>{{obj.ssgl}}</td> 365 + <td>{{obj.jhyylc}}</td>
  366 + <td>{{obj.jhkslc}}</td>
  367 + <td>{{obj.sjzlc}}</td>
  368 + <td>{{obj.sjyylc}}</td>
  369 + <td>{{obj.sjkslc}}</td>
  370 + <td>{{obj.sslc}}</td>
371 <td>{{obj.ssbc}}</td> 371 <td>{{obj.ssbc}}</td>
372 - <td>{{obj.ssgl_lz}}</td>  
373 - <td>{{obj.ssgl_dm}}</td>  
374 - <td>{{obj.ssgl_gz}}</td>  
375 - <td>{{obj.ssgl_jf}}</td>  
376 - <td>{{obj.ssgl_zs}}</td>  
377 - <td>{{obj.ssgl_qr}}</td>  
378 - <td>{{obj.ssgl_qc}}</td>  
379 - <td>{{obj.ssgl_kx}}</td>  
380 - <td>{{obj.ssgl_qh}}</td>  
381 - <td>{{obj.ssgl_yw}}</td>  
382 - <td>{{obj.ssgl_other}}</td>  
383 - <td>{{obj.ljgl}}</td>  
384 - <td>{{obj.ljks}}</td>  
385 - <td>{{obj.jhbc}}</td>  
386 - <td>{{obj.jhbc_m}}</td>  
387 - <td>{{obj.jhbc_a}}</td>  
388 - <td>{{obj.sjbc}}</td>  
389 - <td>{{obj.sjbc_m}}</td>  
390 - <td>{{obj.sjbc_a}}</td>  
391 - <td>{{obj.ljbc}}</td>  
392 - <td>{{obj.ljbc_m}}</td>  
393 - <td>{{obj.ljbc_a}}</td>  
394 - <td>{{obj.fzbc}}</td>  
395 - <td>{{obj.fzbc_m}}</td>  
396 - <td>{{obj.fzbc_a}}</td>  
397 - <td>{{obj.dtbc}}</td>  
398 - <td>{{obj.dtbc_m}}</td>  
399 - <td>{{obj.dtbc_a}}</td>  
400 - <td>{{obj.djg}}</td>  
401 - <td>{{obj.djg_m}}</td>  
402 - <td>{{obj.djg_a}}</td>  
403 - <td>{{obj.djg_time}}</td> 372 + <td>{{obj.lzlc}}</td>
  373 + <td>{{obj.dmlc}}</td>
  374 + <td>{{obj.gzlc}}</td>
  375 + <td>{{obj.jflc}}</td>
  376 + <td>{{obj.zslc}}</td>
  377 + <td>{{obj.qrlc}}</td>
  378 + <td>{{obj.qclc}}</td>
  379 + <td>{{obj.kxlc}}</td>
  380 + <td>{{obj.qhlc}}</td>
  381 + <td>{{obj.ywlc}}</td>
  382 + <td>{{obj.qtlc}}</td>
  383 + <td>{{obj.ljlc}}</td>
  384 + <td>{{obj.ljkslc}}</td>
  385 + <td>{{obj.jhbcq}}</td>
  386 + <td>{{obj.jhbcz}}</td>
  387 + <td>{{obj.jhbcw}}</td>
  388 + <td>{{obj.sjbcq}}</td>
  389 + <td>{{obj.sjbcz}}</td>
  390 + <td>{{obj.sjbcw}}</td>
  391 + <td>{{obj.ljbcq}}</td>
  392 + <td>{{obj.ljbcz}}</td>
  393 + <td>{{obj.ljbcw}}</td>
  394 + <td>{{obj.fzbcq}}</td>
  395 + <td>{{obj.fzbcz}}</td>
  396 + <td>{{obj.fzbcw}}</td>
  397 + <td>{{obj.dtbcq}}</td>
  398 + <td>{{obj.dtbcz}}</td>
  399 + <td>{{obj.dtbcw}}</td>
  400 + <td>{{obj.djgq}}</td>
  401 + <td>{{obj.djgz}}</td>
  402 + <td>{{obj.djgw}}</td>
  403 + <td>{{obj.djgsj}}</td>
404 <td>&nbsp;</td> 404 <td>&nbsp;</td>
405 </tr> 405 </tr>
406 {{/each}} 406 {{/each}}