jiangping
2023-12-28 48376938fb04165594a51a8847987669cd80fc63
Merge remote-tracking branch 'origin/master'
已添加7个文件
已修改54个文件
1586 ■■■■ 文件已修改
admin/src/api/business/cars.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/parks.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/strandedPersonnel.js 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/system/common.js 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/components/business/OperaVisitsDesWindow.vue 48 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/utils/util.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/blackmailPersonnel.vue 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/cars.vue 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/deviceRole.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/empower.vue 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/freezePersonnel.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/laborSource.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/parks.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/strandedPersonnel.vue 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/visitorManagement.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/visitorSources.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/views/business/visits.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/vue.config.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_admin/src/main/java/com/doumee/api/business/CarEventController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_admin/src/main/java/com/doumee/api/business/DeviceEventController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_admin/src/main/java/com/doumee/api/business/MemberCardController.java 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_admin/src/main/java/com/doumee/api/business/MemberController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_admin/src/main/java/com/doumee/api/business/VisitEventController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/core/wx/WxMiniConfig.java 98 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/core/wx/WxMiniUtilService.java 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatConfig.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/CarEventDTO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/DeviceEventDTO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/MemberInfoDTO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/VisitEventDTO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Member.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/business/model/MemberCard.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/system/vo/CarEventVo.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/system/vo/DeviceEventVo.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/system/vo/VisitEventVo.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/dao/web/response/VisitDetailVO.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/CarEventService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/DeviceEventService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/MemberCardService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/VisitEventService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/VisitsService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarEventServiceImpl.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceEventServiceImpl.java 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceRoleServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberCardServiceImpl.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ProblemLogServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/RetentionServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitEventServiceImpl.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncOrgUserServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_service/src/main/java/com/doumee/service/system/impl/SystemUserServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_web/src/main/java/com/doumee/api/web/ProblemController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_web/src/main/java/com/doumee/api/web/UnitController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/dmvisit_web/src/main/java/com/doumee/api/web/VisitorController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/pom.xml 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
admin/src/api/business/cars.js
@@ -2,29 +2,29 @@
// æŸ¥è¯¢
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
    }
admin/src/api/business/parks.js
@@ -6,3 +6,10 @@
    trim: true
  })
}
// æ‰€å±žåœè½¦åœºåˆ—表
export function findList (data) {
  return request.post('/business/parks/findList', data, {
    trim: true
  })
}
admin/src/api/business/strandedPersonnel.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,45 @@
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
    }
  })
}
admin/src/api/system/common.js
@@ -46,3 +46,8 @@
export function updateLaborConfigDTO (data) {
  return request.post('/system/dictData/updateLaborConfigDTO', data)
}
// åˆ†é¡µæŸ¥è¯¢ç³»ç»Ÿç”¨æˆ·
export function findAllList (data) {
  return request.post('/system/user/findAllList', data)
}
admin/src/components/business/OperaVisitsDesWindow.vue
@@ -23,7 +23,7 @@
                <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%">
@@ -41,8 +41,12 @@
                        <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>
@@ -55,7 +59,8 @@
                            </template>
                        </el-table-column>
                        <el-table-column
                            prop="idcardNo"
                            width="160"
                            prop="idcardDecode"
                            label="身份证号码">
                        </el-table-column>
                        <el-table-column
@@ -63,12 +68,28 @@
                            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>
@@ -106,6 +127,19 @@
    }
  },
  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
@@ -118,7 +152,11 @@
  }
}
</script>
<style>
    .el-image-viewer__wrapper {
        z-index: 3000 !important;
    }
</style>
<style lang="scss" scoped>
    .list {
        width: 100%;
admin/src/utils/util.js
@@ -41,3 +41,17 @@
  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 '长期'
  }
}
admin/src/views/business/blackmailPersonnel.vue
@@ -2,33 +2,26 @@
    <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>
@@ -39,7 +32,7 @@
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <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"
@@ -50,7 +43,7 @@
                <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>
@@ -58,7 +51,7 @@
                        <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
@@ -68,7 +61,7 @@
                    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>
