Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
已添加7个文件
已修改54个文件
已重命名1个文件
| | |
| | | # ç产ç¯å¢é
ç½® |
| | | NODE_ENV = 'production' |
| | | |
| | | VUE_APP_API_URL = 'http://192.168.0.109:10010' |
| | | VUE_APP_API_URL = 'http://localhost:10010' |
| | |
| | | "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=", |
| | | "dev": true |
| | | }, |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "ssri": { |
| | | "version": "8.0.1", |
| | | "resolved": "https://registry.npm.taobao.org/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1617826515595&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fssri%2Fdownload%2Fssri-8.0.1.tgz", |
| | |
| | | "dev": true, |
| | | "requires": { |
| | | "minipass": "^3.1.1" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | } |
| | | } |
| | | } |
| | |
| | | }, |
| | | "@wangeditor/basic-modules": { |
| | | "version": "1.1.7", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/basic-modules/-/basic-modules-1.1.7.tgz", |
| | | "integrity": "sha512-cY9CPkLJaqF05STqfpZKWG4LpxTMeGSIIF1fHvfm/mz+JXatCagjdkbxdikOuKYlxDdeqvOeBmsUBItufDLXZg==", |
| | | "requires": { |
| | | "is-url": "^1.2.4" |
| | |
| | | }, |
| | | "@wangeditor/code-highlight": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/code-highlight/-/code-highlight-1.0.3.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/code-highlight/-/code-highlight-1.0.3.tgz", |
| | | "integrity": "sha512-iazHwO14XpCuIWJNTQTikqUhGKyqj+dUNWJ9288Oym9M2xMVHvnsOmDU2sgUDWVy+pOLojReMPgXCsvvNlOOhw==", |
| | | "requires": { |
| | | "prismjs": "^1.23.0" |
| | |
| | | }, |
| | | "@wangeditor/core": { |
| | | "version": "1.1.19", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/core/-/core-1.1.19.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/core/-/core-1.1.19.tgz", |
| | | "integrity": "sha512-KevkB47+7GhVszyYF2pKGKtCSj/YzmClsD03C3zTt+9SR2XWT5T0e3yQqg8baZpcMvkjs1D8Dv4fk8ok/UaS2Q==", |
| | | "requires": { |
| | | "@types/event-emitter": "^0.3.3", |
| | |
| | | }, |
| | | "@wangeditor/editor": { |
| | | "version": "5.1.23", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/editor/-/editor-5.1.23.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/editor/-/editor-5.1.23.tgz", |
| | | "integrity": "sha512-0RxfeVTuK1tktUaPROnCoFfaHVJpRAIE2zdS0mpP+vq1axVQpLjM8+fCvKzqYIkH0Pg+C+44hJpe3VVroSkEuQ==", |
| | | "requires": { |
| | | "@uppy/core": "^2.1.1", |
| | |
| | | }, |
| | | "@wangeditor/list-module": { |
| | | "version": "1.0.5", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/list-module/-/list-module-1.0.5.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/list-module/-/list-module-1.0.5.tgz", |
| | | "integrity": "sha512-uDuYTP6DVhcYf7mF1pTlmNn5jOb4QtcVhYwSSAkyg09zqxI1qBqsfUnveeDeDqIuptSJhkh81cyxi+MF8sEPOQ==" |
| | | }, |
| | | "@wangeditor/table-module": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/table-module/-/table-module-1.1.4.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/table-module/-/table-module-1.1.4.tgz", |
| | | "integrity": "sha512-5saanU9xuEocxaemGdNi9t8MCDSucnykEC6jtuiT72kt+/Hhh4nERYx1J20OPsTCCdVr7hIyQenFD1iSRkIQ6w==" |
| | | }, |
| | | "@wangeditor/upload-image-module": { |
| | | "version": "1.0.2", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/upload-image-module/-/upload-image-module-1.0.2.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/upload-image-module/-/upload-image-module-1.0.2.tgz", |
| | | "integrity": "sha512-z81lk/v71OwPDYeQDxj6cVr81aDP90aFuywb8nPD6eQeECtOymrqRODjpO6VGvCVxVck8nUxBHtbxKtjgcwyiA==" |
| | | }, |
| | | "@wangeditor/video-module": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/video-module/-/video-module-1.1.4.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@wangeditor/video-module/-/video-module-1.1.4.tgz", |
| | | "integrity": "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==" |
| | | }, |
| | | "@webassemblyjs/ast": { |
| | |
| | | } |
| | | }, |
| | | "caniuse-lite": { |
| | | "version": "1.0.30001228", |
| | | "resolved": "https://registry.nlark.com/caniuse-lite/download/caniuse-lite-1.0.30001228.tgz?cache=0&sync_timestamp=1620658693631&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fcaniuse-lite%2Fdownload%2Fcaniuse-lite-1.0.30001228.tgz", |
| | | "integrity": "sha1-v9xZQs0zJvpR7gtC++9NqdSSp/o=", |
| | | "version": "1.0.30001621", |
| | | "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz", |
| | | "integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==", |
| | | "dev": true |
| | | }, |
| | | "case-sensitive-paths-webpack-plugin": { |
| | |
| | | "resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-1.0.2.tgz", |
| | | "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=", |
| | | "dev": true |
| | | } |
| | | } |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "chalk": "^4.1.0", |
| | | "hash-sum": "^2.0.0", |
| | | "loader-utils": "^2.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-convert": "^2.0.1" |
| | | } |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "ansi-styles": "^4.1.0", |
| | | "supports-color": "^7.1.0" |
| | | } |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "color-name": "~1.1.4" |
| | | } |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "big.js": "^5.2.2", |
| | | "emojis-list": "^3.0.0", |
| | | "json5": "^2.1.2" |
| | | } |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | | "requires": { |
| | | "has-flag": "^4.0.0" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | // è·åè§è²æ°æ®æé |
| | | export function findByRoleId (data) { |
| | | return request.post('visitsAdmin/cloudService/system/dataPermission/findByRoleId', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | |
| | | export function createRolePermission (data) { |
| | | return request.post('/visitsAdmin/cloudService/system/role/createRolePermission', data) |
| | | } |
| | | export function createRoleDataPermission (data) { |
| | | return request.post('/visitsAdmin/cloudService/system/role/createRoleDataPermission', data) |
| | | } |
| | | |
| | | // é
ç½®èå |
| | | export function createRoleMenu (data) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/systemTimer/cloudService/business/quartz/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function create (data) { |
| | | return request.post('/systemTimer/cloudService/business/quartz/create', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function updateById (data) { |
| | | return request.post('/systemTimer/cloudService/business/quartz/updateById', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | // æ ¹æ®IDæ¥è¯¢ |
| | | export function queryById (id) { |
| | | return request.get(`/systemTimer/cloudService/business/quartz/${id}`) |
| | | } |
| | | export function pauseById (id) { |
| | | return request.get(`/systemTimer/cloudService/business/quartz/pause/${id}`) |
| | | } |
| | | export function resumeById (id) { |
| | | return request.get(`/systemTimer/cloudService/business/quartz/resume/${id}`) |
| | | } |
| | | export function runOnceById (id) { |
| | | return request.get(`/systemTimer/cloudService/business/quartz/runOnce/${id}`) |
| | | } |
| | |
| | | this.__afterDelete() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | |
| | | this.__afterDelete(this.tableData.selectedRows.length) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <p class="tip">æ£å¨ä¸ºè§è²ã <em>{{role.name || '-'}}</em>ã é
ç½®æ°æ®æé</p> |
| | | <p class="tip-warn"><i class="el-icon-warning"></i>æéï¼æéé
ç½®åééæ°ç»å½åçæ</p> |
| | | <el-form :model="form" ref="form" style="margin-top:15px"> |
| | | <el-form-item label="æéç±»åï¼" prop="type"> |
| | | <el-select v-model="form.type" clearable filterable placeholder="è¯·éæ©æéç±»å"> |
| | | <el-option |
| | | v-for="(item, index) in options" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type == 4" label="èªå®ä¹é¨é¨ï¼" prop="customData"> |
| | | <el-cascader |
| | | :options="departments" |
| | | v-model="form.customData" |
| | | :props=defaultProps |
| | | clearable |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { createRoleDataPermission } from '@/api/system/role' |
| | | import { fetchList } from '@/api/business/company' |
| | | // import the styles |
| | | import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
| | | export default { |
| | | name: 'OperaSystemRoleWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | options: [ |
| | | { name: 'å
¨é¨', id: 0 }, |
| | | { name: 'æå±é¨é¨åä¸å±é¨é¨', id: 1 }, |
| | | { name: 'æå±é¨é¨åå
¶ååé¨é¨', id: 2 }, |
| | | { name: 'ä»
æå±é¨é¨', id: 3 }, |
| | | { name: 'èªå®ä¹é¨é¨', id: 4 } |
| | | ], |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | businessCode: null, |
| | | createTime: null, |
| | | createUser: null, |
| | | customData: [], |
| | | id: null, |
| | | roleId: null, |
| | | type: 0 |
| | | }, |
| | | defaultProps: { |
| | | multiple: true, |
| | | checkStrictly: true, |
| | | // children: 'children', |
| | | label: 'name', |
| | | value: 'id', |
| | | emitPath: false |
| | | }, |
| | | role:{}, |
| | | departments: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/system/role', |
| | | 'field.id': 'id' |
| | | }) |
| | | this.treeComList() |
| | | }, |
| | | methods: { |
| | | // é¨é¨æ ç¶ç»ææ°æ® |
| | | treeComList () { |
| | | fetchList() |
| | | .then(res => { |
| | | // this.departments = this.tree([res]) |
| | | this.departments =this.newTree(res) |
| | | }) |
| | | }, |
| | | open (title, target,role) { |
| | | // console.log(title, target) |
| | | this.title = title |
| | | this.visible = true |
| | | this.role=role |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | console.log(target); |
| | | if (target.customData === undefined ||target.customData === null || target.customData === '') { |
| | | this.form.customData = [] |
| | | } else { |
| | | const customD = this.form.customData.split(',') |
| | | this.form.customData = customD.map((item) => { return parseInt(item) }) |
| | | } |
| | | }) |
| | | }, |
| | | newTree(tree) { |
| | | if(tree ==null){ |
| | | return [] |
| | | } |
| | | return tree.map(item => { |
| | | let newItem = {...item} |
| | | if(newItem){ |
| | | newItem.children=newItem.childList |
| | | } |
| | | if (item.children && item.children.length == 0) { |
| | | this.$delete( newItem, 'children' ) |
| | | } else { |
| | | newItem.children = this.newTree(newItem.children) |
| | | } |
| | | return newItem |
| | | }); |
| | | }, |
| | | __confirmCreate () { |
| | | // console.log(JSON.stringify(this.form.customData)); |
| | | // return |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | |
| | | this.isWorking = true |
| | | let data = JSON.parse(JSON.stringify(this.form)) |
| | | if (this.form.type === 4) { |
| | | data.customData = this.form.customData.join(',') |
| | | } else { |
| | | data.customData = '' |
| | | } |
| | | createRoleDataPermission(data) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('æ°å»ºæå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | }, |
| | | __confirmEdit () { |
| | | // console.log(JSON.stringify(this.form.customData)); |
| | | // return |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ´æ°æ¥å£ |
| | | this.isWorking = true |
| | | let data = JSON.parse(JSON.stringify(this.form)) |
| | | if (this.form.type === 4) { |
| | | data.customData = this.form.customData.join(',') |
| | | } else { |
| | | data.customData = '' |
| | | } |
| | | createRoleDataPermission(data) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('ä¿®æ¹æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="updateTime" label="æ´æ°æ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['system:role:update', 'system:role:createRolePermission', 'system:role:createRoleMenu', 'system:role:delete'])" |
| | | v-if="containPermissions(['system:role:update', 'system:role:createRolePermission','system:datapermission:create', 'system:role:createRoleMenu', 'system:role:delete'])" |
| | | label="æä½" |
| | | min-width="270" |
| | | fixed="right" |
| | | > |
| | | <template v-if="isAdmin || (row.code !== adminCode && userInfo.roles.findIndex(code => code === row.code) === -1)" slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaRoleWindow.open('ç¼è¾è§è²', row)" icon="el-icon-edit" v-permissions="['system:role:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.operaRoleWindow.open('ç¼è¾è§è²', row)" v-permissions="['system:role:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="setData(row)" v-permissions="['system:datapermission:create']">æ°æ®æé</el-button> |
| | | <el-button type="text" @click="$refs.permissionConfigWindow.open(row)" v-permissions="['system:role:createRolePermission']">é
ç½®æé</el-button> |
| | | <el-button type="text" @click="$refs.menuConfigWindow.open(row)" icon="el-icon-menu" v-permissions="['system:role:createRoleMenu']">ææèå</el-button> |
| | | <el-button v-if="!row.fixed" type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['system:role:delete']">å é¤</el-button> |
| | |
| | | <PermissionConfigWindow ref="permissionConfigWindow" @success="handlePageChange(tableData.pagination.pageIndex)"/> |
| | | <!-- ææèå --> |
| | | <MenuConfigWindow ref="menuConfigWindow" @success="handlePageChange(tableData.pagination.pageIndex)"/> |
| | | <OperaSystemRoleDataWindow ref="OperaSystemRoleDataWindow" @success="handlePageChange(tableData.pagination.pageIndex)" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import OperaRoleWindow from '@/components/system/role/OperaRoleWindow' |
| | | import PermissionConfigWindow from '@/components/system/role/PermissionConfigWindow' |
| | | import MenuConfigWindow from '@/components/system/role/MenuConfigWindow' |
| | | import OperaSystemRoleDataWindow from '@/components/system/role/OperaSystemRoleDataWindow' |
| | | import { findByRoleId } from '@/api/system/role' |
| | | export default { |
| | | name: 'SystemRole', |
| | | extends: BaseTable, |
| | | components: { MenuConfigWindow, PermissionConfigWindow, OperaRoleWindow, TableLayout, Pagination }, |
| | | components: { MenuConfigWindow, PermissionConfigWindow, OperaRoleWindow, TableLayout, OperaSystemRoleDataWindow, Pagination }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | |
| | | }] |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | setData (row) { |
| | | findByRoleId({ roleId: row.id }) |
| | | .then(res => { |
| | | if (!res) { |
| | | this.$refs.OperaSystemRoleDataWindow.open('æ°æ®æé', { roleId: row.id },row) |
| | | } else { |
| | | this.$refs.OperaSystemRoleDataWindow.open('æ°æ®æé', res,row) |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$tip.error(err) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalAlertWindow |
| | | v-loading="isUploading" |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="120px" label-suffix="ï¼"> |
| | | <el-form-item label="Beanåç§°" prop="beanName"> |
| | | <el-input v-model="form.beanName" placeholder="请è¾å
¥Beanåç§°" :maxlength="10" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="模ååç§°" prop="module"> |
| | | <el-input v-model="form.module" placeholder="请è¾å
¥æ¨¡ååç§°" :maxlength="10" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="Cron表达å¼" prop="cronExpres"> |
| | | <el-input v-model="form.cronExpres" placeholder="请è¾å
¥Cron表达å¼" :maxlength="10" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" :maxlength="10" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æ§è¡åæ°" prop="params"> |
| | | <el-input v-model="form.params" type="textarea" placeholder="请è¾å
¥æ§è¡åæ°" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalAlertWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' |
| | | export default { |
| | | name: 'OperaTimerWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalAlertWindow }, |
| | | data () { |
| | | |
| | | return { |
| | | isUploading: false, |
| | | uploadData: { |
| | | folder: 'projects' |
| | | }, |
| | | timeRange: ['', ''], |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | beanName: null, |
| | | params: null, |
| | | createTime: null, |
| | | module: '', |
| | | remark: '' , |
| | | cronExpres: '' |
| | | |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | beanName: [ |
| | | { required: true, message: '请è¾å
¥Beanåç§°', tigger: 'blur' } |
| | | ], |
| | | module: [ |
| | | { required: true, message: '请è¾å
¥æ¨¡ååç§°', tigger: 'blur' } |
| | | ], |
| | | cronExpres: [ |
| | | { required: true, message: '请è¾å
¥Cron表达å¼', tigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/timer/timer', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open (title, target) { |
| | | this.title = title |
| | | this.visible = true |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/alertstyle.scss"; |
| | | |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:devices:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="Beanåç§°" prop="beanName"> |
| | | <el-input v-model="searchForm.beanName" placeholder="请è¾å
¥åå¸äºº" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="模ååç§°" prop="module"> |
| | | <el-input v-model="searchForm.module" placeholder="请è¾å
¥åå¸äºº" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <!-- <el-button type="primary" :loading="isWorking.export" v-permissions="['business:devices:exportExcel']" @click="exportExcel">导åº</el-button> --> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:quartz:create']"> |
| | | <li><el-button type="primary" @click="$refs.OperaTimerWindow.open('æ°å»ºä»»å¡')" icon="el-icon-plus" v-permissions="['business:devices:create']">æ°å»º</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="index" prop="index" label="åºå·" align="center" min-width="50px"></el-table-column> |
| | | <el-table-column prop="beanName" label="BEANåç§°" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="module" label="模ååç§°" align="center" min-width="180px"></el-table-column> |
| | | <el-table-column prop="params" label="æ§è¡åæ°" align="center" min-width="180px"></el-table-column> |
| | | <el-table-column prop="state" label="ç¶æ" align="center" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.state ==1" style="color:green">æ£å¸¸</span> |
| | | <span v-if="row.state ==2" style="color: red">æå</span> |
| | | <span v-if="row.state ==3" style="color: red">å·²å é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="cronExpres" label="表达å¼" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" align="center" min-width="180px"></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" align="center" min-width="180px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:quartz:update'])" |
| | | label="æä½" |
| | | fixed="right" |
| | | min-width="220" |
| | | align="center" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.OperaTimerWindow.open('ç¼è¾ä»»å¡', row)" v-permissions="['business:quartz:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="runById(row)" v-permissions="['business:quartz:update']">æ§è¡ä¸æ¬¡</el-button> |
| | | <el-button type="text" v-if="row.state == 1" style="color: red" @click="pauseById(row)" v-permissions="['business:quartz:update']">æå</el-button> |
| | | <el-button type="text" v-if="row.state == 2" style="color: green" @click="resumeById(row)" v-permissions="['business:quartz:update']">æ¢å¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | ></pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaTimerWindow ref="OperaTimerWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaTimerWindow from '@/views/timer/components/OperaTimerWindow' |
| | | import {runOnceById} from "@/api/timer/timer"; |
| | | export default { |
| | | name: 'Devices', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaTimerWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | id: '', |
| | | beanName: '', |
| | | module: '' |
| | | }, |
| | | pausing:false, |
| | | running:false, |
| | | resuming:false, |
| | | room: [] |
| | | } |
| | | }, |
| | | provide() { |
| | | return { |
| | | room: () => this.room |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '设å¤ç®¡çä¿¡æ¯è¡¨', |
| | | api: '/timer/timer', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | pauseById (row) { |
| | | this.__checkApi() |
| | | this.$dialog.actionConfirm('确认æå该任å¡å?') |
| | | .then(() => { |
| | | this.pausing = true |
| | | this.api.paustById(row.id) |
| | | .then(() => { |
| | | this.$message.info('æåæå') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.pausing = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | resumeById (row) { |
| | | this.__checkApi() |
| | | this.$dialog.actionConfirm('确认æ¢å¤è¯¥ä»»å¡å?') |
| | | .then(() => { |
| | | this.resuming = true |
| | | this.api.resumeById(row.id) |
| | | .then(() => { |
| | | this.$message.info('æ¢å¤æå') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.resuming = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | runById (row) { |
| | | this.__checkApi() |
| | | this.$dialog.actionConfirm('确认æ§è¡ä¸æ¬¡è¯¥ä»»å¡å?') |
| | | .then(() => { |
| | | this.running = true |
| | | this.api.runOnceById(row.id) |
| | | .then(() => { |
| | | this.$message.info('æ§è¡æå') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.running = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | | }, |
| | | } |
| | | |
| | | </script> |
| | |
| | | List<Multifile> filelist = multifileJoinMapper.selectList(bookquery); |
| | | filelist.stream().forEach(a -> { |
| | | if (StringUtils.isNotBlank(a.getFileurl())) { |
| | | a.setFileFullUrl(path + a.getFileurl()); |
| | | a.setFileurlFull(path + a.getFileurl()); |
| | | } |
| | | }); |
| | | s.setFileList(filelist); |
| | |
| | | List<Multifile> filelist = multifileJoinMapper.selectList(bookquery); |
| | | filelist.stream().forEach(a -> { |
| | | if (StringUtils.isNotBlank(a.getFileurl())) { |
| | | a.setFileFullUrl(path + a.getFileurl()); |
| | | a.setFileurlFull(path + a.getFileurl()); |
| | | } |
| | | }); |
| | | result.setFileList(filelist); |
| | |
| | | .eq("OBJ_TYPE", MeetConstants.ZERO) |
| | | ); |
| | | multiFileList.forEach(i -> { |
| | | i.setFileFullUrl(projectsPath); |
| | | i.setFileurlFull(projectsPath); |
| | | }); |
| | | //éä»¶ä¿¡æ¯ |
| | | meetingDetailResponse.setMultiFileList(multiFileList); |
| | |
| | | <description></description> |
| | | <modules> |
| | | <module>meeting</module> |
| | | <module>system_service</module> |
| | | <module>visits</module> |
| | | <module>system_service</module> |
| | | <module>system_timer</module> |
| | | <module>system_gateway</module> |
| | | <module>emaysms</module> |
| | | </modules> |
| | | <parent> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | }catch (BusinessException e){ |
| | | return ApiResponse.failed(e.getCode(),e.getMessage()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ApiResponse.failed(ResponseStatus.SERVER_ERROR); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDataPermissionBiz; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.DataPermissionConstants; |
| | |
| | | import com.doumee.service.system.SystemDataPermissionService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDataPermissionBiz systemDataPermissionBiz; |
| | | |
| | | @ApiOperation("æ ¹æ®roleIdæ¥è¯¢ä¼ä¸æ°æ®æé") |
| | | @PostMapping("/findByRoleId") |
| | | @CloudRequiredPermission("system:datapermission:query") |
| | | public ApiResponse<SystemDataPermission> findByRoleId (@RequestBody SystemDataPermission pageWrap) { |
| | | return ApiResponse.success(systemDataPermissionService.findByRoleId(pageWrap)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:datapermission:create") |
| | | @CloudRequiredPermission("system:datapermission:create") |
| | | public ApiResponse create(@RequestHeader(Constants.HEADER_USER_TOKEN) String token, @Validated(OperaType.Create.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermission.setCreateUser(this.getLoginUser(token).getId()); |
| | | return ApiResponse.success(systemDataPermissionBiz.create(systemDataPermission)); |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("system:datapermission:delete") |
| | | @CloudRequiredPermission("system:datapermission:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | systemDataPermissionService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("system:datapermission:delete") |
| | | @CloudRequiredPermission("system:datapermission:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | |
| | | |
| | | @ApiOperation("ä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:datapermission:update") |
| | | @CloudRequiredPermission("system:datapermission:update") |
| | | public ApiResponse updateById(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.Update.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermission.setUpdateUser(this.getLoginUser(token).getId()); |
| | | systemDataPermissionBiz.update(systemDataPermission); |
| | |
| | | |
| | | @ApiOperation("ä¿®æ¹ç¶æ") |
| | | @PostMapping("/updateStatus") |
| | | @RequiresPermissions("system:datapermission:update") |
| | | @CloudRequiredPermission("system:datapermission:update") |
| | | public ApiResponse updateStatus(@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated(OperaType.UpdateStatus.class) @RequestBody SystemDataPermission systemDataPermission) { |
| | | systemDataPermission.setCreateUser(this.getLoginUser(token).getId()); |
| | | systemDataPermission.setLoginUserInfo(this.getLoginUser(token)); |
| | | systemDataPermissionBiz.updateStatus(systemDataPermission); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("system:datapermission:query") |
| | | @CloudRequiredPermission("system:datapermission:query") |
| | | public ApiResponse<PageData<SystemDataPermissionListVO>> findPage (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@RequestBody PageWrap<SystemDataPermission> pageWrap) { |
| | | return ApiResponse.success(systemDataPermissionService.findPage(pageWrap)); |
| | | } |
| | |
| | | import com.doumee.dao.system.dto.CreateRoleMenuDTO; |
| | | import com.doumee.dao.system.dto.CreateRolePermissionDTO; |
| | | import com.doumee.dao.system.dto.QuerySystemRoleDTO; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.vo.SystemRoleListVO; |
| | | import com.doumee.service.system.SystemRoleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("é
ç½®è§è²æ°æ®æé") |
| | | @PostMapping("/createRoleDataPermission") |
| | | @CloudRequiredPermission("system:datapermission:create") |
| | | public ApiResponse createRoleDataPermission (@RequestHeader(Constants.HEADER_USER_TOKEN) String token,@Validated @RequestBody SystemDataPermission dto) { |
| | | dto.setLoginUserInfo(this.getLoginUser(token)); |
| | | systemRoleBiz.createRoleDataPermission(dto); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("system:role:create") |
| | |
| | | |
| | | import com.doumee.dao.system.dto.CreateRoleMenuDTO; |
| | | import com.doumee.dao.system.dto.CreateRolePermissionDTO; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | void createRoleMenu(CreateRoleMenuDTO dto); |
| | | |
| | | void createRoleDataPermission(SystemDataPermission dto); |
| | | } |
| | |
| | | import com.doumee.biz.system.SystemRoleBiz; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.system.dto.CreateRoleMenuDTO; |
| | | import com.doumee.dao.system.dto.CreateRolePermissionDTO; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.model.SystemRoleMenu; |
| | | import com.doumee.dao.system.model.SystemRolePermission; |
| | | import com.doumee.service.system.SystemDataPermissionService; |
| | | import com.doumee.service.system.SystemRoleMenuService; |
| | | import com.doumee.service.system.SystemRolePermissionService; |
| | | import com.doumee.service.system.SystemRoleService; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | @Autowired |
| | | private SystemRoleMenuService systemRoleMenuService; |
| | | @Autowired |
| | | private SystemDataPermissionService systemDataPermissionService; |
| | | |
| | | @Override |
| | | public Integer create(SystemRole systemRole) { |
| | |
| | | systemRoleMenuService.create(newRoleMenu); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void createRoleDataPermission(SystemDataPermission dto) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(user ==null){ |
| | | user = dto.getLoginUserInfo(); |
| | | } |
| | | if(dto.getRoleId()==null || dto.getType()==null ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼è¯·æ±åæ°ä¸æ£ç¡®ï¼"); |
| | | } |
| | | // å é¤å
³èæé |
| | | SystemDataPermission deleteDto = new SystemDataPermission(); |
| | | deleteDto.setRoleId(dto.getRoleId()); |
| | | |
| | | systemDataPermissionService.delete(deleteDto); |
| | | // æ°å¢æ°çæé |
| | | dto.setDeleted(Boolean.FALSE); |
| | | dto.setBusinessCode("DEPARTMENT"); |
| | | dto.setCreateTime(DateUtil.getCurrentDate()); |
| | | dto.setCreateUser(user.getId()); |
| | | dto.setDisabled(Boolean.FALSE); |
| | | systemDataPermissionService.create(dto); |
| | | } |
| | | } |
| | |
| | | .addPathPatterns(Constants.CLOUD_SERVICE_URL_INDEX+"/**"); |
| | | } |
| | | |
| | | @Bean |
| | | public FilterRegistrationBean addRequestWrapperFilter() { |
| | | FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>(); |
| | | registration.setFilter(new RequestWrapperFilter()); |
| | | registration.setName("RequestWrapperFilter"); |
| | | registration.addUrlPatterns(Constants.CLOUD_SERVICE_URL_INDEX+"/**"); |
| | | registration.setOrder(1); |
| | | return registration; |
| | | } |
| | | // @Bean |
| | | // public FilterRegistrationBean addRequestWrapperFilter() { |
| | | // FilterRegistrationBean<Filter> registration = new FilterRegistrationBean<>(); |
| | | // registration.setFilter(new RequestWrapperFilter()); |
| | | // registration.setName("RequestWrapperFilter"); |
| | | // registration.addUrlPatterns(Constants.CLOUD_SERVICE_URL_INDEX+"/**"); |
| | | // registration.setOrder(1); |
| | | // return registration; |
| | | // } |
| | | } |
| | |
| | | // return this.defaultData(loginUserInfo.getId()); |
| | | // } |
| | | SystemDataPermission systemDataPermission = new SystemDataPermission(); |
| | | systemDataPermission.setType((short)0); |
| | | systemDataPermission.setType(0); |
| | | List<SystemDataPermission> dataPermissions = new ArrayList<>(); |
| | | dataPermissions.add(systemDataPermission); |
| | | // æè§è²çæ°æ®æéä¼å
级è¿åæ°æ® |
| | |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.PropertyNamingStrategy; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.io.IOException; |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | |
| | | public static final String CLOUD_SERVICE_URL_INDEX = "/cloudService"; |
| | | public static final String VISIT_TIPS = "VISIT_TIPS"; |
| | | public static final String VISIT_GUIDEMAP = "VISIT_GUIDEMAP"; |
| | | public static final String HIDDEN_DANGER_FILE = "HIDDEN_DANGER_FILE"; |
| | | public static final String LOG_DEL_DAYS_LIMIT ="LOG_DEL_DAYS_LIMIT" ; |
| | | public static final String HK_LOG_DEL_DAYS_LIMIT ="HK_LOG_DEL_DAYS_LIMIT" ; |
| | | |
| | | public static boolean DEALING_HK_SYNCPRIVILEGE= false; |
| | | public static boolean DEALING_HK_SYNCDEVICE = false; |
| | | public static boolean DEALING_HK_SYNCDEVICE_STATUS = false; |
| | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | public interface DATAPERMISSION_TYPE{ |
| | | public static final int all = 0; |
| | | public static final int departAndChild = 1; |
| | | public static final int departAndLeaf = 2; |
| | | public static final int depart = 3; |
| | | public static final int custom = 4; |
| | | public static final int self = -1; |
| | | } |
| | | public static Date getBirthdyByCardNo(String idCard){ |
| | | if(idCard ==null || idCard.length()<14){ |
| | | return null; |
| | |
| | | this.info = info; |
| | | } |
| | | } |
| | | /** |
| | | * å
³è对象类å |
| | | å
³è对象类å 0ä¼ä¸è¥ä¸æ§ç
§ 1çèµæ¥æ¡äºæ
è§é¢æå¾ç 2çèµåå·¥å
³ç³»è¯æææ 3çèµé¨è¯èµæ 4çèµä½é¢èµæ 5çèµä¼¤æ®èµæ 6çèµèµä»ç»æ¡ææ 7ä¼ä¸èº«ä»½è¯å· 8ä¿åç³è¯·è¡¨PDF 9ç¾ç½²åä¿åç³è¯·è¡¨PDF 10ä¼ä¸ç¾ç« 11æç»æ¥å |
| | | */ |
| | | public enum MultiFile{ |
| | | HIDDEN_DANGER_SUBMIT(0, "éæ£éææææ¥", "éæ£éææææ¥"), |
| | | HIDDEN_DANGER_DEAL_BEFORE(1, "鿣鿿å¤çå", "鿣鿿å¤çå"), |
| | | HIDDEN_DANGER_DEAL_AFTER(2, "鿣鿿å¤çå ", "鿣鿿å¤çå "), |
| | | ; |
| | | // æååé |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// æè¿° |
| | | |
| | | // æé æ¹æ³ |
| | | MultiFile(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getName(int index) { |
| | | for (MultiFile c : MultiFile.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getInfo(int index) { |
| | | for (MultiFile c : MultiFile.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.noteinfo; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getNoteinfo() { |
| | | return noteinfo; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | /** |
| | | * å®¡æ¹æ¨¡æç±»å 0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦ |
| | | */ |
| | | public enum ApproveTmplType{ |
| | | NOT_SG_VISIT(0, "éæ½å·¥äººå访客ç³è¯·", "éæ½å·¥äººå访客ç³è¯·"), |
| | | SG_VISIT(1, "æ½å·¥äººå访客ç³è¯·", "æ½å·¥äººå访客ç³è¯·"), |
| | | CAR_VISIT(2, "访客æ¥å¤ ", "访客æ¥å¤ "), |
| | | IN_CITY_CAR_USE(3, "å
¬è½¦å¸å
ç¨è½¦ ", "å
¬è½¦å¸å
ç¨è½¦ "), |
| | | OUT_CITY_CAR_USE(4, "å
¬è½¦å®¤å¤ç¨è½¦ ", "å
¬è½¦å®¤å¤ç¨è½¦ "), |
| | | CITY_WLC_BOOK(5, "å¸å
¬å¸ç©æµè½¦é¢çº¦ ", "5å¸å
¬å¸ç©æµè½¦é¢çº¦ "), |
| | | ; |
| | | // æååé |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// æè¿° |
| | | |
| | | // æé æ¹æ³ |
| | | ApproveTmplType(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getName(int index) { |
| | | for (ApproveTmplType c : ApproveTmplType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getInfo(int index) { |
| | | for (ApproveTmplType c : ApproveTmplType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.noteinfo; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getNoteinfo() { |
| | | return noteinfo; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | public enum NoticeObjectType { |
| | | MEETING_BOOK_SUCCESS(0, "ä¼ä¸é¢å®æå","ä¼ä¸é¢å®æå"), |
| | | MEETING_CACEL(1, "ä¼è®®åæ¶","ä¼è®®åæ¶"), |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.vo.SystemDataPermissionListVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | * @return List<SystemDataPermissionListVO> |
| | | */ |
| | | List<SystemDataPermissionListVO> selectManageList(@Param("dto") SystemDataPermission dto, @Param("orderByClause") String orderByClause); |
| | | |
| | | List<SystemDataPermissionListVO> selectUserList(@Param("dto") SystemDataPermission dto, @Param("role") SystemRole role, @Param("userId") Integer userId); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æä»¶å°å") |
| | | @TableField(exist = false) |
| | | private String fileFullUrl; |
| | | private String fileurlFull; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "æéç±»åï¼0å
¨é¨ï¼1èªå®ä¹ï¼2ä»
ç¨æ·æå±ï¼3ç¨æ·æå±åå
¶åæ°æ®ï¼", example = "1") |
| | | @NotNull(message = "æéç±»åä¸è½ä¸ºç©º", groups = {OperaType.Create.class, OperaType.Update.class}) |
| | | private Short type; |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "èªå®ä¹æ°æ®") |
| | | private String customData; |
| | |
| | | import javax.validation.constraints.Pattern; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç³»ç»ç¨æ· |
| | |
| | | @ApiModelProperty(value = "0 å¯ç¨ 1 ç¦ç¨") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "æ°æ®æéå
é¨é¨ç¼ç éå") |
| | | @TableField(exist = false) |
| | | private List<Integer> companyIdList; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemDataPermissionListVO; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return long |
| | | */ |
| | | long count(SystemDataPermission systemDataPermission); |
| | | |
| | | List<Integer> selectHighRole(SystemDataPermission systemDataPermission, SystemRole rt, SystemUser user); |
| | | |
| | | SystemDataPermission findByRoleId(SystemDataPermission pageWrap); |
| | | } |
| | |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | |
| | | queryWrapper.selectAll(Notices.class); |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.eq(Notices::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | |
| | | }else{ |
| | | queryWrapper.orderByDesc(Notices::getCreateDate); |
| | | } |
| | | |
| | | PageData<Notices> pageData = PageData.from(noticesMapper.selectJoinPage(page,Notices.class, queryWrapper)); |
| | | |
| | | return pageData; |
| | |
| | | package com.doumee.service.system.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.system.SystemDataPermissionMapper; |
| | | import com.doumee.dao.system.SystemRoleMapper; |
| | | import com.doumee.dao.system.model.SystemDataPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.SystemDataPermissionListVO; |
| | | import com.doumee.service.system.SystemDataPermissionService; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ°æ®æéé
ç½®Serviceå®ç° |
| | |
| | | |
| | | @Autowired |
| | | private SystemRoleMapper systemRoleMapper; |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | |
| | | @Override |
| | | public Integer create(SystemDataPermission systemDataPermission) { |
| | |
| | | Wrapper<SystemDataPermission> wrapper = new QueryWrapper<>(systemDataPermission); |
| | | return systemDataPermissionMapper.selectCount(wrapper); |
| | | } |
| | | @Override |
| | | public SystemDataPermission findByRoleId(SystemDataPermission pageWrap){ |
| | | if ( pageWrap.getRoleId() == null) { |
| | | return null; |
| | | } |
| | | |
| | | // æ¥è¯¢æ°æ®æé |
| | | QueryWrapper<SystemDataPermission> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.lambda() |
| | | .eq(SystemDataPermission::getBusinessCode, "DEPARTMENT") |
| | | .eq(SystemDataPermission::getRoleId, pageWrap.getRoleId()) |
| | | .eq(SystemDataPermission::getDeleted, Boolean.FALSE) |
| | | .eq(SystemDataPermission::getDisabled, Boolean.FALSE); |
| | | List<SystemDataPermission> result = systemDataPermissionMapper.selectList(queryWrapper); |
| | | if(result!=null && result.size()>0){ |
| | | return result.get(0); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Integer> selectHighRole(SystemDataPermission model, SystemRole role, SystemUser user) { |
| | | List<SystemDataPermissionListVO>list = systemDataPermissionMapper.selectUserList(model,role,user.getId()) ; |
| | | if(list !=null){ |
| | | boolean all = false; |
| | | boolean departAndChild=false; |
| | | boolean depart=false; |
| | | boolean departAndLeaf=false; |
| | | boolean custom=false; |
| | | String c = ""; |
| | | for(SystemDataPermissionListVO d : list){ |
| | | if(!all && Constants.equalsInteger(d.getType(),Constants.DATAPERMISSION_TYPE.all)){ |
| | | all =true; |
| | | } |
| | | if(!depart && Constants.equalsInteger(d.getType(),Constants.DATAPERMISSION_TYPE.depart)){ |
| | | depart =true; |
| | | } |
| | | if(!departAndChild && Constants.equalsInteger(d.getType(),Constants.DATAPERMISSION_TYPE.departAndChild)){ |
| | | departAndChild =true; |
| | | } |
| | | if(!departAndLeaf && Constants.equalsInteger(d.getType(),Constants.DATAPERMISSION_TYPE.departAndLeaf)){ |
| | | departAndLeaf =true; |
| | | } |
| | | if( Constants.equalsInteger(d.getType(),Constants.DATAPERMISSION_TYPE.custom)){ |
| | | custom =true; |
| | | c += StringUtils.defaultString(d.getCustomData(),""); |
| | | } |
| | | } |
| | | Company department = new Company(); |
| | | department.setId(user.getCompanyId()); |
| | | |
| | | if(all){ |
| | | return null; |
| | | }else{ |
| | | List<Integer> dList = new ArrayList<>(); |
| | | dList.add(-1);//èæé¨é¨ï¼ææ¥ç©ºéå |
| | | if(custom) { |
| | | //妿æèªå®ä¹é¨é¨ |
| | | String[] idStrs = c.split(","); |
| | | for(String s :idStrs){ |
| | | try { |
| | | Integer si = Integer.parseInt(s); |
| | | if(!isExists(si,dList)){ |
| | | dList.add(si); |
| | | } |
| | | }catch (Exception e){ |
| | | } |
| | | } |
| | | } |
| | | if(departAndLeaf){ |
| | | if(department!= null){ |
| | | dList.addAll(userDataPermissonList(department,true)); |
| | | } |
| | | }else if(departAndChild){ |
| | | if(department!= null) { |
| | | dList.addAll(userDataPermissonList(department, false)); |
| | | } |
| | | }else if(depart){ |
| | | if(department!= null && !isExists(department.getId(), dList)){ |
| | | dList.add(department.getId()); |
| | | } |
| | | } |
| | | return dList; |
| | | } |
| | | } |
| | | return new ArrayList<>(); |
| | | } |
| | | |
| | | public List<Integer> userDataPermissonList(Company depart ,boolean isleaf) { |
| | | List<Integer> pool = new ArrayList<>(); |
| | | List<Company> departList = companyMapper.selectList(new QueryWrapper<Company>().lambda() |
| | | .eq(Company::getIsdeleted,Constants.ZERO ) ); |
| | | pool.add(depart.getId()); |
| | | this.fillDepartChildren(pool, Arrays.asList(depart.getId()),isleaf,departList); |
| | | return pool; |
| | | } |
| | | |
| | | private void fillDepartChildren(List<Integer> pool, List<Integer> asList, boolean isleaf, List<Company> departList) { |
| | | List<Company> departments = getDepartListByParentIds(asList,departList); |
| | | List<Integer> ids = departments.stream().map(Company::getId).collect(Collectors.toList()); |
| | | if(isleaf){ |
| | | if (ids.size() > 0) { |
| | | pool.addAll(ids); |
| | | this.fillDepartChildren(pool, ids,isleaf,departList); |
| | | } |
| | | }else{ |
| | | pool.addAll(ids); |
| | | } |
| | | |
| | | } |
| | | |
| | | private List<Company> getDepartListByParentIds(List<Integer> asList, List<Company> departList) { |
| | | List<Company> list = new ArrayList<>(); |
| | | if(asList.size()>0){ |
| | | for(Integer id : asList){ |
| | | list.addAll(getDepartListByParentId(id,departList)); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | private List<Company> getDepartListByParentId(Integer pId, List<Company> departList) { |
| | | List<Company> list = new ArrayList<>(); |
| | | if(departList!= null){ |
| | | for(Company d :departList){ |
| | | if(Constants.equalsInteger(d.getParentId(),pId)){ |
| | | list.add(d); |
| | | } |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | private boolean isExists(Integer s, List<Integer> dList) { |
| | | if(dList!=null){ |
| | | for(Integer t : dList){ |
| | | if(Constants.equalsInteger(s,t)){ |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.model.SystemLoginLog; |
| | | import com.doumee.dao.system.model.SystemPermission; |
| | | import com.doumee.dao.system.model.SystemRole; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.model.*; |
| | | import com.doumee.service.common.CaptchaService; |
| | | import com.doumee.service.system.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Autowired |
| | | private SystemUserService systemUserService; |
| | | |
| | | @Lazy |
| | | @Autowired |
| | | private SystemDataPermissionService systemDataPermissionService; |
| | | @Lazy |
| | | @Autowired |
| | | private SystemRoleService systemRoleService; |
| | |
| | | // è·åç»å½ç¨æ·ä¿¡æ¯ |
| | | List<SystemRole> roles = systemRoleService.findByUserId(user.getId()); |
| | | List<SystemPermission> permissions = systemPermissionService.findByUserId(user.getId()); |
| | | |
| | | SystemRole rt = new SystemRole(); |
| | | rt.setDeleted(Boolean.FALSE); |
| | | //æ°æ®é¨é¨æééå |
| | | user.setCompanyIdList(systemDataPermissionService.selectHighRole(new SystemDataPermission(),rt,user)); |
| | | |
| | | LoginUserInfo userInfo = LoginUserInfo.from(user, roles, permissions,null); |
| | | return userInfo; |
| | | } |
| | |
| | | package com.doumee.service.timer; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.timer.entity.JobState; |
| | | import com.doumee.dao.timer.entity.QuartzJob; |
| | | import com.doumee.dao.timer.mapper.QuartzJobMapper; |
| | |
| | | quartzManage.run(quartzJob); |
| | | } |
| | | } |
| | | |
| | | public PageData<QuartzJob> findPage(PageWrap<QuartzJob> pageWrap) { |
| | | IPage<QuartzJob> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<QuartzJob> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda() |
| | | .eq(pageWrap.getModel().getId() != null, QuartzJob::getId, pageWrap.getModel().getId()) |
| | | .eq(pageWrap.getModel().getParams() != null, QuartzJob::getParams, pageWrap.getModel().getParams()) |
| | | .like(pageWrap.getModel().getBeanName() != null, QuartzJob::getBeanName, pageWrap.getModel().getBeanName()) |
| | | .eq(pageWrap.getModel().getState() != null, QuartzJob::getState, pageWrap.getModel().getState()) |
| | | .eq(pageWrap.getModel().getRemark() != null, QuartzJob::getRemark, pageWrap.getModel().getRemark()) |
| | | .like(pageWrap.getModel().getModule() != null, QuartzJob::getModule, pageWrap.getModel().getModule()) |
| | | ; |
| | | return PageData.from(quartzJobMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | |
| | | public void updateById(QuartzJob model) { |
| | | QuartzJob quartzJob = quartzJobMapper.selectById(model.getId()) ; |
| | | if (Objects.isNull(quartzJob)) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | pause(model.getId());//æå |
| | | //å
å é¤å°±ä»»å¡ |
| | | quartzManage.deleteJob(model.getId()); |
| | | quartzJob.setState(JobState.JOB_STOP.getStatus()); |
| | | quartzJobMapper.updateById(quartzJob) ; |
| | | } |
| | | } |
| | |
| | | </where> |
| | | ${orderByClause} |
| | | </select> |
| | | |
| | | <select id="selectUserList" resultMap="SystemDataPermissionListVO"> |
| | | SELECT |
| | | sdp.`ID`, sdp.`BUSINESS_CODE`, sdp.`ROLE_ID`, sdp.`TYPE`, sdp.`CUSTOM_DATA`, sdp.`DISABLED`, sdp.`REMARK`, sdp.DISABLED, sdp.`CREATE_TIME`, sdp.`UPDATE_TIME`, |
| | | role.`ID` AS ROLE_ID, role.`CODE` AS ROLE_CODE, role.`NAME` AS ROLE_NAME, |
| | | create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME, |
| | | update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME |
| | | FROM SYSTEM_DATA_PERMISSION sdp |
| | | INNER JOIN `SYSTEM_ROLE` role ON role.ID = sdp.ROLE_ID |
| | | LEFT JOIN `SYSTEM_USER` create_user ON create_user.ID = sdp.CREATE_USER |
| | | LEFT JOIN `SYSTEM_USER` update_user ON update_user.ID = sdp.UPDATE_USER |
| | | <where> |
| | | sdp.DELETED = 0 |
| | | <if test="dto.businessCode != null and dto.businessCode != ''"> |
| | | AND sdp.`BUSINESS_CODE` = #{dto.businessCode} |
| | | </if> |
| | | <if test="dto.roleId != null"> |
| | | AND role.`ID` = #{dto.roleId} |
| | | </if> |
| | | <if test="dto.type != null"> |
| | | AND sdp.`TYPE` = #{dto.type} |
| | | </if> |
| | | <if test="userId != null"> |
| | | AND exists (select sr.id from system_user_role sr where sr.role_id=sdp.role_id and sr.user_id=#{userId} and sr.deleted=0) |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.timer; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.timer.entity.QuartzJob; |
| | | import com.doumee.service.timer.QuartzJobService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @since 2024/04/28 16:06 |
| | | */ |
| | | @Api(tags = "ä½ä¸è°åº¦å¹³å°æ¥å£äº¤äºè®°å½") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/quartz") |
| | | public class QuartzCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private QuartzJobService quartzJobService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:quartz:create") |
| | | public ApiResponse create(@RequestBody QuartzJob quartzJob ,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | quartzJobService.insert(quartzJob) ; |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:quartz:update") |
| | | public ApiResponse updateById(@RequestBody QuartzJob quartzJob,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | quartzJobService.update(quartzJob); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation( "忢任å¡") |
| | | @GetMapping("/pause/{id}") |
| | | @CloudRequiredPermission("business:quartz:update") |
| | | public ApiResponse pause(@PathVariable("id") Integer id) { |
| | | quartzJobService.pause(id); return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation( "æ¢å¤ä»»å¡") |
| | | @GetMapping("/resume/{id}") |
| | | @CloudRequiredPermission("business:quartz:update") |
| | | public ApiResponse resume(@PathVariable("id") Integer id) { |
| | | quartzJobService.resume(id) ; return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation( "æ§è¡ä¸æ¬¡") |
| | | @GetMapping("/runOnce/{id}") |
| | | @CloudRequiredPermission("business:quartz:update") |
| | | public ApiResponse runOnce(@PathVariable("id") Integer id) { |
| | | quartzJobService.runOnce(id) ; return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:quartz:query") |
| | | public ApiResponse<PageData<QuartzJob>> findPage (@RequestBody PageWrap<QuartzJob> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(quartzJobService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:quartz:query") |
| | | public ApiResponse<QuartzJob> findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success( quartzJobService.getById(id)); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/quartz") |
| | | @RequestMapping( "/business/quartz") |
| | | @Api(tags = "宿¶ä»»å¡æ¥å£") |
| | | public class QuartzController { |
| | | |
| ÎļþÃû´Ó server/visits/admin_timer/src/main/java/com/doumee/api/HkLogTimerController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl; |
| | | import com.doumee.service.business.PlatformInterfaceLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | |
| | | @Api(tags = "æ¥å¿å®æ¶å¨æ¥å£") |
| | | @RestController |
| | | @RequestMapping("/timer/log") |
| | | public class HkLogTimerController extends BaseController { |
| | | public class InterfaceLogTimerController extends BaseController { |
| | | |
| | | @Autowired |
| | | private InterfaceLogService interfaceLogService; |
| | | @Autowired |
| | | private PlatformInterfaceLogService platformInterfaceLogService; |
| | | @ApiOperation("å¼å¯å®æ¶æ¥å£æ¥å¿æ¸
ç") |
| | | @GetMapping("/clearThreeMonthLog") |
| | | public ApiResponse clearThreeMonthLog() { |
| | | interfaceLogService.clearThreeMonthLog(); |
| | | platformInterfaceLogService.clearThreeMonthLog(); |
| | | return ApiResponse.success("å¼å¯å®æ¶æ¥å£æ¥å¿æ¸
çæå"); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:approvetempl:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | approveTemplService.deleteById(id); |
| | | approveTemplService.deleteById(id,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:approvetempl:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | approveTemplService.deleteByIdInBatch(this.getIdList(ids)); |
| | | approveTemplService.deleteByIdInBatch(this.getIdList(ids),this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:hiddendangerparam:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | hiddenDangerParamService.deleteById(id); |
| | | hiddenDangerParamService.deleteById(id,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:hiddendangerparam:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | hiddenDangerParamService.deleteByIdInBatch(this.getIdList(ids)); |
| | | hiddenDangerParamService.deleteByIdInBatch(this.getIdList(ids),this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:approvetempl:create") |
| | | public ApiResponse create(@RequestBody ApproveTempl approveTempl,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | approveTempl.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(approveTemplService.create(approveTempl)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("å叿¨¡ç") |
| | | @PostMapping("/save") |
| | | @CloudRequiredPermission("business:approvetempl:create") |
| | | public ApiResponse save(@RequestBody ApproveTempl approveTempl,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | approveTempl.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(approveTemplService.save(approveTempl)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:approvetempl:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | approveTemplService.deleteById(id); |
| | | approveTemplService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:approvetempl:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | approveTemplService.deleteByIdInBatch(this.getIdList(ids)); |
| | | approveTemplService.deleteByIdInBatch(this.getIdList(ids),this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:approvetempl:update") |
| | | public ApiResponse updateById(@RequestBody ApproveTempl approveTempl,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | approveTempl.setLoginUserInfo(this.getLoginUser(token)); |
| | | approveTemplService.updateById(approveTempl); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | return ApiResponse.success(carUseBookService.checkDateUse(carId,dateDay)); |
| | | } |
| | | |
| | | @ApiOperation("ç³è¯·æ¤é") |
| | | @GetMapping("/revoke") |
| | | public ApiResponse revoke (@RequestParam Integer id, @RequestParam String info, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | carUseBookService.revoke(id,info,getLoginUser(token)); |
| | | return ApiResponse.success("æä½æå"); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.request.MemberImport; |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.business.dto.RegisterDriverDTO; |
| | | import com.doumee.dao.business.dto.ResetPasswordDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberRole; |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @LoginNoRequired |
| | | @ApiOperation("叿ºæ³¨å") |
| | | @PostMapping("/registerDriver") |
| | | public ApiResponse registerDriver(@RequestBody RegisterDriverDTO registerDriverDTO ){ |
| | | memberService.registerDriver(registerDriverDTO); |
| | | return ApiResponse.success("注åæå"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <artifactId>system_service</artifactId> |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.doumee</groupId> |
| | | <artifactId>emaysms</artifactId> |
| | | <version>1.0.0-SNAPSHOT</version> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.ApproveParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/12/28 11:46 |
| | | */ |
| | | public interface ApproveParamMapper extends BaseMapper<ApproveParam> { |
| | | |
| | | void insertBatchSomeColumn(List<ApproveParam> paramList); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.HiddenDanger; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @since 2024/04/28 16:06 |
| | | */ |
| | | public interface HiddenDangerMapper extends BaseMapper<HiddenDanger> { |
| | | public interface HiddenDangerMapper extends MPJBaseMapper<HiddenDanger> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/5/20 14:54 |
| | | */ |
| | | @Data |
| | | public class RegisterDriverDTO { |
| | | |
| | | @ApiModelProperty(value = "å§å") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ææºå·") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "éªè¯ç ") |
| | | private String validCode; |
| | | |
| | | @ApiModelProperty(value = "å¯ç ") |
| | | private String password; |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.join; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Approve; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/12/28 14:09 |
| | | */ |
| | | public interface ApproveJoinMapper extends MPJJoinMapper<Approve> { |
| | | |
| | | void insertBatchSomeColumn(List<Approve> list); |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ExcelColumn(name="ERP审æ¹ç¼ç ") |
| | | private String erpId; |
| | | |
| | | @ApiModelProperty(value = "审æ¹ç¶æ 0å¾
å®¡æ¹ 1审æ¹ä¸ 2审æ¹éè¿ 3å®¡æ¹æªéè¿ 4ä»äººå·²å¤ç", example = "1") |
| | | @ExcelColumn(name="审æ¹ç¶æ 0å¾
å®¡æ¹ 1审æ¹ä¸ 2审æ¹éè¿ 3å®¡æ¹æªéè¿ 4ä»äººå·²å¤ç") |
| | | @ApiModelProperty(value = "审æ¹ç¶æ 0å¾
èªå·±å®¡æ¹å®¡æ¹ 1å¾
èªå·±å®¡æ¹ 2审æ¹éè¿ 3å®¡æ¹æªéè¿ 4ä»äººå·²å¤ç ", example = "1") |
| | | @ExcelColumn(name="审æ¹ç¶æ 0å¾
èªå·±å®¡æ¹å®¡æ¹ 1å¾
èªå·±å®¡æ¹ 2审æ¹éè¿ 3å®¡æ¹æªéè¿ 4ä»äººå·²å¤ç") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "ç¶æä¿¡æ¯") |
| | |
| | | @ExcelColumn(name="å
³èä¸å¡ä¸»é®") |
| | | private Integer objId; |
| | | |
| | | @ApiModelProperty(value = "å
³èä¸å¡ç±»åï¼0=访客ç³è¯·ï¼1=ç¨è½¦ç³è¯·", example = "1") |
| | | @ExcelColumn(name="å
³èä¸å¡ç±»åï¼0=访客ç³è¯·ï¼1=ç¨è½¦ç³è¯·") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "审æ¹ç级", example = "1") |
| | | @ExcelColumn(name="审æ¹ç级") |
| | |
| | | @ExcelColumn(name="å¤äººå®¡æ¹æ¹å¼ 0æç¾ 1ä¼ç¾") |
| | | private Integer approveType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦æå®å¸æºé¡¹ 0ä¸æå® 1æå®", example = "1") |
| | | @ExcelColumn(name="æ¯å¦æå®å¸æºé¡¹ 0ä¸æå® 1æå®") |
| | | private Integer driverParam; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦ä¿®æ¹ç®çå° 0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦ä¿®æ¹ç®çå° 0å¦ 1æ¯") |
| | | private Integer addrParam; |
| | | |
| | | @ApiModelProperty(value = "å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦", example = "1") |
| | | @ExcelColumn(name="å
³èä¸å¡ç±»åï¼0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0å®¡æ¹ 1æé", example = "1") |
| | | @ExcelColumn(name="ç±»å 0å®¡æ¹ 1æé") |
| | | private Integer type; |
| | | |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "å§å", example = "1") |
| | | @ExcelColumn(name="å§å") |
| | | @TableField(exist = false) |
| | | private String memberName; |
| | | |
| | | @ApiModelProperty(value = "ææºå·", example = "1") |
| | | @ExcelColumn(name="ææºå·") |
| | | @TableField(exist = false) |
| | | private String memberPhone; |
| | | |
| | | @ApiModelProperty(value = "é¨é¨", example = "1") |
| | | @ExcelColumn(name="é¨é¨") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "审æ¹äººç¼ç ï¼å¤ä¸ªç¨è±æéå·éå¼") |
| | | @ExcelColumn(name="审æ¹äººç¼ç ï¼å¤ä¸ªç¨è±æéå·éå¼") |
| | | private String objIds; |
| | | @ApiModelProperty(value = "模çId") |
| | | @ExcelColumn(name="模çId") |
| | | private Integer templId; |
| | | @ApiModelProperty(value = "æ¯å¦æå®å¸æºé¡¹ 0å¦ 1æ¯") |
| | | @ExcelColumn(name="æ¯å¦æå®å¸æºé¡¹ 0å¦ 1æ¯") |
| | | private Integer driverParam; |
| | | @ApiModelProperty(value = "æ¯å¦ä¿®æ¹ç®çå° 0å¦ 1æ¯") |
| | | @ExcelColumn(name="æ¯å¦ä¿®æ¹ç®çå° 0å¦ 1æ¯") |
| | | private Integer addrParam; |
| | | |
| | | @ApiModelProperty(value = "审æ¹ä¸»ç®¡ç级 0ç´æ¥ä¸»ç®¡ 1äºçº§ä¸»ç®¡ 2ä¸çº§ä¸»ç®¡ 4å级主管", example = "1") |
| | | @ExcelColumn(name="审æ¹ä¸»ç®¡ç级 0ç´æ¥ä¸»ç®¡ 1äºçº§ä¸»ç®¡ 2ä¸çº§ä¸»ç®¡ 4å级主管") |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å®¡æ¹æ¨¡çä¿¡æ¯è¡¨ |
| | |
| | | @ExcelColumn(name="åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "å®¡æ¹æ¨¡çé
ç½®æç»éå") |
| | | @TableField(exist = false) |
| | | private List<ApproveParam> paramList; |
| | | |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "åæ¶ç±»å 0ç³è¯·äººåæ¶ 1æ´¾è½¦åæ¤é") |
| | | @ExcelColumn(name="åæ¶ç±»å 0ç³è¯·äººåæ¶ 1æ´¾è½¦åæ¤é") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date cancelType; |
| | | private Integer cancelType; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å·²åæ¶ 0æªåæ¶ 1已忶") |
| | | @ExcelColumn(name="æ¯å¦å·²åæ¶ 0æªåæ¶ 1已忶") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date cancelStatus; |
| | | private Integer cancelStatus; |
| | | |
| | | @ApiModelProperty(value = "åæ¶æ¶é´") |
| | | @ExcelColumn(name="åæ¶æ¶é´") |
| | |
| | | @ApiModelProperty(value = "ç³è¯·äººçµè¯") |
| | | @TableField(exist = false) |
| | | private String memberMobile; |
| | | @ApiModelProperty(value = "审æ¹è®°å½") |
| | | @TableField(exist = false) |
| | | private List<Approve> approveList; |
| | | } |
| | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @ApiModelProperty(value = "æ¥è¯¢æªæ¢å§æ¶é´ï¼åºäºææ¥æ¶é´ï¼", example = "2024-05-20 11:48:46") |
| | | @TableField(exist = false) |
| | | private Date queryEndTime; |
| | | @ApiModelProperty(value = "ç°åºæ
嵿æ¥éä»¶éå") |
| | | @TableField(exist = false) |
| | | private List<Multifile> submitFileList; |
| | | @ApiModelProperty(value = "å¤çåéä»¶éå") |
| | | @TableField(exist = false) |
| | | private List<Multifile> dealBeforeFileList; |
| | | @ApiModelProperty(value = "å¤çåéä»¶éå") |
| | | @TableField(exist = false) |
| | | private List<Multifile> dealAfterFileList; |
| | | |
| | | @ApiModelProperty(value = "ææ¥æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | private String imgurl; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå", example = "1") |
| | | @ExcelColumn(name="ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå") |
| | | @ExcelColumn(name="ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "访客åç§°/å
é¨äººå") |
| | |
| | | * @return |
| | | */ |
| | | InternalHomeVO getHomeData(Integer memberId); |
| | | |
| | | void createApproveFlow(Integer tempType,Integer businessId,Integer createMemberId); |
| | | } |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.ApproveTempl; |
| | |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | |
| | | /** |
| | | * å é¤ |
| | |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | |
| | | * @return long |
| | | */ |
| | | long count(ApproveTempl approveTempl); |
| | | |
| | | int save(ApproveTempl approveTempl); |
| | | } |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.CarUseBook; |
| | |
| | | List<CarUseBook> carUseBookList(CarUseBook carUseBook); |
| | | |
| | | List<DateIntervalVO> checkDateUse(Integer cars, String dateDay); |
| | | |
| | | void revoke(Integer id, String info, LoginUserInfo loginUserInfo); |
| | | } |
| | |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.admin.response.StagingDataVO; |
| | | import com.doumee.dao.business.dto.RegisterDriverDTO; |
| | | import com.doumee.dao.business.dto.ResetPasswordDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberRole; |
| | |
| | | void memberFreeze(); |
| | | /********************************************å
¬ä¼å·æ¥å£***********************************************************************/ |
| | | |
| | | /** |
| | | * 叿ºæ³¨å |
| | | * @param registerDriverDTO |
| | | */ |
| | | void registerDriver(RegisterDriverDTO registerDriverDTO); |
| | | |
| | | /** |
| | | * å¾®ä¿¡æææ¥å£ |
| | |
| | | * @return long |
| | | */ |
| | | long count(PlatformInterfaceLog platformInterfaceLog); |
| | | |
| | | void clearThreeMonthLog(); |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ApproveMapper; |
| | | import com.doumee.dao.business.model.Approve; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.response.InternalHomeVO; |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 审æ¹ä¿¡æ¯è®°å½è¡¨Serviceå®ç° |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private ApproveTemplMapper approveTemplMapper; |
| | | |
| | | @Autowired |
| | | private ApproveParamMapper approveParamMapper; |
| | | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | |
| | | @Autowired |
| | | private CarUseBookMapper carUseBookMapper; |
| | | |
| | | @Autowired |
| | | private CarDriverMapper carDriverMapper; |
| | | |
| | | @Override |
| | | public Integer create(Approve approve) { |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * åå»ºå®¡æ¹æµç¨ |
| | | * @param tempType 模æ¿ç±»å 0éæ½å·¥äººå访客ç³è¯· 1éæ½å·¥äººå访客ç³è¯· 2访客æ¥å¤ 3å
¬è½¦å¸å
ç¨è½¦ 4å
¬è½¦å®¤å¤ç¨è½¦ 5å¸å
¬å¸ç©æµè½¦é¢çº¦ |
| | | * @param businessId ä¸å¡ä¸»é® æ ¹æ® tempType |
| | | * @param createMemberId æäº¤æµç¨äººå |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void createApproveFlow(Integer tempType,Integer businessId,Integer createMemberId){ |
| | | //æ¥è¯¢å¤çæ¨¡æ¿ |
| | | ApproveTempl approveTempl = approveTemplMapper.selectOne(new QueryWrapper<ApproveTempl>().lambda() |
| | | .eq(ApproveTempl::getType,tempType) |
| | | .eq(ApproveTempl::getIsdeleted,Constants.ZERO) |
| | | .last(" limit 1 ") |
| | | ); |
| | | if(Objects.isNull(approveTempl)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°é
置模æ¿"); |
| | | } |
| | | //æ¥è¯¢é
ç½®æµç¨ |
| | | List<ApproveParam> approveParamAllList = approveParamMapper.selectList(new QueryWrapper<ApproveParam>() |
| | | .lambda().eq(ApproveParam::getIsdeleted,Constants.ZERO) |
| | | .eq(ApproveParam::getTemplId,approveTempl.getId()) |
| | | .orderByAsc(ApproveParam::getType) |
| | | .orderByAsc(ApproveParam::getLevel) |
| | | ); |
| | | if(Objects.isNull(approveParamAllList)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªé
ç½®å®¡æ¹æµç¨"); |
| | | } |
| | | //审æ¹é
ç½® |
| | | List<ApproveParam> approveParamList = approveParamAllList.stream().filter(i->i.getType().equals(Constants.ZERO)).collect(Collectors.toList()); |
| | | if(Objects.isNull(approveParamList)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªé
ç½®å®¡æ¹æµç¨"); |
| | | } |
| | | List<ApproveParam> approveCopyList = approveParamAllList.stream().filter(i->i.getType().equals(Constants.ONE)).collect(Collectors.toList()); |
| | | |
| | | Member createMember = memberMapper.selectById(createMemberId); |
| | | if(Objects.isNull(createMember)|| Objects.isNull(createMember.getCompanyId())){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"ç³è¯·äººç»ç»ä¿¡æ¯å¼å¸¸"); |
| | | } |
| | | List<Approve> approveList = new ArrayList<>(); |
| | | |
| | | this.organizeApproveData(approveTempl,approveParamList,createMember,businessId,approveList); |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(approveList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµé
ç½®é误"); |
| | | } |
| | | |
| | | //å¤çæéæ°æ® |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(approveCopyList)){ |
| | | this.organizeApproveCopyData(approveTempl,approveParamList,businessId,approveList); |
| | | } |
| | | approveMapper.insertBatchSomeColumn(approveList); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ç»ç»å®¡æ¹æµæ°æ® |
| | | * @param approveTempl |
| | | * @param approveParamList |
| | | * @param createMember |
| | | * @param businessId |
| | | * @param approveList |
| | | */ |
| | | public void organizeApproveData(ApproveTempl approveTempl,List<ApproveParam> approveParamList,Member createMember,Integer businessId,List<Approve> approveList){ |
| | | //审æ¹ä¸å¡æ°æ® |
| | | for (int i = 0; i < approveParamList.size(); i++) { |
| | | ApproveParam approveParam = approveParamList.get(i); |
| | | List<Integer> ids = this.getApproveUserIds(approveParam,createMember); |
| | | for (Integer memberId:ids) { |
| | | Approve approve = new Approve(); |
| | | approve.setCreateDate(new Date()); |
| | | approve.setIsdeleted(Constants.ZERO); |
| | | approve.setTemplatId(approveTempl.getId()); |
| | | approve.setChekorId(memberId); |
| | | approve.setStatus(Constants.ZERO); |
| | | approve.setStatusInfo("å¾
审æ¹"); |
| | | approve.setIsEndCheck((i+1) == approveParamList.size()?Constants.ONE:Constants.ZERO); |
| | | approve.setObjId(businessId); |
| | | approve.setLevel(i+1); |
| | | approve.setApproveType(approveParam.getApproveType()); |
| | | approve.setDriverParam(approveParam.getDriverParam()); |
| | | approve.setAddrParam(approveParam.getAddrParam()); |
| | | approve.setType(Constants.ZERO); |
| | | approveList.add(approve); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public void organizeApproveCopyData(ApproveTempl approveTempl,List<ApproveParam> approveCopyList,Integer businessId,List<Approve> approveList){ |
| | | for (ApproveParam approveParam:approveCopyList) { |
| | | if(StringUtils.isBlank(approveParam.getObjIds())){ |
| | | return; |
| | | } |
| | | List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .eq(Member::getWorkStatus,Constants.ZERO) |
| | | .in(Member::getId,approveParam.getObjIds().split(","))); |
| | | List<Integer> userIds = new ArrayList<>(); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)){ |
| | | userIds.addAll(memberList.stream().map(m->m.getId()).collect(Collectors.toList())); |
| | | } |
| | | //å
¬å¡ç¨è½¦ é»è®¤å å
¥ 叿ºæé |
| | | if(approveTempl.getType()==Constants.THREE||approveTempl.getType()==Constants.FOUR){ |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(businessId); |
| | | if(Objects.isNull(carUseBook)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"为æ¥è¯¢å°ç¨è½¦ç³è¯·ä¿¡æ¯"); |
| | | } |
| | | CarDriver carDriver = carDriverMapper.selectById(carUseBook.getDriverId()); |
| | | if(Objects.isNull(carDriver)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"为æ¥è¯¢å°å¸æºä¿¡æ¯"); |
| | | } |
| | | userIds.add(carDriver.getMemberId()); |
| | | } |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(userIds)){ |
| | | for (Integer memberId:userIds) { |
| | | Approve approve = new Approve(); |
| | | approve.setCreateDate(new Date()); |
| | | approve.setIsdeleted(Constants.ZERO); |
| | | approve.setTemplatId(approveTempl.getId()); |
| | | approve.setChekorId(memberId); |
| | | approve.setObjId(businessId); |
| | | approve.setType(Constants.ONE); |
| | | approveList.add(approve); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | public List<Integer> getApproveUserIds(ApproveParam approveParam,Member createMember){ |
| | | List<Integer> userIds = new ArrayList<>(); |
| | | if(approveParam.getMemberType().equals(Constants.ZERO)){ |
| | | //ç³è¯·äºº |
| | | userIds.add(createMember.getId()); |
| | | }else if(approveParam.getMemberType().equals(Constants.ONE)){ |
| | | //æå®äººå |
| | | if(StringUtils.isBlank(approveParam.getObjIds())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"å®¡æ¹æµé
ç½®é误[æªé
ç½®æå®å®¡æ¹äººå]"); |
| | | } |
| | | List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .in(Member::getId,approveParam.getObjIds().split(","))); |
| | | if(memberList.size()!=approveParam.getObjIds().split(",").length){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµé
ç½®é误[æå®å®¡æ¹äººåä¿¡æ¯å¼å¸¸]"); |
| | | } |
| | | userIds.addAll(memberList.stream().map(m->m.getId()).collect(Collectors.toList())); |
| | | }else if(approveParam.getMemberType().equals(Constants.TWO)){ |
| | | //é¨é¨ä¸»ç®¡å®¡æ¹ |
| | | //审æ¹é¨é¨ |
| | | Company memberCompany = companyMapper.selectById(createMember.getCompanyId()); |
| | | if(Objects.isNull(memberCompany)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµé
ç½®é误[æå®å®¡æ¹é¨é¨æªæ¥è¯¢å°]"); |
| | | } |
| | | Company auditCompany = this.getAuditCompanyHead(memberCompany.getParentId(),approveParam.getObjLevel()); |
| | | if(Objects.isNull(auditCompany)){ |
| | | //审æ¹é¨é¨ä¸ºç©º èªå¨æµè½¬ä¸ä¸çº§å®¡æ¹é
ç½® |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµé
ç½®é误[æå®å®¡æ¹é¨é¨æªæ¥è¯¢å°]"); |
| | | }else{ |
| | | //æ¥è¯¢é¨é¨è´è´£äºº |
| | | Member headMember = memberMapper.selectById(auditCompany.getHeadId()); |
| | | if(Objects.isNull(headMember)){ |
| | | //æªæ¥è¯¢å°é¨é¨è´è´£äºº æ ¹æ®é
ç½®å¤ç ç±ä¸çº§ä¸»ç®¡ä»£æ¿å®¡æ ¸/ç´æ¥ç»ææµç¨ |
| | | if(approveParam.getNoleaderOpt().equals(Constants.ONE)&&!Objects.isNull(auditCompany.getParentId())){ |
| | | auditCompany = companyMapper.selectOne(new QueryWrapper<Company>().lambda().eq(Company::getId,auditCompany.getParentId())); |
| | | //æ ç¶çº§ ç´æ¥æµä¼ ä¸ä¸çº§å®¡æ¹ |
| | | if(Objects.isNull(auditCompany)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµé
ç½®é误[æå®å®¡æ¹é¨é¨æªæ¥è¯¢å°]"); |
| | | } |
| | | headMember = memberMapper.selectById(auditCompany.getHeadId()); |
| | | if(Objects.isNull(headMember)){ |
| | | //æ¥è¯¢é¨é¨è´è´£äºº 为空 èªå¨æµè½¬ä¸ä¸çº§å®¡æ¹é
ç½® |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å®¡æ¹æµé
ç½®é误[æå®å®¡æ¹é¨é¨æªè®¾ç½®è´è´£äºº]"); |
| | | }else{ |
| | | //æ·»å 审æ¹äºº |
| | | userIds.add(headMember.getId()); |
| | | } |
| | | }else{ |
| | | //æ·»å 审æ¹äºº |
| | | userIds.add(headMember.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return userIds; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®é
ç½®æ¥è¯¢ä¸çº§æ°æ® |
| | | * @param companyId ç¶çº§é¨é¨ä¸»é® |
| | | * @param objLevel æ¥è¯¢çº§å« |
| | | */ |
| | | public Company getAuditCompanyHead(Integer companyId, Integer objLevel){ |
| | | Integer queryLevel = Constants.ZERO; |
| | | Company auditCompany = companyMapper.selectById(companyId); |
| | | while(queryLevel.equals(objLevel)){ |
| | | auditCompany = companyMapper.selectById(auditCompany.getParentId()); |
| | | if(Objects.isNull(auditCompany)){ |
| | | return null; |
| | | } |
| | | queryLevel = queryLevel + 1; |
| | | } |
| | | return auditCompany; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ApproveParamMapper; |
| | | import com.doumee.dao.business.ApproveTemplMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.model.ApproveTempl; |
| | | import com.doumee.dao.business.model.CarDriver; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.ApproveTemplService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | |
| | | @Autowired |
| | | private ApproveTemplMapper approveTemplMapper; |
| | | @Autowired |
| | | private ApproveParamMapper approveParamMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public int save(ApproveTempl model) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = model.getLoginUserInfo(); |
| | | } |
| | | if(model.getType() == null || Constants.ApproveTmplType.getName(model.getType()) == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | ApproveTempl template = approveTemplMapper.selectOne(new QueryWrapper<ApproveTempl>().lambda() |
| | | .eq(ApproveTempl::getType,model.getType() ) |
| | | .eq(ApproveTempl::getIsdeleted,Constants.ZERO) |
| | | .last("limit 1")); |
| | | Date date =new Date(); |
| | | if(template == null){ |
| | | //å¦ææ¨¡çæ²¡æï¼åæ°å¢ |
| | | template = new ApproveTempl(); |
| | | template.setType(model.getType()); |
| | | template.setCreateDate(date); |
| | | template.setCreator(loginUserInfo.getId()); |
| | | template.setEditDate(date); |
| | | template.setIsdeleted(Constants.ZERO); |
| | | template.setEditor(loginUserInfo.getId()); |
| | | template.setName(Constants.ApproveTmplType.getName(model.getType())); |
| | | approveTemplMapper.insert(template); |
| | | } |
| | | if(model.getParamList()!=null && model.getParamList().size()>0){ |
| | | for(ApproveParam param : model.getParamList()){ |
| | | param.setCreateDate(date); |
| | | param.setCreator(loginUserInfo.getId()); |
| | | param.setEditDate(date); |
| | | param.setEditor(loginUserInfo.getId()); |
| | | param.setIsdeleted(Constants.ZERO); |
| | | param.setTemplId(template.getId()); |
| | | param.setType(Constants.formatIntegerNum(param.getType())); |
| | | param.setAddrParam(Constants.formatIntegerNum(param.getAddrParam())); |
| | | param.setDriverParam(Constants.formatIntegerNum(param.getDriverParam())); |
| | | param.setApproveType(Constants.formatIntegerNum(param.getApproveType())); |
| | | } |
| | | //å
æ¸
é¤åæ¥ææçå°±éªé
ç½® |
| | | approveParamMapper.delete(new UpdateWrapper<ApproveParam>().lambda() |
| | | .eq(ApproveParam::getTemplId,template.getId())); |
| | | //æ¹éæå
¥æ°çé
ç½® |
| | | approveParamMapper.insertBatchSomeColumn(model.getParamList()); |
| | | } |
| | | return model.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public Integer create(ApproveTempl model) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | approveTemplMapper.deleteById(id); |
| | | public void deleteById(Integer id, LoginUserInfo userInfo) { |
| | | ApproveTempl model = new ApproveTempl(); |
| | | model.setEditDate(new Date()); |
| | | model.setEditor(userInfo.getId()); |
| | | model.setId(id); |
| | | model.setIsdeleted(Constants.ONE); |
| | | approveTemplMapper.updateById(model); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | approveTemplMapper.deleteBatchIds(ids); |
| | | for(Integer id:ids){ |
| | | deleteById(id,user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ApproveMapper; |
| | | import com.doumee.dao.business.CarUseBookMapper; |
| | | import com.doumee.dao.business.CarsMapper; |
| | | import com.doumee.dao.business.join.ApproveJoinMapper; |
| | | import com.doumee.dao.business.join.CarUseBookJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.DateIntervalVO; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.doumee.service.business.CarUseBookService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private ApproveJoinMapper approveJoinMapper; |
| | | |
| | | @Autowired |
| | | private ApproveService approveService; |
| | | |
| | | |
| | | @Override |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"åå¨è½¦è¾é¢çº¦æ¶é´ä¸å·²é¢çº¦æ¶é´å²çª~"); |
| | | } |
| | | carUseBookMapper.insert(carUseBook); |
| | | //ç¨è½¦ç³è¯· 审æ¹è®°å½å建 |
| | | approveService.createApproveFlow(carUseBook.getType()==0?3:4,carUseBook.getId(),carUseBook.getMemberId()); |
| | | return carUseBook.getId(); |
| | | } |
| | | |
| | |
| | | .eq(CarUseBook::getId,id) |
| | | .last("limit 1" ); |
| | | CarUseBook model = carUseBookMapper.selectJoinOne(CarUseBook.class,queryWrapper); |
| | | //审æ¹è®°å½ |
| | | List<Approve> approveList = approveJoinMapper.selectJoinList(Approve.class, |
| | | new MPJLambdaWrapper<Approve>() |
| | | .selectAll(Approve.class) |
| | | .selectAs(Member::getName,Approve::getMemberName) |
| | | .selectAs(Member::getPhone,Approve::getMemberPhone) |
| | | .selectAs(Company::getName,Approve::getCompanyName) |
| | | .leftJoin(Member.class,Member::getId,Approve::getChekorId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .eq(Approve::getIsdeleted,Constants.ZERO) |
| | | .eq(Approve::getObjType,Constants.ONE) |
| | | .eq(Approve::getObjId,id) |
| | | .orderByAsc(Approve::getLevel) |
| | | ); |
| | | model.setApproveList(approveList); |
| | | return model; |
| | | } |
| | | |
| | |
| | | .le(pageWrap.getModel().getCheckDate() != null, CarUseBook::getCheckDate, Utils.Date.getEnd(pageWrap.getModel().getCheckDate())) |
| | | .eq(pageWrap.getModel().getCheckUserId() != null, CarUseBook::getCheckUserId, pageWrap.getModel().getCheckUserId()) |
| | | .eq(pageWrap.getModel().getCheckInfo() != null, CarUseBook::getCheckInfo, pageWrap.getModel().getCheckInfo()) |
| | | .ge(pageWrap.getModel().getCancelType() != null, CarUseBook::getCancelType, Utils.Date.getStart(pageWrap.getModel().getCancelType())) |
| | | .le(pageWrap.getModel().getCancelType() != null, CarUseBook::getCancelType, Utils.Date.getEnd(pageWrap.getModel().getCancelType())) |
| | | .ge(pageWrap.getModel().getCancelStatus() != null, CarUseBook::getCancelStatus, Utils.Date.getStart(pageWrap.getModel().getCancelStatus())) |
| | | .le(pageWrap.getModel().getCancelStatus() != null, CarUseBook::getCancelStatus, Utils.Date.getEnd(pageWrap.getModel().getCancelStatus())) |
| | | .eq(pageWrap.getModel().getCancelType() != null, CarUseBook::getCancelType, pageWrap.getModel().getCancelType()) |
| | | .eq(pageWrap.getModel().getCancelStatus() != null, CarUseBook::getCancelStatus, pageWrap.getModel().getCancelStatus()) |
| | | .ge(pageWrap.getModel().getCancelTime() != null, CarUseBook::getCancelTime, Utils.Date.getStart(pageWrap.getModel().getCancelTime())) |
| | | .le(pageWrap.getModel().getCancelTime() != null, CarUseBook::getCancelTime, Utils.Date.getEnd(pageWrap.getModel().getCancelTime())) |
| | | .eq(pageWrap.getModel().getCancelUser() != null, CarUseBook::getCancelUser, pageWrap.getModel().getCancelUser()) |
| | |
| | | } |
| | | |
| | | |
| | | public void revoke(Integer id, LoginUserInfo loginUserInfo){ |
| | | @Override |
| | | public void revoke(Integer id, String info, LoginUserInfo loginUserInfo){ |
| | | CarUseBook carUseBook = carUseBookMapper.selectById(id); |
| | | |
| | | |
| | | |
| | | if(Objects.isNull(carUseBook)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ç¨è½¦ç³è¯·ä¿¡æ¯"); |
| | | } |
| | | carUseBook.setCancelInfo(info); |
| | | carUseBook.setCancelTime(new Date()); |
| | | carUseBook.setCancelStatus(Constants.ONE); |
| | | carUseBook.setStatus(Constants.FOUR); |
| | | carUseBook.setCancelUser(loginUserInfo.getId()); |
| | | carUseBook.setCancelType(Constants.ONE); |
| | | if(loginUserInfo.getId().equals(carUseBook.getCreator())){ |
| | | carUseBook.setCancelType(Constants.ZERO); |
| | | } |
| | | carUseBookMapper.updateById(carUseBook); |
| | | //å¤ç审æ¹è®°å½ |
| | | approveJoinMapper.update(null,new UpdateWrapper<Approve>() |
| | | .lambda() |
| | | .set(Approve::getStatus,Constants.FOUR) |
| | | .set(Approve::getCheckInfo,"ç¨è½¦ç³è¯·åæ¶") |
| | | .in(Approve::getStatus,Constants.ZERO,Constants.ONE) |
| | | .eq(Approve::getObjId,id) |
| | | ); |
| | | } |
| | | |
| | | |
| | |
| | | model.setEditDate(new Date()); |
| | | model.setEditor(loginUserInfo.getId()); |
| | | model.setStatus(Constants.ZERO); |
| | | model.setIsdeleted(Constants.ZERO); |
| | | hiddenDangerParamMapper.insert(model); |
| | | return model.getId(); |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import cn.emay.sdk.util.StringUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.HiddenDangerMapper; |
| | | import com.doumee.dao.business.HiddenDangerParamMapper; |
| | | import com.doumee.dao.business.model.HiddenDanger; |
| | | import com.doumee.dao.business.model.HiddenDangerParam; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.service.business.HiddenDangerParamService; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.service.business.HiddenDangerService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * éæ£ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | @Autowired |
| | | private HiddenDangerMapper hiddenDangerMapper; |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private HiddenDangerParamMapper hiddenDangerParamMapper; |
| | | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Override |
| | | public Integer create(HiddenDanger hiddenDanger) { |
| | |
| | | |
| | | @Override |
| | | public HiddenDanger findById(Integer id) { |
| | | return hiddenDangerMapper.selectById(id); |
| | | } |
| | | MPJLambdaWrapper<HiddenDanger> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(HiddenDanger.class) |
| | | .selectAs(HiddenDangerParam::getName,HiddenDanger::getCategoryName) |
| | | .select("t1.name", HiddenDanger::getMemberName) |
| | | .select("t1.phone",HiddenDanger::getMemberPhone) |
| | | .select("t2.name",HiddenDanger::getCheckorName) |
| | | .select("t3.phone",HiddenDanger::getCheckorPhone) |
| | | .select("t4.company_name_path",HiddenDanger::getCompanyName); |
| | | queryWrapper.leftJoin(Member.class,Member::getId,HiddenDanger::getMemberId) |
| | | .leftJoin("company t4 on t1.company_id=t4.id") |
| | | .leftJoin(Member.class,Member::getId,HiddenDanger::getCheckUserId) |
| | | .leftJoin(HiddenDangerParam.class,HiddenDangerParam::getId,HiddenDanger::getCateId); |
| | | queryWrapper |
| | | .eq(HiddenDanger::getId, id).last("limit 1"); |
| | | |
| | | HiddenDanger model = hiddenDangerMapper.selectJoinOne(HiddenDanger.class,queryWrapper); |
| | | if(model ==null || Constants.equalsObject(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | initFiles(model); |
| | | return model; |
| | | } |
| | | private void initFiles(HiddenDanger unionChange) { |
| | | List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId, unionChange.getId() ) |
| | | .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.HIDDEN_DANGER_SUBMIT.getKey() |
| | | ,Constants.MultiFile.HIDDEN_DANGER_DEAL_BEFORE.getKey() |
| | | ,Constants.MultiFile.HIDDEN_DANGER_DEAL_AFTER.getKey()})) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO)); |
| | | if(multifiles!=null){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.OSS,Constants.HIDDEN_DANGER_FILE).getCode(); |
| | | for(Multifile f : multifiles){ |
| | | if(StringUtils.isBlank(f.getFileurl())){ |
| | | continue; |
| | | } |
| | | f.setFileurlFull(path+f.getFileurl()); |
| | | if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.HIDDEN_DANGER_SUBMIT.getKey())){ |
| | | //ç°åºæ
åµ |
| | | if(unionChange.getSubmitFileList() == null){ |
| | | unionChange.setSubmitFileList(new ArrayList<>()); |
| | | } |
| | | unionChange.getSubmitFileList().add(f); |
| | | } |
| | | if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.HIDDEN_DANGER_DEAL_BEFORE.getKey())){ |
| | | //å¤çåéä»¶ |
| | | if(unionChange.getDealBeforeFileList() == null){ |
| | | unionChange.setDealBeforeFileList(new ArrayList<>()); |
| | | } |
| | | unionChange.getDealBeforeFileList().add(f); |
| | | } |
| | | if(Constants.equalsInteger(f.getObjType(),Constants.MultiFile.HIDDEN_DANGER_DEAL_AFTER.getKey())){ |
| | | //å¤çåéä»¶ |
| | | if(unionChange.getDealAfterFileList() == null){ |
| | | unionChange.setDealAfterFileList(new ArrayList<>()); |
| | | } |
| | | unionChange.getDealAfterFileList().add(f); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | @Override |
| | | public HiddenDanger findOne(HiddenDanger hiddenDanger) { |
| | | QueryWrapper<HiddenDanger> wrapper = new QueryWrapper<>(hiddenDanger); |
| | |
| | | .eq(pageWrap.getModel().getChecklInfo() != null, HiddenDanger::getChecklInfo, pageWrap.getModel().getChecklInfo()) |
| | | .eq(pageWrap.getModel().getCheckUserId() != null, HiddenDanger::getCheckUserId, pageWrap.getModel().getCheckUserId()) |
| | | .eq(pageWrap.getModel().getAreaName() != null, HiddenDanger::getAreaName, pageWrap.getModel().getAreaName()) |
| | | |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getMemberName()), ms->ms.like(Member::getName,pageWrap.getModel().getMemberName()) |
| | | .or().like(Member::getPhone,pageWrap.getModel().getMemberName())) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), Empower::getCreateDate,pageWrap.getModel().getQueryStartTime()) |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(hiddenDangerMapper.selectPage(page, queryWrapper)); |
| | | return PageData.from(hiddenDangerMapper.selectJoinPage(page,HiddenDanger.class, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.InterfaceLogMapper; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | |
| | | |
| | | @Autowired |
| | | private InterfaceLogMapper interfaceLogMapper; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | public Integer create(InterfaceLog interfaceLog) { |
| | |
| | | } |
| | | @Override |
| | | public void clearThreeMonthLog() { |
| | | int days =15; |
| | | try { |
| | | days = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.HK_LOG_DEL_DAYS_LIMIT).getCode()); |
| | | }catch (Exception e){} |
| | | interfaceLogMapper.delete(new UpdateWrapper<InterfaceLog>().lambda() |
| | | .apply("to_days(create_date)+15 < to_days(now())") |
| | | .like(InterfaceLog::getUrl,"/artemis/api/")); |
| | | .apply("to_days(create_date)+"+days+" < to_days(now())") ); |
| | | } |
| | | } |
| | |
| | | import com.doumee.dao.admin.response.StagingDataVO; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.dto.RegisterDriverDTO; |
| | | import com.doumee.dao.business.dto.ResetPasswordDTO; |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.join.RetentionJoinMapper; |
| | |
| | | import com.doumee.dao.web.response.MemberVO; |
| | | import com.doumee.dao.web.response.WxAuthorizeVO; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | @Autowired |
| | | private SmsEmailService smsEmailService; |
| | | |
| | | @Value("${debug_model}") |
| | | private Boolean isDebug; |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public void registerDriver(RegisterDriverDTO registerDriverDTO){ |
| | | if(Objects.isNull(registerDriverDTO) |
| | | || StringUtils.isBlank(registerDriverDTO.getName()) |
| | | || StringUtils.isBlank(registerDriverDTO.getPassword()) |
| | | || StringUtils.isBlank(registerDriverDTO.getValidCode()) |
| | | || StringUtils.isBlank(registerDriverDTO.getPhone()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | if(memberMapper.selectCount(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .eq(Member::getPhone,registerDriverDTO.getPhone()) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ææºå·å·²æ³¨å!"); |
| | | }; |
| | | if(systemUserMapper.selectCount(new QueryWrapper<SystemUser>().lambda() |
| | | .eq(SystemUser::getDeleted,Constants.ZERO) |
| | | .and(i->i.eq(SystemUser::getMobile,registerDriverDTO.getPhone()).or().eq(SystemUser::getUsername,registerDriverDTO.getPhone())) |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ææºå·å·²æ³¨å!"); |
| | | }; |
| | | |
| | | smsEmailService.validateCode(registerDriverDTO.getValidCode(),registerDriverDTO.getPhone()); |
| | | String salt = RandomStringUtils.randomAlphabetic(6); |
| | | ; |
| | | Member member = new Member(); |
| | | member.setCreateDate(new Date()); |
| | | member.setIsdeleted(Constants.ZERO); |
| | | member.setType(Constants.TWO); |
| | | member.setName(registerDriverDTO.getName()); |
| | | member.setPhone(registerDriverDTO.getPhone()); |
| | | member.setStatus(Constants.ZERO); |
| | | member.setPassward(Utils.Secure.encryptPassword(registerDriverDTO.getPassword(), salt)); |
| | | memberMapper.insert(member); |
| | | |
| | | |
| | | SystemUser systemUser = new SystemUser(); |
| | | systemUser.setCreateTime(new Date()); |
| | | systemUser.setDeleted(Boolean.FALSE); |
| | | systemUser.setUsername(registerDriverDTO.getPhone()); |
| | | systemUser.setRealname(registerDriverDTO.getName()); |
| | | systemUser.setMemberId(member.getId()); |
| | | systemUser.setSalt(salt); |
| | | systemUser.setPassword(member.getPassward()); |
| | | systemUser.setStatus(Constants.ZERO); |
| | | systemUserMapper.insert(systemUser); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.PlatformInterfaceLogMapper; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | import com.doumee.dao.business.model.PlatformInterfaceLog; |
| | | import com.doumee.service.business.PlatformInterfaceLogService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | */ |
| | | @Service |
| | | public class PlatformInterfaceLogServiceImpl implements PlatformInterfaceLogService { |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private PlatformInterfaceLogMapper platformInterfaceLogMapper; |
| | |
| | | QueryWrapper<PlatformInterfaceLog> wrapper = new QueryWrapper<>(platformInterfaceLog); |
| | | return platformInterfaceLogMapper.selectCount(wrapper); |
| | | } |
| | | @Override |
| | | public void clearThreeMonthLog() { |
| | | int days =15; |
| | | try { |
| | | days = Integer.parseInt(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.LOG_DEL_DAYS_LIMIT).getCode()); |
| | | }catch (Exception e){} |
| | | platformInterfaceLogMapper.delete(new UpdateWrapper<PlatformInterfaceLog>().lambda() |
| | | .apply("to_days(create_date)+"+days+" < to_days(now())")); |
| | | } |
| | | } |
| | |
| | | import com.doumee.dao.web.reqeust.VisitRecordDTO; |
| | | import com.doumee.dao.web.response.VisitDetailVO; |
| | | import com.doumee.dao.web.response.VisitRecordVO; |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.doumee.service.business.SmsEmailService; |
| | | import com.doumee.service.business.VisitsService; |
| | |
| | | private SmsEmailService smsEmailService; |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | @Autowired |
| | | private ApproveService approveService; |
| | | |
| | | |
| | | @Override |
| | |
| | | }else if(dataSyncConfig.getVisitorDataOrigin().equals(Constants.ZERO)){ |
| | | visits.setStatus(Constants.VisitStatus.pass); |
| | | visitsMapper.updateById(visits); |
| | | approveService.createApproveFlow(visits.getType(),visits.getId(),visits.getReceptMemberId()); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼åèµ·æè®¿å®¡æ¹ç³è¯·å¤±è´¥ï¼"); |
| | | } |
| | |
| | | .eq(ApproveParam::getMemberType,Constants.ZERO) |
| | | .last("limit 1")); |
| | | return Objects.isNull(approveParam)?null:approveParam.getId(); |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | dto.setId(systemUser.getId()); |
| | | dto.setOperaUserId(systemUser.getId()); |
| | | systemUserBiz.resetPwd(dto); |
| | | |
| | | |
| | | } |
| | | |
| | | } |