|
|
@ -4,14 +4,16 @@ import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
|
|
|
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
|
|
|
import com.hnac.hzinfo.inspect.Constants; |
|
|
|
import com.hnac.hzims.common.logs.enums.BusinessType; |
|
|
|
|
|
|
|
import com.hnac.hzims.common.logs.enums.OperatorType; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.inspect.ai.dto.robot.RobotInstanceDTO; |
|
|
|
import com.hnac.hzinfo.inspect.ai.dto.robot.RobotInstanceDTO; |
|
|
|
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotAiReturnData; |
|
|
|
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotAiReturnData; |
|
|
|
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotRealDataVO; |
|
|
|
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotRealDataVO; |
|
|
|
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotServerTaskParam; |
|
|
|
import com.hnac.hzinfo.inspect.ai.vo.robot.RobotServerTaskParam; |
|
|
|
import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; |
|
|
|
import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.log.annotation.Business; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.log.annotation.Operate; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.log.contants.BusinessType; |
|
|
|
|
|
|
|
import com.hnac.hzinfo.log.contants.Risk; |
|
|
|
import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient; |
|
|
|
import com.hnac.hzinfo.sdk.v5.device.client.DeviceClient; |
|
|
|
import com.hnac.hzinfo.sdk.v5.device.vo.VirtualDeviceDTO; |
|
|
|
import com.hnac.hzinfo.sdk.v5.device.vo.VirtualDeviceDTO; |
|
|
|
import io.swagger.annotations.*; |
|
|
|
import io.swagger.annotations.*; |
|
|
@ -47,6 +49,7 @@ import java.util.Map; |
|
|
|
@AllArgsConstructor |
|
|
|
@AllArgsConstructor |
|
|
|
@RequestMapping("/st_robot") |
|
|
|
@RequestMapping("/st_robot") |
|
|
|
@Api(value = "巡检机器人信息", tags = "巡检机器人信息") |
|
|
|
@Api(value = "巡检机器人信息", tags = "巡检机器人信息") |
|
|
|
|
|
|
|
@Business(module = Constants.APP_NAME,value = "机器人信息管理",ignore = false) |
|
|
|
public class RobotController extends BladeController { |
|
|
|
public class RobotController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
private final IRobotService st_robotService; |
|
|
|
private final IRobotService st_robotService; |
|
|
@ -59,6 +62,7 @@ public class RobotController extends BladeController { |
|
|
|
@GetMapping("/detail") |
|
|
|
@GetMapping("/detail") |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperation(value = "详情", notes = "传入st_robot") |
|
|
|
@ApiOperation(value = "详情", notes = "传入st_robot") |
|
|
|
|
|
|
|
@Operate(label = "查看机器人详情",type = BusinessType.QUERY,ignore = false) |
|
|
|
public R<RobotEntity> detail(RobotEntity st_robot) { |
|
|
|
public R<RobotEntity> detail(RobotEntity st_robot) { |
|
|
|
RobotEntity detail = st_robotService.getOne(Condition.getQueryWrapper(st_robot)); |
|
|
|
RobotEntity detail = st_robotService.getOne(Condition.getQueryWrapper(st_robot)); |
|
|
|
return R.data(detail); |
|
|
|
return R.data(detail); |
|
|
@ -72,10 +76,7 @@ public class RobotController extends BladeController { |
|
|
|
@ApiOperation(value = "分页", notes = "传入st_robot") |
|
|
|
@ApiOperation(value = "分页", notes = "传入st_robot") |
|
|
|
@ApiImplicitParams({ |
|
|
|
@ApiImplicitParams({ |
|
|
|
}) |
|
|
|
}) |
|
|
|
@OperationAnnotation(moduleName = "巡检管理", title = "机器人管理", |
|
|
|
@Operate(label = "查看机器人分页列表",type = BusinessType.QUERY,ignore = false) |
|
|
|
operatorType = OperatorType.MOBILE, |
|
|
|
|
|
|
|
businessType = BusinessType.GENCODE, |
|
|
|
|
|
|
|
action = "分页查询机器人管理列表") |
|
|
|
|
|
|
|
public R<IPage<RobotEntity>> list(@ApiIgnore @RequestParam Map<String,Object> st_robot, Query query) { |
|
|
|
public R<IPage<RobotEntity>> list(@ApiIgnore @RequestParam Map<String,Object> st_robot, Query query) { |
|
|
|
QueryWrapper<RobotEntity> queryWrapper = Condition.getQueryWrapper( st_robot, RobotEntity.class); |
|
|
|
QueryWrapper<RobotEntity> queryWrapper = Condition.getQueryWrapper( st_robot, RobotEntity.class); |
|
|
|
IPage<RobotEntity> pages = st_robotService.page(Condition.getPage(query), queryWrapper); |
|
|
|
IPage<RobotEntity> pages = st_robotService.page(Condition.getPage(query), queryWrapper); |
|
|
@ -88,6 +89,7 @@ public class RobotController extends BladeController { |
|
|
|
@PostMapping("/save") |
|
|
|
@PostMapping("/save") |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperationSupport(order = 4) |
|
|
|
@ApiOperation(value = "新增", notes = "传入st_robot") |
|
|
|
@ApiOperation(value = "新增", notes = "传入st_robot") |
|
|
|
|
|
|
|
@Operate(label = "新增机器人信息",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false) |
|
|
|
public R save(@Valid @RequestBody RobotEntity st_robot) { |
|
|
|
public R save(@Valid @RequestBody RobotEntity st_robot) { |
|
|
|
st_robot.setCode("robot"+CodeUtils.randomCode()); |
|
|
|
st_robot.setCode("robot"+CodeUtils.randomCode()); |
|
|
|
return R.status(st_robotService.save(st_robot)); |
|
|
|
return R.status(st_robotService.save(st_robot)); |
|
|
@ -99,6 +101,7 @@ public class RobotController extends BladeController { |
|
|
|
@PostMapping("/update") |
|
|
|
@PostMapping("/update") |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperationSupport(order = 5) |
|
|
|
@ApiOperation(value = "修改", notes = "传入st_robot") |
|
|
|
@ApiOperation(value = "修改", notes = "传入st_robot") |
|
|
|
|
|
|
|
@Operate(label = "修改机器人信息",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) |
|
|
|
public R update(@Valid @RequestBody RobotEntity st_robot) { |
|
|
|
public R update(@Valid @RequestBody RobotEntity st_robot) { |
|
|
|
return R.status(st_robotService.updateById(st_robot)); |
|
|
|
return R.status(st_robotService.updateById(st_robot)); |
|
|
|
} |
|
|
|
} |
|
|
@ -120,6 +123,7 @@ public class RobotController extends BladeController { |
|
|
|
@PostMapping("/remove") |
|
|
|
@PostMapping("/remove") |
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
@ApiOperationSupport(order = 7) |
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
|
|
|
|
|
|
|
@Operate(label = "删除机器人信息",type = BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) |
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
|
|
|
return R.status(st_robotService.removeByIds(Func.toLongList(ids))); |
|
|
|
return R.status(st_robotService.removeByIds(Func.toLongList(ids))); |
|
|
|
} |
|
|
|
} |
|
|
@ -144,6 +148,7 @@ public class RobotController extends BladeController { |
|
|
|
@PostMapping("/generateDeviceInstance") |
|
|
|
@PostMapping("/generateDeviceInstance") |
|
|
|
@ApiOperationSupport(order = 10) |
|
|
|
@ApiOperationSupport(order = 10) |
|
|
|
@ApiOperation(value = "生成机器人设备实例", notes = "生成机器人设备实例") |
|
|
|
@ApiOperation(value = "生成机器人设备实例", notes = "生成机器人设备实例") |
|
|
|
|
|
|
|
@Operate(label = "生成机器人设备实例",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) |
|
|
|
public R generateDeviceInstance(@RequestBody @Validated RobotInstanceDTO device) { |
|
|
|
public R generateDeviceInstance(@RequestBody @Validated RobotInstanceDTO device) { |
|
|
|
return R.status(st_robotService.generateDeviceInstance(device)); |
|
|
|
return R.status(st_robotService.generateDeviceInstance(device)); |
|
|
|
} |
|
|
|
} |
|
|
@ -151,6 +156,7 @@ public class RobotController extends BladeController { |
|
|
|
@GetMapping("/getRealDataByRobotCode") |
|
|
|
@GetMapping("/getRealDataByRobotCode") |
|
|
|
@ApiOperationSupport(order = 11) |
|
|
|
@ApiOperationSupport(order = 11) |
|
|
|
@ApiOperation(value = "获取机器人各项属性实时数据", notes = "获取机器人各项属性实时数据") |
|
|
|
@ApiOperation(value = "获取机器人各项属性实时数据", notes = "获取机器人各项属性实时数据") |
|
|
|
|
|
|
|
@Operate(label = "获取机器人实时数据",type = BusinessType.QUERY,ignore = false) |
|
|
|
public R<List<RobotRealDataVO>> getRealDataByRobotCode(@RequestParam @ApiParam(value = "机器人编号", required = true) String robotCode) { |
|
|
|
public R<List<RobotRealDataVO>> getRealDataByRobotCode(@RequestParam @ApiParam(value = "机器人编号", required = true) String robotCode) { |
|
|
|
return R.data(st_robotService.getRealDataByRobotCode(robotCode)); |
|
|
|
return R.data(st_robotService.getRealDataByRobotCode(robotCode)); |
|
|
|
} |
|
|
|
} |
|
|
@ -158,6 +164,7 @@ public class RobotController extends BladeController { |
|
|
|
@GetMapping("/getRobotSoeData") |
|
|
|
@GetMapping("/getRobotSoeData") |
|
|
|
@ApiOperationSupport(order = 12) |
|
|
|
@ApiOperationSupport(order = 12) |
|
|
|
@ApiOperation(value = "获取机器人告警", notes = "获取机器人告警") |
|
|
|
@ApiOperation(value = "获取机器人告警", notes = "获取机器人告警") |
|
|
|
|
|
|
|
@Operate(label = "获取机器人告警信息",type = BusinessType.QUERY,ignore = false) |
|
|
|
public R<IPage> getRobotSoeData(@RequestParam @ApiParam("机器人编号") String robotCode, |
|
|
|
public R<IPage> getRobotSoeData(@RequestParam @ApiParam("机器人编号") String robotCode, |
|
|
|
@RequestParam @ApiParam("开始时间") String startTime, |
|
|
|
@RequestParam @ApiParam("开始时间") String startTime, |
|
|
|
@RequestParam @ApiParam("结束时间") String endTime, Query query) { |
|
|
|
@RequestParam @ApiParam("结束时间") String endTime, Query query) { |
|
|
|