@@ -86,6 +79,8 @@
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,
@@ -94,13 +89,13 @@
    return {
      // æœç´¢
      searchForm: {
        companyId: '',
        companyName: '',
        name: '',
        code: '',
        createrId: '',
        status: 2,
        type: 1
        type: '1'
      },
      options: []
      user: []
    }
  },
  created () {
@@ -111,6 +106,42 @@
      '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>
admin/src/views/business/cars.vue
@@ -5,18 +5,11 @@
            <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>
@@ -26,7 +19,7 @@
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <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
@@ -37,13 +30,25 @@
            >
                <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'])"
@@ -52,7 +57,7 @@
                    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>
@@ -74,6 +79,7 @@
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,
@@ -82,9 +88,10 @@
    return {
      // æœç´¢
      searchForm: {
        code: ''
      },
      options: []
        code: '',
        memberName: '',
        companyName: ''
      }
    }
  },
  created () {
admin/src/views/business/deviceRole.vue
@@ -28,7 +28,7 @@
                <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"
@@ -91,8 +91,8 @@
    this.search()
  },
  methods: {
    changeIsDefault (r) {
      updateStatusById({ isDefault: r, type: 2 })
    changeIsDefault (r, id) {
      updateStatusById({ isDefault: r, type: 2, id })
        .finally(() => {
          this.search()
        })
admin/src/views/business/empower.vue
@@ -2,34 +2,45 @@
    <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>
@@ -37,8 +48,8 @@
        <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"
@@ -89,6 +100,7 @@
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,
@@ -97,10 +109,14 @@
    return {
      // æœç´¢
      searchForm: {
        keyWords: '',
        companyId: '',
        startTime: '',
        endTime: '',
        sendStatus: ''
      }
        sendStatus: '',
        radio: null
      },
      time: []
    }
  },
  created () {
@@ -111,6 +127,38 @@
      '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>
admin/src/views/business/freezePersonnel.vue
@@ -26,7 +26,7 @@
        <!-- è¡¨æ ¼å’Œåˆ†é¡µ -->
        <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
@@ -37,7 +37,7 @@
            >
                <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>
@@ -48,7 +48,7 @@
                    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>
@@ -86,7 +86,7 @@
  },
  created () {
    this.config({
      module: '人员信息表',
      module: '冻结人员',
      api: '/business/block',
      'field.id': 'id',
      'field.main': 'id'
@@ -95,6 +95,28 @@
    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]
    },
@@ -102,9 +124,7 @@
    getfindCompanyTreePage () {
      findCompanyTreePage(1)
        .then(res => {
          console.log(res)
          this.options = res
          // this.search()
        })
    }
  }
admin/src/views/business/laborSource.vue
@@ -68,18 +68,17 @@
    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,
admin/src/views/business/parks.vue
@@ -2,16 +2,16 @@
    <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>
@@ -30,10 +30,10 @@
                :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"
@@ -49,6 +49,7 @@
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,
@@ -57,9 +58,10 @@
    return {
      // æœç´¢
      searchForm: {
        title: ''
        name: '',
        parentHkId: ''
      },
      options: []
      list: []
    }
  },
  created () {
@@ -70,6 +72,16 @@
      'field.main': 'id'
    })
    this.search()
    this.getfindList()
  },
  methods: {
    getfindList () {
      findList({})
        .then(res => {
          this.list = res
          console.log(res)
        })
    }
  }
}
</script>
admin/src/views/business/strandedPersonnel.vue
@@ -5,27 +5,13 @@
            <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>
@@ -35,19 +21,19 @@
        </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"
            >
                <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>
@@ -55,21 +41,26 @@
                        <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"
@@ -85,6 +76,7 @@
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,
@@ -93,23 +85,58 @@
    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>
admin/src/views/business/visitorManagement.vue
@@ -34,7 +34,12 @@
                <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>
@@ -42,9 +47,9 @@
                        <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
admin/src/views/business/visitorSources.vue
@@ -68,18 +68,17 @@
    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,
admin/src/views/business/visits.vue
@@ -48,20 +48,18 @@
                <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">
@@ -78,12 +76,12 @@
                <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>
admin/vue.config.js
@@ -11,9 +11,11 @@
    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: {
server/dmvisit_admin/src/main/java/com/doumee/api/business/CarEventController.java
@@ -8,6 +8,7 @@
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;
@@ -79,7 +80,7 @@
    @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);
    }
server/dmvisit_admin/src/main/java/com/doumee/api/business/DeviceEventController.java
@@ -8,6 +8,7 @@
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;
@@ -79,7 +80,7 @@
    @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查询")
