From e38bdf2fc7303cf4ac759714edcc52ea836d83e2 Mon Sep 17 00:00:00 2001 From: wangziyangyang <707231019@qq.com> Date: Mon, 23 Mar 2020 17:28:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=89=A9=E6=96=99=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/SpSysDictController.java | 52 ++++++++ .../mes/basedata/common/dto/SpSysDictDto.java | 16 +++ .../mes/basedata/common/entity/SpSysDict.java | 114 ++++++++++++++++++ .../common/mapper/SpSysDictMapper.java | 16 +++ .../common/service/ISpSysDictService.java | 16 +++ .../service/impl/SpSysDictServiceImpl.java | 20 +++ .../basedata/common/SpSysDictMapper.xml | 5 + mes/src/main/resources/static/css/effect.css | 41 +++++++ .../basedata/materile/addOrUpdate.ftl | 68 ++++++++--- 9 files changed, 332 insertions(+), 16 deletions(-) create mode 100644 mes/src/main/java/com/wangziyang/mes/basedata/common/controller/SpSysDictController.java create mode 100644 mes/src/main/java/com/wangziyang/mes/basedata/common/dto/SpSysDictDto.java create mode 100644 mes/src/main/java/com/wangziyang/mes/basedata/common/entity/SpSysDict.java create mode 100644 mes/src/main/java/com/wangziyang/mes/basedata/common/mapper/SpSysDictMapper.java create mode 100644 mes/src/main/java/com/wangziyang/mes/basedata/common/service/ISpSysDictService.java create mode 100644 mes/src/main/java/com/wangziyang/mes/basedata/common/service/impl/SpSysDictServiceImpl.java create mode 100644 mes/src/main/resources/mapper/basedata/common/SpSysDictMapper.xml create mode 100644 mes/src/main/resources/static/css/effect.css diff --git a/mes/src/main/java/com/wangziyang/mes/basedata/common/controller/SpSysDictController.java b/mes/src/main/java/com/wangziyang/mes/basedata/common/controller/SpSysDictController.java new file mode 100644 index 0000000..487b4e9 --- /dev/null +++ b/mes/src/main/java/com/wangziyang/mes/basedata/common/controller/SpSysDictController.java @@ -0,0 +1,52 @@ +package com.wangziyang.mes.basedata.common.controller; + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.wangziyang.mes.basedata.common.entity.SpSysDict; +import com.wangziyang.mes.basedata.common.service.ISpSysDictService; +import com.wangziyang.mes.common.BaseController; +import com.wangziyang.mes.common.Result; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.List; + +/** + *
+ * 系统字典表 前端控制器 + *
+ * + * @author WangZiYang + * @since 2020-03-23 + */ +@Controller +@RequestMapping("/basedata/dict") +public class SpSysDictController extends BaseController { + /** + * 字典表服务 + */ + @Autowired + public ISpSysDictService iSpSysDictService; + + /** + * 查询字典表数据 + * + * @param type 字典表 数据类型 + * @return 字典数据结果集合 + */ + @GetMapping("/list/{type}") + @ApiOperation("根据表类型,字典表集合查询") + @ResponseBody + public Result queryDictList(@PathVariable String type) { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.eq("type", type); + List+ * 系统字典表 + *
+ * + * @author WangZiYang + * @since 2020-03-23 + */ +public class SpSysDictDto extends SpSysDict { + + +} diff --git a/mes/src/main/java/com/wangziyang/mes/basedata/common/entity/SpSysDict.java b/mes/src/main/java/com/wangziyang/mes/basedata/common/entity/SpSysDict.java new file mode 100644 index 0000000..414e11d --- /dev/null +++ b/mes/src/main/java/com/wangziyang/mes/basedata/common/entity/SpSysDict.java @@ -0,0 +1,114 @@ +package com.wangziyang.mes.basedata.common.entity; + +import com.wangziyang.mes.common.BaseEntity; + +/** + *+ * 系统字典表 + *
+ * + * @author WangZiYang + * @since 2020-03-23 + */ +public class SpSysDict extends BaseEntity { + + private static final long serialVersionUID = 1L; + + /** + * 标签名 + */ + private String name; + + /** + * 数据值 + */ + private String value; + + /** + * 类型 + */ + private String type; + + /** + * 描述 + */ + private String descr; + + /** + * 排序(升序) + */ + private Integer sortNum; + + /** + * 父级id + */ + private String parentId; + + /** + * 逻辑删除:1 表示删除,0 表示未删除,2 表示禁用 + */ + private String isDeleted; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + public String getDescr() { + return descr; + } + + public void setDescr(String descr) { + this.descr = descr; + } + public Integer getSortNum() { + return sortNum; + } + + public void setSortNum(Integer sortNum) { + this.sortNum = sortNum; + } + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + public String getIsDeleted() { + return isDeleted; + } + + public void setIsDeleted(String isDeleted) { + this.isDeleted = isDeleted; + } + + @Override + public String toString() { + return "SpSysDict{" + + "name=" + name + + ", value=" + value + + ", type=" + type + + ", descr=" + descr + + ", sortNum=" + sortNum + + ", parentId=" + parentId + + ", isDeleted=" + isDeleted + + "}"; + } +} diff --git a/mes/src/main/java/com/wangziyang/mes/basedata/common/mapper/SpSysDictMapper.java b/mes/src/main/java/com/wangziyang/mes/basedata/common/mapper/SpSysDictMapper.java new file mode 100644 index 0000000..313ab06 --- /dev/null +++ b/mes/src/main/java/com/wangziyang/mes/basedata/common/mapper/SpSysDictMapper.java @@ -0,0 +1,16 @@ +package com.wangziyang.mes.basedata.common.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.wangziyang.mes.basedata.common.entity.SpSysDict; + +/** + *+ * 系统字典表 Mapper 接口 + *
+ * + * @author WangZiYang + * @since 2020-03-23 + */ +public interface SpSysDictMapper extends BaseMapper+ * 系统字典表 服务类 + *
+ * + * @author WangZiYang + * @since 2020-03-23 + */ +public interface ISpSysDictService extends IService+ * 系统字典表 服务实现类 + *
+ * + * @author WangZiYang + * @since 2020-03-23 + */ +@Service +public class SpSysDictServiceImpl extends ServiceImpl