|
|
|
@ -57,12 +57,7 @@ import javax.servlet.http.HttpServletRequest; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.PathVariable; |
|
|
|
import org.springframework.web.bind.annotation.PostMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import springfox.documentation.annotations.ApiIgnore; |
|
|
|
|
|
|
|
@ApiIgnore |
|
|
|
@ -321,10 +316,53 @@ public class PatrolPresetPosController extends BaseController { |
|
|
|
return this.getDataTable(list); |
|
|
|
} |
|
|
|
|
|
|
|
// @GetMapping({"/listByEqIdAndChannelId"}) |
|
|
|
// public AjaxResult queryListByEqIdAndChannelId(PtzModel ptzModel) throws Exception { |
|
|
|
// String patroldeviceCode = ptzModel.getPatrolDeviceCode(); |
|
|
|
// String channelCode = ptzModel.getChannelCode(); |
|
|
|
// List<SysDictData> presetPoints = new ArrayList<>(); |
|
|
|
// String params = "code=" + channelCode; |
|
|
|
// String result = HttpClientUtils.get(this.deviceUrl + AccessApiConstant.PTZ_LIST, params); |
|
|
|
// JSONObject ivsPresetInfo = JSONObject.parseObject(result); |
|
|
|
// String resultCode = ivsPresetInfo.getString("resultCode"); |
|
|
|
// if (null != resultCode && resultCode.equals("0")) { |
|
|
|
// JSONObject ptzPresetInfoListJson = ivsPresetInfo.getJSONObject("ptzPresetInfoList"); |
|
|
|
// JSONArray ptzPresetInfoArray = ptzPresetInfoListJson.getJSONArray("ptzPresetInfo"); |
|
|
|
// if (!ptzPresetInfoArray.isEmpty()) { |
|
|
|
// for (Object ivspresetObject : ptzPresetInfoArray) { |
|
|
|
// JSONObject ivsPresetJson = (JSONObject) JSONObject.toJSON(ivspresetObject); |
|
|
|
// String presetIndex = ivsPresetJson.getString("presetIndex"); |
|
|
|
// String presetName = ivsPresetJson.getString("presetName"); |
|
|
|
// SysDictData sysDictData = SysDictData.builder().build(); |
|
|
|
// sysDictData.setDictValue(presetIndex); |
|
|
|
// sysDictData.setDictLabel(presetName); |
|
|
|
// presetPoints.add(sysDictData); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// |
|
|
|
// PatrolPresetRecord patrolPresetRecord = new PatrolPresetRecord(); |
|
|
|
// patrolPresetRecord.setPatrolDeviceCode(patroldeviceCode); |
|
|
|
// patrolPresetRecord.setChannelCode(channelCode); |
|
|
|
// List<PatrolPresetRecord> patrolPresetRecords = this.patrolPresetRecordService.selectPatrolPresetRecordList(patrolPresetRecord); |
|
|
|
// presetPoints.forEach((item) -> { |
|
|
|
// patrolPresetRecords.forEach((presetPos) -> { |
|
|
|
// if (item.getDictValue().equals(presetPos.getPresetPosCode())) { |
|
|
|
// item.setCssClass(SELECT_PRESET_CODE_CLASS_BIND); |
|
|
|
// } |
|
|
|
// |
|
|
|
// }); |
|
|
|
// }); |
|
|
|
// return AjaxResult.success(presetPoints); |
|
|
|
// } else { |
|
|
|
// return AjaxResult.success(presetPoints); |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
@GetMapping({"/listByEqIdAndChannelId"}) |
|
|
|
public AjaxResult queryListByEqIdAndChannelId(PtzModel ptzModel) throws Exception { |
|
|
|
String patroldeviceCode = ptzModel.getPatrolDeviceCode(); |
|
|
|
String channelCode = ptzModel.getChannelCode(); |
|
|
|
public AjaxResult queryListByEqIdAndChannelId( |
|
|
|
@RequestParam("patroldeviceCode") String patrolDeviceCode, |
|
|
|
@RequestParam("channelCode") String channelCode |
|
|
|
) throws Exception { |
|
|
|
List<SysDictData> presetPoints = new ArrayList<>(); |
|
|
|
String params = "code=" + channelCode; |
|
|
|
String result = HttpClientUtils.get(this.deviceUrl + AccessApiConstant.PTZ_LIST, params); |
|
|
|
@ -346,7 +384,7 @@ public class PatrolPresetPosController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
PatrolPresetRecord patrolPresetRecord = new PatrolPresetRecord(); |
|
|
|
patrolPresetRecord.setPatrolDeviceCode(patroldeviceCode); |
|
|
|
patrolPresetRecord.setPatrolDeviceCode(patrolDeviceCode); |
|
|
|
patrolPresetRecord.setChannelCode(channelCode); |
|
|
|
List<PatrolPresetRecord> patrolPresetRecords = this.patrolPresetRecordService.selectPatrolPresetRecordList(patrolPresetRecord); |
|
|
|
presetPoints.forEach((item) -> { |
|
|
|
|