server/dmvisit_admin/src/main/java/com/doumee/api/business/MemberCardController.java
@@ -33,14 +33,14 @@
    @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);
@@ -48,7 +48,7 @@
    @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<>();
@@ -61,15 +61,31 @@
    @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));
    }
@@ -87,4 +103,13 @@
    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));
    }
}
server/dmvisit_admin/src/main/java/com/doumee/api/business/MemberController.java
@@ -194,6 +194,11 @@
        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));
    }
}
server/dmvisit_admin/src/main/java/com/doumee/api/business/VisitEventController.java
@@ -8,6 +8,7 @@
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;
@@ -79,7 +80,7 @@
    @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查询")
server/dmvisit_service/src/main/java/com/doumee/core/haikang/model/HKConstants.java
@@ -346,7 +346,50 @@
    }
    /**
     * å¡çŠ¶æ€
     */
    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;
        }
    }
}
server/dmvisit_service/src/main/java/com/doumee/core/utils/Constants.java
@@ -63,6 +63,7 @@
    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;
@@ -214,6 +215,8 @@
    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";
@@ -306,7 +309,11 @@
        /** ç”¨æˆ·ç±»åž‹ **/
        LW_FK(0,"劳务访客"),
        PT_FK(1,"普通访客"),
        NB_FK(2,"内部人员");
        NB_FK(2,"内部人员"),
        /** è¿›åœºç±»åž‹ **/
        OUT(0,"出"),
        IN(1,"进");
        private  Integer value;
        private  String des;
