Commit ad18533127e601bd6f354dc029fcf52b327c7b2b
1 parent
fd0b38d4
调度日报 备注 路单计划班次
Showing
3 changed files
with
69 additions
and
13 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -875,7 +875,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 875 | 875 | double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists)); |
| 876 | 876 | map.put("ksgl",ksgl); |
| 877 | 877 | map.put("realMileage", Arith.add(yygl ,ksgl)); |
| 878 | - map.put("jhbc", culateMieageService.culateJhgl(scheduleRealInfos)); | |
| 878 | + map.put("jhbc", culateMieageService.culateJhbc(scheduleRealInfos,"")); | |
| 879 | 879 | map.put("cjbc", culateMieageService.culateLbbc(lists)); |
| 880 | 880 | map.put("ljbc", culateMieageService.culateLjbc(lists, "")); |
| 881 | 881 | int sjbc =culateMieageService.culateLjbc(lists, "")+culateMieageService.culateSjbc(lists, ""); |
| ... | ... | @@ -2674,8 +2674,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 2674 | 2674 | } |
| 2675 | 2675 | for (int i = 0; i < newList.size(); i++) { |
| 2676 | 2676 | ScheduleRealInfo t1 = newList.get(i); |
| 2677 | + String reamrks1=t1.getRemarks()==null?"":t1.getRemarks(); | |
| 2678 | + if(reamrks1.length()>5){ | |
| 2679 | + t1.setRemarks(reamrks1.substring(0, 5)); | |
| 2680 | + t1.setRemark(reamrks1); | |
| 2681 | + } | |
| 2677 | 2682 | for (int j = 0; j < list.size(); j++) { |
| 2678 | 2683 | ScheduleRealInfo t2 = list.get(j); |
| 2684 | + String reamrks2=t2.getRemarks()==null?"":t2.getRemarks(); | |
| 2685 | + if(reamrks2.length()>5){ | |
| 2686 | + t2.setRemarks(reamrks2.substring(0, 5)); | |
| 2687 | + t2.setRemark(reamrks2); | |
| 2688 | + } | |
| 2679 | 2689 | if (t1.getId() == t2.getId()) { |
| 2680 | 2690 | t1 = t2; |
| 2681 | 2691 | } |
| ... | ... | @@ -3989,7 +3999,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3989 | 3999 | } |
| 3990 | 4000 | tempMap.put("fcsjk" + x, fcsjk); |
| 3991 | 4001 | tempMap.put("fcsjm" + x, fcsjm); |
| 3992 | - tempMap.put("remarks" + x, schedule.getRemarks() != null ? schedule.getRemarks() : ""); | |
| 4002 | + tempMap.put("remarks" + x, schedule.getRemark() != null ? schedule.getRemark() : ""); | |
| 3993 | 4003 | |
| 3994 | 4004 | size++; |
| 3995 | 4005 | } |
| ... | ... | @@ -4084,7 +4094,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 4084 | 4094 | double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists)); |
| 4085 | 4095 | map.put("ksgl",ksgl); |
| 4086 | 4096 | map.put("realMileage", Arith.add(yygl ,ksgl)); |
| 4087 | - map.put("jhbc", culateMieageService.culateJhgl(scheduleRealInfos)); | |
| 4097 | + map.put("jhbc", culateMieageService.culateJhbc(scheduleRealInfos,"")); | |
| 4088 | 4098 | map.put("cjbc", culateMieageService.culateLbbc(lists)); |
| 4089 | 4099 | map.put("ljbc", culateMieageService.culateLjbc(lists, "")); |
| 4090 | 4100 | int sjbc =culateMieageService.culateLjbc(lists, "")+culateMieageService.culateSjbc(lists, ""); | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -864,12 +864,14 @@ public class ReportServiceImpl implements ReportService{ |
| 864 | 864 | //查询时间里程 |
| 865 | 865 | String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,2 as xh FROM " |
| 866 | 866 | + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and " |
| 867 | - + " fcsj <='"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks') " | |
| 867 | + + " fcsj <='"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks'" | |
| 868 | + + " and bc_type !='region') " | |
| 868 | 869 | + " union " |
| 869 | 870 | + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,1 as xh FROM " |
| 870 | 871 | + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and " |
| 871 | - + " fcsj > '"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks') " | |
| 872 | - + " order by xl_dir, xh, fcsj"; | |
| 872 | + + " fcsj > '"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks' " | |
| 873 | + + " and bc_type !='region') " | |
| 874 | + + " order by xl_dir, xh, lp,fcsj"; | |
| 873 | 875 | Map<String, Object> map=new HashMap<String,Object>(); |
| 874 | 876 | List<Map<String, Object>> list= jdbcTemplate.query(sqlPc, |
| 875 | 877 | new RowMapper<Map<String, Object>>(){ |
| ... | ... | @@ -923,13 +925,17 @@ public class ReportServiceImpl implements ReportService{ |
| 923 | 925 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 924 | 926 | List<Map<String, Object>> list2 = keyMap.get(key); |
| 925 | 927 | List<Integer> cjs = new ArrayList<Integer>(); |
| 928 | + List<Integer> fcsj_s = new ArrayList<Integer>(); | |
| 929 | + List<Integer> fcsj_x = new ArrayList<Integer>(); | |
| 926 | 930 | int sxsj = 0, xxsj = 0, sxtssj = 0, xxtssj = 0; |
| 927 | 931 | int sxbc = 0, xxbc = 0, sxtsbc = 0, xxtsbc = 0; |
| 928 | 932 | int temp = 24*60+1, zcj = 0; |
| 929 | 933 | boolean ists = false; |
| 934 | + String lpname=""; | |
| 930 | 935 | for(Map<String, Object> m : list2){ |
| 931 | 936 | String[] split = m.get("fcsj").toString().split(":"); |
| 932 | 937 | int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| 938 | + | |
| 933 | 939 | int xlDir = Integer.valueOf(m.get("dir").toString()); |
| 934 | 940 | int bcsj = Integer.valueOf(m.get("bcsj").toString()); |
| 935 | 941 | if(temp >= fcsj){ |
| ... | ... | @@ -937,28 +943,68 @@ public class ReportServiceImpl implements ReportService{ |
| 937 | 943 | ists = false; |
| 938 | 944 | } |
| 939 | 945 | if(xlDir == 0){ |
| 946 | + fcsj_s.add(fcsj); | |
| 940 | 947 | sxsj += bcsj; |
| 941 | 948 | sxbc ++; |
| 942 | - if(ists){ | |
| 943 | - sxtssj += fcsj - temp; | |
| 949 | + if(!ists){ | |
| 950 | + if(lpname.equals("")){ | |
| 951 | + lpname=m.get("lp").toString(); | |
| 952 | + }else{ | |
| 953 | + if(lpname.equals(m.get("lp").toString())){ | |
| 954 | + sxtssj += (fcsj+bcsj) - temp; | |
| 955 | + } | |
| 956 | + } | |
| 944 | 957 | sxtsbc++; |
| 945 | 958 | } |
| 946 | 959 | } else { |
| 960 | + fcsj_x.add(fcsj); | |
| 947 | 961 | xxsj += bcsj; |
| 948 | 962 | xxbc ++; |
| 949 | - if(ists){ | |
| 950 | - xxtssj += fcsj - temp; | |
| 963 | + | |
| 964 | + if(!ists){ | |
| 965 | + | |
| 966 | + if(lpname.equals("")){ | |
| 967 | + lpname=m.get("lp").toString(); | |
| 968 | + }else{ | |
| 969 | + if(lpname.equals(m.get("lp").toString())){ | |
| 970 | + xxtssj += (fcsj+bcsj) - temp; | |
| 971 | + } | |
| 972 | + } | |
| 951 | 973 | xxtsbc++; |
| 952 | 974 | } |
| 953 | 975 | } |
| 954 | - if(temp < fcsj){ | |
| 976 | + /*if(temp < fcsj){ | |
| 955 | 977 | cjs.add(fcsj - temp); |
| 956 | 978 | temp = fcsj; |
| 957 | - } | |
| 979 | + }*/ | |
| 958 | 980 | if(m.get("ists").toString().trim().equals("1")){ |
| 959 | 981 | ists = true; |
| 982 | + }else{ | |
| 983 | + ists=false; | |
| 960 | 984 | } |
| 961 | 985 | } |
| 986 | + Collections.sort(fcsj_s); | |
| 987 | + int fcsjs=0; | |
| 988 | + for (int i = 0; i < fcsj_s.size(); i++) { | |
| 989 | + if(i==0){ | |
| 990 | + fcsjs =fcsj_s.get(i); | |
| 991 | + }else{ | |
| 992 | + cjs.add(fcsj_s.get(i)-fcsjs); | |
| 993 | + fcsjs=fcsj_s.get(i); | |
| 994 | + } | |
| 995 | + | |
| 996 | + } | |
| 997 | + Collections.sort(fcsj_x); | |
| 998 | + int fcsjx=0; | |
| 999 | + for (int i = 0; i < fcsj_x.size(); i++) { | |
| 1000 | + if(i==0){ | |
| 1001 | + fcsjx =fcsj_x.get(i); | |
| 1002 | + }else{ | |
| 1003 | + cjs.add(fcsj_x.get(i)-fcsjx); | |
| 1004 | + fcsjx =fcsj_x.get(i); | |
| 1005 | + } | |
| 1006 | + | |
| 1007 | + } | |
| 962 | 1008 | Collections.sort(cjs); |
| 963 | 1009 | for(int i : cjs){ |
| 964 | 1010 | zcj += i; | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html