Browse Source

提交代码(新增参数配置功能)

cxd 7 months ago
parent
commit
375402fb89

+ 42 - 0
gqy-admin/src/main/java/com/gqy/web/controller/document/ParamsController.java

@@ -0,0 +1,42 @@
+package com.gqy.web.controller.document;
+
+import com.gqy.common.core.domain.AjaxResultCQY;
+import com.gqy.common.core.page.TableDataInfo;
+import com.gqy.common.utils.bean.BeanUtils;
+import com.gqy.document.domain.DcParams;
+import com.gqy.document.service.IDcParamsService;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.schema.Maps;
+
+import java.util.Map;
+
+/**
+ * 参数配置管理 控制层
+ *
+ */
+@RestController
+@RequestMapping("/params")
+public class ParamsController {
+
+    @Autowired
+    private IDcParamsService iDcParamsService;
+
+    /**
+     * 查询参数列表
+     */
+    @PostMapping("/search")
+    public AjaxResultCQY search(@RequestBody Maps params)
+    {
+        DcParams paramsReq =  BeanUtils.mapToBean((Map<String, Object>) params, DcParams.class);
+
+//        return paramsService.search(params);
+        return null;
+    }
+
+}

+ 131 - 0
gqy-system/src/main/java/com/gqy/document/domain/DcParams.java

@@ -0,0 +1,131 @@
+package com.gqy.document.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.gqy.common.annotation.Excel;
+import com.gqy.common.core.domain.BaseEntity;
+
+import java.util.Date;
+
+public class DcParams extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @Excel(name = "参数ID")
+    private Long id;
+
+    /** 参数编码 */
+    @Excel(name = "参数编码")
+    private String code;
+
+    /** 参数类型(1-变量 2-常量) */
+    @Excel(name = "参数类型", readConverterExp = "1=变量,2=常量")
+    private Integer type;
+
+    /** 参数名称 */
+    @Excel(name = "参数名称")
+    private String name;
+
+    /** 参数介绍 */
+    private String intro;
+
+    /** 值类型(1-输入框 2-下拉选择 3-小数 4-百分比 5-分数) */
+    @Excel(name = "值类型", readConverterExp = "1=输入框,2=下拉选择,3=小数,4=百分比,5=分数")
+    private Integer value_type;
+
+    /** 值选项 */
+    private String value_item;
+
+    /** 参数值 */
+    @Excel(name = "参数值")
+    private String value;
+
+    /** 创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date create_time;
+
+    /** 状态(5-使用中 6-已停用 4-已删除) */
+    @Excel(name = "状态", readConverterExp = "5=使用中,6=已停用,4=已删除")
+    private Integer status;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getIntro() {
+        return intro;
+    }
+
+    public void setIntro(String intro) {
+        this.intro = intro;
+    }
+
+    public Integer getValue_type() {
+        return value_type;
+    }
+
+    public void setValue_type(Integer value_type) {
+        this.value_type = value_type;
+    }
+
+    public String getValue_item() {
+        return value_item;
+    }
+
+    public void setValue_item(String value_item) {
+        this.value_item = value_item;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public Date getCreate_time() {
+        return create_time;
+    }
+
+    public void setCreate_time(Date create_time) {
+        this.create_time = create_time;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+}

+ 21 - 0
gqy-system/src/main/java/com/gqy/document/service/IDcParamsService.java

@@ -0,0 +1,21 @@
+package com.gqy.document.service;
+
+import com.gqy.document.domain.DcParams;
+
+import java.util.List;
+
+/**
+ * 参数配置服务层接口
+ *
+ * @author ruoyi
+ */
+public interface IDcParamsService
+{
+    /**
+     * 查询参数列表
+     *
+     * @param params 查询参数
+     * @return 分页结果
+     */
+    public List<DcParams> search(DcParams params);
+}