server/dmvisit_service/src/main/java/com/doumee/core/wx/WxMiniConfig.java
@@ -1,59 +1,59 @@
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;
//    }
    /**
     * åˆå§‹åŒ–微信小程序支付
server/dmvisit_service/src/main/java/com/doumee/core/wx/WxMiniUtilService.java
@@ -3,10 +3,10 @@
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;
@@ -20,34 +20,34 @@
@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(),"退款发生异常请联系管理员");
//    }
}
server/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatConfig.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
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;
    }
}
server/dmvisit_service/src/main/java/com/doumee/core/wx/wxPlat/WxPlatNotice.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,65 @@
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;
    }
}
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/CarEventDTO.java
@@ -78,7 +78,7 @@
    private String personPhone;
    @ApiModelProperty(value = "人员类型")
    private String personType;
    private Integer personType;
    @ApiModelProperty(value = "人员身份证号")
    private String personIdcardDecode;
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/DeviceEventDTO.java
@@ -108,7 +108,7 @@
    private String personPhone;
    @ApiModelProperty(value = "人员类型")
    private String personType;
    private Integer personType;
    @ApiModelProperty(value = "人员身份证号")
    private String personIdcardDecode;
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/MemberInfoDTO.java
@@ -51,7 +51,7 @@
    @ApiModelProperty(value = "类型 0劳务访客 1普通访客  2内部人员")
    private Integer type;
    @ApiModelProperty(value = "访客名称")
    @ApiModelProperty(value = "访客名称/内部人员名称")
    private String name;
    @ApiModelProperty(value = "性别")
server/dmvisit_service/src/main/java/com/doumee/dao/admin/response/VisitEventDTO.java
@@ -110,10 +110,10 @@
    @ApiModelProperty(value = "证件签发机关")
    private String signOrg;
    @ApiModelProperty(value = "离开时间")
    @ApiModelProperty(value = "开始时间")
    private String startTime;
    @ApiModelProperty(value = "手机号码")
    @ApiModelProperty(value = "离开时间")
    private String endTime;
    @ApiModelProperty(value = "车牌号")
server/dmvisit_service/src/main/java/com/doumee/dao/business/model/Member.java
@@ -79,7 +79,7 @@
    @ExcelColumn(name="类型 0劳务访客 1普通访客  2内部人员")
    private Integer type;
    @ApiModelProperty(value = "访客名称")
    @ApiModelProperty(value = "访客名称/内部人员")
    @ExcelColumn(name="访客名称")
    private String name;
server/dmvisit_service/src/main/java/com/doumee/dao/business/model/MemberCard.java
@@ -96,10 +96,29 @@
    @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)
server/dmvisit_service/src/main/java/com/doumee/dao/system/vo/CarEventVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
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;
}
server/dmvisit_service/src/main/java/com/doumee/dao/system/vo/DeviceEventVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,55 @@
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;
}
server/dmvisit_service/src/main/java/com/doumee/dao/system/vo/VisitEventVo.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
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;
}
server/dmvisit_service/src/main/java/com/doumee/dao/web/response/VisitDetailVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
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;
}
server/dmvisit_service/src/main/java/com/doumee/service/business/CarEventService.java
@@ -5,6 +5,8 @@
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;
/**
@@ -103,4 +105,11 @@
     * @return PageData<CarEvent>
     */
    PageData<CarEventDTO> findVisitCarPage(PageWrap<CarEvent> pageWrap);
    /**
     * å¯¼å‡º
     * @param pageWrap åˆ†é¡µå¯¹è±¡
     * @return PageData<CarEventVo>
     */
    List<CarEventVo> findPageExcel(PageWrap<CarEvent> pageWrap);
}
server/dmvisit_service/src/main/java/com/doumee/service/business/DeviceEventService.java
@@ -5,6 +5,8 @@
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;
/**
@@ -104,4 +106,11 @@
     * @return PageData<DeviceEvent>
     */
    PageData<DeviceEventDTO> findDeviceEventDTOPage(PageWrap<DeviceEvent> pageWrap);
    /**
     * å¯¼å‡º
     * @param pageWrap åˆ†é¡µå¯¹è±¡
     * @return PageData<DeviceEventVO>
     */
    List<DeviceEventVo> findDeviceEventExcel(PageWrap<DeviceEvent> pageWrap);
}
server/dmvisit_service/src/main/java/com/doumee/service/business/MemberCardService.java
@@ -3,6 +3,7 @@
import com.doumee.core.model.PageData;
import com.doumee.core.model.PageWrap;
import com.doumee.dao.business.model.MemberCard;
import java.util.List;
/**
@@ -63,6 +64,8 @@
     */
    MemberCard findById(Integer id);
    void updateRefundCard(MemberCard memberCard);
    /**
     * æ¡ä»¶æŸ¥è¯¢å•条记录
     *
@@ -94,4 +97,5 @@
     * @return long
     */
    long count(MemberCard memberCard);
}
server/dmvisit_service/src/main/java/com/doumee/service/business/VisitEventService.java
@@ -5,6 +5,8 @@
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;
/**
@@ -107,4 +109,10 @@
    PageData<VisitEventDTO> findVisitPage(PageWrap<VisitEvent> pageWrap);
    /**
     * å¯¼å‡º
     * @param pageWrap åˆ†é¡µå¯¹è±¡
     * @return PageData<VisitEventVo>
     */
    List<VisitEventVo> findPageExcel(PageWrap<VisitEvent> pageWrap);
}
server/dmvisit_service/src/main/java/com/doumee/service/business/VisitsService.java
@@ -3,6 +3,8 @@
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;
/**
@@ -98,4 +100,11 @@
     * @return long
     */
    long count(Visits visits);
    /**
     * è®¿å®¢è®°å½•详情 - å¾®ä¿¡å…¬ä¼—号
     * @param id
     * @return
     */
    VisitDetailVO getVisitDetail(Integer id);
}
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CarEventServiceImpl.java
@@ -17,6 +17,7 @@
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;
@@ -275,6 +276,55 @@
    @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());
        //是否包含中文
@@ -318,10 +368,7 @@
                    .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) {
@@ -346,4 +393,5 @@
        });
        return newDataList;
    }
}
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java
@@ -36,7 +36,6 @@
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;
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceEventServiceImpl.java
@@ -20,6 +20,7 @@
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;
@@ -302,6 +303,63 @@
    @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());
@@ -338,10 +396,7 @@
                                                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;
    }
    // å¯¹å›¾ç‰‡è¿›è¡Œåˆ¤æ–­å¤„理
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/DeviceRoleServiceImpl.java
@@ -27,7 +27,6 @@
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;
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberCardServiceImpl.java
@@ -3,14 +3,19 @@
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;
@@ -21,8 +26,9 @@
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实现
@@ -78,6 +84,14 @@
        }
    }
    public void updateRefundCard(MemberCard memberCard) {
        int i = memberCardMapper.updateById(memberCard);
        // è°ƒç”¨service åŒæ­¥æ›´æ–°æµ·åº·é‚£è¾¹çš„对应卡状态,也改为退卡
        if(i > 0){
        }
    }
    @Override
    public MemberCard findById(Integer id) {
        return memberCardMapper.selectById(id);
@@ -92,6 +106,11 @@
    @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);
    }
