| | |
| | | import java.util.Arrays; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.annotation.DataDictClass; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.oa.domain.SgIpc; |
| | | import lombok.RequiredArgsConstructor; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.*; |
| | |
| | | */ |
| | | @DataDictClass |
| | | @ApiOperation("查询ipc设备列表") |
| | | @PreAuthorize("@ss.hasPermi('oa:ipc:list')") |
| | | // @PreAuthorize("@ss.hasPermi('oa:ipc:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo<SgIpcVo> list(@Validated(QueryGroup.class) SgIpcBo bo) { |
| | | return iSgIpcService.queryPageList(bo); |
| | |
| | | * 获取ipc设备详细信息 |
| | | */ |
| | | @ApiOperation("获取ipc设备详细信息") |
| | | @PreAuthorize("@ss.hasPermi('oa:ipc:query')") |
| | | // @PreAuthorize("@ss.hasPermi('oa:ipc:query')") |
| | | @GetMapping("/{id}") |
| | | public AjaxResult<SgIpcVo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取上一条信息 |
| | | */ |
| | | @ApiOperation("获取上一条信息") |
| | | @GetMapping("/copy") |
| | | public AjaxResult copy() { |
| | | List<SgIpc> list = iSgIpcService.list(new LambdaQueryWrapper<SgIpc>().orderByDesc(SgIpc::getCreateTime)); |
| | | if (list.size() == 0) { |
| | | throw new ServiceException("暂无数据", HttpStatus.HTTP_PARTIAL); |
| | | } |
| | | return AjaxResult.success(list.get(0)); |
| | | } |
| | | |
| | | /** |
| | | * 新增ipc设备 |
| | | */ |
| | | @ApiOperation("新增ipc设备") |
| | | @PreAuthorize("@ss.hasPermi('oa:ipc:add')") |
| | | // @PreAuthorize("@ss.hasPermi('oa:ipc:add')") |
| | | @Log(title = "ipc设备", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | | @PostMapping() |
| | |
| | | * 修改ipc设备 |
| | | */ |
| | | @ApiOperation("修改ipc设备") |
| | | @PreAuthorize("@ss.hasPermi('oa:ipc:edit')") |
| | | // @PreAuthorize("@ss.hasPermi('oa:ipc:edit')") |
| | | @Log(title = "ipc设备", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping() |
| | |
| | | * 删除ipc设备 |
| | | */ |
| | | @ApiOperation("删除ipc设备") |
| | | @PreAuthorize("@ss.hasPermi('oa:ipc:remove')") |
| | | // @PreAuthorize("@ss.hasPermi('oa:ipc:remove')") |
| | | @Log(title = "ipc设备" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult<Void> remove(@ApiParam("主键串") |