|
@@ -1,26 +1,20 @@
|
|
|
package com.ruoyi.project.check.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.ruoyi.common.annotation.Log;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
+import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
import com.ruoyi.project.check.domain.TCheckStandardgases;
|
|
|
import com.ruoyi.project.check.service.ITCheckStandardgasesService;
|
|
|
-import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
-import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 标准气体Controller
|
|
@@ -30,8 +24,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/check/standardgases")
|
|
|
-public class TCheckStandardgasesController extends BaseController
|
|
|
-{
|
|
|
+public class TCheckStandardgasesController extends BaseController {
|
|
|
@Autowired
|
|
|
private ITCheckStandardgasesService tCheckStandardgasesService;
|
|
|
|
|
@@ -40,16 +33,14 @@ public class TCheckStandardgasesController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('check:standardgases:list')")
|
|
|
@GetMapping("/list")
|
|
|
- public TableDataInfo list(TCheckStandardgases tCheckStandardgases)
|
|
|
- {
|
|
|
+ public TableDataInfo list(TCheckStandardgases tCheckStandardgases) {
|
|
|
startPage();
|
|
|
List<TCheckStandardgases> list = tCheckStandardgasesService.selectTCheckStandardgasesList(tCheckStandardgases);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/allStandardgases")
|
|
|
- public AjaxResult allStandardgases()
|
|
|
- {
|
|
|
+ public AjaxResult allStandardgases() {
|
|
|
return AjaxResult.success(tCheckStandardgasesService.selectAllStandardgases());
|
|
|
}
|
|
|
|
|
@@ -57,10 +48,9 @@ public class TCheckStandardgasesController extends BaseController
|
|
|
* 导出标准气体列表
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('check:standardgases:export')")
|
|
|
- @Log(title = "标准气体", businessType = BusinessType.EXPORT)
|
|
|
+ @Log(title = "标准气体导出", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, TCheckStandardgases tCheckStandardgases)
|
|
|
- {
|
|
|
+ public void export(HttpServletResponse response, TCheckStandardgases tCheckStandardgases) {
|
|
|
List<TCheckStandardgases> list = tCheckStandardgasesService.selectTCheckStandardgasesList(tCheckStandardgases);
|
|
|
ExcelUtil<TCheckStandardgases> util = new ExcelUtil<TCheckStandardgases>(TCheckStandardgases.class);
|
|
|
util.exportExcel(response, list, "标准气体数据");
|
|
@@ -71,8 +61,7 @@ public class TCheckStandardgasesController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('check:standardgases:query')")
|
|
|
@GetMapping(value = "/{id}")
|
|
|
- public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
|
- {
|
|
|
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
|
|
|
return AjaxResult.success(tCheckStandardgasesService.selectTCheckStandardgasesById(id));
|
|
|
}
|
|
|
|
|
@@ -80,10 +69,9 @@ public class TCheckStandardgasesController extends BaseController
|
|
|
* 新增标准气体
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('check:standardgases:add')")
|
|
|
- @Log(title = "标准气体", businessType = BusinessType.INSERT)
|
|
|
+ @Log(title = "标准气体新增", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
- public AjaxResult add(@RequestBody TCheckStandardgases tCheckStandardgases)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody TCheckStandardgases tCheckStandardgases) {
|
|
|
tCheckStandardgases.setUpdatedate(new Date());
|
|
|
tCheckStandardgases.setUpdaterCode(getUserId());
|
|
|
tCheckStandardgases.setCreaterCode(getUserId());
|
|
@@ -94,10 +82,9 @@ public class TCheckStandardgasesController extends BaseController
|
|
|
* 修改标准气体
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('check:standardgases:edit')")
|
|
|
- @Log(title = "标准气体", businessType = BusinessType.UPDATE)
|
|
|
+ @Log(title = "标准气体修改", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
|
- public AjaxResult edit(@RequestBody TCheckStandardgases tCheckStandardgases)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody TCheckStandardgases tCheckStandardgases) {
|
|
|
tCheckStandardgases.setUpdatedate(new Date());
|
|
|
tCheckStandardgases.setUpdaterCode(getUserId());
|
|
|
return toAjax(tCheckStandardgasesService.updateTCheckStandardgases(tCheckStandardgases));
|
|
@@ -107,10 +94,9 @@ public class TCheckStandardgasesController extends BaseController
|
|
|
* 删除标准气体
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('check:standardgases:remove')")
|
|
|
- @Log(title = "标准气体", businessType = BusinessType.DELETE)
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] ids)
|
|
|
- {
|
|
|
+ @Log(title = "标准气体删除", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] ids) {
|
|
|
return toAjax(tCheckStandardgasesService.deleteTCheckStandardgasesByIds(ids));
|
|
|
}
|
|
|
}
|