Merge branch 'dev' of http://47.97.8.94:19527/yj/zn-cloud into dev
This commit is contained in:
commit
60ac08439c
@ -115,7 +115,7 @@ public class FactoryUserController {
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得工厂用户详情")
|
@Operation(summary = "获得工厂用户详情")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "146")
|
@Parameter(name = "id", description = "编号", required = true, example = "146")
|
||||||
@PreAuthorize("@ss.hasPermission('system:user:query')")
|
@PreAuthorize("@ss.hasPermission('system:factory-user:query')")
|
||||||
public CommonResult<FactoryUserRespVO> getUser(@RequestParam("id") Long id) {
|
public CommonResult<FactoryUserRespVO> getUser(@RequestParam("id") Long id) {
|
||||||
|
|
||||||
AdminUserDO user = userService.getUser(id);
|
AdminUserDO user = userService.getUser(id);
|
||||||
@ -137,7 +137,7 @@ public class FactoryUserController {
|
|||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得工厂用户分页列表")
|
@Operation(summary = "获得工厂用户分页列表")
|
||||||
@PreAuthorize("@ss.hasPermission('system:user:list')")
|
@PreAuthorize("@ss.hasPermission('system:factory-user:query')")
|
||||||
public CommonResult<PageResult<FactoryUserRespVO>> getUserPage(@Valid FactoryUserPageReqVO pageReqVO) {
|
public CommonResult<PageResult<FactoryUserRespVO>> getUserPage(@Valid FactoryUserPageReqVO pageReqVO) {
|
||||||
|
|
||||||
// 获得用户分页列表
|
// 获得用户分页列表
|
||||||
|
@ -7,11 +7,11 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.device.cameradevice.vo.CameraUpdateStatusReqVO;
|
|
||||||
import cn.iocoder.yudao.module.smartfactory.controller.admin.factoryinfo.vo.*;
|
import cn.iocoder.yudao.module.smartfactory.controller.admin.factoryinfo.vo.*;
|
||||||
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.factoryinfo.FactoryInfoDO;
|
import cn.iocoder.yudao.module.smartfactory.dal.dataobject.factoryinfo.FactoryInfoDO;
|
||||||
import cn.iocoder.yudao.module.smartfactory.service.factoryinfo.FactoryInfoService;
|
import cn.iocoder.yudao.module.smartfactory.service.factoryinfo.FactoryInfoService;
|
||||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||||
|
import cn.iocoder.yudao.module.system.api.dept.dto.DeptRespDTO;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -40,6 +40,9 @@ public class FactoryInfoController {
|
|||||||
@Resource
|
@Resource
|
||||||
private FactoryInfoService factoryInfoService;
|
private FactoryInfoService factoryInfoService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeptApi deptApi;
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建工厂信息")
|
@Operation(summary = "创建工厂信息")
|
||||||
@PreAuthorize("@ss.hasPermission('smartfactory:factory-info:create')")
|
@PreAuthorize("@ss.hasPermission('smartfactory:factory-info:create')")
|
||||||
@ -77,9 +80,19 @@ public class FactoryInfoController {
|
|||||||
@Operation(summary = "获得工厂信息")
|
@Operation(summary = "获得工厂信息")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('smartfactory:factory-info:query')")
|
@PreAuthorize("@ss.hasPermission('smartfactory:factory-info:query')")
|
||||||
public CommonResult<FactoryInfoDO> getFactoryInfo(@RequestParam("id") Long id) {
|
public CommonResult<FactoryInfoRespVO> getFactoryInfo(@RequestParam("id") Long id) {
|
||||||
|
|
||||||
FactoryInfoDO factoryInfo = factoryInfoService.getFactoryInfo(id);
|
FactoryInfoDO factoryInfo = factoryInfoService.getFactoryInfo(id);
|
||||||
return success(factoryInfo);
|
FactoryInfoRespVO respVO = BeanUtils.toBean(factoryInfo, FactoryInfoRespVO.class);
|
||||||
|
|
||||||
|
// 获取部门信息
|
||||||
|
DeptRespDTO respDTO = deptApi.getDeptByFactoryId(factoryInfo.getId()).getCheckedData();
|
||||||
|
if (respDTO != null) {
|
||||||
|
// 设置负责人信息
|
||||||
|
respVO.setLeaderUserId(respDTO.getLeaderUserId());
|
||||||
|
}
|
||||||
|
|
||||||
|
return success(respVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/simple-list")
|
@GetMapping("/simple-list")
|
||||||
|
@ -7,12 +7,12 @@ import cn.iocoder.yudao.module.smartfactory.controller.admin.hik.vo.CameraReplay
|
|||||||
import cn.iocoder.yudao.module.smartfactory.service.hik.HikService;
|
import cn.iocoder.yudao.module.smartfactory.service.hik.HikService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.annotation.security.PermitAll;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工厂管理-工厂列表
|
* 工厂管理-工厂列表
|
||||||
@ -29,7 +29,8 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/getCameraUrl")
|
@GetMapping("/getCameraUrl")
|
||||||
@Operation(summary = "视频播放->查询播放地址")
|
@Operation(summary = "视频播放->查询播放地址")
|
||||||
@PermitAll
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
|
// @PermitAll
|
||||||
public CommonResult<String> getCameraUrl(String cameraCode) {
|
public CommonResult<String> getCameraUrl(String cameraCode) {
|
||||||
String url = hikService.getPreviewUrlsApi(cameraCode, 0);
|
String url = hikService.getPreviewUrlsApi(cameraCode, 0);
|
||||||
return CommonResult.success(url);
|
return CommonResult.success(url);
|
||||||
@ -37,6 +38,7 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/m-getCameraUrl")
|
@GetMapping("/m-getCameraUrl")
|
||||||
@Operation(summary = "视频播放->查询播放地址(微信用)")
|
@Operation(summary = "视频播放->查询播放地址(微信用)")
|
||||||
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
public CommonResult<String> getMCameraUrl(String cameraCode) {
|
public CommonResult<String> getMCameraUrl(String cameraCode) {
|
||||||
|
|
||||||
String url = hikService.getPreviewUrlsApiHttps(cameraCode);
|
String url = hikService.getPreviewUrlsApiHttps(cameraCode);
|
||||||
@ -46,7 +48,8 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/replayUrl")
|
@GetMapping("/replayUrl")
|
||||||
@Operation(summary = "视频播放->回放流")
|
@Operation(summary = "视频播放->回放流")
|
||||||
@PermitAll
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
|
// @PermitAll
|
||||||
public CommonResult<JSONObject> getReplayUrl(CameraReplayDTO cameraReplayDTO) {
|
public CommonResult<JSONObject> getReplayUrl(CameraReplayDTO cameraReplayDTO) {
|
||||||
JSONObject replayUrl = hikService.getReplayUrl(cameraReplayDTO);
|
JSONObject replayUrl = hikService.getReplayUrl(cameraReplayDTO);
|
||||||
return CommonResult.success(replayUrl);
|
return CommonResult.success(replayUrl);
|
||||||
@ -54,7 +57,8 @@ public class HikController {
|
|||||||
|
|
||||||
@GetMapping("/operate")
|
@GetMapping("/operate")
|
||||||
@Operation(summary = "视频->云台操作")
|
@Operation(summary = "视频->云台操作")
|
||||||
@PermitAll
|
@PreAuthorize("@ss.hasPermission('smartfactory:camera:view')")
|
||||||
|
// @PermitAll
|
||||||
public CommonResult<String> operate(CameraOperateDTO dto) {
|
public CommonResult<String> operate(CameraOperateDTO dto) {
|
||||||
|
|
||||||
String msg = hikService.operateCamera(dto);
|
String msg = hikService.operateCamera(dto);
|
||||||
|
Loading…
Reference in New Issue
Block a user