Commit 7178ce17 authored by zhoushiguang's avatar zhoushiguang

示范区区域查询

parent 61381f26
......@@ -82,9 +82,9 @@ public class EventInfoController extends AbstractRestServerImpl<EventInfo> imple
@ApiOperation(value = "交通事件信息-根据开始以及结束时间查询交通事件信息", notes = "获取所有交通事件信息记录", response = EventInfo.class, produces = MediaType.APPLICATION_JSON,hidden = false)
@ApiImplicitParams({
@ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String"),
@ApiImplicitParam(name = "crossId", value = "路口id", required = true, dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String",defaultValue = ""),
@ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String",defaultValue = ""),
@ApiImplicitParam(name = "crossId", value = "路口id", required = true, dataType = "String",defaultValue = ""),
})
@GetMapping(value = "getListByStartAndEnd")
public JsonViewObject getListByStartAndEnd(String startTime, String endTime, String crossId){
......
......@@ -12,7 +12,9 @@ import net.wanji.opt.servicev2.judgeanalysis.BaseAreaInfoService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Stream;
/**
......@@ -38,16 +40,14 @@ public class BaseAreaInfoServiceImpl implements BaseAreaInfoService {
* @return
*/
public List<BaseAreaInfoPO> selectByType(Integer type){
List<BaseAreaInfoPO> list = baseAreaInfoMapper.selectByType(type);
if (list.size() > 0){
list.stream().forEach(item ->{
List<BaseAreaInfoPO> areaInfoPOList = baseAreaInfoMapper.selectByParentCode(item.getId());
if (areaInfoPOList.size() > 0){
item.setAreaInfoPOList(areaInfoPOList);
}
});
}
return list;
//指定查询一期示范区
BaseAreaInfoPO parent = baseAreaInfoMapper.selectById(12);
List<BaseAreaInfoPO> child = baseAreaInfoMapper.selectByParentCode(parent.getId());
List<BaseAreaInfoPO> retList = new ArrayList<>();
retList.add(parent);
retList.addAll(child);
return retList;
}
}
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