Commit 3f8df9a1 authored by hanbing's avatar hanbing

[add] 路口管理,返回支队信息

parent effcf158
......@@ -107,7 +107,7 @@ public class CrossManageServiceImpl implements CrossManageService {
baseAreaInfoPO.setRoadName(roadName);
baseAreaInfoPO.setParentCode(0);
handleAreaInfoPO(type, areaName, remark, crossIdList, wkt, baseAreaInfoPO);
} else if (5 == type) { // 子区
} else if (4 == type) { // 子区
BaseAreaInfoPO baseAreaInfoPO = new BaseAreaInfoPO();
baseAreaInfoPO.setRoadName("");
baseAreaInfoPO.setParentCode(0);
......@@ -176,7 +176,12 @@ public class CrossManageServiceImpl implements CrossManageService {
@Override
public ListAreaVO listArea() {
ListAreaVO listAreaVO = new ListAreaVO();
listAreaVO.setParentPoliceList(buildParentPoliceList());
ListAreaVO.CityPoliceVO cityPoliceVO = new ListAreaVO.CityPoliceVO();
BaseAreaInfoPO areaInfoPO = baseAreaInfoMapper.selectCityPolice();
cityPoliceVO.setAreaId(areaInfoPO.getId());
cityPoliceVO.setAreaName(areaInfoPO.getName());
cityPoliceVO.setParentPoliceList(buildParentPoliceList());
listAreaVO.setCityPoliceVO(cityPoliceVO);
listAreaVO.setRoadList(buildRoadList());
listAreaVO.setSubAreaList(buildSubAreaList());
......@@ -185,7 +190,7 @@ public class CrossManageServiceImpl implements CrossManageService {
private List<ListAreaVO.AreaIdAndNameVO> buildSubAreaList() {
List<ListAreaVO.AreaIdAndNameVO> res = new ArrayList<>();
Integer type = 5;
Integer type = 4;
return handleAreaIdAndNameVOList(res, type);
}
......
......@@ -11,13 +11,24 @@ import java.util.List;
@Data
@ApiModel(value = "ListAreaVO", description = "区域列表")
public class ListAreaVO {
@ApiModelProperty(value = "交警大队列表")
private List<ParentAreaVO> parentPoliceList;
@ApiModelProperty(value = "交警支队")
private CityPoliceVO cityPoliceVO;
@ApiModelProperty(value = "道路列表")
private List<AreaIdAndNameVO> roadList;
@ApiModelProperty(value = "子区列表")
private List<AreaIdAndNameVO> subAreaList;
@NoArgsConstructor
@Data
public static class CityPoliceVO {
@ApiModelProperty(value = "交警支队ID")
private Integer areaId;
@ApiModelProperty(value = "交警支队名称")
private String areaName;
@ApiModelProperty(value = "交警大队列表")
private List<ParentAreaVO> parentPoliceList;
}
@NoArgsConstructor
@Data
public static class ParentAreaVO {
......
......@@ -28,4 +28,6 @@ public interface BaseAreaInfoMapper {
List<BaseAreaInfoPO> selectByParentCode(Integer parentCode);
List<BaseAreaInfoPO> selectByType(Integer type);
BaseAreaInfoPO selectCityPolice();
}
......@@ -65,4 +65,10 @@
where type = #{type};
</select>
<select id="selectCityPolice" resultType="net.wanji.databus.po.BaseAreaInfoPO">
select <include refid="baseColumnList"/>
from t_base_area_info
where type = 0;
</select>
</mapper>
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