Commit adad8ec422efec5bf09507d9cea3d58340f97eef
1 parent
8b4d6d59
运管处时刻表提交不显示执行时段
Showing
1 changed file
with
7 additions
and
3 deletions
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| ... | ... | @@ -24,6 +24,7 @@ import com.bsth.webService.trafficManage.geotool.services.Internal; |
| 24 | 24 | import com.bsth.webService.trafficManage.org.tempuri.Results; |
| 25 | 25 | import com.bsth.webService.trafficManage.org.tempuri.WebServiceLocator; |
| 26 | 26 | import com.bsth.webService.trafficManage.org.tempuri.WebServiceSoap; |
| 27 | +import org.apache.commons.lang.StringUtils; | |
| 27 | 28 | import org.apache.commons.lang.time.DateUtils; |
| 28 | 29 | import org.slf4j.Logger; |
| 29 | 30 | import org.slf4j.LoggerFactory; |
| ... | ... | @@ -1125,11 +1126,14 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1125 | 1126 | }else{ |
| 1126 | 1127 | flag = 0; |
| 1127 | 1128 | } |
| 1128 | - result += flag; | |
| 1129 | - if(i !=ruleDayArray.length -1){ | |
| 1130 | - result +=","; | |
| 1129 | + if(flag > 0){ | |
| 1130 | + result += flag + ","; | |
| 1131 | 1131 | } |
| 1132 | 1132 | } |
| 1133 | + // 去掉最后一个字符 | |
| 1134 | + if(StringUtils.endsWith(result,",")){ | |
| 1135 | + result = StringUtils.removeEnd(result,","); | |
| 1136 | + } | |
| 1133 | 1137 | return result; |
| 1134 | 1138 | } |
| 1135 | 1139 | /** | ... | ... |