Commit 26abe0ca9807bebcfa98ea0323d35674c8bf24e7

Authored by 潘钊
2 parents df3a5350 5ec0823f

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

src/main/java/com/bsth/controller/oil/YlbController.java
@@ -239,7 +239,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ @@ -239,7 +239,7 @@ public class YlbController extends BaseController<Ylb, Integer>{
239 m.put("rq", y.getRq()); 239 m.put("rq", y.getRq());
240 m.put("gsname",y.getGsname() ); 240 m.put("gsname",y.getGsname() );
241 m.put("fgsname", y.getFgsname()); 241 m.put("fgsname", y.getFgsname());
242 - m.put("xlname", y.getXlname()); 242 + m.put("xlname", y.getXlname()==null?"":y.getXlname());
243 m.put("nbbm", y.getNbbm()); 243 m.put("nbbm", y.getNbbm());
244 m.put("jsy", y.getJsy()); 244 m.put("jsy", y.getJsy());
245 m.put("name", y.getName()); 245 m.put("name", y.getName());
@@ -258,6 +258,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ @@ -258,6 +258,7 @@ public class YlbController extends BaseController<Ylb, Integer>{
258 m.put("ns", y.getNs()); 258 m.put("ns", y.getNs());
259 String shyy ="无"; 259 String shyy ="无";
260 if(y.getShyy()!=null){ 260 if(y.getShyy()!=null){
  261 + shyy=y.getShyy();
261 if(shyy.equals("1")){shyy="票务用油";} 262 if(shyy.equals("1")){shyy="票务用油";}
262 else if(shyy.equals("2")){shyy="保养用油";} 263 else if(shyy.equals("2")){shyy="保养用油";}
263 else if(shyy.equals("3")){shyy="报废车用油";} 264 else if(shyy.equals("3")){shyy="报废车用油";}
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -486,7 +486,7 @@ public class FormsServiceImpl implements FormsService { @@ -486,7 +486,7 @@ public class FormsServiceImpl implements FormsService {
486 // + " on y.nbbm=t.cl_zbh and y.jsy= t.j_gh"; 486 // + " on y.nbbm=t.cl_zbh and y.jsy= t.j_gh";
487 487
488 String sql="select r.s_gh,r.s_name, " 488 String sql="select r.s_gh,r.s_name, "
489 - + " r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" 489 + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"
490 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; 490 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'";
491 if(xlbm.equals("")){ 491 if(xlbm.equals("")){
492 sql +="and r.gs_bm='"+gsdm+"' " 492 sql +="and r.gs_bm='"+gsdm+"' "
@@ -495,7 +495,7 @@ public class FormsServiceImpl implements FormsService { @@ -495,7 +495,7 @@ public class FormsServiceImpl implements FormsService {
495 sql += " and r.xl_bm = '"+xlbm+"'"; 495 sql += " and r.xl_bm = '"+xlbm+"'";
496 } 496 }
497 sql += " group by r.s_gh,r.s_name," 497 sql += " group by r.s_gh,r.s_name,"
498 - + " r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"; 498 + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm";
499 499
500 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 500 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
501 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 501 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -503,7 +503,7 @@ public class FormsServiceImpl implements FormsService { @@ -503,7 +503,7 @@ public class FormsServiceImpl implements FormsService {
503 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { 503 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
504 Singledata sin = new Singledata(); 504 Singledata sin = new Singledata();
505 sin.setrQ(startDate); 505 sin.setrQ(startDate);
506 - sin.setxL(arg0.getString("xl_name")); 506 + sin.setxL(arg0.getString("xl_bm"));
507 sin.setClzbh(arg0.getString("cl_zbh")); 507 sin.setClzbh(arg0.getString("cl_zbh"));
508 sin.setJsy(arg0.getString("j_gh")); 508 sin.setJsy(arg0.getString("j_gh"));
509 sin.setjName(arg0.getString("j_name")); 509 sin.setjName(arg0.getString("j_name"));
@@ -520,6 +520,7 @@ public class FormsServiceImpl implements FormsService { @@ -520,6 +520,7 @@ public class FormsServiceImpl implements FormsService {
520 for (int i = 0; i < list.size(); i++) { 520 for (int i = 0; i < list.size(); i++) {
521 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); 521 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
522 Singledata sin=list.get(i); 522 Singledata sin=list.get(i);
  523 + sin.setxL(BasicData.lineCode2NameMap.get(sin.getxL()));
523 String jsy=sin.getJsy(); 524 String jsy=sin.getJsy();
524 String clzbh=sin.getClzbh(); 525 String clzbh=sin.getClzbh();
525 for (int j = 0; j < listReal.size(); j++) { 526 for (int j = 0; j < listReal.size(); j++) {
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
@@ -114,15 +114,15 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -114,15 +114,15 @@ public class BusIntervalServiceImpl implements BusIntervalService {
114 long fcsj = Long.valueOf(split1[0]) * 60 + Long.valueOf(split1[1]); 114 long fcsj = Long.valueOf(split1[0]) * 60 + Long.valueOf(split1[1]);
115 long zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]); 115 long zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]);
116 if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){ 116 if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){
117 - fcsj += 1440l;  
118 - zdsj += 1440l; 117 + if(fcsj<23*60) fcsj += 1440l;
  118 + if(zdsj<23*60) zdsj += 1440l;
119 } 119 }
120 if(zdsj < fcsj) 120 if(zdsj < fcsj)
121 zdsj += 1440l; 121 zdsj += 1440l;
122 if(schedule.getDfsj() != null){ 122 if(schedule.getDfsj() != null){
123 String[] split0 = schedule.getDfsj().split(":"); 123 String[] split0 = schedule.getDfsj().split(":");
124 long dfsj = Long.valueOf(split0[0]) * 60 + Long.valueOf(split0[1]); 124 long dfsj = Long.valueOf(split0[0]) * 60 + Long.valueOf(split0[1]);
125 - if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())) 125 + if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())&&dfsj<23*60)
126 dfsj += 1440l; 126 dfsj += 1440l;
127 schedule.setDfsj(dfsj/60 + ":" + dfsj%60); 127 schedule.setDfsj(dfsj/60 + ":" + dfsj%60);
128 schedule.setDfsjT(dfsj); 128 schedule.setDfsjT(dfsj);
@@ -130,7 +130,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -130,7 +130,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
130 if(schedule.getFcsjActual() != null){ 130 if(schedule.getFcsjActual() != null){
131 String[] split2 = schedule.getFcsjActual().split(":"); 131 String[] split2 = schedule.getFcsjActual().split(":");
132 long fcsjA = Long.valueOf(split2[0]) * 60 + Long.valueOf(split2[1]); 132 long fcsjA = Long.valueOf(split2[0]) * 60 + Long.valueOf(split2[1]);
133 - if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())) 133 + if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())&&fcsjA<23*60)
134 fcsjA += 1440l; 134 fcsjA += 1440l;
135 schedule.setFcsjActual(fcsjA/60 + ":" + fcsjA%60); 135 schedule.setFcsjActual(fcsjA/60 + ":" + fcsjA%60);
136 schedule.setFcsjActualTime(fcsjA); 136 schedule.setFcsjActualTime(fcsjA);
@@ -138,7 +138,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -138,7 +138,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
138 if(schedule.getZdsjActual() != null){ 138 if(schedule.getZdsjActual() != null){
139 String[] split4 = schedule.getZdsjActual().split(":"); 139 String[] split4 = schedule.getZdsjActual().split(":");
140 long zdsjA = Long.valueOf(split4[0]) * 60 + Long.valueOf(split4[1]); 140 long zdsjA = Long.valueOf(split4[0]) * 60 + Long.valueOf(split4[1]);
141 - if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())) 141 + if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())&&zdsjA<23*60)
142 zdsjA += 1440l; 142 zdsjA += 1440l;
143 if(schedule.getFcsjActualTime() != null && zdsjA < schedule.getFcsjActualTime()) 143 if(schedule.getFcsjActualTime() != null && zdsjA < schedule.getFcsjActualTime())
144 zdsjA += 1440l; 144 zdsjA += 1440l;
@@ -648,7 +648,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -648,7 +648,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
648 if(schedule.getDfsj() != null){ 648 if(schedule.getDfsj() != null){
649 String[] split0 = schedule.getDfsj().split(":"); 649 String[] split0 = schedule.getDfsj().split(":");
650 long dfsj = Long.valueOf(split0[0]) * 60 + Long.valueOf(split0[1]); 650 long dfsj = Long.valueOf(split0[0]) * 60 + Long.valueOf(split0[1]);
651 - if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())) 651 + if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())&&dfsj<23*60)
652 dfsj += 1440l; 652 dfsj += 1440l;
653 schedule.setDfsj(dfsj/60 + ":" + dfsj%60); 653 schedule.setDfsj(dfsj/60 + ":" + dfsj%60);
654 schedule.setDfsjT(dfsj); 654 schedule.setDfsjT(dfsj);
@@ -656,7 +656,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -656,7 +656,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
656 if(schedule.getFcsjActual() != null){ 656 if(schedule.getFcsjActual() != null){
657 String[] split2 = schedule.getFcsjActual().split(":"); 657 String[] split2 = schedule.getFcsjActual().split(":");
658 long fcsjA = Long.valueOf(split2[0]) * 60 + Long.valueOf(split2[1]); 658 long fcsjA = Long.valueOf(split2[0]) * 60 + Long.valueOf(split2[1]);
659 - if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())) 659 + if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())&&fcsjA<23*60)
660 fcsjA += 1440l; 660 fcsjA += 1440l;
661 schedule.setFcsjActual(fcsjA/60 + ":" + fcsjA%60); 661 schedule.setFcsjActual(fcsjA/60 + ":" + fcsjA%60);
662 schedule.setFcsjActualTime(fcsjA); 662 schedule.setFcsjActualTime(fcsjA);
@@ -664,7 +664,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -664,7 +664,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
664 if(schedule.getZdsjActual() != null){ 664 if(schedule.getZdsjActual() != null){
665 String[] split4 = schedule.getZdsjActual().split(":"); 665 String[] split4 = schedule.getZdsjActual().split(":");
666 long zdsjA = Long.valueOf(split4[0]) * 60 + Long.valueOf(split4[1]); 666 long zdsjA = Long.valueOf(split4[0]) * 60 + Long.valueOf(split4[1]);
667 - if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())) 667 + if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())&&zdsjA<23*60)
668 zdsjA += 1440l; 668 zdsjA += 1440l;
669 schedule.setZdsjActual(zdsjA/60 + ":" + zdsjA%60); 669 schedule.setZdsjActual(zdsjA/60 + ":" + zdsjA%60);
670 schedule.setZdsjActualTime(zdsjA); 670 schedule.setZdsjActualTime(zdsjA);
@@ -675,8 +675,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -675,8 +675,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
675 long zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]); 675 long zdsj = Long.valueOf(split3[0]) * 60 + Long.valueOf(split3[1]);
676 676
677 if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){ 677 if(!schedule.getScheduleDateStr().equals(schedule.getRealExecDate())){
678 - fcsj += 1440l;  
679 - zdsj += 1440l; 678 + if(fcsj<23*60) fcsj += 1440l;
  679 + if(zdsj<23*60) zdsj += 1440l;
680 } 680 }
681 schedule.setFcsj(fcsj/60 + ":" + fcsj%60); 681 schedule.setFcsj(fcsj/60 + ":" + fcsj%60);
682 schedule.setZdsj(zdsj/60 + ":" + zdsj%60); 682 schedule.setZdsj(zdsj/60 + ":" + zdsj%60);
@@ -773,6 +773,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -773,6 +773,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
773 Map<Long, ScheduleRealInfo> sortMap = new HashMap<Long, ScheduleRealInfo>(); 773 Map<Long, ScheduleRealInfo> sortMap = new HashMap<Long, ScheduleRealInfo>();
774 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); 774 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
775 List<Long> keyList = new ArrayList<Long>(); 775 List<Long> keyList = new ArrayList<Long>();
  776 + List<Long> keyList2 = new ArrayList<Long>();
