|
@@ -0,0 +1,106 @@
|
|
|
+package com.ruoyi.web.controller.business;
|
|
|
+
|
|
|
+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.enums.BusinessType;
|
|
|
+import com.ruoyi.business.domain.ZQualityValue;
|
|
|
+import com.ruoyi.business.service.IZQualityValueService;
|
|
|
+import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
+import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 水厂质控值Controller
|
|
|
+ *
|
|
|
+ * @author slibra
|
|
|
+ * @date 2025-03-13
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/business/value")
|
|
|
+public class ZQualityValueController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private IZQualityValueService zQualityValueService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询水厂质控值列表
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:value:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(ZQualityValue zQualityValue)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<ZQualityValue> list = zQualityValueService.selectZQualityValueList(zQualityValue);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出水厂质控值列表
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:value:export')")
|
|
|
+ @Log(title = "水厂质控值", businessType = BusinessType.EXPORT)
|
|
|
+ @PostMapping("/export")
|
|
|
+ public void export(HttpServletResponse response, ZQualityValue zQualityValue)
|
|
|
+ {
|
|
|
+ List<ZQualityValue> list = zQualityValueService.selectZQualityValueList(zQualityValue);
|
|
|
+ ExcelUtil<ZQualityValue> util = new ExcelUtil<ZQualityValue>(ZQualityValue.class);
|
|
|
+ util.exportExcel(response, list, "水厂质控值数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取水厂质控值详细信息
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:value:query')")
|
|
|
+ @GetMapping(value = "/{valueId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("valueId") Long valueId)
|
|
|
+ {
|
|
|
+ return success(zQualityValueService.selectZQualityValueByValueId(valueId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增水厂质控值
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:value:add')")
|
|
|
+ @Log(title = "水厂质控值", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody ZQualityValue zQualityValue)
|
|
|
+ {
|
|
|
+ zQualityValue.setCreateBy(getUsername());
|
|
|
+ return toAjax(zQualityValueService.insertZQualityValue(zQualityValue));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改水厂质控值
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:value:edit')")
|
|
|
+ @Log(title = "水厂质控值", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody ZQualityValue zQualityValue)
|
|
|
+ {
|
|
|
+ zQualityValue.setUpdateBy(getUsername());
|
|
|
+ return toAjax(zQualityValueService.updateZQualityValue(zQualityValue));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除水厂质控值
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('business:value:remove')")
|
|
|
+ @Log(title = "水厂质控值", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{valueIds}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] valueIds)
|
|
|
+ {
|
|
|
+ return toAjax(zQualityValueService.deleteZQualityValueByValueIds(valueIds));
|
|
|
+ }
|
|
|
+}
|