Commit 9f91d74a authored by duwei's avatar duwei

转向接口优化

parent 5af88d05
...@@ -318,10 +318,13 @@ public class TrendController { ...@@ -318,10 +318,13 @@ public class TrendController {
String[] turnArr = turns.split(","); String[] turnArr = turns.split(",");
for (int i =0; i < turnArr.length; i++){ for (int i =0; i < turnArr.length; i++){
String[] s = turnArr[i].split("-"); String[] s = turnArr[i].split("-");
String t = TurnConvertEnum.getCodeByKey(Integer.parseInt(s[1]));
if (i < turnArr.length - 1) { if (i < turnArr.length - 1) {
inDir.append(s[0]).append(","); inDir.append(s[0]).append(",");
String t = TurnConvertEnum.getCodeByKey(Integer.parseInt(s[0]));
turnType.append(t).append(","); turnType.append(t).append(",");
}else {
inDir.append(s[0]);
turnType.append(t);
} }
} }
lanePeriodTurnVO.setInDir(inDir.toString()); lanePeriodTurnVO.setInDir(inDir.toString());
......
...@@ -1717,7 +1717,6 @@ public class TrendServiceImpl implements TrendService { ...@@ -1717,7 +1717,6 @@ public class TrendServiceImpl implements TrendService {
if(po.getSturation() != null) { if(po.getSturation() != null) {
//保留小数点后两位 //保留小数点后两位
vo.setSaturation(Math.round(po.getSturation() * 100) / 100.0); vo.setSaturation(Math.round(po.getSturation() * 100) / 100.0);
vo.setSaturation(po.getSturation());
} }
//拥堵指数 //拥堵指数
vo.setCongestionIndex(0.0); vo.setCongestionIndex(0.0);
...@@ -1763,19 +1762,19 @@ public class TrendServiceImpl implements TrendService { ...@@ -1763,19 +1762,19 @@ public class TrendServiceImpl implements TrendService {
vo.setTrafficAccidentNum(0); vo.setTrafficAccidentNum(0);
//不停车通过率 //不停车通过率
if (po.getNoStopRate() != null) { if (po.getNoStopRate() != null) {
vo.setNoStopPassRate(po.getNoStopRate()); vo.setNoStopPassRate(Math.round(po.getNoStopRate() * 100) / 100.0);
}else { }else {
vo.setNoStopPassRate(0); vo.setNoStopPassRate(0);
} }
//一次停车通过率 //一次停车通过率
if (po.getOneStopRate() != null) { if (po.getOneStopRate() != null) {
vo.setOneStopPassRate(po.getOneStopRate()); vo.setOneStopPassRate(Math.round(po.getOneStopRate() * 100) / 100.0);
}else { }else {
vo.setOneStopPassRate(0); vo.setOneStopPassRate(0);
} }
//二次停车通过率 //二次停车通过率
if (po.getTwoStopRate() != null) { if (po.getTwoStopRate() != null) {
vo.setTwoStopPassRate(po.getTwoStopRate()); vo.setTwoStopPassRate(Math.round(po.getTwoStopRate() * 100) / 100.0);
}else { }else {
vo.setTwoStopPassRate(0); vo.setTwoStopPassRate(0);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment