diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index a8e4af3b4..117c7848e 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -1,5 +1,5 @@ -# 生产环境配置 -ENV = 'production' - -# 若依管理系统/生产环境 -VUE_APP_BASE_API = '/prod-api' +# 生产环境配置 +ENV = 'production' + +# 明仁管理系统/生产环境 +VUE_APP_BASE_API = '/prod-api' diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index ceb331e29..08a66130f 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -1,103 +1,104 @@ -{ - "name": "ruoyi", - "version": "2.0.0", - "description": "若依管理系统", - "author": "若依", - "license": "MIT", - "scripts": { - "dev": "vue-cli-service serve", - "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", - "preview": "node build/index.js --preview", - "lint": "eslint --ext .js,.vue src", - "test:unit": "jest --clearCache && vue-cli-service test:unit", - "test:ci": "npm run lint && npm run test:unit", - "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", - "new": "plop" - }, - "husky": { - "hooks": { - "pre-commit": "lint-staged" - } - }, - "lint-staged": { - "src/**/*.{js,vue}": [ - "eslint --fix", - "git add" - ] - }, - "keywords": [ - "vue", - "admin", - "dashboard", - "element-ui", - "boilerplate", - "admin-template", - "management-system" - ], - "repository": { - "type": "git", - "url": "https://gitee.com/y_project/RuoYi-Vue.git" - }, - "dependencies": { - "@riophae/vue-treeselect": "0.4.0", - "vue-quill-editor": "3.0.6", - "vue-cropper": "0.4.9", - "axios": "0.18.1", - "echarts": "4.2.1", - "element-ui": "2.11.1", - "fuse.js": "3.4.4", - "js-cookie": "2.2.0", - "jsencrypt": "3.0.0-rc.1", - "normalize.css": "7.0.0", - "nprogress": "0.2.0", - "path-to-regexp": "2.4.0", - "screenfull": "4.2.0", - "vue": "2.6.10", - "vue-count-to": "1.0.13", - "vue-router": "3.0.2", - "vue-splitpane": "1.0.4", - "vuex": "3.1.0" - }, - "devDependencies": { - "@babel/core": "7.0.0", - "@babel/register": "7.0.0", - "@vue/cli-plugin-babel": "3.5.3", - "@vue/cli-plugin-eslint": "^3.9.1", - "@vue/cli-plugin-unit-jest": "3.5.3", - "@vue/cli-service": "3.5.3", - "@vue/test-utils": "1.0.0-beta.29", - "autoprefixer": "^9.5.1", - "babel-core": "7.0.0-bridge.0", - "babel-eslint": "10.0.1", - "babel-jest": "23.6.0", - "chalk": "2.4.2", - "chokidar": "2.1.5", - "connect": "3.6.6", - "eslint": "5.15.3", - "eslint-plugin-vue": "5.2.2", - "html-webpack-plugin": "3.2.0", - "http-proxy-middleware": "^0.19.1", - "husky": "1.3.1", - "lint-staged": "8.1.5", - "mockjs": "1.0.1-beta3", - "node-sass": "^4.9.0", - "plop": "2.3.0", - "runjs": "^4.3.2", - "sass-loader": "^7.1.0", - "script-ext-html-webpack-plugin": "2.1.3", - "script-loader": "0.7.2", - "serve-static": "^1.13.2", - "svg-sprite-loader": "4.1.3", - "svgo": "1.2.0", - "vue-template-compiler": "2.6.10" - }, - "engines": { - "node": ">=8.9", - "npm": ">= 3.0.0" - }, - "browserslist": [ - "> 1%", - "last 2 versions" - ] -} +{ + "name": "ruoyi", + "version": "2.0.0", + "description": "明仁管理系统", + "author": "明仁", + "license": "MIT", + "scripts": { + "dev": "vue-cli-service serve", + "build:prod": "vue-cli-service build", + "build:stage": "vue-cli-service build --mode staging", + "preview": "node build/index.js --preview", + "lint": "eslint --ext .js,.vue src", + "test:unit": "jest --clearCache && vue-cli-service test:unit", + "test:ci": "npm run lint && npm run test:unit", + "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", + "new": "plop" + }, + "husky": { + "hooks": { + "pre-commit": "lint-staged" + } + }, + "lint-staged": { + "src/**/*.{js,vue}": [ + "eslint --fix", + "git add" + ] + }, + "keywords": [ + "vue", + "admin", + "dashboard", + "element-ui", + "boilerplate", + "admin-template", + "management-system" + ], + "repository": { + "type": "git", + "url": "https://gitee.com/y_project/RuoYi-Vue.git" + }, + "dependencies": { + "@riophae/vue-treeselect": "0.4.0", + "vue-quill-editor": "3.0.6", + "vue-cropper": "0.4.9", + "axios": "0.18.1", + "echarts": "4.2.1", + "element-ui": "2.11.1", + "fuse.js": "3.4.4", + "js-cookie": "2.2.0", + "jsencrypt": "3.0.0-rc.1", + "normalize.css": "7.0.0", + "nprogress": "0.2.0", + "path-to-regexp": "2.4.0", + "screenfull": "4.2.0", + "vue": "2.6.10", + "vue-count-to": "1.0.13", + "vue-router": "3.0.2", + "vue-splitpane": "1.0.4", + "vuex": "3.1.0" + }, + "devDependencies": { + "@babel/core": "7.0.0", + "@babel/register": "7.0.0", + "@vue/cli-plugin-babel": "3.5.3", + "@vue/cli-plugin-eslint": "^3.9.1", + "@vue/cli-plugin-unit-jest": "3.5.3", + "@vue/cli-service": "3.5.3", + "@vue/test-utils": "1.0.0-beta.29", + "autoprefixer": "^9.7.4", + "babel-core": "7.0.0-bridge.0", + "babel-eslint": "10.0.1", + "babel-jest": "23.6.0", + "chalk": "2.4.2", + "chokidar": "2.1.5", + "connect": "3.6.6", + "eslint": "5.15.3", + "eslint-plugin-vue": "5.2.2", + "html-webpack-plugin": "3.2.0", + "http-proxy-middleware": "^0.19.1", + "husky": "1.3.1", + "lint-staged": "8.1.5", + "mockjs": "1.0.1-beta3", + "node-sass": "^4.9.0", + "plop": "2.3.0", + "runjs": "^4.3.2", + "sass-loader": "^7.1.0", + "script-ext-html-webpack-plugin": "2.1.3", + "script-loader": "0.7.2", + "serve-static": "^1.13.2", + "svg-sprite-loader": "4.1.3", + "svgo": "1.2.0", + "vue-template-compiler": "2.6.10" + }, + "engines": { + "node": ">=8.9", + "npm": ">= 3.0.0" + }, + "browserslist": [ + "> 1%", + "last 2 versions" + ], + "main": ".eslintrc.js" +} diff --git a/ruoyi-ui/src/api/base/calendar.js b/ruoyi-ui/src/api/base/calendar.js new file mode 100644 index 000000000..43ea18a24 --- /dev/null +++ b/ruoyi-ui/src/api/base/calendar.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询考勤日历列表 +export function listCalendar(query) { + return request({ + url: '/base/calendar/list', + method: 'get', + params: query + }) +} + +// 查询考勤日历详细 +export function getCalendar(id) { + return request({ + url: '/base/calendar/' + id, + method: 'get' + }) +} + +// 新增考勤日历 +export function addCalendar(data) { + return request({ + url: '/base/calendar', + method: 'post', + data: data + }) +} + +// 修改考勤日历 +export function updateCalendar(data) { + return request({ + url: '/base/calendar', + method: 'put', + data: data + }) +} + +// 删除考勤日历 +export function delCalendar(id) { + return request({ + url: '/base/calendar/' + id, + method: 'delete' + }) +} + +// 导出考勤日历 +export function exportCalendar(query) { + return request({ + url: '/base/calendar/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/api/base/calendarItem.js b/ruoyi-ui/src/api/base/calendarItem.js new file mode 100644 index 000000000..0e328d3af --- /dev/null +++ b/ruoyi-ui/src/api/base/calendarItem.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询考勤日历明细列表 +export function listCalendarItem(query) { + return request({ + url: '/base/calendarItem/list', + method: 'get', + params: query + }) +} + +// 查询考勤日历明细详细 +export function getCalendarItem(id) { + return request({ + url: '/base/calendarItem/' + id, + method: 'get' + }) +} + +// 新增考勤日历明细 +export function addCalendarItem(data) { + return request({ + url: '/base/calendarItem', + method: 'post', + data: data + }) +} + +// 修改考勤日历明细 +export function updateCalendarItem(data) { + return request({ + url: '/base/calendarItem', + method: 'put', + data: data + }) +} + +// 删除考勤日历明细 +export function delCalendarItem(id) { + return request({ + url: '/base/calendarItem/' + id, + method: 'delete' + }) +} + +// 导出考勤日历明细 +export function exportCalendarItem(query) { + return request({ + url: '/base/calendarItem/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/api/base/company.js b/ruoyi-ui/src/api/base/company.js new file mode 100644 index 000000000..3feefefa9 --- /dev/null +++ b/ruoyi-ui/src/api/base/company.js @@ -0,0 +1,66 @@ +import request from '@/utils/request' + +// 查询公司管理列表 +export function listCompany(query) { + return request({ + url: '/base/company/list', + method: 'get', + params: query + }) +} + +// 查询公司管理详细 +export function getCompany(id) { + return request({ + url: '/base/company/' + id, + method: 'get' + }) +} + +// 新增公司管理 +export function addCompany(data) { + return request({ + url: '/base/company', + method: 'post', + data: data + }) +} + +// 修改公司管理 +export function updateCompany(data) { + return request({ + url: '/base/company', + method: 'put', + data: data + }) +} + +// 公司状态修改 +export function changeCompanyEnabled(id, enabled) { + const data = { + id, + enabled + } + return request({ + url: '/base/company/changeEnabled', + method: 'put', + data: data + }) +} + +// 删除公司管理 +export function delCompany(id) { + return request({ + url: '/base/company/' + id, + method: 'delete' + }) +} + +// 导出公司管理 +export function exportCompany(query) { + return request({ + url: '/base/company/export', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/api/data/currentinventory.js b/ruoyi-ui/src/api/data/currentinventory.js new file mode 100644 index 000000000..133df4da7 --- /dev/null +++ b/ruoyi-ui/src/api/data/currentinventory.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询当前库存存储列表 +export function listCurrentinventory(query) { + return request({ + url: '/data/currentinventory/list', + method: 'get', + params: query + }) +} + +// 查询当前库存存储详细 +export function getCurrentinventory(id) { + return request({ + url: '/data/currentinventory/' + id, + method: 'get' + }) +} + +// 新增当前库存存储 +export function addCurrentinventory(data) { + return request({ + url: '/data/currentinventory', + method: 'post', + data: data + }) +} + +// 修改当前库存存储 +export function updateCurrentinventory(data) { + return request({ + url: '/data/currentinventory', + method: 'put', + data: data + }) +} + +// 删除当前库存存储 +export function delCurrentinventory(id) { + return request({ + url: '/data/currentinventory/' + id, + method: 'delete' + }) +} + +// 导出当前库存存储 +export function exportCurrentinventory(query) { + return request({ + url: '/data/currentinventory/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/ruoyi-ui/src/layout/components/Navbar.vue b/ruoyi-ui/src/layout/components/Navbar.vue index bafb11a01..00fc726c3 100644 --- a/ruoyi-ui/src/layout/components/Navbar.vue +++ b/ruoyi-ui/src/layout/components/Navbar.vue @@ -1,181 +1,177 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 个人中心 - - - 布局设置 - - - 退出登录 - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 个人中心 + + + 布局设置 + + + 退出登录 + + + + + + + + + + diff --git a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue index 021de8eb4..a59464f2f 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/Logo.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/Logo.vue @@ -1,84 +1,84 @@ - - - - - - {{ title }} - - - - {{ title }} - - - - - - - - + + + + + + {{ title }} + + + + {{ title }} + + + + + + + + diff --git a/ruoyi-ui/src/layout/index.vue b/ruoyi-ui/src/layout/index.vue index 4e761eaea..889b7dc15 100644 --- a/ruoyi-ui/src/layout/index.vue +++ b/ruoyi-ui/src/layout/index.vue @@ -1,102 +1,102 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/settings.js b/ruoyi-ui/src/settings.js index ca6d00c9e..2e23cf82e 100644 --- a/ruoyi-ui/src/settings.js +++ b/ruoyi-ui/src/settings.js @@ -1,31 +1,31 @@ -module.exports = { - title: '若依管理系统', - - /** - * 是否系统布局配置 - */ - showSettings: false, - - /** - * 是否显示 tagsView - */ - tagsView: true, - - /** - * 是否固定头部 - */ - fixedHeader: false, - - /** - * 是否显示logo - */ - sidebarLogo: true, - - /** - * @type {string | array} 'production' | ['production', 'development'] - * @description Need show err logs component. - * The default is only used in the production env - * If you want to also use it in dev, you can pass ['production', 'development'] - */ - errorLog: 'production' -} +module.exports = { + title: '明仁管理系统', + + /** + * 是否系统布局配置 + */ + showSettings: false, + + /** + * 是否显示 tagsView + */ + tagsView: true, + + /** + * 是否固定头部 + */ + fixedHeader: false, + + /** + * 是否显示logo + */ + sidebarLogo: false, + + /** + * @type {string | array} 'production' | ['production', 'development'] + * @description Need show err logs component. + * The default is only used in the production env + * If you want to also use it in dev, you can pass ['production', 'development'] + */ + errorLog: 'production' +} diff --git a/ruoyi-ui/src/views/base/calendar/index.vue b/ruoyi-ui/src/views/base/calendar/index.vue new file mode 100644 index 000000000..8b0cf569d --- /dev/null +++ b/ruoyi-ui/src/views/base/calendar/index.vue @@ -0,0 +1,395 @@ + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + {{scope.$index + 1}} + + + + + + + + + 考勤 + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ data.day.split('-').slice(2).join('-') }} {{ data.isSelected ? '休息' : '上班'}} + + + + + + + + + diff --git a/ruoyi-ui/src/views/base/calendarItem/index.vue b/ruoyi-ui/src/views/base/calendarItem/index.vue new file mode 100644 index 000000000..87caa451b --- /dev/null +++ b/ruoyi-ui/src/views/base/calendarItem/index.vue @@ -0,0 +1,308 @@ + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + {{scope.$index + 1}} + + + + + + + {{ parseTime(scope.row.workDay) }} + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/base/company/index.vue b/ruoyi-ui/src/views/base/company/index.vue new file mode 100644 index 000000000..7759cf1fc --- /dev/null +++ b/ruoyi-ui/src/views/base/company/index.vue @@ -0,0 +1,415 @@ + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + {{scope.$index + 1}} + + + + + + + + + + + + + + 考勤 + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/data/currentinventory/index.vue b/ruoyi-ui/src/views/data/currentinventory/index.vue new file mode 100644 index 000000000..c748504f5 --- /dev/null +++ b/ruoyi-ui/src/views/data/currentinventory/index.vue @@ -0,0 +1,657 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导出 + + + + + + + {{scope.$index + 1}} + + + + + + + + + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 请选择字典生成 + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/login.vue b/ruoyi-ui/src/views/login.vue index 867968785..323f3e1ca 100644 --- a/ruoyi-ui/src/views/login.vue +++ b/ruoyi-ui/src/views/login.vue @@ -1,204 +1,204 @@ - - - - 若依后台管理系统 - - - - - - - - - - - - - - - - - - - 记住密码 - - - 登 录 - 登 录 中... - - - - - - - - - - - + + + + 明仁后台管理系统 + + + + + + + + + + + + + + + + + + + 记住密码 + + + 登 录 + 登 录 中... + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/system/notice/index.vue b/ruoyi-ui/src/views/system/notice/index.vue index 404bec3e4..b91f3e066 100644 --- a/ruoyi-ui/src/views/system/notice/index.vue +++ b/ruoyi-ui/src/views/system/notice/index.vue @@ -1,345 +1,344 @@ - - - - - - - - - - - - - - - - 搜索 - 重置 - - - - - - 新增 - - - 修改 - - - 删除 - - - - - - - - - - - - - {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} - - - - - 修改 - 删除 - - - - - - - - - - - - - - - - - - - - - - - - - - {{dict.dictLabel}} - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + + + + + + + + + + + {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + + + {{dict.dictLabel}} + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index d2cdb84a8..eeebe16ac 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -1,663 +1,663 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - - - - - 新增 - - - 修改 - - - 删除 - - - 导入 - - - 导出 - - - - - - - - - - - - - - - - - - {{ parseTime(scope.row.createTime) }} - - - - - 修改 - 删除 - 重置 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{dict.dictLabel}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 将文件拖到此处,或 - 点击上传 - - - 是否更新已经存在的用户数据 - 下载模板 - - 提示:仅允许导入“xls”或“xlsx”格式文件! - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + + + + 新增 + + + 修改 + + + 删除 + + + 导入 + + + 导出 + + + + + + + + + + + + + + + + + + {{ parseTime(scope.row.createTime) }} + + + + + 修改 + 删除 + 重置 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{dict.dictLabel}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 将文件拖到此处,或 + 点击上传 + + + 是否更新已经存在的用户数据 + 下载模板 + + 提示:仅允许导入“xls”或“xlsx”格式文件! + + + + + + + diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 5dce8d694..19787f87c 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -1,130 +1,130 @@ -'use strict' -const path = require('path') -const defaultSettings = require('./src/settings.js') - -function resolve(dir) { - return path.join(__dirname, dir) -} - -const name = defaultSettings.title || '若依管理系统' // 标题 - -const port = process.env.port || process.env.npm_config_port || 80 // 端口 - -// vue.config.js 配置说明 -//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions -// 这里只列一部分,具体配置参考文档 -module.exports = { - // 部署生产环境和开发环境下的URL。 - // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 - // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 - publicPath: process.env.NODE_ENV === "production" ? "/" : "/", - // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) - outputDir: 'dist', - // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) - assetsDir: 'static', - // 是否开启eslint保存检测,有效值:ture | false | 'error' - lintOnSave: process.env.NODE_ENV === 'development', - // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 - productionSourceMap: false, - // webpack-dev-server 相关配置 - devServer: { - host: '0.0.0.0', - port: port, - proxy: { - // detail: https://cli.vuejs.org/config/#devserver-proxy - [process.env.VUE_APP_BASE_API]: { - target: `http://localhost:8080`, - changeOrigin: true, - pathRewrite: { - ['^' + process.env.VUE_APP_BASE_API]: '' - } - } - }, - disableHostCheck: true - }, - configureWebpack: { - name: name, - resolve: { - alias: { - '@': resolve('src') - } - } - }, - chainWebpack(config) { - config.plugins.delete('preload') // TODO: need test - config.plugins.delete('prefetch') // TODO: need test - - // set svg-sprite-loader - config.module - .rule('svg') - .exclude.add(resolve('src/assets/icons')) - .end() - config.module - .rule('icons') - .test(/\.svg$/) - .include.add(resolve('src/assets/icons')) - .end() - .use('svg-sprite-loader') - .loader('svg-sprite-loader') - .options({ - symbolId: 'icon-[name]' - }) - .end() - - // set preserveWhitespace - config.module - .rule('vue') - .use('vue-loader') - .loader('vue-loader') - .tap(options => { - options.compilerOptions.preserveWhitespace = true - return options - }) - .end() - - config - // https://webpack.js.org/configuration/devtool/#development - .when(process.env.NODE_ENV === 'development', - config => config.devtool('cheap-source-map') - ) - - config - .when(process.env.NODE_ENV !== 'development', - config => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [{ - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/ - }]) - .end() - config - .optimization.splitChunks({ - chunks: 'all', - cacheGroups: { - libs: { - name: 'chunk-libs', - test: /[\\/]node_modules[\\/]/, - priority: 10, - chunks: 'initial' // only package third parties that are initially dependent - }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package - priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm - }, - commons: { - name: 'chunk-commons', - test: resolve('src/components'), // can customize your rules - minChunks: 3, // minimum common number - priority: 5, - reuseExistingChunk: true - } - } - }) - config.optimization.runtimeChunk('single') - } - ) - } -} +'use strict' +const path = require('path') +const defaultSettings = require('./src/settings.js') + +function resolve(dir) { + return path.join(__dirname, dir) +} + +const name = defaultSettings.title || '明仁管理系统' // 标题 + +const port = process.env.port || process.env.npm_config_port || 80 // 端口 + +// vue.config.js 配置说明 +//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions +// 这里只列一部分,具体配置参考文档 +module.exports = { + // 部署生产环境和开发环境下的URL。 + // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 + // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 + publicPath: process.env.NODE_ENV === "production" ? "/" : "/", + // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) + outputDir: 'dist', + // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) + assetsDir: 'static', + // 是否开启eslint保存检测,有效值:ture | false | 'error' + lintOnSave: process.env.NODE_ENV === 'development', + // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。 + productionSourceMap: false, + // webpack-dev-server 相关配置 + devServer: { + host: '0.0.0.0', + port: port, + proxy: { + // detail: https://cli.vuejs.org/config/#devserver-proxy + [process.env.VUE_APP_BASE_API]: { + target: `http://localhost:8080`, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_BASE_API]: '' + } + } + }, + disableHostCheck: true + }, + configureWebpack: { + name: name, + resolve: { + alias: { + '@': resolve('src') + } + } + }, + chainWebpack(config) { + config.plugins.delete('preload') // TODO: need test + config.plugins.delete('prefetch') // TODO: need test + + // set svg-sprite-loader + config.module + .rule('svg') + .exclude.add(resolve('src/assets/icons')) + .end() + config.module + .rule('icons') + .test(/\.svg$/) + .include.add(resolve('src/assets/icons')) + .end() + .use('svg-sprite-loader') + .loader('svg-sprite-loader') + .options({ + symbolId: 'icon-[name]' + }) + .end() + + // set preserveWhitespace + config.module + .rule('vue') + .use('vue-loader') + .loader('vue-loader') + .tap(options => { + options.compilerOptions.preserveWhitespace = true + return options + }) + .end() + + config + // https://webpack.js.org/configuration/devtool/#development + .when(process.env.NODE_ENV === 'development', + config => config.devtool('cheap-source-map') + ) + + config + .when(process.env.NODE_ENV !== 'development', + config => { + config + .plugin('ScriptExtHtmlWebpackPlugin') + .after('html') + .use('script-ext-html-webpack-plugin', [{ + // `runtime` must same as runtimeChunk name. default is `runtime` + inline: /runtime\..*\.js$/ + }]) + .end() + config + .optimization.splitChunks({ + chunks: 'all', + cacheGroups: { + libs: { + name: 'chunk-libs', + test: /[\\/]node_modules[\\/]/, + priority: 10, + chunks: 'initial' // only package third parties that are initially dependent + }, + elementUI: { + name: 'chunk-elementUI', // split elementUI into a single package + priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app + test: /[\\/]node_modules[\\/]_?element-ui(.*)/ // in order to adapt to cnpm + }, + commons: { + name: 'chunk-commons', + test: resolve('src/components'), // can customize your rules + minChunks: 3, // minimum common number + priority: 5, + reuseExistingChunk: true + } + } + }) + config.optimization.runtimeChunk('single') + } + ) + } +} diff --git a/ruoyi/pom.xml b/ruoyi/pom.xml index d44b49f34..412516c7e 100644 --- a/ruoyi/pom.xml +++ b/ruoyi/pom.xml @@ -5,12 +5,12 @@ com.ruoyi ruoyi - 2.0.0 - jar + 1.0.0 + war ruoyi http://www.ruoyi.vip - 若依管理系统 + 明仁管理系统 org.springframework.boot @@ -71,26 +71,26 @@ org.springframework.boot spring-boot-starter-web - + org.springframework.boot spring-boot-devtools true - + org.springframework.boot spring-boot-starter-security - + org.springframework.boot spring-boot-starter-data-redis - + org.apache.commons @@ -110,7 +110,7 @@ mybatis-spring-boot-starter ${mybatis.spring.boot.starter.version} - + com.github.pagehelper @@ -137,14 +137,14 @@ commons-io ${commons.io.version} - + commons-fileupload commons-fileupload ${commons.fileupload.version} - + eu.bitwalker @@ -164,14 +164,14 @@ org.springframework spring-context-support - + io.jsonwebtoken jjwt ${jwt.version} - + io.springfox @@ -188,44 +188,44 @@ - + io.swagger swagger-annotations 1.5.21 - + io.swagger swagger-models 1.5.21 - + io.springfox springfox-swagger-ui ${swagger.version} - + com.github.oshi oshi-core ${oshi.version} - + net.java.dev.jna jna - + net.java.dev.jna jna-platform - + org.apache.poi @@ -238,8 +238,14 @@ velocity ${velocity.version} + + org.jetbrains + annotations + RELEASE + compile + - + ${project.artifactId} @@ -279,4 +285,4 @@ - \ No newline at end of file + diff --git a/ruoyi/sql/ry_20191202.sql b/ruoyi/sql/ry_20191202.sql index 6e4e78e8e..2a48cb977 100644 --- a/ruoyi/sql/ry_20191202.sql +++ b/ruoyi/sql/ry_20191202.sql @@ -672,4 +672,4 @@ create table gen_table_column ( update_by varchar(64) default '' comment '更新者', update_time datetime comment '更新时间', primary key (column_id) -) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; \ No newline at end of file +) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; diff --git a/ruoyi/src/main/java/com/ruoyi/RuoYiApplication.java b/ruoyi/src/main/java/com/ruoyi/RuoYiApplication.java index e3c56ee54..64a4e8db6 100644 --- a/ruoyi/src/main/java/com/ruoyi/RuoYiApplication.java +++ b/ruoyi/src/main/java/com/ruoyi/RuoYiApplication.java @@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; /** * 启动程序 - * + * * @author ruoyi */ @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) @@ -14,17 +14,8 @@ public class RuoYiApplication { public static void main(String[] args) { - // System.setProperty("spring.devtools.restart.enabled", "false"); + //System.setProperty("spring.devtools.restart.enabled", "false"); SpringApplication.run(RuoYiApplication.class, args); - System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" + - " .-------. ____ __ \n" + - " | _ _ \\ \\ \\ / / \n" + - " | ( ' ) | \\ _. / ' \n" + - " |(_ o _) / _( )_ .' \n" + - " | (_,_).' __ ___(_ o _)' \n" + - " | |\\ \\ | || |(_,_)' \n" + - " | | \\ `' /| `-' / \n" + - " | | \\ / \\ / \n" + - " ''-' `'-' `-..-' "); + System.out.println("系统启动成功" ); } } diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/IdUtils.java b/ruoyi/src/main/java/com/ruoyi/common/utils/IdUtils.java index 45d8ac91a..7e9300902 100644 --- a/ruoyi/src/main/java/com/ruoyi/common/utils/IdUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/common/utils/IdUtils.java @@ -4,24 +4,24 @@ import com.ruoyi.common.core.lang.UUID; /** * ID生成器工具类 - * + * * @author ruoyi */ public class IdUtils { /** * 获取随机UUID - * + * * @return 随机UUID */ public static String randomUUID() { - return UUID.randomUUID().toString(); + return UUID.randomUUID().toString().toUpperCase(); } /** * 简化的UUID,去掉了横线 - * + * * @return 简化的UUID,去掉了横线 */ public static String simpleUUID() @@ -31,17 +31,17 @@ public class IdUtils /** * 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID - * + * * @return 随机UUID */ public static String fastUUID() { - return UUID.fastUUID().toString(); + return UUID.fastUUID().toString().toUpperCase(); } /** * 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID - * + * * @return 简化的UUID,去掉了横线 */ public static String fastSimpleUUID() diff --git a/ruoyi/src/main/java/com/ruoyi/common/utils/VerifyCodeUtils.java b/ruoyi/src/main/java/com/ruoyi/common/utils/VerifyCodeUtils.java index 80b8c84fe..eca0f13d4 100644 --- a/ruoyi/src/main/java/com/ruoyi/common/utils/VerifyCodeUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/common/utils/VerifyCodeUtils.java @@ -1,10 +1,7 @@ package com.ruoyi.common.utils; -import java.awt.Color; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; +import javax.imageio.ImageIO; +import java.awt.*; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; import java.io.IOException; @@ -12,23 +9,23 @@ import java.io.OutputStream; import java.security.SecureRandom; import java.util.Arrays; import java.util.Random; -import javax.imageio.ImageIO; /** * 验证码工具类 - * + * * @author ruoyi */ public class VerifyCodeUtils { // 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符 - public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ"; +// public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ"; + public static final String VERIFY_CODES = "68"; private static Random random = new SecureRandom(); /** * 使用系统默认字符源生成验证码 - * + * * @param verifySize 验证码长度 * @return */ @@ -39,7 +36,7 @@ public class VerifyCodeUtils /** * 使用指定源生成验证码 - * + * * @param verifySize 验证码长度 * @param sources 验证码字符源 * @return @@ -62,7 +59,7 @@ public class VerifyCodeUtils /** * 输出指定验证码图片流 - * + * * @param w * @param h * @param os @@ -223,4 +220,4 @@ public class VerifyCodeUtils } } -} \ No newline at end of file +} diff --git a/ruoyi/src/main/java/com/ruoyi/framework/config/DruidConfig.java b/ruoyi/src/main/java/com/ruoyi/framework/config/DruidConfig.java index f0519d5ac..d7c652b98 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/config/DruidConfig.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/config/DruidConfig.java @@ -26,7 +26,7 @@ import com.ruoyi.framework.datasource.DynamicDataSource; /** * druid 配置多数据源 - * + * * @author ruoyi */ @Configuration @@ -58,10 +58,10 @@ public class DruidConfig setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource"); return new DynamicDataSource(masterDataSource, targetDataSources); } - + /** * 设置数据源 - * + * * @param targetDataSources 备选数据源集合 * @param sourceName 数据源名称 * @param beanName bean名称 @@ -109,7 +109,7 @@ public class DruidConfig // 获取common.js String text = Utils.readFromResource(filePath); // 正则替换banner, 除去底部的广告信息 - text = text.replaceAll("", ""); + //text = text.replaceAll("", ""); text = text.replaceAll("powered.*?shrek.wang", ""); response.getWriter().write(text); } diff --git a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 4e0eca49d..7acd3e369 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -18,7 +18,7 @@ import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl; /** * spring security配置 - * + * * @author ruoyi */ @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) @@ -29,7 +29,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter */ @Autowired private UserDetailsService userDetailsService; - + /** * 认证失败处理类 */ @@ -47,7 +47,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter */ @Autowired private JwtAuthenticationTokenFilter authenticationTokenFilter; - + /** * 解决 无法直接注入 AuthenticationManager * @@ -97,13 +97,15 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter "/**/*.css", "/**/*.js" ).permitAll() - .antMatchers("/profile/**").anonymous() - .antMatchers("/common/download**").anonymous() .antMatchers("/swagger-ui.html").anonymous() .antMatchers("/swagger-resources/**").anonymous() + .antMatchers("/profile/**").anonymous() + .antMatchers("/common/download**").anonymous() .antMatchers("/webjars/**").anonymous() .antMatchers("/*/api-docs").anonymous() .antMatchers("/druid/**").anonymous() + .antMatchers("/test/user/**").anonymous() + .antMatchers("/mr/**").anonymous() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated() .and() @@ -113,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); } - + /** * 强散列哈希加密实现 */ diff --git a/ruoyi/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java b/ruoyi/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java index a51cd34f6..5a5febf0c 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java @@ -1,27 +1,24 @@ package com.ruoyi.framework.config; -import java.util.ArrayList; -import java.util.List; +import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import io.swagger.annotations.ApiOperation; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.ApiInfo; -import springfox.documentation.service.ApiKey; -import springfox.documentation.service.AuthorizationScope; -import springfox.documentation.service.Contact; -import springfox.documentation.service.SecurityReference; +import springfox.documentation.service.*; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; +import java.util.ArrayList; +import java.util.List; + /** * Swagger2的接口配置 - * + * * @author ruoyi */ @Configuration @@ -39,7 +36,7 @@ public class SwaggerConfig public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) - .pathMapping("/dev-api") + .pathMapping(DEV_PRD()) // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) .apiInfo(apiInfo()) // 设置哪些接口暴露给Swagger展示 @@ -65,7 +62,7 @@ public class SwaggerConfig apiKeyList.add(new ApiKey("Authorization", "Authorization", "header")); return apiKeyList; } - + /** * 安全上下文 */ @@ -79,7 +76,7 @@ public class SwaggerConfig .build()); return securityContexts; } - + /** * 默认的安全上引用 */ @@ -101,13 +98,23 @@ public class SwaggerConfig // 用ApiInfoBuilder进行定制 return new ApiInfoBuilder() // 设置标题 - .title("标题:若依管理系统_接口文档") + .title("标题:明仁管理系统_接口文档") // 描述 - .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") + .description("描述:明仁管理系统_接口文档系统对外接口") // 作者信息 - .contact(new Contact(ruoyiConfig.getName(), null, null)) + .contact(new Contact(ruoyiConfig.getName(), "http://erp.jzmryy.com", "")) // 版本 .version("版本号:" + ruoyiConfig.getVersion()) .build(); } + + /** + * 判断是测试生产环境 + */ + private String DEV_PRD() + { + String str = System.getProperty("os.name").toLowerCase().contains("windows 10") ? "/dev-api" : ""; + + return str; + } } diff --git a/ruoyi/src/main/java/com/ruoyi/framework/web/controller/BaseController.java b/ruoyi/src/main/java/com/ruoyi/framework/web/controller/BaseController.java index ccc60a37d..b389efe93 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/web/controller/BaseController.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/web/controller/BaseController.java @@ -1,12 +1,5 @@ package com.ruoyi.framework.web.controller; -import java.beans.PropertyEditorSupport; -import java.util.Date; -import java.util.List; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.InitBinder; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.ruoyi.common.constant.HttpStatus; @@ -17,10 +10,18 @@ import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.page.PageDomain; import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableSupport; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.WebDataBinder; +import org.springframework.web.bind.annotation.InitBinder; + +import java.beans.PropertyEditorSupport; +import java.util.Date; +import java.util.List; /** * web层通用数据处理 - * + * * @author ruoyi */ public class BaseController @@ -74,7 +75,7 @@ public class BaseController /** * 响应返回结果 - * + * * @param rows 影响行数 * @return 操作结果 */ diff --git a/ruoyi/src/main/java/com/ruoyi/framework/web/domain/AjaxResult.java b/ruoyi/src/main/java/com/ruoyi/framework/web/domain/AjaxResult.java index 5c551bd7b..587e44c8e 100644 --- a/ruoyi/src/main/java/com/ruoyi/framework/web/domain/AjaxResult.java +++ b/ruoyi/src/main/java/com/ruoyi/framework/web/domain/AjaxResult.java @@ -1,18 +1,22 @@ package com.ruoyi.framework.web.domain; -import java.util.HashMap; import com.ruoyi.common.constant.HttpStatus; +import com.ruoyi.common.utils.MessageUtils; import com.ruoyi.common.utils.StringUtils; +import java.util.HashMap; + /** * 操作消息提醒 - * + * * @author ruoyi */ public class AjaxResult extends HashMap { private static final long serialVersionUID = 1L; + + /** 状态码 */ public static final String CODE_TAG = "code"; @@ -31,7 +35,7 @@ public class AjaxResult extends HashMap /** * 初始化一个新创建的 AjaxResult 对象 - * + * * @param code 状态码 * @param msg 返回内容 */ @@ -43,7 +47,7 @@ public class AjaxResult extends HashMap /** * 初始化一个新创建的 AjaxResult 对象 - * + * * @param code 状态码 * @param msg 返回内容 * @param data 数据对象 @@ -60,27 +64,27 @@ public class AjaxResult extends HashMap /** * 返回成功消息 - * + * * @return 成功消息 */ public static AjaxResult success() { - return AjaxResult.success("操作成功"); + return AjaxResult.success(MessageUtils.message("api.success.msg")); } /** * 返回成功数据 - * + * * @return 成功消息 */ public static AjaxResult success(Object data) { - return AjaxResult.success("操作成功", data); + return AjaxResult.success(MessageUtils.message("api.success.msg"), data); } /** * 返回成功消息 - * + * * @param msg 返回内容 * @return 成功消息 */ @@ -91,7 +95,7 @@ public class AjaxResult extends HashMap /** * 返回成功消息 - * + * * @param msg 返回内容 * @param data 数据对象 * @return 成功消息 @@ -103,17 +107,17 @@ public class AjaxResult extends HashMap /** * 返回错误消息 - * + * * @return */ public static AjaxResult error() { - return AjaxResult.error("操作失败"); + return AjaxResult.error(MessageUtils.message("api.error.msg")); } /** * 返回错误消息 - * + * * @param msg 返回内容 * @return 警告消息 */ @@ -124,7 +128,7 @@ public class AjaxResult extends HashMap /** * 返回错误消息 - * + * * @param msg 返回内容 * @param data 数据对象 * @return 警告消息 @@ -136,7 +140,7 @@ public class AjaxResult extends HashMap /** * 返回错误消息 - * + * * @param code 状态码 * @param msg 返回内容 * @return 警告消息 diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/api/MRBaseController.java b/ruoyi/src/main/java/com/ruoyi/project/mr/api/MRBaseController.java new file mode 100644 index 000000000..e4ae67384 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/api/MRBaseController.java @@ -0,0 +1,66 @@ +package com.ruoyi.project.mr.api; + +import com.ruoyi.common.constant.UserConstants; +import com.ruoyi.common.enums.UserStatus; +import com.ruoyi.common.utils.MessageUtils; +import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.project.system.domain.SysUser; +import com.ruoyi.project.system.service.ISysUserService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * swagger 基础信息方法 + * + * @author ruoyi + */ +@Api(tags = "基础信息") +@RestController +@RequestMapping("/mr/base") +public class MRBaseController extends BaseController { + // 令牌秘钥 + @Value("${token.apiSecret}") + private String apiSecret; + + @Autowired + private ISysUserService userService; + + @ApiOperation(value = "判断登陆", notes = "根据账号密码判断是否存在") + @ApiImplicitParams({ + @ApiImplicitParam(name = "name", value = "用户名", dataType = "string", paramType = "query", example = "admin"), + @ApiImplicitParam(name = "password", value = "密码", dataType = "string", paramType = "query", example = "123456")}) + @GetMapping("/login") + public AjaxResult getUser(@RequestHeader(value = "signature", required = false) String secret, String name, String password) { + if (StringUtils.isEmpty(secret)) { + return AjaxResult.error(400, MessageUtils.message("api.error.msg")); + } else if (!apiSecret.equals(secret)) { + return AjaxResult.error(400, MessageUtils.message("api.error.msg")); + } + if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(name))) { + SysUser user = userService.selectUserByUserName(name); + if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { + return AjaxResult.error(400, MessageUtils.message("user.password.delete")); + } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { + return AjaxResult.error(400, MessageUtils.message("user.blocked")); + } else if (!SecurityUtils.matchesPassword(password,user.getPassword())) { + return AjaxResult.error(400, MessageUtils.message("user.not.exists")); + } else { + return AjaxResult.success(user); + } + } else { + return AjaxResult.error(MessageUtils.message("user.not.exists")); + } + + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCalendarController.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCalendarController.java new file mode 100644 index 000000000..bf6506b4e --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCalendarController.java @@ -0,0 +1,99 @@ +package com.ruoyi.project.mr.base.controller; + +import com.ruoyi.common.utils.IdUtils; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.framework.aspectj.lang.annotation.Log; +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.framework.web.page.TableDataInfo; +import com.ruoyi.project.mr.base.domain.BaseCalendar; +import com.ruoyi.project.mr.base.service.IBaseCalendarService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 考勤日历Controller + * + * @author mr + * @date 2020-01-07 + */ +@RestController +@RequestMapping("/base/calendar") +public class BaseCalendarController extends BaseController +{ + @Autowired + private IBaseCalendarService baseCalendarService; + + /** + * 查询考勤日历列表 + */ + @PreAuthorize("@ss.hasPermi('base:calendar:list')") + @GetMapping("/list") + public TableDataInfo list(BaseCalendar baseCalendar) + { + startPage(); + List list = baseCalendarService.selectBaseCalendarList(baseCalendar); + return getDataTable(list); + } + + /** + * 导出考勤日历列表 + */ + @PreAuthorize("@ss.hasPermi('base:calendar:export')") + @Log(title = "考勤日历", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(BaseCalendar baseCalendar) + { + List list = baseCalendarService.selectBaseCalendarList(baseCalendar); + ExcelUtil util = new ExcelUtil(BaseCalendar.class); + return util.exportExcel(list, "calendar"); + } + + /** + * 获取考勤日历详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:calendar:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return AjaxResult.success(baseCalendarService.selectBaseCalendarById(id)); + } + + /** + * 新增考勤日历 + */ + @PreAuthorize("@ss.hasPermi('base:calendar:add')") + @Log(title = "考勤日历", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseCalendar baseCalendar) + { + baseCalendar.setId(IdUtils.fastUUID()); + return toAjax(baseCalendarService.insertBaseCalendar(baseCalendar)); + } + + /** + * 修改考勤日历 + */ + @PreAuthorize("@ss.hasPermi('base:calendar:edit')") + @Log(title = "考勤日历", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseCalendar baseCalendar) + { + return toAjax(baseCalendarService.updateBaseCalendar(baseCalendar)); + } + + /** + * 删除考勤日历 + */ + @PreAuthorize("@ss.hasPermi('base:calendar:remove')") + @Log(title = "考勤日历", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(baseCalendarService.deleteBaseCalendarByIds(ids)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCalendarItemController.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCalendarItemController.java new file mode 100644 index 000000000..62a81e36d --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCalendarItemController.java @@ -0,0 +1,97 @@ +package com.ruoyi.project.mr.base.controller; + +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.framework.aspectj.lang.annotation.Log; +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.framework.web.page.TableDataInfo; +import com.ruoyi.project.mr.base.domain.BaseCalendarItem; +import com.ruoyi.project.mr.base.service.IBaseCalendarItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 考勤日历明细Controller + * + * @author mr + * @date 2020-01-07 + */ +@RestController +@RequestMapping("/base/calendarItem") +public class BaseCalendarItemController extends BaseController +{ + @Autowired + private IBaseCalendarItemService baseCalendarItemService; + + /** + * 查询考勤日历明细列表 + */ + @PreAuthorize("@ss.hasPermi('base:calendarItem:list')") + @GetMapping("/list") + public TableDataInfo list(BaseCalendarItem baseCalendarItem) + { + startPage(); + List list = baseCalendarItemService.selectBaseCalendarItemList(baseCalendarItem); + return getDataTable(list); + } + + /** + * 导出考勤日历明细列表 + */ + @PreAuthorize("@ss.hasPermi('base:calendarItem:export')") + @Log(title = "考勤日历明细", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(BaseCalendarItem baseCalendarItem) + { + List list = baseCalendarItemService.selectBaseCalendarItemList(baseCalendarItem); + ExcelUtil util = new ExcelUtil(BaseCalendarItem.class); + return util.exportExcel(list, "calendarItem"); + } + + /** + * 获取考勤日历明细详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:calendarItem:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return AjaxResult.success(baseCalendarItemService.selectBaseCalendarItemById(id)); + } + + /** + * 新增考勤日历明细 + */ + @PreAuthorize("@ss.hasPermi('base:calendarItem:add')") + @Log(title = "考勤日历明细", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseCalendarItem baseCalendarItem) + { + return toAjax(baseCalendarItemService.insertBaseCalendarItem(baseCalendarItem)); + } + + /** + * 修改考勤日历明细 + */ + @PreAuthorize("@ss.hasPermi('base:calendarItem:edit')") + @Log(title = "考勤日历明细", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseCalendarItem baseCalendarItem) + { + return toAjax(baseCalendarItemService.updateBaseCalendarItem(baseCalendarItem)); + } + + /** + * 删除考勤日历明细 + */ + @PreAuthorize("@ss.hasPermi('base:calendarItem:remove')") + @Log(title = "考勤日历明细", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(baseCalendarItemService.deleteBaseCalendarItemByIds(ids)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCompanyController.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCompanyController.java new file mode 100644 index 000000000..53a00e91e --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/controller/BaseCompanyController.java @@ -0,0 +1,112 @@ +package com.ruoyi.project.mr.base.controller; + +import com.ruoyi.common.utils.IdUtils; +import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.framework.aspectj.lang.annotation.Log; +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.framework.web.page.TableDataInfo; +import com.ruoyi.project.mr.base.domain.BaseCompany; +import com.ruoyi.project.mr.base.service.IBaseCompanyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 公司管理Controller + * + * @author mr + * @date 2020-01-04 + */ +@RestController +@RequestMapping("/base/company") +public class BaseCompanyController extends BaseController +{ + @Autowired + private IBaseCompanyService baseCompanyService; + + /** + * 查询公司管理列表 + */ + @PreAuthorize("@ss.hasPermi('base:company:list')") + @GetMapping("/list") + public TableDataInfo list(BaseCompany baseCompany) + { + startPage(); + List list = baseCompanyService.selectBaseCompanyList(baseCompany); + return getDataTable(list); + } + + /** + * 导出公司管理列表 + */ + @PreAuthorize("@ss.hasPermi('base:company:export')") + @Log(title = "公司管理", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(BaseCompany baseCompany) + { + List list = baseCompanyService.selectBaseCompanyList(baseCompany); + ExcelUtil util = new ExcelUtil(BaseCompany.class); + return util.exportExcel(list, "公司信息"); + } + + /** + * 获取公司管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('base:company:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return AjaxResult.success(baseCompanyService.selectBaseCompanyById(id)); + } + + /** + * 新增公司管理 + */ + @PreAuthorize("@ss.hasPermi('base:company:add')") + @Log(title = "公司管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody BaseCompany baseCompany) + { + baseCompany.setId(IdUtils.fastUUID()); + return toAjax(baseCompanyService.insertBaseCompany(baseCompany)); + } + + /** + * 修改公司管理 + */ + @PreAuthorize("@ss.hasPermi('base:company:edit')") + @Log(title = "公司管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody BaseCompany baseCompany) + { + return toAjax(baseCompanyService.updateBaseCompany(baseCompany)); + } + + /** + * 删除公司管理 + */ + @PreAuthorize("@ss.hasPermi('base:company:remove')") + @Log(title = "公司管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(baseCompanyService.deleteBaseCompanyByIds(ids)); + } + + /** + * 状态修改 + */ + @PreAuthorize("@ss.hasPermi('base:company:edit')") + @Log(title = "公司管理", businessType = BusinessType.UPDATE) + @PutMapping("/changeEnabled") + public AjaxResult changeEnabled(@RequestBody BaseCompany baseCompany) + { + baseCompany.setUpdateBy(SecurityUtils.getUsername()); + return toAjax(baseCompanyService.updateBaseCompanyEnabled(baseCompany)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCalendar.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCalendar.java new file mode 100644 index 000000000..4a89224aa --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCalendar.java @@ -0,0 +1,84 @@ +package com.ruoyi.project.mr.base.domain; + +import com.ruoyi.framework.aspectj.lang.annotation.Excel; +import com.ruoyi.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 考勤日历对象 base_calendar + * + * @author mr + * @date 2020-01-07 + */ +public class BaseCalendar extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** UUID */ + private String id; + + /** 日历代码 */ + @Excel(name = "日历代码") + private String codeid; + + /** 日历简称 */ + @Excel(name = "日历简称") + private String name; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String enabled; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setCodeid(String codeid) + { + this.codeid = codeid; + } + + public String getCodeid() + { + return codeid; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setEnabled(String enabled) + { + this.enabled = enabled; + } + + public String getEnabled() + { + return enabled; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("codeid", getCodeid()) + .append("name", getName()) + .append("enabled", getEnabled()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCalendarItem.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCalendarItem.java new file mode 100644 index 000000000..c3378b744 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCalendarItem.java @@ -0,0 +1,85 @@ +package com.ruoyi.project.mr.base.domain; + +import com.ruoyi.framework.aspectj.lang.annotation.Excel; +import com.ruoyi.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * 考勤日历明细对象 base_calendar_item + * + * @author mr + * @date 2020-01-07 + */ +public class BaseCalendarItem extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** UUID */ + private String id; + + /** 日历id */ + @Excel(name = "日历id") + private String parentId; + + /** 状态(Y正常 N休息) */ + @Excel(name = "状态", readConverterExp = "Y=正常,N=休息") + private String work; + + /** 上班时间 */ + @Excel(name = "上班时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date workDay; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setParentId(String parentId) + { + this.parentId = parentId; + } + + public String getParentId() + { + return parentId; + } + public void setWork(String work) + { + this.work = work; + } + + public String getWork() + { + return work; + } + public void setWorkDay(Date workDay) + { + this.workDay = workDay; + } + + public Date getWorkDay() + { + return workDay; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("parentId", getParentId()) + .append("work", getWork()) + .append("workDay", getWorkDay()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCompany.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCompany.java new file mode 100644 index 000000000..c4a104b25 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/domain/BaseCompany.java @@ -0,0 +1,98 @@ +package com.ruoyi.project.mr.base.domain; + +import com.ruoyi.framework.aspectj.lang.annotation.Excel; +import com.ruoyi.framework.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 公司管理对象 base_company + * + * @author mr + * @date 2020-01-04 + */ +public class BaseCompany extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** UUID */ + private String id; + + /** 排序 */ + @Excel(name = "排序") + private Long sort; + + /** 公司代码 */ + @Excel(name = "公司代码") + private String codeid; + + /** 公司简称 */ + @Excel(name = "公司简称") + private String name; + + /** 状态(0正常 1停用) */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private String enabled; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setSort(Long sort) + { + this.sort = sort; + } + + public Long getSort() + { + return sort; + } + public void setCodeid(String codeid) + { + this.codeid = codeid; + } + + public String getCodeid() + { + return codeid; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setEnabled(String enabled) + { + this.enabled = enabled; + } + + public String getEnabled() + { + return enabled; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("sort", getSort()) + .append("codeid", getCodeid()) + .append("name", getName()) + .append("enabled", getEnabled()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCalendarItemMapper.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCalendarItemMapper.java new file mode 100644 index 000000000..de193adf1 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCalendarItemMapper.java @@ -0,0 +1,62 @@ +package com.ruoyi.project.mr.base.mapper; + +import com.ruoyi.project.mr.base.domain.BaseCalendarItem; + +import java.util.List; + +/** + * 考勤日历明细Mapper接口 + * + * @author mr + * @date 2020-01-07 + */ +public interface BaseCalendarItemMapper +{ + /** + * 查询考勤日历明细 + * + * @param id 考勤日历明细ID + * @return 考勤日历明细 + */ + public BaseCalendarItem selectBaseCalendarItemById(String id); + + /** + * 查询考勤日历明细列表 + * + * @param baseCalendarItem 考勤日历明细 + * @return 考勤日历明细集合 + */ + public List selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem); + + /** + * 新增考勤日历明细 + * + * @param baseCalendarItem 考勤日历明细 + * @return 结果 + */ + public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem); + + /** + * 修改考勤日历明细 + * + * @param baseCalendarItem 考勤日历明细 + * @return 结果 + */ + public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem); + + /** + * 删除考勤日历明细 + * + * @param id 考勤日历明细ID + * @return 结果 + */ + public int deleteBaseCalendarItemById(String id); + + /** + * 批量删除考勤日历明细 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteBaseCalendarItemByIds(String[] ids); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCalendarMapper.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCalendarMapper.java new file mode 100644 index 000000000..9dabd3ebf --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCalendarMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.mr.base.mapper; + +import com.ruoyi.project.mr.base.domain.BaseCalendar; +import java.util.List; + +/** + * 考勤日历Mapper接口 + * + * @author mr + * @date 2020-01-07 + */ +public interface BaseCalendarMapper +{ + /** + * 查询考勤日历 + * + * @param id 考勤日历ID + * @return 考勤日历 + */ + public BaseCalendar selectBaseCalendarById(String id); + + /** + * 查询考勤日历列表 + * + * @param baseCalendar 考勤日历 + * @return 考勤日历集合 + */ + public List selectBaseCalendarList(BaseCalendar baseCalendar); + + /** + * 新增考勤日历 + * + * @param baseCalendar 考勤日历 + * @return 结果 + */ + public int insertBaseCalendar(BaseCalendar baseCalendar); + + /** + * 修改考勤日历 + * + * @param baseCalendar 考勤日历 + * @return 结果 + */ + public int updateBaseCalendar(BaseCalendar baseCalendar); + + /** + * 删除考勤日历 + * + * @param id 考勤日历ID + * @return 结果 + */ + public int deleteBaseCalendarById(String id); + + /** + * 批量删除考勤日历 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteBaseCalendarByIds(String[] ids); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCompanyMapper.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCompanyMapper.java new file mode 100644 index 000000000..828457ee1 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/mapper/BaseCompanyMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.project.mr.base.mapper; + +import com.ruoyi.project.mr.base.domain.BaseCompany; +import java.util.List; + +/** + * 公司管理Mapper接口 + * + * @author mr + * @date 2020-01-04 + */ +public interface BaseCompanyMapper +{ + /** + * 查询公司管理 + * + * @param id 公司管理ID + * @return 公司管理 + */ + public BaseCompany selectBaseCompanyById(String id); + + /** + * 查询公司管理列表 + * + * @param baseCompany 公司管理 + * @return 公司管理集合 + */ + public List selectBaseCompanyList(BaseCompany baseCompany); + + /** + * 新增公司管理 + * + * @param baseCompany 公司管理 + * @return 结果 + */ + public int insertBaseCompany(BaseCompany baseCompany); + + /** + * 修改公司管理 + * + * @param baseCompany 公司管理 + * @return 结果 + */ + public int updateBaseCompany(BaseCompany baseCompany); + + /** + * 删除公司管理 + * + * @param id 公司管理ID + * @return 结果 + */ + public int deleteBaseCompanyById(String id); + + /** + * 批量删除公司管理 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteBaseCompanyByIds(String[] ids); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCalendarItemService.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCalendarItemService.java new file mode 100644 index 000000000..f8a4f7ee1 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCalendarItemService.java @@ -0,0 +1,62 @@ +package com.ruoyi.project.mr.base.service; + +import com.ruoyi.project.mr.base.domain.BaseCalendarItem; + +import java.util.List; + +/** + * 考勤日历明细Service接口 + * + * @author mr + * @date 2020-01-07 + */ +public interface IBaseCalendarItemService +{ + /** + * 查询考勤日历明细 + * + * @param id 考勤日历明细ID + * @return 考勤日历明细 + */ + public BaseCalendarItem selectBaseCalendarItemById(String id); + + /** + * 查询考勤日历明细列表 + * + * @param baseCalendarItem 考勤日历明细 + * @return 考勤日历明细集合 + */ + public List selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem); + + /** + * 新增考勤日历明细 + * + * @param baseCalendarItem 考勤日历明细 + * @return 结果 + */ + public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem); + + /** + * 修改考勤日历明细 + * + * @param baseCalendarItem 考勤日历明细 + * @return 结果 + */ + public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem); + + /** + * 批量删除考勤日历明细 + * + * @param ids 需要删除的考勤日历明细ID + * @return 结果 + */ + public int deleteBaseCalendarItemByIds(String[] ids); + + /** + * 删除考勤日历明细信息 + * + * @param id 考勤日历明细ID + * @return 结果 + */ + public int deleteBaseCalendarItemById(String id); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCalendarService.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCalendarService.java new file mode 100644 index 000000000..671cd3c81 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCalendarService.java @@ -0,0 +1,62 @@ +package com.ruoyi.project.mr.base.service; + +import com.ruoyi.project.mr.base.domain.BaseCalendar; +import java.util.List; + +/** + * 考勤日历Service接口 + * + * @author mr + * @date 2020-01-07 + */ +public interface IBaseCalendarService +{ + /** + * 查询考勤日历 + * + * @param id 考勤日历ID + * @return 考勤日历 + */ + public BaseCalendar selectBaseCalendarById(String id); + + /** + * 查询考勤日历列表 + * + * @param baseCalendar 考勤日历 + * @return 考勤日历集合 + */ + public List selectBaseCalendarList(BaseCalendar baseCalendar); + + /** + * 新增考勤日历 + * + * @param baseCalendar 考勤日历 + * @return 结果 + */ + public int insertBaseCalendar(BaseCalendar baseCalendar); + + /** + * 修改考勤日历 + * + * @param baseCalendar 考勤日历 + * @return 结果 + */ + public int updateBaseCalendar(BaseCalendar baseCalendar); + + /** + * 批量删除考勤日历 + * + * @param ids 需要删除的考勤日历ID + * @return 结果 + */ + public int deleteBaseCalendarByIds(String[] ids); + + /** + * 删除考勤日历信息 + * + * @param id 考勤日历ID + * @return 结果 + */ + public int deleteBaseCalendarById(String id); + +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCompanyService.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCompanyService.java new file mode 100644 index 000000000..c406c8991 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/IBaseCompanyService.java @@ -0,0 +1,69 @@ +package com.ruoyi.project.mr.base.service; + +import com.ruoyi.project.mr.base.domain.BaseCompany; +import java.util.List; + +/** + * 公司管理Service接口 + * + * @author mr + * @date 2020-01-04 + */ +public interface IBaseCompanyService +{ + /** + * 查询公司管理 + * + * @param id 公司管理ID + * @return 公司管理 + */ + public BaseCompany selectBaseCompanyById(String id); + + /** + * 查询公司管理列表 + * + * @param baseCompany 公司管理 + * @return 公司管理集合 + */ + public List selectBaseCompanyList(BaseCompany baseCompany); + + /** + * 新增公司管理 + * + * @param baseCompany 公司管理 + * @return 结果 + */ + public int insertBaseCompany(BaseCompany baseCompany); + + /** + * 修改公司管理 + * + * @param baseCompany 公司管理 + * @return 结果 + */ + public int updateBaseCompany(BaseCompany baseCompany); + + /** + * 批量删除公司管理 + * + * @param ids 需要删除的公司管理ID + * @return 结果 + */ + public int deleteBaseCompanyByIds(String[] ids); + + /** + * 删除公司管理信息 + * + * @param id 公司管理ID + * @return 结果 + */ + public int deleteBaseCompanyById(String id); + + /** + * 修改公司状态 + * + * @param baseCompany 公司信息 + * @return 结果 + */ + public int updateBaseCompanyEnabled(BaseCompany baseCompany); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCalendarItemServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCalendarItemServiceImpl.java new file mode 100644 index 000000000..4f87ab3c4 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCalendarItemServiceImpl.java @@ -0,0 +1,97 @@ +package com.ruoyi.project.mr.base.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.project.mr.base.domain.BaseCalendarItem; +import com.ruoyi.project.mr.base.mapper.BaseCalendarItemMapper; +import com.ruoyi.project.mr.base.service.IBaseCalendarItemService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 考勤日历明细Service业务层处理 + * + * @author mr + * @date 2020-01-07 + */ +@Service +public class BaseCalendarItemServiceImpl implements IBaseCalendarItemService +{ + @Autowired + private BaseCalendarItemMapper baseCalendarItemMapper; + + /** + * 查询考勤日历明细 + * + * @param id 考勤日历明细ID + * @return 考勤日历明细 + */ + @Override + public BaseCalendarItem selectBaseCalendarItemById(String id) + { + return baseCalendarItemMapper.selectBaseCalendarItemById(id); + } + + /** + * 查询考勤日历明细列表 + * + * @param baseCalendarItem 考勤日历明细 + * @return 考勤日历明细 + */ + @Override + public List selectBaseCalendarItemList(BaseCalendarItem baseCalendarItem) + { + return baseCalendarItemMapper.selectBaseCalendarItemList(baseCalendarItem); + } + + /** + * 新增考勤日历明细 + * + * @param baseCalendarItem 考勤日历明细 + * @return 结果 + */ + @Override + public int insertBaseCalendarItem(BaseCalendarItem baseCalendarItem) + { + baseCalendarItem.setCreateTime(DateUtils.getNowDate()); + return baseCalendarItemMapper.insertBaseCalendarItem(baseCalendarItem); + } + + /** + * 修改考勤日历明细 + * + * @param baseCalendarItem 考勤日历明细 + * @return 结果 + */ + @Override + public int updateBaseCalendarItem(BaseCalendarItem baseCalendarItem) + { + baseCalendarItem.setUpdateTime(DateUtils.getNowDate()); + return baseCalendarItemMapper.updateBaseCalendarItem(baseCalendarItem); + } + + /** + * 批量删除考勤日历明细 + * + * @param ids 需要删除的考勤日历明细ID + * @return 结果 + */ + @Override + public int deleteBaseCalendarItemByIds(String[] ids) + { + return baseCalendarItemMapper.deleteBaseCalendarItemByIds(ids); + } + + /** + * 删除考勤日历明细信息 + * + * @param id 考勤日历明细ID + * @return 结果 + */ + @Override + public int deleteBaseCalendarItemById(String id) + { + return baseCalendarItemMapper.deleteBaseCalendarItemById(id); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCalendarServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCalendarServiceImpl.java new file mode 100644 index 000000000..3a4aa11a6 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCalendarServiceImpl.java @@ -0,0 +1,97 @@ +package com.ruoyi.project.mr.base.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.project.mr.base.domain.BaseCalendar; +import com.ruoyi.project.mr.base.mapper.BaseCalendarMapper; +import com.ruoyi.project.mr.base.service.IBaseCalendarService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 考勤日历Service业务层处理 + * + * @author mr + * @date 2020-01-07 + */ +@Service +public class BaseCalendarServiceImpl implements IBaseCalendarService +{ + @Autowired + private BaseCalendarMapper baseCalendarMapper; + + /** + * 查询考勤日历 + * + * @param id 考勤日历ID + * @return 考勤日历 + */ + @Override + public BaseCalendar selectBaseCalendarById(String id) + { + return baseCalendarMapper.selectBaseCalendarById(id); + } + + /** + * 查询考勤日历列表 + * + * @param baseCalendar 考勤日历 + * @return 考勤日历 + */ + @Override + public List selectBaseCalendarList(BaseCalendar baseCalendar) + { + return baseCalendarMapper.selectBaseCalendarList(baseCalendar); + } + + /** + * 新增考勤日历 + * + * @param baseCalendar 考勤日历 + * @return 结果 + */ + @Override + public int insertBaseCalendar(BaseCalendar baseCalendar) + { + baseCalendar.setCreateTime(DateUtils.getNowDate()); + return baseCalendarMapper.insertBaseCalendar(baseCalendar); + } + + /** + * 修改考勤日历 + * + * @param baseCalendar 考勤日历 + * @return 结果 + */ + @Override + public int updateBaseCalendar(BaseCalendar baseCalendar) + { + baseCalendar.setUpdateTime(DateUtils.getNowDate()); + return baseCalendarMapper.updateBaseCalendar(baseCalendar); + } + + /** + * 批量删除考勤日历 + * + * @param ids 需要删除的考勤日历ID + * @return 结果 + */ + @Override + public int deleteBaseCalendarByIds(String[] ids) + { + return baseCalendarMapper.deleteBaseCalendarByIds(ids); + } + + /** + * 删除考勤日历信息 + * + * @param id 考勤日历ID + * @return 结果 + */ + @Override + public int deleteBaseCalendarById(String id) + { + return baseCalendarMapper.deleteBaseCalendarById(id); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCompanyServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCompanyServiceImpl.java new file mode 100644 index 000000000..853dde747 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/base/service/impl/BaseCompanyServiceImpl.java @@ -0,0 +1,110 @@ +package com.ruoyi.project.mr.base.service.impl; + +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.project.mr.base.domain.BaseCompany; +import com.ruoyi.project.mr.base.mapper.BaseCompanyMapper; +import com.ruoyi.project.mr.base.service.IBaseCompanyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 公司管理Service业务层处理 + * + * @author mr + * @date 2020-01-04 + */ +@Service +public class BaseCompanyServiceImpl implements IBaseCompanyService +{ + @Autowired + private BaseCompanyMapper baseCompanyMapper; + + /** + * 查询公司管理 + * + * @param id 公司管理ID + * @return 公司管理 + */ + @Override + public BaseCompany selectBaseCompanyById(String id) + { + return baseCompanyMapper.selectBaseCompanyById(id); + } + + /** + * 查询公司管理列表 + * + * @param baseCompany 公司管理 + * @return 公司管理 + */ + @Override + public List selectBaseCompanyList(BaseCompany baseCompany) + { + return baseCompanyMapper.selectBaseCompanyList(baseCompany); + } + + /** + * 新增公司管理 + * + * @param baseCompany 公司管理 + * @return 结果 + */ + @Override + public int insertBaseCompany(BaseCompany baseCompany) + { + baseCompany.setCreateTime(DateUtils.getNowDate()); + return baseCompanyMapper.insertBaseCompany(baseCompany); + } + + /** + * 修改公司管理 + * + * @param baseCompany 公司管理 + * @return 结果 + */ + @Override + public int updateBaseCompany(BaseCompany baseCompany) + { + baseCompany.setUpdateTime(DateUtils.getNowDate()); + return baseCompanyMapper.updateBaseCompany(baseCompany); + } + + /** + * 批量删除公司管理 + * + * @param ids 需要删除的公司管理ID + * @return 结果 + */ + @Override + public int deleteBaseCompanyByIds(String[] ids) + { + return baseCompanyMapper.deleteBaseCompanyByIds(ids); + } + + /** + * 删除公司管理信息 + * + * @param id 公司管理ID + * @return 结果 + */ + @Override + public int deleteBaseCompanyById(String id) + { + return baseCompanyMapper.deleteBaseCompanyById(id); + } + + /** + * 修改用户状态 + * + * @param baseCompany 用户信息 + * @return 结果 + */ + @Override + public int updateBaseCompanyEnabled(BaseCompany baseCompany) + { + return baseCompanyMapper.updateBaseCompany(baseCompany); + } + +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/data/controller/DataCurrentinventoryController.java b/ruoyi/src/main/java/com/ruoyi/project/mr/data/controller/DataCurrentinventoryController.java new file mode 100644 index 000000000..5d91b713b --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/data/controller/DataCurrentinventoryController.java @@ -0,0 +1,97 @@ +package com.ruoyi.project.mr.data.controller; + +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.framework.aspectj.lang.annotation.Log; +import com.ruoyi.framework.aspectj.lang.enums.BusinessType; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import com.ruoyi.framework.web.page.TableDataInfo; +import com.ruoyi.project.mr.data.domain.DataCurrentinventory; +import com.ruoyi.project.mr.data.service.IDataCurrentinventoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 当前库存存储Controller + * + * @author mr + * @date 2020-01-14 + */ +@RestController +@RequestMapping("/data/currentinventory") +public class DataCurrentinventoryController extends BaseController +{ + @Autowired + private IDataCurrentinventoryService dataCurrentinventoryService; + + /** + * 查询当前库存存储列表 + */ + @PreAuthorize("@ss.hasPermi('data:currentinventory:list')") + @GetMapping("/list") + public TableDataInfo list(DataCurrentinventory dataCurrentinventory) + { + startPage(); + List list = dataCurrentinventoryService.selectDataCurrentinventorySum(dataCurrentinventory); + return getDataTable(list); + } + + /** + * 导出当前库存存储列表 + */ + @PreAuthorize("@ss.hasPermi('data:currentinventory:export')") + @Log(title = "当前库存存储", businessType = BusinessType.EXPORT) + @GetMapping("/export") + public AjaxResult export(DataCurrentinventory dataCurrentinventory) + { + List list = dataCurrentinventoryService.selectDataCurrentinventoryList(dataCurrentinventory); + ExcelUtil util = new ExcelUtil(DataCurrentinventory.class); + return util.exportExcel(list, "currentinventory"); + } + + /** + * 获取当前库存存储详细信息 + */ + @PreAuthorize("@ss.hasPermi('data:currentinventory:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return AjaxResult.success(dataCurrentinventoryService.selectDataCurrentinventoryById(id)); + } + + /** + * 新增当前库存存储 + */ + @PreAuthorize("@ss.hasPermi('data:currentinventory:add')") + @Log(title = "当前库存存储", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DataCurrentinventory dataCurrentinventory) + { + return toAjax(dataCurrentinventoryService.insertDataCurrentinventory(dataCurrentinventory)); + } + + /** + * 修改当前库存存储 + */ + @PreAuthorize("@ss.hasPermi('data:currentinventory:edit')") + @Log(title = "当前库存存储", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DataCurrentinventory dataCurrentinventory) + { + return toAjax(dataCurrentinventoryService.updateDataCurrentinventory(dataCurrentinventory)); + } + + /** + * 删除当前库存存储 + */ + @PreAuthorize("@ss.hasPermi('data:currentinventory:remove')") + @Log(title = "当前库存存储", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(dataCurrentinventoryService.deleteDataCurrentinventoryByIds(ids)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/data/domain/DataCurrentinventory.java b/ruoyi/src/main/java/com/ruoyi/project/mr/data/domain/DataCurrentinventory.java new file mode 100644 index 000000000..5e9d182d6 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/data/domain/DataCurrentinventory.java @@ -0,0 +1,667 @@ +package com.ruoyi.project.mr.data.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.framework.aspectj.lang.annotation.Excel; +import com.ruoyi.framework.web.domain.BaseEntity; +import java.util.Date; + +/** + * 当前库存存储对象 data_currentinventory + * + * @author mr + * @date 2020-01-14 + */ +public class DataCurrentinventory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** UUID */ + private String id; + + /** 记账日期 */ + @Excel(name = "记账日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date accountdate; + + /** 单号 */ + @Excel(name = "单号") + private String billnumber; + + /** 公司UUID */ + @Excel(name = "公司UUID") + private String companyuuid; + + /** 公司代码 */ + @Excel(name = "公司代码") + private String companyid; + + /** 公司名称 */ + @Excel(name = "公司名称") + private String companyname; + + /** 工厂UUID */ + @Excel(name = "工厂UUID") + private String factoryuuid; + + /** 工厂代码 */ + @Excel(name = "工厂代码") + private String factoryid; + + /** 工厂名称 */ + @Excel(name = "工厂名称") + private String factoryname; + + /** 仓库UUID */ + @Excel(name = "仓库UUID") + private String warehouseuuid; + + /** 仓库代码 */ + @Excel(name = "仓库代码") + private String warehouseid; + + /** 仓库名称 */ + @Excel(name = "仓库名称") + private String warehousename; + + /** 库位UUID */ + @Excel(name = "库位UUID") + private String locationuuid; + + /** 库位代码 */ + @Excel(name = "库位代码") + private String locationid; + + /** 库位名称 */ + @Excel(name = "库位名称") + private String locationname; + + /** 商品UUID */ + @Excel(name = "商品UUID") + private String gooduuid; + + /** 商品代码 */ + @Excel(name = "商品代码") + private String goodid; + + /** 商品名称 */ + @Excel(name = "商品名称") + private String goodname; + + /** 计量单位名称 */ + @Excel(name = "计量单位名称") + private String unitname; + + /** 规格 */ + @Excel(name = "规格") + private String standard; + + /** 入库数量 */ + @Excel(name = "入库数量") + private Double inamount; + + /** 出库数量 */ + @Excel(name = "出库数量") + private Double outamount; + + /** 数量 */ + @Excel(name = "数量") + private Double amount; + + /** 冻结数量 */ + @Excel(name = "冻结数量") + private Double freezeamount; + + /** 批次管理 */ + @Excel(name = "批次管理") + private Integer isbatch; + + /** 批次单号 */ + @Excel(name = "批次单号") + private String batchbillnumber; + + /** 专供号 */ + @Excel(name = "专供号") + private String specialnumber; + + /** 类型 */ + @Excel(name = "类型") + private String type; + + /** 单据类型 */ + @Excel(name = "单据类型") + private String billtype; + + /** 创建人代码 */ + @Excel(name = "创建人代码") + private String createuserid; + + /** 创建人名称 */ + @Excel(name = "创建人名称") + private String createusername; + + /** 创建人时间 */ + @Excel(name = "创建人时间") + private String createtime; + + /** 单据类型名称 */ + @Excel(name = "单据类型名称") + private String billtypename; + + /** 类型名称 */ + @Excel(name = "类型名称") + private String typename; + + /** 生产日期 */ + @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date productdate; + + /** 订单号 */ + @Excel(name = "订单号") + private String salebillnumber; + + /** 产地 */ + @Excel(name = "产地") + private String productionarea; + + /** 版本号 */ + @Excel(name = "版本号") + private String versionnumber; + + /** 客户UUID */ + @Excel(name = "客户UUID") + private String customeruuid; + + /** 客户代码 */ + @Excel(name = "客户代码") + private String customerid; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String customername; + + /** 明细UUID */ + @Excel(name = "明细UUID") + private String detailuuid; + + /** 专供号代码 */ + @Excel(name = "专供号代码") + private String specialcode; + + /** 单据类型(入库、红冲、退库) */ + @Excel(name = "单据类型", readConverterExp = "入=库、红冲、退库") + private String billstatus; + + /** 仓储日期 */ + @Excel(name = "仓储日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date storedate; + + /** 数量 */ + @Excel(name = "可用数量") + private Double availableamount; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setAccountdate(Date accountdate) + { + this.accountdate = accountdate; + } + + public Date getAccountdate() + { + return accountdate; + } + public void setBillnumber(String billnumber) + { + this.billnumber = billnumber; + } + + public String getBillnumber() + { + return billnumber; + } + public void setCompanyuuid(String companyuuid) + { + this.companyuuid = companyuuid; + } + + public String getCompanyuuid() + { + return companyuuid; + } + public void setCompanyid(String companyid) + { + this.companyid = companyid; + } + + public String getCompanyid() + { + return companyid; + } + public void setCompanyname(String companyname) + { + this.companyname = companyname; + } + + public String getCompanyname() + { + return companyname; + } + public void setFactoryuuid(String factoryuuid) + { + this.factoryuuid = factoryuuid; + } + + public String getFactoryuuid() + { + return factoryuuid; + } + public void setFactoryid(String factoryid) + { + this.factoryid = factoryid; + } + + public String getFactoryid() + { + return factoryid; + } + public void setFactoryname(String factoryname) + { + this.factoryname = factoryname; + } + + public String getFactoryname() + { + return factoryname; + } + public void setWarehouseuuid(String warehouseuuid) + { + this.warehouseuuid = warehouseuuid; + } + + public String getWarehouseuuid() + { + return warehouseuuid; + } + public void setWarehouseid(String warehouseid) + { + this.warehouseid = warehouseid; + } + + public String getWarehouseid() + { + return warehouseid; + } + public void setWarehousename(String warehousename) + { + this.warehousename = warehousename; + } + + public String getWarehousename() + { + return warehousename; + } + public void setLocationuuid(String locationuuid) + { + this.locationuuid = locationuuid; + } + + public String getLocationuuid() + { + return locationuuid; + } + public void setLocationid(String locationid) + { + this.locationid = locationid; + } + + public String getLocationid() + { + return locationid; + } + public void setLocationname(String locationname) + { + this.locationname = locationname; + } + + public String getLocationname() + { + return locationname; + } + public void setGooduuid(String gooduuid) + { + this.gooduuid = gooduuid; + } + + public String getGooduuid() + { + return gooduuid; + } + public void setGoodid(String goodid) + { + this.goodid = goodid; + } + + public String getGoodid() + { + return goodid; + } + public void setGoodname(String goodname) + { + this.goodname = goodname; + } + + public String getGoodname() + { + return goodname; + } + public void setUnitname(String unitname) + { + this.unitname = unitname; + } + + public String getUnitname() + { + return unitname; + } + public void setStandard(String standard) + { + this.standard = standard; + } + + public String getStandard() + { + return standard; + } + public void setInamount(Double inamount) + { + this.inamount = inamount; + } + + public Double getInamount() + { + return inamount; + } + public void setOutamount(Double outamount) + { + this.outamount = outamount; + } + + public Double getOutamount() + { + return outamount; + } + public void setAmount(Double amount) + { + this.amount = amount; + } + + public Double getAmount() + { + return amount; + } + public void setFreezeamount(Double freezeamount) + { + this.freezeamount = freezeamount; + } + + public Double getFreezeamount() + { + return freezeamount; + } + public void setIsbatch(Integer isbatch) + { + this.isbatch = isbatch; + } + + public Integer getIsbatch() + { + return isbatch; + } + public void setBatchbillnumber(String batchbillnumber) + { + this.batchbillnumber = batchbillnumber; + } + + public String getBatchbillnumber() + { + return batchbillnumber; + } + public void setSpecialnumber(String specialnumber) + { + this.specialnumber = specialnumber; + } + + public String getSpecialnumber() + { + return specialnumber; + } + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + public void setBilltype(String billtype) + { + this.billtype = billtype; + } + + public String getBilltype() + { + return billtype; + } + public void setCreateuserid(String createuserid) + { + this.createuserid = createuserid; + } + + public String getCreateuserid() + { + return createuserid; + } + public void setCreateusername(String createusername) + { + this.createusername = createusername; + } + + public String getCreateusername() + { + return createusername; + } + public void setBilltypename(String billtypename) + { + this.billtypename = billtypename; + } + + public String getBilltypename() + { + return billtypename; + } + public void setTypename(String typename) + { + this.typename = typename; + } + + public String getTypename() + { + return typename; + } + public void setProductdate(Date productdate) + { + this.productdate = productdate; + } + + public Date getProductdate() + { + return productdate; + } + public void setSalebillnumber(String salebillnumber) + { + this.salebillnumber = salebillnumber; + } + + public String getSalebillnumber() + { + return salebillnumber; + } + public void setProductionarea(String productionarea) + { + this.productionarea = productionarea; + } + + public String getProductionarea() + { + return productionarea; + } + public void setVersionnumber(String versionnumber) + { + this.versionnumber = versionnumber; + } + + public String getVersionnumber() + { + return versionnumber; + } + public void setCustomeruuid(String customeruuid) + { + this.customeruuid = customeruuid; + } + + public String getCustomeruuid() + { + return customeruuid; + } + public void setCustomerid(String customerid) + { + this.customerid = customerid; + } + + public String getCustomerid() + { + return customerid; + } + public void setCustomername(String customername) + { + this.customername = customername; + } + + public String getCustomername() + { + return customername; + } + public void setDetailuuid(String detailuuid) + { + this.detailuuid = detailuuid; + } + + public String getDetailuuid() + { + return detailuuid; + } + public void setSpecialcode(String specialcode) + { + this.specialcode = specialcode; + } + + public String getSpecialcode() + { + return specialcode; + } + public void setBillstatus(String billstatus) + { + this.billstatus = billstatus; + } + + public String getBillstatus() + { + return billstatus; + } + public void setStoredate(Date storedate) + { + this.storedate = storedate; + } + + public Date getStoredate() + { + return storedate; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("accountdate", getAccountdate()) + .append("billnumber", getBillnumber()) + .append("companyuuid", getCompanyuuid()) + .append("companyid", getCompanyid()) + .append("companyname", getCompanyname()) + .append("factoryuuid", getFactoryuuid()) + .append("factoryid", getFactoryid()) + .append("factoryname", getFactoryname()) + .append("warehouseuuid", getWarehouseuuid()) + .append("warehouseid", getWarehouseid()) + .append("warehousename", getWarehousename()) + .append("locationuuid", getLocationuuid()) + .append("locationid", getLocationid()) + .append("locationname", getLocationname()) + .append("gooduuid", getGooduuid()) + .append("goodid", getGoodid()) + .append("goodname", getGoodname()) + .append("unitname", getUnitname()) + .append("standard", getStandard()) + .append("inamount", getInamount()) + .append("outamount", getOutamount()) + .append("amount", getAmount()) + .append("freezeamount", getFreezeamount()) + .append("isbatch", getIsbatch()) + .append("batchbillnumber", getBatchbillnumber()) + .append("specialnumber", getSpecialnumber()) + .append("type", getType()) + .append("billtype", getBilltype()) + .append("remark", getRemark()) + .append("createuserid", getCreateuserid()) + .append("createusername", getCreateusername()) + .append("createtime", getCreatetime()) + .append("billtypename", getBilltypename()) + .append("typename", getTypename()) + .append("productdate", getProductdate()) + .append("salebillnumber", getSalebillnumber()) + .append("productionarea", getProductionarea()) + .append("versionnumber", getVersionnumber()) + .append("customeruuid", getCustomeruuid()) + .append("customerid", getCustomerid()) + .append("customername", getCustomername()) + .append("detailuuid", getDetailuuid()) + .append("specialcode", getSpecialcode()) + .append("billstatus", getBillstatus()) + .append("storedate", getStoredate()) + .append("availableamount", getAvailableamount()) + .toString(); + } + + public String getCreatetime() { + return createtime; + } + + public void setCreatetime(String createtime) { + this.createtime = createtime; + } + + public Double getAvailableamount() { + return availableamount; + } + + public void setAvailableamount(Double availableamount) { + this.availableamount = availableamount; + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/data/mapper/DataCurrentinventoryMapper.java b/ruoyi/src/main/java/com/ruoyi/project/mr/data/mapper/DataCurrentinventoryMapper.java new file mode 100644 index 000000000..9b3bbfa8b --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/data/mapper/DataCurrentinventoryMapper.java @@ -0,0 +1,69 @@ +package com.ruoyi.project.mr.data.mapper; + +import com.ruoyi.project.mr.data.domain.DataCurrentinventory; +import java.util.List; + +/** + * 当前库存存储Mapper接口 + * + * @author mr + * @date 2020-01-14 + */ +public interface DataCurrentinventoryMapper +{ + /** + * 查询当前库存存储 + * + * @param id 当前库存存储ID + * @return 当前库存存储 + */ + public DataCurrentinventory selectDataCurrentinventoryById(String id); + + /** + * 查询当前库存存储列表 + * + * @param dataCurrentinventory 当前库存存储 + * @return 当前库存存储集合 + */ + public List selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory); + + /** + * 查询当前库存存储整合列表 + * + * @param dataCurrentinventory 当前库存存储整合 + * @return 当前库存存储集合 + */ + public List selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory); + + /** + * 新增当前库存存储 + * + * @param dataCurrentinventory 当前库存存储 + * @return 结果 + */ + public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory); + + /** + * 修改当前库存存储 + * + * @param dataCurrentinventory 当前库存存储 + * @return 结果 + */ + public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory); + + /** + * 删除当前库存存储 + * + * @param id 当前库存存储ID + * @return 结果 + */ + public int deleteDataCurrentinventoryById(String id); + + /** + * 批量删除当前库存存储 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteDataCurrentinventoryByIds(String[] ids); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/data/service/IDataCurrentinventoryService.java b/ruoyi/src/main/java/com/ruoyi/project/mr/data/service/IDataCurrentinventoryService.java new file mode 100644 index 000000000..ff38957ce --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/data/service/IDataCurrentinventoryService.java @@ -0,0 +1,69 @@ +package com.ruoyi.project.mr.data.service; + +import com.ruoyi.project.mr.data.domain.DataCurrentinventory; +import java.util.List; + +/** + * 当前库存存储Service接口 + * + * @author mr + * @date 2020-01-14 + */ +public interface IDataCurrentinventoryService +{ + /** + * 查询当前库存存储 + * + * @param id 当前库存存储ID + * @return 当前库存存储 + */ + public DataCurrentinventory selectDataCurrentinventoryById(String id); + + /** + * 查询当前库存存储列表 + * + * @param dataCurrentinventory 当前库存存储 + * @return 当前库存存储集合 + */ + public List selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory); + + /** + * 查询当前库存存储整合 + * + * @param dataCurrentinventory 当前库存存储 + * @return 当前库存存储集合 + */ + public List selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory); + + /** + * 新增当前库存存储 + * + * @param dataCurrentinventory 当前库存存储 + * @return 结果 + */ + public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory); + + /** + * 修改当前库存存储 + * + * @param dataCurrentinventory 当前库存存储 + * @return 结果 + */ + public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory); + + /** + * 批量删除当前库存存储 + * + * @param ids 需要删除的当前库存存储ID + * @return 结果 + */ + public int deleteDataCurrentinventoryByIds(String[] ids); + + /** + * 删除当前库存存储信息 + * + * @param id 当前库存存储ID + * @return 结果 + */ + public int deleteDataCurrentinventoryById(String id); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/mr/data/service/impl/DataCurrentinventoryServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/mr/data/service/impl/DataCurrentinventoryServiceImpl.java new file mode 100644 index 000000000..f5ff3e014 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/mr/data/service/impl/DataCurrentinventoryServiceImpl.java @@ -0,0 +1,106 @@ +package com.ruoyi.project.mr.data.service.impl; + +import com.ruoyi.project.mr.data.domain.DataCurrentinventory; +import com.ruoyi.project.mr.data.mapper.DataCurrentinventoryMapper; +import com.ruoyi.project.mr.data.service.IDataCurrentinventoryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 当前库存存储Service业务层处理 + * + * @author mr + * @date 2020-01-14 + */ +@Service +public class DataCurrentinventoryServiceImpl implements IDataCurrentinventoryService +{ + @Autowired + private DataCurrentinventoryMapper dataCurrentinventoryMapper; + + /** + * 查询当前库存存储 + * + * @param id 当前库存存储ID + * @return 当前库存存储 + */ + @Override + public DataCurrentinventory selectDataCurrentinventoryById(String id) + { + return dataCurrentinventoryMapper.selectDataCurrentinventoryById(id); + } + + /** + * 查询当前库存存储列表 + * + * @param dataCurrentinventory 当前库存存储 + * @return 当前库存存储 + */ + @Override + public List selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory) + { + return dataCurrentinventoryMapper.selectDataCurrentinventoryList(dataCurrentinventory); + } + + /** + * 查询当前库存存储整合 + * + * @param dataCurrentinventory 当前库存存储 + * @return 当前库存存储 + */ + @Override + public List selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory) + { + return dataCurrentinventoryMapper.selectDataCurrentinventorySum(dataCurrentinventory); + } + + /** + * 新增当前库存存储 + * + * @param dataCurrentinventory 当前库存存储 + * @return 结果 + */ + @Override + public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory) + { + return dataCurrentinventoryMapper.insertDataCurrentinventory(dataCurrentinventory); + } + + /** + * 修改当前库存存储 + * + * @param dataCurrentinventory 当前库存存储 + * @return 结果 + */ + @Override + public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory) + { + return dataCurrentinventoryMapper.updateDataCurrentinventory(dataCurrentinventory); + } + + /** + * 批量删除当前库存存储 + * + * @param ids 需要删除的当前库存存储ID + * @return 结果 + */ + @Override + public int deleteDataCurrentinventoryByIds(String[] ids) + { + return dataCurrentinventoryMapper.deleteDataCurrentinventoryByIds(ids); + } + + /** + * 删除当前库存存储信息 + * + * @param id 当前库存存储ID + * @return 结果 + */ + @Override + public int deleteDataCurrentinventoryById(String id) + { + return dataCurrentinventoryMapper.deleteDataCurrentinventoryById(id); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java index 243505337..b8e2f94fc 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysNoticeController.java @@ -1,17 +1,5 @@ package com.ruoyi.project.system.controller; -import java.util.List; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.aspectj.lang.enums.BusinessType; @@ -20,10 +8,16 @@ import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.project.system.domain.SysNotice; import com.ruoyi.project.system.service.ISysNoticeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; /** * 公告 信息操作处理 - * + * * @author ruoyi */ @RestController @@ -89,4 +83,11 @@ public class SysNoticeController extends BaseController { return toAjax(noticeService.deleteNoticeById(noticeId)); } + + + @GetMapping("/msg") + public AjaxResult message() + { + return toAjax(10); + } } diff --git a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java index b93e8eb24..fff65b0ad 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/system/controller/SysUserController.java @@ -32,7 +32,7 @@ import com.ruoyi.project.system.service.ISysUserService; /** * 用户信息 - * + * * @author ruoyi */ @RestController @@ -195,4 +195,4 @@ public class SysUserController extends BaseController user.setUpdateBy(SecurityUtils.getUsername()); return toAjax(userService.updateUserStatus(user)); } -} \ No newline at end of file +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java index 590401322..1550c621b 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java +++ b/ruoyi/src/main/java/com/ruoyi/project/tool/gen/util/GenUtils.java @@ -10,7 +10,7 @@ import com.ruoyi.project.tool.gen.domain.GenTableColumn; /** * 代码生成器 工具类 - * + * * @author ruoyi */ public class GenUtils @@ -115,7 +115,7 @@ public class GenUtils /** * 校验数组是否包含指定值 - * + * * @param arr 数组 * @param targetValue 值 * @return 是否包含 @@ -127,7 +127,7 @@ public class GenUtils /** * 获取模块名 - * + * * @param packageName 包名 * @return 模块名 */ @@ -141,7 +141,7 @@ public class GenUtils /** * 获取业务名 - * + * * @param tableName 表名 * @return 业务名 */ @@ -155,7 +155,7 @@ public class GenUtils /** * 表名转换成Java类名 - * + * * @param tableName 表名称 * @return 类名 */ @@ -174,18 +174,17 @@ public class GenUtils /** * 关键字替换 - * - * @param name 需要被替换的名字 + * * @return 替换后的名字 */ public static String replaceText(String text) { - return RegExUtils.replaceAll(text, "(?:表|若依)", ""); + return RegExUtils.replaceAll(text, "(?:表|明仁)", ""); } /** * 获取数据库类型字段 - * + * * @param columnType 列类型 * @return 截取后的列类型 */ @@ -203,7 +202,7 @@ public class GenUtils /** * 获取字段长度 - * + * * @param columnType 列类型 * @return 截取后的列类型 */ @@ -222,7 +221,7 @@ public class GenUtils /** * 获取空数组列表 - * + * * @param length 长度 * @return 数组信息 */ @@ -235,4 +234,4 @@ public class GenUtils } return values; } -} \ No newline at end of file +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/tool/swagger/TestController.java b/ruoyi/src/main/java/com/ruoyi/project/tool/swagger/TestController.java index 17f4c31e7..e0f6b50cc 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/tool/swagger/TestController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/tool/swagger/TestController.java @@ -1,28 +1,19 @@ package com.ruoyi.project.tool.swagger; +import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.framework.web.controller.BaseController; +import com.ruoyi.framework.web.domain.AjaxResult; +import io.swagger.annotations.*; +import org.springframework.web.bind.annotation.*; + import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.framework.web.controller.BaseController; -import com.ruoyi.framework.web.domain.AjaxResult; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import io.swagger.annotations.ApiOperation; /** * swagger 用户测试方法 - * + * * @author ruoyi */ @Api("用户信息管理") @@ -32,8 +23,8 @@ public class TestController extends BaseController { private final static Map users = new LinkedHashMap(); { - users.put(1, new UserEntity(1, "admin", "admin123", "15888888888")); - users.put(2, new UserEntity(2, "ry", "admin123", "15666666666")); + users.put(1, new UserEntity(1, "admin", "admin123", "15888888888","头像1")); + users.put(2, new UserEntity(2, "ry", "admin123", "15666666666","头像2")); } @ApiOperation("获取用户列表") @@ -120,17 +111,21 @@ class UserEntity @ApiModelProperty("用户手机") private String mobile; + @ApiModelProperty("用户头像") + private String avatar; + public UserEntity() { } - public UserEntity(Integer userId, String username, String password, String mobile) + public UserEntity(Integer userId, String username, String password, String mobile,String avatar) { this.userId = userId; this.username = username; this.password = password; this.mobile = mobile; + this.avatar = avatar; } public Integer getUserId() @@ -172,4 +167,12 @@ class UserEntity { this.mobile = mobile; } + + public String getAvatar() { + return avatar; + } + + public void setAvatar(String avatar) { + this.avatar = avatar; + } } diff --git a/ruoyi/src/main/resources/application-dev.yml b/ruoyi/src/main/resources/application-dev.yml new file mode 100644 index 000000000..af6953960 --- /dev/null +++ b/ruoyi/src/main/resources/application-dev.yml @@ -0,0 +1,79 @@ +# 数据源配置 +spring: + datasource: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + druid: + # 主库数据源 + master: + url: jdbc:mysql://39.100.2.138:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: MRyyserver2019 + # 从库数据源 + slave: + # 从数据源开关/默认关闭 + enabled: false + url: + username: + password: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: + login-password: + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + # redis 配置 + redis: + # Redis数据库索引(默认为0) + database: 13 + # 地址 + host: 39.100.2.138 + # 端口,默认为6379 + port: 6379 + # Redis服务器连接密码(默认为空) + password: MRyyredis2019 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: diff --git a/ruoyi/src/main/resources/application-druid.yml b/ruoyi/src/main/resources/application-druid.yml index cdfb3390b..0418d82c3 100644 --- a/ruoyi/src/main/resources/application-druid.yml +++ b/ruoyi/src/main/resources/application-druid.yml @@ -6,16 +6,16 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://39.100.2.138:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: password + password: MRyyserver2019 # 从库数据源 slave: # 从数据源开关/默认关闭 enabled: false - url: - username: - password: + url: + username: + password: # 初始连接数 initialSize: 5 # 最小连接池数量 @@ -35,7 +35,7 @@ spring: testWhileIdle: true testOnBorrow: false testOnReturn: false - webStatFilter: + webStatFilter: enabled: true statViewServlet: enabled: true @@ -43,8 +43,8 @@ spring: allow: url-pattern: /druid/* # 控制台管理用户名和密码 - login-username: - login-password: + login-username: + login-password: filter: stat: enabled: true @@ -54,4 +54,26 @@ spring: merge-sql: true wall: config: - multi-statement-allow: true \ No newline at end of file + multi-statement-allow: true + # redis 配置 + redis: + # Redis数据库索引(默认为0) + database: 10 + # 地址 + host: 39.100.2.138 + # 端口,默认为6379 + port: 6379 + # Redis服务器连接密码(默认为空) + password: MRyyredis2019 + # 连接超时时间 + timeout: 10s + lettuce: + pool: + # 连接池中的最小空闲连接 + min-idle: 0 + # 连接池中的最大空闲连接 + max-idle: 8 + # 连接池的最大数据库连接数 + max-active: 8 + # #连接池最大阻塞等待时间(使用负值表示没有限制) + max-wait: -1ms diff --git a/ruoyi/src/main/resources/application.yml b/ruoyi/src/main/resources/application.yml index b81d05807..c67d0f2f1 100644 --- a/ruoyi/src/main/resources/application.yml +++ b/ruoyi/src/main/resources/application.yml @@ -1,15 +1,15 @@ # 项目相关配置 ruoyi: # 名称 - name: RuoYi + name: mr # 版本 - version: 2.0.0 + version: 1.0.0 # 版权年份 - copyrightYear: 2019 + copyrightYear: 2020 # 实例演示开关 - demoEnabled: true + demoEnabled: false # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath + profile: C:/ruoyi/uploadPath # 获取ip地址开关 addressEnabled: true @@ -41,7 +41,7 @@ spring: messages: # 国际化资源文件路径 basename: i18n/messages - profiles: + profiles: active: druid # 文件上传 servlet: @@ -55,34 +55,17 @@ spring: restart: # 热部署开关 enabled: true - # redis 配置 - redis: - # 地址 - host: localhost - # 端口,默认为6379 - port: 6379 - # 连接超时时间 - timeout: 10s - lettuce: - pool: - # 连接池中的最小空闲连接 - min-idle: 0 - # 连接池中的最大空闲连接 - max-idle: 8 - # 连接池的最大数据库连接数 - max-active: 8 - # #连接池最大阻塞等待时间(使用负值表示没有限制) - max-wait: -1ms - # token配置 token: # 令牌自定义标识 header: Authorization # 令牌秘钥 - secret: abcdefghijklmnopqrstuvwxyz + secret: mrcrm + # API令牌秘钥 + apiSecret: MRyyApi2019 # 令牌有效期(默认30分钟) expireTime: 30 - + # MyBatis配置 mybatis: # 搜索指定包别名 @@ -93,28 +76,28 @@ mybatis: configLocation: classpath:mybatis/mybatis-config.xml # PageHelper分页插件 -pagehelper: +pagehelper: helperDialect: mysql reasonable: true supportMethodsArguments: true - params: count=countSql + params: count=countSql # 防止XSS攻击 -xss: +xss: # 过滤开关 enabled: true # 排除链接(多个用逗号分隔) excludes: /system/notice/* # 匹配链接 - urlPatterns: /system/*,/monitor/*,/tool/* - + urlPatterns: /system/*,/monitor/*,/tool/*,/base/*,/data/* + # 代码生成 -gen: +gen: # 作者 - author: ruoyi + author: mr # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool - packageName: com.ruoyi.project.system + packageName: com.ruoyi.project.mr.base # 自动去除表前缀,默认是true autoRemovePre: false # 表前缀(生成类名不会包含表前缀,多个用逗号分隔) - tablePrefix: sys_ \ No newline at end of file + tablePrefix: sys_ diff --git a/ruoyi/src/main/resources/banner.txt b/ruoyi/src/main/resources/banner.txt index 94662592f..6bdf82b8b 100644 --- a/ruoyi/src/main/resources/banner.txt +++ b/ruoyi/src/main/resources/banner.txt @@ -21,4 +21,4 @@ Spring Boot Version: ${spring-boot.version} // `=---=' // // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // // 佛祖保佑 永不宕机 永无BUG // -//////////////////////////////////////////////////////////////////// \ No newline at end of file +//////////////////////////////////////////////////////////////////// diff --git a/ruoyi/src/main/resources/i18n/messages.properties b/ruoyi/src/main/resources/i18n/messages.properties index 4baeb241a..054def803 100644 --- a/ruoyi/src/main/resources/i18n/messages.properties +++ b/ruoyi/src/main/resources/i18n/messages.properties @@ -15,7 +15,7 @@ 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=登录成功 @@ -34,3 +34,7 @@ no.update.permission=您没有修改数据的权限,请联系管理员添加 no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] + +#API消息 +api.success.msg=请求(或处理)成功 +api.error.msg=请求参数不完整或不正确 diff --git a/ruoyi/src/main/resources/mybatis/base/BaseCalendarItemMapper.xml b/ruoyi/src/main/resources/mybatis/base/BaseCalendarItemMapper.xml new file mode 100644 index 000000000..a86f878d6 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/base/BaseCalendarItemMapper.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + select ID, parent_id, work, work_day, create_by, create_time, update_by, update_time from base_calendar_item + + + + + + + + + + + where ID = #{id} + + + + insert into base_calendar_item + + ID, + parent_id, + work, + work_day, + create_by, + create_time, + update_by, + update_time, + + + #{id}, + #{parentId}, + #{work}, + #{workDay}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update base_calendar_item + + parent_id = #{parentId}, + work = #{work}, + work_day = #{workDay}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where ID = #{id} + + + + delete from base_calendar_item where ID = #{id} + + + + delete from base_calendar_item where ID in + + #{id} + + + + diff --git a/ruoyi/src/main/resources/mybatis/base/BaseCalendarMapper.xml b/ruoyi/src/main/resources/mybatis/base/BaseCalendarMapper.xml new file mode 100644 index 000000000..c35fc10f4 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/base/BaseCalendarMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + select ID, CodeID, Name, Enabled, create_by, create_time, update_by, update_time, remark from base_calendar + + + + + + and Name like concat('%', #{name}, '%') + and Enabled = #{enabled} + + + + + + where ID = #{id} + + + + insert into base_calendar + + ID, + CodeID, + Name, + Enabled, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{id}, + #{codeid}, + #{name}, + #{enabled}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update base_calendar + + CodeID = #{codeid}, + Name = #{name}, + Enabled = #{enabled}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where ID = #{id} + + + + delete from base_calendar where ID = #{id} + + + + delete from base_calendar where ID in + + #{id} + + + + diff --git a/ruoyi/src/main/resources/mybatis/base/BaseCompanyMapper.xml b/ruoyi/src/main/resources/mybatis/base/BaseCompanyMapper.xml new file mode 100644 index 000000000..7355a65e2 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/base/BaseCompanyMapper.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + select ID, Sort, CodeID, Name, Enabled, create_by, create_time, update_by, update_time, remark from base_company + + + + + + and Name like concat('%', #{name}, '%') + and Enabled = #{enabled} + and create_time = #{createTime} + and remark like concat('%', #{remark}, '%') + + + + + + where ID = #{id} + + + + insert into base_company + + ID, + Sort, + CodeID, + Name, + Enabled, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{id}, + #{sort}, + #{codeid}, + #{name}, + #{enabled}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update base_company + + Sort = #{sort}, + CodeID = #{codeid}, + Name = #{name}, + Enabled = #{enabled}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where ID = #{id} + + + + delete from base_company where ID = #{id} + + + + delete from base_company where ID in + + #{id} + + + + diff --git a/ruoyi/src/main/resources/mybatis/data/DataCurrentinventoryMapper.xml b/ruoyi/src/main/resources/mybatis/data/DataCurrentinventoryMapper.xml new file mode 100644 index 000000000..342b2d6f5 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/data/DataCurrentinventoryMapper.xml @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select ID, AccountDate, Billnumber, CompanyUUID, CompanyID, CompanyName, FactoryUUID, FactoryID, FactoryName, WarehouseUUID, WarehouseID, WarehouseName, LocationUUID, LocationID, LocationName, GoodUUID, GoodID, GoodName, UnitName, Standard, InAmount, OutAmount, Amount, FreezeAmount, IsBatch, BatchBillnumber, SpecialNumber, Type, BillType, Remark, CreateUserID, CreateUserName, CreateTime, BillTypeName, TypeName, ProductDate, SaleBillnumber, ProductionArea, VersionNumber, CustomerUUID, CustomerID, CustomerName, DetailUUID, SpecialCode, BillStatus, StoreDate from data_currentinventory + + + + + + and AccountDate between #{params.beginAccountdate} and #{params.endAccountdate} + and Billnumber = #{billnumber} + and CompanyName like concat('%', #{companyname}, '%') + and FactoryName like concat('%', #{factoryname}, '%') + and WarehouseName like concat('%', #{warehousename}, '%') + and LocationName like concat('%', #{locationname}, '%') + and GoodName like concat('%', #{goodname}, '%') + and BatchBillnumber like concat('%', #{batchbillnumber}, '%') + and SpecialNumber like concat('%', #{specialnumber}, '%') + and Remark like concat('%', #{remark}, '%') + and TypeName = #{typename} + and CustomerName like concat('%', #{customername}, '%') + + + + + + select MAX(ID) ID,MAX(WarehouseName) WarehouseName,MAX(GoodID) GoodID, MAX(GoodName) GoodName, MAX(UnitName) UnitName, MAX(Standard) Standard, SUM(Amount) Amount, SUM(FreezeAmount) FreezeAmount,SUM(Amount) - SUM(FreezeAmount) AS AvailableAmount from data_currentinventory + + and AccountDate between #{params.beginAccountdate} and #{params.endAccountdate} + and Billnumber = #{billnumber} + and CompanyName like concat('%', #{companyname}, '%') + and FactoryName like concat('%', #{factoryname}, '%') + and WarehouseName like concat('%', #{warehousename}, '%') + and LocationName like concat('%', #{locationname}, '%') + and GoodName like concat('%', #{goodname}, '%') + and BatchBillnumber like concat('%', #{batchbillnumber}, '%') + and SpecialNumber like concat('%', #{specialnumber}, '%') + and Remark like concat('%', #{remark}, '%') + and TypeName = #{typename} + and CustomerName like concat('%', #{customername}, '%') + + group by WarehouseUUID,GoodUUID + + + + + where ID = #{id} + + + + insert into data_currentinventory + + ID, + AccountDate, + Billnumber, + CompanyUUID, + CompanyID, + CompanyName, + FactoryUUID, + FactoryID, + FactoryName, + WarehouseUUID, + WarehouseID, + WarehouseName, + LocationUUID, + LocationID, + LocationName, + GoodUUID, + GoodID, + GoodName, + UnitName, + Standard, + InAmount, + OutAmount, + Amount, + FreezeAmount, + IsBatch, + BatchBillnumber, + SpecialNumber, + Type, + BillType, + Remark, + CreateUserID, + CreateUserName, + CreateTime, + BillTypeName, + TypeName, + ProductDate, + SaleBillnumber, + ProductionArea, + VersionNumber, + CustomerUUID, + CustomerID, + CustomerName, + DetailUUID, + SpecialCode, + BillStatus, + StoreDate, + + + #{id}, + #{accountdate}, + #{billnumber}, + #{companyuuid}, + #{companyid}, + #{companyname}, + #{factoryuuid}, + #{factoryid}, + #{factoryname}, + #{warehouseuuid}, + #{warehouseid}, + #{warehousename}, + #{locationuuid}, + #{locationid}, + #{locationname}, + #{gooduuid}, + #{goodid}, + #{goodname}, + #{unitname}, + #{standard}, + #{inamount}, + #{outamount}, + #{amount}, + #{freezeamount}, + #{isbatch}, + #{batchbillnumber}, + #{specialnumber}, + #{type}, + #{billtype}, + #{remark}, + #{createuserid}, + #{createusername}, + #{createtime}, + #{billtypename}, + #{typename}, + #{productdate}, + #{salebillnumber}, + #{productionarea}, + #{versionnumber}, + #{customeruuid}, + #{customerid}, + #{customername}, + #{detailuuid}, + #{specialcode}, + #{billstatus}, + #{storedate}, + + + + + update data_currentinventory + + AccountDate = #{accountdate}, + Billnumber = #{billnumber}, + CompanyUUID = #{companyuuid}, + CompanyID = #{companyid}, + CompanyName = #{companyname}, + FactoryUUID = #{factoryuuid}, + FactoryID = #{factoryid}, + FactoryName = #{factoryname}, + WarehouseUUID = #{warehouseuuid}, + WarehouseID = #{warehouseid}, + WarehouseName = #{warehousename}, + LocationUUID = #{locationuuid}, + LocationID = #{locationid}, + LocationName = #{locationname}, + GoodUUID = #{gooduuid}, + GoodID = #{goodid}, + GoodName = #{goodname}, + UnitName = #{unitname}, + Standard = #{standard}, + InAmount = #{inamount}, + OutAmount = #{outamount}, + Amount = #{amount}, + FreezeAmount = #{freezeamount}, + IsBatch = #{isbatch}, + BatchBillnumber = #{batchbillnumber}, + SpecialNumber = #{specialnumber}, + Type = #{type}, + BillType = #{billtype}, + Remark = #{remark}, + CreateUserID = #{createuserid}, + CreateUserName = #{createusername}, + CreateTime = #{createtime}, + BillTypeName = #{billtypename}, + TypeName = #{typename}, + ProductDate = #{productdate}, + SaleBillnumber = #{salebillnumber}, + ProductionArea = #{productionarea}, + VersionNumber = #{versionnumber}, + CustomerUUID = #{customeruuid}, + CustomerID = #{customerid}, + CustomerName = #{customername}, + DetailUUID = #{detailuuid}, + SpecialCode = #{specialcode}, + BillStatus = #{billstatus}, + StoreDate = #{storedate}, + + where ID = #{id} + + + + delete from data_currentinventory where ID = #{id} + + + + delete from data_currentinventory where ID in + + #{id} + + + + diff --git a/ruoyi/src/main/resources/vm/sql/sql.vm b/ruoyi/src/main/resources/vm/sql/sql.vm index 875486c68..b4f73d29a 100644 --- a/ruoyi/src/main/resources/vm/sql/sql.vm +++ b/ruoyi/src/main/resources/vm/sql/sql.vm @@ -1,22 +1,22 @@ -- 菜单 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 'C', '0', '${permissionPrefix}:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '${functionName}菜单'); +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark) +values('${functionName}', '3', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 'C', '0', '${permissionPrefix}:list', '#', 'admin', now(), '${functionName}菜单'); -- 按钮父菜单ID SELECT @parentId := LAST_INSERT_ID(); -- 按钮 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '${permissionPrefix}:query', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark) +values('${functionName}查询', @parentId, '1', '#', '', 1, 'F', '0', '${permissionPrefix}:query', '#', 'admin', now(), '${functionName}查询'); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '${permissionPrefix}:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark) +values('${functionName}新增', @parentId, '2', '#', '', 1, 'F', '0', '${permissionPrefix}:add', '#', 'admin', now(), '${functionName}新增'); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '${permissionPrefix}:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark) +values('${functionName}修改', @parentId, '3', '#', '', 1, 'F', '0', '${permissionPrefix}:edit', '#', 'admin', now(), '${functionName}修改'); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '${permissionPrefix}:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark) +values('${functionName}删除', @parentId, '4', '#', '', 1, 'F', '0', '${permissionPrefix}:remove', '#', 'admin', now(), '${functionName}删除'); -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '${permissionPrefix}:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', ''); \ No newline at end of file +insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, menu_type, visible, perms, icon, create_by, create_time, remark) +values('${functionName}导出', @parentId, '5', '#', '', 1, 'F', '0', '${permissionPrefix}:export', '#', 'admin', now(), '${functionName}导出'); diff --git a/ruoyi/src/main/resources/vm/vue/index.vue.vm b/ruoyi/src/main/resources/vm/vue/index.vue.vm index 212d20a43..b84dcc099 100644 --- a/ruoyi/src/main/resources/vm/vue/index.vue.vm +++ b/ruoyi/src/main/resources/vm/vue/index.vue.vm @@ -97,8 +97,11 @@ - - + + + + {{scope.$index + 1}} + #foreach($column in $columns) #set($javaField=$column.javaField) #set($parentheseIndex=$column.columnComment.indexOf("(")) @@ -118,21 +121,23 @@ #elseif($column.list && "" != $column.dictType) #elseif($column.list && "" != $javaField) - + #end #end 修改 - + \ No newline at end of file +
+ {{ data.day.split('-').slice(2).join('-') }} {{ data.isSelected ? '休息' : '上班'}} +