提交
This commit is contained in:
@@ -0,0 +1,110 @@
|
||||
package com.xinda.data.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.xinda.common.annotation.Log;
|
||||
import com.xinda.common.core.controller.BaseController;
|
||||
import com.xinda.common.core.domain.AjaxResult;
|
||||
import com.xinda.common.enums.BusinessType;
|
||||
import com.xinda.iot.domain.DeviceDoc;
|
||||
import com.xinda.iot.service.IDeviceDocService;
|
||||
import com.xinda.common.utils.poi.ExcelUtil;
|
||||
import com.xinda.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备档案管理Controller
|
||||
*
|
||||
* @author leed
|
||||
* @date 2025-07-13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/iot/deviecDoc")
|
||||
@Api(tags = "设备档案管理")
|
||||
public class DeviceDocController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDeviceDocService deviceDocService;
|
||||
|
||||
/**
|
||||
* 查询设备档案管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:list')")
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询设备档案管理列表")
|
||||
public TableDataInfo list(DeviceDoc deviceDoc)
|
||||
{
|
||||
startPage();
|
||||
List<DeviceDoc> list = deviceDocService.selectDeviceDocList(deviceDoc);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备档案管理列表
|
||||
*/
|
||||
@ApiOperation("导出设备档案管理列表")
|
||||
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DeviceDoc deviceDoc)
|
||||
{
|
||||
List<DeviceDoc> list = deviceDocService.selectDeviceDocList(deviceDoc);
|
||||
ExcelUtil<DeviceDoc> util = new ExcelUtil<DeviceDoc>(DeviceDoc.class);
|
||||
util.exportExcel(response, list, "设备档案管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备档案管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiOperation("获取设备档案管理详细信息")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(deviceDocService.selectDeviceDocById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备档案管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:add')")
|
||||
@PostMapping
|
||||
@ApiOperation("新增设备档案管理")
|
||||
public AjaxResult add(@RequestBody DeviceDoc deviceDoc)
|
||||
{
|
||||
return toAjax(deviceDocService.insertDeviceDoc(deviceDoc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备档案管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:edit')")
|
||||
@PutMapping
|
||||
@ApiOperation("修改设备档案管理")
|
||||
public AjaxResult edit(@RequestBody DeviceDoc deviceDoc)
|
||||
{
|
||||
return toAjax(deviceDocService.updateDeviceDoc(deviceDoc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备档案管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('iot:deviecDoc:remove')")
|
||||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除设备档案管理")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(deviceDocService.deleteDeviceDocByIds(ids));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user