Commit 158340e9bf07ce134d24d9f649ce84f6c9921102

Authored by 徐烜
2 parents 67e8b890 93decfc0

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

src/main/java/com/bsth/data/car_out_info/CarOutInfoHandler.java
... ... @@ -54,27 +54,19 @@ public class CarOutInfoHandler {
54 54 * 全量更新发车信息表
55 55 */
56 56 public void updateAll() {
57   - Set<String> ks = BasicData.lineCode2NameMap.keySet();
58   - for (String lineCode : ks) {
59   - update(lineCode);
60   - }
61   - }
62   -
63   - public void update(String lineCode) {
64   - try {
65   - ArrayListMultimap<String, ScheduleRealInfo> lpScheduleMap = dayOfSchedule.getLpScheduleMap();
66   - List<ScheduleRealInfo> list = new ArrayList<>();
  57 + try{
  58 + //将班次按线路分组
  59 + List<ScheduleRealInfo> all = new ArrayList<>(dayOfSchedule.findAll());
  60 + ArrayListMultimap<String, ScheduleRealInfo> xlMaps = ArrayListMultimap.create();
  61 + for(ScheduleRealInfo sch : all){
  62 + xlMaps.put(sch.getXlBm(), sch);
  63 + }
67 64  
68   - Set<String> ks = lpScheduleMap.keySet();
69   - String prefix = lineCode + "_";
  65 + Set<String> ks = xlMaps.keySet();
70 66 for (String k : ks) {
71   - if (k.startsWith(prefix)) {
72   - list.addAll(lpScheduleMap.get(k));
73   - }
  67 + update(xlMaps.get(k));
74 68 }
75   -
76   - update(list);
77   - } catch (Exception e) {
  69 + }catch (Exception e){
78 70 logger.error("", e);
79 71 }
80 72 }
... ...
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
... ... @@ -338,6 +338,9 @@ public class InOutStationSignalHandle extends SignalHandle{
338 338 if(lpNext != null){
339 339 lpNext.setQdzArrDatesj(sch.getZdsjActual());
340 340 }
  341 + else{
  342 + logger.info(sch.getClZbh() + " 到终点,无下一班");
  343 + }
341 344  
342 345 //通知客户端
343 346 sendUtils.sendZdsj(sch, lpNext, doneSum);
... ...
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 //---------------------------------------早前
... ...
src/main/resources/static/pages/base/stationroute/addstationstemplate.html
... ... @@ -57,7 +57,7 @@
57 57 <h5 class="block"><span class="help-block" style="color:#1bbc9b;"> * 手动添加站点规划说明: </span></h5>
58 58 <p>
59 59 <span class="help-block" style="color:#1bbc9b;">
60   - &nbsp;请在文本域中按站点顺序依次输入站点名称(如果已有站点GPS坐标,请将坐标跟在站点名称后面用【Tab】键隔开),每输入完一个站名时请按回车键【Enter】换行.
  60 + &nbsp;请在文本域中按站点顺序依次输入站点名称(如果已有站点GPS坐标(坐标点也用【Tab】键隔开),请将坐标跟在站点名称后面用【Tab】键隔开),每输入完一个站名时请按回车键【Enter】换行.
61 61 例如:<br><br>
62 62 浦东大道金桥路 121.496612 31.238960<br>
63 63 浦东大道居家桥路 121.496618 31.238957<br>
... ...
src/main/resources/static/real_control_v2/css/line_schedule.css
... ... @@ -44,6 +44,7 @@
44 44  
45 45 .line_schedule .ct_table {
46 46 padding-top: 36px;
  47 + color: #000;
47 48 }
48 49  
49 50 .line_schedule .ct_table>.ct_table_head {
... ...
src/main/resources/static/real_control_v2/css/north.css
... ... @@ -358,7 +358,7 @@
358 358  
359 359 .op-beijingtime-time{
360 360 padding-left: 0px;
361   - width: 107px;
  361 + width: 109px;
362 362 }
363 363  
364 364 .op-beijingtime-time>span{
... ...