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 --- 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 t.* from CLASS_ATTRIB t + + and t.class_no = #{classsNo} + + + and t.cat_entity_type_no = 1 + order by t.seq_no + + + + + and attrib_id = #{attribId} + and catalog_no = #{catalogNo} + and calc_param = #{calcParam} + and physical_value_type = #{physicalValueType} + and physical_value_unit_id = #{physicalValueUnitId} + and descr = #{descr} + and commodity_level = #{commodityLevel} + and size_ref_level = #{sizeRefLevel} + and part_level = #{partLevel} + and modeller_level = #{modellerLevel} + and def_scope = #{defScope} + and stat = #{stat} + and attrib_category_no = #{attribCategoryNo} + and draw_discipline_no = #{drawDisciplineNo} + and def_usr_id = #{defUsrId} + and def_date = #{defDate} + and def_appl_no = #{defApplNo} + and upd_usr_id = #{updUsrId} + and upd_date = #{updDate} + and upd_appl_no = #{updApplNo} + and match_weighting_no = #{matchWeightingNo} + and is_system = #{isSystem} + and class_attrib_id = #{class_attrib_id} + + + + + + where attrib_no = #{attribNo} + + + + + 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 + + + + + + and value_text = #{valueText} + and catalog_no = #{catalogNo} + and attrib_equiv_set_no = #{attribEquivSetNo} + and attrib_represent_no = #{attribRepresentNo} + and def_usr_id = #{defUsrId} + and def_date = #{defDate} + and upd_usr_id = #{updUsrId} + and upd_date = #{updDate} + + + + + + where attrib_value_no = #{attribValueNo} + + + + select to_char(listagg(av.attrib_value_no,'@@@')) ids, to_char(listagg(r.represent_type_id||'@'||av.value_text,'@@@')) value,av.attrib_equiv_set_no + from ATTRIB_VALUE av + join attrib_represent t + on av.attrib_represent_no = t.attrib_represent_no + join represent_type r + on r.represent_type_no = t.represent_type_no + where + t.attrib_no = #{attrib_no} + group by av.attrib_equiv_set_no + order by ATTRIB_EQUIV_SET_NO + + + + select distinct p.free_text,e.seq_no, e.entity_property_no, e.entity_property_id, e.descr + from ENTITY_PROPERTY e + join property_formula_detail t + on e.entity_property_no = t.entity_property_no + join property_formula p on t.property_formula_no=p.property_formula_no + where t.class_no = #{class_no} + order by e.seq_no + + + select q.free_text, + e.entity_property_no, + e.entity_property_id, + e.descr, + a.attrib_no, + a.class_attrib_id, + type.represent_type_id, + t.seq_no, + a.descr, + a.seq_no, + a.attrib_equiv_set_no + from property_formula q + join property_formula_detail t + on q.property_formula_no = t.property_formula_no + join attrib_represent ar + on ar.attrib_represent_no = t.attrib_represent_no + join represent_type type + on type.represent_type_no = ar.represent_type_no + join ENTITY_PROPERTY e + on e.entity_property_no = t.entity_property_no + join class_attrib a + on t.class_attrib_no = a.class_attrib_no + where t.class_no = #{class_no} + and e.entity_property_no = #{entity_property_no} + order by q.entity_property_no, t.seq_no + + + + + 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 + + + + + + and class_id = #{classId} + and catalog_no = #{catalogNo} + and seq_no = #{seqNo} + and descr = #{descr} + and stat = #{stat} + and approval_status_no = #{approvalStatusNo} + and parent_class_no = #{parentClassNo} + and draw_discipline_no = #{drawDisciplineNo} + and cat_entity_type_no = #{catEntityTypeNo} + and can_instantiate = #{canInstantiate} + and branch_code = #{branchCode} + and def_scope_no = #{defScopeNo} + and bolts_required = #{boltsRequired} + and bolt_at_size_no = #{boltAtSizeNo} + and spec_short_code_no = #{specShortCodeNo} + and comp_category_no = #{compCategoryNo} + and spec_comp_group_no = #{specCompGroupNo} + and unit_id = #{unitId} + and commodity_code_pref = #{commodityCodePref} + and uniqueness = #{uniqueness} + and allow_size_less = #{allowSizeLess} + and def_appl_no = #{defApplNo} + and def_usr_id = #{defUsrId} + and def_date = #{defDate} + and upd_appl_no = #{updApplNo} + and upd_usr_id = #{updUsrId} + and upd_date = #{updDate} + + order by parent_class_no + + + + select t.class_no, t.class_id, t.catalog_no, t.seq_no, t.descr, t.stat, t.approval_status_no, t.parent_class_no, t.draw_discipline_no, t.cat_entity_type_no, t.can_instantiate, t.branch_code, t.def_scope_no, t.bolts_required, t.bolt_at_size_no, t.spec_short_code_no, t.comp_category_no, t.spec_comp_group_no, t.unit_id, t.commodity_code_pref, t.uniqueness, t.allow_size_less, t.def_appl_no, t.def_usr_id, t.def_date, t.upd_appl_no, t.upd_usr_id, t.upd_date, p.class_id as parent_name + from class t + left join class p on p.class_no = t.parent_class_no + where t.class_no = #{classNo} + + + + + 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 + + + + + + and commodity_id = #{commodityId} + and fake_unique = #{fakeUnique} + and catalog_no = #{catalogNo} + and commodity_class_no = #{commodityClassNo} + and def_method_no = #{defMethodNo} + and datasheet_reqd = #{datasheetReqd} + and prnt_part_no = #{prntPartNo} + and unit_id = #{unitId} + and commodity_code_orig = #{commodityCodeOrig} + and approval_status_no = #{approvalStatusNo} + and stat = #{stat} + and def_usr_id = #{defUsrId} + and def_date = #{defDate} + and upd_usr_id = #{updUsrId} + and upd_date = #{updDate} + and spec_entry_no = #{specEntryNo} + + + + + + where commodity_no = #{commodityNo} + + + + + 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 + + + + + + and app_id = #{appId} + and type = #{type} + and code = #{code} + and design_desc like concat(concat('%', #{designDesc}), '%') + and zh_cn_short_desc like concat(concat('%', #{zhCnShortDesc}), '%') + and zh_cn_long_desc like concat(concat('%', #{zhCnLongDesc}), '%') + and zh_en_short_desc like concat(concat('%', #{zhEnShortDesc}), '%') + and zh_en_long_desc like concat(concat('%', #{zhEnLongDesc}), '%') + and ru_cn_short_desc like concat(concat('%', #{ruCnShortDesc}), '%') + and ru_cn_long_desc like concat(concat('%', #{ruCnLongDesc}), '%') + and ru_en_short_desc like concat(concat('%', #{ruEnShortDesc}), '%') + and ru_en_long_desc like concat(concat('%', #{ruEnLongDesc}), '%') + and en_cn_short_desc like concat(concat('%', #{enCnShortDesc}), '%') + and en_cn_long_desc like concat(concat('%', #{enCnLongDesc}), '%') + and en_en_short_desc like concat(concat('%', #{enEnShortDesc}), '%') + and en_en_long_desc like concat(concat('%', #{enEnLongDesc}), '%') + and status = #{status} + + + + + + where app_data_id = #{appDataId} + + + + 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 + + + + + + and app_code = #{appCode} + and category_id = #{categoryId} + and app_name like concat(concat('%', #{appName}), '%') + and status = #{status} + + + + + + where app_id = #{appId} + + + + + + + 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 @@ + + + + + + + + + + 申请编码: + + + + + + 编码体系ID: + + + + + + 申请名称: + + + + + + 状态: + + + 所有 + + 代码生成请选择字典属性 + + + + 备注: + + + + + + + + + + \ 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 @@ + + + + + + + + + + + + + + 申请编码: + + + + 编码体系ID: + + + + 申请名称: + + + + 状态: + + 所有 + 代码生成请选择字典属性 + + + + 搜索 + 重置 + + + + + + + + + 添加 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + \ 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 @@ + + + + + + + + + + + 申请编码: + + + + + + 编码体系ID: + + + + + + 申请名称: + + + + + + 状态: + + + 所有 + + 代码生成请选择字典属性 + + + + 备注: + + + + + + + + + + \ 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 @@ + + + + + + + + + + + + 材料分类: + + + + + + + + + + CC代码: + + + + + + + + + + + + + 保 存 + 关 闭 + + + + + + + + \ 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 @@ + + + + + + + + + + + + + + 申请单ID: + + + + CC或者ID: + + 所有 + 代码生成请选择字典属性 + + + + CC代码或ID代码: + + + + 设计描述: + + + + 中文公制短描述: + + + + 中文公制长描述: + + + + 中文英制短描述: + + + + 中文英制长描述: + + + + 俄文公制短描述: + + + + 俄文公制长描述: + + + + 俄文英制短描述: + + + + 俄文英制长描述: + + + + 英文公制短描述: + + + + 英文公制长描述: + + + + 英文英制短描述: + + + + 英文英制长描述: + + + + 状态: + + 所有 + 代码生成请选择字典属性 + + + + 搜索 + 重置 + + + + + + + + + 添加 + + + 修改 + + + 删除 + + + 导出 + + + + + + + + + + + \ 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 @@ + + + + + + + + + + + CC或者ID: + + + 所有 + + 代码生成请选择字典属性 + + + + CC代码或ID代码: + + + + + + 设计描述: + + + + + + 中文公制短描述: + + + + + + 中文公制长描述: + + + + + + 中文英制短描述: + + + + + + 中文英制长描述: + + + + + + 俄文公制短描述: + + + + + + 俄文公制长描述: + + + + + + 俄文英制短描述: + + + + + + 俄文英制长描述: + + + + + + 英文公制短描述: + + + + + + 英文公制长描述: + + + + + + 英文英制短描述: + + + + + + 英文英制长描述: + + + + + + 备注: + + + + + + + + + + \ 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);