@@ -166,6 +185,9 @@
                    .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);
    }
@@ -174,4 +196,43 @@
        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;
    }
}
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -45,7 +45,6 @@
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;
@@ -326,6 +325,10 @@
    @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);
    }
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/ProblemLogServiceImpl.java
@@ -24,7 +24,6 @@
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;
@@ -133,10 +132,7 @@
        return problemLogIPage;
    }
    /**
     * å¯¼å‡º
     * @param pageWrap åˆ†é¡µå¯¹è±¡
     */
    @Override
    public List<ProblemLogVo> findPageExcel(PageWrap<ProblemLog> pageWrap) {
        IPage<ProblemLog> problemLogIPage = dataInfo(pageWrap);
        List<ProblemLogVo> voList = new ArrayList<>();
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/RetentionServiceImpl.java
@@ -208,12 +208,8 @@
        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<>();
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitEventServiceImpl.java
@@ -16,6 +16,7 @@
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;
@@ -236,6 +237,39 @@
    @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());
        //是否包含中文
@@ -271,11 +305,9 @@
                            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 visitEventDTOIPage;
        }
        return PageData.from(visitEventDTOIPage);
    }
    private List<VisitEventDTO> newVisitEvent(List<VisitEventDTO> VisitEventDTOList) {
        List<String> codes = Arrays.asList(Constants.FTP_RESOURCE_PATH,Constants.MEMBER_IMG);
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/VisitsServiceImpl.java
@@ -22,6 +22,7 @@
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;
@@ -30,6 +31,7 @@
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;
@@ -72,6 +74,8 @@
    @Autowired
    private DeviceJoinMapper deviceJoinMapper;
    @Autowired
    private WxPlatNotice wxPlatNotice;
    @Override
    public Integer create(Visits visits) {
@@ -94,7 +98,9 @@
        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();
@@ -114,11 +120,15 @@
        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();
    }
@@ -664,4 +674,43 @@
        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;
    }
}
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncOrgUserServiceImpl.java
@@ -26,7 +26,6 @@
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;
server/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -28,7 +28,6 @@
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;
server/dmvisit_service/src/main/java/com/doumee/service/system/impl/SystemUserServiceImpl.java
@@ -1,6 +1,5 @@
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;
server/dmvisit_web/src/main/java/com/doumee/api/web/ProblemController.java
@@ -2,6 +2,7 @@
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;
@@ -36,6 +37,9 @@
    @Autowired
    private ProblemLogService problemLogService;
    @Autowired
    private WxPlatNotice wxPlatNotice;
    @ApiOperation(value = "获取题目数据", notes = "H5")
    @GetMapping("/getProblemsVO")
@@ -54,4 +58,6 @@
    }
}
server/dmvisit_web/src/main/java/com/doumee/api/web/UnitController.java
@@ -16,7 +16,6 @@
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.*;
server/dmvisit_web/src/main/java/com/doumee/api/web/VisitorController.java
@@ -6,6 +6,7 @@
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;
@@ -14,7 +15,7 @@
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.*;
@@ -66,4 +67,9 @@
    }
    @ApiOperation(value = "访客记录详情", notes = "访客记录详情")
    @GetMapping("/detail")
    public ApiResponse<VisitDetailVO> detail(@RequestParam Integer id) {
        return ApiResponse.success("查询成功", visitsService.getVisitDetail(id));
    }
}
server/pom.xml
@@ -216,18 +216,18 @@
      <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>
<!--    &lt;!&ndash; WeChat å°ç¨‹åº &ndash;&gt;-->
<!--    <dependency>-->
<!--      <groupId>com.github.binarywang</groupId>-->
<!--      <artifactId>weixin-java-miniapp</artifactId>-->
<!--      <version>${weixin-java-miniapp.version}</version>-->
<!--    </dependency>-->
<!--    &lt;!&ndash; WeChat æ”¯ä»˜ &ndash;&gt;-->
<!--    <dependency>-->
<!--      <groupId>com.github.binarywang</groupId>-->
<!--      <artifactId>weixin-java-pay</artifactId>-->
<!--      <version>${weixin-java-pay.version}</version>-->
<!--    </dependency>-->
    <!--  é˜¿é‡Œäº‘OSS-->
    <dependency>
@@ -281,6 +281,12 @@
      <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>