已添加15个文件
已删除1个文件
已修改72个文件
已重命名3个文件
| | |
| | | "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" |
| | | } |
| | | } |
| | | } |
| | |
| | | "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" |
| | | } |
| | | } |
| | | } |
| | | }, |
| | |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/parkBook/page', data, { |
| | | return request.post('/business/cars/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/parkBook/create', data) |
| | | return request.post('/business/cars/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/parkBook/updateById', data) |
| | | return request.post('/business/cars/updateById', data) |
| | | } |
| | | // ä¿®æ¹ |
| | | export function sync (data) { |
| | | return request.post('/business/cars/sync', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/parkBook/delete/${id}`) |
| | | return request.get(`/business/cars/delete/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/business/parkBook/delete/batch', { |
| | | return request.get('/business/cars/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | |
| | | |
| | | // é¨é¨ä¿¡æ¯åæ¥ |
| | | export function companySync (data) { |
| | | return request.post('/business/company/sync', data) |
| | | return request.post('/business/company/syncAll', data) |
| | | } |
| | | |
| | | // å é¤ |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // é¨é¨ä¿¡æ¯åæ¥ |
| | | export function memberSync (data) { |
| | | return request.post('/business/member/syncAll', data) |
| | | } |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/business/member/exportExcel', data, { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/parkBook/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/parkBook/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/parkBook/updateById', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/parkBook/delete/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/business/parkBook/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| | |
| | | download: true |
| | | }) |
| | | } |
| | | |
| | | export function syncByDate (data) { |
| | | return request.post('/business/visits/syncByDate', data) |
| | | } |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/visits/create', data) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="500px" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" > |
| | | <el-form-item label="åæ¥æ¥æ" prop="startTime"> |
| | | <el-date-picker |
| | | v-model="form.startTime" |
| | | format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd HH:ss:mm" |
| | | type="date"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { syncByDate } from '@/api/business/visits' |
| | | export default { |
| | | name: 'OperaVisitsHkWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | form:{startTime: null}, |
| | | rules: { |
| | | startTime: [ |
| | | { required: true, message: 'è¯·éæ©æ¥æ', trigger: 'blur' } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | open(title){ |
| | | this.visible=true |
| | | this.title=title |
| | | }, |
| | | // åæ¥ä¿¡æ¯ |
| | | confirm () { |
| | | |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | syncByDate({ |
| | | starttime: this.form.startTime |
| | | }) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('忥æå') |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style> |
| | | .el-image-viewer__wrapper { |
| | | z-index: 3000 !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .list { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .list_item { |
| | | width: 100%; |
| | | margin-bottom: 30px; |
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | | .list_item_label { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #000000; |
| | | margin-bottom: 15px; |
| | | } |
| | | .list_item_info { |
| | | font-size: 14px; |
| | | color: #222222; |
| | | margin-bottom: 10px; |
| | | } |
| | | .list_item_status { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | .list_item_status_item { |
| | | width: 100%; |
| | | max-height: 100px; |
| | | position: relative; |
| | | margin-bottom: 30px; |
| | | .dian { |
| | | width: 15px; |
| | | height: 15px; |
| | | border-radius: 50%; |
| | | background: #ffb447; |
| | | position: absolute; |
| | | left: 0; |
| | | top: 50%; |
| | | transform: translate(0, -50%); |
| | | } |
| | | .xian { |
| | | width: 1px; |
| | | height: calc(100% + 30px); |
| | | background: #ffb447; |
| | | position: absolute; |
| | | top: 50%; |
| | | left: 7px; |
| | | transform: translate(-50%, 0); |
| | | } |
| | | .status_info { |
| | | /*width: 100%;*/ |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | margin-left: 30px; |
| | | box-sizing: border-box; |
| | | .status_info_a { |
| | | font-size: 16px; |
| | | color: black; |
| | | margin-bottom: 10px; |
| | | } |
| | | .status_info_b { |
| | | font-size: 13px; |
| | | color: #666666; |
| | | margin-bottom: 10px; |
| | | } |
| | | .status_info_c { |
| | | padding: 5px 10px; |
| | | background: #ececec; |
| | | font-size: 13px; |
| | | color: black; |
| | | border-radius: 5px; |
| | | box-sizing: border-box; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .list_item_val { |
| | | width: 100%; |
| | | margin-bottom: 15px; |
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | | .list_item_val_item { |
| | | font-size: 14px; |
| | | color: #222222; |
| | | margin-bottom: 5px; |
| | | &:last-child { |
| | | margin-bottom: 0 !important; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <span v-if="row.inoutType === 1">åºåº</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="è½¦çææå¾" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.platePicUrl!=null"> |
| | | <el-image |
| | | style="width: 80px; height: 80px" |
| | | :src="row.platePicUrl" |
| | | :preview-src-list="[row.platePicUrl]"> |
| | | </el-image> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ææå¾ç" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.vehiclePicUrl!=null"> |
| | | <el-image |
| | | style="width: 80px; height: 80px" |
| | | :src="row.vehiclePicUrl" |
| | | :preview-src-list="[row.vehiclePicUrl]"> |
| | | </el-image> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="happenTime" label="äºä»¶æ¶é´" min-width="100px"></el-table-column> |
| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <!-- <li><el-button type="primary" @click="$refs.operaCarsWindow.open('æ°å»ºè½¦è¾ä¿¡æ¯è¡¨')" icon="el-icon-plus" v-permissions="['business:member:create']">æ°å»º</el-button></li>--> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button></li> |
| | | <li><el-button type="primary" @click="syncCars" v-permissions="['business:cars:sync']">忥</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="code" label="车çå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parksName" label="å车åº" min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¨æ·ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.memberType === 0">å³å¡è®¿å®¢</span> |
| | |
| | | <el-table-column prop="memberName" label="å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="memberPhone" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="é¨é¨/å
¬å¸" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="æææ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{validity(row.startTime, row.endTime)}}</span> |
| | | <!-- <span v-if="!row.startTime || !row.endTime">é¿æ</span>--> |
| | | <!-- <span v-else>{{row.startTime}} è³ {{row.endTime}}</span>--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-button type="text" @click="$refs.operaCarsWindow.open('ç¼è¾è½¦è¾ä¿¡æ¯è¡¨', row)" icon="el-icon-edit" v-permissions="['business:member:update']">ç¼è¾</el-button>--> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaCarsWindow from '@/components/business/OperaCarsWindow' |
| | | import { validity } from '@/utils/util' |
| | | import { sync } from '@/api/business/cars' |
| | | export default { |
| | | name: 'Cars', |
| | | extends: BaseTable, |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | // åæ¥ä¿¡æ¯ |
| | | async syncCars () { |
| | | const message = await sync({}) |
| | | this.$message.success(message) |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <span v-if="row.userType === 2">å
é¨äººå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcard" label="身份è¯å·ç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="personName" label="å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="personPhone" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="personIdcardDecode" label="è¯ä»¶å·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="personCompanyName" label="å
¬å¸/ç»ç»" min-width="100px"></el-table-column> |
| | | <el-table-column prop="devName" label="é¨ç¦åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="srcName" label="é¨ç¦ç¹" min-width="100px"></el-table-column> |
| | |
| | | }).then(() => { |
| | | syncPrivilege({}) |
| | | .then(res => { |
| | | this.$message({ type: 'success', message: '忥æå' }) |
| | | this.$message({ type: 'success', message:res || '忥æå' }) |
| | | this.search() |
| | | }) |
| | | }).catch(() => { |
| | |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:delete']"> |
| | | <li><el-button type="primary">é¨ç¦ææ</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:member:sync']">忥</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:member:sync']" @click="synchronous()">忥</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | import TableLayout1 from '@/layouts/TableLayout1' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import Tree from '@/components/common/Tree' |
| | | import { fetchList } from '@/api/business/company' |
| | | import { fetchList} from '@/api/business/company' |
| | | import {memberSync} from "@/api/business/member"; |
| | | export default { |
| | | name: 'internalMember', |
| | | extends: BaseTable, |
| | |
| | | keyword: '', |
| | | type: 2, |
| | | erpOrgId: '', |
| | | companyId: '', |
| | | hasFace: '' |
| | | }, |
| | | companyTree: [] |
| | |
| | | this.search() |
| | | }) |
| | | }, |
| | | // åæ¥ä¿¡æ¯ |
| | | async synchronous () { |
| | | const message = await memberSync({}) |
| | | this.$message.success(message) |
| | | this.search() |
| | | } , |
| | | callback (row) { |
| | | console.log(row) |
| | | this.searchForm.erpOrgId = row.erpId |
| | | this.searchForm.companyId = row.id |
| | | this.search() |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:member:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="120px" inline> |
| | | <el-form-item label="车çå·" prop="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥è½¦çå·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="åå·¥å§å/ææºå·" prop="memberName"> |
| | | <el-input v-model="searchForm.memberName" placeholder="请è¾å
¥åå·¥å§å/ææºå·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é¨é¨" prop="companyName"> |
| | | <el-input v-model="searchForm.companyName" placeholder="请è¾å
¥é¨é¨" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <!-- <li><el-button type="primary" @click="$refs.operaCarsWindow.open('æ°å»ºè½¦è¾ä¿¡æ¯è¡¨')" icon="el-icon-plus" v-permissions="['business:member:create']">æ°å»º</el-button></li>--> |
| | | <li><el-button @click="syncCars" icon="el-icon-delete" v-permissions="['business:cars:sync']">忥</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:cars:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="code" label="车çå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parksName" label="å车åº" min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¨æ·ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.memberType === 0">å³å¡è®¿å®¢</span> |
| | | <span v-if="row.memberType === 1">æ®é访客</span> |
| | | <span v-if="row.memberType === 2">å
é¨äººå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="memberName" label="å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="memberPhone" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="é¨é¨/å
¬å¸" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" label="æææ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{validity(row.startTime, row.endTime)}}</span> |
| | | <!-- <span v-if="!row.startTime || !row.endTime">é¿æ</span>--> |
| | | <!-- <span v-else>{{row.startTime}} è³ {{row.endTime}}</span>--> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <!-- <el-button type="text" @click="$refs.operaCarsWindow.open('ç¼è¾è½¦è¾ä¿¡æ¯è¡¨', row)" icon="el-icon-edit" v-permissions="['business:member:update']">ç¼è¾</el-button>--> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaCarsWindow ref="operaCarsWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaCarsWindow from '@/components/business/OperaCarsWindow' |
| | | export default { |
| | | name: 'parkBook', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaCarsWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | code: '', |
| | | memberName: '', |
| | | companyName: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '车è¾ä¿¡æ¯è¡¨', |
| | | api: '/business/parkBook', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:visits:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="å§å/ææºå·" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥å§å/ææºå·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="身份è¯å·" prop="idcardNo"> |
| | | <el-input v-model="searchForm.idcardNo" placeholder="请è¾å
¥èº«ä»½è¯å·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å
¬å¸åç§°" prop="companyName"> |
| | | <el-input v-model="searchForm.companyName" placeholder="请è¾å
¥å
¬å¸åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="审æ¹ç¶æ" prop="status"> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©"> |
| | | <el-option label="å¾
å®¡æ ¸" value="1"></el-option> |
| | | <el-option label="æ£å¸¸" value="2"></el-option> |
| | | <el-option label="è¿å°" value="3"></el-option> |
| | | <el-option label="å®¡æ ¸éå" value="4"></el-option> |
| | | <el-option label="è¶
æèªå¨ç¾ç¦»" value="5"></el-option> |
| | | <el-option label="å·²ç¾ç¦»" value="6"></el-option> |
| | | <el-option label="è¶
ææªç¾ç¦»" value="7"></el-option> |
| | | <el-option label="å·²å°è¾¾" value="8"></el-option> |
| | | <el-option label="å®¡æ ¸å¤±æ" value="9"></el-option> |
| | | <el-option label="é约ä¸" value="10"></el-option> |
| | | <el-option label="é约失æ" value="11"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <!-- <el-button type="primary" :loading="isWorking.export" v-permissions="['business:visits: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:visits:sync']"> |
| | | <li><el-button type="primary" v-permissions="['business:visits:sync']" @click="$refs.OperaVisitsHkWindow.open('åæ¥è®¿å®¢è®°å½')">忥</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="访客å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="å
¬å¸åç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="receptMemberName" label="被访人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="reason" label="æè®¿äºç±" min-width="100px"></el-table-column> |
| | | <el-table-column label="æè®¿æ¶é´" min-width="170px"> |
| | | <template slot-scope="{row}"> |
| | | <span>èµ·ï¼{{row.starttime}}</span><br/> |
| | | <span>æ¢ï¼{{row.endtime}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é访人å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{row.memberNum || '-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é访车è¾" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.carNos">{{row.carNos.split(',').length}}</span> |
| | | <span v-else>-</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" fixed="right" label="ç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-option label="å¾
å®¡æ ¸" value="1"></el-option> |
| | | <el-option label="æ£å¸¸" value="2"></el-option> |
| | | <el-option label="è¿å°" value="3"></el-option> |
| | | <el-option label="å®¡æ ¸éå" value="4"></el-option> |
| | | <el-option label="è¶
æèªå¨ç¾ç¦»" value="5"></el-option> |
| | | <el-option label="å·²ç¾ç¦»" value="6"></el-option> |
| | | <el-option label="è¶
ææªç¾ç¦»" value="7"></el-option> |
| | | <el-option label="å·²å°è¾¾" value="8"></el-option> |
| | | <el-option label="å®¡æ ¸å¤±æ" value="9"></el-option> |
| | | <el-option label="é约ä¸" value="10"></el-option> |
| | | <el-option label="é约失æ" value="11"></el-option> |
| | | <span v-if="row.status === 1">å¾
å®¡æ ¸</span> |
| | | <span v-if="row.status === 2">æ£å¸¸</span> |
| | | <span v-if="row.status === 3">è¿å°</span> |
| | | <span v-if="row.status === 4">å®¡æ ¸éå</span> |
| | | <span v-if="row.status === 5">è¶
æèªå¨ç¾ç¦»</span> |
| | | <span v-if="row.status === 6">å·²ç¾ç¦»</span> |
| | | <span v-if="row.status === 7">è¶
ææªç¾ç¦»</span> |
| | | <span v-if="row.status === 8">å·²å°è¾¾</span> |
| | | <span v-if="row.status === 9">å®¡æ ¸å¤±æ</span> |
| | | <span v-if="row.status === 10">é约ä¸</span> |
| | | <span v-if="row.status === 11">é约失æ</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:visits:update', 'business:visits:delete'])" |
| | | label="æä½" |
| | | min-width="100" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.OperaVisitsDesWindow.open('详æ
', row.id)" v-permissions="['business:visits:update']">æ¥ç详æ
</el-button> |
| | | <!-- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:visits:delete']">æ¥è¯¢å®¡æ¹ç»æ</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | <!-- 详æ
--> |
| | | <OperaVisitsDesWindow ref="OperaVisitsDesWindow" /> |
| | | <OperaVisitsHkWindow ref="OperaVisitsHkWindow" /> |
| | | </template> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaVisitsDesWindow from '@/components/business/OperaVisitsDesWindow' |
| | | import OperaVisitsHkWindow from '@/components/business/OperaVisitsHkWindow' |
| | | export default { |
| | | name: 'Visits', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaVisitsDesWindow,OperaVisitsHkWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | name: '', |
| | | companyName: '', |
| | | idcardNo: '', |
| | | status: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '访客ç³è¯·ä¿¡æ¯è¡¨', |
| | | api: '/business/visits', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | } |
| | | } |
| | | </script> |
| | |
| | | // http://192.168.0.110:10013 ç£ç£ |
| | | // http://192.168.0.132:10013 å¸
å¥ |
| | | // https://dmtest.ahapp.net/admin_api æµè¯æ |
| | | target: 'https://dmtest.ahapp.net/admin_api', |
| | | target: 'http://localhost:10028', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | [`^${[process.env.VUE_APP_API_PREFIX]}`]: '' |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.Cars; |
| | | import com.doumee.service.business.CarsService; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | |
| | | @Autowired |
| | | private CarsService carsService; |
| | | @Autowired |
| | | private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | |
| | | carsService.updateById(cars); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("å
¨éåæ¥è½¦è¾ä¿¡æ¯") |
| | | @PostMapping("/sync") |
| | | @RequiresPermissions("business:cars:sync") |
| | | public ApiResponse sync(@RequestBody Cars cars) { |
| | | hkSyncVehicleFromHKService.syncVehicleData(); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | import com.doumee.dao.admin.request.UpdateCompanySortDTO; |
| | | import com.doumee.dao.admin.response.CompanyDTO; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO; |
| | | import com.doumee.service.business.CompanyService; |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncOrgUserFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | |
| | | @Autowired |
| | | private ERPSyncService erpSyncService; |
| | | @Autowired |
| | | private HkSyncOrgUserFromHKServiceImpl hkSyncOrgUserFHKService; |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation("é¨é¨ä¿¡æ¯åæ¥") |
| | | @PostMapping("/sync") |
| | | @ApiOperation("å
¨éé¨é¨ä¿¡æ¯åæ¥") |
| | | @PostMapping("/syncAll") |
| | | @RequiresPermissions("business:company:sync") |
| | | public ApiResponse sync(){ |
| | | erpSyncService.syncCompany(null); |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp){ |
| | | erpSyncService.syncCompany(null); |
| | | }else if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.hk){ |
| | | hkSyncOrgUserFHKService.syncOrgData(); |
| | | } |
| | | return ApiResponse.success("忥æå"); |
| | | } |
| | | } |
| | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.erp.model.openapi.request.erp.OrgListRequest; |
| | | import com.doumee.core.erp.model.openapi.request.erp.UserFailRequest; |
| | | import com.doumee.core.erp.model.openapi.request.erp.UserListRequest; |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.request.ParkListRequest; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncPrivilegeServiceImpl; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | @PreventRepeat |
| | | @ApiOperation("ãERPãå
¨é忥ERPç»ç»æ¥å£") |
| | | @PostMapping("/getCompanies") |
| | | //@RequiresPermissions("business:erpsync:company") |
| | | @RequiresPermissions("business:erpsync:company") |
| | | public ApiResponse getCompanies(@RequestBody OrgListRequest param) { |
| | | String result = erpSyncService.syncCompany(param); |
| | | return ApiResponse.success(result); |
| | |
| | | @PreventRepeat |
| | | @ApiOperation("ãERPãå
¨é忥ERPäººåæ¥å£") |
| | | @PostMapping("/getUsers") |
| | | // @RequiresPermissions("business:erpsync:users") |
| | | @RequiresPermissions("business:erpsync:users") |
| | | public ApiResponse getUsers(@RequestBody UserListRequest param) { |
| | | String result = erpSyncService.syncUsers(param); |
| | | return ApiResponse.success(result); |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncOrgUserFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | @RestController |
| | | @RequestMapping("/business/member") |
| | | public class MemberController extends BaseController { |
| | | @Autowired |
| | | private ERPSyncService erpSyncService; |
| | | @Autowired |
| | | private HkSyncOrgUserFromHKServiceImpl hkSyncOrgUserFHKService; |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | |
| | | @Autowired |
| | | private MemberService memberService; |
| | |
| | | return ApiResponse.success(memberService.findList(member)); |
| | | } |
| | | |
| | | @ApiOperation("å
¨éä¿¡æ¯åæ¥") |
| | | @PostMapping("/syncAll") |
| | | @RequiresPermissions("business:member:sync") |
| | | public ApiResponse sync(){ |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp){ |
| | | erpSyncService.syncUsers(null); |
| | | }else if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.hk){ |
| | | hkSyncOrgUserFHKService.syncUserData(); |
| | | } |
| | | return ApiResponse.success("忥æå"); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.service.business.VisitsService; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private VisitsService visitsService; |
| | | @Autowired |
| | | private HkSyncVisitFromHKServiceImpl hkSyncVisitFromHKService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®æ¥æ(starttime)åæ¥è®¿å®¢æ°æ®") |
| | | @PostMapping("/syncByDate") |
| | | @RequiresPermissions("business:visits:sync") |
| | | public ApiResponse syncByDate(@RequestBody Visits visits) { |
| | | hkSyncVisitFromHKService.syncVistAppointData(visits.getStarttime()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:visits:query") |
| | |
| | | import com.doumee.core.haikang.model.HKTools; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.EventSubRequest; |
| | | import com.doumee.core.haikang.model.param.respose.OrgListResponse; |
| | | import com.doumee.core.haikang.model.param.respose.OrgInfoResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | |
| | | SystemDictData orgName = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_ROOTORG_NAME); |
| | | String rootOrgId =org.getCode(); |
| | | if(StringUtils.isBlank(rootOrgId)){ |
| | | BaseResponse<OrgListResponse> res = HKService.getRootOrg(null); |
| | | BaseResponse<OrgInfoResponse> res = HKService.getRootOrg(null); |
| | | if(res !=null && res.getData()!=null && StringUtils.isNotBlank(res.getData().getOrgIndexCode())){ |
| | | org.setCode(res.getData().getOrgIndexCode()); |
| | | org.setUpdateTime(new Date()); |
| | |
| | | * 订é
é¨ç¦äºä»¶ã访客äºä»¶ãåå车åºäºä»¶ |
| | | */ |
| | | public void startHkEventSub(){ |
| | | cancelEventSub(); |
| | | EventSubRequest param = new EventSubRequest(); |
| | | String path =systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_PUSH_URL).getCode(); |
| | | param.setEventDest(path+"/parks"); |
| | |
| | | ,HKConstants.EventTypes.PARK_LINE_OUT.getKey() |
| | | ,HKConstants.EventTypes.PARK_PASS_IN.getKey() |
| | | ,HKConstants.EventTypes.PARK_PASS_OUT.getKey() }); |
| | | HKService.cancelEventSub(param);////å
åæ¶ |
| | | HKService.eventSub(param);//å车åºäºä»¶ |
| | | |
| | | param.setEventDest(path+"/visit"); |
| | | param.setEventTypes(new Integer[]{HKConstants.EventTypes.VISIT_SIGN_OUT.getKey() |
| | | ,HKConstants.EventTypes.VISIT_SIGN_OUT.getKey()}); |
| | | HKService.cancelEventSub(param);//å
åæ¶ |
| | | HKService.eventSub(param);//访客äºä»¶ |
| | | |
| | | param.setEventDest(path+"/acs"); |
| | | param.setEventTypes(new Integer[]{HKConstants.EventTypes.DOOR_FACE_AUTH_FAIL.getKey(),HKConstants.EventTypes.DOOR_FACE_AUTH_SUCCESS.getKey()}); |
| | | HKService.cancelEventSub(param);//å
åæ¶ |
| | | HKService.eventSub(param);//é¨ç¦äºä»¶ |
| | | |
| | | } |
| | |
| | | ,HKConstants.EventTypes.PARK_PASS_OUT.getKey() |
| | | ,HKConstants.EventTypes.VISIT_SIGN_OUT.getKey(), |
| | | HKConstants.EventTypes.DOOR_FACE_AUTH_SUCCESS.getKey()}); |
| | | String path =systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_PUSH_URL).getCode(); |
| | | param.setEventDest(path); |
| | | HKService.cancelEventSub(param);//å车åºäºä»¶ |
| | | |
| | | } |
| | |
| | | package com.doumee.task; |
| | | |
| | | |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncImgServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncOrgUserServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncVisitServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVehicleFromHKServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.fhk.HkSyncVisitFromHKServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 宿¶ä»»å¡ |
| | |
| | | @Autowired |
| | | private HkSyncEmpowerServiceImpl hkSyncEmpowerService; |
| | | @Autowired |
| | | private HkSyncOrgUserServiceImpl hkSyncOrgUserService; |
| | | private HkSyncOrgUserToHKServiceImpl hkSyncOrgUserService; |
| | | @Autowired |
| | | private HkSyncVisitFromHKServiceImpl hkSyncVisitFromHKService; |
| | | @Autowired |
| | | private HkSyncVehicleFromHKServiceImpl hkSyncVehicleFromHKService; |
| | | @Autowired |
| | | private HkSyncVisitServiceImpl hkSyncVisitService; |
| | | @Autowired |
| | |
| | | /** |
| | | * æ¯å¦å¼åè
|
| | | */ |
| | | @Value("${timing}") |
| | | private Boolean timing; |
| | | |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | |
| | | /** |
| | | * ç¼åçå¸åº |
| | | * æ¯åéæå䏿¬¡ä»æ¥ç访客é¢çº¦æ°æ® |
| | | * @throws Exception |
| | | */ |
| | | @Scheduled(cron= "0 0 23 * * ?") |
| | | public void syncVehicleUpdateData() throws Exception { |
| | | hkSyncVehicleFromHKService.syncVehicleUpdateData(new Date(System.currentTimeMillis()-24*60*60*1000)); |
| | | } |
| | | /** |
| | | * æ¯åéæå䏿¬¡ä»æ¥ç访客é¢çº¦æ°æ® |
| | | * @throws Exception |
| | | */ |
| | | @Scheduled(fixedDelay= 60*1000) |
| | | public void syncVistAppointData() throws Exception { |
| | | if(Constants.DEALING_FROM_HK_VISIT){ |
| | | return ; |
| | | } |
| | | try { |
| | | Constants.DEALING_FROM_HK_VISIT =true; |
| | | hkSyncVisitFromHKService.syncVistAppointData(new Date()); |
| | | Constants.DEALING_FROM_HK_VISIT =false; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | }finally { |
| | | Constants.DEALING_FROM_HK_VISIT =false; |
| | | } |
| | | } |
| | | /** |
| | | * ä¸è½½æµ·åº·ç³»ç»å¾çæ°æ® |
| | | * @throws Exception |
| | | */ |
| | | @Scheduled(fixedDelay= 60*1000) |
| | | public void downloadHkImg() throws Exception { |
| | | hkSyncImgService.downHKImgs(0); |
| | | if(dataSyncConfig.getNeedDealImg()!=null && dataSyncConfig.getNeedDealImg()){ |
| | | hkSyncImgService.downHKImgs(0); |
| | | } |
| | | } |
| | | /** |
| | | * 宿¶åæ¥ç»ç»ä¿¡æ¯å°æµ·åº·ç³»ç» |
| | |
| | | */ |
| | | @Scheduled(fixedDelay= 60*1000) |
| | | public void syncOrgData() { |
| | | hkSyncOrgUserService.syncOrgData(); |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp){ |
| | | //妿æ¯ERPç³»ç»åæ¥ä¸å |
| | | hkSyncOrgUserService.syncOrgData(); |
| | | } |
| | | } |
| | | /** |
| | | * 宿¶åæ¥ç¨æ·ä¿¡æ¯å°æµ·åº·ç³»ç» |
| | |
| | | */ |
| | | @Scheduled(fixedDelay= 60*1000) |
| | | public void syncUserData() { |
| | | hkSyncOrgUserService.syncUserData(); |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.erp) { |
| | | //妿æ¯ERPç³»ç»åæ¥ä¸å |
| | | hkSyncOrgUserService.syncUserData(); |
| | | } |
| | | } |
| | | /** |
| | | * 宿¶åæ¥ç³è¯·éè¿çè®¿å®¢æ°æ®å°æµ·åº·ç³»ç» |
| | |
| | | */ |
| | | @Scheduled(fixedDelay= 60*1000) |
| | | public void syncEmpowerData() { |
| | | |
| | | hkSyncEmpowerService.syncEmpowerData(); |
| | | } |
| | | /** |
| | |
| | | # application: |
| | | # name: doumeemes |
| | | profiles: |
| | | active: dev |
| | | active: devYL |
| | | |
| | | # JSONè¿åé
ç½® |
| | | jackson: |
| ÎļþÃû´Ó server/dmvisit_screen/src/main/java/com/doumee/OpenapiApplication.java ÐÞ¸Ä |
| | |
| | | @SpringBootApplication |
| | | @EnableAsync |
| | | @MapperScan("com.doumee.dao") |
| | | public class OpenapiApplication { |
| | | public class ScreenApplication { |
| | | |
| | | public static void main(String[] args) { |
| | | ApplicationContext context = SpringApplication.run(OpenapiApplication.class); |
| | | ApplicationContext context = SpringApplication.run(ScreenApplication.class); |
| | | context.getEnvironment(); |
| | | } |
| | | } |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | |
| | | HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); |
| | | return request; |
| | | } |
| | | |
| | | protected String getToken() { |
| | | Object obj = this.getRequest().getAttribute(JwtTokenUtil.HEADER_KEY); |
| | | return obj != null ? obj.toString() : null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.annotation.ErpLoginRequired; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.erp.model.openapi.request.*; |
| | | import com.doumee.core.erp.model.openapi.response.*; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.doumee.model.*; |
| | | import com.doumee.service.ScreenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @Author : JP |
| | | * @create 2023/5/5 16:02 |
| | | */ |
| | | |
| | | @Api(tags = "1ããè®¿å®¢ç«¯ãæ°æ®èµæºæ¥å£ï¼åERP端æä¾ææäº¤æ°æ®ä¿¡æ¯ï¼") |
| | | @Api(tags = "ãä¼å©å¤§å±ãæ°æ®èµæºæ¥å£") |
| | | @RestController |
| | | @RequestMapping("/visitbiz") |
| | | @RequestMapping("/screen") |
| | | @Slf4j |
| | | public class BizResourceController extends ApiController { |
| | | public class YlScreenController extends ApiController { |
| | | |
| | | @Autowired |
| | | private ERPSyncService erpSyncService; |
| | | private ScreenService screenService; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | @ApiOperation(value = "è°ç¨åæ®è·åæ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼åERPæä¾ç»æ¥å£è°ç¨åè¯") |
| | | @GetMapping("/accesstoken") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "accessKey", value = "访é®keyï¼ç±è®¿å®¢ç«¯æä¾", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "accessSecret", value = "访é®ç§é¥ï¼ç±è®¿å®¢ç«¯æä¾", required = true) |
| | | }) |
| | | public ApiResponse<AccessTokenResponse> accesstoken(@RequestParam String accessKey, @RequestParam String accessSecret) { |
| | | return ApiResponse.success(erpSyncService.createERPToken(accessKey,accessSecret)); |
| | | @ApiOperation(value = "è·åå项ç»è®¡æ°æ®", notes = "è·åå项ç»è®¡æ°æ®ï¼ä»æ¥è®¿å®¢æ°ãæè®¿ä¸ãç¾ç¦»æ°ãè¿åºè½¦æ¬¡ãåºåºè½¦æ¬¡ãé¢çº¦æ°ã已审æ¹é¢çº¦æ°ã访客车è¾è¿åºæ°ãå工车è¾è¿åºæ°") |
| | | @PostMapping("/countData") |
| | | public ApiResponse<CountDataResponse> countData(@RequestBody BaseRequest param) { |
| | | return ApiResponse.success(screenService.countData(param)); |
| | | } |
| | | |
| | | @ErpLoginRequired |
| | | @ApiOperation(value = "é¨ç¦ç»å
¨éæ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼ERPç«¯åæ¥è·åé¨ç¦ç»å
¨éä¿¡æ¯") |
| | | @PostMapping("/resource/role/list") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<List<RoleListResponse>> roleList(@RequestBody RoleListRequest param) { |
| | | param.setToken(this.getToken()); |
| | | return ApiResponse.success(erpSyncService.erpQueryDeviceList(param)); |
| | | @ApiOperation(value = "车è¾è¿åºåºæ°æ®è®°å½ï¼æè¿50æ¡ï¼", notes = "车è¾è¿åºåºæ°æ®è®°å½ï¼æè¿50æ¡ï¼") |
| | | @PostMapping("/carsDataList") |
| | | public ApiResponse<List<CarsDataListResponse>> carsDataList(@RequestBody BaseRequest param) { |
| | | return ApiResponse.success(screenService.carsDataList(param)); |
| | | } |
| | | |
| | | @ApiOperation(value = "å车åºå
¨éä¿¡æ¯æ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼ERPç«¯åæ¥å
¨é¨åè½¦åºæ°æ®") |
| | | @PostMapping("/resource/park/list") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<List<ParkListResponse>> parkList(@RequestBody ParkListRequest param) { |
| | | param.setToken(this.getToken()); |
| | | return ApiResponse.success(erpSyncService.parkList(param)); |
| | | @ApiOperation(value = "访客è¿åºåºæ°æ®è®°å½ï¼æè¿50æ¡ï¼", notes = "访客è¿åºåºæ°æ®è®°å½ï¼æè¿50æ¡ï¼") |
| | | @PostMapping("/visitDataList") |
| | | public ApiResponse<List<VisitDataListResponse>> visitDataList(@RequestBody BaseRequest param) { |
| | | return ApiResponse.success(screenService.visitDataList(param)); |
| | | } |
| | | |
| | | @ApiOperation(value = "访客åºå
¥äºä»¶åæ¥æ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼ERP端è·å访客åºå
¥è®°å½ä¿¡æ¯") |
| | | @PostMapping("/resource/visit/list") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<PageData<VisitEventListResponse>> visitList (@RequestBody PageWrap<VisitListRequest> pageWrap) { |
| | | pageWrap.getModel().setToken(this.getToken()); |
| | | return ApiResponse.success(erpSyncService.visitListPage(pageWrap)); |
| | | @ApiOperation(value = "车è¾è¿åºåºæ²çº¿å¾æ°æ®ï¼ä»æ¥ï¼", notes = "车è¾è¿åºåºæ²çº¿å¾æ°æ®ï¼ä»æ¥ï¼") |
| | | @PostMapping("/todayCarsData") |
| | | public ApiResponse<CountListResponse> todayCarsData(@RequestBody BaseRequest param) { |
| | | return ApiResponse.success(screenService.todayCarsData(param)); |
| | | } |
| | | |
| | | @ApiOperation(value = "é¨ç¦åºå
¥äºä»¶åæ¥æ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼ERP端è·åé¨ç¦åºå
¥è®°å½ä¿¡æ¯") |
| | | @PostMapping("/resource/doorEvent/list") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<PageData<DoorEventListResponse>> doorEventList (@RequestBody PageWrap<DoorEventListRequest> pageWrap) { |
| | | pageWrap.getModel().setToken(this.getToken()); |
| | | return ApiResponse.success(erpSyncService.doorEventListPage(pageWrap)); |
| | | @ApiOperation(value = "车è¾è¿åºåºæ²çº¿å¾æ°æ®ï¼è¿æ 7ã15ã30天ï¼", notes = "车è¾è¿åºåºæ²çº¿å¾æ°æ®ï¼è¿æ 7ã15ã30天ï¼") |
| | | @PostMapping("/carsDaysData") |
| | | public ApiResponse<CountListResponse> carsDaysData(@RequestBody BaseRequest param) { |
| | | return ApiResponse.success(screenService.carsDaysData(param)); |
| | | } |
| | | |
| | | @ApiOperation(value = "车è¾åºå
¥äºä»¶åæ¥æ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼ERP端è·å车è¾åºå
¥è®°å½ä¿¡æ¯") |
| | | @PostMapping("/resource/carvisit/list") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<PageData<CarEventListResponse>> carEventList (@RequestBody PageWrap<CarEventListRequest> pageWrap) { |
| | | pageWrap.getModel().setToken(this.getToken()); |
| | | return ApiResponse.success(erpSyncService.carEventList(pageWrap)); |
| | | @ApiOperation(value = "访客è¿åºåºæ²çº¿å¾æ°æ®ï¼è¿æ 7ã15ã30天ï¼", notes = "访客è¿åºåºæ²çº¿å¾æ°æ®ï¼è¿æ 7ã15ã30天ï¼") |
| | | @PostMapping("/visitDaysData") |
| | | public ApiResponse<CountListResponse> visitDaysData(@RequestBody BaseRequest param) { |
| | | return ApiResponse.success(screenService.visitDaysData(param)); |
| | | } |
| | | |
| | | @ApiOperation(value = "ç»ç»å忥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼å®æè®¿å®¢ç«¯ç»ç»ä¿¡æ¯åæ¥ï¼è¯¥æ¥å£æ¯æå个ç»ç»æ°å¢ãæ´æ°ãå é¤éæ±") |
| | | @PostMapping("/event/org/update") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse orgUpdate(@RequestBody OrgUpdateRequest param) { |
| | | param.setToken(this.getToken()); |
| | | erpSyncService.orgUpdate(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation(value = "人åå忥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼å®æè®¿å®¢ç«¯äººåä¿¡æ¯åæ¥ï¼è¯¥æ¥å£æ¯æåä¸ªäººåæ°å¢ãæ´æ°ãå é¤éæ±") |
| | | @PostMapping("/event/user/update") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse userUpdate(@RequestBody UserUpdateRequest param) { |
| | | param.setToken(this.getToken()); |
| | | erpSyncService.userUpdate(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation(value = "人åé¨ç¦ç»æææ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼è®¿å®¢ç«¯äººå忥é¨ç¦ç»ææä¿¡æ¯ï¼è¯¥æ¥å£æ¯æäººåé¨ç¦ç»æææ°å¢ãæ´æ°ãæ¸
ç©ºéæ±ã") |
| | | @PostMapping("/event/role/userAuthor") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse roleUserAuthor(@RequestBody UserAuthorRequest param) { |
| | | erpSyncService.roleUserAuthor(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation(value = "è½¦è¾ææåè½¦åºæ¥å£", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼è®¿å®¢ç«¯åæ¥è½¦è¾å¯¹å车åºçä½¿ç¨æéï¼è¯¥æ¥å£æ¯æè½¦è¾ç»å®ãè§£ç»å½å±äººï¼æ¯ææ°å¢ãæ´æ°ãæ¸
ç©ºè½¦è¾ææä¿¡æ¯") |
| | | @PostMapping("/event/park/carAuthor") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse parkCarAuthor(@RequestBody CarAuthorRequest param) { |
| | | erpSyncService.parkCarAuthor(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation(value = "访客ç³è¯·å®¡æ¹ç»æéç¥æ¥å£", notes = "访客端æä¾ï¼ä¾è®¿å®¢ç«¯è°ç¨ï¼æäº¤è®¿å®¢ç³è¯·å®¡æ¹çç»æ") |
| | | @PostMapping("/event/approve/notice") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "æætokenå¼", required = true) |
| | | }) |
| | | public ApiResponse approveApply(@RequestBody ApproveNoticeRequest param) { |
| | | param.setToken(this.getToken()); |
| | | erpSyncService.approveApply(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "FTPè´¦æ·ä¿¡æ¯", notes = "访客端æä¾ï¼ä¾ERP端è°ç¨ï¼FTPè´¦æ·ä¿¡æ¯,å
¶ä¸ãFTPèµæºè®¿é®æ å°å°åãç¨äºå¾çåæ¾ä½¿ç¨ï¼" + |
| | | "æ¯å¦äººè¸å¾çåæ¾æ¼æ¥ï¼ãFTPèµæºè®¿é®æ å°å°åã+ãFTPç¨æ·å¾çåå¨ç®å½ã+ãå®é
人è¸å¾çåå¨å段å
容ã" + |
| | | "å¦ï¼http://175.27.187.84/file4/member/20231211/skjd-skdjf4enc-flgk.png") |
| | | @GetMapping("/resource/ftpAccount") |
| | | public ApiResponse<Map<String,Object>> ftpAccount() { |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("FTP主æºå°åIP", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_HOST).getCode()); |
| | | map.put("FTP访é®ç«¯å£", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_PORT).getCode()); |
| | | map.put("FTP访é®ç»å½å", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_USERNAME).getCode()); |
| | | map.put("FTP访é®ç»éå¯ç ", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_PWD).getCode()); |
| | | map.put("FTP访客äºä»¶å¾çåå¨ç®å½", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.VISIT_EVENT_IMG).getCode()); |
| | | map.put("FTP车è¾äºä»¶å¾çåå¨ç®å½", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.CAR_EVENT_IMG).getCode()); |
| | | map.put("FTPé¨ç¦äºä»¶å¾çåå¨ç®å½", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.DEVICE_EVENT_IMG).getCode()); |
| | | map.put("FTPç¨æ·å¾çåå¨ç®å½", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode()); |
| | | map.put("FTPèµæºè®¿é®æ å°å°å", |
| | | systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()); |
| | | return ApiResponse.success(map); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @ApiModel("请æ±åæ°ä¿¡æ¯") |
| | | @Data |
| | | public class BaseRequest { |
| | | @ApiModelProperty(value = "æ¥è¯¢ç±»å 0è¿7天 1è¿15天 2è¿30天", example = "1") |
| | | private int type; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("车è¾åºå
¥è®°å½æ°æ®éåä¿¡æ¯") |
| | | public class CarsDataListResponse { |
| | | |
| | | @ApiModelProperty(value = "车çå·" ) |
| | | private String carNo ; |
| | | |
| | | @ApiModelProperty(value = "人åç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå", example = "1") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "åºå
¥ç±»å 0è¿åº 1åºåº", example = "1") |
| | | private Integer inOrOut; |
| | | @ApiModelProperty(value = "æå±é¨é¨æè
åä½åç§°") |
| | | private String companyName; |
| | | @ApiModelProperty(value = "人ååç§° ") |
| | | private String memberName ; |
| | | @ApiModelProperty(value = "åçæ¶é´") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "访客å
¬å¸åç§°") |
| | | private String visitCompanyName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("æ°æ®ç»è®¡ä¿¡æ¯") |
| | | public class CountDataResponse { |
| | | |
| | | @ApiModelProperty(value = "é¢çº¦æ°", example = "1") |
| | | private int applyTotalNum; |
| | | @ApiModelProperty(value = "é¢çº¦å·²å®¡æ¹æ°", example = "1") |
| | | private int applyPassNum; |
| | | @ApiModelProperty(value = "访客æ°", example = "1") |
| | | private int visitorNum; |
| | | @ApiModelProperty(value = "æè®¿ä¸è®¿å®¢æ°", example = "1") |
| | | private int visitInNum; |
| | | @ApiModelProperty(value = "ç¾ç¦»è®¿å®¢æ°", example = "1") |
| | | private int visitOutNum; |
| | | @ApiModelProperty(value = "è¿åºè½¦æ¬¡", example = "1") |
| | | private int carInNum; |
| | | @ApiModelProperty(value = "åºåºè½¦æ¬¡", example = "1") |
| | | private int carOutNum; |
| | | @ApiModelProperty(value = "å¨åºè½¦è¾æ°é", example = "1") |
| | | private int carNum; |
| | | @ApiModelProperty(value = "å工车è¾è¿åºæ°é", example = "1") |
| | | private int memberCarNum; |
| | | @ApiModelProperty(value = "访客车è¾è¿åºæ°é", example = "1") |
| | | private int visitCarNum; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel("车è¾è¿åºåºå访客ç»è®¡æ°æ®") |
| | | public class CountListResponse { |
| | | |
| | | @ApiModelProperty(value = "æ¨ªåæ æ¥ææ°æ®éå", example = "1") |
| | | private List<String> timeList; |
| | | @ApiModelProperty(value = "çºµåæ æ°æ®éåï¼è½¦è¾è¿åºã访客æ°ï¼", example = "1") |
| | | private List<Integer> dataList; |
| | | @ApiModelProperty(value = "çºµåæ æ°æ®éå2(车è¾åºåº)", example = "1") |
| | | private List<Integer> secDataList; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("访客åºå
¥è®°å½æ°æ®éåä¿¡æ¯") |
| | | public class VisitDataListResponse { |
| | | |
| | | @ApiModelProperty(value = "æè®¿æ¶é¿ä¿¡æ¯" ) |
| | | private String timeInfo ; |
| | | @ApiModelProperty(value = "人ååç§° ") |
| | | private String memberName ; |
| | | @ApiModelProperty(value = "åºå
¥ç±»å 0è¿åº 1åºåº", example = "1") |
| | | private Integer inOrOut; |
| | | @ApiModelProperty(value = "æå±é¨é¨æè
åä½åç§°") |
| | | private String companyName; |
| | | @ApiModelProperty(value = "åçæ¶é´") |
| | | private Date createDate; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service; |
| | | |
| | | import com.doumee.model.*; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å车åºäºä»¶æ¨éè®°å½è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface ScreenService { |
| | | |
| | | CountDataResponse countData(BaseRequest param); |
| | | |
| | | List<CarsDataListResponse> carsDataList(BaseRequest param); |
| | | |
| | | List<VisitDataListResponse> visitDataList(BaseRequest param); |
| | | |
| | | CountListResponse todayCarsData(BaseRequest param); |
| | | CountListResponse carsDaysData(BaseRequest param); |
| | | CountListResponse visitDaysData(BaseRequest param); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.impl; |
| | | |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.VisitEventMapper; |
| | | import com.doumee.dao.business.join.CarEventJoinMapper; |
| | | import com.doumee.dao.business.join.VisitEventJoinMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.model.*; |
| | | import com.doumee.service.ScreenService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å车åºäºä»¶æ¨éè®°å½è¡¨Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Service |
| | | public class ScreenServiceImpl implements ScreenService { |
| | | |
| | | @Autowired |
| | | private VisitsJoinMapper visitsMapper; |
| | | @Autowired |
| | | private CarEventJoinMapper carEventMapper; |
| | | @Autowired |
| | | private VisitEventJoinMapper visitEventMapper; |
| | | @Override |
| | | public CountDataResponse countData(BaseRequest param){ |
| | | MPJLambdaWrapper<Visits> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.select("count(1) as applyTotalNum"); |
| | | queryWrapper.select("(select count(1) from visits where TO_DAYS(create_date)=TO_DAYS(now()) and status not in(1,4,9)) as applyPassNum"); |
| | | queryWrapper.select("(select count(1) from visits where TO_DAYS(create_date)=TO_DAYS(now()) and status=8) as visitInNum"); |
| | | queryWrapper.select("(select count(1) from visits where TO_DAYS(create_date)=TO_DAYS(now()) and status=6) as visitOutNum"); |
| | | queryWrapper.select("(select count(1) from car_event where TO_DAYS(create_date)=TO_DAYS(now()) and inout_type=0 and event_type="+ HKConstants.EventTypes.PARK_PASS_IN.getKey() +") as carInNum"); |
| | | queryWrapper.select("(select count(1) from car_event where TO_DAYS(create_date)=TO_DAYS(now()) and inout_type=1 and event_type="+ HKConstants.EventTypes.PARK_PASS_OUT.getKey() +") as carOutNum"); |
| | | queryWrapper.eq(Visits::getIsdeleted, Constants.ZERO ); |
| | | queryWrapper.apply("TO_DAYS(create_date)=TO_DAYS(now())" ); |
| | | queryWrapper.last("limit 1"); |
| | | CountDataResponse vModel =visitsMapper.selectJoinOne(CountDataResponse.class,queryWrapper); |
| | | vModel.setVisitorNum(vModel.getVisitInNum()+vModel.getVisitOutNum());//仿¥è®¿å®¢æ»æ° |
| | | |
| | | MPJLambdaWrapper<CarEvent> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.select("count(1) as memberCarNum"); |
| | | wrapper.exists("select b.id from cars b where b.code=t.plate_nos" ); |
| | | wrapper.apply("TO_DAYS(create_date)=TO_DAYS(now())" ); |
| | | wrapper.last("limit 1"); |
| | | CountDataResponse cModel =carEventMapper.selectJoinOne(CountDataResponse.class,wrapper); |
| | | vModel.setMemberCarNum(vModel.getMemberCarNum());//仿¥å工车è¾è¿åºæ° |
| | | vModel.setMemberCarNum(vModel.getCarInNum() - vModel.getMemberCarNum());//仿¥é¢çº¦è½¦è¾è¿åºæ° |
| | | return vModel; |
| | | } |
| | | |
| | | @Override |
| | | public List<CarsDataListResponse> carsDataList(BaseRequest param){ |
| | | List<CarsDataListResponse> list = new ArrayList<>(); |
| | | MPJLambdaWrapper<CarEvent> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(CarEvent.class) |
| | | .selectAs(Member::getType,CarEvent::getMemberType) |
| | | .selectAs(Member::getName,CarEvent::getMemberName) |
| | | .selectAs(Member::getVisitCompanyName,CarEvent::getVisitCompanyName) |
| | | .selectAs(Company::getName,CarEvent::getCompanyName); |
| | | wrapper.leftJoin(Member.class,Member::getId,CarEvent::getMemberId); |
| | | wrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | wrapper.apply("TO_DAYS(t.create_date)=TO_DAYS(now())" ); |
| | | wrapper.in(CarEvent::getEventType, Arrays.asList(new Integer[]{HKConstants.EventTypes.PARK_PASS_IN.getKey(),HKConstants.EventTypes.PARK_PASS_OUT.getKey()})); |
| | | wrapper.last("limit 50"); |
| | | wrapper.orderByDesc(CarEvent::getCreateDate); |
| | | List<CarEvent> result =carEventMapper.selectJoinList(CarEvent.class,wrapper); |
| | | if(result!=null){ |
| | | for(CarEvent event :result){ |
| | | CarsDataListResponse model = new CarsDataListResponse(); |
| | | model.setInOrOut(event.getInoutType()); |
| | | model.setCarNo(event.getPlateNos()); |
| | | model.setCreateDate(event.getCreateDate()); |
| | | model.setCompanyName(event.getCompanyName()); |
| | | model.setMemberName(event.getMemberName()); |
| | | model.setType(event.getMemberType()); |
| | | model.setVisitCompanyName(event.getVisitCompanyName()); |
| | | list.add(model); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<VisitDataListResponse> visitDataList(BaseRequest param){ |
| | | List<VisitDataListResponse> list = new ArrayList<>(); |
| | | MPJLambdaWrapper<VisitEvent> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(VisitEvent.class) ; |
| | | wrapper.apply("TO_DAYS(create_date)=TO_DAYS(now())" ); |
| | | wrapper.in(CarEvent::getEventType, Arrays.asList(new Integer[]{HKConstants.EventTypes.PARK_PASS_IN.getKey(),HKConstants.EventTypes.PARK_PASS_OUT.getKey()})); |
| | | wrapper.last("limit 50"); |
| | | wrapper.orderByDesc(VisitEvent::getCreateDate); |
| | | List<VisitEvent> result =visitEventMapper.selectList( wrapper); |
| | | if(result!=null){ |
| | | for(VisitEvent event :result){ |
| | | VisitDataListResponse model = new VisitDataListResponse(); |
| | | model.setInOrOut(Constants.formatIntegerNum(event.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_OUT.getKey()?1:0); |
| | | model.setCreateDate(event.getCreateDate()); |
| | | model.setCompanyName(event.getVisitorWorkUint()); |
| | | model.setMemberName(event.getPersonName()); |
| | | model.setTimeInfo(getTimeInfoByModel(event)); |
| | | list.add(model); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | private String getTimeInfoByModel(VisitEvent event) { |
| | | |
| | | if(Constants.formatIntegerNum(event.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_OUT.getKey() |
| | | &&StringUtils.isNotBlank(event.getStartTime()) |
| | | && StringUtils.isNotBlank(event.getEndTime())){ |
| | | //å¦æææ¶é´å·® |
| | | int hour = 0,min=0,sec =0; |
| | | try { |
| | | long start = DateUtil.getISO8601DateByStr(event.getStartTime()).getTime(); |
| | | long end = DateUtil.getISO8601DateByStr(event.getEndTime()).getTime(); |
| | | hour =(int)((end-start)/(60*60*1000)); |
| | | min =(int)(((end-start)-(60*60*1000))/(60*1000)); |
| | | sec =(int)(((end-start)%(60*1000))); |
| | | }catch (Exception e){ |
| | | return "-"; |
| | | } |
| | | if(hour <= 0 && min<=0 && sec <=0){ |
| | | return "-"; |
| | | } |
| | | String timeinfo = ""; |
| | | if(hour>0){ |
| | | timeinfo = hour+"å°æ¶"; |
| | | } |
| | | if(sec>0){ |
| | | timeinfo += sec+"å"; |
| | | }else if(sec>0){ |
| | | timeinfo+= "1å"; |
| | | } |
| | | return timeinfo; |
| | | } |
| | | return "-"; |
| | | } |
| | | |
| | | @Override |
| | | public CountListResponse todayCarsData(BaseRequest param) { |
| | | CountListResponse data = new CountListResponse(); |
| | | List<String> times = new ArrayList<>(); |
| | | List<Integer> numList = new ArrayList<>(); |
| | | List<Integer> numList2 = new ArrayList<>(); |
| | | for (int i = 0; i < 25; i++) { |
| | | times.add((i)+":00"); |
| | | numList.add(0); |
| | | numList2.add(0); |
| | | } |
| | | //è¿åº |
| | | List<CarEvent> inList =getCarEventListByHour(HKConstants.EventTypes.PARK_PASS_IN.getKey()); |
| | | if(inList!=null){ |
| | | for(CarEvent event: inList){ |
| | | if(Constants.formatIntegerNum(event.getHour()) >=0 && Constants.formatIntegerNum(event.getHour()) <24 ){ |
| | | numList.set(Constants.formatIntegerNum(event.getHour()+1),event.getNum()); |
| | | } |
| | | } |
| | | } |
| | | //ç¦»åº |
| | | List<CarEvent> outList =getCarEventListByHour(HKConstants.EventTypes.PARK_PASS_OUT.getKey()); |
| | | if(outList!=null){ |
| | | for(CarEvent event: outList){ |
| | | if(Constants.formatIntegerNum(event.getHour()) >=0 && Constants.formatIntegerNum(event.getHour()) <24 ){ |
| | | numList2.set(Constants.formatIntegerNum(event.getHour()+1),event.getNum()); |
| | | } |
| | | } |
| | | } |
| | | data.setDataList(numList); |
| | | data.setSecDataList(numList2); |
| | | data.setTimeList(times); |
| | | return data; |
| | | } |
| | | |
| | | /** |
| | | * åºäºæ¶é´ç¹ç»è®¡åºæ¥è¿åºåºæ°æ®æ¬¡æ° |
| | | * @param key |
| | | * @return |
| | | */ |
| | | private List<CarEvent> getCarEventListByHour(int key) { |
| | | MPJLambdaWrapper<CarEvent> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.select("count(id) as num,HOUR(create_date) as hour"); |
| | | wrapper.apply("TO_DAYS(create_date)=TO_DAYS(now())" ); |
| | | wrapper.eq(CarEvent::getEventType, key); |
| | | wrapper.groupBy("HOUR(create_date)"); |
| | | wrapper.orderByDesc(CarEvent::getCreateDate); |
| | | List<CarEvent> result =carEventMapper.selectJoinList(CarEvent.class,wrapper); |
| | | return result; |
| | | } |
| | | private List<CarEvent> getCarEventListByDays(int days) { |
| | | MPJLambdaWrapper<CarEvent> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.select("count(id) as num, create_date"); |
| | | wrapper.apply("TO_DAYS(create_date)+"+days+" >= TO_DAYS(now()) " ); |
| | | wrapper.eq(CarEvent::getEventType, HKConstants.EventTypes.PARK_LINE_IN.getKey()); |
| | | wrapper.groupBy("TO_DAYS(create_date)"); |
| | | wrapper.orderByDesc(CarEvent::getCreateDate); |
| | | List<CarEvent> result =carEventMapper.selectJoinList(CarEvent.class,wrapper); |
| | | return result; |
| | | } |
| | | private List<VisitEvent> getVisitEventListByDays(int days) { |
| | | MPJLambdaWrapper<VisitEvent> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.select("count(id) as num, create_date"); |
| | | wrapper.apply("TO_DAYS(create_date)+"+days+" >= TO_DAYS(now()) " ); |
| | | wrapper.eq(VisitEvent::getEventType, HKConstants.EventTypes.VISIT_SIGN_IN.getKey()); |
| | | wrapper.groupBy("TO_DAYS(create_date)"); |
| | | wrapper.orderByDesc(CarEvent::getCreateDate); |
| | | List<VisitEvent> result =visitEventMapper.selectJoinList(VisitEvent.class,wrapper); |
| | | return result; |
| | | } |
| | | @Override |
| | | public CountListResponse carsDaysData(BaseRequest param) { |
| | | CountListResponse data = new CountListResponse(); |
| | | int days = 7;//é»è®¤7天 |
| | | if(param.getType() == 1){ |
| | | //è¿30天 |
| | | days =15; |
| | | }else if(param.getType() == 2){ |
| | | //è¿15天 |
| | | days =30; |
| | | } |
| | | List<String> times = new ArrayList<>(); |
| | | List<Integer> numList = new ArrayList<>(); |
| | | for (int i = 0; i < days; i++) { |
| | | times.add(DateUtil.formatDate(DateUtil.dateDayAdd(new Date(), -(days-i)+1),"MM.dd")); |
| | | numList.add(0); |
| | | } |
| | | List<CarEvent> result = getCarEventListByDays(days); |
| | | if(result!=null&& result.size()>0){ |
| | | for (int i = 0; i < days; i++) { |
| | | numList.set(i,getNumByDate(times.get(i),result)); |
| | | } |
| | | } |
| | | data.setTimeList(times); |
| | | data.setDataList(numList); |
| | | return data; |
| | | } |
| | | |
| | | private Integer getNumByDate(String s, List<CarEvent> result) { |
| | | for(CarEvent event:result){ |
| | | if(StringUtils.equals(s,DateUtil.formatDate(event.getCreateDate(),"MM.dd"))){ |
| | | return event.getNum(); |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | private Integer getVisistNumByDate(String s, List<VisitEvent> result) { |
| | | for(VisitEvent event:result){ |
| | | if(StringUtils.equals(s,DateUtil.formatDate(event.getCreateDate(),"MM.dd"))){ |
| | | return event.getNum(); |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | List<String> times = new ArrayList<>(); |
| | | List<String> numList = new ArrayList<>(); |
| | | for (int i = 0; i < 7; i++) { |
| | | System.out.println(DateUtil.formatDate(DateUtil.dateDayAdd(new Date(), -(7-i)+1),"MM.dd")); |
| | | } |
| | | } |
| | | @Override |
| | | public CountListResponse visitDaysData(BaseRequest param) { |
| | | CountListResponse data = new CountListResponse(); |
| | | int days = 7;//é»è®¤7天 |
| | | if(param.getType() == 1){ |
| | | //è¿30天 |
| | | days =15; |
| | | }else if(param.getType() == 2){ |
| | | //è¿15天 |
| | | days =30; |
| | | } |
| | | List<String> times = new ArrayList<>(); |
| | | List<Integer> numList = new ArrayList<>(); |
| | | for (int i = 0; i < days; i++) { |
| | | times.add(DateUtil.formatDate(DateUtil.dateDayAdd(new Date(), -(days-i)+1),"MM.dd")); |
| | | numList.add(0); |
| | | } |
| | | List<VisitEvent> result = getVisitEventListByDays(days); |
| | | if(result!=null&& result.size()>0){ |
| | | for (int i = 0; i < days; i++) { |
| | | numList.set(i,getVisistNumByDate(times.get(i),result)); |
| | | } |
| | | } |
| | | data.setTimeList(times); |
| | | data.setDataList(numList); |
| | | return data; |
| | | } |
| | | } |
| | |
| | | # application: |
| | | # name: doumeemes |
| | | profiles: |
| | | active: dev |
| | | active: devYL |
| | | |
| | | # JSONè¿åé
ç½® |
| | | jackson: |
| | |
| | | package com.doumee.config;public class DataSyncConfig { |
| | | package com.doumee.config; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = "data-sync") |
| | | public class DataSyncConfig { |
| | | public interface origin{ |
| | | int erp = 1; |
| | | int hk = 2; |
| | | int self = 0; |
| | | } |
| | | private Integer orgUserDataOrigin; |
| | | private Integer visitorDataOrigin; |
| | | private Boolean needDealImg; |
| | | } |
| | |
| | | // String visitEvents = "/api/visitor/v1/event/turnover/search";//访客äºä»¶æ¥è¯¢ |
| | | // String parkEvents = "/api/pms/v1/crossRecords/page";//å车åºäºä»¶æ¥è¯¢ |
| | | String rootOrg = "/api/resource/v1/org/rootOrg";//è·åè·ç»ç» |
| | | String orgAllList = "/api/resource/v1/org/orgList";//è·åå
¨éç»ç»ä¿¡æ¯ |
| | | String userAllList = "/api/resource/v2/person/personList";//è·åå
¨éç¨æ·å表 |
| | | String orgTimeRangeList = "/api/resource/v1/org/timeRange";//å¢éè·åç»ç»ä¿¡æ¯ |
| | | String userTimeRangeList = "/api/resource/v1/person/personList/timeRange";//å¢éè·åç¨æ·å表 |
| | | String addBatchOrg = "/api/resource/v1/org/batch/add";//æ¹éæ°å¢ç»ç» |
| | | String delBatchOrg = "/api/resource/v1/org/batch/delete";//æ¹éå é¤ç»ç» |
| | | String editOrg = "/api/resource/v1/org/single/update";//ä¿®æ¹ç»ç» |
| | |
| | | String cardLoss= "/api/cis/v1/card/batch/loss";//æ¹éæå¤± |
| | | String cardUnloss= "/api/cis/v1/card/batch/unLoss";//æ¹éè§£æ |
| | | String taskPersoDetail= "/api/acps/v1/download_record/person/detail/search";//æ¥è¯¢è®¾å¤ééç人åæéä¸è½½è¯¦æ
|
| | | String appointmentRecords= "/api/visitor/v2/appointment/records";//æ¥è¯¢è®¿å®¢é¢çº¦è®°å½v2 |
| | | String visitingRecords= "/api/visitor/v2/visiting/records";//æ¥è¯¢è®¿å®¢æ¥è®¿è®°å½v2 |
| | | String vehicleList= "/api/resource/v2/vehicle/advance/vehicleList";//æ¥è¯¢è½¦è¾å表v2 |
| | | String vehicleTimeRangeList= "/api/resource/v1/vehicle/timeRange";//å¢éè·åè½¦è¾æ°æ® |
| | | |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | private String name; |
| | | private int key; |
| | | |
| | | public static String getName(int index) { |
| | | for (EventTypes c : EventTypes.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | // æé æ¹æ³ |
| | | EventTypes(int key, String name ) { |
| | | this.name = name; |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.config.SpringContextUtil; |
| | | import com.doumee.core.haikang.model.param.request.CarPictureRequest; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.InterfaceLog; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | |
| | | import org.apache.tomcat.util.bcel.Const; |
| | | import org.yaml.snakeyaml.scanner.Constant; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.InetSocketAddress; |
| | | import java.net.Proxy; |
| | |
| | | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | // Proxy proxy = new Proxy(Proxy.Type.DIRECT, new InetSocketAddress("127.0.0.1",Integer.valueOf("1080"))); |
| | | URL realUrl = new URL("https://10.50.60.253/artemis/api/eventService/v1/eventSubscriptionByEventTypes"); |
| | | HttpURLConnection con = (HttpURLConnection) realUrl.openConnection(); |
| | | con.setRequestMethod("GET"); |
| | | // con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) ;Gecko/20100101 Firefox/57.0"); |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); |
| | | String inputLine; |
| | | StringBuffer content = new StringBuffer(); |
| | | while ((inputLine = in.readLine()) != null) { |
| | | content.append(inputLine); |
| | | ArtemisConfig.host = "10.50.60.253"; |
| | | ArtemisConfig.appKey = "27786546"; |
| | | ArtemisConfig.appSecret = "kC5dohxU7CvEqgGhVt4R"; |
| | | HKConstants.https = "https://"; |
| | | CarPictureRequest param = new CarPictureRequest(); |
| | | param.setPicUri( "HKIMG=/pic?0dd400=4c40ip-feo831-933*9o4=3=2109*2l0001893117*0t7=6*2ps==014b*=787d*069d70361-95754d-9*l108od0b192=001"); |
| | | param.setAswSyscode("3fa3e5e3-db3e-41ba-97fc-39c948778dfe"); |
| | | InputStream is = HKService.getCarPicture(param); |
| | | File imageFile = new File("D:\\visit\\111"+UUID.randomUUID().toString()+".png"); |
| | | try { |
| | | byte[] bytes = new byte[1024]; |
| | | FileOutputStream outStream = new FileOutputStream(imageFile); |
| | | int index; |
| | | while ((index = is.read(bytes)) != -1) { |
| | | outStream.write(bytes, 0, index); |
| | | outStream.flush(); |
| | | } |
| | | // outStream = new FileOutputStream(imageFile); |
| | | // outStream.write(bytes); |
| | | //å
³éè¾åºæµ |
| | | outStream.close(); //åå
¥æ°æ® |
| | | } catch ( Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | in.close(); |
| | | con.disconnect(); |
| | | |
| | | System.out.println(content.toString()); |
| | | |
| | | } |
| | | public static InterfaceLogService interfaceLogService = null; |
| | |
| | | throw new Exception("è·åé¨ç¦äºä»¶çå¾çä¸è½½åºé"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢è½¦è¾ææå¾ç |
| | | * @param body |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * è·å访客é¢çº¦è®°å½å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String visitingRecords(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.visitingRecords); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * è·å访客é¢çº¦è®°å½å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String appointmentRecords(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.appointmentRecords); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | /** |
| | | * è·åå
¨éç»ç»å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String orgAllList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.orgAllList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | /** |
| | | * è·åå
¨éç¨æ·å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String userAllList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.userAllList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | /** |
| | | * å¢éè·åç»ç»å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String orgTimeRangeList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.orgTimeRangeList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | /** |
| | | * å¢éè·åç¨æ·å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String userTimeRangeList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.userTimeRangeList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | /** |
| | | * å¢éè·å车è¾å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String vehicleTimeRangeList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.vehicleTimeRangeList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | /** |
| | | * å
¨éè·å车è¾å表 |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String vehicleList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.vehicleList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | package com.doumee.core.haikang.model.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OrgUserListRequest { |
| | | |
| | | private String startTime ;//string True éå¯¹æ´æ°æ¶é´çæ¥è¯¢å¼å§æ¥æï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | private String endTime;// string False éå¯¹æ´æ°æ¶é´çæ¥è¯¢æªæ¢æ¥æï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | private Integer pageNo ;//integer True 页ç ,pageNoâ¥1 |
| | | private Integer pageSize;// integer True åé¡µå¤§å° |
| | | public class AppointmentListRequest { |
| | | private String receptionistId;// string False 被访人å¯ä¸æ è¯,æ¥è¯¢äººåå表v2æ¥å£è·åè¿åæ¥æä¸çpersonIdåæ®µ |
| | | private String visitorName;// string False 访客å§åï¼é¿åº¦ä¸è¶
è¿32ï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | | private String phoneNo ;//string False èç³»çµè¯å»ºè®®å¡«åææºå·ç |
| | | private String visitStartTimeBegin;// string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ ä¾å¦å京æ¶é´ï¼ 2018-07-26T15:00:00+08:00 |
| | | private String visitStartTimeEnd ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ ä¾å¦å京æ¶é´ï¼ 2018-07-26T15:00:00+08:00 |
| | | private String visitEndTimeBegin;// string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ ä¾å¦å京æ¶é´ï¼ 2018-07-26T15:00:00+08:00 |
| | | private String visitEndTimeEnd;// string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ ä¾å¦å京æ¶é´ï¼ 2018-07-26T15:00:00+08:00 |
| | | private int pageNo;// integer True pageNoè¦æ±å¤§äº0ä¸è¶
è¿2147483647 |
| | | private int pageSize;// integer True pageSizeè¦æ±å¤§äº0ä¸ä¸è¶
è¿1000 |
| | | private String verificationCode;// string False 访客éªè¯ç 为访客管çç»ä»¶æä¾ï¼ç¨äºè®¿å®¢å¨è®¿å®¢æºç»è®°çåè¯ |
| | | /** |
| | | * è®¿å®¢ç¶æ, |
| | | * 0ï¼å¾
å®¡æ ¸ï¼é¢çº¦å¾
审æ¹ï¼ã |
| | | * 1ï¼æ£å¸¸ï¼é¢çº¦æåæé¢çº¦å®¡æ¹æåå<æªç»è®°>ï¼å½åæ¶é´æªè¶
è¿é¢è®¡æ¥è®¿æ¶é´ï¼ã |
| | | * 2ï¼è¿å°ï¼é¢çº¦æåæé¢çº¦å®¡æ¹æåå<æªç»è®°>ï¼å½åæ¶é´è¶
è¿é¢è®¡æ¥è®¿æ¶é´ï¼ä½æªè¶
è¿é¢è®¡ç¦»å¼æ¶é´ï¼ã |
| | | * 3ï¼å¤±æï¼é¢çº¦æåæé¢çº¦å®¡æ¹æåå<æªç»è®°>ï¼å½åæ¶é´å·²è¶
è¿é¢è®¡ç¦»å¼æ¶é´ï¼ã |
| | | * 4ï¼å®¡æ ¸éåï¼é¢çº¦å¾
审æ¹ï¼å®¡æ¹äººå审æ¹éåï¼ã |
| | | * 5ï¼è¶
æèªå¨ç¾ç¦»ï¼è¶
ææªç¾ç¦»è®°å½è®¿å®¢ï¼ç±åå°ä»»å¡å®æ¶å¤çç¾ç¦»ï¼ã |
| | | * 6ï¼å·²ç¾ç¦»ï¼è®¿å®¢ç¾ç¦»ï¼ã |
| | | * 7ï¼è¶
ææªç¾ç¦»ï¼è®¿å®¢ç»è®°ï¼å½åæ¶é´å·²è¶
è¿é¢è®¡ç¦»å¼æ¶é´ï¼è¿æªè¿è¡ç¾ç¦»ï¼ã |
| | | * 8ï¼å·²å°è¾¾ï¼ï¼è®¿å®¢ç»è®°ï¼å½åæ¶é´æªè¶
è¿é¢è®¡ç¦»å¼æ¶é´ï¼ã |
| | | * 9ï¼å®¡æ ¸å¤±æï¼é¢çº¦å¾
审æ¹ï¼ä¸ç´å°å½åæ¶é´è¶
è¿é¢è®¡ç¦»å¼æ¶é´ï¼è¿æªå®¡æ¹éè¿ï¼ã |
| | | * 10ï¼é约ä¸ï¼åå·¥åèµ·é约ï¼è®¿å®¢è¿æªåºéï¼ã |
| | | * 11ï¼é约失æï¼åå·¥åèµ·é约ï¼ä¸ç´å°å½åæ¶é´è¶
è¿é¢è®¡ç¦»å¼æ¶é´ï¼è®¿å®¢è¿æªåºéï¼ |
| | | */ |
| | | private String visitorStatus;// integer False |
| | | private String QRCode ;//string False 访客äºç»´ç å
容,æ¯æå¨æäºç»´ç æè
éæäºç»´ç |
| | | private String orderId;// string False é¢çº¦è®°å½IDï¼è®¿å®¢é¢çº¦v2æ¥å£è·åè¿åæ¥æä¸çorderIdåæ®µ |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TimeRangeListRequest { |
| | | |
| | | private String startTime ;//string True éå¯¹æ´æ°æ¶é´çæ¥è¯¢å¼å§æ¥æï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | private String endTime;// string False éå¯¹æ´æ°æ¶é´çæ¥è¯¢æªæ¢æ¥æï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | private Integer pageNo ;//integer True 页ç ,pageNoâ¥1 |
| | | private Integer pageSize;// integer True åé¡µå¤§å° |
| | | |
| | | } |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class VisitingInfoResponse { |
| | | public class VisitingInfoRequest { |
| | | private String receptionistId;// string False 被访人IDï¼ä» è·å人åå表v2 æ¥å£è·åè¿ååæ°personId |
| | | private String receptionistName ;//string False 被访人å§åï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | | private String visitorName ;//string False 访客å§åï¼é¿åº¦ä¸è¶
è¿32ï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | public class UserInfoResponse { |
| | | public class AppointmentInfoResponse { |
| | | |
| | | private String personId ;//string False 人åID |
| | | private String personName ;//string False å§å |
| | | private Integer gender ;//number False |
| | | private String orgIndexCode;// string False æå±ç»ç»å¯ä¸æ è¯ç |
| | | private String phoneNo;// string False èç³»çµè¯ |
| | | private String jobNo;// string False å·¥å· |
| | | private Integer certificateType;// number False è¯ä»¶ç±»å111:身份è¯414:æ¤ç
§113:æ·å£ç°¿335:驾驶è¯131:å·¥ä½è¯133:å¦çè¯990:å
¶ä» ; |
| | | private String certificateNo ;//string False è¯ä»¶å·ç ä¸ä¸²æ°åå符串 |
| | | private String createTime ;//string False å建æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String updateTime;// string False æ´æ°æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String orgPath;// string False æå±ç»ç»ç®å½ï¼@è¿è¡åå²ï¼ä¾å¦ @root000000@ |
| | | private String orgPathName;// string False æå±ç»ç»åç§°ï¼@è¿è¡åå²ï¼å¦@é»è®¤é¨é¨@ |
| | | private List<UserPhotoResponse> personPhoto;// object False 人åå¾çä¿¡æ¯ |
| | | |
| | | private String appointRecordId ;//string False é¢çº¦è®°å½IDï¼å¯ä½ä¸ºä¿®æ¹é¢çº¦ç便® |
| | | private String receptionistId ;//string False 被访人å¯ä¸æ è¯ |
| | | private String receptionistName ;//string False 被访人å§åï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | | private String receptionistCode ;//string False 被访人æå±ç»ç»ç¼ç |
| | | private String visitStartTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ |
| | | private String visitEndTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ é¢è®¡ç¦»å¼æ¶é´å¿
é¡»æäºå½åæ¶é´åé¢è®¡æ¥è®¿æ¶é´ |
| | | private String visitPurpose ;//string False æ¥è®¿äºç± |
| | | private String visitorName ;//string False 访客å§å |
| | | private String visitorWorkUnit ;//string False æ¥è®¿åä½ |
| | | private String visitorAddress ;//string False 访客ä½å |
| | | private String visitorId ;//string False 访客Id |
| | | private String verificationCode ;//string False 访客éªè¯ç ï¼ç¨äºè®¿å®¢å¨è®¿å®¢æºç»è®°çåè¯ |
| | | private String QRCode ;//string False 卿äºç»´ç ï¼å¦éè¦ä½¿ç¨ï¼å¯å°è®¿å®¢äºç»´ç å
容转æäºç»´ç å¾çå³å¯ |
| | | private Integer gender;// integer False 1-ç·, 2-女 |
| | | private String phoneNo ;//string False èç³»çµè¯å»ºè®®å¡«åææºå·ç ï¼ä»
æ¯æçº¯æ°åã |
| | | private String plateNo ;//string False 访客车çå· |
| | | private Integer certificateType ;// integer False è¯ä»¶ç±»åï¼è¯¦è§éå½A.11 è¯ä»¶ç±»å |
| | | private String certificateNo ;//string False è¯ä»¶å·ï¼æ ¼å¼ä¸ºï¼1~20个æ°åãåæ¯ç»æ |
| | | private String picUri ;//string False è¿åå¾ççç¸å¯¹Uriï¼éè¦è°ç¨è·å访客记å½ä¸çå¾çæ¥å£ï¼æ¥è·åå¾ççæ°æ® |
| | | private String svrIndexCode ;//string False ä¸picUrié
对è¾åºçåæ®µä¿¡æ¯ï¼ç¨äºâè·å访客记å½çå¾çâæ¥å£çè¾å
¥åæ° |
| | | /** |
| | | * 访客åç¶æ, |
| | | * 0:å¾
å®¡æ ¸ã |
| | | * 1ï¼æ£å¸¸ã |
| | | * 2ï¼è¿å°ã |
| | | * 3ï¼å¤±æã |
| | | * 4ï¼å®¡æ ¸éåã |
| | | * 9ï¼å®¡æ ¸å¤±æã |
| | | * 10ï¼é约ä¸ã |
| | | * 11:é约失æ |
| | | */ |
| | | private Integer visitorStatus ;//integer False |
| | | private String certAddr ;//string False è¯ä»¶å°å |
| | | private String certIssuer ;//string False åè¯æºå
³ |
| | | private Integer nation ;//integer False |
| | | private String birthplace ;//string False ç±è´¯ |
| | | private String orderId ;//string False 访客记å½å¯ä¸æ è¯ï¼ç¨äºå·²é¢çº¦ç»è®°ã访客ç¾ç¦»çæä½ |
| | | private List<AppointmentResInfoResponse> designatedResources;// object False æéä¸åæå®çèµæºç¹éå |
| | | private String[] privilegeGroupNames;// string[] False æéç»åç§°éå |
| | | private String identityUri ;//string False è¯ä»¶ç
§,å¾ççç¸å¯¹URL |
| | | private String identitySvrCode ;//string False è¯ä»¶ç
§å¯¹åºå¾çæå¡å¨serviceNodes |
| | | } |
| | |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | public class AppointmentInfoResponse { |
| | | public class AppointmentResInfoResponse { |
| | | |
| | | |
| | | private String appointRecordId ;//string False é¢çº¦è®°å½IDï¼å¯ä½ä¸ºä¿®æ¹é¢çº¦ç便® |
| | | private String receptionistId ;//string False 被访人å¯ä¸æ è¯ |
| | | private String receptionistName ;//string False 被访人å§åï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | | private String receptionistCode ;//string False 被访人æå±ç»ç»ç¼ç |
| | | private String visitStartTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ |
| | | private String visitEndTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ é¢è®¡ç¦»å¼æ¶é´å¿
é¡»æäºå½åæ¶é´åé¢è®¡æ¥è®¿æ¶é´ |
| | | private String visitPurpose ;//string False æ¥è®¿äºç± |
| | | private String visitorName ;//string False 访客å§å |
| | | private String visitorWorkUnit ;//string False æ¥è®¿åä½ |
| | | private String visitorAddress ;//string False 访客ä½å |
| | | private String visitorId ;//string False 访客Id |
| | | private String verificationCode ;//string False 访客éªè¯ç ï¼ç¨äºè®¿å®¢å¨è®¿å®¢æºç»è®°çåè¯ |
| | | private String QRCode ;//string False 卿äºç»´ç ï¼å¦éè¦ä½¿ç¨ï¼å¯å°è®¿å®¢äºç»´ç å
容转æäºç»´ç å¾çå³å¯ |
| | | private Integer gender;// integer False 1-ç·, 2-女 |
| | | private String phoneNo ;//string False èç³»çµè¯å»ºè®®å¡«åææºå·ç ï¼ä»
æ¯æçº¯æ°åã |
| | | private String plateNo ;//string False 访客车çå· |
| | | private Integer certificateType ;// integer False è¯ä»¶ç±»åï¼è¯¦è§éå½A.11 è¯ä»¶ç±»å |
| | | private String certificateNo ;//string False è¯ä»¶å·ï¼æ ¼å¼ä¸ºï¼1~20个æ°åãåæ¯ç»æ |
| | | private String picUri ;//string False è¿åå¾ççç¸å¯¹Uriï¼éè¦è°ç¨è·å访客记å½ä¸çå¾çæ¥å£ï¼æ¥è·åå¾ççæ°æ® |
| | | private String svrIndexCode ;//string False ä¸picUrié
对è¾åºçåæ®µä¿¡æ¯ï¼ç¨äºâè·å访客记å½çå¾çâæ¥å£çè¾å
¥åæ° |
| | | /** |
| | | * 访客åç¶æ, |
| | | * 0:å¾
å®¡æ ¸ã |
| | | * 1ï¼æ£å¸¸ã |
| | | * 2ï¼è¿å°ã |
| | | * 3ï¼å¤±æã |
| | | * 4ï¼å®¡æ ¸éåã |
| | | * 9ï¼å®¡æ ¸å¤±æã |
| | | * 10ï¼é约ä¸ã |
| | | * 11:é约失æ |
| | | */ |
| | | private Integer visitorStatus ;//integer False |
| | | |
| | | |
| | | private String certAddr ;//string False è¯ä»¶å°å |
| | | private String certIssuer ;//string False åè¯æºå
³ |
| | | private Integer nation ;//integer False |
| | | private String birthplace ;//string False ç±è´¯ |
| | | private String orderId ;//string False 访客记å½å¯ä¸æ è¯ï¼ç¨äºå·²é¢çº¦ç»è®°ã访客ç¾ç¦»çæä½ |
| | | private List<Map<String,Object>> designatedResources;// object False æéä¸åæå®çèµæºç¹éå |
| | | private String[] privilegeGroupNames;// string[] False æéç»åç§°éå |
| | | private String identityUri ;//string False è¯ä»¶ç
§,å¾ççç¸å¯¹URL |
| | | private String identitySvrCode ;//string False è¯ä»¶ç
§å¯¹åºå¾çæå¡å¨serviceNodes |
| | | private String paramKey;// string False åæ°ç±»å, é¨ç¦ç¹1 æ¢¯æ§æ¥¼å±2 é¨å£æº3 å´å¢æº4 å车åº5 |
| | | private String[] paramValues;// string[] False 设å¤çindexCodeéå |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OrgListResponse { |
| | | public class OrgInfoResponse { |
| | | |
| | | private String orgIndexCode;// ç»ç»å¯ä¸æ è¯ç ï¼æå¤§é¿åº¦64ï¼ |
| | | private String orgNo ;//string False ç»ç»ç¼å·ï¼æå¤§é¿åº¦64ï¼ |
| | |
| | | private String parentOrgIndexCode;// string False ç¶ç»ç»å¯ä¸æ è¯ç ï¼æå¤§é¿åº¦64ï¼ |
| | | private String parentOrgName;// string False ç¶ç»ç»åç§°ï¼æå¤§é¿åº¦64ï¼ |
| | | private String updateTime;// string False æ´æ°æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08+08:00表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class OrgInfoResponse { |
| | | public class OrgTimeRangeInfoResponse { |
| | | |
| | | private String orgIndexCode;// ç»ç»å¯ä¸æ è¯ç ï¼æå¤§é¿åº¦64ï¼ |
| | | private String orgNo ;//string False ç»ç»ç¼å·ï¼æå¤§é¿åº¦64ï¼ |
| | | private String organizationCode;// string False ç»ç»ç¼ç |
| | | private String orgName;// string False ç»ç»åç§°ï¼æå¤§é¿åº¦64ï¼ å½åç»ç»çåç§°ï¼å¦é»è®¤é¨é¨ |
| | | private String orgPath ;//string False ç»ç»ç®å½ï¼æå¤§é¿åº¦64ï¼ ä¾å¦ï¼é»è®¤é¨é¨/综åå®é²/å¼åå°ç» |
| | | private String parentOrgIndexCode;// string False ç¶ç»ç»å¯ä¸æ è¯ç ï¼æå¤§é¿åº¦64ï¼ |
| | | private String parentOrgName;// string False ç¶ç»ç»åç§°ï¼æå¤§é¿åº¦64ï¼ |
| | | private String updateTime;// string False æ´æ°æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08+08:00表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String parentOrgIndexCode;// -1â代表æ ç¶ç»ç»ï¼å
¶å®ä»£è¡¨è¯¥èµæºç¶ç»ç»å¯ä¸æ è¯ç ï¼ä¾âroot000000â |
| | | |
| | | ++sort number False æ¾ç¤ºé¡ºåº |
| | | ++available boolean False ç¨äºæ è¯ç»ç»èç¹æ¯å¦ææéæä½ï¼trueï¼ææéï¼falseï¼æ æé |
| | | ++leaf boolean False æ è¯ç»ç»èç¹æ¯å¦å¶åèç¹ï¼trueï¼ä¸ºå¶åç»ç¹ï¼falseï¼éå¶åç»ç¹ |
| | | ++createTime string False å建æ¶é´ï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | ++updateTime string False ä¿®æ¹æ¶é´ï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | ++status number False èµæºç¶æï¼å°äº0åä»£è¡¨èµæºå·²è¢«å é¤ï¼0代表ææèµæº |
| | | private Integer sort ;// number False æ¾ç¤ºé¡ºåº |
| | | private Boolean available ;//boolean False ç¨äºæ è¯ç»ç»èç¹æ¯å¦ææéæä½ï¼trueï¼ææéï¼falseï¼æ æé |
| | | private Boolean leaf ;// boolean False æ è¯ç»ç»èç¹æ¯å¦å¶åèç¹ï¼trueï¼ä¸ºå¶åç»ç¹ï¼falseï¼éå¶åç»ç¹ |
| | | private String createTime ;//string False å建æ¶é´ï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | private String updateTime ;// string False ä¿®æ¹æ¶é´ï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | private Integer status ;//number False èµæºç¶æï¼å°äº0åä»£è¡¨èµæºå·²è¢«å é¤ï¼0代表ææèµæº |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class UserListPageResponse { |
| | | public class UserInfoResponse { |
| | | |
| | | private int total;// number False æ¥è¯¢æ°æ®è®°å½æ»æ° |
| | | private int pageSize;// number False æ¯é¡µè®°å½æ»æ° |
| | | private int pageNo ;// number False å½å页ç |
| | | private List<OrgInfoResponse> list ;// object[] False æéç»å¯¹è±¡å表 |
| | | private String personId ;//string False 人åID |
| | | private String personName ;//string False å§å |
| | | private Integer gender ;//number False |
| | | private String orgIndexCode;// string False æå±ç»ç»å¯ä¸æ è¯ç |
| | | private String phoneNo;// string False èç³»çµè¯ |
| | | private String jobNo;// string False å·¥å· |
| | | private Integer certificateType;// number False è¯ä»¶ç±»å111:身份è¯414:æ¤ç
§113:æ·å£ç°¿335:驾驶è¯131:å·¥ä½è¯133:å¦çè¯990:å
¶ä» ; |
| | | private String certificateNo ;//string False è¯ä»¶å·ç ä¸ä¸²æ°åå符串 |
| | | private String createTime ;//string False å建æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String updateTime;// string False æ´æ°æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String orgPath;// string False æå±ç»ç»ç®å½ï¼@è¿è¡åå²ï¼ä¾å¦ @root000000@ |
| | | private String orgPathName;// string False æå±ç»ç»åç§°ï¼@è¿è¡åå²ï¼å¦@é»è®¤é¨é¨@ |
| | | private List<UserPhotoResponse> personPhoto;// object False 人åå¾çä¿¡æ¯ |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class UserInfoResponse { |
| | | |
| | | private String personId ;//string False 人åID |
| | | private String personName ;//string False å§å |
| | | private String gender ;//number False |
| | | private String orgIndexCode;// string False æå±ç»ç»å¯ä¸æ è¯ç |
| | | private String phoneNo;// string False èç³»çµè¯ |
| | | private String jobNo;// string False å·¥å· |
| | | private String certificateType;// number False è¯ä»¶ç±»å |
| | | 111:èº«ä»½è¯ |
| | | 414:æ¤ç
§ |
| | | 113:æ·å£ç°¿ |
| | | 335:é©¾é©¶è¯ |
| | | 131:å·¥ä½è¯ |
| | | 133:å¦çè¯ |
| | | 990:å
¶ä» |
| | | private String certificateNo ;//string False è¯ä»¶å·ç |
| | | ä¸ä¸²æ°åå符串 |
| | | private String createTime ;//string False å建æ¶é´ |
| | | è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 |
| | | 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String updateTime;// string False æ´æ°æ¶é´ |
| | | è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 |
| | | 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String orgPath;// string False æå±ç»ç»ç®å½ï¼@è¿è¡åå²ï¼ä¾å¦ @root000000@ |
| | | private String orgPathName;// string False æå±ç»ç»åç§°ï¼@è¿è¡åå²ï¼å¦@é»è®¤é¨é¨@ |
| | | private String personPhoto;// object False 人åå¾çä¿¡æ¯ |
| | | public class UserPhotoResponse { |
| | | private String personPhotoIndexCode ;//string False 人è¸å¾çå¯ä¸æ 示 |
| | | private String picUri;// string False å¾çç¸å¯¹url, éè¿æå人åå¾çæ¥å£è·åå¾çæ°æ® |
| | | private String serverIndexCode ;//string False å¾çæå¡å¨å¯ä¸æ 示 æå人åå¾çæ¥å£å¿
è¦åæ° |
| | | private String personId ;//string False 人åID |
| | | } |
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class UserInfoResponse { |
| | | public class UserTimeRangeInfoResponse { |
| | | |
| | | private String personId ;//string False 人åID |
| | | private String personName ;//string False å§å |
| | | private Integer gender ;//number False |
| | | private String orgIndexCode;// string False æå±ç»ç»å¯ä¸æ è¯ç |
| | | private String phoneNo;// string False èç³»çµè¯ |
| | | private String jobNo;// string False å·¥å· |
| | | private Integer certificateType;// number False è¯ä»¶ç±»å111:身份è¯414:æ¤ç
§113:æ·å£ç°¿335:驾驶è¯131:å·¥ä½è¯133:å¦çè¯990:å
¶ä» |
| | | private String certificateNo ;//string False è¯ä»¶å·ç ä¸ä¸²æ°åå符串 |
| | | private String createTime ;//string False å建æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String updateTime;// string False æ´æ°æ¶é´ è¦æ±éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08.000+08:00 表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String orgPath;// string False æå±ç»ç»ç®å½ï¼@è¿è¡åå²ï¼ä¾å¦ @root000000@ |
| | | private String orgPathName;// string False æå±ç»ç»åç§°ï¼@è¿è¡åå²ï¼å¦@é»è®¤é¨é¨@ |
| | | private UserPhotoResponse personPhoto;// object False 人åå¾çä¿¡æ¯ |
| | | private String personId ;//string False 人åID |
| | | private String personName;// string False å§å |
| | | private Integer gender;// number False |
| | | private String orgPath ;//string False æå±ç»ç»ç®å½ï¼ä»¥@符å·åå²ï¼å
嫿¬ç»ç»ï¼ä¾å¦@root000000@ |
| | | private String orgPathName;// string False æå±ç»ç»ç®å½åç§°ï¼ä»¥/åé |
| | | private String orgIndexCode;// string False æå±ç»ç»å¯ä¸æ è¯ç |
| | | private Integer certificateType;// number False è¯ä»¶ç±»åï¼åèéå½A æ°æ®åå
¸ |
| | | private String certificateNo;// string False è¯ä»¶å·ç |
| | | private String jobNo;// string False å·¥å· |
| | | private String birthday;// string False åºçæ¥æï¼ä¾"1990-01-01" |
| | | private String phoneNo;// string False èç³»çµè¯ |
| | | private String address;// string False èç³»å°å |
| | | private String email;// string False é®ç®± |
| | | private Integer education ;//number False å¦åï¼è¯¦è§éå½A.12 å¦åç±»å |
| | | private String lastName;// string False 人åå§æ° |
| | | private String givenName;// string False 人ååç§° |
| | | private String job;//string False èä¸ |
| | | private String staffProperty;// string False èå·¥æ§è´¨ |
| | | private String company;// string False å·¥ä½åä½ |
| | | private String employeePost;// string False èä½ |
| | | private String employeeNumber;// string False åå·¥ç¼å· |
| | | private String postType;// string False å²ä½ç±»å« |
| | | private String identityType;// string False 身份类å |
| | | private String nationality;// string False å½ç± |
| | | private Integer nation;// number False |
| | | private String birthplace ;//string False ç±è´¯ |
| | | private String censusRegister;// string False æ·ç± |
| | | private Integer marriaged;// number False å©å§»ç¶åµï¼è¯¦è§éå½A.58 å©å§»ç¶åµ |
| | | private String politicalStatus;// string False æ¿æ²»é¢è² |
| | | private String roomNum;// string False æ¿é´å· |
| | | private String houseHolderRel;// string False 䏿·ä¸»å
³ç³» |
| | | private String studentId;// string False å¦å· |
| | | private String stuStartTime;// string False å¦çå
¥å¦æ¶é´ï¼ä¾"1990-01-01" |
| | | private String stuEndTime;// string False å¦çæ¯ä¸æ¶é´ï¼ä¾"1990-01-01" |
| | | private String stuGrade;// string False 年级 |
| | | private String stuClass;// string False ç级 |
| | | private String academy ;//string False å¦é¢ |
| | | private String profession;// string False å¦çä¸ä¸ |
| | | private String dormitory;// string False å®¿èæ¥¼ |
| | | private Integer lodge;// number False æ¯å¦ä½æ ¡ï¼1:æ¯ï¼2:å¦ |
| | | private String personDesc ;//string False 人åæè¿° |
| | | private Integer syncFlag ;//number False 忥æ å¿ç±»åï¼è¯¦è§éå½A.77 忥æ å¿ç±»å |
| | | private String pinyin ;//string False æ¼é³ |
| | | private String certIssuer ;//string False åè¯æºæ |
| | | private String certAddr ;//string False åè¯å°å |
| | | private String certExpireTime;// string False è¯ä»¶æææ |
| | | private Integer status ;//integer False ç¶æå°äº0åä»£è¡¨èµæºå·²è¢«å é¤ |
| | | private String createTime;// string False å建æ¶é´ï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | private String updateTime;// string False æ´æ°æ¶é´ï¼IOS8601æ ¼å¼ï¼åèéå½B ISO8601æ¶é´æ ¼å¼è¯´æ |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class VehicleInfoResponse { |
| | | |
| | | private String vehicleId ;// string False 车è¾IDï¼æå¤§é¿åº¦64ï¼ |
| | | private String plateNo ;// string False 车çå·ç ï¼æå¤§é¿åº¦64ï¼ |
| | | private Integer isBandPerson ;// number False æ¯å¦å
³è人å |
| | | private String personId ;//string False 人åIDï¼æå¤§é¿åº¦64ï¼ |
| | | private String personName ;// string False 人åå§å |
| | | private Integer plateType ;// number False 车çç±»åï¼è¯¦è§éå½A.14 车çç±»å |
| | | private Integer plateColor ;//number False 车çé¢è²ï¼è¯¦è§éå½A.15 车çé¢è² |
| | | private Integer vehicleType ;//number False 车è¾ç±»åï¼è¯¦è§éå½A.16 车è¾ç±»å |
| | | private Integer vehicleColor ;//number False 车è¾é¢è²ï¼è¯¦è§éå½A.17 车è¾é¢è² |
| | | private String description ;// string False è½¦è¾æè¿° |
| | | private String regionIndexCode ;// string False æå±åºå |
| | | private String regionName ;//string False æå±åºåå |
| | | private String regionPath ;//string False æå±åºåè·¯å¾ï¼@åé |
| | | private String regionPathName ;//string False æå±åºåè·¯å¾åï¼/åé |
| | | private String orgPath ;// string False æå±ç»ç»ç®å½ï¼@åé |
| | | private String orgPathName ;// string False æå±åºåè·¯å¾åï¼/åé |
| | | private String createTime ;// string False å建æ¶é´ 2019-12-11T11:30:51.502+08:00 |
| | | private String updateTime ;// string False ä¿®æ¹æ¶é´ 2019-12-11T11:30:51.502+08:00 |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class VehicleTimeRangeInfoResponse { |
| | | private String vehicleId ;//string False dataId |
| | | private String plateNo ;//string False 车çå·ç |
| | | private Integer isBandPerson;// number False æ¯å¦å
³è人å |
| | | private String personId ;//string False 人åIndexCode |
| | | private Integer plateType ;//number False 车çç±»åï¼è¯¦è§éå½A.14 车çç±»å |
| | | private Integer plateColor ;//number False 车çé¢è²ï¼è¯¦è§éå½A.15 车çé¢è² |
| | | private Integer vehicleType ;//number False 车è¾ç±»åï¼è¯¦è§éå½A.16 车è¾ç±»å |
| | | private Integer vehicleColor;// number False 车è¾é¢è²ï¼è¯¦è§éå½A.17 车è¾é¢è² |
| | | private String description ;//tring False è½¦è¾æè¿° |
| | | private String regionIndexCode ;//string False æå±åºå |
| | | private Integer status;// number False ç¶æç å°äº0åä»£è¡¨èµæºå·²è¢«å é¤ |
| | | private String updateTime ;//string False æ´æ°æ¥æï¼éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08+08:00表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | private String createTime ;//string False åå»ºæ¥æï¼éµå®ISO8601æ åï¼å¦2018-07-26T21:30:08+08:00表示å京æ¶é´2017å¹´7æ26æ¥21æ¶30å08ç§ |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | public class AppointmentInfoResponse { |
| | | private String appointRecordId ;//string False é¢çº¦è®°å½IDï¼å¯ä½ä¸ºä¿®æ¹é¢çº¦ç便® |
| | | private String receptionistId ;//string False 被访人å¯ä¸æ è¯ |
| | | private String receptionistName ;//string False 被访人å§åï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | | private String receptionistCode ;//string False 被访人æå±ç»ç»ç¼ç |
| | | private String visitStartTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ |
| | | private String visitEndTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ é¢è®¡ç¦»å¼æ¶é´å¿
é¡»æäºå½åæ¶é´åé¢è®¡æ¥è®¿æ¶é´ |
| | | private String visitPurpose ;//string False æ¥è®¿äºç± |
| | | private String visitorName ;//string False 访客å§å |
| | | private String visitorWorkUnit ;//string False æ¥è®¿åä½ |
| | | private String visitorAddress ;//string False 访客ä½å |
| | | private String visitorId ;//string False 访客Id |
| | | private String verificationCode ;//string False 访客éªè¯ç ï¼ç¨äºè®¿å®¢å¨è®¿å®¢æºç»è®°çåè¯ |
| | | private String QRCode ;//string False 卿äºç»´ç ï¼å¦éè¦ä½¿ç¨ï¼å¯å°è®¿å®¢äºç»´ç å
容转æäºç»´ç å¾çå³å¯ |
| | | private Integer gender;// integer False 1-ç·, 2-女 |
| | | private String phoneNo ;//string False èç³»çµè¯å»ºè®®å¡«åææºå·ç ï¼ä»
æ¯æçº¯æ°åã |
| | | private String plateNo ;//string False 访客车çå· |
| | | private Integer certificateType ;// integer False è¯ä»¶ç±»åï¼è¯¦è§éå½A.11 è¯ä»¶ç±»å |
| | | private String certificateNo ;//string False è¯ä»¶å·ï¼æ ¼å¼ä¸ºï¼1~20个æ°åãåæ¯ç»æ |
| | | private String picUri ;//string False è¿åå¾ççç¸å¯¹Uriï¼éè¦è°ç¨è·å访客记å½ä¸çå¾çæ¥å£ï¼æ¥è·åå¾ççæ°æ® |
| | | private String svrIndexCode ;//string False ä¸picUrié
对è¾åºçåæ®µä¿¡æ¯ï¼ç¨äºâè·å访客记å½çå¾çâæ¥å£çè¾å
¥åæ° |
| | | /** |
| | | * 访客åç¶æ, |
| | | * 0:å¾
å®¡æ ¸ã |
| | | * 1ï¼æ£å¸¸ã |
| | | * 2ï¼è¿å°ã |
| | | * 3ï¼å¤±æã |
| | | * 4ï¼å®¡æ ¸éåã |
| | | * 9ï¼å®¡æ ¸å¤±æã |
| | | * 10ï¼é约ä¸ã |
| | | * 11:é约失æ |
| | | */ |
| | | private Integer visitorStatus ;//integer False |
| | | private String certAddr ;//string False è¯ä»¶å°å |
| | | private String certIssuer ;//string False åè¯æºå
³ |
| | | private Integer nation ;//integer False |
| | | private String birthplace ;//string False ç±è´¯ |
| | | private String orderId ;//string False 访客记å½å¯ä¸æ è¯ï¼ç¨äºå·²é¢çº¦ç»è®°ã访客ç¾ç¦»çæä½ |
| | | private List<AppointmentResInfoResponse> designatedResources;// object False æéä¸åæå®çèµæºç¹éå |
| | | private String[] privilegeGroupNames;// string[] False æéç»åç§°éå |
| | | private String identityUri ;//string False è¯ä»¶ç
§,å¾ççç¸å¯¹URL |
| | | private String identitySvrCode ;//string False è¯ä»¶ç
§å¯¹åºå¾çæå¡å¨serviceNodes |
| | | public class VisitingInfoResponse { |
| | | |
| | | private String visitorStatus;// number False 5ï¼è¶
æèªå¨ç¾ç¦»6ï¼å·²ç¾ç¦»7ï¼è¶
ææªç¾ç¦»8ï¼å·²å°è¾¾ |
| | | private String visiorGroupId ;//string False 访客åååç»ID |
| | | private String visiorGroupName;// string False 访客åååç»åç§°ï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | | private String orderId ;//string False 访客ç»è®°æ¶çç»è®°idï¼å¯ä»¥ç¨æ¥å访客ç¾ç¦»ãæ¤idå¦è®¿å®¢ç»è®°è¿åçidä¸è´ |
| | | private Integer personNum;// number False æ¥è®¿äººæ°ï¼ä¸å°äº1ï¼ä¸å¤§äº999 |
| | | private String plannedStartTime;// string False é¢è®¡æ¥è®¿æ¶é´ï¼æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ä¾å¦å京æ¶é´ï¼ |
| | | private String plannedEndTime;// string False é¢è®¡ç¦»å¼æ¶é´ï¼æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ä¾å¦å京æ¶é´ï¼ |
| | | private String appointRecordId ;//string False é¢çº¦è®°å½IDï¼å¯ä½ä¸ºä¿®æ¹é¢çº¦ç便® |
| | | private String receptionistId ;//string False 被访人å¯ä¸æ è¯ |
| | | private String receptionistName ;//string False 被访人å§åï¼æ¯æä¸è±æå符ï¼ä¸è½å
å« â / \ : * ? " < > |
| | | private String receptionistCode ;//string False 被访人æå±ç»ç»ç¼ç |
| | | private String visitStartTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ |
| | | private String visitEndTime ;//string False æ¶é´åæ°é满足ISO8601æ ¼å¼ï¼ yyyy-MM-ddTHH:mm:ss+å½åæ¶åºï¼ é¢è®¡ç¦»å¼æ¶é´å¿
é¡»æäºå½åæ¶é´åé¢è®¡æ¥è®¿æ¶é´ |
| | | private String visitPurpose ;//string False æ¥è®¿äºç± |
| | | private String visitorName ;//string False 访客å§å |
| | | private String visitorWorkUnit ;//string False æ¥è®¿åä½ |
| | | private String visitorAddress ;//string False 访客ä½å |
| | | private String visitorId ;//string False 访客Id |
| | | private String verificationCode ;//string False 访客éªè¯ç ï¼ç¨äºè®¿å®¢å¨è®¿å®¢æºç»è®°çåè¯ |
| | | private String QRCode ;//string False 卿äºç»´ç ï¼å¦éè¦ä½¿ç¨ï¼å¯å°è®¿å®¢äºç»´ç å
容转æäºç»´ç å¾çå³å¯ |
| | | private Integer gender;// integer False 1-ç·, 2-女 |
| | | private String phoneNo ;//string False èç³»çµè¯å»ºè®®å¡«åææºå·ç ï¼ä»
æ¯æçº¯æ°åã |
| | | private String plateNo ;//string False 访客车çå· |
| | | private Integer certificateType ;// integer False è¯ä»¶ç±»åï¼è¯¦è§éå½A.11 è¯ä»¶ç±»å |
| | | private String certificateNo ;//string False è¯ä»¶å·ï¼æ ¼å¼ä¸ºï¼1~20个æ°åãåæ¯ç»æ |
| | | private String picUri ;//string False è¿åå¾ççç¸å¯¹Uriï¼éè¦è°ç¨è·å访客记å½ä¸çå¾çæ¥å£ï¼æ¥è·åå¾ççæ°æ® |
| | | private String svrIndexCode ;//string False ä¸picUrié
对è¾åºçåæ®µä¿¡æ¯ï¼ç¨äºâè·å访客记å½çå¾çâæ¥å£çè¾å
¥åæ° |
| | | private String certAddr ;//string False è¯ä»¶å°å |
| | | private String certIssuer ;//string False åè¯æºå
³ |
| | | private Integer nation ;//integer False |
| | | private String birthplace ;//string False ç±è´¯ |
| | | private List<AppointmentResInfoResponse> designatedResources;// object False æéä¸åæå®çèµæºç¹éå |
| | | private String[] privilegeGroupNames;// string[] False æéç»åç§°éå |
| | | private String identityUri ;//string False è¯ä»¶ç
§,å¾ççç¸å¯¹URL |
| | | private String identitySvrCode ;//string False è¯ä»¶ç
§å¯¹åºå¾çæå¡å¨serviceNodes |
| | | } |
| | |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.HKTools; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseRequst; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | |
| | | * è·åæ ¹ç»ç»æ°æ® |
| | | * @return |
| | | */ |
| | | public static BaseResponse<OrgListResponse> getRootOrg(BaseRequst param){ |
| | | public static BaseResponse<OrgInfoResponse> getRootOrg(BaseRequst param){ |
| | | log.info("ãæµ·åº·è·åæ ¹ç»ç»ã================å¼å§===="); |
| | | try { |
| | | String res = HKTools.getRootOrg (); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<OrgListResponse>>(){}; |
| | | BaseResponse<OrgListResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | new TypeReference< BaseResponse<OrgInfoResponse>>(){}; |
| | | BaseResponse<OrgInfoResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康è·åæ ¹ç»ç»"); |
| | | return result; |
| | | }catch (Exception e){ |
| | |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | *æ¥è¯¢è®¿å®¢é¢çº¦è®°å½ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<AppointmentInfoResponse>> appointmentRecords(AppointmentListRequest param){ |
| | | log.info("ãæµ·åº·è®¿å®¢é¢çº¦è®°å½æ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.appointmentRecords(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<AppointmentInfoResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<AppointmentInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康访客é¢çº¦è®°å½æ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·è®¿å®¢é¢çº¦è®°å½æ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *æ¥è¯¢è®¿å®¢æ¥è®¿è®°å½ï¼å·²ç»è®°ï¼ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<VisitingInfoResponse>> visitingRecords(VisitingInfoRequest param){ |
| | | log.info("ãæµ·åº·è®¿å®¢æ¥è®¿è®°å½æ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.visitingRecords(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference<BaseResponse<BaseListPageResponse<VisitingInfoResponse>>>(){}; |
| | | BaseResponse<BaseListPageResponse<VisitingInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康访客æ¥è®¿è®°å½æ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·è®¿å®¢æ¥è®¿è®°å½æ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å
¨éç»ç»æ¥è¯¢ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<OrgInfoResponse>> orgAllList(TimeRangeListRequest param){ |
| | | log.info("ãæµ·åº·å
¨éç»ç»æ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.orgAllList(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<OrgInfoResponse>>> (){}; |
| | | BaseResponse<BaseListPageResponse<OrgInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å
¨éç»ç»æ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å
¨éç»ç»æ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å¢éç»ç»æ¥è¯¢ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<OrgTimeRangeInfoResponse>> orgTimeRangeList(TimeRangeListRequest param){ |
| | | log.info("ãæµ·åº·å¢éç»ç»æ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.orgTimeRangeList(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<OrgTimeRangeInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<OrgTimeRangeInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å¢éç»ç»æ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å¢éç»ç»æ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å
¨éäººåæ¥è¯¢ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<UserInfoResponse>> userAllList(TimeRangeListRequest param){ |
| | | log.info("ãæµ·åº·å
¨éäººåæ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.userAllList(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<UserInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<UserInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å
¨éäººåæ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å
¨éäººåæ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å¢éäººåæ¥è¯¢ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<UserTimeRangeInfoResponse>> userTimeRangeList(TimeRangeListRequest param){ |
| | | log.info("ãæµ·åº·å¢éäººåæ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.userTimeRangeList(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<UserTimeRangeInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<UserTimeRangeInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å¢éäººåæ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å¢éäººåæ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å
¨éè½¦è¾æ¥è¯¢ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<VehicleInfoResponse>> vehicleList(TimeRangeListRequest param){ |
| | | log.info("ãæµ·åº·å
¨éäººåæ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.vehicleList(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<VehicleInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<VehicleInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å
¨éäººåæ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å
¨éäººåæ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *å¢éè½¦è¾æ¥è¯¢ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> vehicleTimeRangeList(TimeRangeListRequest param){ |
| | | log.info("ãæµ·åº·å¢éäººåæ¥è¯¢ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.vehicleTimeRangeList(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> >(){}; |
| | | BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康å¢éäººåæ¥è¯¢"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·å¢éäººåæ¥è¯¢ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | private static void logResult(BaseResponse res,String name) { |
| | | if(StringUtils.equals(res.getCode(),HKConstants.RESPONSE_SUCCEE)){ |
| | | log.info("ã"+name+"ã================æå====\n"+res); |
| | |
| | | public static boolean DEALING_HK_ORG = false; |
| | | public static boolean DEALING_HK_USER = false; |
| | | public static boolean DEALING_HK_VISIT = false; |
| | | public static boolean DEALING_FROM_HK_VISIT = false; |
| | | public static boolean DEALING_HK_EMPOWER = false; |
| | | public static boolean DEALING_HK_EMPOWER_DETAIL = false; |
| | | public static boolean DEALING_HK_EMPOWER_RESULT = false; |
| | |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | * ä¼ å
¥Dataç±»åæ¥æï¼è¿ååç¬¦ä¸²ç±»åæ¶é´ï¼ISO8601æ åæ¶é´ï¼ |
| | | * @param date |
| | | * @return |
| | | */ |
| | | public static String getISO8601Timestamp2(Date date){ |
| | | try { |
| | | TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); |
| | | //TimeZone tz = TimeZone.getTimeZone("GMT-01"); |
| | | DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'+'08:00"); |
| | | df.setTimeZone(tz); |
| | | String nowAsISO = df.format(date); |
| | | return nowAsISO; |
| | | }catch (Exception e){ |
| | | } |
| | | return null; |
| | | } |
| | | public static Date getISO8601DateByStr(String date) { |
| | | TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); |
| | | if(date!=null ){ |
| | |
| | | } |
| | | //TimeZone tz = TimeZone.getTimeZone("GMT-01"); |
| | | DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS"); |
| | | // DateFormat df = new SimpleDateFormat("2023-12-08 T 09:25:54.698+08:00"); |
| | | df.setTimeZone(tz); |
| | | Date nowAsISO = null; |
| | | try { |
| | | nowAsISO = df.parse(date); |
| | | } catch (ParseException e) { |
| | | } |
| | | return nowAsISO; |
| | | } |
| | | public static Date getISO8601DateByStr2(String date) { |
| | | TimeZone tz = TimeZone.getTimeZone("Asia/Shanghai"); |
| | | if(date!=null ){ |
| | | int i = date.indexOf("+"); |
| | | if(i >0){ |
| | | date = date.substring(0,i); |
| | | } |
| | | } |
| | | //TimeZone tz = TimeZone.getTimeZone("GMT-01"); |
| | | DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); |
| | | // DateFormat df = new SimpleDateFormat("2023-12-08 T 09:25:54.698+08:00"); |
| | | df.setTimeZone(tz); |
| | | Date nowAsISO = null; |
| | |
| | | public static void main(String[] args) { |
| | | try { |
| | | System.out.println(RandomStringUtils.randomNumeric(3)); |
| | | Date date = getISO8601DateByStr("2023-02-26T08:59:55.206+08:00"); |
| | | Date date = getISO8601DateByStr("2024-02-21T15:46:36.014+08:00"); |
| | | System.out.println(getISO8601Timestamp(date)); |
| | | |
| | | |
| | | |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "erpæºæä¸»é® ") |
| | | private String erpOrgId; |
| | | @ApiModelProperty(value = "æºæä¸»é® ") |
| | | private String companyId; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Cars; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface CarsMapper extends BaseMapper<Cars> { |
| | | |
| | | void insertBatchSomeColumn(List<Cars> allHkList); |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "人åç±»å") |
| | | @TableField(exist = false) |
| | | private String memberType; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @TableField(exist = false) |
| | |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | @TableField(exist = false) |
| | | private Date endTime; |
| | | @ApiModelProperty(value = "人ååç§° ") |
| | | @TableField(exist = false) |
| | | private String memberName ; |
| | | @ApiModelProperty(value = "ç»è®¡æ°é ") |
| | | @TableField(exist = false) |
| | | private int num ; |
| | | @ApiModelProperty(value = "å°æ¶ ") |
| | | @TableField(exist = false) |
| | | private Integer hour ; |
| | | @ApiModelProperty(value = "人åç¼ç ") |
| | | private Integer memberId ; |
| | | @ApiModelProperty(value = "人åç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2åå·¥") |
| | | @TableField(exist = false) |
| | | private Integer memberType ; |
| | | |
| | | |
| | | @ApiModelProperty(value = "访客å
¬å¸åç§°") |
| | | @TableField(exist = false) |
| | | private String visitCompanyName; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ") |
| | |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | |
| | | @TableField(exist = false) |
| | | private String parentName; |
| | | @ApiModelProperty(value = "海康ä¸çº§ç»ç»") |
| | | @TableField(exist = false) |
| | | private String hkParentId; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | private String companyName; |
| | | @ApiModelProperty(value = "ç»ç»æµ·åº·ç¼ç ") |
| | | @TableField(exist = false) |
| | | private String companyHkId; |
| | | private String hkOrgId; |
| | | @ApiModelProperty(value = "è§è²ç¼ç æ¥è¯¢") |
| | | @TableField(exist = false) |
| | | private String roleIdParam; |
| | |
| | | @ApiModelProperty(value = "å
¬å¸/é¨é¨åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "ç»è®¡æ°é ") |
| | | @TableField(exist = false) |
| | | private int num ; |
| | | } |
| ÎļþÃû´Ó server/dmvisit_service/src/main/java/com/doumee/service/business/ERPSyncService.java ÐÞ¸Ä |
| | |
| | | package com.doumee.service.business; |
| | | package com.doumee.service.business.ext; |
| | | |
| | | import com.doumee.core.erp.model.openapi.request.erp.*; |
| | | import com.doumee.core.erp.model.openapi.response.erp.ApproveInfoResponse; |
| ÎļþÃû´Ó server/dmvisit_service/src/main/java/com/doumee/service/business/HkSyncService.java ÐÞ¸Ä |
| | |
| | | package com.doumee.service.business; |
| | | package com.doumee.service.business.ext; |
| | | |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.request.DoorsListRequest; |
| | |
| | | import com.doumee.core.haikang.model.param.request.event.visit.EventVisitRequest; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * å车åºäºä»¶æ¨éè®°å½è¡¨Serviceå®ä¹ |
| | |
| | | void syncOrgData(); |
| | | |
| | | void syncUserData(); |
| | | void syncVistAppointData(Date date); |
| | | void syncVehicleData(); |
| | | void syncVehicleUpdateData(Date date); |
| | | void syncUserUpdateData(Date start, Date end); |
| | | |
| | | void syncOrgUpdateData(Date start, Date end); |
| | | |
| | | void syncVisitData(); |
| | | void syncEmpowerData(); |
| | |
| | | if(null != carEventExcel && carEventExcel.getRecords().size() > 0) { |
| | | carEventExcel.getRecords().stream().forEach(obj->{ |
| | | CarEventVo vo = new CarEventVo(); |
| | | if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.PARK_LINE_IN.getKey()){ |
| | | vo.setEventTypeName(HKConstants.EventTypes.PARK_LINE_IN.getName()); |
| | | }else if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.PARK_PASS_IN.getKey()){ |
| | | vo.setEventTypeName(HKConstants.EventTypes.PARK_PASS_IN.getName()); |
| | | }else if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.PARK_LINE_OUT.getKey()){ |
| | | vo.setEventTypeName(HKConstants.EventTypes.PARK_LINE_OUT.getName()); |
| | | }else{ |
| | | vo.setEventTypeName(HKConstants.EventTypes.PARK_PASS_OUT.getName()); |
| | | } |
| | | vo.setEventTypeName(HKConstants.EventTypes.getName(obj.getEventType())) ; |
| | | if(null != obj.getPersonType()) { |
| | | if(Constants.ZERO == obj.getPersonType()){ |
| | | vo.setTypeName(Constants.Status.LW_FK.getDes()); |
| | |
| | | MPJLambdaWrapper<CarEvent> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | queryWrapper.leftJoin(Cars.class,Cars::getCode,CarEvent::getPlateNos) |
| | | .leftJoin(Member.class,Member::getId,Cars::getMemberId) |
| | | queryWrapper |
| | | .leftJoin(Member.class,Member::getId,CarEvent::getMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.selectAll(CarEvent.class) |
| | | .selectAs(Member::getType,CarEventDTO::getPersonType) |
| | |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()), |
| | | Company::getName, |
| | | pageWrap.getModel().getCompanyName()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getMemberType()), |
| | | .eq( pageWrap.getModel().getMemberType()!=null, |
| | | Member::getType, |
| | | pageWrap.getModel().getMemberType()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), |
| | |
| | | .ge(Objects.nonNull(pageWrap.getModel().getStartTime()), |
| | | CarEvent::getCreateDate, pageWrap.getModel().getStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getEndTime()), |
| | | CarEvent::getCreateDate, pageWrap.getModel().getEndTime()); |
| | | CarEvent::getCreateDate, pageWrap.getModel().getEndTime()) |
| | | .orderByDesc(CarEvent::getCreateDate); |
| | | IPage<CarEventDTO> carEventDTOIPage = carEventJoinMapper.selectJoinPage(page, CarEventDTO.class, queryWrapper); |
| | | return carEventDTOIPage; |
| | | } |
| | |
| | | Map<String,SystemDictData> dataMap = list.stream().collect(Collectors.toMap(SystemDictData::getLabel, Function.identity())); |
| | | List<CarEventDTO> newDataList = new ArrayList<>(); |
| | | newCarEventDTOList.stream().forEach(obj->{ |
| | | obj.setVehiclePicUrl(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.CAR_EVENT_IMG).getCode() |
| | | +obj.getVehiclePicUrl()); |
| | | if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.PARK_LINE_IN.getKey()){ |
| | | obj.setEventTypeName(HKConstants.EventTypes.PARK_LINE_IN.getName()); |
| | | }else if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.PARK_PASS_IN.getKey()){ |
| | | obj.setEventTypeName(HKConstants.EventTypes.PARK_PASS_IN.getName()); |
| | | }else if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.PARK_LINE_OUT.getKey()){ |
| | | obj.setEventTypeName(HKConstants.EventTypes.PARK_LINE_OUT.getName()); |
| | | }else{ |
| | | obj.setEventTypeName(HKConstants.EventTypes.PARK_PASS_OUT.getName()); |
| | | if(obj.getVehiclePicUrl()!=null |
| | | && !obj.getVehiclePicUrl().startsWith(HKConstants.IMG_INDEX) |
| | | && !obj.getVehiclePicUrl().startsWith(HKConstants.IMG_INDEX_ERROR)){ |
| | | obj.setVehiclePicUrl(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.CAR_EVENT_IMG).getCode() |
| | | +obj.getVehiclePicUrl()); |
| | | } |
| | | if(obj.getPlatePicUrl()!=null |
| | | && !obj.getVehiclePicUrl().startsWith(HKConstants.IMG_INDEX) |
| | | && !obj.getVehiclePicUrl().startsWith(HKConstants.IMG_INDEX_ERROR)){ |
| | | obj.setPlatePicUrl(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.CAR_EVENT_IMG).getCode() |
| | | +obj.getPlatePicUrl()); |
| | | } |
| | | obj.setEventTypeName(HKConstants.EventTypes.getName(obj.getEventType()) ); |
| | | newDataList.add(obj); |
| | | }); |
| | | return newDataList; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | |
| | | |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | |
| | | @Override |
| | | public List<CompanyDTO> findCompanyTreePage(Integer type) { |
| | | //é
ç½®ç»å人åç±»åæ¥æºæ¹å¼ 0èªå»º 1ERP |
| | | String origin = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode(); |
| | | LambdaQueryWrapper<Company> wrapper = new LambdaQueryWrapper<>(); |
| | | |
| | | wrapper.eq(Company::getIsdeleted,Constants.ZERO) |
| | | .eq(Constants.equalsInteger(type,Constants.ONE),Company::getType,type); |
| | | List<Company> companies = companyMapper.selectList(wrapper); |
| | | return getCompanyTree( companies, null,origin); |
| | | return getCompanyTree( companies, null); |
| | | } |
| | | |
| | | |
| | | private List<CompanyDTO> getCompanyTree(List<Company> companies, String parentId,String origin){ |
| | | private List<CompanyDTO> getCompanyTree(List<Company> companies, String parentId){ |
| | | if (CollectionUtils.isEmpty(companies)){ |
| | | return null; |
| | | } |
| | | List<Company> collect = companies.stream() |
| | | .filter(s -> (StringUtils.equals(origin, Constants.ONE+"")?StringUtils.equals(s.getErpParentId(), parentId):StringUtils.equals(s.getParentId()+"", parentId))) |
| | | .collect(Collectors.toList()); |
| | | int origin =Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()); |
| | | List<Company> collect = null; |
| | | if(origin == DataSyncConfig.origin.erp){ |
| | | companies.stream().filter(s -> ( StringUtils.equals(s.getErpParentId()+"", parentId))).collect(Collectors.toList()); |
| | | }else if(origin == DataSyncConfig.origin.hk){ |
| | | companies.stream().filter(s -> ( StringUtils.equals(s.getHkParentId()+"", parentId))).collect(Collectors.toList()); |
| | | }else{ |
| | | companies.stream().filter(s -> ( StringUtils.equals(s.getParentId()+"", parentId))).collect(Collectors.toList()); |
| | | } |
| | | |
| | | if (CollectionUtils.isEmpty(companies)){ |
| | | return null; |
| | | } |
| | |
| | | Company company = collect.get(i); |
| | | CompanyDTO companyDTO = new CompanyDTO(); |
| | | BeanUtils.copyProperties(company,companyDTO); |
| | | companyDTO.setCompanyDTOList(getCompanyTree(companies,StringUtils.equals(origin, Constants.ONE+"")?company.getErpId(): company.getId()+"",origin)); |
| | | String pId = company.getId()+""; |
| | | if(origin == 1){ |
| | | pId = company.getErpId(); |
| | | }else if(origin == 2){ |
| | | pId = company.getHkParentId(); |
| | | } |
| | | companyDTO.setCompanyDTOList(getCompanyTree(companies,pId)); |
| | | companyDTOList.add(companyDTO); |
| | | } |
| | | return companyDTOList; |
| | |
| | | queryWrapper.eq(Company::getType,type); |
| | | List<Company> companyList = companyJoinMapper.selectJoinList(Company.class,queryWrapper); |
| | | //é
ç½®ç»å人åç±»åæ¥æºæ¹å¼ 0èªå»º 1ERP |
| | | String origin = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode(); |
| | | CompanyTree treeBuild = new CompanyTree(companyList,Integer.valueOf(origin)); |
| | | CompanyTree treeBuild = new CompanyTree(companyList, dataSyncConfig.getOrgUserDataOrigin()); |
| | | companyList = treeBuild.buildTree(); |
| | | return companyList; |
| | | } |
| | |
| | | import com.doumee.dao.admin.response.DeviceEventDTO; |
| | | import com.doumee.dao.business.DeviceEventMapper; |
| | | import com.doumee.dao.business.join.DeviceEventJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.dao.business.model.DeviceEvent; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.SystemDictDataMapper; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.vo.DeviceEventVo; |
| | |
| | | }else { |
| | | eventVo.setExtEventInOutName(""); |
| | | } |
| | | if (Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.DOOR_FACE_AUTH_SUCCESS.getKey()) { |
| | | eventVo.setEventTypeName(HKConstants.EventTypes.DOOR_FACE_AUTH_SUCCESS.getName()); |
| | | } else if (Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.DOOR_FACE_AUTH_FAIL.getKey()) { |
| | | eventVo.setEventTypeName(HKConstants.EventTypes.DOOR_FACE_AUTH_FAIL.getName()); |
| | | } |
| | | eventVo.setEventTypeName(HKConstants.EventTypes.getName(obj.getEventType())) ; |
| | | try { |
| | | eventVo.setHappenTime(DateUtil.timeEscape(obj.getHappenTime())); |
| | | } catch (ParseException e) { |
| | |
| | | pageWrap.getModel().getStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getEndTime()), |
| | | DeviceEvent::getCreateDate, |
| | | pageWrap.getModel().getEndTime()); |
| | | pageWrap.getModel().getEndTime()) |
| | | .orderByDesc(DeviceEvent::getCreateDate); |
| | | queryWrapper.orderByDesc(DeviceEvent::getHappenTime); |
| | | IPage<DeviceEventDTO> deviceEventDTOIPage = deviceEventJoinMapper.selectJoinPage(page, DeviceEventDTO.class, queryWrapper); |
| | | return deviceEventDTOIPage; |
| | |
| | | // 对å¾çè¿è¡å¤æå¤ç |
| | | private List<DeviceEventDTO> newDeviceEvent(List<DeviceEventDTO> DeviceEventDTOList) { |
| | | List<DeviceEventDTO> newDeviceEventDTOS = new ArrayList<>(); |
| | | List<String> codes = Arrays.asList(Constants.FTP_RESOURCE_PATH,Constants.DEVICE_EVENT_IMG); |
| | | List<SystemDictData> list = systemDictDataMapper.list(codes); |
| | | for (DeviceEventDTO dto:DeviceEventDTOList) { |
| | | if(StringUtils.isNotBlank(dto.getExtEventPictureURL())) { |
| | | String extEventPictureURL = dto.getExtEventPictureURL(); |
| | | // 使ç¨split("/")å°URLæç
§"/"è¿è¡å岿å¤ä¸ªé¨å |
| | | String[] parts = extEventPictureURL.split("\\\\"); |
| | | String newStr = parts[0]; |
| | | boolean number = Validator.isNumber(newStr); |
| | | if(number) { |
| | | List<String> codes = Arrays.asList(Constants.FTP_RESOURCE_PATH,Constants.DEVICE_EVENT_IMG); |
| | | List<SystemDictData> list = systemDictDataMapper.list(codes); |
| | | if(StringUtils.isNotBlank(dto.getExtEventPictureURL()) |
| | | && !dto.getExtEventPictureURL().startsWith(HKConstants.IMG_INDEX) |
| | | && !dto.getExtEventPictureURL().startsWith(HKConstants.IMG_INDEX_ERROR)) { |
| | | if(null != list && list.size() > 0) { |
| | | Map<String,SystemDictData> dataMap = list.stream().collect(Collectors.toMap(SystemDictData::getLabel, Function.identity())); |
| | | dto.setExtEventPictureURL(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.DEVICE_EVENT_IMG).getCode() |
| | | +dto.getExtEventPictureURL()); |
| | | if(StringUtils.isNotBlank(dto.getExtEventPictureURL())){ |
| | | dto.setExtEventPictureURL(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.DEVICE_EVENT_IMG).getCode() |
| | | +dto.getExtEventPictureURL()); |
| | | } |
| | | } |
| | | }else { |
| | | dto.setExtEventPictureURL(null); |
| | | } |
| | | } |
| | | if(Constants.formatIntegerNum(dto.getEventType()) == HKConstants.EventTypes.DOOR_FACE_AUTH_SUCCESS.getKey()){ |
| | | dto.setEventTypeName(HKConstants.EventTypes.DOOR_FACE_AUTH_SUCCESS.getName()); |
| | | }else if(Constants.formatIntegerNum(dto.getEventType()) == HKConstants.EventTypes.DOOR_FACE_AUTH_FAIL.getKey()){ |
| | | dto.setEventTypeName(HKConstants.EventTypes.DOOR_FACE_AUTH_FAIL.getName()); |
| | | } |
| | | dto.setEventTypeName(HKConstants.EventTypes.getName(dto.getEventType())) ; |
| | | try { |
| | | dto.setHappenTime(DateUtil.timeEscape(dto.getHappenTime())); |
| | | } catch (ParseException e) { |
| | |
| | | IPage<DeviceRole> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<DeviceRole> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(DeviceRole::getId, pageWrap.getModel().getId()); |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(pageWrap.getModel().getType())) { |
| | | if(pageWrap.getModel().getType().length() > 1) { |
| | | String[] types = pageWrap.getModel().getType().split(","); |
| | | queryWrapper.lambda() |
| | | .eq(DeviceRole::getType, types[0]) |
| | | queryWrapper.lambda().and(p-> p.eq(DeviceRole::getType, types[0]) |
| | | .or() |
| | | .eq(DeviceRole::getType, types[1]); |
| | | .eq(DeviceRole::getType, types[1])); |
| | | }else { |
| | | queryWrapper.lambda().eq(DeviceRole::getType, pageWrap.getModel().getType()); |
| | | } |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.response.CarEventDTO; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.MemberCardJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.MemberCard; |
| | | import com.doumee.dao.business.model.Retention; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.service.business.MemberCardService; |
| | | 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.service.business.impl.hksync.HkSyncOrgUserServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ç¨æ·å¡çç»å®ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | } |
| | | CardInfoRequest cr = new CardInfoRequest(); |
| | | cr.setCardNo(memberCard.getCode()); |
| | | cr.setOrgIndexCode(member.getCompanyHkId()); |
| | | cr.setOrgIndexCode(member.getHkOrgId()); |
| | | cr.setPersonId(member.getHkId()); |
| | | cr.setCardType(memberCard.getType()); |
| | | List<CardInfoRequest> cardList = new ArrayList<>(); |
| | |
| | | */ |
| | | private void dealMemberRoleEmpower(Member member ) { |
| | | //å¤çæ°å¢ç人åå¡çæ°æ®ï¼ä¸æµ·åº·åæ¥ï¼ |
| | | List<MemberCard> cards = HkSyncOrgUserServiceImpl.getNormalCardList(member,memberCardMapper); |
| | | HkSyncOrgUserServiceImpl.dealMemberRoleEmpowerDo(cards,member,deviceRoleMapper,empowerMapper,deviceMapper); |
| | | List<MemberCard> cards = HkSyncOrgUserToHKServiceImpl.getNormalCardList(member,memberCardMapper); |
| | | HkSyncOrgUserToHKServiceImpl.dealMemberRoleEmpowerDo(cards,member,deviceRoleMapper,empowerMapper,deviceMapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import cn.hutool.core.util.ReUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.annotation.excel.ExcelImporter; |
| | |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | |
| | | |
| | | @Override |
| | |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | // |
| | | |
| | | } |
| | | |
| | |
| | | .isNotNull(!Objects.isNull(pageWrap.getModel().getHasFace())&&Constants.equalsInteger(pageWrap.getModel().getHasFace(),Constants.ONE),Member::getFaceId) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getCanVisit()),Member::getCanVisit,pageWrap.getModel().getCanVisit()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getStatus()),Member::getStatus,pageWrap.getModel().getStatus()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getErpOrgId()),Member::getErpOrgId,pageWrap.getModel().getErpOrgId()) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | // .eq(Member::getStatus,Constants.Status.ENABLE.getValue()) |
| | | .eq(Member::getType,Constants.memberType.internal) |
| | | .orderByDesc(Member::getCreateDate); |
| | | |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin())==DataSyncConfig.origin.erp){ |
| | | queryWrapper.eq( StringUtils.isNotBlank(pageWrap.getModel().getErpOrgId()),Member::getErpOrgId,pageWrap.getModel().getErpOrgId()); |
| | | }else{ |
| | | queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getCompanyId()),Member::getCompanyId,pageWrap.getModel().getCompanyId()); |
| | | } |
| | | IPage<MemberInfoDTO> memberIPage = memberJoinMapper.selectJoinPage(page, MemberInfoDTO.class,queryWrapper); |
| | | |
| | | if(CollectionUtils.isNotEmpty(memberIPage.getRecords())){ |
| | |
| | | roleIds = roleIds.replace("[","").replace("]",""); |
| | | List<String> ids = Arrays.asList(roleIds.split(",")); |
| | | ids.forEach(i->{ |
| | | DeviceRole deviceRole = deviceRoleList.stream().filter(m->m.getId().toString().equals(i)).findFirst().get(); |
| | | // DeviceRole deviceRole = deviceRoleList.stream().filter(m->m.getId().toString().equals(i)).findFirst().get(); |
| | | DeviceRole deviceRole = findRoleById(deviceRoleList,i); |
| | | if(!Objects.isNull(deviceRole)){ |
| | | stringList.add(deviceRole.getName()); |
| | | } |
| | | }); |
| | | } |
| | | return stringList; |
| | | } |
| | | |
| | | private DeviceRole findRoleById(List<DeviceRole> deviceRoleList, String id) { |
| | | for(DeviceRole role : deviceRoleList){ |
| | | if(StringUtils.equals(role.getId().toString(),id)){ |
| | | return role; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()), ms->ms.like(Member::getVisitCompanyName,pageWrap.getModel().getCompanyName()) |
| | | .or().like(Company::getName,pageWrap.getModel().getCompanyName())) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getIdcardNo()),Member::getIdcardNo,pageWrap.getModel().getIdcardNo()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getErpOrgId()),Member::getErpOrgId,pageWrap.getModel().getErpOrgId()) |
| | | .eq(Objects.isNull(pageWrap.getModel().getStatus()),Member::getStatus,Constants.Status.ENABLE.getValue()) |
| | | .eq(!Objects.isNull(pageWrap.getModel().getStatus()),Member::getStatus,pageWrap.getModel().getStatus()) |
| | | .eq(Member::getType,Constants.memberType.visitor) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(Member::getCreateDate); |
| | | |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin())==DataSyncConfig.origin.erp){ |
| | | queryWrapper.eq( StringUtils.isNotBlank(pageWrap.getModel().getErpOrgId()),Member::getErpOrgId,pageWrap.getModel().getErpOrgId()); |
| | | }else{ |
| | | queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getCompanyId()),Member::getCompanyId,pageWrap.getModel().getCompanyId()); |
| | | } |
| | | IPage<MemberInfoDTO> memberIPage = memberJoinMapper.selectJoinPage(page, MemberInfoDTO.class,queryWrapper); |
| | | return PageData.from(memberIPage); |
| | | |
| | |
| | | |
| | | queryWrapper.leftJoin(" parks p on p.id=t.PARENT_HK_ID"); |
| | | |
| | | queryWrapper.isNotNull(Parks::getParentHkId); |
| | | queryWrapper.eq(Parks::getIsdeleted, Constants.ZERO); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Parks::getName,pageWrap.getModel().getName()); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getParentHkId()),Parks::getName,pageWrap.getModel().getParentHkId()); |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getParentHkId()),Parks::getParentHkId,pageWrap.getModel().getParentHkId()); |
| | | queryWrapper.orderByDesc(Parks::getCreateDate); |
| | | IPage<Parks> result = parksJoinMapper.selectJoinPage(page, Parks.class,queryWrapper); |
| | | return PageData.from(result); |
| | |
| | | eventVo.setPersonCompanyName(obj.getPersonCompanyName()); |
| | | eventVo.setCarNo(obj.getCarNo()); |
| | | eventVo.setBeVisitedPersonName(obj.getBeVisitedPersonName()+"-"+obj.getBeVisitedPersonOrg()); |
| | | if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_IN.getKey()){ |
| | | eventVo.setEventTypeName(HKConstants.EventTypes.VISIT_SIGN_IN.getName()); |
| | | }else if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_OUT.getKey()){ |
| | | eventVo.setEventTypeName(HKConstants.EventTypes.VISIT_SIGN_OUT.getName()); |
| | | } |
| | | eventVo.setEventTypeName(HKConstants.EventTypes.getName(obj.getEventType())); |
| | | eventVo.setHappenTime(obj.getHappenTime()); |
| | | voList.add(eventVo); |
| | | }); |
| | |
| | | Map<String,SystemDictData> dataMap = list.stream().collect(Collectors.toMap(SystemDictData::getLabel, Function.identity())); |
| | | List<VisitEventDTO> newDataList = new ArrayList<>(); |
| | | VisitEventDTOList.stream().forEach(obj->{ |
| | | obj.setCaptureUrl(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.MEMBER_IMG).getCode() |
| | | +obj.getCaptureUrl()); |
| | | if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_IN.getKey()){ |
| | | obj.setEventTypeName(HKConstants.EventTypes.VISIT_SIGN_IN.getName()); |
| | | }else if(Constants.formatIntegerNum(obj.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_OUT.getKey()){ |
| | | obj.setEventTypeName(HKConstants.EventTypes.VISIT_SIGN_OUT.getName()); |
| | | |
| | | if(StringUtils.isNotBlank( obj.getCaptureUrl()) |
| | | && !obj.getCaptureUrl().startsWith(HKConstants.IMG_INDEX) |
| | | && !obj.getCaptureUrl().startsWith(HKConstants.IMG_INDEX_ERROR)) { |
| | | if(null != list && list.size() > 0) { |
| | | obj.setCaptureUrl(dataMap.get(Constants.FTP_RESOURCE_PATH).getCode() |
| | | +dataMap.get(Constants.MEMBER_IMG).getCode() |
| | | +obj.getCaptureUrl()); |
| | | } |
| | | } |
| | | obj.setEventTypeName(HKConstants.EventTypes.getName(obj.getEventType())) ; |
| | | newDataList.add(obj); |
| | | }); |
| | | return newDataList; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | |
| | | import com.doumee.dao.business.join.DeviceEventJoinMapper; |
| | | import com.doumee.dao.business.join.VisitEventJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.Synchronized; |
| | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | |
| | | @Transactional |
| | | @Synchronized |
| | | public String syncCompany(OrgListRequest param){ |
| | | if(!StringUtils.equals(Constants.ONE+"", systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode())){ |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) != DataSyncConfig.origin.erp){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å½å䏿¯æç»ç»åæ¥æä½~"); |
| | | } |
| | | //è·åERPç»ç»ä¿¡æ¯ï¼å
¨éåæ¥ï¼ |
| | |
| | | @Transactional |
| | | @Synchronized |
| | | public String syncUsers(UserListRequest param){ |
| | | if(!StringUtils.equals(Constants.ONE+"", systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ORG_USER_ORIGIN).getCode())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å½å䏿¯æäººå忥æä½~"); |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) != DataSyncConfig.origin.erp){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å½å䏿¯æç»ç»åæ¥æä½~"); |
| | | } |
| | | List<ErpUserListResponse> list = erpTool.getErpUserList(ErpConstants.userListUrl,param); |
| | | if(list !=null && list.size()>0) { |
| | |
| | | import com.doumee.core.haikang.model.param.respose.TaskAdditionResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.service.business.HkSyncService; |
| | | import com.doumee.service.business.ext.HkSyncService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public void syncUserData(){ |
| | | } |
| | | @Override |
| | | public void syncUserUpdateData(Date start, Date end){ |
| | | } |
| | | @Override |
| | | public void syncVistAppointData(Date date){ |
| | | } |
| | | public void syncVehicleData(){ |
| | | } |
| | | @Override |
| | | public void syncVehicleUpdateData(Date date){ |
| | | } |
| | | @Override |
| | | public void syncOrgData( ){ |
| | | } |
| | | @Override |
| | | public void syncOrgUpdateData( Date start, Date end){ |
| | | } |
| | | |
| | | @Override |
| | | public void syncVisitData() { |
| | | } |
| | | @Override |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.FtpUtil; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.CarEvent; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.dao.business.model.DeviceEvent; |
| | | import com.doumee.dao.business.model.VisitEvent; |
| | | import com.doumee.dao.business.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | |
| | | @Autowired |
| | | private CarEventMapper carEventMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private DeviceEventMapper deviceEventMapper; |
| | | @Autowired |
| | |
| | | startDealCarImg(); |
| | | //æ¥è¯¢ææé¨ç¦äºä»¶è®°å½ä¸ææä¸è½½ç海康端 ææç
§ç å 身份è¯å¾çURL |
| | | startDealDeviceImg(); |
| | | //æ¥è¯¢ææäººå人è¸ç
§ç |
| | | startDealMemberImg(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | |
| | | return null; |
| | | } |
| | | |
| | | private void startDealMemberImg() { |
| | | List<Member> list = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .likeRight(Member::getFaceImg,HKConstants.IMG_INDEX)); |
| | | Date date= new Date(); |
| | | if(list !=null && list.size()>0){ |
| | | for(Member model:list){ |
| | | String serverIndex = model.getFaceServerIndexCode();//æå¡å¨ç¼ç |
| | | if(StringUtils.isBlank(serverIndex)){ |
| | | continue; |
| | | } |
| | | String rs1 = null; |
| | | Member event = new Member(); |
| | | event.setId(model.getId()); |
| | | event.setEditDate(date); |
| | | if(StringUtils.isNotBlank(model.getFaceImg())){ |
| | | String img1 = model.getFaceImg().replace(HKConstants.IMG_INDEX_ERROR, "").replace(HKConstants.IMG_INDEX, ""); |
| | | rs1 = downHkImgToFtp(img1,serverIndex,Constants.MEMBER_IMG); |
| | | if(StringUtils.isNotBlank(rs1)){ |
| | | event.setFaceImg(rs1); |
| | | }else{ |
| | | event.setFaceImg(model.getFaceImg().replace(HKConstants.IMG_INDEX, HKConstants.IMG_INDEX_ERROR)); |
| | | } |
| | | } |
| | | memberMapper.updateById(event); |
| | | } |
| | | } |
| | | |
| | | } |
| | | private void startDealDeviceImg() { |
| | | List<DeviceEvent> deviceEventList = deviceEventMapper.selectList(new QueryWrapper<DeviceEvent>().lambda() |
| | | .eq(DeviceEvent::getIsdeleted,Constants.ZERO) |
| | |
| | | param.setPicUri(img1.replace(HKConstants.IMG_INDEX_ERROR,"").replace(HKConstants.IMG_INDEX,"")); |
| | | param.setSvrIndexCode(serverIndex); |
| | | is = HKService.getVisitPicture(param); |
| | | }else if(StringUtils.equals(folder_code,Constants.MEMBER_IMG)){ |
| | | //访客äºä»¶å¾ç |
| | | FacePictureRequest param = new FacePictureRequest(); |
| | | param.setPicUri(img1.replace(HKConstants.IMG_INDEX_ERROR,"").replace(HKConstants.IMG_INDEX,"")); |
| | | param.setServerIndexCode(serverIndex); |
| | | is = HKService.getFaceInputStream(param); |
| | | } |
| | | if(is ==null){ |
| | | return null; |
| | | } |
| | | //TODO------jiangping--------- |
| | | |
| | | try { |
| | | if(ftp == null){ |
| | | ftp = new FtpUtil(systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_HOST).getCode(), |
| | |
| | | ftp.connect(); |
| | | } |
| | | String date = DateUtil.getNowShortDate(); |
| | | String fName = date+"/"+ UUID.randomUUID().toString()+".jpg"; |
| | | String fName = date+"/"+ UUID.randomUUID().toString()+".png"; |
| | | String fileName = folder+fName; |
| | | boolean r = ftp.uploadInputstream(is,fileName);//ä¸ä¼ |
| | | if(r){ |
| | |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.EventSubRequest; |
| | | import com.doumee.core.haikang.model.param.respose.OrgListResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.hikvision.artemis.sdk.config.ArtemisConfig; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 海康äºä»¶è®¢é
表Serviceå®ç° |
| | |
| | | List<Integer> types = new ArrayList<>(); |
| | | types.add(Constants.DOOR_ROLE_TYPE.fk); |
| | | types.add(Constants.DOOR_ROLE_TYPE.lw); |
| | | List<DeviceRole> allList = DeviceRoleMapper.selectList(new QueryWrapper<DeviceRole>().lambda().in(DeviceRole::getType,types)); |
| | | List<DeviceRole> allList = DeviceRoleMapper.selectList(new QueryWrapper<DeviceRole>().lambda().in(DeviceRole::getType,types).eq(DeviceRole::getIsdeleted,Constants.ZERO)); |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | |
| | | model.setHkId(device.getPrivilegeGroupId()); |
| | | model.setName(device.getPrivilegeGroupName()); |
| | | model.setHkStatus(Constants.ONE); |
| | | model.setIsdeleted(Constants.ONE); |
| | | model.setIsdeleted(Constants.ZERO); |
| | | model.setIsDefault(device.getIsDefault()); |
| | | model.setType(String.valueOf(Constants.ZERO)); |
| | | return model; |
| | |
| | | @Autowired |
| | | private InterfaceLogMapper interfaceLogMapper; |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | @Autowired |
| | | private DeviceEventMapper deviceEventMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | |
| | | event.setVehicleColor(request.getData().getVehicleColor()); |
| | | event.setVehicleClass(request.getData().getVehicleClass()); |
| | | event.setTimestr(request.getData().getTime()); |
| | | event.setEventId(request.getEventId()); |
| | | event.setTimeout(request.getTimeout()); |
| | | event.setSvrIndex(request.getSrcIndex()); |
| | | event.setSvrIndex(request.getData().getSvrIndex()); |
| | | event.setSubModel(request.getData().getSubModel()); |
| | | event.setSubLogo(request.getData().getSubLogo()); |
| | | event.setStatus(request.getStatus()); |
| | |
| | | event.setEventCmd(request.getData().getEventCmd()); |
| | | event.setCardNo(request.getData().getCardNo()); |
| | | event.setCarAttributeName(request.getData().getCarAttributeName()); |
| | | |
| | | if(request.getData().getInResult()!=null && request.getData().getInResult().getRlsResult() !=null ){ |
| | | //æ¾è¡æ¹å¼ |
| | | event.setReleaseWay(request.getData().getInResult().getRlsResult().getReleaseWay()); |
| | |
| | | event.setVehiclePicUrl(getHkImgUrl(request.getData().getPicUrl().getVehiclePicUrl())); |
| | | event.setPlatePicUrl(getHkImgUrl(request.getData().getPicUrl().getPlatePicUrl())); |
| | | } |
| | | |
| | | if(StringUtils.isNotBlank(event.getPlateNos())){ |
| | | Cars cars = carsMapper.selectOne(new QueryWrapper<Cars>().lambda() |
| | | .eq(Cars::getCode,event.getPlateNos()) |
| | | .eq(Cars::getIsdeleted,Constants.ONE ) |
| | | .last("limit 1" )); |
| | | if(cars!=null){ |
| | | event.setMemberId(cars.getMemberId()); |
| | | } |
| | | } |
| | | return event; |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business.impl.hksync; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.erp.model.openapi.request.erp.UserFailRequest; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.ImageBase64Util; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.DeviceRoleMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.VisitsMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.DeviceRole; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | @Autowired |
| | | private WxPlatNotice wxPlatNotice; |
| | | /** |
| | | * åæ¥æµ·åº·ç»ç»ä¿¡æ¯,æ ¹æ®erp忥ç»ç»ç»æï¼å®æ¶æ£æ¥éè¦ä¸åå°æµ·åº·çç»ç»ä¿¡æ¯ |
| | | * åæ¥æµ·åº·è®¿å®¢ä¿¡æ¯,æ ¹æ®erp忥ç»ç»ç»æï¼å®æ¶æ£æ¥éè¦ä¸åå°æµ·åº·çç»ç»ä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public void syncVisitData(){ |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.erp.model.openapi.request.erp.UserFailRequest; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.*; |
| | |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class HkSyncOrgUserFERPServiceImpl extends HkSyncBaseServiceImpl { |
| | | public class HkSyncOrgUserToHKServiceImpl extends HkSyncBaseServiceImpl { |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class HkSyncOrgUserForHKServiceImpl extends HkSyncBaseServiceImpl { |
| | | public class HkSyncOrgUserFromHKServiceImpl extends HkSyncBaseServiceImpl { |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | @Autowired |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å½å䏿¯æç»ç»åæ¥æä½~"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | OrgUserListRequest param = new OrgUserListRequest(); |
| | | TimeRangeListRequest param = new TimeRangeListRequest(); |
| | | //è·åERPç»ç»ä¿¡æ¯ï¼å
¨éåæ¥ï¼ |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | |
| | | List<Company> allHkList = new ArrayList<>(); |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | param = new OrgUserListRequest(); |
| | | param = new TimeRangeListRequest(); |
| | | param.setPageNo(curPage); |
| | | param.setPageSize(100); |
| | | BaseResponse<BaseListPageResponse<OrgInfoResponse>> response = HKService.orgAllList(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | if(response.getData() == null || response.getData().getTotal() ==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ä¿¡æ¯ï¼"); |
| | | } |
| | | BaseListPageResponse<OrgInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | |
| | | if(companies == null || companies.size() == 0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼è¯·å
忥ä¼ä¸ç»ç»ä¿¡æ¯~"); |
| | | } |
| | | OrgUserListRequest param = new OrgUserListRequest(); |
| | | TimeRangeListRequest param = new TimeRangeListRequest(); |
| | | //è·åERPç»ç»ä¿¡æ¯ï¼å
¨éåæ¥ï¼ |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | |
| | | List<Member> allHkList = new ArrayList<>(); |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | param = new OrgUserListRequest(); |
| | | param = new TimeRangeListRequest(); |
| | | param.setPageNo(curPage); |
| | | param.setPageSize(100); |
| | | BaseResponse<BaseListPageResponse<UserInfoResponse>> response = HKService.userAllList(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | if(response.getData() == null || response.getData().getTotal() ==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ä¿¡æ¯ï¼"); |
| | | } |
| | | BaseListPageResponse<UserInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl.hksync.fhk; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.AppointmentListRequest; |
| | | import com.doumee.core.haikang.model.param.request.TimeRangeListRequest; |
| | | import com.doumee.core.haikang.model.param.respose.AppointmentInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.VehicleInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.VehicleTimeRangeInfoResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.Cars; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | 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 java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æå海康车è¾ä¿¡æ¯éè¿æ¥Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class HkSyncVehicleFromHKServiceImpl extends HkSyncBaseServiceImpl { |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private ParksMapper parksMapper; |
| | | @Autowired |
| | | private CarsMapper carsMapper; |
| | | @Autowired |
| | | private DataSyncConfig dataSyncConfig; |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void syncVehicleData(){ |
| | | try { |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getVisitorDataOrigin()) != DataSyncConfig.origin.hk){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å½å䏿¯ææµ·åº·æ°æ®åæ¥æä½~"); |
| | | } |
| | | TimeRangeListRequest param = new TimeRangeListRequest(); |
| | | //è·åERPç»ç»ä¿¡æ¯ï¼å
¨éåæ¥ï¼ |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | |
| | | List<Cars> allHkList = new ArrayList<>(); |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | param.setPageNo(curPage); |
| | | param.setPageSize(100); |
| | | BaseResponse<BaseListPageResponse<VehicleInfoResponse>> response = HKService.vehicleList(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | if(response.getData() == null || response.getData().getTotal() ==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ä¿¡æ¯ï¼"); |
| | | } |
| | | BaseListPageResponse<VehicleInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | allHkList.addAll(getNewModelBYList(r.getList())); |
| | | } |
| | | curPage++; |
| | | } |
| | | if(allHkList .size() == 0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ç»ç»ä¿¡æ¯ï¼"); |
| | | } |
| | | //æ¸
空åæçæ°æ® |
| | | carsMapper.delete(new UpdateWrapper<>()); |
| | | carsMapper.insertBatchSomeColumn(allHkList);//æå
¥æ°æ°æ® |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | } |
| | | } |
| | | @Override |
| | | @Transactional |
| | | public void syncVehicleUpdateData(Date date){ |
| | | try { |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getVisitorDataOrigin()) != DataSyncConfig.origin.hk){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å½å䏿¯ææµ·åº·æ°æ®åæ¥æä½~"); |
| | | } |
| | | TimeRangeListRequest param = new TimeRangeListRequest(); |
| | | //è·åERPç»ç»ä¿¡æ¯ï¼å
¨éåæ¥ï¼ |
| | | boolean hasNext = true; |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | Date start =Utils.Date.getStart(date); |
| | | Date end = new Date(); |
| | | if(DateUtil.daysBetweenDates(end,start) >1){ |
| | | end = Utils.Date.getEnd(date); |
| | | } |
| | | param.setStartTime(DateUtil.getISO8601Timestamp2( start)); |
| | | param.setEndTime(DateUtil.getISO8601Timestamp2( end)); |
| | | while (hasNext){ |
| | | //å页éåå¾ªç¯æ¥è¯¢ææé¨ç¦è®¾å¤æ°æ® |
| | | param.setPageNo(curPage); |
| | | param.setPageSize(100); |
| | | BaseResponse<BaseListPageResponse<VehicleTimeRangeInfoResponse>> response = HKService.vehicleTimeRangeList(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | if(response.getData() == null || response.getData().getTotal() ==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ä¿¡æ¯ï¼"); |
| | | } |
| | | BaseListPageResponse<VehicleTimeRangeInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | | if(curTotal >= r.getTotal()){ |
| | | hasNext = false; |
| | | } |
| | | if(r.getList() == null || r.getList().size()==0){ |
| | | hasNext =false; |
| | | }else{ |
| | | dealUpdateByList(r.getList()); |
| | | } |
| | | curPage++; |
| | | } |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | } |
| | | } |
| | | |
| | | private void dealUpdateByList(List<VehicleTimeRangeInfoResponse> list) { |
| | | List<Cars> newList = new ArrayList<>(); |
| | | if(list == null || list.size()==0){ |
| | | return ; |
| | | } |
| | | for(VehicleTimeRangeInfoResponse model :list){ |
| | | if(Constants.formatIntegerNum(model.getStatus()) <0){ |
| | | //妿已å é¤ |
| | | carsMapper.update(null,new UpdateWrapper<Cars>().lambda() |
| | | .eq(Cars::getHkId,model.getVehicleId()) |
| | | .set(Cars::getIsdeleted,Constants.ONE )); |
| | | }else{ |
| | | Cars c = new Cars(); |
| | | c.setHkId(model.getVehicleId()); |
| | | c.setCode(model.getPlateNo()); |
| | | c.setRemark(JSONObject.toJSONString(model)); |
| | | c.setHkStatus(Constants.ONE); |
| | | c.setHkDate(new Date()); |
| | | c.setIsdeleted(Constants.ZERO); |
| | | c.setStatus(Constants.ZERO); |
| | | c.setCreateDate(DateUtil.getISO8601DateByStr(model.getCreateTime())); |
| | | c.setEditDate(DateUtil.getISO8601DateByStr(model.getUpdateTime())); |
| | | if(StringUtils.isNotBlank(model.getPersonId())){ |
| | | //被访é®äºº |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda().eq(Member::getHkId,model.getPersonId()).last("limit 1")); |
| | | c.setMemberId(member!=null?member.getId():null); |
| | | } |
| | | Cars cars = carsMapper.selectOne(new QueryWrapper<Cars>().lambda().eq(Cars::getHkId,model.getVehicleId()).last("limit 1")); |
| | | if(cars!=null){ |
| | | //æ´æ° |
| | | c.setId(cars.getId()); |
| | | carsMapper.updateById(c); |
| | | }else{ |
| | | //æ°å¢ |
| | | carsMapper.insert(c); |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | private List<Cars> getNewModelBYList(List<VehicleInfoResponse> list ) { |
| | | List<Cars> newList = new ArrayList<>(); |
| | | if(list == null || list.size()==0){ |
| | | return newList; |
| | | } |
| | | for(VehicleInfoResponse model :list){ |
| | | Cars c = new Cars(); |
| | | c.setHkId(model.getVehicleId()); |
| | | c.setCode(model.getPlateNo()); |
| | | c.setRemark(JSONObject.toJSONString(model)); |
| | | c.setHkStatus(Constants.ONE); |
| | | c.setHkDate(new Date()); |
| | | c.setIsdeleted(Constants.ZERO); |
| | | c.setCreateDate(c.getHkDate()); |
| | | c.setCreateDate(DateUtil.getISO8601DateByStr(model.getCreateTime())); |
| | | c.setEditDate(DateUtil.getISO8601DateByStr(model.getUpdateTime())); |
| | | if(StringUtils.isNotBlank(model.getPersonId())){ |
| | | //被访é®äºº |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda().eq(Member::getHkId,model.getPersonId()).last("limit 1")); |
| | | c.setMemberId(member!=null?member.getId():null); |
| | | } |
| | | newList.add(c); |
| | | } |
| | | return newList; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.haikang.model.param.BaseListPageResponse; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.AppointmentListRequest; |
| | | import com.doumee.core.haikang.model.param.request.OrgUserListRequest; |
| | | import com.doumee.core.haikang.model.param.respose.AppointmentInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.OrgInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.UserInfoResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.VisitsMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | */ |
| | | @Service |
| | | @Slf4j |
| | | public class HkSyncVistFromHKServiceImpl extends HkSyncBaseServiceImpl { |
| | | public class HkSyncVisitFromHKServiceImpl extends HkSyncBaseServiceImpl { |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | @Autowired |
| | |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public void syncVistAppointData(){ |
| | | if(Constants.DEALING_FROM_HK_VISIT){ |
| | | return ; |
| | | } |
| | | Constants.DEALING_FROM_HK_VISIT =true; |
| | | public void syncVistAppointData(Date date){ |
| | | try { |
| | | if( Constants.formatIntegerNum(dataSyncConfig.getVisitorDataOrigin()) != DataSyncConfig.origin.hk){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "对ä¸èµ·ï¼å½å䏿¯ææµ·åº·æ°æ®åæ¥æä½~"); |
| | |
| | | int curTotal = 0; |
| | | int curPage = 1; |
| | | //æ¥è¯¢ä»å¤©ç |
| | | param.setVisitStartTimeBegin(DateUtil.getISO8601Timestamp( Utils.Date.getStart(new Date()))); |
| | | Date start =Utils.Date.getStart(date); |
| | | Date end = new Date(); |
| | | if(DateUtil.daysBetweenDates(end,start) >1){ |
| | | end = Utils.Date.getEnd(date); |
| | | } |
| | | param.setVisitStartTimeBegin(DateUtil.getISO8601Timestamp2( start)); |
| | | param.setVisitStartTimeEnd(DateUtil.getISO8601Timestamp2( end)); |
| | | |
| | | List<Visits> allHkList = new ArrayList<>(); |
| | | while (hasNext){ |
| | |
| | | param.setPageNo(curPage); |
| | | param.setPageSize(100); |
| | | BaseResponse<BaseListPageResponse<AppointmentInfoResponse>> response = HKService.appointmentRecords(param); |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) ){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | if(response.getData() == null || response.getData().getTotal() ==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ä¿¡æ¯ï¼"); |
| | | } |
| | | BaseListPageResponse<AppointmentInfoResponse> r = response.getData(); |
| | | curTotal += 100; |
| | |
| | | if(allHkList .size() == 0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªåæ¥å°ä»»ä½ç»ç»ä¿¡æ¯ï¼"); |
| | | } |
| | | //æ¸
ç©ºåææ°æ® |
| | | visitsMapper.delete(new UpdateWrapper<Visits>().lambda().apply("to_days(create_date)=to_days(now())" )); |
| | | //æ¸
空åæå½å¤©çæ°æ® |
| | | visitsMapper.delete(new UpdateWrapper<Visits>().lambda() |
| | | .ge(Visits::getStarttime,start) |
| | | .eq(Visits::getType,Constants.ONE) |
| | | .le(Visits::getStarttime,end)); |
| | | visitsMapper.insertBatchSomeColumn(allHkList);//æå
¥æ°æ°æ® |
| | | }catch (BusinessException e){ |
| | | throw e; |
| | | }catch (Exception e){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | }finally { |
| | | Constants.DEALING_FROM_HK_VISIT =false; |
| | | } |
| | | } |
| | | |
| | |
| | | c.setHkDate(new Date()); |
| | | c.setIsdeleted(Constants.ZERO); |
| | | c.setCreateDate(c.getHkDate()); |
| | | c.setStarttime(DateUtil.getISO8601DateByStr(model.getVisitStartTime())); |
| | | c.setEndtime(DateUtil.getISO8601DateByStr(model.getVisitEndTime())); |
| | | c.setStarttime(DateUtil.getISO8601DateByStr2(model.getVisitStartTime())); |
| | | c.setEndtime(DateUtil.getISO8601DateByStr2(model.getVisitEndTime())); |
| | | c.setReason(model.getVisitPurpose()); |
| | | c.setStatus(model.getVisitorStatus()); |
| | | c.setType(Constants.ONE); |
| | |
| | | package com.doumee.service.common.tree; |
| | | |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.dao.business.model.Company; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | // treeNodeï¼æ¥è¯¢åºçæ¯ä¸æ¡æ°æ®ï¼èç¹ï¼ |
| | | for (Company treeNode : nodeList){ |
| | | // 夿å½åèç¹æ¯å¦ä¸ºæ ¹èç¹ï¼æ¤å¤æ³¨æï¼è¥parentIdç±»åæ¯Stringï¼åè¦éç¨equals()æ¹æ³å¤æã |
| | | if(origin==0){ |
| | | if (Objects.isNull(treeNode.getParentId())) { |
| | | if(origin== DataSyncConfig.origin.hk){ |
| | | if (Objects.isNull(treeNode.getHkParentId())) { |
| | | // æ¯ï¼æ·»å |
| | | rootNodeList.add(treeNode); |
| | | } |
| | | }else{ |
| | | }else if(origin== DataSyncConfig.origin.erp){ |
| | | if (Objects.isNull(treeNode.getErpParentId())) { |
| | | // æ¯ï¼æ·»å |
| | | rootNodeList.add(treeNode); |
| | | } |
| | | }else { |
| | | if (Objects.isNull(treeNode.getParentId())) { |
| | | // æ¯ï¼æ·»å |
| | | rootNodeList.add(treeNode); |
| | | } |
| | |
| | | // nodeListï¼ææèç¹éåï¼æææ°æ®ï¼ |
| | | for (Company treeNode : nodeList) { |
| | | // 夿å½åèç¹çç¶èç¹IDæ¯å¦çäºæ ¹èç¹çIDï¼å³å½åèç¹ä¸ºå
¶ä¸çåèç¹ |
| | | |
| | | if(origin==0){ |
| | | if (!Objects.isNull(treeNode.getParentId())&&treeNode.getParentId().equals(pNode.getId())) { |
| | | if(origin==DataSyncConfig.origin.hk){ |
| | | if (!Objects.isNull(treeNode.getHkParentId())&&treeNode.getHkParentId().equals(pNode.getHkId())) { |
| | | // åéå½è¿è¡å¤æå½åèç¹çæ
åµï¼è°ç¨èªèº«æ¹æ³ |
| | | childTree.add(buildChildTree(treeNode)); |
| | | } |
| | | }else{ |
| | | }else if(origin==DataSyncConfig.origin.erp){ |
| | | if (!Objects.isNull(treeNode.getErpParentId())&&treeNode.getErpParentId().equals(pNode.getErpId())) { |
| | | // åéå½è¿è¡å¤æå½åèç¹çæ
åµï¼è°ç¨èªèº«æ¹æ³ |
| | | childTree.add(buildChildTree(treeNode)); |
| | | } |
| | | }else { |
| | | if (!Objects.isNull(treeNode.getParentId())&&treeNode.getParentId().equals(pNode.getId())) { |
| | | // åéå½è¿è¡å¤æå½åèç¹çæ
åµï¼è°ç¨èªèº«æ¹æ³ |
| | | childTree.add(buildChildTree(treeNode)); |
| | | } |
| | | } |
| | | } |
| | | // for循ç¯ç»æï¼å³èç¹ä¸æ²¡æä»»ä½èç¹ï¼æ å½¢æå»ºç»æï¼è®¾ç½®æ ç»æ |
| | |
| | | spring: |
| | | # æ°æ®æºé
ç½® |
| | | datasource: |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8 |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: doumee |
| | | password: rtjgfEr@&0c0m |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | password: 111111 |
| | | |
| | | debug_model: true |
| | | |
| | | ########################åæ¥æ°æ®æ¨¡å¼ ######################## |
| | | data-sync: |
| | | org-user-data-origin: 2 #ç»ç»æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | |
| | | appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ |
| | | |
| | | |
| | | ########################宿¶å¼å¯é
ç½®######################## |
| | | timing: true |
| | | |
| | | des_pwd: 123456SDFKDJF |
| | | |
| | |
| | | spring: |
| | | # æ°æ®æºé
ç½® |
| | | datasource: |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8 |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit_yl?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: doumee |
| | | password: rtjgfEr@&0c0m |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | password: 111111 |
| | | |
| | | debug_model: true |
| | | ########################åæ¥æ°æ®æ¨¡å¼ ######################## |
| | | data-sync: |
| | | org-user-data-origin: 2 #ç»ç»æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |
| | | visitor-data-origin: 2 #è®¿å®¢æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |
| | | need-deal-img: false #æ¯å¦éè¦å¤çå¾çæ°æ® |
| | | |
| | | # Swaggeré
ç½® |
| | | swagger: |
| | |
| | | spring: |
| | | # æ°æ®æºé
ç½® |
| | | datasource: |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8 |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: doumee |
| | | password: rtjgfEr@&0c0m |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ |
| | | |
| | | |
| | | ########################宿¶å¼å¯é
ç½®######################## |
| | | timing: true |
| | | |
| | | des_pwd: 123456SDFKDJF |
| | |
| | | spring: |
| | | # æ°æ®æºé
ç½® |
| | | datasource: |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8 |
| | | url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/dm_visit?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: doumee |
| | | password: rtjgfEr@&0c0m |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | title: ${project.name}æ¥å£ææ¡£ |
| | | description: ${project.name}æ¥å£ææ¡£ |
| | | enabled: true |
| | | context-path: /visit_api |
| | | context-path: /erp_api |
| | | # ç¦ç¨swaggeræ¶çéå®åå°å |
| | | redirect-uri: / |
| | | |
| | | ########################åæ¥æ°æ®æ¨¡å¼ ######################## |
| | | data-sync: |
| | | org-user-data-origin: 1 #ç»ç»æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |
| | | visitor-data-origin: 1 #è®¿å®¢æ°æ® 0èªå»º 2以海康为主 1åæERPç³»ç» |
| | | need-deal-img: true #æ¯å¦éè¦å¤çå¾çæ°æ® |
| | | |
| | | ########################微信æ¯ä»ç¸å
³é
ç½®######################## |
| | | wx: |
| | |
| | | remoteHost: https://apis.map.qq.com |
| | | appKey: 3AYBZ-I5R3V-2BVP3-UWBDQ-ETBM5-B2BBQ |
| | | |
| | | |
| | | ########################宿¶å¼å¯é
ç½®######################## |
| | | timing: true |
| | | |
| | | des_pwd: 123456SDFKDJF |
| | | |
| | |
| | | /** |
| | | * æ¯å¦å¼åè
|
| | | */ |
| | | @Value("${timing}") |
| | | @Value("${debug_model}") |
| | | private Boolean timing; |
| | | |
| | | /** |
| | |
| | | import com.doumee.core.erp.model.openapi.request.*; |
| | | import com.doumee.core.erp.model.openapi.response.*; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.service.business.ERPSyncService; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | # application: |
| | | # name: doumeemes |
| | | profiles: |
| | | active: dev |
| | | active: test |
| | | |
| | | # JSONè¿åé
ç½® |
| | | jackson: |