//package com.ld.igds.inout.view;
|
//
|
//import com.bstek.bdf2.core.model.DefaultDept;
|
//import com.bstek.dorado.annotation.DataProvider;
|
//import com.ld.igds.common.CoreCommonService;
|
//import com.ld.igds.constant.Constant;
|
//import com.ld.igds.dic.service.DicAreaService;
|
//import com.ld.igds.models.DicArea;
|
//import com.ld.igds.models.SecCamera;
|
//import com.ld.igds.security.service.SecurityService;
|
//import com.ld.igds.util.ContextUtil;
|
//import org.apache.commons.lang3.StringUtils;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.stereotype.Component;
|
//
|
//import java.util.ArrayList;
|
//import java.util.List;
|
//
|
///**
|
// * @author Andy
|
// */
|
//@Component
|
//public class ShowVideoPR {
|
//
|
// @Autowired
|
// private CoreCommonService commonService;
|
// @Autowired
|
// private DicAreaService areaService;
|
// @Autowired
|
// private SecurityService service;
|
// @Autowired
|
// private JdbcShowVideoService showVideoService;
|
//
|
// /**
|
// * showVideoPR#dicArea
|
// * <p>
|
// * 查询父节点下的区域信息
|
// *
|
// * @param parentCode
|
// * @return
|
// */
|
// @DataProvider
|
// public List<DicArea> dicArea(String parentCode) {
|
// List<DicArea> list;
|
// if (StringUtils.isEmpty(parentCode)) {
|
// parentCode = Constant.DEFAULT_PARENT_CODE;
|
// list = areaService.findAreaByParentCode(parentCode);
|
// }else {
|
// list = showVideoService.findAreaByCity(parentCode);
|
// }
|
//
|
// return list;
|
// }
|
//
|
// /**
|
// * showVideoPR#dicDept
|
// *
|
// * 查询父节点下的库区信息
|
// *
|
// * @param city
|
// * @return
|
// */
|
// @DataProvider
|
// public List<DefaultDept> dicDept(String city) {
|
// return showVideoService.loadDeptByCity(ContextUtil.getSubDeptId(null), city, Constant.DEPT_TYPE_20, Constant.YN_Y);
|
// }
|
//
|
// /**
|
// * showVideoPR#dicCamera
|
// *
|
// * 查询库区下摄像头
|
// *
|
// * @param deptId
|
// * @return
|
// */
|
// @DataProvider
|
// public List<SecCamera> dicCamera(String deptId) {
|
//
|
// List<SecCamera> secCameras = service.listCameraByDeptId(deptId);
|
// return secCameras;
|
// }
|
//
|
// /**
|
// * 视频监控--组织架构
|
// * showVideoPR#loadDepts
|
// *
|
// * @param parentId
|
// * @return
|
// * @throws Exception
|
// */
|
// @DataProvider
|
// public List<DefaultDept> loadDepts(String parentId) throws Exception {
|
// List<DefaultDept> list;
|
// if(StringUtils.isEmpty(parentId)){
|
// DefaultDept dept = commonService.getCacheDept(ContextUtil.getCompanyId(), ContextUtil.getSubDeptId(null));
|
// list = new ArrayList<>();
|
// list.add(dept);
|
// }else {
|
// DefaultDept dept = commonService.getCacheDept(ContextUtil.getCompanyId(), parentId);
|
// if(dept == null){
|
// return null;
|
// }
|
// if(Constant.DEPT_TYPE_20.equals(dept.getType())){
|
// list = showVideoService.loadCameraByDeptId(parentId);
|
// }else {
|
// list = showVideoService.loadDeptByParentId(parentId);
|
// }
|
// }
|
// return list;
|
// }
|
//}
|