776 List<ScheduleRealInfo> list2 = keyMap.get(key); 777 List<ScheduleRealInfo> list2 = keyMap.get(key);
777 long jhyysj = 0, sjyysj = 0; 778 long jhyysj = 0, sjyysj = 0;
778 long jhyssj = 0, sjyssj = 0; 779 long jhyssj = 0, sjyssj = 0;
@@ -794,6 +795,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -794,6 +795,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
794 keyList.add(fcsj); 795 keyList.add(fcsj);
795 } 796 }
796 sortMap.put(fcsj, schedule); 797 sortMap.put(fcsj, schedule);
  798 +
797 } 799 }
798 Collections.sort(keyList); 800 Collections.sort(keyList);
799 801
@@ -884,12 +886,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -884,12 +886,20 @@ public class BusIntervalServiceImpl implements BusIntervalService {
884 mapList.add(m); 886 mapList.add(m);
885 } 887 }
886 } 888 }
887 - for(int i = 1; i < mapList.size(); i++){  
888 - Map<String, Object> m1 = mapList.get(i - 1);  
889 - Map<String, Object> m2 = mapList.get(i);  
890 - if(m1.get("fcsj") != null && m2.get("fcsj") != null){  
891 - long fcsj2 = Long.valueOf(m2.get("fcsj").toString());  
892 - long fcsj1 = Long.valueOf(m1.get("fcsj").toString()); 889 +
  890 + for(Map<String, Object> m : mapList){
  891 + if(m.get("fcsj") != null && m.get("fcsj").toString().trim().length()!=0){
  892 + keyList2.add(Long.valueOf(m.get("fcsj").toString()));
  893 + }
  894 + }
  895 + Collections.sort(keyList2);
  896 + for(long l : keyList2){
  897 + System.out.println(l);
  898 + }
  899 + for(int i = 1; i < keyList2.size(); i++){
  900 + long fcsj1 = keyList2.get(i - 1);
  901 + long fcsj2 = keyList2.get(i);
  902 + if(fcsj2 - fcsj1 < 90){
893 if(sfqr == 1 && time1 > fcsj1){ 903 if(sfqr == 1 && time1 > fcsj1){
894 sjyysj += fcsj2 - time1; 904 sjyysj += fcsj2 - time1;
895 }else if(sfqr == 1 && time2 < fcsj2){ 905 }else if(sfqr == 1 && time2 < fcsj2){
@@ -898,7 +908,25 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -898,7 +908,25 @@ public class BusIntervalServiceImpl implements BusIntervalService {
898 sjyysj += fcsj2 - fcsj1; 908 sjyysj += fcsj2 - fcsj1;
899 } 909 }
900 sjyysj1 += fcsj2 - fcsj1; 910 sjyysj1 += fcsj2 - fcsj1;
  911 + System.out.println("---"+(fcsj2-fcsj1)+"---"+sjyysj+"---"+sjyysj1);
901 } 912 }
  913 + }
  914 +
  915 + for(int i = 1; i < mapList.size(); i++){
  916 + Map<String, Object> m1 = mapList.get(i - 1);
  917 + Map<String, Object> m2 = mapList.get(i);
  918 +// if(m1.get("fcsj") != null && m2.get("fcsj") != null){
  919 +// long fcsj2 = Long.valueOf(m2.get("fcsj").toString());
  920 +// long fcsj1 = Long.valueOf(m1.get("fcsj").toString());
  921 +// if(sfqr == 1 && time1 > fcsj1){
  922 +// sjyysj += fcsj2 - time1;
  923 +// }else if(sfqr == 1 && time2 < fcsj2){
  924 +// sjyysj += time2 - fcsj1;
  925 +// }else{
  926 +// sjyysj += fcsj2 - fcsj1;
  927 +// }
  928 +// sjyysj1 += fcsj2 - fcsj1;
  929 +// }
902 if(m2.get("fcsj") != null && m2.get("zdsj") != null){ 930 if(m2.get("fcsj") != null && m2.get("zdsj") != null){
903 long zdsj = Long.valueOf(m2.get("zdsj").toString()); 931 long zdsj = Long.valueOf(m2.get("zdsj").toString());
904 long fcsj = Long.valueOf(m2.get("fcsj").toString()); 932 long fcsj = Long.valueOf(m2.get("fcsj").toString());
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
@@ -311,7 +311,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ @@ -311,7 +311,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
311 Cars car = carsRepository.findOne(new CustomerSpecs<Cars>(map)); 311 Cars car = carsRepository.findOne(new CustomerSpecs<Cars>(map));
312 // 获取线路是否使用标识,如果未使用,则不查该线路数据 312 // 获取线路是否使用标识,如果未使用,则不查该线路数据
313 line = lineRepository.findByLineCode(schRealInfo.get("xlBm")+""); 313 line = lineRepository.findByLineCode(schRealInfo.get("xlBm")+"");
314 - if(line.getInUse() == null || line.getInUse() == 0){ 314 + if(line == null || line.getInUse() == null || line.getInUse() == 0){
315 continue; 315 continue;
316 } 316 }
317 sf.append("<DLD>"); 317 sf.append("<DLD>");
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -403,8 +403,8 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -403,8 +403,8 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
403 // 获取车辆存油信息 403 // 获取车辆存油信息
404 List<Cyl> cylList = cylRepository.obtainCyl(nbbm,gsbm); 404 List<Cyl> cylList = cylRepository.obtainCyl(nbbm,gsbm);
405 // 指定日期YLB信息 405 // 指定日期YLB信息
406 - List<Ylb> ylbList =repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx");  
407 - List<Ylb> iterator2=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx"); 406 + List<Ylb> ylbList =repository.obtainYl(rq,gsbm,fgsbm,"",nbbm,"nbbm,jcsx");
  407 + List<Ylb> iterator2=repository.obtainYl(rq,gsbm,fgsbm,"",nbbm,"jcsx");
408 for (int i=0;i<ylbList.size();i++) { 408 for (int i=0;i<ylbList.size();i++) {
409 Ylb ylb = ylbList.get(i); 409 Ylb ylb = ylbList.get(i);
410 // 判断是否已经计算过 410 // 判断是否已经计算过
@@ -412,7 +412,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -412,7 +412,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
412 String nbbm_eq = ylb.getNbbm(); 412 String nbbm_eq = ylb.getNbbm();
413 Date rq_eq = ylb.getRq(); 413 Date rq_eq = ylb.getRq();
414 // 得到一天总的加油和里程(根据车,时间) 414 // 得到一天总的加油和里程(根据车,时间)
415 - List<Object[]> sumList = repository.sumLcYl(nbbm_eq, rq_eq,ylb.getXlbm(),gsbm,fgsbm); 415 + List<Object[]> sumList = repository.sumLcYl(nbbm_eq, rq_eq,"",gsbm,fgsbm);
416 // 保存总的加油量 416 // 保存总的加油量
417 Double jzl = 0.0; 417 Double jzl = 0.0;
418 // 保存总的里程 418 // 保存总的里程
@@ -1112,7 +1112,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1112,7 +1112,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1112 String nbbm_eq = ylb.getNbbm(); 1112 String nbbm_eq = ylb.getNbbm();
1113 Date rq_eq = ylb.getRq(); 1113 Date rq_eq = ylb.getRq();
1114 // 得到一天总的加油和里程(根据车,时间) 1114 // 得到一天总的加油和里程(根据车,时间)
1115 - List<Object[]> sumList = repository.sumLcYl(nbbm_eq, rq_eq,ylb.getXlbm(),ylb.getSsgsdm(),ylb.getFgsdm()); 1115 + List<Object[]> sumList = repository.sumLcYl(nbbm_eq, rq_eq,"",ylb.getSsgsdm(),ylb.getFgsdm());
1116 // 保存总的加油量 1116 // 保存总的加油量
1117 Double jzl = 0.0; 1117 Double jzl = 0.0;
1118 // 保存总的里程 1118 // 保存总的里程
@@ -1135,7 +1135,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1135,7 +1135,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1135 map.put("nbbm_eq", nbbm_eq); 1135 map.put("nbbm_eq", nbbm_eq);
1136 map.put("rq_eq", rq_eq); 1136 map.put("rq_eq", rq_eq);
1137 1137
1138 - List<Ylb> iterator2=repository.obtainYl(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),ylb.getXlbm(), 1138 + List<Ylb> iterator2=repository.obtainYl(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),"",
1139 ylb.getNbbm(),"jcsx"); 1139 ylb.getNbbm(),"jcsx");
1140 DecimalFormat df = new DecimalFormat("#.00"); 1140 DecimalFormat df = new DecimalFormat("#.00");
1141 Double zyl = 0.0; 1141 Double zyl = 0.0;
src/main/java/com/bsth/util/ReportUtils.java
@@ -194,7 +194,7 @@ public class ReportUtils { @@ -194,7 +194,7 @@ public class ReportUtils {
194 // 创建新行 194 // 创建新行
195 newRow = sheet.createRow(index + k++); 195 newRow = sheet.createRow(index + k++);
196 // 把新行的内容换成和模板行一样 196 // 把新行的内容换成和模板行一样
197 - copyRow(wb, orgRow, newRow, true); 197 + copyRow(wb, orgRow, newRow, true, wb.createCellStyle());
198 tmpCellNum = newRow.getLastCellNum(); 198 tmpCellNum = newRow.getLastCellNum();
199 for (int l = 0; l < tmpCellNum; l++) { 199 for (int l = 0; l < tmpCellNum; l++) {
200 cell = newRow.getCell(l); 200 cell = newRow.getCell(l);
@@ -357,11 +357,11 @@ public class ReportUtils { @@ -357,11 +357,11 @@ public class ReportUtils {
357 * @param toRow 357 * @param toRow
358 */ 358 */
359 private void copyRow(HSSFWorkbook wb, HSSFRow fromRow, HSSFRow toRow, 359 private void copyRow(HSSFWorkbook wb, HSSFRow fromRow, HSSFRow toRow,
360 - boolean copyValueFlag) { 360 + boolean copyValueFlag, HSSFCellStyle style) {
361 for (Iterator<Cell> cellIt = fromRow.cellIterator(); cellIt.hasNext();) { 361 for (Iterator<Cell> cellIt = fromRow.cellIterator(); cellIt.hasNext();) {
362 HSSFCell tmpCell = (HSSFCell) cellIt.next(); 362 HSSFCell tmpCell = (HSSFCell) cellIt.next();
363 HSSFCell newCell = toRow.createCell(tmpCell.getColumnIndex(), 0); 363 HSSFCell newCell = toRow.createCell(tmpCell.getColumnIndex(), 0);
364 - copyCell(wb, tmpCell, newCell, copyValueFlag); 364 + copyCell(wb, tmpCell, newCell, copyValueFlag, style);
365 } 365 }
366 } 366 }
367 367
@@ -374,8 +374,8 @@ public class ReportUtils { @@ -374,8 +374,8 @@ public class ReportUtils {
374 * true则连同cell的内容一起复制 374 * true则连同cell的内容一起复制
375 */ 375 */
376 public void copyCell(HSSFWorkbook wb, HSSFCell srcCell, HSSFCell distCell, 376 public void copyCell(HSSFWorkbook wb, HSSFCell srcCell, HSSFCell distCell,
377 - boolean copyValueFlag) {  
378 - HSSFCellStyle newstyle = wb.createCellStyle(); 377 + boolean copyValueFlag, HSSFCellStyle newstyle) {
  378 +// HSSFCellStyle newstyle = wb.createCellStyle();
379 copyCellStyle(wb, srcCell.getCellStyle(), newstyle); 379 copyCellStyle(wb, srcCell.getCellStyle(), newstyle);
380 // 样式 380 // 样式
381 distCell.setCellStyle(newstyle); 381 distCell.setCellStyle(newstyle);
src/main/resources/static/pages/forms/mould/list.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/listDl.xls
No preview for this file type
src/main/resources/static/pages/mforms/singledatas/singledata.html
@@ -140,6 +140,7 @@ @@ -140,6 +140,7 @@
140 $("#fgsdmSing").on("change",initXl); 140 $("#fgsdmSing").on("change",initXl);
141 function initXl(){ 141 function initXl(){
142 var data=[]; 142 var data=[];
  143 + data.push({id: " ", text: "请选择"});
143 if(fage){ 144 if(fage){
144 $("#line").select2("destroy").html(''); 145 $("#line").select2("destroy").html('');
145 } 146 }
src/main/resources/static/pages/report/inoutstation.html
@@ -49,24 +49,24 @@ @@ -49,24 +49,24 @@
49 </div> 49 </div>
50 <br/> 50 <br/>
51 <div> 51 <div>
52 - <div id="bczxDiv" style="display: inline-block;margin-left: 15px;">  
53 - <div style="display: inline-block;margin-left: 15px;"> 52 + <div id="bczxDiv" style="display: inline-block;margin-left: 10px;">
  53 + <div style="display: inline-block;margin-left: 5px;">
54 <span class="item-label" style="width: 80px;">时间: </span> 54 <span class="item-label" style="width: 80px;">时间: </span>
55 <input class="form-control" type="text" id="date" style="width: 180px;"/> 55 <input class="form-control" type="text" id="date" style="width: 180px;"/>
56 </div> 56 </div>
57 - <div style="display: inline-block;margin-left: 15px;"> 57 + <div style="display: inline-block;margin-left: 5px;">
58 <span class="item-label" style="width: 80px;">车辆: </span> 58 <span class="item-label" style="width: 80px;">车辆: </span>
59 <select class="form-control" id="nbbm" style="width: 180px;"></select> 59 <select class="form-control" id="nbbm" style="width: 180px;"></select>
60 </div> 60 </div>
61 </div> 61 </div>
62 - <div id="clzdDiv" style="display:none ;margin-left: 15px;" >  
63 - <div style="display: inline-block;margin-left: 15px;"> 62 + <div id="clzdDiv" style="display:none ;margin-left: 10px;" >
  63 + <div style="display: inline-block;margin-left: 5px;">
64 <span class="item-label" style="width: 80px;">时间: </span> 64 <span class="item-label" style="width: 80px;">时间: </span>
65 <input class="form-control" type="text" id="date1" style="width: 180px;"/> 65 <input class="form-control" type="text" id="date1" style="width: 180px;"/>
66 - <span class="item-label" style="width: 60px;">至: </span> 66 + <span class="item-label" style="width: 60px;margin-left: 19px;">至: </span>
67 <input class="form-control" type="text" id="date2" style="width: 180px;"/> 67 <input class="form-control" type="text" id="date2" style="width: 180px;"/>
68 <span class="item-label" style="width: 80px;">站点: </span> 68 <span class="item-label" style="width: 80px;">站点: </span>
69 - <select id="zdlx" class="sreach-zd" > 69 + <select class="form-control" id="zdlx" class="sreach-zd" >
70 <option value="">请选择</option> 70 <option value="">请选择</option>
71 <option value="0">上行</option> 71 <option value="0">上行</option>
72 <option value="1">下行</option> 72 <option value="1">下行</option>
src/main/resources/static/pages/report/oil/oilListMonth.html
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 </div> 37 </div>
38 <div class="form-group"> 38 <div class="form-group">
39 <input class="btn btn-default" type="button" id="query" value="查询"/> 39 <input class="btn btn-default" type="button" id="query" value="查询"/>
40 - <input class="btn btn-default" type="button" id="export" value="导出"/> 40 +<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
41 </div> 41 </div>
42 </form> 42 </form>
43 </div> 43 </div>
@@ -97,6 +97,8 @@ @@ -97,6 +97,8 @@
97 var year = d.getFullYear(); 97 var year = d.getFullYear();
98 var month = d.getMonth() + 1; 98 var month = d.getMonth() + 1;
99 var day = d.getDate(); 99 var day = d.getDate();
  100 + if(day < 10)
  101 + day = "0"+day;
100 if(month > 9){ 102 if(month > 9){
101 $("#date").val(year + "-" + month + "-" + day); 103 $("#date").val(year + "-" + month + "-" + day);
102 } else { 104 } else {