parent
4d07b5787a
commit
88b60288cb
|
|
@ -6,6 +6,10 @@ import com.bonus.base.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.InnerAuth;
|
||||
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.beans.factory.annotation.Autowired;
|
||||
|
|
@ -19,6 +23,7 @@ import java.util.List;
|
|||
*
|
||||
* @author ma_sh
|
||||
*/
|
||||
@Api(tags = "边带记录设备管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbBdDeviceRecord")
|
||||
public class TbBdDeviceRecordController extends BaseController {
|
||||
|
|
@ -31,6 +36,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
/**
|
||||
* 通过主键查询单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条边带记录设备数据")
|
||||
@RequiresPermissions("base:info:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult selectOne(@PathVariable("id") Long id) {
|
||||
return success(tbBdDeviceRecordService.selectByPrimaryKey(id));
|
||||
|
|
@ -41,6 +48,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);
|
||||
|
|
@ -52,6 +61,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param tbBdDeviceVo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "边带设备管理信息列表")
|
||||
@RequiresPermissions("base:info:list")
|
||||
@GetMapping("/getDeviceList")
|
||||
public TableDataInfo getDeviceList(TbBdDeviceVo tbBdDeviceVo) {
|
||||
startPage();
|
||||
|
|
@ -65,6 +76,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));
|
||||
|
|
@ -77,6 +90,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));
|
||||
|
|
@ -89,6 +104,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);
|
||||
|
|
@ -99,6 +116,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);
|
||||
|
|
@ -110,6 +129,8 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
* @param record
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "根据id修改绑定的杆塔信息")
|
||||
@RequiresPermissions("base:info:update")
|
||||
@PostMapping("/updatePowerId")
|
||||
public AjaxResult updatePowerId(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdDeviceRecord record) {
|
||||
return toAjax(tbBdDeviceRecordService.updatePowerId(record));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ import com.bonus.base.vo.PageResultVo;
|
|||
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.beans.factory.annotation.Autowired;
|
||||
|
|
@ -19,6 +22,7 @@ import java.util.List;
|
|||
* 边带申请记录表(tb_bd_record)表控制层
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "边带申请记录管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbBdRecord")
|
||||
public class TbBdRecordController extends BaseController {
|
||||
|
|
@ -32,6 +36,8 @@ public class TbBdRecordController extends BaseController {
|
|||
/**
|
||||
* 通过主键查询单条数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条边带申请记录数据")
|
||||
@RequiresPermissions("base:record:query")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult selectById(@PathVariable("id") Long id) {
|
||||
return success(tbBdRecordService.selectByPrimaryKey(id));
|
||||
|
|
@ -40,6 +46,8 @@ public class TbBdRecordController extends BaseController {
|
|||
/**
|
||||
* 通过主键查询单条内部数据
|
||||
*/
|
||||
@ApiOperation(value = "通过主键查询单条内部数据")
|
||||
@RequiresPermissions("base:record:query")
|
||||
@GetMapping("/getInner/{id}")
|
||||
public TableDataInfo getById(@PathVariable("id") Long id) {
|
||||
startPage();
|
||||
|
|
@ -47,6 +55,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);
|
||||
|
|
@ -60,6 +70,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);
|
||||
|
|
@ -72,6 +84,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);
|
||||
|
|
@ -84,6 +98,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);
|
||||
|
|
@ -94,6 +110,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);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ import com.bonus.base.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.web.bind.annotation.*;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -21,6 +24,7 @@ import java.util.List;
|
|||
* 设备监测信息表(tb_dev_attribute)表控制层
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "设备监测信息管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbDevAttribute")
|
||||
public class TbDevAttributeController extends BaseController {
|
||||
|
|
@ -34,11 +38,15 @@ public class TbDevAttributeController extends BaseController {
|
|||
/**
|
||||
* 通过主键查询单条数据
|
||||
*/
|
||||
@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);
|
||||
|
|
@ -51,6 +59,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));
|
||||
|
|
@ -60,6 +70,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));
|
||||
|
|
@ -70,6 +82,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);
|
||||
|
|
@ -80,6 +94,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.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.web.bind.annotation.*;
|
||||
|
||||
|
|
@ -19,6 +21,7 @@ import java.util.List;
|
|||
*
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "设备信息管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbDevice")
|
||||
public class TbDeviceController extends BaseController {
|
||||
|
|
@ -34,12 +37,15 @@ public class TbDeviceController extends BaseController {
|
|||
*
|
||||
* @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();
|
||||
|
|
@ -54,6 +60,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);
|
||||
|
|
@ -66,6 +74,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);
|
||||
|
|
@ -77,6 +87,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);
|
||||
|
|
@ -87,7 +99,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.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.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:area")
|
||||
@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:data")
|
||||
@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,7 +132,8 @@ 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");
|
||||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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,6 +144,8 @@ public class TbProPowerController extends BaseController {
|
|||
* 从北京电科院数据库获取杆塔列表
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "从北京电科院数据库获取杆塔列表")
|
||||
@RequiresPermissions("base:power:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult queryByPage() {
|
||||
List<TbProPower> list = tbProPowerService.getList();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ import com.bonus.base.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);
|
||||
|
|
@ -115,6 +130,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);
|
||||
|
|
@ -126,6 +143,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);
|
||||
|
|
@ -136,6 +155,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));
|
||||
|
|
@ -146,7 +167,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);
|
||||
|
|
@ -158,6 +180,8 @@ public class TbTeamController extends BaseController {
|
|||
* 从北京电科院数据库获取班组列表
|
||||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "从北京电科院数据库获取班组列表")
|
||||
@RequiresPermissions("base:team:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult queryByPage() {
|
||||
List<TbTeam> list = tbTeamService.getList();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,9 @@ import com.bonus.base.service.TbUserPostService;
|
|||
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 javax.annotation.Resource;
|
||||
|
|
@ -16,6 +19,7 @@ import java.util.List;
|
|||
* @author makejava
|
||||
* @since 2024-09-12 18:29:36
|
||||
*/
|
||||
@Api(tags = "人员到岗到位管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbUserPost")
|
||||
public class TbUserPostController extends BaseController {
|
||||
|
|
@ -31,6 +35,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) {
|
||||
|
|
@ -49,6 +55,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));
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ import com.bonus.base.domain.TbWarnConfig;
|
|||
import com.bonus.base.service.TbWarnConfigService;
|
||||
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 syruan
|
||||
*/
|
||||
@Api(tags = "预警配置管理接口")
|
||||
@RestController
|
||||
@RequestMapping("/tbWarnConfig")
|
||||
public class TbWarnConfigController extends BaseController {
|
||||
|
|
@ -30,6 +34,8 @@ public class TbWarnConfigController extends BaseController {
|
|||
* @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 +46,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 +65,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 +79,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,6 +93,8 @@ 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);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.bonus.base.domain.TbPeople;
|
|||
import com.bonus.screen.vo.PeoplePositionVo;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +58,7 @@ public interface TbPeopleMapper {
|
|||
* @param tbPeople
|
||||
* @return
|
||||
*/
|
||||
TbPeople queryByName(TbPeople tbPeople);
|
||||
List<TbPeople> queryByName(TbPeople tbPeople);
|
||||
|
||||
/**
|
||||
* 根据工程ID查询人员定位信息
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ public class TbBdRecordServiceImpl implements TbBdRecordService{
|
|||
if (list == null || list.isEmpty()) {
|
||||
// 从数据库获取数据并缓存
|
||||
list = tbBdRecordMapper.getAll(record);
|
||||
redisService.setCacheObject(Constants.TB_BD_RECORD_REDIS_KEY, list, 10L, TimeUnit.MINUTES);
|
||||
redisService.setCacheObject(Constants.TB_BD_RECORD_REDIS_KEY, list, 600L, TimeUnit.MINUTES);
|
||||
}
|
||||
// 处理手机号解密
|
||||
if (list != null && list.size() > 0) {
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ public class TbDevAttributeServiceImpl implements TbDevAttributeService{
|
|||
if (list == null || list.isEmpty()) {
|
||||
// 从数据库获取数据并缓存
|
||||
list = tbDevAttributeMapper.queryAll(record);
|
||||
redisService.setCacheObject(Constants.TB_DEV_ATTRIBUTE_REDIS_KEY, list, 10L, TimeUnit.MINUTES);
|
||||
redisService.setCacheObject(Constants.TB_DEV_ATTRIBUTE_REDIS_KEY, list, 600L, TimeUnit.MINUTES);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(attribute -> {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.bonus.base.domain.TbTeam;
|
|||
import com.bonus.base.mapper.TbPeopleMapper;
|
||||
import com.bonus.base.mapper.TbTeamMapper;
|
||||
import com.bonus.base.service.TbPeopleService;
|
||||
import com.bonus.base.utils.PhoneNumberUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.utils.encryption.Sm4Utils;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
|
|
@ -85,6 +86,9 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
|||
if (StringUtils.isNotBlank(people.getRelPhone())) {
|
||||
people.setRelPhone(Sm4Utils.decode(people.getRelPhone()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(people.getIdCard())) {
|
||||
people.setIdCard(Sm4Utils.decode(people.getIdCard()));
|
||||
}
|
||||
});
|
||||
}
|
||||
return peopleList;
|
||||
|
|
@ -112,12 +116,24 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
|||
}
|
||||
}
|
||||
//同名同身份证号判重
|
||||
TbPeople people = tbPeopleDao.queryByName(tbPeople);
|
||||
/*TbPeople people = tbPeopleDao.queryByName(tbPeople);
|
||||
if (people != null) {
|
||||
return AjaxResult.error(ExceptionEnum.ID_CARD_DUPLICATE.getCode(), ExceptionEnum.ID_CARD_DUPLICATE.getMsg());
|
||||
}*/
|
||||
List<TbPeople> peopleList = tbPeopleDao.queryByName(tbPeople);
|
||||
//对查询的身份证号进行解密处理,然后和新增的进行对比
|
||||
if (CollectionUtils.isNotEmpty(peopleList)) {
|
||||
for (TbPeople people : peopleList) {
|
||||
if (StringUtils.isNotBlank(people.getIdCard()) && StringUtils.isNotBlank(tbPeople.getIdCard())) {
|
||||
if (Objects.equals(Sm4Utils.decode(people.getIdCard()), tbPeople.getIdCard())) {
|
||||
return AjaxResult.error(ExceptionEnum.ID_CARD_DUPLICATE.getCode(), ExceptionEnum.ID_CARD_DUPLICATE.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tbPeople.setCreateUser(SecurityUtils.getUserId());
|
||||
tbPeople.setRelPhone(Sm4Utils.encode(tbPeople.getRelPhone()));
|
||||
tbPeople.setIdCard(Sm4Utils.encode(tbPeople.getIdCard()));
|
||||
int result = tbPeopleDao.insert(tbPeople);
|
||||
if (result > 0) {
|
||||
return AjaxResult.success(ExceptionEnum.SUCCESS.getMsg(), result);
|
||||
|
|
@ -160,14 +176,27 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
|||
}
|
||||
}
|
||||
//同名同身份证号判重
|
||||
TbPeople people = tbPeopleDao.queryByName(tbPeople);
|
||||
/*TbPeople people = tbPeopleDao.queryByName(tbPeople);
|
||||
if (people != null) {
|
||||
if (!Objects.equals(people.getId(), tbPeople.getId())) {
|
||||
return AjaxResult.error(ExceptionEnum.NAME_DUPLICATE.getCode(), ExceptionEnum.NAME_DUPLICATE.getMsg());
|
||||
}
|
||||
}*/
|
||||
List<TbPeople> peopleList = tbPeopleDao.queryByName(tbPeople);
|
||||
if (CollectionUtils.isNotEmpty(peopleList)) {
|
||||
for (TbPeople people : peopleList) {
|
||||
if (StringUtils.isNotBlank(people.getIdCard()) && StringUtils.isNotBlank(tbPeople.getIdCard())) {
|
||||
if (Objects.equals(Sm4Utils.decode(people.getIdCard()), tbPeople.getIdCard())) {
|
||||
if (!Objects.equals(people.getId(), tbPeople.getId())) {
|
||||
return AjaxResult.error(ExceptionEnum.ID_CARD_DUPLICATE.getCode(), ExceptionEnum.ID_CARD_DUPLICATE.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
tbPeople.setUpdateUser(SecurityUtils.getUserId());
|
||||
tbPeople.setRelPhone(Sm4Utils.encode(tbPeople.getRelPhone()));
|
||||
tbPeople.setIdCard(Sm4Utils.encode(tbPeople.getIdCard()));
|
||||
int result = tbPeopleDao.update(tbPeople);
|
||||
//根据人员id去班组表中修改人员信息,先根据人员id去班组表中查询
|
||||
List<TbTeam> tbTeamList = tbTeamDao.selectListById(tbPeople.getId());
|
||||
|
|
@ -331,29 +360,35 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
|||
List<TbPeopleDto> tbPeopleList = util.importExcel(file.getInputStream());
|
||||
int result = 0;
|
||||
for (TbPeopleDto tbPeople : tbPeopleList) {
|
||||
TbPeople people = tbPeopleDao.queryByName(tbPeople);
|
||||
if (people != null) {
|
||||
//进行更新操作
|
||||
TbPeople dto = new TbPeople();
|
||||
dto.setId(people.getId());
|
||||
dto.setUpdateUser(SecurityUtils.getUserId());
|
||||
dto.setDelFlag(0);
|
||||
dto.setRelPhone(Sm4Utils.encode(tbPeople.getRelPhone()));
|
||||
dto.setIdCard(tbPeople.getIdCard());
|
||||
dto.setSex(tbPeople.getGender());
|
||||
dto.setRelName(tbPeople.getRelName());
|
||||
dto.setPostCode(tbPeople.getPostCode());
|
||||
result += tbPeopleDao.update(dto);
|
||||
} else {
|
||||
//新增操作
|
||||
TbPeople dto = new TbPeople();
|
||||
dto.setCreateUser(SecurityUtils.getUserId());
|
||||
dto.setRelPhone(Sm4Utils.encode(tbPeople.getRelPhone()));
|
||||
dto.setIdCard(tbPeople.getIdCard());
|
||||
dto.setSex(tbPeople.getGender());
|
||||
dto.setRelName(tbPeople.getRelName());
|
||||
dto.setPostCode(tbPeople.getPostCode());
|
||||
result += tbPeopleDao.insert(dto);
|
||||
List<TbPeople> peopleList = tbPeopleDao.queryByName(tbPeople);
|
||||
if (CollectionUtils.isNotEmpty(peopleList)) {
|
||||
for (TbPeople people : peopleList) {
|
||||
if (StringUtils.isNotBlank(people.getIdCard()) && StringUtils.isNotBlank(tbPeople.getIdCard())) {
|
||||
if (Objects.equals(Sm4Utils.decode(people.getIdCard()), tbPeople.getIdCard())) {
|
||||
//进行更新操作
|
||||
TbPeople dto = new TbPeople();
|
||||
dto.setId(people.getId());
|
||||
dto.setUpdateUser(SecurityUtils.getUserId());
|
||||
dto.setDelFlag(0);
|
||||
dto.setRelPhone(Sm4Utils.encode(tbPeople.getRelPhone()));
|
||||
dto.setIdCard(Sm4Utils.encode(tbPeople.getIdCard()));
|
||||
dto.setSex(tbPeople.getGender());
|
||||
dto.setRelName(tbPeople.getRelName());
|
||||
dto.setPostCode(tbPeople.getPostCode());
|
||||
result += tbPeopleDao.update(dto);
|
||||
} else {
|
||||
//新增操作
|
||||
TbPeople dto = new TbPeople();
|
||||
dto.setCreateUser(SecurityUtils.getUserId());
|
||||
dto.setRelPhone(Sm4Utils.encode(tbPeople.getRelPhone()));
|
||||
dto.setIdCard(Sm4Utils.encode(tbPeople.getIdCard()));
|
||||
dto.setSex(tbPeople.getGender());
|
||||
dto.setRelName(tbPeople.getRelName());
|
||||
dto.setPostCode(tbPeople.getPostCode());
|
||||
result += tbPeopleDao.insert(dto);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (result > 0) {
|
||||
|
|
@ -367,7 +402,15 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
|||
|
||||
@Override
|
||||
public List<PeoplePositionVo> queryPeoplePositionByProId(Integer proId) {
|
||||
return tbPeopleDao.queryPeoplePositionByProId(proId);
|
||||
List<PeoplePositionVo> list = tbPeopleDao.queryPeoplePositionByProId(proId);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
list.forEach(peoplePositionVo -> {
|
||||
if (StringUtils.isNotBlank(peoplePositionVo.getIdCard())) {
|
||||
peoplePositionVo.setIdCard(Sm4Utils.decode(peoplePositionVo.getIdCard()));
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,12 +2,6 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.base.mapper.TbPeopleMapper">
|
||||
|
||||
<select id="selectByName" resultType="com.bonus.base.domain.TbPeople">
|
||||
select
|
||||
tp.id as id, tp.team_id as teamId, tp.rel_name as relName, tp.rel_phone as relPhone, tp.id_card as idCard,
|
||||
tp.post_code as postCode, sda
|
||||
</select>
|
||||
|
||||
<select id="queryByPage" resultType="com.bonus.base.domain.TbPeople">
|
||||
select
|
||||
tp.id as id, tp.team_id as teamId, tp.rel_name as relName, tp.rel_phone as relPhone, tp.id_card as idCard,
|
||||
|
|
@ -61,9 +55,6 @@
|
|||
tp.sex as sex
|
||||
from tb_people tp
|
||||
where tp.del_flag = '0'
|
||||
<if test="idCard != null and idCard != ''">
|
||||
and tp.id_card = #{idCard}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
|
|
@ -156,7 +147,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getUserById" resultType="com.bonus.system.api.domain.SysUser">
|
||||
select user_id as userId, user_name as userName, password as password from sys_user where id = #{id}
|
||||
select user_id as userId, user_name as userName, password as password from sys_user where user_id = #{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue