权限配置
This commit is contained in:
parent
8e4dfa84df
commit
f5d8c1827d
|
|
@ -6,6 +6,9 @@ import com.bonus.base.basic.vo.TbBdDeviceVo;
|
|||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -13,23 +16,21 @@ import javax.validation.Valid;
|
|||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 边带记录设备表(tb_bd_device_record)表控制层
|
||||
*
|
||||
* @author ma_sh
|
||||
*/
|
||||
@Api(tags = "边带记录设备管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbBdDeviceRecord")
|
||||
public class TbBdDeviceRecordController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private TbBdDeviceRecordService tbBdDeviceRecordService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*/
|
||||
* 通过主键查询单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条边带记录设备数据")
|
||||
@RequiresPermissions("base:info:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult selectOne(@PathVariable("id") Long id) {
|
||||
return success(tbBdDeviceRecordService.selectByPrimaryKey(id));
|
||||
|
|
@ -40,6 +41,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param record
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询边带设备全量数据")
|
||||
@RequiresPermissions("base:info:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbBdDeviceRecord record) {
|
||||
List<TbBdDeviceRecord> list = tbBdDeviceRecordService.getAll(record);
|
||||
|
|
@ -51,6 +54,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param tbBdDeviceVo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "边带设备管理信息列表")
|
||||
@RequiresPermissions("base:info:list")
|
||||
@GetMapping("/getDeviceList")
|
||||
public TableDataInfo getDeviceList(TbBdDeviceVo tbBdDeviceVo) {
|
||||
startPage();
|
||||
|
|
@ -64,6 +69,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param record 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增边带记录设备数据")
|
||||
@RequiresPermissions("base:info:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdDeviceRecord record) {
|
||||
return toAjax(tbBdDeviceRecordService.insertSelective(record));
|
||||
|
|
@ -76,6 +83,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param record 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑边带记录设备数据")
|
||||
@RequiresPermissions("base:info:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdDeviceRecord record) {
|
||||
return toAjax(tbBdDeviceRecordService.updateByPrimaryKeySelective(record));
|
||||
|
|
@ -88,6 +97,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除边带记录设备数据")
|
||||
@RequiresPermissions("base:info:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbBdDeviceRecordService.deleteByPrimaryKey(id);
|
||||
|
|
@ -98,6 +109,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param tbBdDeviceVo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "根据工程id查询杆塔信息")
|
||||
@RequiresPermissions("base:info:list")
|
||||
@GetMapping("/getPowerList")
|
||||
public TableDataInfo getPowerList(TbBdDeviceVo tbBdDeviceVo) {
|
||||
List<TbBdDeviceVo> list = tbBdDeviceRecordService.getPowerList(tbBdDeviceVo);
|
||||
|
|
@ -109,6 +122,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param record
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "根据id修改绑定的杆塔信息")
|
||||
@RequiresPermissions("base:info:edit")
|
||||
@PostMapping("/updatePowerId")
|
||||
public AjaxResult updatePowerId(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdDeviceRecord record) {
|
||||
return toAjax(tbBdDeviceRecordService.updatePowerId(record));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ import com.bonus.base.basic.service.TbBdRecordService;
|
|||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -15,22 +18,25 @@ import javax.validation.constraints.NotNull;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 边带申请记录表(tb_bd_record)表控制层
|
||||
* @author syruan
|
||||
*/
|
||||
* 边带申请记录表(tb_bd_record)表控制层
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "边带申请记录管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbBdRecord")
|
||||
public class TbBdRecordController extends BaseController {
|
||||
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private TbBdRecordService tbBdRecordService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条边带申请记录数据")
|
||||
@RequiresPermissions("base:record:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult selectById(@PathVariable("id") Long id) {
|
||||
return success(tbBdRecordService.selectByPrimaryKey(id));
|
||||
|
|
@ -39,6 +45,8 @@ public class TbBdRecordController extends BaseController {
|
|||
/**
|
||||
* 通过主键查询单条内部数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条内部数据")
|
||||
@RequiresPermissions("base:record:query")
|
||||
@GetMapping("/getInner/{id}")
|
||||
public TableDataInfo getById(@PathVariable("id") Long id) {
|
||||
startPage();
|
||||
|
|
@ -46,6 +54,8 @@ public class TbBdRecordController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询边带申请记录数据")
|
||||
@RequiresPermissions("base:record:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbBdRecord tbBdRecord) {
|
||||
PageResultVo<TbBdRecord> data = tbBdRecordService.getAll(tbBdRecord);
|
||||
|
|
@ -59,6 +69,8 @@ public class TbBdRecordController extends BaseController {
|
|||
* @param tbBdRecord 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增边带申请数据")
|
||||
@RequiresPermissions("base:record:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdRecord tbBdRecord) {
|
||||
return tbBdRecordService.insertSelective(tbBdRecord);
|
||||
|
|
@ -71,6 +83,8 @@ public class TbBdRecordController extends BaseController {
|
|||
* @param tbBdRecord 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑边带申请数据")
|
||||
@RequiresPermissions("base:record:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdRecord tbBdRecord) {
|
||||
return tbBdRecordService.updateByPrimaryKeySelective(tbBdRecord);
|
||||
|
|
@ -83,6 +97,8 @@ public class TbBdRecordController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除边带申请数据")
|
||||
@RequiresPermissions("base:record:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbBdRecordService.deleteByPrimaryKey(id);
|
||||
|
|
@ -93,6 +109,8 @@ public class TbBdRecordController extends BaseController {
|
|||
* @param tbBdRecord
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "审核边带申请记录数据")
|
||||
@RequiresPermissions("base:record:approve")
|
||||
@PostMapping("/approve")
|
||||
public AjaxResult approve(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdRecord tbBdRecord) {
|
||||
return tbBdRecordService.approve(tbBdRecord);
|
||||
|
|
@ -100,3 +118,4 @@ public class TbBdRecordController extends BaseController {
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ import com.bonus.base.basic.vo.TbDevAttributeVo;
|
|||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -17,27 +20,32 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备监测信息表(tb_dev_attribute)表控制层
|
||||
* @author syruan
|
||||
*/
|
||||
* 设备监测信息表(tb_dev_attribute)表控制层
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "设备监测信息管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbDevAttribute")
|
||||
public class TbDevAttributeController extends BaseController {
|
||||
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private TbDevAttributeService tbDevAttributeService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
* 通过主键查询单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条设备监测数据")
|
||||
@RequiresPermissions("base:attribute:query")
|
||||
@GetMapping("/{id}")
|
||||
public TbDevAttribute getById(@PathVariable Long id) {
|
||||
return tbDevAttributeService.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查询设备监测信息管理数据")
|
||||
@RequiresPermissions("base:attribute:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbDevAttribute record) {
|
||||
PageResultVo<TbDevAttributeVo> data = tbDevAttributeService.queryAll(record);
|
||||
|
|
@ -50,6 +58,8 @@ public class TbDevAttributeController extends BaseController {
|
|||
* @param record 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增设备监测数据")
|
||||
@RequiresPermissions("base:attribute:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TbDevAttribute record) {
|
||||
return toAjax(tbDevAttributeService.insertSelective(record));
|
||||
|
|
@ -59,6 +69,8 @@ public class TbDevAttributeController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*/
|
||||
@ApiOperation(value = "删除设备监测数据")
|
||||
@RequiresPermissions("base:attribute:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return toAjax(tbDevAttributeService.deleteByPrimaryKey(id));
|
||||
|
|
@ -69,6 +81,8 @@ public class TbDevAttributeController extends BaseController {
|
|||
* @param tbDevDataRecord
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "预警告警异常记录处理")
|
||||
@RequiresPermissions("base:attribute:handle")
|
||||
@PostMapping("/handle")
|
||||
public AjaxResult approve(@RequestBody TbDevDataRecord tbDevDataRecord) {
|
||||
return tbDevAttributeService.handle(tbDevDataRecord);
|
||||
|
|
@ -79,6 +93,8 @@ public class TbDevAttributeController extends BaseController {
|
|||
* @param response
|
||||
* @param record
|
||||
*/
|
||||
@ApiOperation(value = "预警告警异常记录导出")
|
||||
@RequiresPermissions("base:attribute:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbDevAttribute record) {
|
||||
PageResultVo<TbDevAttributeVo> pageResult = tbDevAttributeService.queryAll(record);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import com.bonus.base.basic.service.TbDeviceService;
|
|||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
|
@ -14,10 +16,11 @@ import javax.validation.Valid;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备信息表(tb_device)表控制层
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
* 设备信息表(tb_device)表控制层
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "设备信息管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbDevice")
|
||||
public class TbDeviceController extends BaseController {
|
||||
|
|
@ -29,16 +32,19 @@ public class TbDeviceController extends BaseController {
|
|||
private TbDeviceService tbDeviceService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条设备数据")
|
||||
@RequiresPermissions("base:device:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return success(tbDeviceService.selectByPrimaryKey(id));
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "查询设备信息管理数据")
|
||||
@RequiresPermissions("base:device:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbDevice tbDevice) {
|
||||
startPage();
|
||||
|
|
@ -53,6 +59,8 @@ public class TbDeviceController extends BaseController {
|
|||
* @param tbDevice 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增设备数据")
|
||||
@RequiresPermissions("base:device:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Valid @RequestBody TbDevice tbDevice) {
|
||||
return tbDeviceService.insertSelective(tbDevice);
|
||||
|
|
@ -65,6 +73,8 @@ public class TbDeviceController extends BaseController {
|
|||
* @param tbDevice 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑设备数据")
|
||||
@RequiresPermissions("base:device:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Valid @RequestBody TbDevice tbDevice) {
|
||||
return tbDeviceService.updateByPrimaryKeySelective(tbDevice);
|
||||
|
|
@ -76,6 +86,8 @@ public class TbDeviceController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除设备数据")
|
||||
@RequiresPermissions("base:device:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbDeviceService.deleteByPrimaryKey(id);
|
||||
|
|
@ -86,7 +98,8 @@ public class TbDeviceController extends BaseController {
|
|||
* @param response
|
||||
* @param tbDevice
|
||||
*/
|
||||
@ApiOperation("设备管理导出")
|
||||
@ApiOperation(value = "设备管理导出")
|
||||
@RequiresPermissions("base:device:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbDevice tbDevice) {
|
||||
List<TbDevice> list = tbDeviceService.getAll(tbDevice);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@ import com.bonus.common.core.utils.StringUtils;
|
|||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
|
|
@ -26,6 +28,7 @@ import static com.bonus.base.basic.config.Constants.*;
|
|||
* @author makejava
|
||||
* @since 2024-09-09 17:42:37
|
||||
*/
|
||||
@Api(tags = "人员管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbPeople")
|
||||
public class TbPeopleController extends BaseController {
|
||||
|
|
@ -41,6 +44,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param tbPeople 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "分页查询人员信息")
|
||||
@RequiresPermissions("base:people:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbPeople tbPeople) {
|
||||
if (tbPeople.getIsAll() != null && tbPeople.getIsAll() == 0) {
|
||||
|
|
@ -57,6 +62,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条人员数据")
|
||||
@RequiresPermissions("base:people:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(tbPeopleService.queryById(id));
|
||||
|
|
@ -68,6 +75,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param tbPeople 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增人员数据")
|
||||
@RequiresPermissions("base:people:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Valid @RequestBody TbPeople tbPeople) {
|
||||
return tbPeopleService.insert(tbPeople);
|
||||
|
|
@ -79,6 +88,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param tbPeople 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑人员数据")
|
||||
@RequiresPermissions("base:people:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Valid @RequestBody TbPeople tbPeople) {
|
||||
return tbPeopleService.update(tbPeople);
|
||||
|
|
@ -90,6 +101,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除人员数据")
|
||||
@RequiresPermissions("base:people:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbPeopleService.deleteById(id);
|
||||
|
|
@ -100,7 +113,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param response
|
||||
* @param tbPeople
|
||||
*/
|
||||
@ApiOperation("人员信息导出")
|
||||
@ApiOperation(value = "人员信息导出")
|
||||
@RequiresPermissions("base:people:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbPeople tbPeople) {
|
||||
List<TbPeople> list = tbPeopleService.queryByPage(tbPeople);
|
||||
|
|
@ -133,6 +147,8 @@ public class TbPeopleController extends BaseController {
|
|||
/**
|
||||
* 导入模版下载
|
||||
*/
|
||||
@ApiOperation(value = "人员导入模版下载")
|
||||
@RequiresPermissions("base:people:load")
|
||||
@PostMapping("/downLoad")
|
||||
public void downLoadExcelFile(){
|
||||
HttpServletResponse resp = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
|
||||
|
|
@ -144,6 +160,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param file
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "人员信息导入")
|
||||
@RequiresPermissions("base:people:import")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file)
|
||||
{
|
||||
|
|
@ -154,6 +172,8 @@ public class TbPeopleController extends BaseController {
|
|||
* 从北京电科院数据库获取人员列表
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "从北京电科院数据库获取人员列表")
|
||||
@RequiresPermissions("base:people:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult queryByPage() {
|
||||
List<TbPeople> list = tbPeopleService.getList();
|
||||
|
|
@ -165,6 +185,8 @@ public class TbPeopleController extends BaseController {
|
|||
* @param sysUser
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "编辑时校验用户密码")
|
||||
@RequiresPermissions("base:people:update")
|
||||
@PostMapping("/sendPassWord")
|
||||
public AjaxResult sendPassWord(@RequestBody SysUser sysUser)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import com.bonus.base.basic.service.TbProDepartService;
|
|||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -22,6 +24,7 @@ import java.util.List;
|
|||
* @author makejava
|
||||
* @since 2024-09-09 11:09:30
|
||||
*/
|
||||
@Api(tags = "项目部管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbProDepart")
|
||||
public class TbProDepartController extends BaseController {
|
||||
|
|
@ -37,6 +40,8 @@ public class TbProDepartController extends BaseController {
|
|||
* @param tbProDepart 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "分页查询项目部信息")
|
||||
@RequiresPermissions("base:depart:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbProDepart tbProDepart) {
|
||||
if (tbProDepart.getIsAll() != null && tbProDepart.getIsAll() == 0) {
|
||||
|
|
@ -53,6 +58,8 @@ public class TbProDepartController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条项目部数据")
|
||||
@RequiresPermissions("base:depart:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(tbProDepartService.queryById(id));
|
||||
|
|
@ -63,6 +70,8 @@ public class TbProDepartController extends BaseController {
|
|||
* @param tbArea
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询所有区域数据")
|
||||
@RequiresPermissions("base:depart:list")
|
||||
@GetMapping("/getAreaList")
|
||||
public AjaxResult getAreaList(TbArea tbArea) {
|
||||
return AjaxResult.success(tbProDepartService.getAreaList(tbArea));
|
||||
|
|
@ -73,6 +82,8 @@ public class TbProDepartController extends BaseController {
|
|||
* @param data
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "查询所有字典数据列表")
|
||||
@RequiresPermissions("base:depart:list")
|
||||
@GetMapping("/getDataList")
|
||||
public AjaxResult getDataList(TbData data) {
|
||||
return AjaxResult.success(tbProDepartService.getDataList(data));
|
||||
|
|
@ -84,6 +95,8 @@ public class TbProDepartController extends BaseController {
|
|||
* @param tbProDepart 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增项目部数据")
|
||||
@RequiresPermissions("base:depart:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Valid @RequestBody TbProDepart tbProDepart) {
|
||||
return tbProDepartService.insert(tbProDepart);
|
||||
|
|
@ -95,6 +108,8 @@ public class TbProDepartController extends BaseController {
|
|||
* @param tbProDepart 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑项目部数据")
|
||||
@RequiresPermissions("base:depart:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Valid @RequestBody TbProDepart tbProDepart) {
|
||||
return tbProDepartService.update(tbProDepart);
|
||||
|
|
@ -106,6 +121,8 @@ public class TbProDepartController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除项目部数据")
|
||||
@RequiresPermissions("base:depart:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
|
|
@ -115,10 +132,11 @@ public class TbProDepartController extends BaseController {
|
|||
/**
|
||||
* 项目部管理导出
|
||||
*/
|
||||
@ApiOperation("项目部管理导出")
|
||||
@ApiOperation(value = "项目部管理导出")
|
||||
@RequiresPermissions("base:depart:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HttpServletRequest request,TbProDepart tbProDepart) {
|
||||
String de= request.getParameter("departName");
|
||||
String de= request.getParameter("departName");
|
||||
List<TbProDepart> list = tbProDepartService.queryByPage(tbProDepart);
|
||||
ExcelUtil<TbProDepart> util = new ExcelUtil<>(TbProDepart.class);
|
||||
util.exportExcel(response, list, "项目部管理数据");
|
||||
|
|
@ -128,6 +146,8 @@ public class TbProDepartController extends BaseController {
|
|||
* 从北京电科院数据库获取项目部名称列表
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "从北京电科院数据库获取项目部名称列表")
|
||||
@RequiresPermissions("base:depart:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult queryByPage() {
|
||||
List<TbProDepart> list = tbProDepartService.getList();
|
||||
|
|
@ -136,3 +156,4 @@ public class TbProDepartController extends BaseController {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@ import com.bonus.common.core.utils.poi.ExcelUtil;
|
|||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
|
@ -22,6 +25,7 @@ import java.util.List;
|
|||
* @author makejava
|
||||
* @since 2024-09-09 16:08:51
|
||||
*/
|
||||
@Api(tags = "工程杆塔管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbProPower")
|
||||
public class TbProPowerController extends BaseController {
|
||||
|
|
@ -37,6 +41,8 @@ public class TbProPowerController extends BaseController {
|
|||
* @param tbProPower 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "分页查询工程杆塔信息")
|
||||
@RequiresPermissions("base:power:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo queryByPage(TbProPower tbProPower) {
|
||||
startPage();
|
||||
|
|
@ -50,6 +56,8 @@ public class TbProPowerController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条杆塔数据")
|
||||
@RequiresPermissions("base:power:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(tbProPowerService.queryById(id));
|
||||
|
|
@ -61,6 +69,8 @@ public class TbProPowerController extends BaseController {
|
|||
* @param tbProPower 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增杆塔数据")
|
||||
@RequiresPermissions("base:power:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Valid @RequestBody TbProPower tbProPower) {
|
||||
return tbProPowerService.insert(tbProPower);
|
||||
|
|
@ -72,6 +82,8 @@ public class TbProPowerController extends BaseController {
|
|||
* @param tbProPower 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑杆塔数据")
|
||||
@RequiresPermissions("base:power:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Valid @RequestBody TbProPower tbProPower) {
|
||||
return tbProPowerService.update(tbProPower);
|
||||
|
|
@ -83,6 +95,8 @@ public class TbProPowerController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除杆塔数据")
|
||||
@RequiresPermissions("base:power:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbProPowerService.deleteById(id);
|
||||
|
|
@ -93,6 +107,8 @@ public class TbProPowerController extends BaseController {
|
|||
* @param response
|
||||
* @param tbProPower
|
||||
*/
|
||||
@ApiOperation(value = "杆塔数据导出")
|
||||
@RequiresPermissions("base:power:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbProPower tbProPower) {
|
||||
List<TbProPower> list = tbProPowerService.queryByPage(tbProPower);
|
||||
|
|
@ -103,6 +119,8 @@ public class TbProPowerController extends BaseController {
|
|||
/**
|
||||
* 导入模版下载
|
||||
*/
|
||||
@ApiOperation(value = "杆塔导入模版下载")
|
||||
@RequiresPermissions("base:power:load")
|
||||
@PostMapping("/downLoad")
|
||||
public void downLoadExcelFile(){
|
||||
HttpServletResponse resp = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
|
||||
|
|
@ -114,6 +132,8 @@ public class TbProPowerController extends BaseController {
|
|||
* @param file
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "杆塔数据导入")
|
||||
@RequiresPermissions("base:power:import")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, Long id)
|
||||
{
|
||||
|
|
@ -124,10 +144,11 @@ public class TbProPowerController extends BaseController {
|
|||
* 从北京电科院数据库获取杆塔列表
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "从北京电科院数据库获取杆塔列表")
|
||||
@RequiresPermissions("base:power:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult queryByPage() {
|
||||
List<TbProPower> list = tbProPowerService.getList();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import com.bonus.base.basic.vo.TbProjectVo;
|
|||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -20,6 +22,7 @@ import java.util.List;
|
|||
* @author makejava
|
||||
* @since 2024-09-09 14:56:49
|
||||
*/
|
||||
@Api(tags = "工程管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbProject")
|
||||
public class TbProjectController extends BaseController {
|
||||
|
|
@ -35,6 +38,8 @@ public class TbProjectController extends BaseController {
|
|||
* @param tbProject 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "分页查询工程管理信息")
|
||||
@RequiresPermissions("base:project:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbProject tbProject) {
|
||||
if (tbProject.getIsAll() != null && tbProject.getIsAll() == 0) {
|
||||
|
|
@ -51,6 +56,8 @@ public class TbProjectController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条工程数据")
|
||||
@RequiresPermissions("base:project:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(tbProjectService.queryById(id));
|
||||
|
|
@ -62,6 +69,8 @@ public class TbProjectController extends BaseController {
|
|||
* @param tbProject 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增工程数据")
|
||||
@RequiresPermissions("base:project:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Valid @RequestBody TbProject tbProject) {
|
||||
return tbProjectService.insert(tbProject);
|
||||
|
|
@ -73,6 +82,8 @@ public class TbProjectController extends BaseController {
|
|||
* @param tbProject 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑工程数据")
|
||||
@RequiresPermissions("base:project:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Valid @RequestBody TbProject tbProject) {
|
||||
return tbProjectService.update(tbProject);
|
||||
|
|
@ -84,6 +95,8 @@ public class TbProjectController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除工程数据")
|
||||
@RequiresPermissions("base:project:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbProjectService.deleteById(id);
|
||||
|
|
@ -94,7 +107,8 @@ public class TbProjectController extends BaseController {
|
|||
* @param response
|
||||
* @param tbProject
|
||||
*/
|
||||
@ApiOperation("工程管理导出")
|
||||
@ApiOperation(value = "工程管理数据导出")
|
||||
@RequiresPermissions("base:project:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbProject tbProject) {
|
||||
List<TbProjectVo> list = tbProjectService.queryByPage(tbProject);
|
||||
|
|
@ -106,6 +120,8 @@ public class TbProjectController extends BaseController {
|
|||
* 从北京电科院数据库获取项目部名称列表
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "从北京电科院数据库获取项目部名称列表")
|
||||
@RequiresPermissions("base:project:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult queryByPage() {
|
||||
List<TbProjectVo> list = tbProjectService.getList();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import com.bonus.common.core.utils.poi.ExcelUtil;
|
|||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -21,6 +23,7 @@ import java.util.List;
|
|||
* @author makejava
|
||||
* @since 2024-09-10 09:46:24
|
||||
*/
|
||||
@Api(tags = "班组管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbTeam")
|
||||
public class TbTeamController extends BaseController {
|
||||
|
|
@ -36,6 +39,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param tbTeam 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "分页查询班组信息")
|
||||
@RequiresPermissions("base:team:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo queryByPage(TbTeam tbTeam) {
|
||||
startPage();
|
||||
|
|
@ -49,6 +54,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条班组信息")
|
||||
@RequiresPermissions("base:team:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(tbTeamService.queryById(id));
|
||||
|
|
@ -60,6 +67,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param tbTeam 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增班组信息")
|
||||
@RequiresPermissions("base:team:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@Valid @RequestBody TbTeam tbTeam) {
|
||||
return tbTeamService.insert(tbTeam);
|
||||
|
|
@ -71,6 +80,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param tbTeam 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑班组信息")
|
||||
@RequiresPermissions("base:team:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Valid @RequestBody TbTeam tbTeam) {
|
||||
return tbTeamService.update(tbTeam);
|
||||
|
|
@ -82,6 +93,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@ApiOperation(value = "通过主键解散班组")
|
||||
@RequiresPermissions("base:team:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbTeamService.deleteById(id);
|
||||
|
|
@ -93,6 +106,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param tbTeam 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "人员绑定安全帽")
|
||||
@RequiresPermissions("base:team:bind")
|
||||
@PostMapping("/bind")
|
||||
public AjaxResult bind(@RequestBody TbTeam tbTeam) {
|
||||
return tbTeamService.bind(tbTeam);
|
||||
|
|
@ -104,6 +119,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param tbTeam 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "人员解绑安全帽")
|
||||
@RequiresPermissions("base:team:unbind")
|
||||
@PostMapping("/unbind")
|
||||
public AjaxResult unbind(@RequestBody TbTeam tbTeam) {
|
||||
return tbTeamService.unbind(tbTeam);
|
||||
|
|
@ -115,6 +132,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param tbTeam 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "人员移出班组")
|
||||
@RequiresPermissions("base:team:remove")
|
||||
@PostMapping("/remove")
|
||||
public AjaxResult remove(@RequestBody TbTeam tbTeam) {
|
||||
return tbTeamService.remove(tbTeam);
|
||||
|
|
@ -125,6 +144,8 @@ public class TbTeamController extends BaseController {
|
|||
*
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "查询安全帽类型设备列表")
|
||||
//@RequiresPermissions("base:team:list")
|
||||
@GetMapping("/devList")
|
||||
public AjaxResult queryByPage(TbDeviceVo tbDeviceVo) {
|
||||
return AjaxResult.success(tbTeamService.selectDeviceList(tbDeviceVo));
|
||||
|
|
@ -135,7 +156,8 @@ public class TbTeamController extends BaseController {
|
|||
* @param response
|
||||
* @param tbTeam
|
||||
*/
|
||||
@ApiOperation("班组管理导出")
|
||||
@ApiOperation(value = "班组管理导出")
|
||||
@RequiresPermissions("base:team:export")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TbTeam tbTeam) {
|
||||
List<TbTeam> list = tbTeamService.queryByPage(tbTeam);
|
||||
|
|
@ -147,6 +169,8 @@ public class TbTeamController extends BaseController {
|
|||
* 从北京电科院数据库获取班组列表
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "从北京电科院数据库获取班组列表")
|
||||
@RequiresPermissions("base:team:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult queryByPage() {
|
||||
List<TbTeam> list = tbTeamService.getList();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import com.bonus.base.basic.domain.TbUserPost;
|
|||
import com.bonus.base.basic.service.TbUserPostService;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -15,6 +18,7 @@ import java.util.List;
|
|||
* @author makejava
|
||||
* @since 2024-09-12 18:29:36
|
||||
*/
|
||||
@Api(tags = "人员到岗到位管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbUserPost")
|
||||
public class TbUserPostController extends BaseController {
|
||||
|
|
@ -30,6 +34,8 @@ public class TbUserPostController extends BaseController {
|
|||
* @param tbUserPost 筛选条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "分页查询人员到岗到位信息")
|
||||
@RequiresPermissions("base:user:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbUserPost tbUserPost) {
|
||||
if (tbUserPost.getIsAll() != null && tbUserPost.getIsAll() == 0) {
|
||||
|
|
@ -48,6 +54,8 @@ public class TbUserPostController extends BaseController {
|
|||
* @param tbUserPost 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增人员到岗到位信息")
|
||||
@RequiresPermissions("base:user:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TbUserPost tbUserPost) {
|
||||
return AjaxResult.success(tbUserPostService.insert(tbUserPost));
|
||||
|
|
|
|||
|
|
@ -2,34 +2,42 @@ package com.bonus.base.basic.controller;
|
|||
|
||||
import com.bonus.base.basic.domain.TbWarnConfig;
|
||||
import com.bonus.base.basic.service.TbWarnConfigService;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 预警配置表(tb_warn_config)表控制层
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
* 预警配置表(tb_warn_config)表控制层
|
||||
*
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "预警配置管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbWarnConfig")
|
||||
public class TbWarnConfigController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private TbWarnConfigService tbWarnConfigService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条预警配置数据")
|
||||
@RequiresPermissions("base:warn:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult queryById(@PathVariable("id") Long id) {
|
||||
return success(tbWarnConfigService.selectByPrimaryKey(id));
|
||||
|
|
@ -40,6 +48,8 @@ public class TbWarnConfigController extends BaseController {
|
|||
* @param tbWarnConfig
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "分页查询预警配置数据")
|
||||
@RequiresPermissions("base:warn:list")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult queryByPage(TbWarnConfig tbWarnConfig) {
|
||||
if (tbWarnConfig.getIsAll() != null && tbWarnConfig.getIsAll() == 0) {
|
||||
|
|
@ -57,6 +67,8 @@ public class TbWarnConfigController extends BaseController {
|
|||
* @param tbWarnConfig 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@ApiOperation(value = "新增预警配置数据")
|
||||
@RequiresPermissions("base:warn:add")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody @Valid TbWarnConfig tbWarnConfig) {
|
||||
return tbWarnConfigService.insertSelective(tbWarnConfig);
|
||||
|
|
@ -69,6 +81,8 @@ public class TbWarnConfigController extends BaseController {
|
|||
* @param tbWarnConfig 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@ApiOperation(value = "编辑预警配置数据")
|
||||
@RequiresPermissions("base:warn:edit")
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody @Valid TbWarnConfig tbWarnConfig) {
|
||||
return tbWarnConfigService.updateByPrimaryKeySelective(tbWarnConfig);
|
||||
|
|
@ -81,9 +95,14 @@ public class TbWarnConfigController extends BaseController {
|
|||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除预警配置数据")
|
||||
@RequiresPermissions("base:warn:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbWarnConfigService.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue