From 40737671939ac5b234128c5f50c87cd45d0fc9fb Mon Sep 17 00:00:00 2001 From: sf_zhengweigang <931069949@qq.com> Date: Wed, 2 Mar 2022 17:36:18 +0800 Subject: [PATCH 1/4] 1 --- pom.xml | 14 + .../ruoyi/web/core/config/SwaggerConfig.java | 2 +- .../src/main/resources/application-druid.yml | 11 +- .../src/main/resources/application.yml | 6 +- .../static/i18n/messages_en_US.properties | 39 ++ .../static/i18n/messages_zh_CN.properties | 39 ++ .../com/ruoyi/common/constant/Constants.java | 13 + ruoyi-system/pom.xml | 35 +- .../system/controller/AttribController.java | 135 ++++++ .../controller/AttribValueController.java | 167 +++++++ .../system/controller/ClasssController.java | 161 +++++++ .../controller/CommodityController.java | 123 +++++ .../com/ruoyi/system/controller/Consumer.java | 49 ++ .../com/ruoyi/system/controller/Producer.java | 53 +++ .../system/controller/SysAppController.java | 142 ++++++ .../controller/SysAppDataController.java | 156 +++++++ .../java/com/ruoyi/system/domain/Attrib.java | 378 ++++++++++++++++ .../com/ruoyi/system/domain/AttribValue.java | 154 +++++++ .../java/com/ruoyi/system/domain/Classs.java | 424 ++++++++++++++++++ .../com/ruoyi/system/domain/ClasssAttrib.java | 26 ++ .../com/ruoyi/system/domain/Commodity.java | 266 +++++++++++ .../java/com/ruoyi/system/domain/SysApp.java | 98 ++++ .../com/ruoyi/system/domain/SysAppData.java | 280 ++++++++++++ .../com/ruoyi/system/mapper/AttribMapper.java | 63 +++ .../system/mapper/AttribValueMapper.java | 78 ++++ .../com/ruoyi/system/mapper/ClasssMapper.java | 62 +++ .../ruoyi/system/mapper/CommodityMapper.java | 62 +++ .../ruoyi/system/mapper/SysAppDataMapper.java | 63 +++ .../com/ruoyi/system/mapper/SysAppMapper.java | 68 +++ .../ruoyi/system/service/IAttribService.java | 69 +++ .../system/service/IAttribValueService.java | 77 ++++ .../ruoyi/system/service/IClasssService.java | 76 ++++ .../system/service/ICommodityService.java | 62 +++ .../service/impl/AttribServiceImpl.java | 102 +++++ .../service/impl/AttribValueServiceImpl.java | 124 +++++ .../service/impl/ClasssServiceImpl.java | 152 +++++++ .../service/impl/CommodityServiceImpl.java | 95 ++++ .../service/impl/ISysAppDataService.java | 64 +++ .../system/service/impl/ISysAppService.java | 68 +++ .../service/impl/SysAppDataServiceImpl.java | 97 ++++ .../service/impl/SysAppServiceImpl.java | 103 +++++ .../resources/mapper/system/AttribMapper.xml | 177 ++++++++ .../mapper/system/AttribValueMapper.xml | 157 +++++++ .../resources/mapper/system/ClasssMapper.xml | 195 ++++++++ .../mapper/system/CommodityMapper.xml | 136 ++++++ .../mapper/system/SysAppDataMapper.xml | 158 +++++++ .../resources/mapper/system/SysAppMapper.xml | 96 ++++ .../src/main/resources/templates/include.html | 222 +++++++++ .../resources/templates/system/app/add.html | 58 +++ .../resources/templates/system/app/app.html | 124 +++++ .../resources/templates/system/app/edit.html | 59 +++ .../templates/system/app/fuwenben.html | 21 + .../resources/templates/system/data/add.html | 146 ++++++ .../resources/templates/system/data/data.html | 224 +++++++++ .../resources/templates/system/data/edit.html | 125 ++++++ sql/ry_20220111.sql | 185 ++++++++ 56 files changed, 6329 insertions(+), 10 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/static/i18n/messages_en_US.properties create mode 100644 ruoyi-admin/src/main/resources/static/i18n/messages_zh_CN.properties create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribValueController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/ClasssController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/CommodityController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/Consumer.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/Producer.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppDataController.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Attrib.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/AttribValue.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Classs.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/ClasssAttrib.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/Commodity.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/SysApp.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/domain/SysAppData.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribValueMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClasssMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/CommodityMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppDataMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppMapper.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribValueService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/IClasssService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/ICommodityService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribServiceImpl.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribValueServiceImpl.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClasssServiceImpl.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommodityServiceImpl.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppDataService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppService.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppDataServiceImpl.java create mode 100644 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppServiceImpl.java create mode 100644 ruoyi-system/src/main/resources/mapper/system/AttribMapper.xml create mode 100644 ruoyi-system/src/main/resources/mapper/system/AttribValueMapper.xml create mode 100644 ruoyi-system/src/main/resources/mapper/system/ClasssMapper.xml create mode 100644 ruoyi-system/src/main/resources/mapper/system/CommodityMapper.xml create mode 100644 ruoyi-system/src/main/resources/mapper/system/SysAppDataMapper.xml create mode 100644 ruoyi-system/src/main/resources/mapper/system/SysAppMapper.xml create mode 100644 ruoyi-system/src/main/resources/templates/include.html create mode 100644 ruoyi-system/src/main/resources/templates/system/app/add.html create mode 100644 ruoyi-system/src/main/resources/templates/system/app/app.html create mode 100644 ruoyi-system/src/main/resources/templates/system/app/edit.html create mode 100644 ruoyi-system/src/main/resources/templates/system/app/fuwenben.html create mode 100644 ruoyi-system/src/main/resources/templates/system/data/add.html create mode 100644 ruoyi-system/src/main/resources/templates/system/data/data.html create mode 100644 ruoyi-system/src/main/resources/templates/system/data/edit.html create mode 100644 sql/ry_20220111.sql diff --git a/pom.xml b/pom.xml index 1985232fb..e5c5df597 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,8 @@ 1.4 4.1.2 2.3 + 2.17.1 + 19.3.0.0 @@ -177,6 +179,18 @@ ${fastjson.version} + + + org.apache.logging.log4j + log4j-api + ${log4j2.version} + + + org.apache.logging.log4j + log4j-to-slf4j + ${log4j2.version} + + com.ruoyi diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java index 0cfbfbadb..b06471621 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java @@ -55,7 +55,7 @@ public class SwaggerConfig // 用ApiInfoBuilder进行定制 return new ApiInfoBuilder() // 设置标题 - .title("标题:若依管理系统_接口文档") + .title("标题:管理系统_接口文档") // 描述 .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") // 作者信息 diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 3c46fd50b..be483db5b 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -8,14 +8,15 @@ spring: master: url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: password + password: 123456 # 从库数据源 slave: # 从数据源开关/默认关闭 - enabled: false - url: - username: - password: + enabled: true + url: jdbc:oracle:thin:@10.71.16.243:1521/ERM + username: ERM_CC7_M1 + password: Welcome1 + driverClassName: oracle.jdbc.driver.OracleDriver # 初始连接数 initialSize: 5 # 最小连接池数量 diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 9ba3704e9..fc8d89abf 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -11,7 +11,7 @@ ruoyi: # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) profile: D:/ruoyi/uploadPath # 获取ip地址开关 - addressEnabled: false + addressEnabled: true # 开发环境配置 server: @@ -98,7 +98,7 @@ shiro: # 首页地址 indexUrl: /index # 验证码开关 - captchaEnabled: true + captchaEnabled: false # 验证码类型 math 数组计算 char 字符 captchaType: math cookie: @@ -111,7 +111,7 @@ shiro: # 设置Cookie的过期时间,天为单位 maxAge: 30 # 设置密钥,务必保持唯一性(生成方式,直接拷贝到main运行即可)Base64.encodeToString(CipherUtils.generateNewKey(128, "AES").getEncoded()) (默认启动生成随机秘钥,随机秘钥会导致之前客户端RememberMe Cookie无效,如设置固定秘钥RememberMe Cookie则有效) - cipherKey: + cipherKey: hA2mylRlEwPo9bH4kdP62w== session: # Session超时时间,-1代表永不过期(默认30分钟) expireTime: 30 diff --git a/ruoyi-admin/src/main/resources/static/i18n/messages_en_US.properties b/ruoyi-admin/src/main/resources/static/i18n/messages_en_US.properties new file mode 100644 index 000000000..e58406dab --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/i18n/messages_en_US.properties @@ -0,0 +1,39 @@ +#错误消息 +not.null=* 必须填写 +user.jcaptcha.error=验证码错误 +user.not.exists=用户不存在/密码错误 +user.password.not.match=用户不存在/密码错误 +user.password.retry.limit.count=密码输入错误{0}次 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟 +user.password.delete=对不起,您的账号已被删除 +user.blocked=用户已封禁,请联系管理员 +role.blocked=角色已封禁,请联系管理员 +user.logout.success=退出成功 + +length.not.valid=长度必须在{min}到{max}个字符之间 + +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 +user.password.not.valid=* 5-50个字符 + +user.email.not.valid=邮箱格式错误 +user.mobile.phone.number.not.valid=手机号格式错误 +user.login.success=登录成功 +user.register.success=注册成功 +user.notfound=请重新登录 +user.forcelogout=管理员强制退出,请重新登录 +user.unknown.error=未知错误,请重新登录 + +##文件上传消息 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! +upload.filename.exceed.length=上传的文件名最长{0}个字符 + +##权限 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] +login.username=username +login.password=password +login.login=login \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/i18n/messages_zh_CN.properties b/ruoyi-admin/src/main/resources/static/i18n/messages_zh_CN.properties new file mode 100644 index 000000000..210b510dc --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/i18n/messages_zh_CN.properties @@ -0,0 +1,39 @@ +#错误消息 +not.null=* 必须填写 +user.jcaptcha.error=验证码错误 +user.not.exists=用户不存在/密码错误 +user.password.not.match=用户不存在/密码错误 +user.password.retry.limit.count=密码输入错误{0}次 +user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟 +user.password.delete=对不起,您的账号已被删除 +user.blocked=用户已封禁,请联系管理员 +role.blocked=角色已封禁,请联系管理员 +user.logout.success=退出成功 + +length.not.valid=长度必须在{min}到{max}个字符之间 + +user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 +user.password.not.valid=* 5-50个字符 + +user.email.not.valid=邮箱格式错误 +user.mobile.phone.number.not.valid=手机号格式错误 +user.login.success=登录成功 +user.register.success=注册成功 +user.notfound=请重新登录 +user.forcelogout=管理员强制退出,请重新登录 +user.unknown.error=未知错误,请重新登录 + +##文件上传消息 +upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! +upload.filename.exceed.length=上传的文件名最长{0}个字符 + +##权限 +no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] +no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] +no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] +no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] +no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] +no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] +login.username=用户名 +login.password=密码 +login.login=登陆 \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java index 1595aa021..16c32b6af 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java @@ -112,4 +112,17 @@ public class Constants */ public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", "org.springframework", "org.apache", "com.ruoyi.common.utils.file" }; + /** + * ERM物料分类 + */ + public static final String WLFL = "http://10.71.16.233:3721/wsp/ythclglxt/wlfl"; + /** + * ERM物料CC编码 + */ + public static final String WLCCBM = "http://10.71.16.233:3721/wsp/ythclglxt/wlccbm"; + /** + * ERM物料ID编码 + */ + public static final String WLIDBM = "http://10.71.16.233:3721/wsp/ythclglxt/wlidbm"; + } \ No newline at end of file diff --git a/ruoyi-system/pom.xml b/ruoyi-system/pom.xml index 044541b0e..0aa02c465 100644 --- a/ruoyi-system/pom.xml +++ b/ruoyi-system/pom.xml @@ -16,12 +16,45 @@ - + + org.apache.kafka + kafka_2.11 + 1.0.1 + + + org.apache.kafka + kafka-clients + 1.0.1 + + + + com.oracle + ojdbc8 + ${oracle.version} + com.ruoyi ruoyi-common + + io.swagger + swagger-annotations + 1.6.2 + compile + + + io.swagger + swagger-annotations + 1.6.2 + compile + + + io.swagger + swagger-annotations + 1.6.2 + compile + diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java new file mode 100644 index 000000000..e5ad860dd --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java @@ -0,0 +1,135 @@ +package com.ruoyi.system.controller; + +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.system.domain.Attrib; +import com.ruoyi.system.service.IAttribService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 属性Controller + * + * @author ruoyi + * @date 2021-09-02 + */ +@Controller +@RequestMapping("/system/attrib") +public class AttribController extends BaseController +{ + private String prefix = "system/attrib"; + + @Autowired + private IAttribService attribService; + + @RequiresPermissions("system:attrib:view") + @GetMapping() + public String attrib() + { + return prefix + "/attrib"; + } + + /** + * 查询属性列表 + */ + @RequiresPermissions("system:attrib:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(Attrib attrib) + { + startPage(); + List list = attribService.selectAttribList(attrib); + return getDataTable(list); + } + + /** + * 导出属性列表 + */ + @RequiresPermissions("system:attrib:export") + @Log(title = "属性", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(Attrib attrib) + { + List list = attribService.selectAttribList(attrib); + ExcelUtil util = new ExcelUtil(Attrib.class); + return util.exportExcel(list, "属性数据"); + } + + /** + * 新增属性 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存属性 + */ + @RequiresPermissions("system:attrib:add") + @Log(title = "属性", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(Attrib attrib) + { + return toAjax(attribService.insertAttrib(attrib)); + } + + /** + * 修改属性 + */ + @GetMapping("/edit/{attribNo}") + public String edit(@PathVariable("attribNo") Long attribNo, ModelMap mmap) + { + Attrib attrib = attribService.selectAttribByAttribNo(attribNo); + mmap.put("attrib", attrib); + return prefix + "/edit"; + } + + /** + * 修改保存属性 + */ + @RequiresPermissions("system:attrib:edit") + @Log(title = "属性", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(Attrib attrib) + { + return toAjax(attribService.updateAttrib(attrib)); + } + + /** + * 删除属性 + */ + @RequiresPermissions("system:attrib:remove") + @Log(title = "属性", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(attribService.deleteAttribByAttribNos(ids)); + } + /** + * 根据材料分类获取属性 + */ + @Log(title = "根据材料分类获取属性") + @PostMapping( "/selectAttribListByClasss/{classsId}") + @ResponseBody + public AjaxResult selectAttribListByClasss(@PathVariable("classsId") Long classsId) + { + AjaxResult ajax = new AjaxResult(); + ajax.put("data", attribService.selectAttribListByClasss(classsId)); + return ajax; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribValueController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribValueController.java new file mode 100644 index 000000000..dcc224614 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribValueController.java @@ -0,0 +1,167 @@ +package com.ruoyi.system.controller; + +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.system.domain.AttribValue; +import com.ruoyi.system.service.IAttribValueService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Table containing ATTRIB_VALUEController + * + * @author ruoyi + * @date 2021-09-02 + */ +@Api(tags ={"属性值查询"} ) +@Controller +@RequestMapping("/system/value") +public class AttribValueController extends BaseController +{ + private String prefix = "system/value"; + + @Autowired + private IAttribValueService attribValueService; + + @RequiresPermissions("system:value:view") + @GetMapping() + public String value() + { + return prefix + "/value"; + } + + /** + * 查询Table containing ATTRIB_VALUE列表 + */ + @RequiresPermissions("system:value:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(AttribValue attribValue) + { + startPage(); + List list = attribValueService.selectAttribValueList(attribValue); + return getDataTable(list); + } + + /** + * 导出Table containing ATTRIB_VALUE列表 + */ + @RequiresPermissions("system:value:export") + @Log(title = "Table containing ATTRIB_VALUE", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(AttribValue attribValue) + { + List list = attribValueService.selectAttribValueList(attribValue); + ExcelUtil util = new ExcelUtil(AttribValue.class); + return util.exportExcel(list, "Table containing ATTRIB_VALUE数据"); + } + + /** + * 新增Table containing ATTRIB_VALUE + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存Table containing ATTRIB_VALUE + */ + @RequiresPermissions("system:value:add") + @Log(title = "Table containing ATTRIB_VALUE", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(AttribValue attribValue) + { + return toAjax(attribValueService.insertAttribValue(attribValue)); + } + + /** + * 修改Table containing ATTRIB_VALUE + */ + @GetMapping("/edit/{attribValueNo}") + public String edit(@PathVariable("attribValueNo") Long attribValueNo, ModelMap mmap) + { + AttribValue attribValue = attribValueService.selectAttribValueByAttribValueNo(attribValueNo); + mmap.put("attribValue", attribValue); + return prefix + "/edit"; + } + + /** + * 修改保存Table containing ATTRIB_VALUE + */ + @RequiresPermissions("system:value:edit") + @Log(title = "Table containing ATTRIB_VALUE", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(AttribValue attribValue) + { + return toAjax(attribValueService.updateAttribValue(attribValue)); + } + + /** + * 删除Table containing ATTRIB_VALUE + */ + @RequiresPermissions("system:value:remove") + @Log(title = "Table containing ATTRIB_VALUE", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(attribValueService.deleteAttribValueByAttribValueNos(ids)); + } + /** + * 根据属性获取属性值 + */ + @Log(title = "根据属性获取属性值") + @PostMapping( "/selectByAttrib/{attribId}") + @ResponseBody + public AjaxResult selectByAttrib(@PathVariable("attribId") Long attribId) + { + AjaxResult ajax = new AjaxResult(); + ajax.put("data", attribValueService.selectByAttrib(attribId)); + return ajax; + } + /** + * 根据分类获取描述规则 + */ +@ApiOperation("根据分类ID获取描述规则") + + @Log(title = "根据分类ID获取描述规则") + @PostMapping( "/selectPropertyFormulaByTypeId/{typeId}") + @ResponseBody + public AjaxResult selectPropertyFormulaByTypeId(@ApiParam@PathVariable("typeId") Long typeId) + { + AjaxResult ajax = new AjaxResult(); + ajax.put("data", attribValueService.selectPropertyFormulaByTypeId(typeId)); + return ajax; + } + /** + * 根据分类和描述获取描述规则 + */ +@ApiOperation("根据分类和描述获取描述规则") + + @Log(title = "根据分类和描述获取描述规则") + @PostMapping( "/selectPropertyFormulaByTypeAndProperty/{class_no},{entity_property_no}") + @ResponseBody + public AjaxResult selectPropertyFormulaByTypeId(@ApiParam@PathVariable("class_no") Long class_no,@ApiParam@PathVariable("entity_property_no") Long entity_property_no) + { + AjaxResult ajax = new AjaxResult(); + ajax.put("data", attribValueService.selectPropertyFormulaByTypeAndProperty(class_no,entity_property_no)); + return ajax; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/ClasssController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/ClasssController.java new file mode 100644 index 000000000..c3b4420c2 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/ClasssController.java @@ -0,0 +1,161 @@ +package com.ruoyi.system.controller; + +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.domain.Ztree; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.system.domain.Classs; +import com.ruoyi.system.service.IClasssService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * Table containing Class HierarchyController + * + * @author zbj + * @date 2021-08-31 + */ +@Controller +@RequestMapping("/system/class") +public class ClasssController extends BaseController +{ + private String prefix = "system/class"; + + @Autowired + private IClasssService classsService; + + @RequiresPermissions("system:class:view") + @GetMapping() + public String classs() + { + return prefix + "/class"; + } + + /** + * 查询Table containing Class Hierarchy树列表 + */ + @RequiresPermissions("system:class:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(Classs classs) + { + startPage(); + List list = classsService.selectClasssList(classs); + return getDataTable(list); + } + + /** + * 导出Table containing Class Hierarchy列表 + */ + @RequiresPermissions("system:class:export") + @Log(title = "Table containing Class Hierarchy", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(Classs classs) + { + List list = classsService.selectClasssList(classs); + ExcelUtil util = new ExcelUtil(Classs.class); + return util.exportExcel(list, "Table containing Class Hierarchy数据"); + } + + /** + * 新增Table containing Class Hierarchy + */ + @GetMapping(value = { "/add/{classNo}", "/add/" }) + public String add(@PathVariable(value = "classNo", required = false) Long classNo, ModelMap mmap) + { + if (StringUtils.isNotNull(classNo)) + { + mmap.put("classs", classsService.selectClasssByClassNo(classNo)); + } + return prefix + "/add"; + } + + /** + * 新增保存Table containing Class Hierarchy + */ + @RequiresPermissions("system:class:add") + @Log(title = "Table containing Class Hierarchy", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(Classs classs) + { + return toAjax(classsService.insertClasss(classs)); + } + + /** + * 修改Table containing Class Hierarchy + */ + @GetMapping("/edit/{classNo}") + public String edit(@PathVariable("classNo") Long classNo, ModelMap mmap) + { + Classs classs = classsService.selectClasssByClassNo(classNo); + mmap.put("classs", classs); + return prefix + "/edit"; + } + + /** + * 修改保存Table containing Class Hierarchy + */ + @RequiresPermissions("system:class:edit") + @Log(title = "Table containing Class Hierarchy", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(Classs classs) + { + return toAjax(classsService.updateClasss(classs)); + } + + /** + * 删除 + */ + @RequiresPermissions("system:class:remove") + @Log(title = "Table containing Class Hierarchy", businessType = BusinessType.DELETE) + @GetMapping("/remove/{classNo}") + @ResponseBody + public AjaxResult remove(@PathVariable("classNo") Long classNo) + { + return toAjax(classsService.deleteClasssByClassNo(classNo)); + } + + public static void main(String[] args) { + if(true){ + + } + System.out.println(1); + + System.out.println(2); + } + /** + * 选择Table containing Class Hierarchy树 + */ + @GetMapping(value = { "/selectClassTree/{classNo}", "/selectClassTree/" }) + public String selectClassTree(@PathVariable(value = "classNo", required = false) Long classNo, ModelMap mmap) + { + if (StringUtils.isNotNull(classNo)) + { + mmap.put("classs", classsService.selectClasssByClassNo(classNo)); + } + return prefix + "/tree"; + } + + /** + * 加载物料分类树列表 + */ + @GetMapping("/treeData") + @ResponseBody + public List treeData() + { + List ztrees = classsService.selectClasssTree(); + return ztrees; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/CommodityController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/CommodityController.java new file mode 100644 index 000000000..41b2c670b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/CommodityController.java @@ -0,0 +1,123 @@ +package com.ruoyi.system.controller; + +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.system.domain.Commodity; +import com.ruoyi.system.service.ICommodityService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * CC码Controller + * + * @author ruoyi + * @date 2021-09-02 + */ +@Controller +@RequestMapping("/system/commodity") +public class CommodityController extends BaseController +{ + private String prefix = "system/commodity"; + + @Autowired + private ICommodityService commodityService; + + @RequiresPermissions("system:commodity:view") + @GetMapping() + public String commodity() + { + return prefix + "/commodity"; + } + + /** + * 查询CC码列表 + */ + @RequiresPermissions("system:commodity:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(Commodity commodity) + { + startPage(); + List list = commodityService.selectCommodityList(commodity); + return getDataTable(list); + } + + /** + * 导出CC码列表 + */ + @RequiresPermissions("system:commodity:export") + @Log(title = "CC码", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(Commodity commodity) + { + List list = commodityService.selectCommodityList(commodity); + ExcelUtil util = new ExcelUtil(Commodity.class); + return util.exportExcel(list, "CC码数据"); + } + + /** + * 新增CC码 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存CC码 + */ + @RequiresPermissions("system:commodity:add") + @Log(title = "CC码", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(Commodity commodity) + { + return toAjax(commodityService.insertCommodity(commodity)); + } + + /** + * 修改CC码 + */ + @GetMapping("/edit/{commodityNo}") + public String edit(@PathVariable("commodityNo") Long commodityNo, ModelMap mmap) + { + Commodity commodity = commodityService.selectCommodityByCommodityNo(commodityNo); + mmap.put("commodity", commodity); + return prefix + "/edit"; + } + + /** + * 修改保存CC码 + */ + @RequiresPermissions("system:commodity:edit") + @Log(title = "CC码", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(Commodity commodity) + { + return toAjax(commodityService.updateCommodity(commodity)); + } + + /** + * 删除CC码 + */ + @RequiresPermissions("system:commodity:remove") + @Log(title = "CC码", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(commodityService.deleteCommodityByCommodityNos(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/Consumer.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/Consumer.java new file mode 100644 index 000000000..31f930017 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/Consumer.java @@ -0,0 +1,49 @@ +package com.ruoyi.system.controller; +import org.apache.kafka.clients.consumer.ConsumerRecord; +import org.apache.kafka.clients.consumer.ConsumerRecords; +import org.apache.kafka.clients.consumer.KafkaConsumer; + +import java.util.Arrays; +import java.util.Properties; +import java.util.logging.Logger; + +public class Consumer { + static Logger log = Logger.getLogger("Producer"); + + private static final String TOPIC = "milo2"; + private static final String BROKER_LIST = "192.168.10.158:9092"; + private static KafkaConsumer consumer = null; + + static { + Properties configs = initConfig(); + consumer = new KafkaConsumer(configs); + } + + private static Properties initConfig(){ + Properties properties = new Properties(); + properties.put("bootstrap.servers",BROKER_LIST); + properties.put("group.id","0"); + properties.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer"); + properties.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer"); + properties.setProperty("enable.auto.commit", "true"); + properties.setProperty("auto.offset.reset", "earliest"); + return properties; + } + + + public static void main(String[] args) { + consumer.subscribe(Arrays.asList("milo2")); + try { + while (true) { + ConsumerRecords records = consumer.poll(10); + for (ConsumerRecord record : records) { +// log.info(record); + System.out.println(record); + } + } + }catch (Exception e){ + System.out.println(e); + } + + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/Producer.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/Producer.java new file mode 100644 index 000000000..c6735dd83 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/Producer.java @@ -0,0 +1,53 @@ +package com.ruoyi.system.controller; + +import com.fasterxml.jackson.databind.ser.std.StringSerializer; +import org.apache.kafka.clients.producer.*; + +import java.util.Properties; + +public class Producer { + + private static final String TOPIC = "milo2"; + private static final String BROKER_LIST = "192.168.10.158:9092"; + private static KafkaProducer producer = null; + + /* + 初始化生产者 + */ + static { + Properties configs = initConfig(); + producer = new KafkaProducer(configs); + } + + /* + 初始化配置 + */ + private static Properties initConfig(){ + Properties properties = new Properties(); + properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,BROKER_LIST); + properties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class.getName()); + properties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,StringSerializer.class.getName()); + return properties; + } + + public static void main(String[] args) throws InterruptedException { + //消息实体 + ProducerRecord record = null; + for (int i = 0; i < 1000; i++) { + record = new ProducerRecord(TOPIC, "value"+(int)(10*(Math.random()))); + //发送消息 + producer.send(record, new Callback() { + @Override + public void onCompletion(RecordMetadata recordMetadata, Exception e) { + if (null != e){ +// log.info("send error" + e.getMessage()); + System.out.println(e.getMessage()); + }else { + System.out.println(String.format("offset:%s,partition:%s",recordMetadata.offset(),recordMetadata.partition())); + } + } + }); + } + producer.close(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppController.java new file mode 100644 index 000000000..d67e4b4de --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppController.java @@ -0,0 +1,142 @@ +package com.ruoyi.system.controller; + +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.system.domain.SysApp; +import com.ruoyi.system.service.impl.ISysAppDataService; +import com.ruoyi.system.service.impl.ISysAppService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 编码申请Controller + * + * @author ruoyi + * @date 2021-09-29 + */ +@Controller +@RequestMapping("/system/app") +public class SysAppController extends BaseController +{ + private String prefix = "system/app"; + @Autowired + private ISysAppDataService sysAppDataService; + @Autowired + private ISysAppService sysAppService; + + @RequiresPermissions("system:app:view") + @GetMapping() + public String app() + { + return prefix + "/app"; + } + @RequiresPermissions("system:app:view") + @GetMapping("/fuwenben") + public String fuwenben() + { + return prefix + "/fuwenben"; + } + + /** + * 查询编码申请列表 + */ + @RequiresPermissions("system:app:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysApp sysApp) + { + startPage(); + List list = sysAppService.selectSysAppList(sysApp); + return getDataTable(list); + } + + /** + * 导出编码申请列表 + */ + @RequiresPermissions("system:app:export") + @Log(title = "编码申请", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysApp sysApp) + { + List list = sysAppService.selectSysAppList(sysApp); + ExcelUtil util = new ExcelUtil(SysApp.class); + return util.exportExcel(list, "编码申请数据"); + } + + /** + * 新增编码申请 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存编码申请 + */ + @RequiresPermissions("system:app:add") + @Log(title = "编码申请", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysApp sysApp) + { + return toAjax(sysAppService.insertSysApp(sysApp)); + } + + /** + * 查询申请单详细 + */ + @RequiresPermissions("system:app:list") + @GetMapping("/detail/{appId}") + public String detail(@PathVariable("appId") Long dictId, ModelMap mmap) + { + mmap.put("app", sysAppService.selectSysAppByAppId(dictId)); + mmap.put("appList", sysAppService.selectAppAll()); + return "system/data/data"; + } + /** + * 修改编码申请 + */ + @GetMapping("/edit/{appId}") + public String edit(@PathVariable("appId") Long appId, ModelMap mmap) + { + SysApp sysApp = sysAppService.selectSysAppByAppId(appId); + mmap.put("sysApp", sysApp); + return prefix + "/edit"; + } + + /** + * 修改保存编码申请 + */ + @RequiresPermissions("system:app:edit") + @Log(title = "编码申请", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysApp sysApp) + { + return toAjax(sysAppService.updateSysApp(sysApp)); + } + + /** + * 删除编码申请 + */ + @RequiresPermissions("system:app:remove") + @Log(title = "编码申请", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysAppService.deleteSysAppByAppIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppDataController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppDataController.java new file mode 100644 index 000000000..1b3eaea33 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysAppDataController.java @@ -0,0 +1,156 @@ +package com.ruoyi.system.controller; + +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.system.domain.Classs; +import com.ruoyi.system.domain.SysAppData; +import com.ruoyi.system.service.IClasssService; +import com.ruoyi.system.service.impl.ISysAppDataService; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 编码申请数据Controller + * + * @author ruoyi + * @date 2021-09-29 + */ +@Controller +@RequestMapping("/system/data") +public class SysAppDataController extends BaseController +{ + private String prefix = "system/data"; + + @Autowired + private ISysAppDataService sysAppDataService; + @Autowired + private IClasssService classsService; + + @RequiresPermissions("system:data:view") + @GetMapping() + public String data() + { + return prefix + "/data"; + } + + /** + * 查询编码申请数据列表 + */ + @RequiresPermissions("system:data:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(SysAppData sysAppData) + { + startPage(); + List list = sysAppDataService.selectSysAppDataList(sysAppData); + return getDataTable(list); + } + + /** + * 导出编码申请数据列表 + */ + @RequiresPermissions("system:data:export") + @Log(title = "编码申请数据", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(SysAppData sysAppData) + { + List list = sysAppDataService.selectSysAppDataList(sysAppData); + ExcelUtil util = new ExcelUtil(SysAppData.class); + return util.exportExcel(list, "编码申请数据数据"); + } + + /** + * 新增编码申请数据 + */ + @GetMapping("/add") + public String add( ModelMap mmap) + { + Classs classs=new Classs(); + classs.setApprovalStatusNo(Classs.APPROVAL_APPROVED); + classs.setCatEntityTypeNo(3L); + List classList=classsService.selectClasssList( classs); + mmap.put("classList", classList); + return prefix + "/add"; + } + /** + * 查询ERM中已经发布的分类 + */ + @PostMapping("/getClasss") + @ResponseBody + public AjaxResult getClasss() + { + Classs classs=new Classs(); + classs.setApprovalStatusNo(Classs.APPROVAL_APPROVED); + List classList=classsService.selectClasssList( classs); + return AjaxResult.success(classList); + } + + /** + * 新增保存编码申请数据 + */ + @RequiresPermissions("system:data:add") + @Log(title = "编码申请数据", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(SysAppData sysAppData) + { + return toAjax(sysAppDataService.insertSysAppData(sysAppData)); + } + + /** + * 修改编码申请数据 + */ + @GetMapping("/edit/{appDataId}") + public String edit(@PathVariable("appDataId") Long appDataId, ModelMap mmap) + { + SysAppData sysAppData = sysAppDataService.selectSysAppDataByAppDataId(appDataId); + mmap.put("sysAppData", sysAppData); + return prefix + "/edit"; + } + + /** + * 修改保存编码申请数据 + */ + @RequiresPermissions("system:data:edit") + @Log(title = "编码申请数据", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(SysAppData sysAppData) + { + return toAjax(sysAppDataService.updateSysAppData(sysAppData)); + } + + /** + * 删除编码申请数据 + */ + @RequiresPermissions("system:data:remove") + @Log(title = "编码申请数据", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(sysAppDataService.deleteSysAppDataByAppDataIds(ids)); + } + /** + * 获取已审批的材料分类 + */ + @Log(title = "获取已审批的材料分类") + @PostMapping( "/selectApprovalClasss") + @ResponseBody + public AjaxResult selectApprovalClasss() + { + AjaxResult ajax = new AjaxResult(); + ajax.put("data", classsService.selectApprovalClasss()); + return ajax; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Attrib.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Attrib.java new file mode 100644 index 000000000..99c04ec20 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Attrib.java @@ -0,0 +1,378 @@ +package com.ruoyi.system.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import com.ruoyi.common.utils.security.CipherUtils; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.apache.shiro.codec.Base64; + +import java.util.Date; + +/** + * 属性对象 attrib + * + * @author ruoyi + * @date 2021-09-02 + */ +public class Attrib extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** Internal ATTRIB number */ + private Long attribNo; + + /** External ATTRIB number */ + @Excel(name = "External ATTRIB number") + private String attribId; + + /** System id of catalogue */ + @Excel(name = "System id of catalogue") + private Long catalogNo; + + private Long classNo; + + /** Optionally identifies a calculation parameter to be fed by this attribute */ + @Excel(name = "Optionally identifies a calculation parameter to be fed by this attribute") + private String calcParam; + + /** The type (heading) for the physical value. E.g. "mm OD" */ + @Excel(name = "The type (heading) for the physical value. E.g. ") + private String physicalValueType; + + /** The unit of measure for the physical values for this attribute type - e.g. for bolt diameters this would be length in mm */ + @Excel(name = "The unit of measure for the physical values for this attribute type - e.g. for bolt diameters this would be length in mm") + private String physicalValueUnitId; + + /** Description of the attribute type */ + @Excel(name = "Description of the attribute type") + private String descr; + + /** Whether the value of this attribute can be defined against a Commodity (1 = can, 0 = cannot) */ + @Excel(name = "Whether the value of this attribute can be defined against a Commodity (1 = can, 0 = cannot)") + private String commodityLevel; + + /** Whether the value of this attribute can be defined against a Size Reference (1 = can, 0 = cannot). */ + @Excel(name = "Whether the value of this attribute can be defined against a Size Reference (1 = can, 0 = cannot).") + private String sizeRefLevel; + + /** Whether the value of this attribute can be defined against a Part (component (1 = can, 0 = cannot). */ + @Excel(name = "Whether the value of this attribute can be defined against a Part (component (1 = can, 0 = cannot).") + private String partLevel; + + /** Whether the value of this attribute can be defined against a Modeller (component (1 = can, 0 = cannot). */ + @Excel(name = "Whether the value of this attribute can be defined against a Modeller (component (1 = can, 0 = cannot).") + private String modellerLevel; + + /** Defined scope of the attribute type (0 = Internal, 1 = External). */ + @Excel(name = "Defined scope of the attribute type (0 = Internal, 1 = External).") + private Long defScope; + + /** Whether this attribute type is obsolete. (1 = Active, 0 = Obsolete) */ + @Excel(name = "Whether this attribute type is obsolete. (1 = Active, 0 = Obsolete)") + private String stat; + + /** The category of attribute */ + @Excel(name = "The category of attribute") + private Long attribCategoryNo; + + /** System id of discipline. */ + @Excel(name = "System id of discipline.") + private Long drawDisciplineNo; + + /** Initials for person defining the position */ + @Excel(name = "Initials for person defining the position") + private String defUsrId; + + /** Definition date */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Definition date", width = 30, dateFormat = "yyyy-MM-dd") + private Date defDate; + + /** Defining application of row */ + @Excel(name = "Defining application of row") + private Long defApplNo; + + /** Initials for person latest updating the position */ + @Excel(name = "Initials for person latest updating the position") + private String updUsrId; + + /** Latest update date */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Latest update date", width = 30, dateFormat = "yyyy-MM-dd") + private Date updDate; + + /** Last updating application of row */ + @Excel(name = "Last updating application of row") + private Long updApplNo; + + /** Weighting to be applied for this attribute when matching to alternative parts (10=LOW, 20=MEDIUM, 30=HIGH) */ + @Excel(name = "Weighting to be applied for this attribute when matching to alternative parts (10=LOW, 20=MEDIUM, 30=HIGH)") + private Long matchWeightingNo; + + /** If attribute is system attribute. */ + @Excel(name = "If attribute is system attribute.") + private String isSystem; + private String class_attrib_id; + + public void setAttribNo(Long attribNo) + { + this.attribNo = attribNo; + } + + public Long getAttribNo() + { + return attribNo; + } + public void setAttribId(String attribId) + { + this.attribId = attribId; + } + + public String getAttribId() + { + return attribId; + } + public void setCatalogNo(Long catalogNo) + { + this.catalogNo = catalogNo; + } + + public Long getCatalogNo() + { + return catalogNo; + } + public void setCalcParam(String calcParam) + { + this.calcParam = calcParam; + } + + public String getCalcParam() + { + return calcParam; + } + public void setPhysicalValueType(String physicalValueType) + { + this.physicalValueType = physicalValueType; + } + + public String getPhysicalValueType() + { + return physicalValueType; + } + public void setPhysicalValueUnitId(String physicalValueUnitId) + { + this.physicalValueUnitId = physicalValueUnitId; + } + + public String getPhysicalValueUnitId() + { + return physicalValueUnitId; + } + public void setDescr(String descr) + { + this.descr = descr; + } + + public String getDescr() + { + return descr; + } + public void setCommodityLevel(String commodityLevel) + { + this.commodityLevel = commodityLevel; + } + + public String getCommodityLevel() + { + return commodityLevel; + } + public void setSizeRefLevel(String sizeRefLevel) + { + this.sizeRefLevel = sizeRefLevel; + } + + public String getClass_attrib_id() { + return class_attrib_id; + } + + public void setClass_attrib_id(String class_attrib_id) { + this.class_attrib_id = class_attrib_id; + } + + public String getSizeRefLevel() + { + return sizeRefLevel; + } + public void setPartLevel(String partLevel) + { + this.partLevel = partLevel; + } + + public String getPartLevel() + { + return partLevel; + } + public void setModellerLevel(String modellerLevel) + { + this.modellerLevel = modellerLevel; + } + + public String getModellerLevel() + { + return modellerLevel; + } + public void setDefScope(Long defScope) + { + this.defScope = defScope; + } + + public Long getDefScope() + { + return defScope; + } + public void setStat(String stat) + { + this.stat = stat; + } + + public String getStat() + { + return stat; + } + public Long getClassNo() + { + return classNo; + } + public void setAttribCategoryNo(Long attribCategoryNo) + { + this.attribCategoryNo = attribCategoryNo; + } + + public Long getAttribCategoryNo() + { + return attribCategoryNo; + } + public void setDrawDisciplineNo(Long drawDisciplineNo) + { + this.drawDisciplineNo = drawDisciplineNo; + } + + public Long getDrawDisciplineNo() + { + return drawDisciplineNo; + } + public void setDefUsrId(String defUsrId) + { + this.defUsrId = defUsrId; + } + + public String getDefUsrId() + { + return defUsrId; + } + public void setDefDate(Date defDate) + { + this.defDate = defDate; + } + + public Date getDefDate() + { + return defDate; + } + public void setDefApplNo(Long defApplNo) + { + this.defApplNo = defApplNo; + } + + public Long getDefApplNo() + { + return defApplNo; + } + public void setUpdUsrId(String updUsrId) + { + this.updUsrId = updUsrId; + } + + public String getUpdUsrId() + { + return updUsrId; + } + public void setUpdDate(Date updDate) + { + this.updDate = updDate; + } + + public Date getUpdDate() + { + return updDate; + } + public void setUpdApplNo(Long updApplNo) + { + this.updApplNo = updApplNo; + } + + public Long getUpdApplNo() + { + return updApplNo; + } + public void setMatchWeightingNo(Long matchWeightingNo) + { + this.matchWeightingNo = matchWeightingNo; + } + + public void setClassNo(Long classNo) { + this.classNo = classNo; + } + + public Long getMatchWeightingNo() + { + return matchWeightingNo; + } + public void setIsSystem(String isSystem) + { + this.isSystem = isSystem; + } + + public String getIsSystem() + { + return isSystem; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("attribNo", getAttribNo()) + .append("attribId", getAttribId()) + .append("catalogNo", getCatalogNo()) + .append("calcParam", getCalcParam()) + .append("physicalValueType", getPhysicalValueType()) + .append("physicalValueUnitId", getPhysicalValueUnitId()) + .append("descr", getDescr()) + .append("commodityLevel", getCommodityLevel()) + .append("sizeRefLevel", getSizeRefLevel()) + .append("partLevel", getPartLevel()) + .append("modellerLevel", getModellerLevel()) + .append("defScope", getDefScope()) + .append("stat", getStat()) + .append("classNo", getClassNo()) + .append("attribCategoryNo", getAttribCategoryNo()) + .append("drawDisciplineNo", getDrawDisciplineNo()) + .append("defUsrId", getDefUsrId()) + .append("defDate", getDefDate()) + .append("defApplNo", getDefApplNo()) + .append("updUsrId", getUpdUsrId()) + .append("updDate", getUpdDate()) + .append("updApplNo", getUpdApplNo()) + .append("matchWeightingNo", getMatchWeightingNo()) + .append("isSystem", getIsSystem()) + .append("class_attrib_id", getClass_attrib_id()) + .toString(); + } + + public static void main(String[] args) { + String aes = Base64.encodeToString(CipherUtils.generateNewKey(128, "AES").getEncoded()); + System.out.println(aes); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/AttribValue.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/AttribValue.java new file mode 100644 index 000000000..18765d187 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/AttribValue.java @@ -0,0 +1,154 @@ +package com.ruoyi.system.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * Table containing ATTRIB_VALUE对象 attrib_value + * + * @author ruoyi + * @date 2021-09-02 + */ +public class AttribValue extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** Internal ATTRIB_VALUE number */ + private Long attribValueNo; + + /** Actual attribute value */ + @Excel(name = "Actual attribute value") + private String valueText; + + /** System id of catalogue */ + @Excel(name = "System id of catalogue") + private Long catalogNo; + + /** System id for the set of equivalent values to which this value belongs */ + @Excel(name = "System id for the set of equivalent values to which this value belongs") + private Long attribEquivSetNo; + + /** System id for the representation in which this value is being specified */ + @Excel(name = "System id for the representation in which this value is being specified") + private Long attribRepresentNo; + + /** Initials for person defining the position */ + @Excel(name = "Initials for person defining the position") + private String defUsrId; + + /** Definition date */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Definition date", width = 30, dateFormat = "yyyy-MM-dd") + private Date defDate; + + /** Initials for person latest updating the position */ + @Excel(name = "Initials for person latest updating the position") + private String updUsrId; + + /** Latest update date */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Latest update date", width = 30, dateFormat = "yyyy-MM-dd") + private Date updDate; + + public void setAttribValueNo(Long attribValueNo) + { + this.attribValueNo = attribValueNo; + } + + public Long getAttribValueNo() + { + return attribValueNo; + } + public void setValueText(String valueText) + { + this.valueText = valueText; + } + + public String getValueText() + { + return valueText; + } + public void setCatalogNo(Long catalogNo) + { + this.catalogNo = catalogNo; + } + + public Long getCatalogNo() + { + return catalogNo; + } + public void setAttribEquivSetNo(Long attribEquivSetNo) + { + this.attribEquivSetNo = attribEquivSetNo; + } + + public Long getAttribEquivSetNo() + { + return attribEquivSetNo; + } + public void setAttribRepresentNo(Long attribRepresentNo) + { + this.attribRepresentNo = attribRepresentNo; + } + + public Long getAttribRepresentNo() + { + return attribRepresentNo; + } + public void setDefUsrId(String defUsrId) + { + this.defUsrId = defUsrId; + } + + public String getDefUsrId() + { + return defUsrId; + } + public void setDefDate(Date defDate) + { + this.defDate = defDate; + } + + public Date getDefDate() + { + return defDate; + } + public void setUpdUsrId(String updUsrId) + { + this.updUsrId = updUsrId; + } + + public String getUpdUsrId() + { + return updUsrId; + } + public void setUpdDate(Date updDate) + { + this.updDate = updDate; + } + + public Date getUpdDate() + { + return updDate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("attribValueNo", getAttribValueNo()) + .append("valueText", getValueText()) + .append("catalogNo", getCatalogNo()) + .append("attribEquivSetNo", getAttribEquivSetNo()) + .append("attribRepresentNo", getAttribRepresentNo()) + .append("defUsrId", getDefUsrId()) + .append("defDate", getDefDate()) + .append("updUsrId", getUpdUsrId()) + .append("updDate", getUpdDate()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Classs.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Classs.java new file mode 100644 index 000000000..21a46e3c2 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Classs.java @@ -0,0 +1,424 @@ +package com.ruoyi.system.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.TreeEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * Table containing Class Hierarchy对象 class + * + * @author zbj + * @date 2021-08-31 + */ +public class Classs extends TreeEntity +{ + private static final long serialVersionUID = 1L; + /** + * 1 = Working, 2 = Approved + * */ + public static final long APPROVAL_APPROVED = 2L; + + /** Unique internal identifier for class in class hierarchy. */ + private Long classNo; + + /** Name of class. */ + @Excel(name = "Name of class.") + private String classId; + + /** System id of catalogue. */ + @Excel(name = "System id of catalogue.") + private Long catalogNo; + + /** Sequence number of the class within parent class, or the top level if there is no parent. */ + @Excel(name = "Sequence number of the class within parent class, or the top level if there is no parent.") + private Long seqNo; + + /** Description of class. */ + @Excel(name = "Description of class.") + private String descr; + + /** Indicates valid entries (1 = Active, 0 = Obsolete). */ + @Excel(name = "Indicates valid entries (1 = Active, 0 = Obsolete).") + private String stat; + + /** Class approval status. (1 = Working, 2 = Approved) */ + @Excel(name = "Class approval status. (1 = Working, 2 = Approved)") + private Long approvalStatusNo; + + /** Specifies the parent (if any) for a class. A null value indicates a top level class. */ + @Excel(name = "Specifies the parent (if any) for a class. A null value indicates a top level class.") + private Long parentClassNo; + + /** System id of discipline. */ + @Excel(name = "System id of discipline.") + private Long drawDisciplineNo; + + /** The ultimate type of catalogue entity generated from this class. (1 = Commodity, 2 = Size Reference Format, 3 = Basic Component Type, 4 = Commodity Code Format, 5 = Part Number Format, 6 = CATREF Format, 7 = SPREF Format, 8 = STYP Format, 9 = CMPREF Format, 10 = BLTREF Format, 11 = Compound Component Type, 12 = Sub Commodity code). */ + @Excel(name = "The ultimate type of catalogue entity generated from this class. (1 = Commodity, 2 = Size Reference Format, 3 = Basic Component Type, 4 = Commodity Code Format, 5 = Part Number Format, 6 = CATREF Format, 7 = SPREF Format, 8 = STYP Format, 9 = CMPREF Format, 10 = BLTREF Format, 11 = Compound Component Type, 12 = Sub Commodity code).") + private Long catEntityTypeNo; + + /** Whether this class can be instantiated. (1 = Can instantiate, 0 = Cannot instantiate). */ + @Excel(name = "Whether this class can be instantiated. (1 = Can instantiate, 0 = Cannot instantiate).") + private String canInstantiate; + + /** Default branch code to be used for this type of component in branch tables. */ + @Excel(name = "Default branch code to be used for this type of component in branch tables.") + private String branchCode; + + /** Whether this class is internal or external (0 = Internal, 1 = External). */ + @Excel(name = "Whether this class is internal or external (0 = Internal, 1 = External).") + private Long defScopeNo; + + /** Whether bolts required. (1 - Required, 0 = Not required). */ + @Excel(name = "Whether bolts required. (1 - Required, 0 = Not required).") + private String boltsRequired; + + /** Which size to use for the BLTREF FirstSize = 1 SecondSize = 4 ThirdSize = 5. Null is assumed to be the FirstSize */ + @Excel(name = "Which size to use for the BLTREF FirstSize = 1 SecondSize = 4 ThirdSize = 5. Null is assumed to be the FirstSize") + private Long boltAtSizeNo; + + /** System id of the spec short code. */ + @Excel(name = "System id of the spec short code.") + private Long specShortCodeNo; + + /** The category of component (1 = PIPE, 2 = BOLTS, 3 = BOLTITEMS, 4 = INSUL). */ + @Excel(name = "The category of component (1 = PIPE, 2 = BOLTS, 3 = BOLTITEMS, 4 = INSUL).") + private Long compCategoryNo; + + /** Default spec component group for this Component Type. */ + @Excel(name = "Default spec component group for this Component Type.") + private Long specCompGroupNo; + + /** Unit of class. */ + @Excel(name = "Unit of class.") + private String unitId; + + /** The commodity code prefix for this component type */ + @Excel(name = "The commodity code prefix for this component type") + private String commodityCodePref; + + /** Defines Sub-Code uniqueness.(1 = Sequence, 2 = Set) */ + @Excel(name = "Defines Sub-Code uniqueness.(1 = Sequence, 2 = Set)") + private Long uniqueness; + + /** Whether this class can have size less parts in standard catalogue. */ + @Excel(name = "Whether this class can have size less parts in standard catalogue.") + private String allowSizeLess; + + /** Identifies defining application for this class. */ + @Excel(name = "Identifies defining application for this class.") + private Long defApplNo; + + /** Initials for person defining the class */ + @Excel(name = "Initials for person defining the class") + private String defUsrId; + + /** Definition date */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Definition date", width = 30, dateFormat = "yyyy-MM-dd") + private Date defDate; + + /** Identifies updating application for this class. */ + @Excel(name = "Identifies updating application for this class.") + private Long updApplNo; + + /** Initials for person latest updating the class */ + @Excel(name = "Initials for person latest updating the class") + private String updUsrId; + + /** Latest update date */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Latest update date", width = 30, dateFormat = "yyyy-MM-dd") + private Date updDate; + + public void setClassNo(Long classNo) + { + this.classNo = classNo; + } + + public Long getClassNo() + { + return classNo; + } + public void setClassId(String classId) + { + this.classId = classId; + } + + public String getClassId() + { + return classId; + } + public void setCatalogNo(Long catalogNo) + { + this.catalogNo = catalogNo; + } + + public Long getCatalogNo() + { + return catalogNo; + } + public void setSeqNo(Long seqNo) + { + this.seqNo = seqNo; + } + + public Long getSeqNo() + { + return seqNo; + } + public void setDescr(String descr) + { + this.descr = descr; + } + + public String getDescr() + { + return descr; + } + public void setStat(String stat) + { + this.stat = stat; + } + + public String getStat() + { + return stat; + } + public void setApprovalStatusNo(Long approvalStatusNo) + { + this.approvalStatusNo = approvalStatusNo; + } + + public Long getApprovalStatusNo() + { + return approvalStatusNo; + } + public void setParentClassNo(Long parentClassNo) + { + this.parentClassNo = parentClassNo; + } + + public Long getParentClassNo() + { + return parentClassNo; + } + public void setDrawDisciplineNo(Long drawDisciplineNo) + { + this.drawDisciplineNo = drawDisciplineNo; + } + + public Long getDrawDisciplineNo() + { + return drawDisciplineNo; + } + public void setCatEntityTypeNo(Long catEntityTypeNo) + { + this.catEntityTypeNo = catEntityTypeNo; + } + + public Long getCatEntityTypeNo() + { + return catEntityTypeNo; + } + public void setCanInstantiate(String canInstantiate) + { + this.canInstantiate = canInstantiate; + } + + public String getCanInstantiate() + { + return canInstantiate; + } + public void setBranchCode(String branchCode) + { + this.branchCode = branchCode; + } + + public String getBranchCode() + { + return branchCode; + } + public void setDefScopeNo(Long defScopeNo) + { + this.defScopeNo = defScopeNo; + } + + public Long getDefScopeNo() + { + return defScopeNo; + } + public void setBoltsRequired(String boltsRequired) + { + this.boltsRequired = boltsRequired; + } + + public String getBoltsRequired() + { + return boltsRequired; + } + public void setBoltAtSizeNo(Long boltAtSizeNo) + { + this.boltAtSizeNo = boltAtSizeNo; + } + + public Long getBoltAtSizeNo() + { + return boltAtSizeNo; + } + public void setSpecShortCodeNo(Long specShortCodeNo) + { + this.specShortCodeNo = specShortCodeNo; + } + + public Long getSpecShortCodeNo() + { + return specShortCodeNo; + } + public void setCompCategoryNo(Long compCategoryNo) + { + this.compCategoryNo = compCategoryNo; + } + + public Long getCompCategoryNo() + { + return compCategoryNo; + } + public void setSpecCompGroupNo(Long specCompGroupNo) + { + this.specCompGroupNo = specCompGroupNo; + } + + public Long getSpecCompGroupNo() + { + return specCompGroupNo; + } + public void setUnitId(String unitId) + { + this.unitId = unitId; + } + + public String getUnitId() + { + return unitId; + } + public void setCommodityCodePref(String commodityCodePref) + { + this.commodityCodePref = commodityCodePref; + } + + public String getCommodityCodePref() + { + return commodityCodePref; + } + public void setUniqueness(Long uniqueness) + { + this.uniqueness = uniqueness; + } + + public Long getUniqueness() + { + return uniqueness; + } + public void setAllowSizeLess(String allowSizeLess) + { + this.allowSizeLess = allowSizeLess; + } + + public String getAllowSizeLess() + { + return allowSizeLess; + } + public void setDefApplNo(Long defApplNo) + { + this.defApplNo = defApplNo; + } + + public Long getDefApplNo() + { + return defApplNo; + } + public void setDefUsrId(String defUsrId) + { + this.defUsrId = defUsrId; + } + + public String getDefUsrId() + { + return defUsrId; + } + public void setDefDate(Date defDate) + { + this.defDate = defDate; + } + + public Date getDefDate() + { + return defDate; + } + public void setUpdApplNo(Long updApplNo) + { + this.updApplNo = updApplNo; + } + + public Long getUpdApplNo() + { + return updApplNo; + } + public void setUpdUsrId(String updUsrId) + { + this.updUsrId = updUsrId; + } + + public String getUpdUsrId() + { + return updUsrId; + } + public void setUpdDate(Date updDate) + { + this.updDate = updDate; + } + + public Date getUpdDate() + { + return updDate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("classNo", getClassNo()) + .append("classId", getClassId()) + .append("catalogNo", getCatalogNo()) + .append("seqNo", getSeqNo()) + .append("descr", getDescr()) + .append("stat", getStat()) + .append("approvalStatusNo", getApprovalStatusNo()) + .append("parentClassNo", getParentClassNo()) + .append("drawDisciplineNo", getDrawDisciplineNo()) + .append("catEntityTypeNo", getCatEntityTypeNo()) + .append("canInstantiate", getCanInstantiate()) + .append("branchCode", getBranchCode()) + .append("defScopeNo", getDefScopeNo()) + .append("boltsRequired", getBoltsRequired()) + .append("boltAtSizeNo", getBoltAtSizeNo()) + .append("specShortCodeNo", getSpecShortCodeNo()) + .append("compCategoryNo", getCompCategoryNo()) + .append("specCompGroupNo", getSpecCompGroupNo()) + .append("unitId", getUnitId()) + .append("commodityCodePref", getCommodityCodePref()) + .append("uniqueness", getUniqueness()) + .append("allowSizeLess", getAllowSizeLess()) + .append("defApplNo", getDefApplNo()) + .append("defUsrId", getDefUsrId()) + .append("defDate", getDefDate()) + .append("updApplNo", getUpdApplNo()) + .append("updUsrId", getUpdUsrId()) + .append("updDate", getUpdDate()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClasssAttrib.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClasssAttrib.java new file mode 100644 index 000000000..101c5a61b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/ClasssAttrib.java @@ -0,0 +1,26 @@ +package com.ruoyi.system.domain; + +/** + * ClasssAttrib + * + * @author zbj + * @date 2021-08-31 + */ +public class ClasssAttrib +{ + private static final long serialVersionUID = 1L; + + private Long classNo; + + private String classId; + + private Long catalogNo; + + private Long seqNo; + + private String descr; + + private String stat; + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/Commodity.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Commodity.java new file mode 100644 index 000000000..386df374c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/Commodity.java @@ -0,0 +1,266 @@ +package com.ruoyi.system.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * CC码对象 commodity + * + * @author ruoyi + * @date 2021-09-02 + */ +public class Commodity extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** System id of commodity.. */ + private Long commodityNo; + + /** Commodity code. */ + @Excel(name = "Commodity code.") + private String commodityId; + + /** Set to COMMODITY_NO to fake uniqueness of the Commodity Code. Set to 0 for approved Commodities enforce uniqueness. */ + @Excel(name = "Set to COMMODITY_NO to fake uniqueness of the Commodity Code. Set to 0 for approved Commodities enforce uniqueness.") + private Long fakeUnique; + + /** System id of catalogue. */ + @Excel(name = "System id of catalogue.") + private Long catalogNo; + + /** System id of class for this commodity (and its parts). */ + @Excel(name = "System id of class for this commodity (and its parts).") + private Long commodityClassNo; + + /** Method used to define this Commodity (1 = Generated, 2 = UserDefined, 3 = UserDefinedPartNumber, 4 = SubCode). */ + @Excel(name = "Method used to define this Commodity (1 = Generated, 2 = UserDefined, 3 = UserDefinedPartNumber, 4 = SubCode).") + private Long defMethodNo; + + /** Whether datasheet required (1 = True, 0 = False). */ + @Excel(name = "Whether datasheet required (1 = True, 0 = False).") + private String datasheetReqd; + + /** Whether part numbers for this Commodity may appear on requisitions (and other formal project reports) .(1 = True, 0 - False). */ + @Excel(name = "Whether part numbers for this Commodity may appear on requisitions (and other formal project reports) .(1 = True, 0 - False).") + private String prntPartNo; + + /** The unit of measure for the quantity of this commodity (e.g. whether it is purchased by length or by number off). */ + @Excel(name = "The unit of measure for the quantity of this commodity (e.g. whether it is purchased by length or by number off).") + private String unitId; + + /** Legacy commodity code. */ + @Excel(name = "Legacy commodity code.") + private String commodityCodeOrig; + + /** Approval status of Commodity (1 = Working, 2 = Approved). */ + @Excel(name = "Approval status of Commodity (1 = Working, 2 = Approved).") + private Long approvalStatusNo; + + /** Whether this part is obsolete. (1 = Active, 0 = Obsolete). */ + @Excel(name = "Whether this part is obsolete. (1 = Active, 0 = Obsolete).") + private String stat; + + /** Initials for person defining the COMMODITY. */ + @Excel(name = "Initials for person defining the COMMODITY.") + private String defUsrId; + + /** Definition date. */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Definition date.", width = 30, dateFormat = "yyyy-MM-dd") + private Date defDate; + + /** Initials for person latest updating the COMMODITY. */ + @Excel(name = "Initials for person latest updating the COMMODITY.") + private String updUsrId; + + /** Latest update date. */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "Latest update date.", width = 30, dateFormat = "yyyy-MM-dd") + private Date updDate; + + /** Unique id of the spec entry */ + @Excel(name = "Unique id of the spec entry") + private Long specEntryNo; + + public void setCommodityNo(Long commodityNo) + { + this.commodityNo = commodityNo; + } + + public Long getCommodityNo() + { + return commodityNo; + } + public void setCommodityId(String commodityId) + { + this.commodityId = commodityId; + } + + public String getCommodityId() + { + return commodityId; + } + public void setFakeUnique(Long fakeUnique) + { + this.fakeUnique = fakeUnique; + } + + public Long getFakeUnique() + { + return fakeUnique; + } + public void setCatalogNo(Long catalogNo) + { + this.catalogNo = catalogNo; + } + + public Long getCatalogNo() + { + return catalogNo; + } + public void setCommodityClassNo(Long commodityClassNo) + { + this.commodityClassNo = commodityClassNo; + } + + public Long getCommodityClassNo() + { + return commodityClassNo; + } + public void setDefMethodNo(Long defMethodNo) + { + this.defMethodNo = defMethodNo; + } + + public Long getDefMethodNo() + { + return defMethodNo; + } + public void setDatasheetReqd(String datasheetReqd) + { + this.datasheetReqd = datasheetReqd; + } + + public String getDatasheetReqd() + { + return datasheetReqd; + } + public void setPrntPartNo(String prntPartNo) + { + this.prntPartNo = prntPartNo; + } + + public String getPrntPartNo() + { + return prntPartNo; + } + public void setUnitId(String unitId) + { + this.unitId = unitId; + } + + public String getUnitId() + { + return unitId; + } + public void setCommodityCodeOrig(String commodityCodeOrig) + { + this.commodityCodeOrig = commodityCodeOrig; + } + + public String getCommodityCodeOrig() + { + return commodityCodeOrig; + } + public void setApprovalStatusNo(Long approvalStatusNo) + { + this.approvalStatusNo = approvalStatusNo; + } + + public Long getApprovalStatusNo() + { + return approvalStatusNo; + } + public void setStat(String stat) + { + this.stat = stat; + } + + public String getStat() + { + return stat; + } + public void setDefUsrId(String defUsrId) + { + this.defUsrId = defUsrId; + } + + public String getDefUsrId() + { + return defUsrId; + } + public void setDefDate(Date defDate) + { + this.defDate = defDate; + } + + public Date getDefDate() + { + return defDate; + } + public void setUpdUsrId(String updUsrId) + { + this.updUsrId = updUsrId; + } + + public String getUpdUsrId() + { + return updUsrId; + } + public void setUpdDate(Date updDate) + { + this.updDate = updDate; + } + + public Date getUpdDate() + { + return updDate; + } + public void setSpecEntryNo(Long specEntryNo) + { + this.specEntryNo = specEntryNo; + } + + public Long getSpecEntryNo() + { + return specEntryNo; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("commodityNo", getCommodityNo()) + .append("commodityId", getCommodityId()) + .append("fakeUnique", getFakeUnique()) + .append("catalogNo", getCatalogNo()) + .append("commodityClassNo", getCommodityClassNo()) + .append("defMethodNo", getDefMethodNo()) + .append("datasheetReqd", getDatasheetReqd()) + .append("prntPartNo", getPrntPartNo()) + .append("unitId", getUnitId()) + .append("commodityCodeOrig", getCommodityCodeOrig()) + .append("approvalStatusNo", getApprovalStatusNo()) + .append("stat", getStat()) + .append("defUsrId", getDefUsrId()) + .append("defDate", getDefDate()) + .append("updUsrId", getUpdUsrId()) + .append("updDate", getUpdDate()) + .append("specEntryNo", getSpecEntryNo()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysApp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysApp.java new file mode 100644 index 000000000..32aca50a4 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysApp.java @@ -0,0 +1,98 @@ +package com.ruoyi.system.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 编码申请对象 sys_app + * + * @author ruoyi + * @date 2021-09-29 + */ +public class SysApp extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 编码申请单主键seq_sys_app.nextval */ + private Long appId; + + /** 申请编码 */ + @Excel(name = "申请编码") + private String appCode; + + /** 编码体系ID */ + @Excel(name = "编码体系ID") + private Long categoryId; + + /** 申请名称 */ + @Excel(name = "申请名称") + private String appName; + + /** 状态(0正常 1通过2驳回) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=通过2驳回") + private String status; + + public void setAppId(Long appId) + { + this.appId = appId; + } + + public Long getAppId() + { + return appId; + } + public void setAppCode(String appCode) + { + this.appCode = appCode; + } + + public String getAppCode() + { + return appCode; + } + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + public void setAppName(String appName) + { + this.appName = appName; + } + + public String getAppName() + { + return appName; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("appId", getAppId()) + .append("appCode", getAppCode()) + .append("categoryId", getCategoryId()) + .append("appName", getAppName()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysAppData.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysAppData.java new file mode 100644 index 000000000..40cd9a703 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysAppData.java @@ -0,0 +1,280 @@ +package com.ruoyi.system.domain; + +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 编码申请数据对象 sys_app_data + * + * @author ruoyi + * @date 2021-09-29 + */ +public class SysAppData extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 申请单明细主键seq_sys_app_data.nextval */ + private Long appDataId; + + /** 申请单ID */ + @Excel(name = "申请单ID") + private Long appId; + + /** CC或者ID(0:CC,1:ID) */ + @Excel(name = "CC或者ID", readConverterExp = "0=:CC,1:ID") + private String type; + + /** CC代码或ID代码 */ + @Excel(name = "CC代码或ID代码") + private String code; + + /** 设计描述 */ + @Excel(name = "设计描述") + private String designDesc; + + /** 中文公制短描述 */ + @Excel(name = "中文公制短描述") + private String zhCnShortDesc; + + /** 中文公制长描述 */ + @Excel(name = "中文公制长描述") + private String zhCnLongDesc; + + /** 中文英制短描述 */ + @Excel(name = "中文英制短描述") + private String zhEnShortDesc; + + /** 中文英制长描述 */ + @Excel(name = "中文英制长描述") + private String zhEnLongDesc; + + /** 俄文公制短描述 */ + @Excel(name = "俄文公制短描述") + private String ruCnShortDesc; + + /** 俄文公制长描述 */ + @Excel(name = "俄文公制长描述") + private String ruCnLongDesc; + + /** 俄文英制短描述 */ + @Excel(name = "俄文英制短描述") + private String ruEnShortDesc; + + /** 俄文英制长描述 */ + @Excel(name = "俄文英制长描述") + private String ruEnLongDesc; + + /** 英文公制短描述 */ + @Excel(name = "英文公制短描述") + private String enCnShortDesc; + + /** 英文公制长描述 */ + @Excel(name = "英文公制长描述") + private String enCnLongDesc; + + /** 英文英制短描述 */ + @Excel(name = "英文英制短描述") + private String enEnShortDesc; + + /** 英文英制长描述 */ + @Excel(name = "英文英制长描述") + private String enEnLongDesc; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String status; + + public void setAppDataId(Long appDataId) + { + this.appDataId = appDataId; + } + + public Long getAppDataId() + { + return appDataId; + } + public void setAppId(Long appId) + { + this.appId = appId; + } + + public Long getAppId() + { + return appId; + } + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + public void setCode(String code) + { + this.code = code; + } + + public String getCode() + { + return code; + } + public void setDesignDesc(String designDesc) + { + this.designDesc = designDesc; + } + + public String getDesignDesc() + { + return designDesc; + } + public void setZhCnShortDesc(String zhCnShortDesc) + { + this.zhCnShortDesc = zhCnShortDesc; + } + + public String getZhCnShortDesc() + { + return zhCnShortDesc; + } + public void setZhCnLongDesc(String zhCnLongDesc) + { + this.zhCnLongDesc = zhCnLongDesc; + } + + public String getZhCnLongDesc() + { + return zhCnLongDesc; + } + public void setZhEnShortDesc(String zhEnShortDesc) + { + this.zhEnShortDesc = zhEnShortDesc; + } + + public String getZhEnShortDesc() + { + return zhEnShortDesc; + } + public void setZhEnLongDesc(String zhEnLongDesc) + { + this.zhEnLongDesc = zhEnLongDesc; + } + + public String getZhEnLongDesc() + { + return zhEnLongDesc; + } + public void setRuCnShortDesc(String ruCnShortDesc) + { + this.ruCnShortDesc = ruCnShortDesc; + } + + public String getRuCnShortDesc() + { + return ruCnShortDesc; + } + public void setRuCnLongDesc(String ruCnLongDesc) + { + this.ruCnLongDesc = ruCnLongDesc; + } + + public String getRuCnLongDesc() + { + return ruCnLongDesc; + } + public void setRuEnShortDesc(String ruEnShortDesc) + { + this.ruEnShortDesc = ruEnShortDesc; + } + + public String getRuEnShortDesc() + { + return ruEnShortDesc; + } + public void setRuEnLongDesc(String ruEnLongDesc) + { + this.ruEnLongDesc = ruEnLongDesc; + } + + public String getRuEnLongDesc() + { + return ruEnLongDesc; + } + public void setEnCnShortDesc(String enCnShortDesc) + { + this.enCnShortDesc = enCnShortDesc; + } + + public String getEnCnShortDesc() + { + return enCnShortDesc; + } + public void setEnCnLongDesc(String enCnLongDesc) + { + this.enCnLongDesc = enCnLongDesc; + } + + public String getEnCnLongDesc() + { + return enCnLongDesc; + } + public void setEnEnShortDesc(String enEnShortDesc) + { + this.enEnShortDesc = enEnShortDesc; + } + + public String getEnEnShortDesc() + { + return enEnShortDesc; + } + public void setEnEnLongDesc(String enEnLongDesc) + { + this.enEnLongDesc = enEnLongDesc; + } + + public String getEnEnLongDesc() + { + return enEnLongDesc; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("appDataId", getAppDataId()) + .append("appId", getAppId()) + .append("type", getType()) + .append("code", getCode()) + .append("designDesc", getDesignDesc()) + .append("zhCnShortDesc", getZhCnShortDesc()) + .append("zhCnLongDesc", getZhCnLongDesc()) + .append("zhEnShortDesc", getZhEnShortDesc()) + .append("zhEnLongDesc", getZhEnLongDesc()) + .append("ruCnShortDesc", getRuCnShortDesc()) + .append("ruCnLongDesc", getRuCnLongDesc()) + .append("ruEnShortDesc", getRuEnShortDesc()) + .append("ruEnLongDesc", getRuEnLongDesc()) + .append("enCnShortDesc", getEnCnShortDesc()) + .append("enCnLongDesc", getEnCnLongDesc()) + .append("enEnShortDesc", getEnEnShortDesc()) + .append("enEnLongDesc", getEnEnLongDesc()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribMapper.java new file mode 100644 index 000000000..8efafc224 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribMapper.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.mapper; + +import com.ruoyi.system.domain.Attrib; + +import java.util.List; + +/** + * 属性Mapper接口 + * + * @author ruoyi + * @date 2021-09-02 + */ +public interface AttribMapper +{ + /** + * 查询属性 + * + * @param attribNo 属性主键 + * @return 属性 + */ + public Attrib selectAttribByAttribNo(Long attribNo); + + /** + * 查询属性列表 + * + * @param attrib 属性 + * @return 属性集合 + */ + public List selectAttribList(Attrib attrib); + public List selectAttribListByClasss(long classId); + + /** + * 新增属性 + * + * @param attrib 属性 + * @return 结果 + */ + public int insertAttrib(Attrib attrib); + + /** + * 修改属性 + * + * @param attrib 属性 + * @return 结果 + */ + public int updateAttrib(Attrib attrib); + + /** + * 删除属性 + * + * @param attribNo 属性主键 + * @return 结果 + */ + public int deleteAttribByAttribNo(Long attribNo); + + /** + * 批量删除属性 + * + * @param attribNos 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAttribByAttribNos(String[] attribNos); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribValueMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribValueMapper.java new file mode 100644 index 000000000..4772fb4b5 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AttribValueMapper.java @@ -0,0 +1,78 @@ +package com.ruoyi.system.mapper; + +import com.ruoyi.system.domain.AttribValue; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * Table containing ATTRIB_VALUEMapper接口 + * + * @author ruoyi + * @date 2021-09-02 + */ +public interface AttribValueMapper +{ + /** + * 查询Table containing ATTRIB_VALUE + * + * @param attribValueNo Table containing ATTRIB_VALUE主键 + * @return Table containing ATTRIB_VALUE + */ + public AttribValue selectAttribValueByAttribValueNo(Long attribValueNo); + + /** + * 查询Table containing ATTRIB_VALUE列表 + * + * @param attribValue Table containing ATTRIB_VALUE + * @return Table containing ATTRIB_VALUE集合 + */ + public List selectAttribValueList(AttribValue attribValue); + /** + * 查询Table containing ATTRIB_VALUE列表 + * + * @param attribId 属性ID + * @return ATTRIB_VALUE集合 + */ + public List selectByAttrib(Long attribId); + /** + * 查询Table containing ATTRIB_VALUE列表 + * + * @param typeId typeId + * @return 集合 + */ + public List selectPropertyFormulaByTypeId(Long typeId); + public List selectPropertyFormulaByTypeAndProperty(@Param("class_no")Long class_no, @Param("entity_property_no")Long entity_property_no ); + + /** + * 新增Table containing ATTRIB_VALUE + * + * @param attribValue Table containing ATTRIB_VALUE + * @return 结果 + */ + public int insertAttribValue(AttribValue attribValue); + + /** + * 修改Table containing ATTRIB_VALUE + * + * @param attribValue Table containing ATTRIB_VALUE + * @return 结果 + */ + public int updateAttribValue(AttribValue attribValue); + + /** + * 删除Table containing ATTRIB_VALUE + * + * @param attribValueNo Table containing ATTRIB_VALUE主键 + * @return 结果 + */ + public int deleteAttribValueByAttribValueNo(Long attribValueNo); + + /** + * 批量删除Table containing ATTRIB_VALUE + * + * @param attribValueNos 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAttribValueByAttribValueNos(String[] attribValueNos); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClasssMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClasssMapper.java new file mode 100644 index 000000000..6a7eb370a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ClasssMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.system.mapper; + +import com.ruoyi.system.domain.Classs; + +import java.util.List; + +/** + * Table containing Class HierarchyMapper接口 + * + * @author zbj + * @date 2021-08-31 + */ +public interface ClasssMapper +{ + /** + * 查询Table containing Class Hierarchy + * + * @param classNo Table containing Class Hierarchy主键 + * @return Table containing Class Hierarchy + */ + public Classs selectClasssByClassNo(Long classNo); + + /** + * 查询Table containing Class Hierarchy列表 + * + * @param classs Table containing Class Hierarchy + * @return Table containing Class Hierarchy集合 + */ + public List selectClasssList(Classs classs); + + /** + * 新增Table containing Class Hierarchy + * + * @param classs Table containing Class Hierarchy + * @return 结果 + */ + public int insertClasss(Classs classs); + + /** + * 修改Table containing Class Hierarchy + * + * @param classs Table containing Class Hierarchy + * @return 结果 + */ + public int updateClasss(Classs classs); + + /** + * 删除Table containing Class Hierarchy + * + * @param classNo Table containing Class Hierarchy主键 + * @return 结果 + */ + public int deleteClasssByClassNo(Long classNo); + + /** + * 批量删除Table containing Class Hierarchy + * + * @param classNos 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteClasssByClassNos(String[] classNos); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CommodityMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CommodityMapper.java new file mode 100644 index 000000000..b6f57415a --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CommodityMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.system.mapper; + +import com.ruoyi.system.domain.Commodity; + +import java.util.List; + +/** + * CC码Mapper接口 + * + * @author ruoyi + * @date 2021-09-02 + */ +public interface CommodityMapper +{ + /** + * 查询CC码 + * + * @param commodityNo CC码主键 + * @return CC码 + */ + public Commodity selectCommodityByCommodityNo(Long commodityNo); + + /** + * 查询CC码列表 + * + * @param commodity CC码 + * @return CC码集合 + */ + public List selectCommodityList(Commodity commodity); + + /** + * 新增CC码 + * + * @param commodity CC码 + * @return 结果 + */ + public int insertCommodity(Commodity commodity); + + /** + * 修改CC码 + * + * @param commodity CC码 + * @return 结果 + */ + public int updateCommodity(Commodity commodity); + + /** + * 删除CC码 + * + * @param commodityNo CC码主键 + * @return 结果 + */ + public int deleteCommodityByCommodityNo(Long commodityNo); + + /** + * 批量删除CC码 + * + * @param commodityNos 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCommodityByCommodityNos(String[] commodityNos); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppDataMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppDataMapper.java new file mode 100644 index 000000000..425312fc8 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppDataMapper.java @@ -0,0 +1,63 @@ +package com.ruoyi.system.mapper; + + +import com.ruoyi.system.domain.SysAppData; + +import java.util.List; + +/** + * 编码申请数据Mapper接口 + * + * @author ruoyi + * @date 2021-09-29 + */ +public interface SysAppDataMapper +{ + /** + * 查询编码申请数据 + * + * @param appDataId 编码申请数据主键 + * @return 编码申请数据 + */ + public SysAppData selectSysAppDataByAppDataId(Long appDataId); + + /** + * 查询编码申请数据列表 + * + * @param sysAppData 编码申请数据 + * @return 编码申请数据集合 + */ + public List selectSysAppDataList(SysAppData sysAppData); + + /** + * 新增编码申请数据 + * + * @param sysAppData 编码申请数据 + * @return 结果 + */ + public int insertSysAppData(SysAppData sysAppData); + + /** + * 修改编码申请数据 + * + * @param sysAppData 编码申请数据 + * @return 结果 + */ + public int updateSysAppData(SysAppData sysAppData); + + /** + * 删除编码申请数据 + * + * @param appDataId 编码申请数据主键 + * @return 结果 + */ + public int deleteSysAppDataByAppDataId(Long appDataId); + + /** + * 批量删除编码申请数据 + * + * @param appDataIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysAppDataByAppDataIds(String[] appDataIds); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppMapper.java new file mode 100644 index 000000000..b04c4fd56 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysAppMapper.java @@ -0,0 +1,68 @@ +package com.ruoyi.system.mapper; + +import com.ruoyi.system.domain.SysApp; + +import java.util.List; + +/** + * 编码申请Mapper接口 + * + * @author ruoyi + * @date 2021-09-29 + */ +public interface SysAppMapper +{ + /** + * 查询编码申请 + * + * @param appId 编码申请主键 + * @return 编码申请 + */ + public SysApp selectSysAppByAppId(Long appId); + + /** + * 查询编码申请列表 + * + * @param sysApp 编码申请 + * @return 编码申请集合 + */ + public List selectSysAppList(SysApp sysApp); + + /** + * 新增编码申请 + * + * @param sysApp 编码申请 + * @return 结果 + */ + public int insertSysApp(SysApp sysApp); + + /** + * 修改编码申请 + * + * @param sysApp 编码申请 + * @return 结果 + */ + public int updateSysApp(SysApp sysApp); + + /** + * 删除编码申请 + * + * @param appId 编码申请主键 + * @return 结果 + */ + public int deleteSysAppByAppId(Long appId); + + /** + * 批量删除编码申请 + * + * @param appIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysAppByAppIds(String[] appIds); + /** + * 查询所有申请单 + * + * @return 结果 + */ + List selectAppAll(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribService.java new file mode 100644 index 000000000..05c0167db --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribService.java @@ -0,0 +1,69 @@ +package com.ruoyi.system.service; + +import com.ruoyi.system.domain.Attrib; + +import java.util.List; + +/** + * 属性Service接口 + * + * @author ruoyi + * @date 2021-09-02 + */ +public interface IAttribService +{ + /** + * 查询属性 + * + * @param attribNo 属性主键 + * @return 属性 + */ + public Attrib selectAttribByAttribNo(Long attribNo); + + /** + * 查询属性列表 + * + * @param attrib 属性 + * @return 属性集合 + */ + public List selectAttribList(Attrib attrib); + /** + * 根据分类ID查询属性列表 + * + * @param classsNo 属性 + * @return 属性集合 + */ + public List selectAttribListByClasss(Long classsNo); + + /** + * 新增属性 + * + * @param attrib 属性 + * @return 结果 + */ + public int insertAttrib(Attrib attrib); + + /** + * 修改属性 + * + * @param attrib 属性 + * @return 结果 + */ + public int updateAttrib(Attrib attrib); + + /** + * 批量删除属性 + * + * @param attribNos 需要删除的属性主键集合 + * @return 结果 + */ + public int deleteAttribByAttribNos(String attribNos); + + /** + * 删除属性信息 + * + * @param attribNo 属性主键 + * @return 结果 + */ + public int deleteAttribByAttribNo(Long attribNo); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribValueService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribValueService.java new file mode 100644 index 000000000..6ec7d0b09 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAttribValueService.java @@ -0,0 +1,77 @@ +package com.ruoyi.system.service; + +import com.ruoyi.system.domain.AttribValue; + +import java.util.List; + +/** + * Table containing ATTRIB_VALUEService接口 + * + * @author ruoyi + * @date 2021-09-02 + */ +public interface IAttribValueService +{ + /** + * 查询Table containing ATTRIB_VALUE + * + * @param attribValueNo Table containing ATTRIB_VALUE主键 + * @return Table containing ATTRIB_VALUE + */ + public AttribValue selectAttribValueByAttribValueNo(Long attribValueNo); + + /** + * 查询Table containing ATTRIB_VALUE列表 + * + * @param attribValue Table containing ATTRIB_VALUE + * @return Table containing ATTRIB_VALUE集合 + */ + public List selectAttribValueList(AttribValue attribValue); + /** + * 查询Table containing ATTRIB_VALUE列表 + * + * @param attribId 属性ID + * @return ATTRIB_VALUE集合 + */ + public List selectByAttrib(Long attribId); + /** + * 根据分类ID获取描述规则 + * + * @param typeId 分类ID + * @return 集合 + */ + public List selectPropertyFormulaByTypeId(Long typeId); + public List selectPropertyFormulaByTypeAndProperty(Long typeId,Long property); + + /** + * 新增Table containing ATTRIB_VALUE + * + * @param attribValue Table containing ATTRIB_VALUE + * @return 结果 + */ + public int insertAttribValue(AttribValue attribValue); + + /** + * 修改Table containing ATTRIB_VALUE + * + * @param attribValue Table containing ATTRIB_VALUE + * @return 结果 + */ + public int updateAttribValue(AttribValue attribValue); + + /** + * 批量删除Table containing ATTRIB_VALUE + * + * @param attribValueNos 需要删除的Table containing ATTRIB_VALUE主键集合 + * @return 结果 + */ + public int deleteAttribValueByAttribValueNos(String attribValueNos); + + /** + * 删除Table containing ATTRIB_VALUE信息 + * + * @param attribValueNo Table containing ATTRIB_VALUE主键 + * @return 结果 + */ + public int deleteAttribValueByAttribValueNo(Long attribValueNo); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IClasssService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClasssService.java new file mode 100644 index 000000000..3c5a2a43f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IClasssService.java @@ -0,0 +1,76 @@ +package com.ruoyi.system.service; + +import com.ruoyi.common.core.domain.Ztree; +import com.ruoyi.system.domain.Classs; + +import java.util.List; + +/** + * Table containing Class HierarchyService接口 + * + * @author zbj + * @date 2021-08-31 + */ +public interface IClasssService +{ + /** + * 查询Table containing Class Hierarchy + * + * @param classNo Table containing Class Hierarchy主键 + * @return Table containing Class Hierarchy + */ + public Classs selectClasssByClassNo(Long classNo); + + /** + * 查询Table containing Class Hierarchy列表 + * + * @param classs Table containing Class Hierarchy + * @return Table containing Class Hierarchy集合 + */ + public List selectClasssList(Classs classs); + + /** + * 新增Table containing Class Hierarchy + * + * @param classs Table containing Class Hierarchy + * @return 结果 + */ + public int insertClasss(Classs classs); + + /** + * 修改Table containing Class Hierarchy + * + * @param classs Table containing Class Hierarchy + * @return 结果 + */ + public int updateClasss(Classs classs); + + /** + * 批量删除Table containing Class Hierarchy + * + * @param classNos 需要删除的Table containing Class Hierarchy主键集合 + * @return 结果 + */ + public int deleteClasssByClassNos(String classNos); + + /** + * 删除Table containing Class Hierarchy信息 + * + * @param classNo Table containing Class Hierarchy主键 + * @return 结果 + */ + public int deleteClasssByClassNo(Long classNo); + + /** + * 查询Table containing Class Hierarchy树列表 + * + * @return 所有Table containing Class Hierarchy信息 + */ + public List selectClasssTree(); + /** + * 查询已发布分类树 + * + * @return + */ + public List selectApprovalClasss(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ICommodityService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ICommodityService.java new file mode 100644 index 000000000..7b02fceaf --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ICommodityService.java @@ -0,0 +1,62 @@ +package com.ruoyi.system.service; + +import com.ruoyi.system.domain.Commodity; + +import java.util.List; + +/** + * CC码Service接口 + * + * @author ruoyi + * @date 2021-09-02 + */ +public interface ICommodityService +{ + /** + * 查询CC码 + * + * @param commodityNo CC码主键 + * @return CC码 + */ + public Commodity selectCommodityByCommodityNo(Long commodityNo); + + /** + * 查询CC码列表 + * + * @param commodity CC码 + * @return CC码集合 + */ + public List selectCommodityList(Commodity commodity); + + /** + * 新增CC码 + * + * @param commodity CC码 + * @return 结果 + */ + public int insertCommodity(Commodity commodity); + + /** + * 修改CC码 + * + * @param commodity CC码 + * @return 结果 + */ + public int updateCommodity(Commodity commodity); + + /** + * 批量删除CC码 + * + * @param commodityNos 需要删除的CC码主键集合 + * @return 结果 + */ + public int deleteCommodityByCommodityNos(String commodityNos); + + /** + * 删除CC码信息 + * + * @param commodityNo CC码主键 + * @return 结果 + */ + public int deleteCommodityByCommodityNo(Long commodityNo); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribServiceImpl.java new file mode 100644 index 000000000..872efa0e1 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribServiceImpl.java @@ -0,0 +1,102 @@ +package com.ruoyi.system.service.impl; + +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.system.domain.Attrib; +import com.ruoyi.system.mapper.AttribMapper; +import com.ruoyi.system.service.IAttribService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 属性Service业务层处理 + * + * @author ruoyi + * @date 2021-09-02 + */ +@Service +public class AttribServiceImpl implements IAttribService +{ + @Autowired + private AttribMapper attribMapper; + + /** + * 查询属性 + * + * @param attribNo 属性主键 + * @return 属性 + */ + @Override + public Attrib selectAttribByAttribNo(Long attribNo) + { + return attribMapper.selectAttribByAttribNo(attribNo); + } + + /** + * 查询属性列表 + * + * @param attrib 属性 + * @return 属性 + */ + @Override + public List selectAttribList(Attrib attrib) + { + return attribMapper.selectAttribList(attrib); + } + @DataSource(value = DataSourceType.SLAVE) + @Override + public List selectAttribListByClasss(Long classsNo) { + return attribMapper.selectAttribListByClasss(classsNo); + } + + /** + * 新增属性 + * + * @param attrib 属性 + * @return 结果 + */ + @Override + public int insertAttrib(Attrib attrib) + { + return attribMapper.insertAttrib(attrib); + } + + /** + * 修改属性 + * + * @param attrib 属性 + * @return 结果 + */ + @Override + public int updateAttrib(Attrib attrib) + { + return attribMapper.updateAttrib(attrib); + } + + /** + * 批量删除属性 + * + * @param attribNos 需要删除的属性主键 + * @return 结果 + */ + @Override + public int deleteAttribByAttribNos(String attribNos) + { + return attribMapper.deleteAttribByAttribNos(Convert.toStrArray(attribNos)); + } + + /** + * 删除属性信息 + * + * @param attribNo 属性主键 + * @return 结果 + */ + @Override + public int deleteAttribByAttribNo(Long attribNo) + { + return attribMapper.deleteAttribByAttribNo(attribNo); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribValueServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribValueServiceImpl.java new file mode 100644 index 000000000..a94470616 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AttribValueServiceImpl.java @@ -0,0 +1,124 @@ +package com.ruoyi.system.service.impl; + +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.system.domain.AttribValue; +import com.ruoyi.system.mapper.AttribValueMapper; +import com.ruoyi.system.service.IAttribValueService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Table containing ATTRIB_VALUEService业务层处理 + * + * @author ruoyi + * @date 2021-09-02 + */ +@Service +public class AttribValueServiceImpl implements IAttribValueService +{ + @Autowired + private AttribValueMapper attribValueMapper; + + /** + * 查询Table containing ATTRIB_VALUE + * + * @param attribValueNo Table containing ATTRIB_VALUE主键 + * @return Table containing ATTRIB_VALUE + */ + @Override + public AttribValue selectAttribValueByAttribValueNo(Long attribValueNo) + { + return attribValueMapper.selectAttribValueByAttribValueNo(attribValueNo); + } + + /** + * 查询Table containing ATTRIB_VALUE列表 + * + * @param attribValue Table containing ATTRIB_VALUE + * @return Table containing ATTRIB_VALUE + */ + @Override + public List selectAttribValueList(AttribValue attribValue) + { + return attribValueMapper.selectAttribValueList(attribValue); + } + + /** + * 新增Table containing ATTRIB_VALUE + * + * @param attribValue Table containing ATTRIB_VALUE + * @return 结果 + */ + @Override + public int insertAttribValue(AttribValue attribValue) + { + return attribValueMapper.insertAttribValue(attribValue); + } + + /** + * 修改Table containing ATTRIB_VALUE + * + * @param attribValue Table containing ATTRIB_VALUE + * @return 结果 + */ + @Override + public int updateAttribValue(AttribValue attribValue) + { + return attribValueMapper.updateAttribValue(attribValue); + } + + /** + * 批量删除Table containing ATTRIB_VALUE + * + * @param attribValueNos 需要删除的Table containing ATTRIB_VALUE主键 + * @return 结果 + */ + @Override + public int deleteAttribValueByAttribValueNos(String attribValueNos) + { + return attribValueMapper.deleteAttribValueByAttribValueNos(Convert.toStrArray(attribValueNos)); + } + + /** + * 删除Table containing ATTRIB_VALUE信息 + * + * @param attribValueNo Table containing ATTRIB_VALUE主键 + * @return 结果 + */ + @Override + public int deleteAttribValueByAttribValueNo(Long attribValueNo) + { + return attribValueMapper.deleteAttribValueByAttribValueNo(attribValueNo); + } + /** + * 查询Table ATTRIB_VALUE列表 + * + * @param attribId 属性ID + * @return ATTRIB_VALUE集合 + */ + @DataSource(value = DataSourceType.SLAVE) + @Override + public ListselectByAttrib(Long attribId){ + return attribValueMapper.selectByAttrib(attribId); + } + /** + * 根据分类ID获取描述规则 + * + * @param typeId 分类ID + * @return 集合 + */ + @DataSource(value = DataSourceType.SLAVE) + @Override + public ListselectPropertyFormulaByTypeId(Long typeId){ + return attribValueMapper.selectPropertyFormulaByTypeId(typeId); + } + @DataSource(value = DataSourceType.SLAVE) + @Override + public List selectPropertyFormulaByTypeAndProperty(Long typeId,Long entity_property_no ){ + return attribValueMapper.selectPropertyFormulaByTypeAndProperty(typeId,entity_property_no); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClasssServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClasssServiceImpl.java new file mode 100644 index 000000000..1cdb7439e --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ClasssServiceImpl.java @@ -0,0 +1,152 @@ +package com.ruoyi.system.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.constant.Constants; +import com.ruoyi.common.core.domain.Ztree; +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.common.utils.http.HttpUtils; +import com.ruoyi.system.domain.Classs; +import com.ruoyi.system.mapper.ClasssMapper; +import com.ruoyi.system.service.IClasssService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +/** + * Table containing Class HierarchyService业务层处理 + * + * @author zbj + * @date 2021-08-31 + */ +@Service("classs") +@DataSource(value = DataSourceType.SLAVE) +public class ClasssServiceImpl implements IClasssService +{ + @Autowired + private ClasssMapper classsMapper; + + /** + * 查询Table containing Class Hierarchy + * + * @param classNo Table containing Class Hierarchy主键 + * @return Table containing Class Hierarchy + */ + @Override + public Classs selectClasssByClassNo(Long classNo) + { + return classsMapper.selectClasssByClassNo(classNo); + } + + /** + * 查询Table containing Class Hierarchy列表 + * + * @param classs Table containing Class Hierarchy + * @return Table containing Class Hierarchy + */ + @Override + public List selectClasssList(Classs classs) + { + return classsMapper.selectClasssList(classs); + } + + /** + * 新增Table containing Class Hierarchy + * + * @param classs Table containing Class Hierarchy + * @return 结果 + */ + @Override + public int insertClasss(Classs classs) + { + return classsMapper.insertClasss(classs); + } + + /** + * 修改Table containing Class Hierarchy + * + * @param classs Table containing Class Hierarchy + * @return 结果 + */ + @Override + public int updateClasss(Classs classs) + { + return classsMapper.updateClasss(classs); + } + + /** + * 批量删除Table containing Class Hierarchy + * + * @param classNos 需要删除的Table containing Class Hierarchy主键 + * @return 结果 + */ + @Override + public int deleteClasssByClassNos(String classNos) + { + return classsMapper.deleteClasssByClassNos(Convert.toStrArray(classNos)); + } + + /** + * 删除Table containing Class Hierarchy信息 + * + * @param classNo Table containing Class Hierarchy主键 + * @return 结果 + */ + @Override + public int deleteClasssByClassNo(Long classNo) + { + return classsMapper.deleteClasssByClassNo(classNo); + } + + /** + * 查询Table containing Class Hierarchy树列表 + * + * @return 所有Table containing Class Hierarchy信息 + */ + @Override + public List selectClasssTree() + { + String json= HttpUtils.sendGet(Constants.WLFL,"pagecount=1"); + JSONObject jsonObject = JSONObject.parseObject(json); + String totals = jsonObject.getString("totals"); + Double num =Math.ceil(Double.parseDouble(totals)/100); + List object=new ArrayList<>(); + for(int i=1;i<=num.intValue();i++){ + json= HttpUtils.sendGet(Constants.WLFL,"pagecount=100&pagenum="+i); + jsonObject = JSONObject.parseObject(json); + String r = jsonObject.getString("data"); + object.addAll (JSONArray.parseArray(r, HashMap.class)) ; + } + List ztrees = new ArrayList(); + System.out.println(object.size()); + for (HashMap map : object) + { + Ztree ztree = new Ztree(); + ztree.setId(Long.valueOf(map.get("class_no").toString())); + ztree.setpId(Long.valueOf(map.get("parent_class_no")==null?"0":map.get("parent_class_no").toString())); + ztree.setName((String) map.get("class_id")); + ztree.setTitle((String) map.get("descr")); + ztrees.add(ztree); + } + return ztrees; + } + + /** + * 查询已发布的分类 + * + * @return 所有已发布的分类 + */ + @Override + public List selectApprovalClasss() { + Classs classs=new Classs(); + classs.setApprovalStatusNo(Classs.APPROVAL_APPROVED); + classs.setCatEntityTypeNo(3L); + List classList=selectClasssList( classs); + return classList; + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommodityServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommodityServiceImpl.java new file mode 100644 index 000000000..1abc9e950 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CommodityServiceImpl.java @@ -0,0 +1,95 @@ +package com.ruoyi.system.service.impl; + +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.system.domain.Commodity; +import com.ruoyi.system.mapper.CommodityMapper; +import com.ruoyi.system.service.ICommodityService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * CC码Service业务层处理 + * + * @author ruoyi + * @date 2021-09-02 + */ +@Service +public class CommodityServiceImpl implements ICommodityService +{ + @Autowired + private CommodityMapper commodityMapper; + + /** + * 查询CC码 + * + * @param commodityNo CC码主键 + * @return CC码 + */ + @Override + public Commodity selectCommodityByCommodityNo(Long commodityNo) + { + return commodityMapper.selectCommodityByCommodityNo(commodityNo); + } + + /** + * 查询CC码列表 + * + * @param commodity CC码 + * @return CC码 + */ + @Override + public List selectCommodityList(Commodity commodity) + { + return commodityMapper.selectCommodityList(commodity); + } + + /** + * 新增CC码 + * + * @param commodity CC码 + * @return 结果 + */ + @Override + public int insertCommodity(Commodity commodity) + { + return commodityMapper.insertCommodity(commodity); + } + + /** + * 修改CC码 + * + * @param commodity CC码 + * @return 结果 + */ + @Override + public int updateCommodity(Commodity commodity) + { + return commodityMapper.updateCommodity(commodity); + } + + /** + * 批量删除CC码 + * + * @param commodityNos 需要删除的CC码主键 + * @return 结果 + */ + @Override + public int deleteCommodityByCommodityNos(String commodityNos) + { + return commodityMapper.deleteCommodityByCommodityNos(Convert.toStrArray(commodityNos)); + } + + /** + * 删除CC码信息 + * + * @param commodityNo CC码主键 + * @return 结果 + */ + @Override + public int deleteCommodityByCommodityNo(Long commodityNo) + { + return commodityMapper.deleteCommodityByCommodityNo(commodityNo); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppDataService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppDataService.java new file mode 100644 index 000000000..90b598d40 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppDataService.java @@ -0,0 +1,64 @@ +package com.ruoyi.system.service.impl; + +import com.ruoyi.system.domain.SysAppData; + +import java.util.List; + +/** + * 编码申请数据Service接口 + * + * @author ruoyi + * @date 2021-09-29 + */ +public interface ISysAppDataService +{ + /** + * 查询编码申请数据 + * + * @param appDataId 编码申请数据主键 + * @return 编码申请数据 + */ + public SysAppData selectSysAppDataByAppDataId(Long appDataId); + + /** + * 查询编码申请数据列表 + * + * @param sysAppData 编码申请数据 + * @return 编码申请数据集合 + */ + public List selectSysAppDataList(SysAppData sysAppData); + + /** + * 新增编码申请数据 + * + * @param sysAppData 编码申请数据 + * @return 结果 + */ + public int insertSysAppData(SysAppData sysAppData); + + /** + * 修改编码申请数据 + * + * @param sysAppData 编码申请数据 + * @return 结果 + */ + public int updateSysAppData(SysAppData sysAppData); + + /** + * 批量删除编码申请数据 + * + * @param appDataIds 需要删除的编码申请数据主键集合 + * @return 结果 + */ + public int deleteSysAppDataByAppDataIds(String appDataIds); + + /** + * 删除编码申请数据信息 + * + * @param appDataId 编码申请数据主键 + * @return 结果 + */ + public int deleteSysAppDataByAppDataId(Long appDataId); + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppService.java new file mode 100644 index 000000000..c12813bfb --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ISysAppService.java @@ -0,0 +1,68 @@ +package com.ruoyi.system.service.impl; + +import com.ruoyi.system.domain.SysApp; + +import java.util.List; + +/** + * 编码申请Service接口 + * + * @author ruoyi + * @date 2021-09-29 + */ +public interface ISysAppService +{ + /** + * 查询编码申请 + * + * @param appId 编码申请主键 + * @return 编码申请 + */ + public SysApp selectSysAppByAppId(Long appId); + + /** + * 查询编码申请列表 + * + * @param sysApp 编码申请 + * @return 编码申请集合 + */ + public List selectSysAppList(SysApp sysApp); + + /** + * 新增编码申请 + * + * @param sysApp 编码申请 + * @return 结果 + */ + public int insertSysApp(SysApp sysApp); + + /** + * 修改编码申请 + * + * @param sysApp 编码申请 + * @return 结果 + */ + public int updateSysApp(SysApp sysApp); + + /** + * 批量删除编码申请 + * + * @param appIds 需要删除的编码申请主键集合 + * @return 结果 + */ + public int deleteSysAppByAppIds(String appIds); + + /** + * 删除编码申请信息 + * + * @param appId 编码申请主键 + * @return 结果 + */ + public int deleteSysAppByAppId(Long appId); + /** + * 根据所有申请单 + * + * @return 申请单集合信息 + */ + public List selectAppAll(); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppDataServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppDataServiceImpl.java new file mode 100644 index 000000000..08022fb15 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppDataServiceImpl.java @@ -0,0 +1,97 @@ +package com.ruoyi.system.service.impl; + +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.system.domain.SysAppData; +import com.ruoyi.system.mapper.SysAppDataMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 编码申请数据Service业务层处理 + * + * @author ruoyi + * @date 2021-09-29 + */ +@Service +public class SysAppDataServiceImpl implements ISysAppDataService +{ + @Autowired + private SysAppDataMapper sysAppDataMapper; + + /** + * 查询编码申请数据 + * + * @param appDataId 编码申请数据主键 + * @return 编码申请数据 + */ + @Override + public SysAppData selectSysAppDataByAppDataId(Long appDataId) + { + return sysAppDataMapper.selectSysAppDataByAppDataId(appDataId); + } + + /** + * 查询编码申请数据列表 + * + * @param sysAppData 编码申请数据 + * @return 编码申请数据 + */ + @Override + public List selectSysAppDataList(SysAppData sysAppData) + { + return sysAppDataMapper.selectSysAppDataList(sysAppData); + } + + /** + * 新增编码申请数据 + * + * @param sysAppData 编码申请数据 + * @return 结果 + */ + @Override + public int insertSysAppData(SysAppData sysAppData) + { + sysAppData.setCreateTime(DateUtils.getNowDate()); + return sysAppDataMapper.insertSysAppData(sysAppData); + } + + /** + * 修改编码申请数据 + * + * @param sysAppData 编码申请数据 + * @return 结果 + */ + @Override + public int updateSysAppData(SysAppData sysAppData) + { + sysAppData.setUpdateTime(DateUtils.getNowDate()); + return sysAppDataMapper.updateSysAppData(sysAppData); + } + + /** + * 批量删除编码申请数据 + * + * @param appDataIds 需要删除的编码申请数据主键 + * @return 结果 + */ + @Override + public int deleteSysAppDataByAppDataIds(String appDataIds) + { + return sysAppDataMapper.deleteSysAppDataByAppDataIds(Convert.toStrArray(appDataIds)); + } + + /** + * 删除编码申请数据信息 + * + * @param appDataId 编码申请数据主键 + * @return 结果 + */ + @Override + public int deleteSysAppDataByAppDataId(Long appDataId) + { + return sysAppDataMapper.deleteSysAppDataByAppDataId(appDataId); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppServiceImpl.java new file mode 100644 index 000000000..b278e1aba --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysAppServiceImpl.java @@ -0,0 +1,103 @@ +package com.ruoyi.system.service.impl; + +import com.ruoyi.common.core.text.Convert; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.system.domain.SysApp; +import com.ruoyi.system.mapper.SysAppMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 编码申请Service业务层处理 + * + * @author ruoyi + * @date 2021-09-29 + */ +@Service +public class SysAppServiceImpl implements ISysAppService +{ + @Autowired + private SysAppMapper sysAppMapper; + + /** + * 查询编码申请 + * + * @param appId 编码申请主键 + * @return 编码申请 + */ + @Override + public SysApp selectSysAppByAppId(Long appId) + { + return sysAppMapper.selectSysAppByAppId(appId); + } + + /** + * 查询编码申请列表 + * + * @param sysApp 编码申请 + * @return 编码申请 + */ + @Override + public List selectSysAppList(SysApp sysApp) + { + return sysAppMapper.selectSysAppList(sysApp); + } + + /** + * 新增编码申请 + * + * @param sysApp 编码申请 + * @return 结果 + */ + @Override + public int insertSysApp(SysApp sysApp) + { + sysApp.setCreateTime(DateUtils.getNowDate()); + return sysAppMapper.insertSysApp(sysApp); + } + + /** + * 修改编码申请 + * + * @param sysApp 编码申请 + * @return 结果 + */ + @Override + public int updateSysApp(SysApp sysApp) + { + sysApp.setUpdateTime(DateUtils.getNowDate()); + return sysAppMapper.updateSysApp(sysApp); + } + + /** + * 批量删除编码申请 + * + * @param appIds 需要删除的编码申请主键 + * @return 结果 + */ + @Override + public int deleteSysAppByAppIds(String appIds) + { + return sysAppMapper.deleteSysAppByAppIds(Convert.toStrArray(appIds)); + } + + /** + * 删除编码申请信息 + * + * @param appId 编码申请主键 + * @return 结果 + */ + @Override + public int deleteSysAppByAppId(Long appId) + { + return sysAppMapper.deleteSysAppByAppId(appId); + } + + @Override + public List selectAppAll() { + return sysAppMapper.selectAppAll(); + } + +} diff --git a/ruoyi-system/src/main/resources/mapper/system/AttribMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AttribMapper.xml new file mode 100644 index 000000000..60e482c98 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/AttribMapper.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select attrib_no, attrib_id, catalog_no, calc_param, physical_value_type, physical_value_unit_id, descr, commodity_level, size_ref_level, part_level, modeller_level, def_scope, stat, attrib_category_no, draw_discipline_no, def_usr_id, def_date, def_appl_no, upd_usr_id, upd_date, upd_appl_no, match_weighting_no, is_system from attrib + + + + + + + + + + SELECT seq_attrib.NEXTVAL as attribNo FROM DUAL + + insert into attrib + + attrib_no, + attrib_id, + catalog_no, + calc_param, + physical_value_type, + physical_value_unit_id, + descr, + commodity_level, + size_ref_level, + part_level, + modeller_level, + def_scope, + stat, + attrib_category_no, + draw_discipline_no, + def_usr_id, + def_date, + def_appl_no, + upd_usr_id, + upd_date, + upd_appl_no, + match_weighting_no, + is_system, + + + #{attribNo}, + #{attribId}, + #{catalogNo}, + #{calcParam}, + #{physicalValueType}, + #{physicalValueUnitId}, + #{descr}, + #{commodityLevel}, + #{sizeRefLevel}, + #{partLevel}, + #{modellerLevel}, + #{defScope}, + #{stat}, + #{attribCategoryNo}, + #{drawDisciplineNo}, + #{defUsrId}, + #{defDate}, + #{defApplNo}, + #{updUsrId}, + #{updDate}, + #{updApplNo}, + #{matchWeightingNo}, + #{isSystem}, + + + + + update attrib + + attrib_id = #{attribId}, + catalog_no = #{catalogNo}, + calc_param = #{calcParam}, + physical_value_type = #{physicalValueType}, + physical_value_unit_id = #{physicalValueUnitId}, + descr = #{descr}, + commodity_level = #{commodityLevel}, + size_ref_level = #{sizeRefLevel}, + part_level = #{partLevel}, + modeller_level = #{modellerLevel}, + def_scope = #{defScope}, + stat = #{stat}, + attrib_category_no = #{attribCategoryNo}, + draw_discipline_no = #{drawDisciplineNo}, + def_usr_id = #{defUsrId}, + def_date = #{defDate}, + def_appl_no = #{defApplNo}, + upd_usr_id = #{updUsrId}, + upd_date = #{updDate}, + upd_appl_no = #{updApplNo}, + match_weighting_no = #{matchWeightingNo}, + is_system = #{isSystem}, + + where attrib_no = #{attribNo} + + + + delete from attrib where attrib_no = #{attribNo} + + + + delete from attrib where attrib_no in + + #{attribNo} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/AttribValueMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AttribValueMapper.xml new file mode 100644 index 000000000..cb8a6ebfb --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/AttribValueMapper.xml @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + select attrib_value_no, value_text, catalog_no, attrib_equiv_set_no, attrib_represent_no, def_usr_id, def_date, upd_usr_id, upd_date from attrib_value + + + + + + + + + + + + SELECT seq_attrib_value.NEXTVAL as attribValueNo FROM DUAL + + insert into attrib_value + + attrib_value_no, + value_text, + catalog_no, + attrib_equiv_set_no, + attrib_represent_no, + def_usr_id, + def_date, + upd_usr_id, + upd_date, + + + #{attribValueNo}, + #{valueText}, + #{catalogNo}, + #{attribEquivSetNo}, + #{attribRepresentNo}, + #{defUsrId}, + #{defDate}, + #{updUsrId}, + #{updDate}, + + + + + update attrib_value + + value_text = #{valueText}, + catalog_no = #{catalogNo}, + attrib_equiv_set_no = #{attribEquivSetNo}, + attrib_represent_no = #{attribRepresentNo}, + def_usr_id = #{defUsrId}, + def_date = #{defDate}, + upd_usr_id = #{updUsrId}, + upd_date = #{updDate}, + + where attrib_value_no = #{attribValueNo} + + + + delete from attrib_value where attrib_value_no = #{attribValueNo} + + + + delete from attrib_value where attrib_value_no in + + #{attribValueNo} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/ClasssMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ClasssMapper.xml new file mode 100644 index 000000000..a61715ce3 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/ClasssMapper.xml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select class_no, class_id, catalog_no, seq_no, descr, stat, approval_status_no, parent_class_no, draw_discipline_no, cat_entity_type_no, can_instantiate, branch_code, def_scope_no, bolts_required, bolt_at_size_no, spec_short_code_no, comp_category_no, spec_comp_group_no, unit_id, commodity_code_pref, uniqueness, allow_size_less, def_appl_no, def_usr_id, def_date, upd_appl_no, upd_usr_id, upd_date from class + + + + + + + + + SELECT seq_class.NEXTVAL as classNo FROM DUAL + + insert into class + + class_no, + class_id, + catalog_no, + seq_no, + descr, + stat, + approval_status_no, + parent_class_no, + draw_discipline_no, + cat_entity_type_no, + can_instantiate, + branch_code, + def_scope_no, + bolts_required, + bolt_at_size_no, + spec_short_code_no, + comp_category_no, + spec_comp_group_no, + unit_id, + commodity_code_pref, + uniqueness, + allow_size_less, + def_appl_no, + def_usr_id, + def_date, + upd_appl_no, + upd_usr_id, + upd_date, + + + #{classNo}, + #{classId}, + #{catalogNo}, + #{seqNo}, + #{descr}, + #{stat}, + #{approvalStatusNo}, + #{parentClassNo}, + #{drawDisciplineNo}, + #{catEntityTypeNo}, + #{canInstantiate}, + #{branchCode}, + #{defScopeNo}, + #{boltsRequired}, + #{boltAtSizeNo}, + #{specShortCodeNo}, + #{compCategoryNo}, + #{specCompGroupNo}, + #{unitId}, + #{commodityCodePref}, + #{uniqueness}, + #{allowSizeLess}, + #{defApplNo}, + #{defUsrId}, + #{defDate}, + #{updApplNo}, + #{updUsrId}, + #{updDate}, + + + + + update class + + class_id = #{classId}, + catalog_no = #{catalogNo}, + seq_no = #{seqNo}, + descr = #{descr}, + stat = #{stat}, + approval_status_no = #{approvalStatusNo}, + parent_class_no = #{parentClassNo}, + draw_discipline_no = #{drawDisciplineNo}, + cat_entity_type_no = #{catEntityTypeNo}, + can_instantiate = #{canInstantiate}, + branch_code = #{branchCode}, + def_scope_no = #{defScopeNo}, + bolts_required = #{boltsRequired}, + bolt_at_size_no = #{boltAtSizeNo}, + spec_short_code_no = #{specShortCodeNo}, + comp_category_no = #{compCategoryNo}, + spec_comp_group_no = #{specCompGroupNo}, + unit_id = #{unitId}, + commodity_code_pref = #{commodityCodePref}, + uniqueness = #{uniqueness}, + allow_size_less = #{allowSizeLess}, + def_appl_no = #{defApplNo}, + def_usr_id = #{defUsrId}, + def_date = #{defDate}, + upd_appl_no = #{updApplNo}, + upd_usr_id = #{updUsrId}, + upd_date = #{updDate}, + + where class_no = #{classNo} + + + + delete from class where class_no = #{classNo} + + + + delete from class where class_no in + + #{classNo} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/CommodityMapper.xml b/ruoyi-system/src/main/resources/mapper/system/CommodityMapper.xml new file mode 100644 index 000000000..2d0810a85 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/CommodityMapper.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select commodity_no, commodity_id, fake_unique, catalog_no, commodity_class_no, def_method_no, datasheet_reqd, prnt_part_no, unit_id, commodity_code_orig, approval_status_no, stat, def_usr_id, def_date, upd_usr_id, upd_date, spec_entry_no from commodity + + + + + + + + + SELECT seq_commodity.NEXTVAL as commodityNo FROM DUAL + + insert into commodity + + commodity_no, + commodity_id, + fake_unique, + catalog_no, + commodity_class_no, + def_method_no, + datasheet_reqd, + prnt_part_no, + unit_id, + commodity_code_orig, + approval_status_no, + stat, + def_usr_id, + def_date, + upd_usr_id, + upd_date, + spec_entry_no, + + + #{commodityNo}, + #{commodityId}, + #{fakeUnique}, + #{catalogNo}, + #{commodityClassNo}, + #{defMethodNo}, + #{datasheetReqd}, + #{prntPartNo}, + #{unitId}, + #{commodityCodeOrig}, + #{approvalStatusNo}, + #{stat}, + #{defUsrId}, + #{defDate}, + #{updUsrId}, + #{updDate}, + #{specEntryNo}, + + + + + update commodity + + commodity_id = #{commodityId}, + fake_unique = #{fakeUnique}, + catalog_no = #{catalogNo}, + commodity_class_no = #{commodityClassNo}, + def_method_no = #{defMethodNo}, + datasheet_reqd = #{datasheetReqd}, + prnt_part_no = #{prntPartNo}, + unit_id = #{unitId}, + commodity_code_orig = #{commodityCodeOrig}, + approval_status_no = #{approvalStatusNo}, + stat = #{stat}, + def_usr_id = #{defUsrId}, + def_date = #{defDate}, + upd_usr_id = #{updUsrId}, + upd_date = #{updDate}, + spec_entry_no = #{specEntryNo}, + + where commodity_no = #{commodityNo} + + + + delete from commodity where commodity_no = #{commodityNo} + + + + delete from commodity where commodity_no in + + #{commodityNo} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/SysAppDataMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysAppDataMapper.xml new file mode 100644 index 000000000..004f3616f --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/SysAppDataMapper.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select app_data_id, app_id, type, code, design_desc, zh_cn_short_desc, zh_cn_long_desc, zh_en_short_desc, zh_en_long_desc, ru_cn_short_desc, ru_cn_long_desc, ru_en_short_desc, ru_en_long_desc, en_cn_short_desc, en_cn_long_desc, en_en_short_desc, en_en_long_desc, status, create_by, create_time, update_by, update_time, remark from sys_app_data + + + + + + + + insert into sys_app_data + + app_data_id, + app_id, + type, + code, + design_desc, + zh_cn_short_desc, + zh_cn_long_desc, + zh_en_short_desc, + zh_en_long_desc, + ru_cn_short_desc, + ru_cn_long_desc, + ru_en_short_desc, + ru_en_long_desc, + en_cn_short_desc, + en_cn_long_desc, + en_en_short_desc, + en_en_long_desc, + status, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{appDataId}, + #{appId}, + #{type}, + #{code}, + #{designDesc}, + #{zhCnShortDesc}, + #{zhCnLongDesc}, + #{zhEnShortDesc}, + #{zhEnLongDesc}, + #{ruCnShortDesc}, + #{ruCnLongDesc}, + #{ruEnShortDesc}, + #{ruEnLongDesc}, + #{enCnShortDesc}, + #{enCnLongDesc}, + #{enEnShortDesc}, + #{enEnLongDesc}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_app_data + + app_id = #{appId}, + type = #{type}, + code = #{code}, + design_desc = #{designDesc}, + zh_cn_short_desc = #{zhCnShortDesc}, + zh_cn_long_desc = #{zhCnLongDesc}, + zh_en_short_desc = #{zhEnShortDesc}, + zh_en_long_desc = #{zhEnLongDesc}, + ru_cn_short_desc = #{ruCnShortDesc}, + ru_cn_long_desc = #{ruCnLongDesc}, + ru_en_short_desc = #{ruEnShortDesc}, + ru_en_long_desc = #{ruEnLongDesc}, + en_cn_short_desc = #{enCnShortDesc}, + en_cn_long_desc = #{enCnLongDesc}, + en_en_short_desc = #{enEnShortDesc}, + en_en_long_desc = #{enEnLongDesc}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where app_data_id = #{appDataId} + + + + delete from sys_app_data where app_data_id = #{appDataId} + + + + delete from sys_app_data where app_data_id in + + #{appDataId} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/SysAppMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysAppMapper.xml new file mode 100644 index 000000000..5fa22996b --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/SysAppMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + select app_id, app_code, category_id, app_name, status, create_by, create_time, update_by, update_time, remark from sys_app + + + + + + + + + insert into sys_app + + app_id, + app_code, + category_id, + app_name, + status, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{appId}, + #{appCode}, + #{categoryId}, + #{appName}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_app + + app_code = #{appCode}, + category_id = #{categoryId}, + app_name = #{appName}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where app_id = #{appId} + + + + delete from sys_app where app_id = #{appId} + + + + delete from sys_app where app_id in + + #{appId} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/include.html b/ruoyi-system/src/main/resources/templates/include.html new file mode 100644 index 000000000..4b3c1070e --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/include.html @@ -0,0 +1,222 @@ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ +
+ + +
+ + +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ + +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+
+ + +
+ + +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
diff --git a/ruoyi-system/src/main/resources/templates/system/app/add.html b/ruoyi-system/src/main/resources/templates/system/app/add.html new file mode 100644 index 000000000..904b58c3f --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/app/add.html @@ -0,0 +1,58 @@ + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/app/app.html b/ruoyi-system/src/main/resources/templates/system/app/app.html new file mode 100644 index 000000000..1ddb405e0 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/app/app.html @@ -0,0 +1,124 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/app/edit.html b/ruoyi-system/src/main/resources/templates/system/app/edit.html new file mode 100644 index 000000000..b10f8783b --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/app/edit.html @@ -0,0 +1,59 @@ + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/app/fuwenben.html b/ruoyi-system/src/main/resources/templates/system/app/fuwenben.html new file mode 100644 index 000000000..7e9b57c9d --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/app/fuwenben.html @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/data/add.html b/ruoyi-system/src/main/resources/templates/system/data/add.html new file mode 100644 index 000000000..3d8f466c6 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/data/add.html @@ -0,0 +1,146 @@ + + + + + + + + +
+
+
+ +
+ +
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+
+   + +
+
+ + + + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/data/data.html b/ruoyi-system/src/main/resources/templates/system/data/data.html new file mode 100644 index 000000000..277f6a2d9 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/data/data.html @@ -0,0 +1,224 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/templates/system/data/edit.html b/ruoyi-system/src/main/resources/templates/system/data/edit.html new file mode 100644 index 000000000..7b1360ec5 --- /dev/null +++ b/ruoyi-system/src/main/resources/templates/system/data/edit.html @@ -0,0 +1,125 @@ + + + + + + +
+
+ +
+ +
+ + 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/sql/ry_20220111.sql b/sql/ry_20220111.sql new file mode 100644 index 000000000..cd0920345 --- /dev/null +++ b/sql/ry_20220111.sql @@ -0,0 +1,185 @@ + +create sequence seq_SYS_APP + increment by 1 + start with 100 + nomaxvalue + nominvalue + cache 20; +-- Create table +create table SYS_APP +( + app_id NUMBER(20) not null, + app_code VARCHAR2(64) not null, + category_id NUMBER(20), + app_name VARCHAR2(50) not null, + status CHAR(1) default 0, + create_by VARCHAR2(64) default '', + create_time DATE, + update_by VARCHAR2(64) default '', + update_time DATE, + remark VARCHAR2(500) +) + tablespace ERM_DATA + pctfree 10 + initrans 1 + maxtrans 255 + storage + ( + initial 64K + next 1M + minextents 1 + maxextents unlimited + ); +-- Add comments to the table +comment on table SYS_APP + is '编码申请表'; +-- Add comments to the columns +comment on column SYS_APP.app_id + is '编码申请单主键seq_sys_app.nextval'; +comment on column SYS_APP.app_code + is '申请编码'; +comment on column SYS_APP.category_id + is '编码体系ID'; +comment on column SYS_APP.app_name + is '申请名称'; +comment on column SYS_APP.status + is '状态(0正常 1通过2驳回)'; +comment on column SYS_APP.create_by + is '创建者'; +comment on column SYS_APP.create_time + is '创建时间'; +comment on column SYS_APP.update_by + is '更新者'; +comment on column SYS_APP.update_time + is '更新时间'; +comment on column SYS_APP.remark + is '备注'; +-- Create/Recreate primary, unique and foreign key constraints +alter table SYS_APP + add constraint PK_SYS_APP primary key (APP_ID) + using index + tablespace ERM_DATA + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 64K + next 1M + minextents 1 + maxextents unlimited + ); +-- 菜单 SQL +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(2004, '编码申请', '2001', '1', '/system/app', 'C', '0', 'system:app:view', '#', 'admin', sysdate, '', null, '编码申请菜单'); + +-- 按钮 SQL +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '编码申请查询', 2004, '1', '#', 'F', '0', 'system:app:list', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '编码申请新增', 2004, '2', '#', 'F', '0', 'system:app:add', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '编码申请修改', 2004, '3', '#', 'F', '0', 'system:app:edit', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '编码申请删除', 2004, '4', '#', 'F', '0', 'system:app:remove', '#', 'admin', sysdate, '', null, ''); + +insert into sys_menu (menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) +values(seq_sys_menu.nextval, '编码申请导出', 2004, '5', '#', 'F', '0', 'system:app:export', '#', 'admin', sysdate, '', null, ''); + + +---20210929 +create sequence seq_SYS_APP_DATA + increment by 1 + start with 100 + nomaxvalue + nominvalue + cache 20; +-- Create table +create table SYS_APP_DATA +( + app_data_id NUMBER(20) not null, + app_id number(20), + type CHAR(1), + cc_code varchar2(500), + design_desc varchar2(4000), + zh_cn_short_desc varchar2(4000), + zh_cn_long_desc varchar2(4000), + zh_en_short_desc varchar2(4000), + zh_en_long_desc varchar2(4000), + ru_cn_short_desc varchar2(4000), + ru_cn_long_desc varchar2(4000), + ru_en_short_desc varchar2(4000), + ru_en_long_desc varchar2(4000), + en_cn_short_desc varchar2(4000), + en_cn_long_desc varchar2(4000), + en_en_short_desc varchar2(4000), + en_en_long_desc varchar2(4000), + status CHAR(1) default '0', + create_by VARCHAR2(64) default '', + create_time DATE, + update_by VARCHAR2(64) default '', + update_time DATE, + remark VARCHAR2(500) +) + tablespace ERM_DATA + pctfree 10 + initrans 1 + maxtrans 255 + storage + ( + initial 64K + next 1M + minextents 1 + maxextents unlimited + ); +-- Add comments to the table +comment on table SYS_APP_DATA is '编码申请数据表'; +-- Add comments to the columns +comment on column SYS_APP_DATA.app_data_id is '申请单明细主键seq_sys_app_data.nextval'; +comment on column SYS_APP_DATA.app_id is '申请单ID'; +comment on column SYS_APP_DATA.type is 'CC或者ID(0:CC,1:ID)'; +comment on column SYS_APP_DATA.cc_code is 'CC代码'; +comment on column SYS_APP_DATA.design_desc is '设计描述'; +comment on column SYS_APP_DATA.zh_cn_short_desc is '中文公制短描述'; +comment on column SYS_APP_DATA.zh_cn_long_desc is '中文公制长描述'; +comment on column SYS_APP_DATA.zh_en_short_desc is '中文英制短描述'; +comment on column SYS_APP_DATA.zh_en_long_desc is '中文英制长描述'; +comment on column SYS_APP_DATA.ru_cn_short_desc is '俄文公制短描述'; +comment on column SYS_APP_DATA.ru_cn_long_desc is '俄文公制长描述'; +comment on column SYS_APP_DATA.ru_en_short_desc is '俄文英制短描述'; +comment on column SYS_APP_DATA.ru_en_long_desc is '俄文英制长描述'; +comment on column SYS_APP_DATA.en_cn_short_desc is '英文公制短描述'; +comment on column SYS_APP_DATA.en_cn_long_desc is '英文公制长描述'; +comment on column SYS_APP_DATA.en_en_short_desc is '英文英制短描述'; +comment on column SYS_APP_DATA.en_en_long_desc is '英文英制长描述'; +comment on column SYS_APP_DATA.status is '状态(0正常 1停用)'; +comment on column SYS_APP_DATA.create_by is '创建者'; +comment on column SYS_APP_DATA.create_time is '创建时间'; +comment on column SYS_APP_DATA.update_by is '更新者'; +comment on column SYS_APP_DATA.update_time is '更新时间'; +comment on column SYS_APP_DATA.remark is '备注'; +-- Create/Recreate primary, unique and foreign key constraints +alter table SYS_APP_DATA + add constraint PK_SYS_APP_DATA primary key (APP_DATA_ID) + using index + tablespace ERM_DATA + pctfree 10 + initrans 2 + maxtrans 255 + storage + ( + initial 64K + next 1M + minextents 1 + maxextents unlimited + ); +alter table SYS_APP_DATA + add constraint FK_SYS_APP_DATA foreign key (APP_ID) + references sys_app (APP_ID) on delete cascade; +alter table SYS_APP_DATA rename column cc_code to CODE; +comment on column SYS_APP_DATA.code is 'CC代码或ID代码'; +alter table SYS_OPER_LOG modify oper_param VARCHAR2(4000); +alter table SYS_OPER_LOG modify json_result VARCHAR2(4000); From aa75b99cfc1536306396e4e1778aaafdb3bf4dcb Mon Sep 17 00:00:00 2001 From: zhuobaoji <931069949@qq.com> Date: Fri, 25 Mar 2022 08:15:58 +0000 Subject: [PATCH 2/4] =?UTF-8?q?!1=201=20*=20=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E7=BE=A4=E5=8F=B7=EF=BC=9A139845794=20*=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=A4=9A=E8=A1=A8=E6=A0=BC=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0=E6=97=B6=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E7=9A=84=E8=A1=A8=E6=A0=BC=E9=85=8D=E7=BD=AE=E4=B8=8D?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82=20*=20?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89ShiroFilterFactoryBean=E9=98=B2?= =?UTF-8?q?=E6=AD=A2=E4=B8=AD=E6=96=87=E8=AF=B7=E6=B1=82=E8=A2=AB=E6=8B=A6?= =?UTF-8?q?=E6=88=AA=20*=20=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AELocalDateTime=E7=B1=BB=E5=9E=8B=E6=97=A0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=97=AE=E9=A2=98=20*=20=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E5=85=BC=E5=AE=B9Weblogic=E7=8E=AF=E5=A2=83=20*=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5Excel=E6=97=B6=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=B8=BALong?= =?UTF-8?q?=E8=BD=AC=E4=B9=89=E4=B8=BA=E7=A9=BA=E9=97=AE=E9=A2=98=20*=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC=E6=89=93=E5=8D=B0=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B8=8D=E8=AF=86=E5=88=AB=E5=A4=9A=E5=B1=82=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E5=B1=9E=E6=80=A7=E5=80=BC=E9=97=AE=E9=A2=98(I4V7YV)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../extensions/print/bootstrap-table-print.js | 2 +- .../main/resources/static/ruoyi/js/ry-ui.js | 9 +- .../src/main/resources/templates/main.html | 2 +- .../common/utils/file/FileUploadUtils.java | 5 +- .../com/ruoyi/common/utils/poi/ExcelUtil.java | 6 +- .../ruoyi/framework/config/ShiroConfig.java | 3 +- .../web/CustomShiroFilterFactoryBean.java | 85 +++++++++++++++++++ 8 files changed, 101 insertions(+), 13 deletions(-) create mode 100644 ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/CustomShiroFilterFactoryBean.java diff --git a/README.md b/README.md index 92e572f8a..71db6bea6 100644 --- a/README.md +++ b/README.md @@ -99,4 +99,4 @@ ## 若依交流群 -QQ群: [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/已满-1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) [![加入QQ群](https://img.shields.io/badge/已满-1382251-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [![加入QQ群](https://img.shields.io/badge/已满-1145125-blue.svg)](https://jq.qq.com/?_wv=1027&k=5yugASz) [![加入QQ群](https://img.shields.io/badge/已满-86752435-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [![加入QQ群](https://img.shields.io/badge/已满-134072510-blue.svg)](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [![加入QQ群](https://img.shields.io/badge/已满-210336300-blue.svg)](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [![加入QQ群](https://img.shields.io/badge/已满-339522636-blue.svg)](https://jq.qq.com/?_wv=1027&k=5omzbKc) [![加入QQ群](https://img.shields.io/badge/已满-130035985-blue.svg)](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [![加入QQ群](https://img.shields.io/badge/已满-143151071-blue.svg)](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [![加入QQ群](https://img.shields.io/badge/已满-158781320-blue.svg)](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [![加入QQ群](https://img.shields.io/badge/已满-201531282-blue.svg)](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [![加入QQ群](https://img.shields.io/badge/已满-101526938-blue.svg)](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [![加入QQ群](https://img.shields.io/badge/已满-264355400-blue.svg)](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) [![加入QQ群](https://img.shields.io/badge/298522656-blue.svg)](https://jq.qq.com/?_wv=1027&k=540WfdEr) \ No newline at end of file +QQ群: [![加入QQ群](https://img.shields.io/badge/已满-1389287-blue.svg)](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [![加入QQ群](https://img.shields.io/badge/已满-1679294-blue.svg)](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [![加入QQ群](https://img.shields.io/badge/已满-1529866-blue.svg)](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [![加入QQ群](https://img.shields.io/badge/已满-1772718-blue.svg)](https://jq.qq.com/?_wv=1027&k=5g75dCU) [![加入QQ群](https://img.shields.io/badge/已满-1366522-blue.svg)](https://jq.qq.com/?_wv=1027&k=58cPoHA) [![加入QQ群](https://img.shields.io/badge/已满-1382251-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [![加入QQ群](https://img.shields.io/badge/已满-1145125-blue.svg)](https://jq.qq.com/?_wv=1027&k=5yugASz) [![加入QQ群](https://img.shields.io/badge/已满-86752435-blue.svg)](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [![加入QQ群](https://img.shields.io/badge/已满-134072510-blue.svg)](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [![加入QQ群](https://img.shields.io/badge/已满-210336300-blue.svg)](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [![加入QQ群](https://img.shields.io/badge/已满-339522636-blue.svg)](https://jq.qq.com/?_wv=1027&k=5omzbKc) [![加入QQ群](https://img.shields.io/badge/已满-130035985-blue.svg)](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [![加入QQ群](https://img.shields.io/badge/已满-143151071-blue.svg)](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [![加入QQ群](https://img.shields.io/badge/已满-158781320-blue.svg)](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [![加入QQ群](https://img.shields.io/badge/已满-201531282-blue.svg)](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [![加入QQ群](https://img.shields.io/badge/已满-101526938-blue.svg)](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [![加入QQ群](https://img.shields.io/badge/已满-264355400-blue.svg)](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) [![加入QQ群](https://img.shields.io/badge/已满-298522656-blue.svg)](https://jq.qq.com/?_wv=1027&k=540WfdEr) [![加入QQ群](https://img.shields.io/badge/139845794-blue.svg)](https://jq.qq.com/?_wv=1027&k=ss91fC4t) \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.js b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.js index 39c82f86a..5578662fa 100644 --- a/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.js +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/bootstrap-table/extensions/print/bootstrap-table-print.js @@ -136,7 +136,7 @@ $.BootstrapTable = class extends $.BootstrapTable { const formatValue = (row, i, column) => { const value = Utils.calculateObjectValue(column, column.printFormatter || column.formatter, - [row[column.field], row, i], row[column.field]) + [$.common.getItemField(row, column.field), row, i], $.common.getItemField(row, column.field)) return typeof value === 'undefined' || value === null ? this.options.undefinedText : value diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index b110f6fd5..cf9e0b5af 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -180,14 +180,15 @@ var table = { if (typeof table.get(this.id).responseHandler == "function") { table.get(this.id).responseHandler(res); } + var thisOptions = table.config[this.id]; if (res.code == web_status.SUCCESS) { - if ($.common.isNotEmpty(table.options.sidePagination) && table.options.sidePagination == 'client') { + if ($.common.isNotEmpty(thisOptions.sidePagination) && thisOptions.sidePagination == 'client') { return res.rows; } else { - if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) { - var column = $.common.isEmpty(table.options.uniqueId) ? table.options.columns[1].field : table.options.uniqueId; + if ($.common.isNotEmpty(thisOptions.rememberSelected) && thisOptions.rememberSelected) { + var column = $.common.isEmpty(thisOptions.uniqueId) ? thisOptions.columns[1].field : thisOptions.uniqueId; $.each(res.rows, function(i, row) { - row.state = $.inArray(row[column], table.rememberSelectedIds[table.options.id]) !== -1; + row.state = $.inArray(row[column], table.rememberSelectedIds[thisOptions.id]) !== -1; }) } return { rows: res.rows, total: res.total }; diff --git a/ruoyi-admin/src/main/resources/templates/main.html b/ruoyi-admin/src/main/resources/templates/main.html index 65ede753b..20ec6bed6 100644 --- a/ruoyi-admin/src/main/resources/templates/main.html +++ b/ruoyi-admin/src/main/resources/templates/main.html @@ -79,7 +79,7 @@

官网:http://www.ruoyi.vip

-

QQ群:满1389287 满1679294 满1529866 满1772718 满1366522 满1382251 满1145125 满86752435 满134072510 满210336300 满339522636 满130035985 满143151071 满158781320 满201531282 满101526938 满264355400 298522656 +

QQ群:满1389287 满1679294 满1529866 满1772718 满1366522 满1382251 满1145125 满86752435 满134072510 满210336300 满339522636 满130035985 满143151071 满158781320 满201531282 满101526938 满264355400 满298522656 139845794

微信:/ *若依

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java index e6dfa8baa..450c020e2 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java @@ -2,6 +2,7 @@ package com.ruoyi.common.utils.file; import java.io.File; import java.io.IOException; +import java.nio.file.Paths; import java.util.Objects; import org.apache.commons.io.FilenameUtils; import org.springframework.web.multipart.MultipartFile; @@ -111,8 +112,8 @@ public class FileUploadUtils String fileName = extractFilename(file); - File desc = getAbsoluteFile(baseDir, fileName); - file.transferTo(desc); + String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath(); + file.transferTo(Paths.get(absPath)); return getPathFileName(baseDir, fileName); } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index 00752a0be..d5329b2aa 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -316,7 +316,7 @@ public class ExcelUtil String dateFormat = field.getAnnotation(Excel.class).dateFormat(); if (StringUtils.isNotEmpty(dateFormat)) { - val = parseDateToStr(dateFormat, (Date) val); + val = parseDateToStr(dateFormat, val); } else { @@ -328,7 +328,7 @@ public class ExcelUtil { val = Convert.toInt(val); } - else if (Long.TYPE == fieldType || Long.class == fieldType) + else if ((Long.TYPE == fieldType || Long.class == fieldType) && StringUtils.isNumeric(Convert.toStr(val))) { val = Convert.toLong(val); } @@ -823,7 +823,7 @@ public class ExcelUtil String dictType = attr.dictType(); if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) { - cell.setCellValue(parseDateToStr(dateFormat, (Date) value)); + cell.setCellValue(parseDateToStr(dateFormat, value)); } else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) { diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java index dac3b872e..e14a3b477 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ShiroConfig.java @@ -28,6 +28,7 @@ import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.framework.shiro.realm.UserRealm; import com.ruoyi.framework.shiro.session.OnlineSessionDAO; import com.ruoyi.framework.shiro.session.OnlineSessionFactory; +import com.ruoyi.framework.shiro.web.CustomShiroFilterFactoryBean; import com.ruoyi.framework.shiro.web.filter.LogoutFilter; import com.ruoyi.framework.shiro.web.filter.captcha.CaptchaValidateFilter; import com.ruoyi.framework.shiro.web.filter.kickout.KickoutSessionFilter; @@ -266,7 +267,7 @@ public class ShiroConfig @Bean public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager) { - ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean(); + CustomShiroFilterFactoryBean shiroFilterFactoryBean = new CustomShiroFilterFactoryBean(); // Shiro的核心安全接口,这个属性是必须的 shiroFilterFactoryBean.setSecurityManager(securityManager); // 身份认证失败,则跳转到登录页面的配置 diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/CustomShiroFilterFactoryBean.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/CustomShiroFilterFactoryBean.java new file mode 100644 index 000000000..1d42bdf75 --- /dev/null +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/shiro/web/CustomShiroFilterFactoryBean.java @@ -0,0 +1,85 @@ +package com.ruoyi.framework.shiro.web; + +import org.apache.shiro.spring.web.ShiroFilterFactoryBean; +import org.apache.shiro.web.filter.InvalidRequestFilter; +import org.apache.shiro.web.filter.mgt.DefaultFilter; +import org.apache.shiro.web.filter.mgt.FilterChainManager; +import org.apache.shiro.web.filter.mgt.FilterChainResolver; +import org.apache.shiro.web.filter.mgt.PathMatchingFilterChainResolver; +import org.apache.shiro.web.mgt.WebSecurityManager; +import org.apache.shiro.web.servlet.AbstractShiroFilter; +import org.apache.shiro.mgt.SecurityManager; +import org.springframework.beans.factory.BeanInitializationException; +import javax.servlet.Filter; +import java.util.Map; + +/** + * 自定义ShiroFilterFactoryBean解决资源中文路径问题 + * + * @author ruoyi + */ +public class CustomShiroFilterFactoryBean extends ShiroFilterFactoryBean +{ + @Override + public Class getObjectType() + { + return MySpringShiroFilter.class; + } + + @Override + protected AbstractShiroFilter createInstance() throws Exception + { + + SecurityManager securityManager = getSecurityManager(); + if (securityManager == null) + { + String msg = "SecurityManager property must be set."; + throw new BeanInitializationException(msg); + } + + if (!(securityManager instanceof WebSecurityManager)) + { + String msg = "The security manager does not implement the WebSecurityManager interface."; + throw new BeanInitializationException(msg); + } + + FilterChainManager manager = createFilterChainManager(); + // Expose the constructed FilterChainManager by first wrapping it in a + // FilterChainResolver implementation. The AbstractShiroFilter implementations + // do not know about FilterChainManagers - only resolvers: + PathMatchingFilterChainResolver chainResolver = new PathMatchingFilterChainResolver(); + chainResolver.setFilterChainManager(manager); + + Map filterMap = manager.getFilters(); + Filter invalidRequestFilter = filterMap.get(DefaultFilter.invalidRequest.name()); + if (invalidRequestFilter instanceof InvalidRequestFilter) + { + // 此处是关键,设置false跳过URL携带中文400,servletPath中文校验bug + ((InvalidRequestFilter) invalidRequestFilter).setBlockNonAscii(false); + } + // Now create a concrete ShiroFilter instance and apply the acquired SecurityManager and built + // FilterChainResolver. It doesn't matter that the instance is an anonymous inner class + // here - we're just using it because it is a concrete AbstractShiroFilter instance that accepts + // injection of the SecurityManager and FilterChainResolver: + return new MySpringShiroFilter((WebSecurityManager) securityManager, chainResolver); + } + + private static final class MySpringShiroFilter extends AbstractShiroFilter + { + protected MySpringShiroFilter(WebSecurityManager webSecurityManager, FilterChainResolver resolver) + { + if (webSecurityManager == null) + { + throw new IllegalArgumentException("WebSecurityManager property cannot be null."); + } + else + { + this.setSecurityManager(webSecurityManager); + if (resolver != null) + { + this.setFilterChainResolver(resolver); + } + } + } + } +} \ No newline at end of file From 191dba93ee009d28c1ee7465601b8971b14adb3a Mon Sep 17 00:00:00 2001 From: sf_zhengweigang <931069949@qq.com> Date: Fri, 25 Mar 2022 16:24:16 +0800 Subject: [PATCH 3/4] 1 --- .../main/java/com/ruoyi/system/controller/AttribController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java index e5ad860dd..d72c505f8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AttribController.java @@ -110,7 +110,7 @@ public class AttribController extends BaseController } /** - * 删除属性 + * 删除属性1 */ @RequiresPermissions("system:attrib:remove") @Log(title = "属性", businessType = BusinessType.DELETE) From e872d462842aaf3a5fb93f3aa6a87a7be971674f Mon Sep 17 00:00:00 2001 From: zhuobaoji <931069949@qq.com> Date: Thu, 7 Apr 2022 02:52:45 +0000 Subject: [PATCH 4/4] =?UTF-8?q?!2=201=20*=20=E4=BF=AE=E5=A4=8DExcel?= =?UTF-8?q?=E6=B3=A8=E8=A7=A3prompt/combo=E5=90=8C=E6=97=B6=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98=20*=20?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=BC=93=E5=AD=98=E4=BF=A1=E6=81=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=83=A8=E9=97=A8ancestors=E7=A5=96=E7=BA=A7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=20*=20=E4=BF=AE=E5=A4=8DURL=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=9B=9E=E9=80=80=E9=94=AE=E8=A2=AB=E7=A6=81=E6=AD=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20*=20=E4=BC=98=E5=8C=96=E8=8F=9C=E5=8D=95=E4=BE=A7?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E6=BB=9A=E5=8A=A8=E6=9D=A1=E5=B0=BA=E5=AF=B8?= =?UTF-8?q?=E5=8F=8A=E9=A2=9C=E8=89=B2=20*=20=E5=8D=87=E7=BA=A7spring-boot?= =?UTF-8?q?=E5=88=B0=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC2.5.12=20=E9=98=B2?= =?UTF-8?q?=E6=AD=A2RCE=E6=BC=8F=E6=B4=9E=20*=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E6=B8=85=E7=90=86=E5=88=86=E9=A1=B5=E7=9A=84=E7=BA=BF=E7=A8=8B?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=96=B9=E6=B3=95=20*=20=E5=8D=87=E7=BA=A7sp?= =?UTF-8?q?ring-boot=E5=88=B0=E6=9C=80=E6=96=B0=E7=89=88=E6=9C=AC2.5.11=20?= =?UTF-8?q?*=20=E5=8D=87=E7=BA=A7fastjson=E5=88=B0=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E7=89=881.2.80=20*=20=E4=BC=98=E5=8C=96IP=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=88=B0=E5=A4=9A=E4=B8=AA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20*=20=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BAexcel?= =?UTF-8?q?=E5=8D=95=E5=85=83=E6=A0=BC=E9=AA=8C=E8=AF=81,=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E5=8F=98=E6=9B=B4=E4=B8=BA=E5=BC=80=E5=A4=B4.?= =?UTF-8?q?=E9=98=B2=E6=AD=A2=E6=AD=A3=E5=B8=B8=E5=86=85=E5=AE=B9=E8=A2=AB?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2=20*=20=E6=B7=BB=E5=8A=A0=E6=96=B0=E7=BE=A4?= =?UTF-8?q?=E5=8F=B7=EF=BC=9A139845794=20*=20=E4=BF=AE=E5=A4=8D=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96=E5=A4=9A=E8=A1=A8=E6=A0=BC=E5=A4=84=E7=90=86?= =?UTF-8?q?=E5=9B=9E=E8=B0=83=E5=87=BD=E6=95=B0=E6=97=B6=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=9A=84=E8=A1=A8=E6=A0=BC=E9=85=8D=E7=BD=AE=E4=B8=8D=E4=B8=80?= =?UTF-8?q?=E8=87=B4=E7=9A=84=E9=97=AE=E9=A2=98=E3=80=82=20*=20=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89ShiroFilterFactoryBean=E9=98=B2=E6=AD=A2?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E8=AF=B7=E6=B1=82=E8=A2=AB=E6=8B=A6=E6=88=AA?= =?UTF-8?q?=20*=20=E4=BC=98=E5=8C=96=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AELo?= =?UTF-8?q?calDateTime=E7=B1=BB=E5=9E=8B=E6=97=A0=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20*=20=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=85=BC=E5=AE=B9Weblogic=E7=8E=AF=E5=A2=83=20*=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AF=BC=E5=85=A5Excel=E6=97=B6=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=B1=BB=E5=9E=8B=E4=B8=BALong=E8=BD=AC?= =?UTF-8?q?=E4=B9=89=E4=B8=BA=E7=A9=BA=E9=97=AE=E9=A2=98=20*=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=A1=A8=E6=A0=BC=E6=89=93=E5=8D=B0=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E8=AF=86=E5=88=AB=E5=A4=9A=E5=B1=82=E5=AF=B9=E8=B1=A1?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=80=BC=E9=97=AE=E9=A2=98(I4V7YV)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 4 +- .../slimscroll/jquery.slimscroll.min.js | 2 +- .../main/resources/static/ruoyi/js/common.js | 2 +- .../core/controller/BaseController.java | 8 ++ .../java/com/ruoyi/common/utils/IpUtils.java | 83 +++++++++++++++++-- .../com/ruoyi/common/utils/PageUtils.java | 8 ++ .../com/ruoyi/common/utils/poi/ExcelUtil.java | 60 ++++---------- .../resources/mapper/system/SysUserMapper.xml | 15 ++-- 8 files changed, 122 insertions(+), 60 deletions(-) diff --git a/pom.xml b/pom.xml index e5c5df597..64fcd257b 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.0.0 2.2.2 1.4.1 - 1.2.79 + 1.2.80 6.1.2 5.10.0 2.11.0 @@ -44,7 +44,7 @@ org.springframework.boot spring-boot-dependencies - 2.5.10 + 2.5.12 pom import diff --git a/ruoyi-admin/src/main/resources/static/js/plugins/slimscroll/jquery.slimscroll.min.js b/ruoyi-admin/src/main/resources/static/js/plugins/slimscroll/jquery.slimscroll.min.js index 374e76982..1e684fbd8 100644 --- a/ruoyi-admin/src/main/resources/static/js/plugins/slimscroll/jquery.slimscroll.min.js +++ b/ruoyi-admin/src/main/resources/static/js/plugins/slimscroll/jquery.slimscroll.min.js @@ -5,4 +5,4 @@ * Version: 1.3.8 * */ -(function($){$.fn.extend({slimScroll:function(options){var defaults={width:"auto",height:"250px",size:"2px",color:"#000",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:false,disableFadeOut:false,railVisible:false,railColor:"#333",railOpacity:0.2,railDraggable:true,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:false,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"};var o=$.extend(defaults,options);this.each(function(){var isOverPanel,isOverBar,isDragg,queueHide,touchDif,barHeight,percentScroll,lastScroll,divS="
",minBarHeight=30,releaseScroll=false;var me=$(this);if(me.parent().hasClass(o.wrapperClass)){var offset=me.scrollTop();bar=me.siblings("."+o.barClass);rail=me.siblings("."+o.railClass);getBarHeight();if($.isPlainObject(options)){if("height" in options&&options.height=="auto"){me.parent().css("height","auto");me.css("height","auto");var height=me.parent().parent().height();me.parent().css("height",height);me.css("height",height)}else{if("height" in options){var h=options.height;me.parent().css("height",h);me.css("height",h)}}if("scrollTo" in options){offset=parseInt(o.scrollTo)}else{if("scrollBy" in options){offset+=parseInt(o.scrollBy)}else{if("destroy" in options){bar.remove();rail.remove();me.unwrap();return}}}scrollContent(offset,false,true)}return}else{if($.isPlainObject(options)){if("destroy" in options){return}}}o.height=(o.height=="auto")?me.parent().height():o.height;var wrapper=$(divS).addClass(o.wrapperClass).css({position:"relative",width:o.width,height:o.height});me.css({width:o.width,height:o.height});var rail=$(divS).addClass(o.railClass).css({width:o.size,height:"100%",position:"absolute",top:0,display:(o.alwaysVisible&&o.railVisible)?"block":"none","border-radius":o.railBorderRadius,background:o.railColor,opacity:o.railOpacity,zIndex:90});var bar=$(divS).addClass(o.barClass).css({background:o.color,width:o.size,position:"absolute",top:0,opacity:o.opacity,display:o.alwaysVisible?"block":"none","border-radius":o.borderRadius,BorderRadius:o.borderRadius,MozBorderRadius:o.borderRadius,WebkitBorderRadius:o.borderRadius,zIndex:99});var posCss=(o.position=="right")?{right:o.distance}:{left:o.distance};rail.css(posCss);bar.css(posCss);me.wrap(wrapper);me.parent().append(bar);me.parent().append(rail);if(o.railDraggable){bar.bind("mousedown",function(e){var $doc=$(document);isDragg=true;t=parseFloat(bar.css("top"));pageY=e.pageY;$doc.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY;bar.css("top",currTop);scrollContent(0,bar.position().top,false)});$doc.bind("mouseup.slimscroll",function(e){isDragg=false;hideBar();$doc.unbind(".slimscroll")});return false}).bind("selectstart.slimscroll",function(e){e.stopPropagation();e.preventDefault();return false})}rail.hover(function(){showBar()},function(){hideBar()});bar.hover(function(){isOverBar=true},function(){isOverBar=false});me.hover(function(){isOverPanel=true;showBar();hideBar()},function(){isOverPanel=false;hideBar()});me.bind("touchstart",function(e,b){if(e.originalEvent.touches.length){touchDif=e.originalEvent.touches[0].pageY}});me.bind("touchmove",function(e){if(!releaseScroll){e.originalEvent.preventDefault()}if(e.originalEvent.touches.length){var diff=(touchDif-e.originalEvent.touches[0].pageY)/o.touchScrollStep;scrollContent(diff,true);touchDif=e.originalEvent.touches[0].pageY}});getBarHeight();if(o.start==="bottom"){bar.css({top:me.outerHeight()-bar.outerHeight()});scrollContent(0,true)}else{if(o.start!=="top"){scrollContent($(o.start).position().top,null,true);if(!o.alwaysVisible){bar.hide()}}}attachWheel(this);function _onWheel(e){if(!isOverPanel){return}var e=e||window.event;var delta=0;if(e.wheelDelta){delta=-e.wheelDelta/120}if(e.detail){delta=e.detail/3}var target=e.target||e.srcTarget||e.srcElement;if($(target).closest("."+o.wrapperClass).is(me.parent())){scrollContent(delta,true)}if(e.preventDefault&&!releaseScroll){e.preventDefault()}if(!releaseScroll){e.returnValue=false}}function scrollContent(y,isWheel,isJump){releaseScroll=false;var delta=y;var maxTop=me.outerHeight()-bar.outerHeight();if(isWheel){delta=parseInt(bar.css("top"))+y*parseInt(o.wheelStep)/100*bar.outerHeight();delta=Math.min(Math.max(delta,0),maxTop);delta=(y>0)?Math.ceil(delta):Math.floor(delta);bar.css({top:delta+"px"})}percentScroll=parseInt(bar.css("top"))/(me.outerHeight()-bar.outerHeight());delta=percentScroll*(me[0].scrollHeight-me.outerHeight());if(isJump){delta=y;var offsetTop=delta/me[0].scrollHeight*me.outerHeight();offsetTop=Math.min(Math.max(offsetTop,0),maxTop);bar.css({top:offsetTop+"px"})}me.scrollTop(delta);me.trigger("slimscrolling",~~delta);showBar();hideBar()}function attachWheel(target){if(window.addEventListener){target.addEventListener("DOMMouseScroll",_onWheel,{capture:false,passive:false});target.addEventListener("mousewheel",_onWheel,{capture:false,passive:false})}else{document.attachEvent("onmousewheel",_onWheel)}}function getBarHeight(){barHeight=Math.max((me.outerHeight()/me[0].scrollHeight)*me.outerHeight(),minBarHeight);bar.css({height:barHeight+"px"});var display=barHeight==me.outerHeight()?"none":"block";bar.css({display:display})}function showBar(){getBarHeight();clearTimeout(queueHide);if(percentScroll==~~percentScroll){releaseScroll=o.allowPageScroll;if(lastScroll!=percentScroll){var msg=(~~percentScroll==0)?"top":"bottom";me.trigger("slimscroll",msg)}}else{releaseScroll=false}lastScroll=percentScroll;if(barHeight>=me.outerHeight()){releaseScroll=true;return}bar.stop(true,true).fadeIn("fast");if(o.railVisible){rail.stop(true,true).fadeIn("fast")}}function hideBar(){if(!o.alwaysVisible){queueHide=setTimeout(function(){if(!(o.disableFadeOut&&isOverPanel)&&!isOverBar&&!isDragg){bar.fadeOut("slow");rail.fadeOut("slow")}},1000)}}});return this}});$.fn.extend({slimscroll:$.fn.slimScroll})})(jQuery); \ No newline at end of file +(function($){$.fn.extend({slimScroll:function(options){var defaults={width:"auto",height:"250px",size:"5px",color:"#99a9bf",position:"right",distance:"1px",start:"top",opacity:0.4,alwaysVisible:false,disableFadeOut:false,railVisible:false,railColor:"#333",railOpacity:0.2,railDraggable:true,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:false,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"};var o=$.extend(defaults,options);this.each(function(){var isOverPanel,isOverBar,isDragg,queueHide,touchDif,barHeight,percentScroll,lastScroll,divS="
",minBarHeight=30,releaseScroll=false;var me=$(this);if(me.parent().hasClass(o.wrapperClass)){var offset=me.scrollTop();bar=me.siblings("."+o.barClass);rail=me.siblings("."+o.railClass);getBarHeight();if($.isPlainObject(options)){if("height" in options&&options.height=="auto"){me.parent().css("height","auto");me.css("height","auto");var height=me.parent().parent().height();me.parent().css("height",height);me.css("height",height)}else{if("height" in options){var h=options.height;me.parent().css("height",h);me.css("height",h)}}if("scrollTo" in options){offset=parseInt(o.scrollTo)}else{if("scrollBy" in options){offset+=parseInt(o.scrollBy)}else{if("destroy" in options){bar.remove();rail.remove();me.unwrap();return}}}scrollContent(offset,false,true)}return}else{if($.isPlainObject(options)){if("destroy" in options){return}}}o.height=(o.height=="auto")?me.parent().height():o.height;var wrapper=$(divS).addClass(o.wrapperClass).css({position:"relative",width:o.width,height:o.height});me.css({width:o.width,height:o.height});var rail=$(divS).addClass(o.railClass).css({width:o.size,height:"100%",position:"absolute",top:0,display:(o.alwaysVisible&&o.railVisible)?"block":"none","border-radius":o.railBorderRadius,background:o.railColor,opacity:o.railOpacity,zIndex:90});var bar=$(divS).addClass(o.barClass).css({background:o.color,width:o.size,position:"absolute",top:0,opacity:o.opacity,display:o.alwaysVisible?"block":"none","border-radius":o.borderRadius,BorderRadius:o.borderRadius,MozBorderRadius:o.borderRadius,WebkitBorderRadius:o.borderRadius,zIndex:99});var posCss=(o.position=="right")?{right:o.distance}:{left:o.distance};rail.css(posCss);bar.css(posCss);me.wrap(wrapper);me.parent().append(bar);me.parent().append(rail);if(o.railDraggable){bar.bind("mousedown",function(e){var $doc=$(document);isDragg=true;t=parseFloat(bar.css("top"));pageY=e.pageY;$doc.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY;bar.css("top",currTop);scrollContent(0,bar.position().top,false)});$doc.bind("mouseup.slimscroll",function(e){isDragg=false;hideBar();$doc.unbind(".slimscroll")});return false}).bind("selectstart.slimscroll",function(e){e.stopPropagation();e.preventDefault();return false})}rail.hover(function(){showBar()},function(){hideBar()});bar.hover(function(){isOverBar=true},function(){isOverBar=false});me.hover(function(){isOverPanel=true;showBar();hideBar()},function(){isOverPanel=false;hideBar()});me.bind("touchstart",function(e,b){if(e.originalEvent.touches.length){touchDif=e.originalEvent.touches[0].pageY}});me.bind("touchmove",function(e){if(!releaseScroll){e.originalEvent.preventDefault()}if(e.originalEvent.touches.length){var diff=(touchDif-e.originalEvent.touches[0].pageY)/o.touchScrollStep;scrollContent(diff,true);touchDif=e.originalEvent.touches[0].pageY}});getBarHeight();if(o.start==="bottom"){bar.css({top:me.outerHeight()-bar.outerHeight()});scrollContent(0,true)}else{if(o.start!=="top"){scrollContent($(o.start).position().top,null,true);if(!o.alwaysVisible){bar.hide()}}}attachWheel(this);function _onWheel(e){if(!isOverPanel){return}var e=e||window.event;var delta=0;if(e.wheelDelta){delta=-e.wheelDelta/120}if(e.detail){delta=e.detail/3}var target=e.target||e.srcTarget||e.srcElement;if($(target).closest("."+o.wrapperClass).is(me.parent())){scrollContent(delta,true)}if(e.preventDefault&&!releaseScroll){e.preventDefault()}if(!releaseScroll){e.returnValue=false}}function scrollContent(y,isWheel,isJump){releaseScroll=false;var delta=y;var maxTop=me.outerHeight()-bar.outerHeight();if(isWheel){delta=parseInt(bar.css("top"))+y*parseInt(o.wheelStep)/100*bar.outerHeight();delta=Math.min(Math.max(delta,0),maxTop);delta=(y>0)?Math.ceil(delta):Math.floor(delta);bar.css({top:delta+"px"})}percentScroll=parseInt(bar.css("top"))/(me.outerHeight()-bar.outerHeight());delta=percentScroll*(me[0].scrollHeight-me.outerHeight());if(isJump){delta=y;var offsetTop=delta/me[0].scrollHeight*me.outerHeight();offsetTop=Math.min(Math.max(offsetTop,0),maxTop);bar.css({top:offsetTop+"px"})}me.scrollTop(delta);me.trigger("slimscrolling",~~delta);showBar();hideBar()}function attachWheel(target){if(window.addEventListener){target.addEventListener("DOMMouseScroll",_onWheel,{capture:false,passive:false});target.addEventListener("mousewheel",_onWheel,{capture:false,passive:false})}else{document.attachEvent("onmousewheel",_onWheel)}}function getBarHeight(){barHeight=Math.max((me.outerHeight()/me[0].scrollHeight)*me.outerHeight(),minBarHeight);bar.css({height:barHeight+"px"});var display=barHeight==me.outerHeight()?"none":"block";bar.css({display:display})}function showBar(){getBarHeight();clearTimeout(queueHide);if(percentScroll==~~percentScroll){releaseScroll=o.allowPageScroll;if(lastScroll!=percentScroll){var msg=(~~percentScroll==0)?"top":"bottom";me.trigger("slimscroll",msg)}}else{releaseScroll=false}lastScroll=percentScroll;if(barHeight>=me.outerHeight()){releaseScroll=true;return}bar.stop(true,true).fadeIn("fast");if(o.railVisible){rail.stop(true,true).fadeIn("fast")}}function hideBar(){if(!o.alwaysVisible){queueHide=setTimeout(function(){if(!(o.disableFadeOut&&isOverPanel)&&!isOverBar&&!isDragg){bar.fadeOut("slow");rail.fadeOut("slow")}},1000)}}});return this}});$.fn.extend({slimscroll:$.fn.slimScroll})})(jQuery); \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js index 068084724..ada827974 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js @@ -511,7 +511,7 @@ window.onload = function() { return _stopIt(event); } var type_e = elem.type.toUpperCase(); - if (name == 'INPUT' && (type_e != 'TEXT' && type_e != 'TEXTAREA' && type_e != 'PASSWORD' && type_e != 'FILE' && type_e != 'SEARCH' && type_e != 'NUMBER' && type_e != 'EMAIL')) { + if (name == 'INPUT' && (type_e != 'TEXT' && type_e != 'TEXTAREA' && type_e != 'PASSWORD' && type_e != 'FILE' && type_e != 'SEARCH' && type_e != 'NUMBER' && type_e != 'EMAIL' && type_e != 'URL')) { return _stopIt(event); } if (name == 'INPUT' && (elem.readOnly == true || elem.disabled == true)) { diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java index aa08bd2e9..c2985040a 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java @@ -72,6 +72,14 @@ public class BaseController } } + /** + * 清理分页的线程变量 + */ + protected void clearPage() + { + PageUtils.clearPage(); + } + /** * 获取request */ diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java index d699215a2..5b3baa002 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IpUtils.java @@ -11,6 +11,12 @@ import javax.servlet.http.HttpServletRequest; */ public class IpUtils { + /** + * 获取客户端IP + * + * @param request 请求对象 + * @return IP地址 + */ public static String getIpAddr(HttpServletRequest request) { if (request == null) @@ -40,15 +46,27 @@ public class IpUtils ip = request.getRemoteAddr(); } - return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip; + return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : getMultistageReverseProxyIp(ip); } + /** + * 检查是否为内部IP地址 + * + * @param ip IP地址 + * @return 结果 + */ public static boolean internalIp(String ip) { byte[] addr = textToNumericFormatV4(ip); return internalIp(addr) || "127.0.0.1".equals(ip); } + /** + * 检查是否为内部IP地址 + * + * @param addr byte地址 + * @return 结果 + */ private static boolean internalIp(byte[] addr) { if (StringUtils.isNull(addr) || addr.length < 2) @@ -109,7 +127,8 @@ public class IpUtils { case 1: l = Long.parseLong(elements[0]); - if ((l < 0L) || (l > 4294967295L)) { + if ((l < 0L) || (l > 4294967295L)) + { return null; } bytes[0] = (byte) (int) (l >> 24 & 0xFF); @@ -119,12 +138,14 @@ public class IpUtils break; case 2: l = Integer.parseInt(elements[0]); - if ((l < 0L) || (l > 255L)) { + if ((l < 0L) || (l > 255L)) + { return null; } bytes[0] = (byte) (int) (l & 0xFF); l = Integer.parseInt(elements[1]); - if ((l < 0L) || (l > 16777215L)) { + if ((l < 0L) || (l > 16777215L)) + { return null; } bytes[1] = (byte) (int) (l >> 16 & 0xFF); @@ -135,13 +156,15 @@ public class IpUtils for (i = 0; i < 2; ++i) { l = Integer.parseInt(elements[i]); - if ((l < 0L) || (l > 255L)) { + if ((l < 0L) || (l > 255L)) + { return null; } bytes[i] = (byte) (int) (l & 0xFF); } l = Integer.parseInt(elements[2]); - if ((l < 0L) || (l > 65535L)) { + if ((l < 0L) || (l > 65535L)) + { return null; } bytes[2] = (byte) (int) (l >> 8 & 0xFF); @@ -151,7 +174,8 @@ public class IpUtils for (i = 0; i < 4; ++i) { l = Integer.parseInt(elements[i]); - if ((l < 0L) || (l > 255L)) { + if ((l < 0L) || (l > 255L)) + { return null; } bytes[i] = (byte) (int) (l & 0xFF); @@ -168,6 +192,11 @@ public class IpUtils return bytes; } + /** + * 获取IP地址 + * + * @return 本地IP地址 + */ public static String getHostIp() { try @@ -180,6 +209,11 @@ public class IpUtils return "127.0.0.1"; } + /** + * 获取主机名 + * + * @return 本地主机名 + */ public static String getHostName() { try @@ -191,4 +225,39 @@ public class IpUtils } return "未知"; } + + /** + * 从多级反向代理中获得第一个非unknown IP地址 + * + * @param ip 获得的IP地址 + * @return 第一个非unknown IP地址 + */ + public static String getMultistageReverseProxyIp(String ip) + { + // 多级反向代理检测 + if (ip != null && ip.indexOf(",") > 0) + { + final String[] ips = ip.trim().split(","); + for (String subIp : ips) + { + if (false == isUnknown(subIp)) + { + ip = subIp; + break; + } + } + } + return ip; + } + + /** + * 检测给定字符串是否为未知,多用于检测HTTP请求相关 + * + * @param checkString 被检测的字符串 + * @return 是否未知 + */ + public static boolean isUnknown(String checkString) + { + return StringUtils.isBlank(checkString) || "unknown".equalsIgnoreCase(checkString); + } } \ No newline at end of file diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java index 7db37a2fe..0585396c9 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/PageUtils.java @@ -27,4 +27,12 @@ public class PageUtils extends PageHelper PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable); } } + + /** + * 清理分页的线程变量 + */ + public static void clearPage() + { + PageHelper.clearPage(); + } } diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java index d5329b2aa..c6669fb7f 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java @@ -22,6 +22,7 @@ import java.util.Set; import java.util.UUID; import java.util.stream.Collectors; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.RegExUtils; import org.apache.poi.hssf.usermodel.HSSFClientAnchor; import org.apache.poi.hssf.usermodel.HSSFPicture; import org.apache.poi.hssf.usermodel.HSSFPictureData; @@ -88,6 +89,8 @@ public class ExcelUtil { private static final Logger log = LoggerFactory.getLogger(ExcelUtil.class); + public static final String FORMULA_REGEX_STR = "=|-|\\+|@"; + public static final String[] FORMULA_STR = { "=", "-", "+", "@" }; /** @@ -714,9 +717,9 @@ public class ExcelUtil { String cellValue = Convert.toStr(value); // 对于任何以表达式触发字符 =-+@开头的单元格,直接使用tab字符作为前缀,防止CSV注入。 - if (StringUtils.containsAny(cellValue, FORMULA_STR)) + if (StringUtils.startsWithAny(cellValue, FORMULA_STR)) { - cellValue = StringUtils.replaceEach(cellValue, FORMULA_STR, new String[] { "\t=", "\t-", "\t+", "\t@" }); + cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0"); } cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix()); } @@ -783,17 +786,10 @@ public class ExcelUtil // 设置列宽 sheet.setColumnWidth(column, (int) ((attr.width() + 0.72) * 256)); } - // 如果设置了提示信息则鼠标放上去提示. - if (StringUtils.isNotEmpty(attr.prompt())) + if (StringUtils.isNotEmpty(attr.prompt()) || attr.combo().length > 0) { - // 这里默认设了2-101列提示. - setXSSFPrompt(sheet, "", attr.prompt(), 1, 100, column, column); - } - // 如果设置了combo属性则本列只能选择不能输入 - if (attr.combo().length > 0) - { - // 这里默认设了2-101列只能选择不能输入. - setXSSFValidation(sheet, attr.combo(), 1, 100, column, column); + // 提示信息或只能选择不能输入的列内容. + setPromptOrValidation(sheet, attr.combo(), attr.prompt(), 1, 100, column, column); } } @@ -857,48 +853,29 @@ public class ExcelUtil } /** - * 设置 POI XSSFSheet 单元格提示 + * 设置 POI XSSFSheet 单元格提示或选择框 * * @param sheet 表单 - * @param promptTitle 提示标题 + * @param textlist 下拉框显示的内容 * @param promptContent 提示内容 * @param firstRow 开始行 * @param endRow 结束行 * @param firstCol 开始列 * @param endCol 结束列 */ - public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow, + public void setPromptOrValidation(Sheet sheet, String[] textlist, String promptContent, int firstRow, int endRow, int firstCol, int endCol) { DataValidationHelper helper = sheet.getDataValidationHelper(); - DataValidationConstraint constraint = helper.createCustomConstraint("DD1"); + DataValidationConstraint constraint = textlist.length > 0 ? helper.createExplicitListConstraint(textlist) : helper.createCustomConstraint("DD1"); CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); DataValidation dataValidation = helper.createValidation(constraint, regions); - dataValidation.createPromptBox(promptTitle, promptContent); - dataValidation.setShowPromptBox(true); - sheet.addValidationData(dataValidation); - } - - /** - * 设置某些列的值只能输入预制的数据,显示下拉框. - * - * @param sheet 要设置的sheet. - * @param textlist 下拉框显示的内容 - * @param firstRow 开始行 - * @param endRow 结束行 - * @param firstCol 开始列 - * @param endCol 结束列 - * @return 设置好的sheet. - */ - public void setXSSFValidation(Sheet sheet, String[] textlist, int firstRow, int endRow, int firstCol, int endCol) - { - DataValidationHelper helper = sheet.getDataValidationHelper(); - // 加载下拉列表内容 - DataValidationConstraint constraint = helper.createExplicitListConstraint(textlist); - // 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列 - CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); - // 数据有效性对象 - DataValidation dataValidation = helper.createValidation(constraint, regions); + if (StringUtils.isNotEmpty(promptContent)) + { + // 如果设置了提示信息则鼠标放上去提示 + dataValidation.createPromptBox("", promptContent); + dataValidation.setShowPromptBox(true); + } // 处理Excel兼容性问题 if (dataValidation instanceof XSSFDataValidation) { @@ -909,7 +886,6 @@ public class ExcelUtil { dataValidation.setSuppressDropDownArrow(false); } - sheet.addValidationData(dataValidation); } diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index 3df50dd86..e322bd66c 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -31,12 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - - - - + + + + + + + @@ -50,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark, - d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status, + d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status from sys_user u left join sys_dept d on u.dept_id = d.dept_id