|
|
|
@ -156,13 +156,12 @@ public class PatrolPresetPosController extends BaseController { |
|
|
|
@GetMapping({"/camera/{channelType}"}) |
|
|
|
public AjaxResult findCameraByChannelType(@PathVariable("channelType") String channelType) { |
|
|
|
List<CameraVo> list = patrolPresetPosService.selectCameraByChannelType(channelType); |
|
|
|
JSONArray jsonArray = JSONObject.parseObject(JSONObject.toJSONString(basedataAreaService.list(new JSONObject()))).getJSONArray("data"); |
|
|
|
|
|
|
|
JSONArray jsonArray = |
|
|
|
JSONObject.parseObject(JSONObject.toJSONString(basedataAreaService.list(new JSONObject()))).getJSONArray("data"); |
|
|
|
for (int i = 0; i < jsonArray.size(); ++i) { |
|
|
|
JSONObject jsonObject = jsonArray.getJSONObject(i); |
|
|
|
jsonObject.put("id", jsonObject.getString("areaId")); |
|
|
|
jsonObject.put("name", jsonObject.getString("areaName")); |
|
|
|
|
|
|
|
for (int j = 0; j < list.size(); ++j) { |
|
|
|
CameraVo cameraVo = list.get(j); |
|
|
|
if (jsonObject.getString("areaId").equals(cameraVo.getAreaId())) { |
|
|
|
|