Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/cars/page', data, { |
| | | return request.post('/business/parkBook/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/cars/create', data) |
| | | return request.post('/business/parkBook/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/cars/updateById', data) |
| | | return request.post('/business/parkBook/updateById', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/cars/delete/${id}`) |
| | | return request.get(`/business/parkBook/delete/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/business/cars/delete/batch', { |
| | | return request.get('/business/parkBook/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // æå±å车åºå表 |
| | | export function findList (data) { |
| | | return request.post('/business/parks/findList', data, { |
| | | trim: true |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/visits/retentionPage', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/business/visits/exportExcel', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/visits/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/business/visits/updateById', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/business/visits/delete/${id}`) |
| | | } |
| | | |
| | | // æ ¹æ®IDæ¥è¯¢ |
| | | export function queryById (id) { |
| | | return request.get(`/business/visits/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/business/visits/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| | |
| | | export function updateLaborConfigDTO (data) { |
| | | return request.post('/system/dictData/updateLaborConfigDTO', data) |
| | | } |
| | | |
| | | // å页æ¥è¯¢ç³»ç»ç¨æ· |
| | | export function findAllList (data) { |
| | | return request.post('/system/user/findAllList', data) |
| | | } |
| | |
| | | <div class="list_item_info" v-if="info">é访车è¾ï¼{{info.carNos}}</div> |
| | | <div class="list_item_table" v-if="info"> |
| | | <el-table |
| | | :data="info.lwWithUserList ? info.lwWithUserList : []" |
| | | :data="info.withUserList ? info.withUserList : []" |
| | | border |
| | | :header-cell-style="{background: '#dcdde2', color: 'rgb(51, 51, 51)'}" |
| | | style="width: 100%"> |
| | |
| | | <el-table-column |
| | | prop="birthday" |
| | | label="å¹´é¾"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{getAge(row.birthday)}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | width="150" |
| | | prop="phone" |
| | | label="ææºå·"> |
| | | </el-table-column> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="idcardNo" |
| | | width="160" |
| | | prop="idcardDecode" |
| | | label="身份è¯å·ç "> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | label="å
¬å¸"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="faceImg" |
| | | width="150" |
| | | label="人è¸ç
§ç"> |
| | | <template slot-scope="{row}"> |
| | | <el-image |
| | | v-if="row.faceImg" |
| | | style="width: 100px; height: 100px" |
| | | :src="info.prefixUrl + row.faceImg" |
| | | :preview-src-list="[info.prefixUrl + row.faceImg]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="imgurl" |
| | | width="150" |
| | | label="å¥åº·è¯"> |
| | | <template slot-scope="{row}"> |
| | | <el-image |
| | | v-if="row.imgurl" |
| | | style="width: 100px; height: 100px" |
| | | :src="info.prefixUrl + row.imgurl" |
| | | :preview-src-list="[info.prefixUrl + row.imgurl]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | getAge (val) { |
| | | if (!val) return '' |
| | | const currentYear = new Date().getFullYear() // å½åç年份 |
| | | const calculationYear = new Date(val).getFullYear() // 计ç®ç年份 |
| | | const wholeTime = currentYear + val.substring(4) // å¨å²æ¶é´ |
| | | const calculationAge = currentYear - calculationYear // æç
§å¹´ä»½è®¡ç®çå¹´é¾ |
| | | // 夿æ¯å¦è¿äºçæ¥ |
| | | if (new Date().getTime() > new Date(wholeTime).getTime()) { |
| | | return calculationAge |
| | | } else { |
| | | return calculationAge - 1 |
| | | } |
| | | }, |
| | | open (title, id) { |
| | | this.title = title |
| | | this.visible = true |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .el-image-viewer__wrapper { |
| | | z-index: 3000 !important; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | | .list { |
| | | width: 100%; |
| | |
| | | const timer2 = Y2 + '-' + M2 + '-' + D2 + ' ' + '00:00:00' // ä¹åç7天æè
30天 |
| | | return [timer2, timer1] |
| | | } |
| | | |
| | | /** |
| | | * æææå¤æ |
| | | * @param startTime å¼å§æ¥æ |
| | | * @param endTime ç»ææ¥æ |
| | | * @returns {string} |
| | | */ |
| | | export function validity (startTime, endTime) { |
| | | if (startTime && endTime) { |
| | | return `${startTime} è³ ${endTime}` |
| | | } else { |
| | | return 'é¿æ' |
| | | } |
| | | } |
| | |
| | | <TableLayout :permissions="['business:member: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 label="å§å/ææºå·" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥å§å/ææºå·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ææºå·" prop="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥å·¥å·" @keypress.enter.native="search"></el-input> |
| | | <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="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥å·¥å·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æä½äººå" prop="code"> |
| | | <el-select v-model="searchForm.code" placeholder="è¯·éæ©"> |
| | | <el-form-item label="æä½äººå" prop="createrId"> |
| | | <el-select v-model="searchForm.createrId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | v-for="item in user" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="人åç±»å" prop="companyId"> |
| | | <el-select v-model="searchForm.code" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | <el-form-item label="人åç±»å" prop="type"> |
| | | <el-select v-model="searchForm.type" placeholder="è¯·éæ©"> |
| | | <el-option label="访客" value="1"></el-option> |
| | | <el-option label="å³å¡" value="0"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <li><el-button type="primary" v-permissions="['business:member:create']">ç§»åº</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:member:create']" @click="thaws">ç§»åº</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | <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="idcard_id" label="身份è¯å·ç " min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcardDecode" label="身份è¯å·ç " min-width="100px"></el-table-column> |
| | | <el-table-column label="人åç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type === 0">å³å¡è®¿å®¢</span> |
| | |
| | | <span v-if="row.type === 2">å
é¨äººå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="company_id" label="å
¬å¸" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="å
¬å¸" min-width="100px"></el-table-column> |
| | | <el-table-column prop="edit_date" label="æä½æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editor" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" v-permissions="['business:member:update']">ç§»åº</el-button> |
| | | <el-button type="text" icon="el-icon-edit" v-permissions="['business:member:update']" @click="thaw(row.id)">ç§»åº</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { findAllList } from '@/api/system/common' |
| | | import { updateRemoveStatusById } from '@/api/business/block' |
| | | export default { |
| | | name: 'blackmailPersonnel', |
| | | extends: BaseTable, |
| | |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | companyId: '', |
| | | companyName: '', |
| | | name: '', |
| | | code: '', |
| | | createrId: '', |
| | | status: 2, |
| | | type: 1 |
| | | type: '1' |
| | | }, |
| | | options: [] |
| | | user: [] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.getUser() |
| | | }, |
| | | methods: { |
| | | thaws () { |
| | | if (this.tableData.selectedRows.length === 0) return this.$message.warning('è³å°éæ©ä¸é¡¹å
容') |
| | | const ids = this.tableData.selectedRows.map(item => { |
| | | return { id: item.id } |
| | | }) |
| | | this.thaw(ids) |
| | | }, |
| | | thaw (ids) { |
| | | this.$confirm('ç¡®å®ç§»é¤æ¤ç¨æ·å?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | updateRemoveStatusById(ids) |
| | | .then(res => { |
| | | this.$message.success('æä½æå') |
| | | this.search() |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | }, |
| | | getUser () { |
| | | findAllList({}) |
| | | .then(res => { |
| | | this.user = res.map(item => { |
| | | return { |
| | | name: item.realname, |
| | | id: item.id |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <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="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥åå·¥å§å/ææºå·" @keypress.enter.native="search"></el-input> |
| | | <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="code"> |
| | | <el-select v-model="value" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <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> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <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 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> |
| | | </ul> |
| | | <el-table |
| | |
| | | > |
| | | <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="code" 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"></el-table-column> |
| | | <el-table-column prop="remark" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="remark" 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"></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'])" |
| | |
| | | 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="$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> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaCarsWindow from '@/components/business/OperaCarsWindow' |
| | | import { validity } from '@/utils/util' |
| | | export default { |
| | | name: 'Cars', |
| | | extends: BaseTable, |
| | |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | code: '' |
| | | }, |
| | | options: [] |
| | | code: '', |
| | | memberName: '', |
| | | companyName: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | <el-table-column prop="isDefault" label="æ¯å¦é»è®¤" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeIsDefault" |
| | | @change="changeIsDefault($event, row.id)" |
| | | v-model="row.isDefault" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | changeIsDefault (r) { |
| | | updateStatusById({ isDefault: r, type: 2 }) |
| | | changeIsDefault (r, id) { |
| | | updateStatusById({ isDefault: r, type: 2, id }) |
| | | .finally(() => { |
| | | this.search() |
| | | }) |
| | |
| | | <TableLayout :permissions="['business:empower:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="å§åææºå·" prop="startTime"> |
| | | <el-input v-model="searchForm.startTime" placeholder="请è¾å
¥å§å/ææºå·" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="å§åææºå·" prop="keyWords"> |
| | | <el-input v-model="searchForm.keyWords" placeholder="请è¾å
¥å§å/ææºå·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åç¶æ" prop="sendStatus"> |
| | | <el-select v-model="searchForm.sendStatus" placeholder="è¯·éæ©"> |
| | | <el-select v-model="searchForm.sendStatus" placeholder="è¯·éæ©" @keypress.enter.native="search"> |
| | | <el-option label="å¾
ä¸å" value="0"></el-option> |
| | | <el-option label="å·²ä¸å" value="1"></el-option> |
| | | <el-option label="已忶" value="2"></el-option> |
| | | <el-option label="ä¸åæå" value="2"></el-option> |
| | | <el-option label="已忶" value="3"></el-option> |
| | | <el-option label="ä¸å失败" value="4"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å
¬å¸" prop="sendStatus"> |
| | | <el-select v-model="searchForm.sendStatus" placeholder="è¯·éæ©å
¬å¸"> |
| | | <el-form-item label="å
¬å¸" prop="companyId"> |
| | | <el-select v-model="searchForm.companyId" placeholder="è¯·éæ©å
¬å¸" @keypress.enter.native="search"> |
| | | <el-option label="å¾
ä¸å" value="0"></el-option> |
| | | <el-option label="å·²ä¸å" value="1"></el-option> |
| | | <el-option label="已忶" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åèµ·å§æ¶é´" prop="startTime"> |
| | | <el-input v-model="searchForm.startTime" placeholder="请è¾å
¥é¨ç¦æææå¼å§" @keypress.enter.native="search"></el-input> |
| | | <el-date-picker |
| | | @change="seleTime" |
| | | v-model="time" |
| | | @keypress.enter.native="search" |
| | | type="datetimerange" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-radio-group v-model="searchForm.eventType" size="small"> |
| | | <el-radio-button label="å½å¤©"></el-radio-button> |
| | | <el-radio-button label="è¿7天"></el-radio-button> |
| | | <el-radio-button label="è¿30天"></el-radio-button> |
| | | <el-radio-group v-model="searchForm.radio" size="small" @input="changeRadio"> |
| | | <el-radio-button label="0">å½å¤©</el-radio-button> |
| | | <el-radio-button label="1">è¿7天</el-radio-button> |
| | | <el-radio-button label="2">è¿30天</el-radio-button> |
| | | </el-radio-group> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <!-- <el-button type="primary" :loading="isWorking.export" v-permissions="['business:member: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:empower:create', 'business:empower:delete']"> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']">导åº</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']">ç«å³ä¸å</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:empower:create']">åæ¶ä¸å</el-button></li> |
| | | <!-- <li><el-button type="primary" v-permissions="['business:empower:create']">ç«å³ä¸å</el-button></li>--> |
| | | <!-- <li><el-button type="primary" v-permissions="['business:empower:create']">åæ¶ä¸å</el-button></li>--> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { timeForMat } from '@/utils/util' |
| | | export default { |
| | | name: 'Empower', |
| | | extends: BaseTable, |
| | |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | keyWords: '', |
| | | companyId: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | sendStatus: '' |
| | | } |
| | | sendStatus: '', |
| | | radio: null |
| | | }, |
| | | time: [] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | changeRadio (e) { |
| | | if (e === '0') { |
| | | this.searchForm.startTime = timeForMat(1)[0] |
| | | this.searchForm.endTime = timeForMat(1)[1] |
| | | this.time = timeForMat(1) |
| | | } else if (e === '1') { |
| | | this.searchForm.startTime = timeForMat(7)[0] |
| | | this.searchForm.endTime = timeForMat(7)[1] |
| | | this.time = timeForMat(7) |
| | | } else if (e === '2') { |
| | | this.searchForm.startTime = timeForMat(30)[0] |
| | | this.searchForm.endTime = timeForMat(30)[1] |
| | | this.time = timeForMat(30) |
| | | } |
| | | this.search() |
| | | }, |
| | | seleTime (e) { |
| | | this.searchForm.startTime = e[0] |
| | | this.searchForm.endTime = e[1] |
| | | this.searchForm.radio = null |
| | | this.search() |
| | | }, |
| | | reset () { |
| | | this.$refs.searchForm.resetFields() |
| | | this.searchForm.startTime = '' |
| | | this.searchForm.endTime = '' |
| | | this.time = [] |
| | | this.searchForm.radio = null |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <li><el-button type="primary" v-permissions="['business:member:create']">è§£å»</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:member:create']" @click="thaws()">è§£å»</el-button></li> |
| | | <li><el-button type="primary" :loading="isWorking.export" v-permissions="['business:member:exportExcel']" @click="exportExcel">导åº</el-button></li> |
| | | </ul> |
| | | <el-table |
| | |
| | | > |
| | | <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="companyId" label="é¨é¨" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="é¨é¨" min-width="100px"></el-table-column> |
| | | <el-table-column prop="code" label="å·¥å·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="visitsLastDate" label="æå䏿¬¡é¨ç¦æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="userActionType1" label="å»ç»æ¶é´" min-width="100px"></el-table-column> |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" v-permissions="['business:member:update']">è§£å»</el-button> |
| | | <el-button type="text" @click="thaw([{id: row.id}])" icon="el-icon-edit" v-permissions="['business:member:update']">è§£å»</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '人åä¿¡æ¯è¡¨', |
| | | module: 'å»ç»äººå', |
| | | api: '/business/block', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | |
| | | this.getfindCompanyTreePage() |
| | | }, |
| | | methods: { |
| | | thaws () { |
| | | if (this.tableData.selectedRows.length === 0) return this.$message.warning('è³å°éæ©ä¸é¡¹å
容') |
| | | const ids = this.tableData.selectedRows.map(item => { |
| | | return { id: item.id } |
| | | }) |
| | | this.thaw(ids) |
| | | }, |
| | | thaw (ids) { |
| | | this.$confirm('ç¡®å®è§£å»æ¤ç¨æ·å?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | updateRemoveStatusById(ids) |
| | | .then(res => { |
| | | this.$message.success('æä½æå') |
| | | this.search() |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }) |
| | | }, |
| | | changeCompanyId (e) { |
| | | this.searchForm.companyId = e[e.length - 1] |
| | | }, |
| | |
| | | getfindCompanyTreePage () { |
| | | findCompanyTreePage(1) |
| | | .then(res => { |
| | | console.log(res) |
| | | this.options = res |
| | | // this.search() |
| | | }) |
| | | } |
| | | } |
| | |
| | | getData () { |
| | | getLaborConfigDTO({}) |
| | | .then(res => { |
| | | this.form.id = res.id |
| | | this.form.checkVisit = res.LaborConfigParam.checkVisit |
| | | this.form.checkVisit = res.laborConfigParam.checkVisit |
| | | this.form.description = res.description |
| | | this.form.healthCard = res.LaborConfigParam.healthCard |
| | | this.form.isAnswer = res.LaborConfigParam.isAnswer |
| | | this.form.reservationWay = res.LaborConfigParam.reservationWay |
| | | this.form.healthCard = res.laborConfigParam.healthCard |
| | | this.form.isAnswer = res.laborConfigParam.isAnswer |
| | | this.form.reservationWay = res.laborConfigParam.reservationWay |
| | | this.form.theme = res.theme |
| | | }) |
| | | }, |
| | | submit () { |
| | | updateLaborConfigDTO({ |
| | | LaborConfigParam: { |
| | | laborConfigParam: { |
| | | isAnswer: this.form.isAnswer, |
| | | healthCard: this.form.healthCard, |
| | | checkVisit: this.form.checkVisit, |
| | |
| | | <TableLayout :permissions="['business:member:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="å车åºåç§°" prop="title"> |
| | | <el-input v-model="searchForm.title" placeholder="请è¾å
¥å车åºåç§°" @keypress.enter.native="search"></el-input> |
| | | <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="title"> |
| | | <el-select v-model="searchForm.title" placeholder="è¯·éæ©"> |
| | | <el-form-item label="æå±å车åº" prop="parentHkId"> |
| | | <el-select v-model="searchForm.parentHkId" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | v-for="item in list" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column prop="createDate" label="å车åºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æå±å车åº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="æ´æ°æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="å车åºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parentName" label="æå±å车åº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parkCreateDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="parkEditDate" label="æ´æ°æ¶é´" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { findList } from '@/api/business/parks' |
| | | export default { |
| | | name: 'Parks', |
| | | extends: BaseTable, |
| | |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | title: '' |
| | | name: '', |
| | | parentHkId: '' |
| | | }, |
| | | options: [] |
| | | list: [] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.getfindList() |
| | | }, |
| | | methods: { |
| | | getfindList () { |
| | | findList({}) |
| | | .then(res => { |
| | | this.list = res |
| | | console.log(res) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <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="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥å·¥å·" @keypress.enter.native="search"></el-input> |
| | | <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="code"> |
| | | <el-select v-model="searchForm.code" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç¨æ·ç±»å" prop="companyId"> |
| | | <el-select v-model="searchForm.code" placeholder="è¯·éæ©"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | <el-form-item label="ç¨æ·ç±»å" prop="type"> |
| | | <el-select v-model="searchForm.type" placeholder="è¯·éæ©"> |
| | | <el-option label="访客" value="1"></el-option> |
| | | <el-option label="å³å¡" value="0"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']"> |
| | | <li><el-button type="primary" v-permissions="['business:member:create']">离åº</el-button></li> |
| | | </ul> |
| | | <!-- <ul class="toolbar" v-permissions="['business:member:create', 'business:member:delete']">--> |
| | | <!-- <li><el-button type="primary" v-permissions="['business:member:create']" @click="thaws">离åº</el-button></li>--> |
| | | <!-- </ul>--> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <!-- <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="company_id" label="å
¬å¸" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyName" label="å
¬å¸" min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¨æ·ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type === 0">å³å¡è®¿å®¢</span> |
| | |
| | | <span v-if="row.type === 2">å
é¨äººå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="idcard_id" label="å
¥åºæ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="edit_date" label="ææå°ææ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcard_id" label="è¶
æ¶æ¶é¿" min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcard_id" label="ç¶æ" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editor" 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" |
| | | > |
| | | <el-table-column prop="inDate" label="å
¥åºæ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="endtime" label="ææå°ææ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="timeOut" label="è¶
æ¶æ¶é¿" min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" icon="el-icon-edit" v-permissions="['business:member:update']">离å</el-button> |
| | | <span v-if="row.outStatus === 0">æªè¶
æ¶</span> |
| | | <span v-else-if="row.timeOut === 1">å·²è¶
æ¶</span> |
| | | <span v-else-if="row.timeOut === 2">å³å°è¶
æ¶</span> |
| | | </template> |
| | | </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" icon="el-icon-edit" v-permissions="['business:member:update']" @click="thaw(row.id)">离å</el-button>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import { findAllList } from '@/api/system/common' |
| | | export default { |
| | | name: 'strandedPersonnel', |
| | | extends: BaseTable, |
| | |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | companyId: '', |
| | | companyName: '', |
| | | name: '', |
| | | code: '', |
| | | status: 2, |
| | | type: 1 |
| | | type: '1' |
| | | }, |
| | | options: [] |
| | | user: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: '人åä¿¡æ¯è¡¨', |
| | | api: '/business/member', |
| | | api: '/business/strandedPersonnel', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.getUser() |
| | | }, |
| | | methods: { |
| | | // thaws () { |
| | | // if (this.tableData.selectedRows.length === 0) return this.$message.warning('è³å°éæ©ä¸é¡¹å
容') |
| | | // const ids = this.tableData.selectedRows.map(item => { |
| | | // return { id: item.id } |
| | | // }) |
| | | // this.thaw(ids) |
| | | // }, |
| | | // thaw (ids) { |
| | | // this.$confirm('ç¡®å®ç§»é¤æ¤ç¨æ·å?', 'æç¤º', { |
| | | // confirmButtonText: 'ç¡®å®', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning' |
| | | // }).then(() => { |
| | | // // updateRemoveStatusById(ids) |
| | | // // .then(res => { |
| | | // // this.$message.success('æä½æå') |
| | | // // this.search() |
| | | // // }) |
| | | // }).catch(() => { |
| | | // |
| | | // }) |
| | | // }, |
| | | getUser () { |
| | | findAllList({}) |
| | | .then(res => { |
| | | this.user = res.map(item => { |
| | | return { |
| | | name: item.realname, |
| | | id: item.id |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <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="phone" label="æ§å«" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="æ§å«" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.sex === 1">ç·</span> |
| | | <span v-if="row.sex === 2">女</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="è¯ä»¶ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.idcardType === 0">身份è¯</span> |
| | |
| | | <span v-if="row.idcardType === 2">æ¤ç
§</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="idcardNo" label="身份è¯å·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcardDecode" label="身份è¯å·" width="150px"></el-table-column> |
| | | <el-table-column prop="companyName" label="å
¬å¸" min-width="100px"></el-table-column> |
| | | <el-table-column prop="visitTimes" label="æè®¿æ¬¡æ°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="visitsCount" label="æè®¿æ¬¡æ°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="lastVisitDate" label="æåæè®¿æ¶é´" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | |
| | | getData () { |
| | | getVisitConfigDTO({}) |
| | | .then(res => { |
| | | this.form.id = res.id |
| | | this.form.checkVisit = res.VisitConfigParam.checkVisit |
| | | this.form.checkVisit = res.visitConfigParam.checkVisit |
| | | this.form.description = res.description |
| | | this.form.healthCard = res.VisitConfigParam.healthCard |
| | | this.form.isAnswer = res.VisitConfigParam.isAnswer |
| | | this.form.reservationWay = res.VisitConfigParam.reservationWay |
| | | this.form.healthCard = res.visitConfigParam.healthCard |
| | | this.form.isAnswer = res.visitConfigParam.isAnswer |
| | | this.form.reservationWay = res.visitConfigParam.reservationWay |
| | | this.form.theme = res.theme |
| | | }) |
| | | }, |
| | | submit () { |
| | | updateVisitConfig({ |
| | | VisitConfigParam: { |
| | | visitConfigParam: { |
| | | isAnswer: this.form.isAnswer, |
| | | healthCard: this.form.healthCard, |
| | | checkVisit: this.form.checkVisit, |
| | |
| | | <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> |
| | | <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 v-if="row.visitsList && row.visitsList.length > 0">{{row.visitsList.length}}</span> |
| | | <span>0</span> |
| | | <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>0</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" fixed="right" label="ç¶æ" min-width="100px"> |
| | |
| | | <el-table-column |
| | | v-if="containPermissions(['business:visits:update', 'business:visits:delete'])" |
| | | label="æä½" |
| | | min-width="190" |
| | | 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> |
| | | <!-- <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:visits:delete']">æ¥è¯¢å®¡æ¹ç»æ</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | proxy: { |
| | | [process.env.VUE_APP_API_PREFIX]: { |
| | | // http://192.168.0.130:10013 |
| | | // 192.168.0.110:10013 192.168.0.110:10013 |
| | | // 192.168.0.110:10013 |
| | | // http://192.168.0.101:10013 |
| | | // http://192.168.0.132:10013 |
| | | // http://192.168.0.132:10013 任康 |
| | | // http://192.168.0.110:10013 ç£ç£ |
| | | // http://192.168.0.133:10013 å¸
å¥ |
| | | target: 'http://192.168.0.132:10013', |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.admin.response.CarEventDTO; |
| | | import com.doumee.dao.business.model.CarEvent; |
| | | import com.doumee.dao.system.vo.CarEventVo; |
| | | import com.doumee.service.business.CarEventService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @PostMapping("/exportExcel") |
| | | //@RequiresPermissions("business:carevent:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<CarEvent> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(CarEvent.class).exportWithFirstAndEnd (carEventService.findPage(pageWrap).getRecords(),"å车åºäºä»¶æ¨éè®°å½è¡¨", null, "å车åºäºä»¶æ¨éè®°å½å¯¼åºæ¥è¡¨",null , response); |
| | | ExcelExporter.build(CarEventVo.class).exportWithFirstAndEnd (carEventService.findPageExcel(pageWrap),"å车åºäºä»¶æ¨éè®°å½è¡¨", null, "å车åºäºä»¶æ¨éè®°å½å¯¼åºæ¥è¡¨",null , response); |
| | | // ExcelExporter.build(CarEvent.class).export(carEventService.findPage(pageWrap).getRecords(), "å车åºäºä»¶æ¨éè®°å½è¡¨", response); |
| | | } |
| | | |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.admin.response.DeviceEventDTO; |
| | | import com.doumee.dao.business.model.DeviceEvent; |
| | | import com.doumee.dao.system.vo.DeviceEventVo; |
| | | import com.doumee.service.business.DeviceEventService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @PostMapping("/exportExcel") |
| | | //@RequiresPermissions("business:deviceevent:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<DeviceEvent> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(DeviceEvent.class).export(deviceEventService.findPage(pageWrap).getRecords(), "é¨ç¦äºä»¶æ¨éè®°å½è¡¨", response); |
| | | ExcelExporter.build(DeviceEventVo.class).export(deviceEventService.findDeviceEventExcel(pageWrap), "é¨ç¦äºä»¶æ¨éè®°å½è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:membercard:create") |
| | | //@RequiresPermissions("business:membercard:create") |
| | | public ApiResponse create(@RequestBody MemberCard memberCard) { |
| | | return ApiResponse.success(memberCardService.create(memberCard)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:membercard:delete") |
| | | //@RequiresPermissions("business:membercard:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | memberCardService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:membercard:delete") |
| | | //@RequiresPermissions("business:membercard:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:membercard:update") |
| | | //@RequiresPermissions("business:membercard:update") |
| | | public ApiResponse updateById(@RequestBody MemberCard memberCard) { |
| | | memberCardService.updateById(memberCard); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æå¤±/è§£ææä½") |
| | | @PostMapping("/batchUpdate") |
| | | //@RequiresPermissions("business:membercard:update") |
| | | public ApiResponse batchUpdate(@RequestBody List<MemberCard> memberCards) { |
| | | memberCardService.updateByIdInBatch(memberCards); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("é塿ä½") |
| | | @PostMapping("/refundCard") |
| | | //@RequiresPermissions("business:membercard:update") |
| | | public ApiResponse refundCard(@RequestBody MemberCard memberCard) { |
| | | memberCardService.updateRefundCard(memberCard); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:membercard:query") |
| | | //@RequiresPermissions("business:membercard:query") |
| | | public ApiResponse<PageData<MemberCard>> findPage (@RequestBody PageWrap<MemberCard> pageWrap) { |
| | | return ApiResponse.success(memberCardService.findPage(pageWrap)); |
| | | } |
| | |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(memberCardService.findById(id)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®æ¡ä»¶æ¥è¯¢å¯ç¨å¡å·") |
| | | @PostMapping("/queryCard") |
| | | //@RequiresPermissions("business:membercard:query") |
| | | public ApiResponse<List<MemberCard>> queryCard () { |
| | | MemberCard card = new MemberCard(); |
| | | return ApiResponse.success(memberCardService.findList(card)); |
| | | } |
| | | |
| | | } |
| | |
| | | return ApiResponse.success(memberService.findUnusualPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®ç±»åæ¥è¯¢äººåä¿¡æ¯") |
| | | @PostMapping("/findTypeMemberInfo") |
| | | //@RequiresPermissions("business:member:query") |
| | | public ApiResponse<List<Member>> findTypeMemberInfo (@RequestBody Member member) { |
| | | return ApiResponse.success(memberService.findList(member)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.admin.response.VisitEventDTO; |
| | | import com.doumee.dao.business.model.VisitEvent; |
| | | import com.doumee.dao.system.vo.VisitEventVo; |
| | | import com.doumee.service.business.VisitEventService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @PostMapping("/exportExcel") |
| | | //@RequiresPermissions("business:visitevent:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<VisitEvent> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(VisitEvent.class).export(visitEventService.findPage(pageWrap).getRecords(), "访客äºä»¶æ¨éè®°å½è¡¨", response); |
| | | ExcelExporter.build(VisitEventVo.class).export(visitEventService.findPageExcel(pageWrap), "访客äºä»¶æ¨éè®°å½è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å¡ç¶æ |
| | | */ |
| | | public enum CardStatus { |
| | | |
| | | DISABLE(0, "ç¦ç¨"), |
| | | ENABLE(1, "å¯ç¨"), |
| | | REFUNDCARD(2, "éå¡"), |
| | | LOSS(3, "æå¤±"), |
| | | |
| | | /** å¡ç±»å **/ |
| | | IC(1,"ICå¡"), |
| | | CPU(2,"CPUå¡"), |
| | | YJLCARD(3,"è¿è·ç¦»å¡"), |
| | | MCARD(4,"Må¡"); |
| | | |
| | | // æååé |
| | | private String name; |
| | | private int key; |
| | | |
| | | // æé æ¹æ³ |
| | | CardStatus(int key, String name ) { |
| | | this.name = name; |
| | | this.key = key; |
| | | } |
| | | |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | public static final String ERP_USERSTATUS_RL ="ERP_USERSTATUS_RL" ; |
| | | public static final String ERP ="ERP" ; |
| | | public static final Integer THREE =3 ; |
| | | public static final Integer FOUR =4 ; |
| | | public static final String ORG_USER_ORIGIN = "ORG_USER_ORIGIN"; |
| | | public static boolean DEALING_HK_SYNCPRIVILEGE= false; |
| | | public static boolean DEALING_HK_SYNCDEVICE = false; |
| | |
| | | public static final String WX_PLATFORM_ACCESS_TOKEN = "WX_PLATFORM_ACCESS_TOKEN"; |
| | | public static final String WX_PLATFORM_APPID = "WX_PLATFORM_APPID"; |
| | | public static final String WX_PLATFORM_SECRET = "WX_PLATFORM_SECRET"; |
| | | public static final String WX_PLATFORM_AUDIT_VISIT = "WX_PLATFORM_AUDIT_VISIT"; |
| | | public static final String WX_PLATFORM_PREFIX = "WX_PLATFORM_PREFIX"; |
| | | |
| | | |
| | | |
| | |
| | | /** ç¨æ·ç±»å **/ |
| | | LW_FK(0,"å³å¡è®¿å®¢"), |
| | | PT_FK(1,"æ®é访客"), |
| | | NB_FK(2,"å
é¨äººå"); |
| | | NB_FK(2,"å
é¨äººå"), |
| | | |
| | | /** è¿åºç±»å **/ |
| | | OUT(0,"åº"), |
| | | IN(1,"è¿"); |
| | | |
| | | private Integer value; |
| | | private String des; |
| | |
| | | package com.doumee.core.wx; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; |
| | | import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; |
| | | import com.doumee.config.mybatis.SpringUtils; |
| | | import com.github.binarywang.wxpay.config.WxPayConfig; |
| | | import com.github.binarywang.wxpay.constant.WxPayConstants; |
| | | import com.github.binarywang.wxpay.service.WxPayService; |
| | | import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | //import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | //import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; |
| | | //import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; |
| | | //import com.doumee.config.mybatis.SpringUtils; |
| | | //import com.github.binarywang.wxpay.config.WxPayConfig; |
| | | //import com.github.binarywang.wxpay.constant.WxPayConstants; |
| | | //import com.github.binarywang.wxpay.service.WxPayService; |
| | | //import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; |
| | | //import org.apache.commons.lang3.StringUtils; |
| | | //import org.springframework.beans.factory.annotation.Autowired; |
| | | //import org.springframework.context.annotation.Configuration; |
| | | // |
| | | //import javax.annotation.PostConstruct; |
| | | |
| | | /** |
| | | * 微信å°ç¨åºç»ä»¶ |
| | | */ |
| | | @Configuration |
| | | //@Configuration |
| | | public class WxMiniConfig { |
| | | /********微信å°ç¨åºæå¡**********/ |
| | | public static WxMaService wxMaService; |
| | | /********微信å°ç¨åºæ¯ä»**********/ |
| | | public static WxPayService wxPayService; |
| | | /********微信APPæ¯ä»**********/ |
| | | public static WxPayService wxAppPayService; |
| | | |
| | | |
| | | @Autowired |
| | | private WxPayProperties wxPayProperties; |
| | | |
| | | public static WxMiniConfig me() { |
| | | return SpringUtils.get().getBean(WxMiniConfig.class); |
| | | } |
| | | |
| | | @PostConstruct |
| | | void init() { |
| | | this.load_WxMaService(); |
| | | // this.load_wxPayService(); |
| | | // this.load_wxAppPayService(); |
| | | } |
| | | /** |
| | | * åå§å微信å°ç¨åº |
| | | */ |
| | | public void load_WxMaService() { |
| | | WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); |
| | | config.setAppid(StringUtils.trimToNull(wxPayProperties.getAppId())); |
| | | config.setSecret(StringUtils.trimToNull(wxPayProperties.getAppSecret())); |
| | | config.setMsgDataFormat("JSON"); |
| | | //config.setToken(""); |
| | | //config.setAesKey(""); |
| | | WxMaService wxMaService = new WxMaServiceImpl(); |
| | | wxMaService.setWxMaConfig(config); |
| | | this.wxMaService = wxMaService; |
| | | } |
| | | // /********微信å°ç¨åºæå¡**********/ |
| | | // public static WxMaService wxMaService; |
| | | // /********微信å°ç¨åºæ¯ä»**********/ |
| | | // public static WxPayService wxPayService; |
| | | // /********微信APPæ¯ä»**********/ |
| | | // public static WxPayService wxAppPayService; |
| | | // |
| | | // |
| | | // @Autowired |
| | | // private WxPayProperties wxPayProperties; |
| | | // |
| | | // public static WxMiniConfig me() { |
| | | // return SpringUtils.get().getBean(WxMiniConfig.class); |
| | | // } |
| | | // |
| | | // @PostConstruct |
| | | // void init() { |
| | | // this.load_WxMaService(); |
| | | //// this.load_wxPayService(); |
| | | //// this.load_wxAppPayService(); |
| | | // } |
| | | // /** |
| | | // * åå§å微信å°ç¨åº |
| | | // */ |
| | | // public void load_WxMaService() { |
| | | // WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); |
| | | // config.setAppid(StringUtils.trimToNull(wxPayProperties.getAppId())); |
| | | // config.setSecret(StringUtils.trimToNull(wxPayProperties.getAppSecret())); |
| | | // config.setMsgDataFormat("JSON"); |
| | | // //config.setToken(""); |
| | | // //config.setAesKey(""); |
| | | // WxMaService wxMaService = new WxMaServiceImpl(); |
| | | // wxMaService.setWxMaConfig(config); |
| | | // this.wxMaService = wxMaService; |
| | | // } |
| | | |
| | | /** |
| | | * åå§å微信å°ç¨åºæ¯ä» |
| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.utils.ID; |
| | | import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; |
| | | import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest; |
| | | import com.github.binarywang.wxpay.bean.result.WxPayRefundResult; |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | //import com.github.binarywang.wxpay.bean.request.BaseWxPayRequest; |
| | | //import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest; |
| | | //import com.github.binarywang.wxpay.bean.result.WxPayRefundResult; |
| | | //import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | @Slf4j |
| | | public class WxMiniUtilService { |
| | | |
| | | |
| | | /** |
| | | * 订åå¾®ä¿¡éæ¬¾ |
| | | * orderNo:åæ·è®¢åå· |
| | | * totalPriceï¼è®¢åæ»éé¢ |
| | | * refundPriceï¼é款éé¢ |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public static String wxRefund(String orderNo, BigDecimal totalPrice, BigDecimal refundPrice) { |
| | | try { |
| | | // åé鿬¾è¯·æ± |
| | | String refNum = ID.nextGUID(); |
| | | WxPayRefundRequest request = new WxPayRefundRequest(); |
| | | request.setOutTradeNo(orderNo); |
| | | request.setOutRefundNo(refNum); |
| | | // request.setTotalFee(2); |
| | | // request.setRefundFee(1); |
| | | request.setTotalFee(BaseWxPayRequest.yuanToFen(totalPrice.toString())); |
| | | request.setRefundFee(BaseWxPayRequest.yuanToFen(refundPrice.toString())); |
| | | WxPayRefundResult response = WxMiniConfig.wxPayService.refund(request); |
| | | if ("SUCCESS".equals(response.getReturnCode()) && "SUCCESS".equals(response.getResultCode())) { |
| | | return refNum; |
| | | } else { |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),response.getErrCode() + response.getErrCodeDes()); |
| | | } |
| | | } catch (WxPayException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鿬¾åçå¼å¸¸è¯·è系管çå"); |
| | | } |
| | | // |
| | | // /** |
| | | // * 订åå¾®ä¿¡éæ¬¾ |
| | | // * orderNo:åæ·è®¢åå· |
| | | // * totalPriceï¼è®¢åæ»éé¢ |
| | | // * refundPriceï¼é款éé¢ |
| | | // */ |
| | | // @Transactional(rollbackFor = Exception.class) |
| | | // public static String wxRefund(String orderNo, BigDecimal totalPrice, BigDecimal refundPrice) { |
| | | // try { |
| | | // // åé鿬¾è¯·æ± |
| | | // String refNum = ID.nextGUID(); |
| | | // WxPayRefundRequest request = new WxPayRefundRequest(); |
| | | // request.setOutTradeNo(orderNo); |
| | | // request.setOutRefundNo(refNum); |
| | | // // request.setTotalFee(2); |
| | | // // request.setRefundFee(1); |
| | | // request.setTotalFee(BaseWxPayRequest.yuanToFen(totalPrice.toString())); |
| | | // request.setRefundFee(BaseWxPayRequest.yuanToFen(refundPrice.toString())); |
| | | // WxPayRefundResult response = WxMiniConfig.wxPayService.refund(request); |
| | | // if ("SUCCESS".equals(response.getReturnCode()) && "SUCCESS".equals(response.getResultCode())) { |
| | | // return refNum; |
| | | // } else { |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),response.getErrCode() + response.getErrCodeDes()); |
| | | // } |
| | | // } catch (WxPayException e) { |
| | | // e.printStackTrace(); |
| | | // } |
| | | // throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鿬¾åçå¼å¸¸è¯·è系管çå"); |
| | | // } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | package com.doumee.core.wx.wxPlat; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.utils.Constants; |
| | | import me.chanjar.weixin.mp.api.WxMpService; |
| | | import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; |
| | | import me.chanjar.weixin.mp.config.WxMpConfigStorage; |
| | | import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/27 9:30 |
| | | */ |
| | | @Configuration |
| | | public class WxPlatConfig { |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Bean |
| | | public WxMpConfigStorage wxMpConfigStorage() { |
| | | WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl(); |
| | | // å
¬ä¼å·appId |
| | | configStorage.setAppId(systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_APPID).getCode()); |
| | | // å
¬ä¼å·appSecret |
| | | configStorage.setSecret(systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_SECRET).getCode()); |
| | | // å
¬ä¼å·Token |
| | | configStorage.setToken(systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_ACCESS_TOKEN).getCode()); |
| | | // å
¬ä¼å·EncodingAESKey |
| | | // configStorage.setAesKey(); |
| | | return configStorage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 声æå®ä¾ |
| | | * |
| | | * @return |
| | | */ |
| | | @Bean |
| | | public WxMpService wxMpService() { |
| | | WxMpService wxMpService = new WxMpServiceImpl(); |
| | | wxMpService.setWxMpConfigStorage(wxMpConfigStorage()); |
| | | return wxMpService; |
| | | } |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.wx.wxPlat; |
| | | |
| | | import com.doumee.dao.business.model.Visits; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import me.chanjar.weixin.mp.api.WxMpService; |
| | | import me.chanjar.weixin.mp.bean.template.WxMpTemplateData; |
| | | import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·éç¥ |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/27 9:19 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class WxPlatNotice { |
| | | |
| | | /** |
| | | * 微信å
¬ä¼å·APIçService |
| | | */ |
| | | private final WxMpService wxMpService; |
| | | |
| | | public WxPlatNotice(WxMpService wxMpService) { |
| | | this.wxMpService = wxMpService; |
| | | } |
| | | |
| | | /** |
| | | * 访客记å½å®¡æ¹ä¸å¡éç¥ |
| | | */ |
| | | public Boolean sendVisitAuditTemplateNotice(Visits visits,String prefix,String tempId){ |
| | | if(StringUtils.isBlank(visits.getOpenid())){ |
| | | return false; |
| | | } |
| | | WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() |
| | | .toUser(visits.getOpenid()) |
| | | .templateId(tempId) |
| | | .url(prefix + "pages/appointmentDetails/appointmentDetails?id="+visits.getId()) |
| | | .build(); |
| | | String thing1 = "å¾
审æ¹"; |
| | | if(visits.getStatus()==2){ |
| | | thing1 = "å®¡æ ¸éè¿"; |
| | | }else if(visits.getStatus()==3){ |
| | | thing1 = "å®¡æ ¸ä¸éè¿"; |
| | | } |
| | | // æ·»å æ¨¡æ¿æ°æ® |
| | | templateMessage.addData(new WxMpTemplateData("thing1", thing1)) |
| | | .addData(new WxMpTemplateData("thing2", visits.getName())) |
| | | .addData(new WxMpTemplateData("phone_number6", visits.getPhone())); |
| | | String msgId = null; |
| | | try { |
| | | // å鿍¡æ¿æ¶æ¯ |
| | | msgId = wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | log.warn("·==++--·æ¨é微信模æ¿ä¿¡æ¯ï¼{}·--++==·", msgId != null ? "æå" : "失败"); |
| | | return msgId != null; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private String personPhone; |
| | | |
| | | @ApiModelProperty(value = "人åç±»å") |
| | | private String personType; |
| | | private Integer personType; |
| | | |
| | | @ApiModelProperty(value = "人å身份è¯å·") |
| | | private String personIdcardDecode; |
| | |
| | | private String personPhone; |
| | | |
| | | @ApiModelProperty(value = "人åç±»å") |
| | | private String personType; |
| | | private Integer personType; |
| | | |
| | | @ApiModelProperty(value = "人å身份è¯å·") |
| | | private String personIdcardDecode; |
| | |
| | | @ApiModelProperty(value = "ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "访客åç§°") |
| | | @ApiModelProperty(value = "访客åç§°/å
é¨äººååç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "æ§å«") |
| | |
| | | @ApiModelProperty(value = "è¯ä»¶ç¾åæºå
³") |
| | | private String signOrg; |
| | | |
| | | @ApiModelProperty(value = "ç¦»å¼æ¶é´") |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | private String startTime; |
| | | |
| | | @ApiModelProperty(value = "ææºå·ç ") |
| | | @ApiModelProperty(value = "ç¦»å¼æ¶é´") |
| | | private String endTime; |
| | | |
| | | @ApiModelProperty(value = "车çå·") |
| | |
| | | @ExcelColumn(name="ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "访客åç§°") |
| | | @ApiModelProperty(value = "访客åç§°/å
é¨äººå") |
| | | @ExcelColumn(name="访客åç§°") |
| | | private String name; |
| | | |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date hkDate; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0ç¦ç¨ 1å¯ç¨") |
| | | @ExcelColumn(name="ç¶æ 0ç¦ç¨ 1å¯ç¨") |
| | | @ApiModelProperty(value = "ç¶æ 0ç¦ç¨ 1å¯ç¨ 2éå¡ 3æå¤±") |
| | | @ExcelColumn(name="ç¶æ 0ç¦ç¨ 1å¯ç¨ 2éå¡ 3æå¤±") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0ç¦ç¨ 1å¯ç¨ 2éå¡ 3æå¤±") |
| | | @TableField(exist = false) |
| | | private String statusName; |
| | | |
| | | @ApiModelProperty(value = "å¡ç±»å 1 ICå¡ 2 CPUå¡ 3è¿è·ç¦»å¡ 4Må¡ -- å端æ°å¢ä¼ å¼åæ»") |
| | | @ExcelColumn(name="å¡ç±»å 1 ICå¡ 2 CPUå¡ 3è¿è·ç¦»å¡ 4Må¡") |
| | | private Integer cardType; |
| | | |
| | | @ApiModelProperty(value = "å¡ç±»ååç§°") |
| | | @TableField(exist = false) |
| | | private String cardTypeName; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå", example = "1") |
| | | @ExcelColumn(name="ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå", example = "1") |
| | | @ExcelColumn(name="ç±»å 0å³å¡è®¿å®¢ 1æ®é访客 2å
é¨äººå") |
| | | private String typeName; |
| | | |
| | | @ApiModelProperty(value = "å
³é®å") |
| | | @TableField(exist = false) |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.vo; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("车è¾äºä»¶è§å¾") |
| | | public class CarEventVo { |
| | | |
| | | @ApiModelProperty(value = "车çå·") |
| | | @ExcelColumn(name="车çå·") |
| | | private String plateNos; |
| | | |
| | | @ApiModelProperty(value = "人åç±»å") |
| | | @ExcelColumn(name="å½å±ç¨æ·ç±»å") |
| | | private String typeName; |
| | | |
| | | @ApiModelProperty(value = "å§å") |
| | | @ExcelColumn(name="å§å") |
| | | private String personName; |
| | | |
| | | @ApiModelProperty(value = "ææºå·") |
| | | @ExcelColumn(name="ææºå·") |
| | | private String personPhone; |
| | | |
| | | @ApiModelProperty(value = "人åç»ç»å
¬å¸") |
| | | @ExcelColumn(name="å
¬å¸/é¨é¨") |
| | | private String personCompanyName; |
| | | |
| | | @ApiModelProperty(value = "å车åºåç§°") |
| | | @ExcelColumn(name="å车åºåç§°") |
| | | private String parkName; |
| | | |
| | | @ApiModelProperty(value = "åºå
¥å£åç§°") |
| | | @ExcelColumn(name="åºå
¥å£åç§°") |
| | | private String gateName; |
| | | |
| | | @ApiModelProperty(value = "äºä»¶ç±»ååç§°") |
| | | @ExcelColumn(name="äºä»¶ç±»å") |
| | | private String eventTypeName; |
| | | |
| | | @ApiModelProperty(value = "è¿åºåºç±»åï¼0ï¼è¿åºï¼1ï¼åºåº ", example = "1") |
| | | @ExcelColumn(name="åºå
¥ç±»å") |
| | | private Integer inoutType; |
| | | |
| | | @ApiModelProperty(value = "äºä»¶åçæ¶é´ï¼è®¾å¤æ¶é´") |
| | | @ExcelColumn(name="äºä»¶æ¶é´") |
| | | private String happenTime; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.vo; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("é¨ç¦åºå
¥äºä»¶") |
| | | public class DeviceEventVo { |
| | | |
| | | @ApiModelProperty(value = "人åç±»å") |
| | | @ExcelColumn(name = "人åç±»å") |
| | | private String personTypeName; |
| | | |
| | | @ApiModelProperty(value = "人ååç§°") |
| | | @ExcelColumn(name = "å§å") |
| | | private String personName; |
| | | |
| | | @ApiModelProperty(value = "ææºå·") |
| | | @ExcelColumn(name = "ææºå·") |
| | | private String personPhone; |
| | | |
| | | @ApiModelProperty(value = "身份è¯å·ç ") |
| | | @ExcelColumn(name = "身份è¯å·ç ") |
| | | private String personIdcardDecode; |
| | | |
| | | @ApiModelProperty(value = "å
¬å¸/ç»ç»") |
| | | @ExcelColumn(name = "å
¬å¸/ç»ç»") |
| | | private String personCompanyName; |
| | | |
| | | @ApiModelProperty(value = "é¨ç¦åç§°") |
| | | @ExcelColumn(name = "é¨ç¦åç§°") |
| | | private String devName; |
| | | |
| | | @ApiModelProperty(value = "é¨ç¦ç¹åç§°") |
| | | @ExcelColumn(name = "é¨ç¦ç¹åç§°") |
| | | private String srcName; |
| | | |
| | | @ApiModelProperty(value = "äºä»¶ç±»ååç§°") |
| | | @ExcelColumn(name = "äºä»¶ç±»å") |
| | | private String eventTypeName; |
| | | |
| | | @ApiModelProperty(value = "è¿åºæ¹å 1-è¿ 0-åº -1:æªç¥ è¦æ±ï¼è¿é¨è¯»å¡å¨æ¨ç 设置为1ï¼åºé¨è¯»å¡å¨æ¨ç 设置为2") |
| | | @ExcelColumn(name = "åºå
¥ç±»å") |
| | | private String extEventInOutName; |
| | | |
| | | @ApiModelProperty(value = "äºä»¶åçæ¶é´ï¼è®¾å¤æ¶é´") |
| | | @ExcelColumn(name = "äºä»¶æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private String happenTime; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.vo; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("访客åºå
¥äºä»¶è§å¾") |
| | | public class VisitEventVo { |
| | | |
| | | @ApiModelProperty(value = "å§å") |
| | | @ExcelColumn(name="å§å") |
| | | private String personName; |
| | | |
| | | @ApiModelProperty(value = "ææºå·") |
| | | @ExcelColumn(name = "ææºå·") |
| | | private String personPhone; |
| | | |
| | | @ApiModelProperty(value = "è¯ä»¶å· ") |
| | | @ExcelColumn(name = "身份è¯å·ç ") |
| | | private String idNo; |
| | | |
| | | @ApiModelProperty(value = "人åç»ç»å
¬å¸") |
| | | @ExcelColumn(name = "å
¬å¸") |
| | | private String personCompanyName; |
| | | |
| | | @ApiModelProperty(value = "车çå·") |
| | | @ExcelColumn(name = "车çå·") |
| | | private String carNo; |
| | | |
| | | @ApiModelProperty(value = "被访é®äººæå±ç»ç»") |
| | | private String beVisitedPersonOrg; |
| | | |
| | | @ApiModelProperty(value = "被访é®äººå§å") |
| | | @ExcelColumn(name = "被访人") |
| | | private String beVisitedPersonName; |
| | | |
| | | @ApiModelProperty(value = "äºä»¶ç±»ååç§°") |
| | | @ExcelColumn(name = "äºä»¶ç±»å") |
| | | private String eventTypeName; |
| | | |
| | | @ApiModelProperty(value = "äºä»¶åçæ¶é´ï¼è®¾å¤æ¶é´") |
| | | @ExcelColumn(name = "äºä»¶æ¶é´") |
| | | private String happenTime; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.web.response; |
| | | |
| | | import com.doumee.dao.business.model.Visits; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/12/7 11:19 |
| | | */ |
| | | @Data |
| | | public class VisitDetailVO { |
| | | |
| | | @ApiModelProperty(value = "审æ¹ç¶æ") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "被访人åç§°") |
| | | private String visitUserName; |
| | | |
| | | @ApiModelProperty(value = "æè®¿äºç±") |
| | | private String visitReason; |
| | | |
| | | @ApiModelProperty(value = "车è¾ä¿¡æ¯") |
| | | private String carNos; |
| | | |
| | | @ApiModelProperty(value = "é¨ç¦ç»åç§°") |
| | | private List<String> doorGroupName; |
| | | |
| | | @ApiModelProperty(value = "æè®¿æ¶é´") |
| | | private String visitTime; |
| | | |
| | | @ApiModelProperty(value = "é访人åä¿¡æ¯") |
| | | private List<Visits> withVisitsList; |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.admin.request.VisitEventQuery; |
| | | import com.doumee.dao.admin.response.CarEventDTO; |
| | | import com.doumee.dao.business.model.CarEvent; |
| | | import com.doumee.dao.system.vo.CarEventVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return PageData<CarEvent> |
| | | */ |
| | | PageData<CarEventDTO> findVisitCarPage(PageWrap<CarEvent> pageWrap); |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<CarEventVo> |
| | | */ |
| | | List<CarEventVo> findPageExcel(PageWrap<CarEvent> pageWrap); |
| | | } |
| | |
| | | import com.doumee.dao.admin.request.DeviceEventQuery; |
| | | import com.doumee.dao.admin.response.DeviceEventDTO; |
| | | import com.doumee.dao.business.model.DeviceEvent; |
| | | import com.doumee.dao.system.vo.DeviceEventVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return PageData<DeviceEvent> |
| | | */ |
| | | PageData<DeviceEventDTO> findDeviceEventDTOPage(PageWrap<DeviceEvent> pageWrap); |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<DeviceEventVO> |
| | | */ |
| | | List<DeviceEventVo> findDeviceEventExcel(PageWrap<DeviceEvent> pageWrap); |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.MemberCard; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | MemberCard findById(Integer id); |
| | | |
| | | void updateRefundCard(MemberCard memberCard); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | |
| | | * @return long |
| | | */ |
| | | long count(MemberCard memberCard); |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.admin.request.VisitEventQuery; |
| | | import com.doumee.dao.admin.response.VisitEventDTO; |
| | | import com.doumee.dao.business.model.VisitEvent; |
| | | import com.doumee.dao.system.vo.VisitEventVo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | PageData<VisitEventDTO> findVisitPage(PageWrap<VisitEvent> pageWrap); |
| | | |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<VisitEventVo> |
| | | */ |
| | | List<VisitEventVo> findPageExcel(PageWrap<VisitEvent> pageWrap); |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.web.response.VisitDetailVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return long |
| | | */ |
| | | long count(Visits visits); |
| | | |
| | | /** |
| | | * 访客记å½è¯¦æ
- 微信å
¬ä¼å· |
| | | * @param id |
| | | * @return |
| | | */ |
| | | VisitDetailVO getVisitDetail(Integer id); |
| | | } |
| | |
| | | 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.CarEventVo; |
| | | import com.doumee.service.business.CarEventService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | |
| | | @Override |
| | | public PageData<CarEventDTO> findVisitCarPage(PageWrap<CarEvent> pageWrap) { |
| | | IPage<CarEventDTO> carEventDTOIPage = getDataInfo(pageWrap); |
| | | if(null != carEventDTOIPage && carEventDTOIPage.getRecords().size() > 0) { |
| | | carEventDTOIPage.setRecords(newCarEventDTO(carEventDTOIPage.getRecords())); |
| | | } |
| | | return PageData.from(carEventDTOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public List<CarEventVo> findPageExcel(PageWrap<CarEvent> pageWrap) { |
| | | IPage<CarEventDTO> carEventExcel = getDataInfo(pageWrap); |
| | | List<CarEventVo> newDataList = new ArrayList<>(); |
| | | 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()); |
| | | } |
| | | if(null != obj.getPersonType()) { |
| | | if(Constants.ZERO == obj.getPersonType()){ |
| | | vo.setTypeName(Constants.Status.LW_FK.getDes()); |
| | | }else if(Constants.ONE == obj.getPersonType()) { |
| | | vo.setTypeName(Constants.Status.PT_FK.getDes()); |
| | | }else { |
| | | vo.setTypeName(Constants.Status.NB_FK.getDes()); |
| | | } |
| | | }else { |
| | | vo.setTypeName(""); |
| | | } |
| | | vo.setPlateNos(obj.getPlateNos()); |
| | | vo.setPersonName(obj.getPersonName()); |
| | | vo.setPersonPhone(obj.getPersonPhone()); |
| | | vo.setPersonCompanyName(obj.getPersonCompanyName()); |
| | | vo.setParkName(obj.getParkName()); |
| | | vo.setGateName(obj.getGateName()); |
| | | vo.setInoutType(obj.getInoutType()); |
| | | vo.setHappenTime(obj.getHappenTime()); |
| | | newDataList.add(vo); |
| | | }); |
| | | } |
| | | return newDataList; |
| | | } |
| | | |
| | | private IPage<CarEventDTO> getDataInfo(PageWrap<CarEvent> pageWrap) { |
| | | //æ¯å¦æ¯æ°å |
| | | boolean number = Validator.isNumber(pageWrap.getModel().getKeyWords()); |
| | | //æ¯å¦å
å«ä¸æ |
| | |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | queryWrapper.leftJoin(Cars.class,Cars::getCode,CarEvent::getPlateNos) |
| | | .leftJoin(Member.class,Member::getId,Cars::getMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | .leftJoin(Member.class,Member::getId,Cars::getMemberId) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.selectAll(CarEvent.class) |
| | | .selectAs(Member::getType,CarEventDTO::getPersonType) |
| | | .selectAs(Member::getPhone,CarEventDTO::getPersonPhone) |
| | | .selectAs(Member::getIdcardDecode,CarEventDTO::getPersonIdcardDecode) |
| | | .selectAs(Member::getName,CarEventDTO::getPersonName) |
| | | .selectAs(Company::getName,CarEventDTO::getPersonCompanyName); |
| | | .selectAs(Member::getType,CarEventDTO::getPersonType) |
| | | .selectAs(Member::getPhone,CarEventDTO::getPersonPhone) |
| | | .selectAs(Member::getIdcardDecode,CarEventDTO::getPersonIdcardDecode) |
| | | .selectAs(Member::getName,CarEventDTO::getPersonName) |
| | | .selectAs(Company::getName,CarEventDTO::getPersonCompanyName); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getPlateNos()), |
| | | CarEvent::getPlateNos, |
| | | pageWrap.getModel().getPlateNos()) |
| | | .like(number, |
| | | Member::getPhone, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like((b || hasWord), |
| | | Member::getPhone, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()), |
| | | Company::getName, |
| | | pageWrap.getModel().getCompanyName()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getMemberType()), |
| | | Member::getType, |
| | | pageWrap.getModel().getMemberType()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), |
| | | CarEvent::getEventType, |
| | | 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::getPlateNos, |
| | | pageWrap.getModel().getPlateNos()) |
| | | .like(number, |
| | | Member::getPhone, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like((b || hasWord), |
| | | Member::getPhone, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()), |
| | | Company::getName, |
| | | pageWrap.getModel().getCompanyName()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getMemberType()), |
| | | Member::getType, |
| | | pageWrap.getModel().getMemberType()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), |
| | | CarEvent::getEventType, |
| | | 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()); |
| | | IPage<CarEventDTO> carEventDTOIPage = carEventJoinMapper.selectJoinPage(page, CarEventDTO.class, queryWrapper); |
| | | if(null != carEventDTOIPage && carEventDTOIPage.getRecords().size() > 0) { |
| | | carEventDTOIPage.setRecords(newCarEventDTO(carEventDTOIPage.getRecords())); |
| | | } |
| | | return PageData.from(carEventDTOIPage); |
| | | return carEventDTOIPage; |
| | | } |
| | | |
| | | private List<CarEventDTO> newCarEventDTO(List<CarEventDTO> newCarEventDTOList) { |
| | |
| | | }); |
| | | return newDataList; |
| | | } |
| | | |
| | | } |
| | |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.SystemDictDataMapper; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.vo.DeviceEventVo; |
| | | import com.doumee.dao.system.vo.SystemDictDataListVO; |
| | | import com.doumee.service.business.DeviceEventService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | @Override |
| | | public PageData<DeviceEventDTO> findDeviceEventDTOPage(PageWrap<DeviceEvent> pageWrap) { |
| | | |
| | | IPage<DeviceEventDTO> deviceEventDTOIPage = getDataInfo(pageWrap); |
| | | if(null != deviceEventDTOIPage && deviceEventDTOIPage.getRecords().size() > 0) { |
| | | deviceEventDTOIPage.setRecords(newDeviceEvent(deviceEventDTOIPage.getRecords())); |
| | | } |
| | | return PageData.from(deviceEventDTOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceEventVo> findDeviceEventExcel(PageWrap<DeviceEvent> pageWrap) { |
| | | IPage<DeviceEventDTO> deviceEventExcel = getDataInfo(pageWrap); |
| | | List<DeviceEventVo> voList = new ArrayList<>(); |
| | | if(null != deviceEventExcel && deviceEventExcel.getRecords().size() > 0) { |
| | | deviceEventExcel.getRecords().stream().forEach(obj-> { |
| | | DeviceEventVo eventVo = new DeviceEventVo(); |
| | | if(null != obj.getPersonType()) { |
| | | if(Constants.ZERO == obj.getPersonType()){ |
| | | eventVo.setPersonTypeName(Constants.Status.LW_FK.getDes()); |
| | | }else if(Constants.ONE == obj.getPersonType()) { |
| | | eventVo.setPersonTypeName(Constants.Status.PT_FK.getDes()); |
| | | }else { |
| | | eventVo.setPersonTypeName(Constants.Status.NB_FK.getDes()); |
| | | } |
| | | }else { |
| | | eventVo.setPersonTypeName(""); |
| | | } |
| | | eventVo.setPersonName(obj.getPersonName()); |
| | | eventVo.setPersonPhone(obj.getPersonName()); |
| | | eventVo.setPersonIdcardDecode(obj.getPersonIdcardDecode()); |
| | | eventVo.setPersonCompanyName(obj.getPersonCompanyName()); |
| | | eventVo.setDevName(obj.getDevName()); |
| | | eventVo.setSrcName(obj.getSrcName()); |
| | | if(null != obj.getExtEventInOut()) { |
| | | if(Constants.ZERO == obj.getExtEventInOut()){ |
| | | eventVo.setExtEventInOutName(Constants.Status.OUT.getDes()); |
| | | }else if(Constants.ONE == obj.getPersonType()) { |
| | | eventVo.setExtEventInOutName(Constants.Status.PT_FK.getDes()); |
| | | } |
| | | }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()); |
| | | } |
| | | try { |
| | | eventVo.setHappenTime(DateUtil.timeEscape(obj.getHappenTime())); |
| | | } catch (ParseException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | voList.add(eventVo); |
| | | }); |
| | | } |
| | | return voList; |
| | | } |
| | | |
| | | private IPage<DeviceEventDTO> getDataInfo(PageWrap<DeviceEvent> pageWrap) { |
| | | IPage<DeviceEvent> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<DeviceEvent> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | |
| | | //æ¯å¦å
å«è±æ |
| | | boolean hasWord = ReUtil.contains(PatternPool.WORD, pageWrap.getModel().getKeyWords()); |
| | | queryWrapper.leftJoin(Member.class,Member::getHkId,DeviceEvent::getExtEventPersonNo) |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .leftJoin(Device.class,Device::getHkId,DeviceEvent::getSrcParentIndex) |
| | | .selectAll(DeviceEvent.class) |
| | | .selectAs(Member::getName,DeviceEventDTO::getPersonName) |
| | | .selectAs(Member::getType,DeviceEventDTO::getPersonType) |
| | | .selectAs(Member::getPhone,DeviceEventDTO::getPersonPhone) |
| | | .selectAs(Member::getIdcardDecode,DeviceEventDTO::getPersonIdcardDecode) |
| | | .selectAs(Device::getName,DeviceEventDTO::getDevName) |
| | | .selectAs(Company::getName,DeviceEventDTO::getPersonCompanyName); |
| | | .leftJoin(Company.class,Company::getId,Member::getCompanyId) |
| | | .leftJoin(Device.class,Device::getHkId,DeviceEvent::getSrcParentIndex) |
| | | .selectAll(DeviceEvent.class) |
| | | .selectAs(Member::getName,DeviceEventDTO::getPersonName) |
| | | .selectAs(Member::getType,DeviceEventDTO::getPersonType) |
| | | .selectAs(Member::getPhone,DeviceEventDTO::getPersonPhone) |
| | | .selectAs(Member::getIdcardDecode,DeviceEventDTO::getPersonIdcardDecode) |
| | | .selectAs(Device::getName,DeviceEventDTO::getDevName) |
| | | .selectAs(Company::getName,DeviceEventDTO::getPersonCompanyName); |
| | | queryWrapper.like(number, Member::getPhone, pageWrap.getModel().getKeyWords()) |
| | | .like((b||hasWord),Member::getName, pageWrap.getModel().getKeyWords()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getPersonType()), |
| | | Member::getType, |
| | | pageWrap.getModel().getPersonType()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), |
| | | DeviceEvent::getEventType, |
| | | pageWrap.getModel().getEventType()) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getStartTime()), |
| | | DeviceEvent::getCreateDate, |
| | | pageWrap.getModel().getStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getEndTime()), |
| | | DeviceEvent::getCreateDate, |
| | | pageWrap.getModel().getEndTime()); |
| | | .like((b||hasWord),Member::getName, pageWrap.getModel().getKeyWords()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getPersonType()), |
| | | Member::getType, |
| | | pageWrap.getModel().getPersonType()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), |
| | | DeviceEvent::getEventType, |
| | | pageWrap.getModel().getEventType()) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getStartTime()), |
| | | DeviceEvent::getCreateDate, |
| | | pageWrap.getModel().getStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getEndTime()), |
| | | DeviceEvent::getCreateDate, |
| | | pageWrap.getModel().getEndTime()); |
| | | queryWrapper.orderByDesc(DeviceEvent::getHappenTime); |
| | | IPage<DeviceEventDTO> deviceEventDTOIPage = deviceEventJoinMapper.selectJoinPage(page, DeviceEventDTO.class, queryWrapper); |
| | | if(null != deviceEventDTOIPage && deviceEventDTOIPage.getRecords().size() > 0) { |
| | | deviceEventDTOIPage.setRecords(newDeviceEvent(deviceEventDTOIPage.getRecords())); |
| | | } |
| | | return PageData.from(deviceEventDTOIPage); |
| | | return deviceEventDTOIPage; |
| | | } |
| | | |
| | | // 对å¾çè¿è¡å¤æå¤ç |
| | |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | |
| | | import cn.hutool.core.lang.PatternPool; |
| | | import cn.hutool.core.lang.Validator; |
| | | import cn.hutool.core.util.ReUtil; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.response.CarEventDTO; |
| | | import com.doumee.dao.business.MemberCardMapper; |
| | | 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 org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ç¨æ·å¡çç»å®ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | } |
| | | } |
| | | |
| | | public void updateRefundCard(MemberCard memberCard) { |
| | | int i = memberCardMapper.updateById(memberCard); |
| | | // è°ç¨service åæ¥æ´æ°æµ·åº·é£è¾¹ç对åºå¡ç¶æï¼ä¹æ¹ä¸ºéå¡ |
| | | if(i > 0){ |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public MemberCard findById(Integer id) { |
| | | return memberCardMapper.selectById(id); |
| | |
| | | @Override |
| | | public List<MemberCard> findList(MemberCard memberCard) { |
| | | QueryWrapper<MemberCard> wrapper = new QueryWrapper<>(memberCard); |
| | | wrapper.lambda().eq(MemberCard::getIsdeleted, Constants.ZERO); |
| | | wrapper.lambda().eq(MemberCard::getHkStatus, Constants.ONE); |
| | | // å¯ç¨åéå¡çå¡å· |
| | | wrapper.lambda().and(param -> param.eq(MemberCard::getStatus,Constants.ZERO). |
| | | or().eq(MemberCard::getStatus,Constants.TWO)); |
| | | return memberCardMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | .like(number,Member::getPhone,pageWrap.getModel().getKeyWords()) |
| | | .like((b||hasWord),Member::getName,pageWrap.getModel().getKeyWords()); |
| | | IPage<MemberCard> memberCardIPage = memberCardJoinMapper.selectJoinPage(page, MemberCard.class,queryWrapper); |
| | | if(null != memberCardIPage && memberCardIPage.getRecords().size() > 0) { |
| | | memberCardIPage.setRecords(getDataPackage(memberCardIPage)); |
| | | } |
| | | return PageData.from(memberCardIPage); |
| | | } |
| | | |
| | |
| | | QueryWrapper<MemberCard> wrapper = new QueryWrapper<>(memberCard); |
| | | return memberCardMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | private List<MemberCard> getDataPackage(IPage<MemberCard> memberCardIPage) { |
| | | List<MemberCard> newDataList = new ArrayList<>(); |
| | | memberCardIPage.getRecords().stream().forEach(obj->{ |
| | | if(null != obj.getType()) { |
| | | if(Constants.equalsInteger(obj.getCardType(),Constants.ZERO)) { |
| | | obj.setTypeName(Constants.Status.LW_FK.getDes()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.ONE)){ |
| | | obj.setTypeName(Constants.Status.PT_FK.getDes()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.TWO)){ |
| | | obj.setTypeName(Constants.Status.NB_FK.getDes()); |
| | | } |
| | | } |
| | | if(null != obj.getCardType()) { |
| | | if(Constants.equalsInteger(obj.getCardType(),Constants.ZERO)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.DISABLE.getName()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.ONE)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.ENABLE.getName()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.TWO)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.REFUNDCARD.getName()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.THREE)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.LOSS.getName()); |
| | | } |
| | | } |
| | | if(null != obj.getStatus()) { |
| | | if(Constants.equalsInteger(obj.getCardType(),Constants.ONE)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.IC.getName()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.TWO)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.CPU.getName()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.THREE)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.YJLCARD.getName()); |
| | | }else if(Constants.equalsInteger(obj.getCardType(),Constants.FOUR)) { |
| | | obj.setCardTypeName(HKConstants.CardStatus.MCARD.getName()); |
| | | } |
| | | } |
| | | newDataList.add(obj); |
| | | }); |
| | | return newDataList; |
| | | } |
| | | } |
| | |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.commons.lang3.time.DateUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Override |
| | | public List<Member> findList(Member member) { |
| | | QueryWrapper<Member> wrapper = new QueryWrapper<>(member); |
| | | if(null != member.getType()) { |
| | | wrapper.lambda().eq(Member::getType,member.getType()); |
| | | } |
| | | wrapper.lambda().eq(Member::getIsdeleted,Constants.ZERO); |
| | | return memberMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | return problemLogIPage; |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * @param pageWrap å页对象 |
| | | */ |
| | | @Override |
| | | public List<ProblemLogVo> findPageExcel(PageWrap<ProblemLog> pageWrap) { |
| | | IPage<ProblemLog> problemLogIPage = dataInfo(pageWrap); |
| | | List<ProblemLogVo> voList = new ArrayList<>(); |
| | |
| | | return PageData.from(retentionIPage); |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åº |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<RetentionVo> |
| | | */ |
| | | |
| | | @Override |
| | | public List<RetentionVo> findPageExcel(PageWrap<Retention> pageWrap) { |
| | | IPage<Retention> retentionInfo = getDataInfo(pageWrap); |
| | | List<RetentionVo> retentionVoList = new ArrayList<>(); |
| | |
| | | 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.VisitEventVo; |
| | | import com.doumee.service.business.VisitEventService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | @Override |
| | | public PageData<VisitEventDTO> findVisitPage(PageWrap<VisitEvent> pageWrap) { |
| | | |
| | | IPage<VisitEventDTO> visitEventDTOIPage = getDataInfo(pageWrap); |
| | | if(null != visitEventDTOIPage && visitEventDTOIPage.getRecords().size() > 0) { |
| | | visitEventDTOIPage.setRecords(newVisitEvent(visitEventDTOIPage.getRecords())); |
| | | } |
| | | return PageData.from(visitEventDTOIPage); |
| | | } |
| | | |
| | | @Override |
| | | public List<VisitEventVo> findPageExcel(PageWrap<VisitEvent> pageWrap) { |
| | | IPage<VisitEventDTO> visitEventExcel = getDataInfo(pageWrap); |
| | | List<VisitEventVo> voList = new ArrayList<>(); |
| | | if(null != visitEventExcel && visitEventExcel.getRecords().size() > 0) { |
| | | visitEventExcel.getRecords().stream().forEach(obj->{ |
| | | VisitEventVo eventVo = new VisitEventVo(); |
| | | eventVo.setPersonName(obj.getPersonName()); |
| | | eventVo.setPersonPhone(obj.getPersonPhone()); |
| | | eventVo.setIdNo(obj.getIdNo()); |
| | | 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.setHappenTime(obj.getHappenTime()); |
| | | voList.add(eventVo); |
| | | }); |
| | | } |
| | | return voList; |
| | | } |
| | | |
| | | private IPage<VisitEventDTO> getDataInfo(PageWrap<VisitEvent> pageWrap) { |
| | | //æ¯å¦æ¯æ°å |
| | | boolean number = Validator.isNumber(pageWrap.getModel().getKeyWords()); |
| | | //æ¯å¦å
å«ä¸æ |
| | |
| | | MPJLambdaWrapper<VisitEvent> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper .leftJoin(Visits.class,Visits::getHkId,VisitEvent::getVisitorId); |
| | | queryWrapper.selectAll(VisitEvent.class) |
| | | .selectAs(Visits::getCompanyName,VisitEventDTO::getPersonCompanyName); |
| | | .selectAs(Visits::getCompanyName,VisitEventDTO::getPersonCompanyName); |
| | | queryWrapper.like(number, |
| | | VisitEvent::getPhone, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like((b ||hasWord), |
| | | VisitEvent::getPersonName, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCarNo()), |
| | | VisitEvent::getCarNo, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()), |
| | | Company::getName, |
| | | pageWrap.getModel().getCompanyName()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), |
| | | VisitEvent::getEventType, |
| | | pageWrap.getModel().getEventType()) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getStartTime()), |
| | | VisitEvent::getHappenTime, |
| | | pageWrap.getModel().getStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getEndTime()), |
| | | VisitEvent::getHappenTime, |
| | | pageWrap.getModel().getEndTime()); |
| | | VisitEvent::getPhone, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like((b ||hasWord), |
| | | VisitEvent::getPersonName, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCarNo()), |
| | | VisitEvent::getCarNo, |
| | | pageWrap.getModel().getKeyWords()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()), |
| | | Company::getName, |
| | | pageWrap.getModel().getCompanyName()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getEventType()), |
| | | VisitEvent::getEventType, |
| | | pageWrap.getModel().getEventType()) |
| | | .ge(Objects.nonNull(pageWrap.getModel().getStartTime()), |
| | | VisitEvent::getHappenTime, |
| | | pageWrap.getModel().getStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getEndTime()), |
| | | VisitEvent::getHappenTime, |
| | | pageWrap.getModel().getEndTime()); |
| | | queryWrapper.orderByDesc(VisitEvent::getHappenTime); |
| | | IPage<VisitEventDTO> visitEventDTOIPage = visitEventJoinMapper.selectJoinPage(page, VisitEventDTO.class, queryWrapper); |
| | | if(null != visitEventDTOIPage && visitEventDTOIPage.getRecords().size() > 0) { |
| | | visitEventDTOIPage.setRecords(newVisitEvent(visitEventDTOIPage.getRecords())); |
| | | } |
| | | return PageData.from(visitEventDTOIPage); |
| | | return visitEventDTOIPage; |
| | | } |
| | | |
| | | |
| | | private List<VisitEventDTO> newVisitEvent(List<VisitEventDTO> VisitEventDTOList) { |
| | | List<String> codes = Arrays.asList(Constants.FTP_RESOURCE_PATH,Constants.MEMBER_IMG); |
| | | List<SystemDictData> list = systemDictDataMapper.list(codes); |
| | |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.DeviceRoleMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | |
| | | import com.doumee.dao.business.join.DeviceJoinMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.response.VisitDetailVO; |
| | | import com.doumee.service.business.VisitsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | @Autowired |
| | | private DeviceJoinMapper deviceJoinMapper; |
| | | |
| | | @Autowired |
| | | private WxPlatNotice wxPlatNotice; |
| | | |
| | | @Override |
| | | public Integer create(Visits visits) { |
| | |
| | | getHkDeviceRoles(visits); |
| | | //æ£éªæè®¿äººæ¯å¦åæ³ |
| | | Member visitMember = isValideVisitedUser(visits.getReceptMemberId()); |
| | | if(Constants.equalsInteger(Constants.ZERO, visits.getIdcardType()) &&!IdcardUtil.isValidCard(visits.getIdcardNo())){ |
| | | if(Constants.equalsInteger(Constants.ZERO, visits.getIdcardType())&&visits.getIdcardNo().length()!=18 |
| | | //&&!IdcardUtil.isValidCard(visits.getIdcardNo()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), "对ä¸èµ·ï¼èº«ä»½è¯å·ç æè¯¯ï¼è¯·æ ¸å®åéè¯ï¼"); |
| | | } |
| | | Date date = new Date(); |
| | |
| | | if(StringUtils.isNotBlank(erpId)){ |
| | | visits.setErpId(erpId); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼åèµ·æè®¿å®¡æ¹ç³è¯·å¤±è´¥ï¼"); |
| | | // throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼åèµ·æè®¿å®¡æ¹ç³è¯·å¤±è´¥ï¼"); |
| | | } |
| | | visitsMapper.insert(visits); |
| | | initWithVisitInfo(visits); |
| | | updateProblemLog(visits,problemLog,member); |
| | | //åé微信å
¬ä¼å·éç¥ |
| | | wxPlatNotice.sendVisitAuditTemplateNotice(visits, |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_PREFIX).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.WX_PLATFORM,Constants.WX_PLATFORM_AUDIT_VISIT).getCode()); |
| | | return visits.getId(); |
| | | } |
| | | |
| | |
| | | return PageData.from(result); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public VisitDetailVO getVisitDetail(Integer id){ |
| | | Visits visits = visitsMapper.selectById(id); |
| | | if(Objects.isNull(visits)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | Member member = memberMapper.selectById(visits.getReceptMemberId()); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°è¢«è®¿å工信æ¯"); |
| | | } |
| | | VisitDetailVO visitDetailVO = new VisitDetailVO(); |
| | | visitDetailVO.setStatus(visits.getStatus()); |
| | | visitDetailVO.setCarNos(visits.getCarNos()); |
| | | visitDetailVO.setVisitUserName(member.getName()); |
| | | visitDetailVO.setVisitReason(visits.getReason()); |
| | | visitDetailVO.setVisitTime(DateUtil.DateToStr(visits.getStarttime(),"yyyy-MM-dd HH:mm") + " è³ " + DateUtil.DateToStr(visits.getEndtime(),"yyyy-MM-dd HH:mm") ); |
| | | if(StringUtils.isNotBlank(visits.getDoors())){ |
| | | List<DeviceRole> deviceRoleList = deviceRoleMapper.selectList(new QueryWrapper<DeviceRole>().lambda() |
| | | .select(DeviceRole::getName) |
| | | .eq(DeviceRole::getIsdeleted,Constants.ZERO) |
| | | .in(DeviceRole::getId,visits.getDoors().split(","))); |
| | | if(CollectionUtils.isNotEmpty(deviceRoleList)){ |
| | | visitDetailVO.setDoorGroupName( |
| | | deviceRoleList.stream().map(m->m.getName()).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | visitDetailVO.setWithVisitsList(visitsMapper.selectList(new QueryWrapper<Visits>().lambda() |
| | | .select(Visits::getName,Visits::getPhone) |
| | | .eq(Visits::getParentId,id))); |
| | | return visitDetailVO; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | import com.hikvision.artemis.sdk.config.ArtemisConfig; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | package com.doumee.service.system.impl; |
| | | |
| | | import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.web.reqeust.FinishAnswerDTO; |
| | | import com.doumee.dao.web.response.ProblemsVO; |
| | | import com.doumee.service.business.ProblemLogService; |
| | |
| | | @Autowired |
| | | private ProblemLogService problemLogService; |
| | | |
| | | @Autowired |
| | | private WxPlatNotice wxPlatNotice; |
| | | |
| | | |
| | | @ApiOperation(value = "è·åé¢ç®æ°æ®", notes = "H5") |
| | | @GetMapping("/getProblemsVO") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.web.reqeust.CheckVisitedDTO; |
| | | import com.doumee.dao.web.response.MemberVO; |
| | | import com.doumee.dao.web.response.VisitDetailVO; |
| | | import com.doumee.dao.web.response.WxAuthorizeVO; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.VisitsService; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "访客记å½è¯¦æ
", notes = "访客记å½è¯¦æ
") |
| | | @GetMapping("/detail") |
| | | public ApiResponse<VisitDetailVO> detail(@RequestParam Integer id) { |
| | | return ApiResponse.success("æ¥è¯¢æå", visitsService.getVisitDetail(id)); |
| | | } |
| | | } |
| | |
| | | <artifactId>pinyin4j</artifactId> |
| | | <version>2.5.1</version> |
| | | </dependency> |
| | | <!-- WeChat å°ç¨åº --> |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>weixin-java-miniapp</artifactId> |
| | | <version>${weixin-java-miniapp.version}</version> |
| | | </dependency> |
| | | <!-- WeChat æ¯ä» --> |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>weixin-java-pay</artifactId> |
| | | <version>${weixin-java-pay.version}</version> |
| | | </dependency> |
| | | <!-- <!– WeChat å°ç¨åº –>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.binarywang</groupId>--> |
| | | <!-- <artifactId>weixin-java-miniapp</artifactId>--> |
| | | <!-- <version>${weixin-java-miniapp.version}</version>--> |
| | | <!-- </dependency>--> |
| | | <!-- <!– WeChat æ¯ä» –>--> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.github.binarywang</groupId>--> |
| | | <!-- <artifactId>weixin-java-pay</artifactId>--> |
| | | <!-- <version>${weixin-java-pay.version}</version>--> |
| | | <!-- </dependency>--> |
| | | |
| | | <!-- é¿éäºOSS--> |
| | | <dependency> |
| | |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | |
| | | <!-- WxJavaå
¬ä¼å· --> |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>weixin-java-mp</artifactId> |
| | | <version>3.6.0</version> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | <build> |