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,7 +875,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 875 | double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists)); | 875 | double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists)); |
| 876 | map.put("ksgl",ksgl); | 876 | map.put("ksgl",ksgl); |
| 877 | map.put("realMileage", Arith.add(yygl ,ksgl)); | 877 | map.put("realMileage", Arith.add(yygl ,ksgl)); |
| 878 | - map.put("jhbc", culateMieageService.culateJhgl(scheduleRealInfos)); | 878 | + map.put("jhbc", culateMieageService.culateJhbc(scheduleRealInfos,"")); |
| 879 | map.put("cjbc", culateMieageService.culateLbbc(lists)); | 879 | map.put("cjbc", culateMieageService.culateLbbc(lists)); |
| 880 | map.put("ljbc", culateMieageService.culateLjbc(lists, "")); | 880 | map.put("ljbc", culateMieageService.culateLjbc(lists, "")); |
| 881 | int sjbc =culateMieageService.culateLjbc(lists, "")+culateMieageService.culateSjbc(lists, ""); | 881 | int sjbc =culateMieageService.culateLjbc(lists, "")+culateMieageService.culateSjbc(lists, ""); |
| @@ -2674,8 +2674,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2674,8 +2674,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2674 | } | 2674 | } |
| 2675 | for (int i = 0; i < newList.size(); i++) { | 2675 | for (int i = 0; i < newList.size(); i++) { |
| 2676 | ScheduleRealInfo t1 = newList.get(i); | 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 | for (int j = 0; j < list.size(); j++) { | 2682 | for (int j = 0; j < list.size(); j++) { |
| 2678 | ScheduleRealInfo t2 = list.get(j); | 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 | if (t1.getId() == t2.getId()) { | 2689 | if (t1.getId() == t2.getId()) { |
| 2680 | t1 = t2; | 2690 | t1 = t2; |
| 2681 | } | 2691 | } |
| @@ -3989,7 +3999,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3989,7 +3999,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3989 | } | 3999 | } |
| 3990 | tempMap.put("fcsjk" + x, fcsjk); | 4000 | tempMap.put("fcsjk" + x, fcsjk); |
| 3991 | tempMap.put("fcsjm" + x, fcsjm); | 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 | size++; | 4004 | size++; |
| 3995 | } | 4005 | } |
| @@ -4084,7 +4094,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4084,7 +4094,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4084 | double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists)); | 4094 | double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists)); |
| 4085 | map.put("ksgl",ksgl); | 4095 | map.put("ksgl",ksgl); |
| 4086 | map.put("realMileage", Arith.add(yygl ,ksgl)); | 4096 | map.put("realMileage", Arith.add(yygl ,ksgl)); |
| 4087 | - map.put("jhbc", culateMieageService.culateJhgl(scheduleRealInfos)); | 4097 | + map.put("jhbc", culateMieageService.culateJhbc(scheduleRealInfos,"")); |
| 4088 | map.put("cjbc", culateMieageService.culateLbbc(lists)); | 4098 | map.put("cjbc", culateMieageService.culateLbbc(lists)); |
| 4089 | map.put("ljbc", culateMieageService.culateLjbc(lists, "")); | 4099 | map.put("ljbc", culateMieageService.culateLjbc(lists, "")); |
| 4090 | int sjbc =culateMieageService.culateLjbc(lists, "")+culateMieageService.culateSjbc(lists, ""); | 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,12 +864,14 @@ public class ReportServiceImpl implements ReportService{ | ||
| 864 | //查询时间里程 | 864 | //查询时间里程 |
| 865 | String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,2 as xh FROM " | 865 | String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,2 as xh FROM " |
| 866 | + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and " | 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 | + " union " | 869 | + " union " |
| 869 | + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,1 as xh FROM " | 870 | + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,1 as xh FROM " |
| 870 | + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and " | 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 | Map<String, Object> map=new HashMap<String,Object>(); | 875 | Map<String, Object> map=new HashMap<String,Object>(); |
| 874 | List<Map<String, Object>> list= jdbcTemplate.query(sqlPc, | 876 | List<Map<String, Object>> list= jdbcTemplate.query(sqlPc, |
| 875 | new RowMapper<Map<String, Object>>(){ | 877 | new RowMapper<Map<String, Object>>(){ |
| @@ -923,13 +925,17 @@ public class ReportServiceImpl implements ReportService{ | @@ -923,13 +925,17 @@ public class ReportServiceImpl implements ReportService{ | ||
| 923 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 925 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 924 | List<Map<String, Object>> list2 = keyMap.get(key); | 926 | List<Map<String, Object>> list2 = keyMap.get(key); |
| 925 | List<Integer> cjs = new ArrayList<Integer>(); | 927 | List<Integer> cjs = new ArrayList<Integer>(); |
| 928 | + List<Integer> fcsj_s = new ArrayList<Integer>(); | ||
| 929 | + List<Integer> fcsj_x = new ArrayList<Integer>(); | ||
| 926 | int sxsj = 0, xxsj = 0, sxtssj = 0, xxtssj = 0; | 930 | int sxsj = 0, xxsj = 0, sxtssj = 0, xxtssj = 0; |
| 927 | int sxbc = 0, xxbc = 0, sxtsbc = 0, xxtsbc = 0; | 931 | int sxbc = 0, xxbc = 0, sxtsbc = 0, xxtsbc = 0; |
| 928 | int temp = 24*60+1, zcj = 0; | 932 | int temp = 24*60+1, zcj = 0; |
| 929 | boolean ists = false; | 933 | boolean ists = false; |
| 934 | + String lpname=""; | ||
| 930 | for(Map<String, Object> m : list2){ | 935 | for(Map<String, Object> m : list2){ |
| 931 | String[] split = m.get("fcsj").toString().split(":"); | 936 | String[] split = m.get("fcsj").toString().split(":"); |
| 932 | int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | 937 | int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| 938 | + | ||
| 933 | int xlDir = Integer.valueOf(m.get("dir").toString()); | 939 | int xlDir = Integer.valueOf(m.get("dir").toString()); |
| 934 | int bcsj = Integer.valueOf(m.get("bcsj").toString()); | 940 | int bcsj = Integer.valueOf(m.get("bcsj").toString()); |
| 935 | if(temp >= fcsj){ | 941 | if(temp >= fcsj){ |
| @@ -937,28 +943,68 @@ public class ReportServiceImpl implements ReportService{ | @@ -937,28 +943,68 @@ public class ReportServiceImpl implements ReportService{ | ||
| 937 | ists = false; | 943 | ists = false; |
| 938 | } | 944 | } |
| 939 | if(xlDir == 0){ | 945 | if(xlDir == 0){ |
| 946 | + fcsj_s.add(fcsj); | ||
| 940 | sxsj += bcsj; | 947 | sxsj += bcsj; |
| 941 | sxbc ++; | 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 | sxtsbc++; | 957 | sxtsbc++; |
| 945 | } | 958 | } |
| 946 | } else { | 959 | } else { |
| 960 | + fcsj_x.add(fcsj); | ||
| 947 | xxsj += bcsj; | 961 | xxsj += bcsj; |
| 948 | xxbc ++; | 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 | xxtsbc++; | 973 | xxtsbc++; |
| 952 | } | 974 | } |
| 953 | } | 975 | } |
| 954 | - if(temp < fcsj){ | 976 | + /*if(temp < fcsj){ |
| 955 | cjs.add(fcsj - temp); | 977 | cjs.add(fcsj - temp); |
| 956 | temp = fcsj; | 978 | temp = fcsj; |
| 957 | - } | 979 | + }*/ |
| 958 | if(m.get("ists").toString().trim().equals("1")){ | 980 | if(m.get("ists").toString().trim().equals("1")){ |
| 959 | ists = true; | 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 | Collections.sort(cjs); | 1008 | Collections.sort(cjs); |
| 963 | for(int i : cjs){ | 1009 | for(int i : cjs){ |
| 964 | zcj += i; | 1010 | zcj += i; |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| @@ -594,7 +594,7 @@ | @@ -594,7 +594,7 @@ | ||
| 594 | <td>{{obj.slow0}} | 594 | <td>{{obj.slow0}} |
| 595 | 595 | ||
| 596 | </td> | 596 | </td> |
| 597 | - <td colspan="2"></td> | 597 | + <td colspan="2" title="{{obj.remark}}">{{obj.remarks}}</td> |
| 598 | {{if (i+1)%3 == 0}} | 598 | {{if (i+1)%3 == 0}} |
| 599 | <td> </td> | 599 | <td> </td> |
| 600 | </tr> | 600 | </tr> |