Commit 515e793dd0b9582841fd017ddff304eb62abaf79

Authored by 廖磊
1 parent 009fc291

调度大间隔修改 时刻表分析表修改

src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
... ... @@ -1029,6 +1029,11 @@ public class CulateMileageServiceImpl implements CulateMileageService{
1029 1029  
1030 1030 if(listInfo.size()>0){
1031 1031 m=listDjg(peak,trough,listInfo,grade);
  1032 + }else{
  1033 + m.put("djgcsz", "0");
  1034 + m.put("djgcsw", "0");
  1035 + m.put("djgcsq", "0");
  1036 + m.put("djgsj", "0");
1032 1037 }
1033 1038 }
1034 1039 return m;
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -873,7 +873,7 @@ public class ReportServiceImpl implements ReportService{
873 873 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and "
874 874 + " fcsj > '"+minfcsj+"' and bc_type!='ldks' "
875 875 + " and bc_type !='region') "
876   - + " order by xl_dir, xh, lp,fcsj";
  876 + + " order by xh, lp,fcsj";
877 877 Map<String, Object> map=new HashMap<String,Object>();
878 878 List<Map<String, Object>> list= jdbcTemplate.query(sqlPc,
879 879 new RowMapper<Map<String, Object>>(){
... ... @@ -915,6 +915,8 @@ public class ReportServiceImpl implements ReportService{
915 915 int temp = 48*60+1, zcj = 0;
916 916 boolean ists = true;
917 917 String lpname="";
  918 + int dir =-1;
  919 + int fcsjT_= 0;
918 920 for (int i = 0; i < list.size(); i++) {
919 921 Map<String, Object> m=list.get(i);
920 922 int xlDir = Integer.valueOf(m.get("dir").toString());
... ... @@ -927,6 +929,10 @@ public class ReportServiceImpl implements ReportService{
927 929 if(temp>fcsjT){
928 930 temp=fcsjT+bcsj;
929 931 }
  932 + dir =xlDir;
  933 + if(bcType.equals("in") || bcType.equals("out")){
  934 + ists=false;
  935 + }
930 936 }else{
931 937 if(temp>fcsjT){
932 938 temp=fcsjT+bcsj;
... ... @@ -934,74 +940,146 @@ public class ReportServiceImpl implements ReportService{
934 940 if(bcType.equals("in") || bcType.equals("out")){
935 941 temp = fcsjT+bcsj;
936 942 lpname=m.get("lp").toString();
  943 + dir =xlDir;
937 944 ists=false;
938 945 }else{
939   -// if(ists){
940   -// temp = fcsjT+bcsj;
941   -// lpname=m.get("lp").toString();
942   -// }else{
943   - if(xlDir==0){
  946 +// if(xlDir==0){
944 947 //上行数据
945 948 if(fcsjT>= minSj && fcsjT <= 6*60+30){
946 949 //早高峰前
947   - yysxZq +=bcsj;
948   - sxcountZqbc ++;
949   - zqFcsj0.add(fcsjT);
  950 + if(xlDir==0){
  951 + yysxZq +=bcsj;
  952 + sxcountZqbc ++;
  953 + zqFcsj0.add(fcsjT);
  954 + }else{
  955 + yyxxZq +=bcsj;
  956 + xxcountZqbc ++;
  957 + zqFcsj1.add(fcsjT);
  958 + }
950 959 if(ists){
951 960 if(lpname.equals(m.get("lp").toString())){
952   - tzsxZq +=fcsjT-temp;
  961 + if(dir==0)
  962 + tzsxZq +=fcsjT-temp;
  963 + else
  964 + tzxxZq +=fcsjT-temp;
953 965 }
954 966 }
955 967 temp = fcsjT+bcsj;
956 968  
957 969 }else if(fcsjT > 6*60+30 && fcsjT <= 8*60+30){
958 970 //早高峰
959   - yysxZgf +=bcsj;
960   - sxcountZgfbc ++;
961   - zgfFcsj0.add(fcsjT);
  971 + if(xlDir==0){
  972 + yysxZgf +=bcsj;
  973 + sxcountZgfbc ++;
  974 + zgfFcsj0.add(fcsjT);
  975 + }else{
  976 + yyxxZgf +=bcsj;
  977 + xxcountZgfbc ++;
  978 + zgfFcsj1.add(fcsjT);
  979 + }
  980 +
962 981 if(ists){
963 982 if(lpname.equals(m.get("lp").toString())){
964   - tzsxZgf +=fcsjT-temp;
  983 + if(dir==0){
  984 + if(fcsjT>= minSj && fcsjT <= 6*60+30)
  985 + tzsxZq +=fcsjT-temp;
  986 + else
  987 + tzsxZgf +=fcsjT-temp;
  988 + }else{
  989 + if(fcsjT_>= minSj && fcsjT_ <= 6*60+30)
  990 + tzxxZq +=fcsjT-temp;
  991 + else
  992 + tzxxZgf +=fcsjT-temp;
  993 + }
965 994 }
966 995 }
967 996 temp =fcsjT+bcsj;
968 997  
969 998 }else if(fcsjT > 8*60+30 && fcsjT <= 16*60){
970 999 //中午
971   - yysxZw +=bcsj;
972   - sxcountZwbc ++;
973   - zwFcsj0.add(fcsjT);
  1000 + if(xlDir==0){
  1001 + yysxZw +=bcsj;
  1002 + sxcountZwbc ++;
  1003 + zwFcsj0.add(fcsjT);
  1004 + }else{
  1005 + yyxxZw +=bcsj;
  1006 + xxcountZwbc ++;
  1007 + zwFcsj1.add(fcsjT);
  1008 + }
974 1009 if(ists){
975 1010 if(lpname.equals(m.get("lp").toString())){
976   - tzsxZw +=fcsjT-temp;
  1011 + if(dir==0){
  1012 + if(fcsjT_ > 6*60+30 && fcsjT_ <= 8*60+30)
  1013 + tzsxZgf +=fcsjT-temp;
  1014 + else
  1015 + tzsxZw +=fcsjT-temp;
  1016 + }else{
  1017 + if(fcsjT_ > 6*60+30 && fcsjT_ <= 8*60+30)
  1018 + tzxxZgf +=fcsjT-temp;
  1019 + else
  1020 + tzxxZw +=fcsjT-temp;
  1021 + }
977 1022 }
978 1023 }
979 1024 temp =fcsjT+bcsj;
980 1025 }else if(fcsjT > 16*60 && fcsjT <= 18*60){
981 1026 //晚高峰
982   - yysxWgf +=bcsj;
983   - sxcountWgfbc ++;
984   - wgfFcsj0.add(fcsjT);
  1027 + if(xlDir==0){
  1028 + yysxWgf +=bcsj;
  1029 + sxcountWgfbc ++;
  1030 + wgfFcsj0.add(fcsjT);
  1031 + }else{
  1032 + yyxxWgf +=bcsj;
  1033 + xxcountWgfbc ++;
  1034 + wgfFcsj1.add(fcsjT);
  1035 + }
  1036 +
985 1037 if(ists){
986 1038 if(lpname.equals(m.get("lp").toString())){
987   - tzsxWgf +=fcsjT-temp;
  1039 + if(dir==0){
  1040 + if(fcsjT_ > 8*60+30 && fcsjT_ <= 16*60)
  1041 + tzsxZw +=fcsjT-temp;
  1042 + else
  1043 + tzsxWgf +=fcsjT-temp;
  1044 + }else{
  1045 + if(fcsjT_ > 8*60+30 && fcsjT_ <= 16*60)
  1046 + tzxxZw +=fcsjT-temp;
  1047 + else
  1048 + tzxxWgf +=fcsjT-temp;
  1049 + }
988 1050 }
989 1051 }
990 1052 temp =fcsjT+bcsj;
991 1053 }else{
992 1054 //晚高峰后
993   - yysxWh +=bcsj;
994   - sxcountWhbc ++;
995   - whFcsj0.add(fcsjT);
  1055 + if(xlDir==0){
  1056 + yysxWh +=bcsj;
  1057 + sxcountWhbc ++;
  1058 + whFcsj0.add(fcsjT);
  1059 + }else{
  1060 + yyxxWh +=bcsj;
  1061 + xxcountWhbc ++;
  1062 + whFcsj1.add(fcsjT);
  1063 + }
996 1064 if(ists){
997 1065 if(lpname.equals(m.get("lp").toString())){
998   - tzsxWh +=fcsjT-temp;
  1066 + if(dir==0){
  1067 + if(fcsjT_ > 16*60 && fcsjT_ <= 18*60)
  1068 + tzsxWgf +=fcsjT-temp;
  1069 + else
  1070 + tzsxWh +=fcsjT-temp;
  1071 + }else{
  1072 + if(fcsjT_ > 16*60 && fcsjT_ <= 18*60)
  1073 + tzxxWgf +=fcsjT-temp;
  1074 + else
  1075 + tzxxWh +=fcsjT-temp;
  1076 + }
999 1077 }
1000 1078 }
1001 1079 temp =fcsjT+bcsj;
1002 1080 }
1003   - lpname=m.get("lp").toString();
1004   - }else{
  1081 +
  1082 + /*}else{
1005 1083 //下行数据
1006 1084 if(fcsjT>= minSj && fcsjT <= 6*60+30){
1007 1085 //早高峰前
... ... @@ -1021,7 +1099,10 @@ public class ReportServiceImpl implements ReportService{
1021 1099 zgfFcsj1.add(fcsjT);
1022 1100 if(ists){
1023 1101 if(lpname.equals(m.get("lp").toString())){
1024   - tzxxZgf +=fcsjT-temp;
  1102 + if(fcsjT_>= minSj && fcsjT_ <= 6*60+30)
  1103 + tzxxZq +=fcsjT-temp;
  1104 + else
  1105 + tzxxZgf +=fcsjT-temp;
1025 1106 }
1026 1107 }
1027 1108 temp =fcsjT+bcsj;
... ... @@ -1032,7 +1113,10 @@ public class ReportServiceImpl implements ReportService{
1032 1113 zwFcsj1.add(fcsjT);
1033 1114 if(ists){
1034 1115 if(lpname.equals(m.get("lp").toString())){
1035   - tzxxZw +=fcsjT-temp;
  1116 + if(fcsjT_ > 6*60+30 && fcsjT_ <= 8*60+30)
  1117 + tzxxZgf +=fcsjT-temp;
  1118 + else
  1119 + tzxxZw +=fcsjT-temp;
1036 1120 }
1037 1121 }
1038 1122 temp =fcsjT+bcsj;
... ... @@ -1043,7 +1127,10 @@ public class ReportServiceImpl implements ReportService{
1043 1127 wgfFcsj1.add(fcsjT);
1044 1128 if(ists){
1045 1129 if(lpname.equals(m.get("lp").toString())){
1046   - tzxxWgf +=fcsjT-temp;
  1130 + if(fcsjT_ > 8*60+30 && fcsjT_ <= 16*60)
  1131 + tzxxZw +=fcsjT-temp;
  1132 + else
  1133 + tzxxWgf +=fcsjT-temp;
1047 1134 }
1048 1135 }
1049 1136 temp =fcsjT+bcsj;
... ... @@ -1054,20 +1141,27 @@ public class ReportServiceImpl implements ReportService{
1054 1141 whFcsj1.add(fcsjT);
1055 1142 if(ists){
1056 1143 if(lpname.equals(m.get("lp").toString())){
1057   - tzxxWh +=fcsjT-temp;
  1144 + if(fcsjT_ > 16*60 && fcsjT_ <= 18*60)
  1145 + tzxxWgf +=fcsjT-temp;
  1146 + else
  1147 + tzxxWh +=fcsjT-temp;
1058 1148 }
1059 1149 }
1060 1150 temp =fcsjT+bcsj;
1061 1151 }
1062 1152 // }
1063   - }
  1153 + }*/
  1154 + lpname=m.get("lp").toString();
  1155 + fcsjT_=fcsjT;
  1156 + dir =xlDir;
  1157 + if(m.get("ists").toString().trim().equals("1")){
  1158 + ists=false;
  1159 + }else{
  1160 + ists = true;
  1161 + }
1064 1162 }
1065 1163 }
1066   - if(m.get("ists").toString().trim().equals("1")){
1067   - ists=false;
1068   - }else{
1069   - ists = true;
1070   - }
  1164 +
1071 1165 }
1072 1166  
1073 1167 //---------------------------------------早前
... ...