预警信息处理模块功能调整
This commit is contained in:
parent
45a14c30d4
commit
47c50f8f34
|
|
@ -0,0 +1,109 @@
|
||||||
|
package com.dkl.large.controller;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
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.dkl.common.annotation.Log;
|
||||||
|
import com.dkl.common.core.controller.BaseController;
|
||||||
|
import com.dkl.common.core.domain.AjaxResult;
|
||||||
|
import com.dkl.common.enums.BusinessType;
|
||||||
|
import com.dkl.large.domain.DklWarningThreshold;
|
||||||
|
import com.dkl.large.service.IDklWarningThresholdService;
|
||||||
|
import com.dkl.common.utils.poi.ExcelUtil;
|
||||||
|
import com.dkl.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 容量阀值Controller
|
||||||
|
*
|
||||||
|
* @author Dkl
|
||||||
|
* @date 2025-06-07
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/large/threshold")
|
||||||
|
public class DklWarningThresholdController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IDklWarningThresholdService dklWarningThresholdService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询容量阀值列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(DklWarningThreshold dklWarningThreshold)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<DklWarningThreshold> list = dklWarningThresholdService.selectDklWarningThresholdList(dklWarningThreshold);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出容量阀值列表
|
||||||
|
*/
|
||||||
|
@Log(title = "容量阀值", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, DklWarningThreshold dklWarningThreshold)
|
||||||
|
{
|
||||||
|
List<DklWarningThreshold> list = dklWarningThresholdService.selectDklWarningThresholdList(dklWarningThreshold);
|
||||||
|
ExcelUtil<DklWarningThreshold> util = new ExcelUtil<DklWarningThreshold>(DklWarningThreshold.class);
|
||||||
|
util.exportExcel(response, list, "容量阀值数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取容量阀值详细信息
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Integer id)
|
||||||
|
{
|
||||||
|
return success(dklWarningThresholdService.selectDklWarningThresholdById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增容量阀值
|
||||||
|
*/
|
||||||
|
@Log(title = "容量阀值", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody DklWarningThreshold dklWarningThreshold)
|
||||||
|
{
|
||||||
|
//添加系统信息
|
||||||
|
dklWarningThreshold.setDelFlag("0");
|
||||||
|
dklWarningThreshold.setCreateTime(new Date());
|
||||||
|
dklWarningThreshold.setCreateBy(getUsername());
|
||||||
|
dklWarningThreshold.setDeptId(getDeptId());
|
||||||
|
dklWarningThreshold.setUpdateTime(new Date());
|
||||||
|
dklWarningThreshold.setUpdateBy(getUsername());
|
||||||
|
return toAjax(dklWarningThresholdService.insertDklWarningThreshold(dklWarningThreshold));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改容量阀值
|
||||||
|
*/
|
||||||
|
@Log(title = "容量阀值", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody DklWarningThreshold dklWarningThreshold)
|
||||||
|
{
|
||||||
|
//添加系统信息
|
||||||
|
dklWarningThreshold.setUpdateTime(new Date());
|
||||||
|
dklWarningThreshold.setUpdateBy(getUsername());
|
||||||
|
return toAjax(dklWarningThresholdService.updateDklWarningThreshold(dklWarningThreshold));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除容量阀值
|
||||||
|
*/
|
||||||
|
@Log(title = "容量阀值", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable int[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(dklWarningThresholdService.deleteDklWarningThresholdByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue