¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platformReason/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function allList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platformReason/list', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platformReason/exportExcel', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platformReason/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platformReason/updateById', data) |
| | | } |
| | | export function updateStatusById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/platformReason/updateStatusById', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/platformReason/delete/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/visitsAdmin/cloudService/business/platformReason/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="50%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="å
¥ååå ï¼" prop="reason"> |
| | | <el-input v-model="form.reason" placeholder="请è¾å
¥å
¥ååå " v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="ä½ä¸æå°ç»ï¼" prop="groupId"> |
| | | <el-select v-model="form.groupId" > |
| | | <el-option |
| | | v-for="item in groupList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä½ä¸æ°ééå¶ï¼ä¸åª/天ï¼ï¼" prop="limitNum" > |
| | | <el-input type="number" v-model="form.limitNum" placeholder="请è¾å
¥ä½ä¸æ°ééå¶ï¼ä¸åª/天ï¼" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æåºç (ååº)ï¼" prop="sortnum"> |
| | | <el-input type="number" v-model="form.sortnum" placeholder="请è¾å
¥æåºç (ååº)" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="说æï¼" prop="remark"> |
| | | <el-input type="textarea" v-model="form.remark" placeholder="请è¾å
¥è¯´æ" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { allList } from '@/api/platform/platformGroup' |
| | | export default { |
| | | name: 'OperaPlatformReasonWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | groupList: [], |
| | | form: { |
| | | id: null, |
| | | reason: null, |
| | | sortnum: null, |
| | | remark: '', |
| | | groupId: '', |
| | | limitNum: 1 |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | reason: [{ required: true, message: '请è¾å
¥å
¥ååå ', trigger: 'blur' }], |
| | | groupId: [{ required: true, message: 'è¯·éæ©ä½ä¸æå°ç» ', trigger: 'blur' }] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/platform/platformReason', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open (title, target) { |
| | | this.title = title |
| | | this.loadGroupList() |
| | | this.visible = true |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | }) |
| | | }, |
| | | loadGroupList () { |
| | | allList({}) |
| | | .then(res => { |
| | | this.groupList = res || [] |
| | | console.log(this.groupList) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .labelTip{ |
| | | font-size: 12px; |
| | | color: #666666; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <el-form-item label="æ¥è®¿é¢çº¦æ¹å¼:" prop="reservationWay"> |
| | | <el-radio-group v-model="form.reservationWay"> |
| | | <el-radio :label="0">é¢çº¦å
ç»è®°</el-radio> |
| | | <el-radio :label="1">é¢çº¦åç»è®°(éè¦é
å¤è®¿å®¢æº)</el-radio> |
| | | <el-radio :label="1">é¢çº¦å
ç»è®°</el-radio> |
| | | <el-radio :label="0">é¢çº¦åç»è®°(éè¦é
å¤è®¿å®¢æº)</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="è¢«è®¿äººæ ¡éªæ¹å¼:" prop="checkVisit"> |
| | |
| | | <el-table-column prop="code" label="æå°ç¼ç " fixed min-width="100px"></el-table-column> |
| | | <el-table-column prop="groupName" label="æå±æå°ç»" fixed min-width="150px"></el-table-column> |
| | | <el-table-column prop="workingNum" label="åæ¶å«å·è½¦è¾æ°" min-width="120px"></el-table-column> |
| | | <el-table-column label="ç¦/å¯ç¨" min-width="120px"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeStatus($event, row)" |
| | | v-model="row.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="stayTmeoutAlarmTime" label="åçè¶
æ¶æ¥è¦æ¶é´(åéï¼" min-width="180px"> |
| | | <template scope="{row}">{{row.stayTmeoutAlarmTime?(row.stayTmeoutAlarmTime):'-'}}</template> |
| | | </el-table-column> |
| | |
| | | <span v-if="row.platformStatus == 3">é误åé </span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="broadcastNames" label="å
³è广æ" min-width="100px"></el-table-column> |
| | | <el-table-column prop="ledNames" label="å
³èLED" min-width="100px"></el-table-column> |
| | | <el-table-column prop="hkDate" label="忥æ¶é´" min-width="140px"></el-table-column> |
| | |
| | | import SearchFormCollapse from '@/components/common/SearchFormCollapse' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaPlatformWindow from '@/components/business/OperaPlatformWindow' |
| | | import {allList} from "@/api/platform/platformGroup"; |
| | | import { allList } from '@/api/platform/platformGroup' |
| | | export default { |
| | | name: 'Platform', |
| | | extends: BaseTable, |
| | | components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformWindow }, |
| | | data () { |
| | | return { |
| | | groupList:[], |
| | | groupList: [], |
| | | // æç´¢ |
| | | working: false, |
| | | working1: false, |
| | | searchForm: { |
| | | name: '', |
| | | groupId:null |
| | | groupId: null |
| | | } |
| | | } |
| | | }, |
| | |
| | | methods: { |
| | | loadGroupList () { |
| | | allList({}) |
| | | .then(res => { |
| | | this.groupList = res || [] |
| | | }) |
| | | .then(res => { |
| | | this.groupList = res || [] |
| | | }) |
| | | }, |
| | | changeStatus (e, row) { |
| | | this.api.updateStatusById({ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:platformreason:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <SearchFormCollapse slot="search-form" :need-more="false"> |
| | | <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="" prop="reason"> |
| | | <el-input v-model="searchForm.reason" clearable placeholder="请è¾å
¥å
¥ååå " @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" > |
| | | <el-select v-model="searchForm.groupId" placeholder="è¯·éæ©æå°åç»" @change="search" clearable> |
| | | <el-option |
| | | v-for="item in groupList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | </SearchFormCollapse> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:platformreason:create','business:platformreason:delete']"> |
| | | <li><el-button type="primary" @click="$refs.OperaPlatformReasonWindow.open('æ°å»ºæå°å
¥ååå ')" icon="el-icon-plus" v-permissions="['business:platformreason:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:platformreason:delete']">å é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="reason" label="å
¥ååå " fixed min-width="100px"></el-table-column> |
| | | <el-table-column prop="groupName" label="对åºä½ä¸æå°ç»" fixed min-width="150px"></el-table-column> |
| | | <el-table-column prop="limitNum" label="ä½ä¸é(ä¸åª/天)" min-width="120px"></el-table-column> |
| | | <el-table-column prop="reason" label="说æ" fixed min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¦/å¯ç¨" min-width="120px" > |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeStatus($event, row)" |
| | | v-model="row.status" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="editDate" label="æè¿æä½æ¶é´" min-width="140px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:platformreason:update', 'business:platformreason:delete'])" |
| | | label="æä½" |
| | | align="center" |
| | | min-width="150" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.OperaPlatformReasonWindow.open('ç¼è¾æå°å
¥ååå ', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">å®¡æ¹æµ</el-button> |
| | | <el-button type="text" @click="$refs.OperaPlatformReasonWindow.open('ç¼è¾æå°å
¥ååå ', row)" icon="el-icon-edit" v-permissions="['business:platformreason:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:platformreason:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaPlatformReasonWindow ref="OperaPlatformReasonWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import SearchFormCollapse from '@/components/common/SearchFormCollapse' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaPlatformReasonWindow from '@/components/business/OperaPlatformReasonWindow' |
| | | import { allList } from '@/api/platform/platformGroup' |
| | | export default { |
| | | name: 'Platform', |
| | | extends: BaseTable, |
| | | components: { SearchFormCollapse, TableLayout, Pagination, OperaPlatformReasonWindow }, |
| | | data () { |
| | | return { |
| | | groupList: [], |
| | | // æç´¢ |
| | | working: false, |
| | | working1: false, |
| | | searchForm: { |
| | | reason: '', |
| | | groupId: null |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'æå°å
¥ååå ä¿¡æ¯è¡¨', |
| | | api: '/platform/platformReason', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.loadGroupList() |
| | | }, |
| | | methods: { |
| | | loadGroupList () { |
| | | allList({}) |
| | | .then(res => { |
| | | this.groupList = res || [] |
| | | }) |
| | | }, |
| | | changeStatus (e, row) { |
| | | this.api.updateStatusById({ |
| | | id: row.id, |
| | | status: e |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:platformreason:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | platformReasonService.deleteById(id); |
| | | platformReasonService.deleteById(id,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | platformReasonService.deleteByIdInBatch(idList); |
| | | platformReasonService.deleteByIdInBatch(idList,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | return ApiResponse.success(approveTemplService.findOne(templ)); |
| | | } |
| | | |
| | | |
| | | // @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | // @GetMapping("/{id}") |
| | | // @CloudRequiredPermission("business:approvetempl:query") |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformReason; |
| | | import com.doumee.service.business.PlatformReasonService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:platformreason:create") |
| | | public ApiResponse create(@RequestBody PlatformReason platformReason,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | platformReason.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(platformReasonService.create(platformReason)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:platformreason:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | platformReasonService.deleteById(id); |
| | | platformReasonService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | platformReasonService.deleteByIdInBatch(idList); |
| | | platformReasonService.deleteByIdInBatch(idList,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:platformreason:update") |
| | | public ApiResponse updateById(@RequestBody PlatformReason platformReason,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | platformReason.setLoginUserInfo(this.getLoginUser(token)); |
| | | platformReasonService.updateById(platformReason); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | public ApiResponse<PageData<PlatformReason>> findPage (@RequestBody PageWrap<PlatformReason> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(platformReasonService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹ç¶æ") |
| | | @PostMapping("/updateStatusById") |
| | | @CloudRequiredPermission("business:platform:update") |
| | | public ApiResponse updateStatusById(@RequestBody PlatformReason param, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | param.setLoginUserInfo(this.getLoginUser(token)); |
| | | platformReasonService.updateStatusById(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | |
| | | visitsService.resetPassword(resetPasswordDTO); |
| | | return ApiResponse.success("éç½®æå"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | String visitOut= "/api/visitor/v1/visitor/out";//ç¾ç¦»è®¿å®¢é¢çº¦ |
| | | String facePicture= "/api/resource/v1/person/picture";//æåç¨æ·äººè¸ç
§ç |
| | | String privilegeGroup= "/api/visitor/v1/privilege/group";//æ¥è¯¢è®¿å®¢æéç» |
| | | String privilegIccmeGroup= "/api/iccm/v1/privilege/groups";//æ¥è¯¢è®¿å®¢æéç» |
| | | String eventSub= "/api/eventService/v1/eventSubscriptionByEventTypes";//äºä»¶è®¢é
|
| | | String doorSearch= "/api/resource/v2/door/search";//æ¥è¯¢é¨ç¦ç¹å表v2 |
| | | String cancelEventSub= "/api/eventService/v1/eventUnSubscriptionByEventTypes";//åæ¶äºä»¶è®¢é
|
| | |
| | | String platformsList= "/api/platformService/v1/platforms";//è·åå
¨é¨æå°ä¿¡æ¯ |
| | | String platformStatus= "/api/platformService/v1/platform/status";//è·åæå°ç¶æ |
| | | String customBroadcast= "/api/ibas/v1/customBroadcast";//ç¨äºè®¾ç½®å¹¿æçèªå®ææ¾å忢 |
| | | String iccmAppointment= "/api/iccm/v2/appointment";//iccm访客ç»è®°æ·»å |
| | | String iccmUpdateAppointment= "/api/iccm/v2/appointment/update";//iccm访客ç»è®°ä¿®æ¹ |
| | | String iccmCancelAppointment= "/api/iccm/v1/appointment/cancel";//iccm访客ç»è®°ä¿®æ¹ |
| | | String iccmAppointmentMDJ= "/api/iccm/v1/appointment/free/registration";//iccm访客é¢çº¦å
ç»è®° |
| | | |
| | | String privilegIccmeGroup= "/api/iccm/v1/privilege/groups";//æ¥è¯¢è®¿å®¢æéç» |
| | | String iccmAppointmentInfo= "/api/iccm/v1/appointment/registration";//iccmæ¥è¯¢å·²é¢çº¦ç»è®° |
| | | } |
| | | |
| | | /** |
| | |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitAppiontment,body); |
| | | } |
| | | /** |
| | | * 访客é¢çº¦ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String iccmAppointment(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.iccmAppointment,body); |
| | | } |
| | | /** |
| | | * 访客å
ç»è®°é¢çº¦ |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String iccmAppointmentMDJ(String body) { |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.iccmAppointmentMDJ,body); |
| | | } |
| | | /** |
| | | * 访客å
ç»è®°é¢çº¦ |
| | | * @param body |
| | | * @return |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IccmAppointmentMDJRequest { |
| | | |
| | | |
| | | private String visitReasonRemark;// String false 访é®äºç±å¤æ³¨ |
| | | private String receptionistId ;// String true 被访人id |
| | | private IccmPermissionSetRequest visitorPermissionSet ;// Object false 访客æé模å |
| | | private String visitStartTime ;// String true 访é®å¼å§æ¶é´ |
| | | private String visitEndTime ;// String true 访é®ç»ææ¶é´ |
| | | private String visitPurpose ;// String false æ¥è®¿äºç±id(ä¸å¡«ä½¿ç¨é»è®¤è®¿é®äºç±) |
| | | private String campusId ;// String false ååºid(ä¸å¡«ä½¿ç¨é»è®¤ååº) |
| | | private String visitorTypeId;// String false 访客类åid |
| | | private String deptId;// String false 访é®é¨é¨id |
| | | |
| | | private JSONObject extensions;//Object false æ©å±å段 |
| | | private List<String> regionId;//Array false å®ä¿åºåéå |
| | | private String campusRegionIds;//String false 访é®åºåidï¼å¤ä¸ªç¨éå·éå¼ |
| | | |
| | | private IccmAppointmentVistorRequest visitorInfo ;//Object true è®¿å®¢ä¿¡æ¯æ¨¡ååæ° |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IccmAppointmentRequest { |
| | | |
| | | private String visitReasonRemark;// String false 访é®äºç±å¤æ³¨ |
| | | private String receptionistId ;// String true 被访人id |
| | | private IccmPermissionSetRequest visitorPermissionSet ;// Object false 访客æé模å |
| | | private String visitStartTime ;// String true 访é®å¼å§æ¶é´ |
| | | private String visitEndTime ;// String true 访é®ç»ææ¶é´ |
| | | private String visitPurpose ;// String false æ¥è®¿äºç±id(ä¸å¡«ä½¿ç¨é»è®¤è®¿é®äºç±) |
| | | private String campusId ;// String false ååºid(ä¸å¡«ä½¿ç¨é»è®¤ååº) |
| | | private String visitorTypeId;// String false 访客类åid |
| | | private String deptId;// String false 访é®é¨é¨id |
| | | |
| | | private JSONObject extensions;//Object false æ©å±å段 |
| | | private List<String> regionId;//Array false å®ä¿åºåéå |
| | | private String campusRegionIds;//String false 访é®åºåidï¼å¤ä¸ªç¨éå·éå¼ |
| | | |
| | | private List<IccmAppointmentVistorRequest> visitorInfoList ;// object[] True 访客信æ¯åè¡¨ï¼æå¤§æ¯æ128ä½è®¿å®¢ï¼å
¶ä¸æå¤æ¯æ4ä½è®¿å®¢å¸¦äººè¸ä¿¡æ¯ï¼å¦æåå¨äººè¸ä¸ä¼ 失败ï¼åæ´ä¸ªé¢çº¦å¤±è´¥ã |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IccmAppointmentVistorRequest { |
| | | |
| | | private String visitorWorkUnit;// String false æ¥è®¿åä½ |
| | | private String visitorName;// String true 访客å§å |
| | | private String visitorPhoto;// String false 访客人è¸å¾çbase64 |
| | | private String certificateType;// Number false è¯ä»¶ç±»å(111:èº«ä»½è¯ 414ï¼æ¤ç
§) |
| | | private String certificateNo;// String false è¯ä»¶å·ç |
| | | private String gender;// Number true æ§å«(1:ç·,2:女) |
| | | private String plateNo ;//String false 车çå· |
| | | private String phoneNo;// String true ææºå· |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IccmPermissionResourceRequest { |
| | | private String paramKey;// String false åæ°ç±»å(1:é¨ç¦ç¹2:æ¢¯æ§æ¥¼å±3:é¨å£æº4:å´å¢æº) |
| | | private List<String> paramValues ;//åæ°éå(èµæºç¼ç ) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.request; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IccmPermissionSetRequest { |
| | | |
| | | private String defaultPrivilegeGroupFlag ;//String false æ¯å¦ä½¿ç¨é»è®¤æéç»(1ï¼ä½¿ç¨ï¼é1ï¼ä¸ä½¿ç¨)ä¼ 1æ¶designatedResourcesåprivilegeGroupIdsæ æï¼ä½¿ç¨é¡µé¢é
ç½®çé»è®¤æéç» |
| | | private List<IccmPermissionResourceRequest> designatedResources ;//Array false èµæºç¹éå |
| | | private String[] privilegeGroupIds;// Array false æéç»ids |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IccmAppointmentInfoResponse { |
| | | private String visitorName;// String false 访客å§å |
| | | private String QRCode;// String false äºç»´ç ä¿¡æ¯ |
| | | private String receptionistId;// String false 被访人id |
| | | private String receptionistName;// String false 被访人å§å |
| | | private String svrIndexCode ;//String false å¾çå卿å¡çå¯ä¸æ è¯ |
| | | private String picUri;// String false 访客头å,å¾ççç¸å¯¹URL |
| | | private String verificationCode;// String false 访客ç |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | |
| | | @Data |
| | | public class IccmAppointmentMDJResponse { |
| | | |
| | | private String appointRecordId;// String false 访客é¢çº¦è®°å½id |
| | | private String orderId ;// String false 访客åå· |
| | | private String visitorName ;// String false 访客å§å |
| | | private String QRCode;// String false äºç»´ç ä¿¡æ¯ |
| | | private String receptionistId ;// String false 被访人id |
| | | private String receptionistName ;// String false 被访人å§å |
| | | private String svrIndexCode;// String false å¾çå卿å¡çå¯ä¸æ è¯ |
| | | private String picUri ;// String false 访客头å,å¾ççç¸å¯¹URL |
| | | private String verificationCode;// String false 访客éªè¯ç ,6使°åå符串 |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.haikang.model.param.respose; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class IccmAppointmentResponse { |
| | | private String appointRecordId;// String false 访客é¢çº¦è®°å½id |
| | | private String orderId;// String false 访客åå· |
| | | private List<IccmAppointmentInfoResponse> appointmentInfoList;// object[] False é¢çº¦è¯¦ç»ä¿¡æ¯ |
| | | } |
| | |
| | | return null; |
| | | } |
| | | /** |
| | | *访客é¢çº¦ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<IccmAppointmentResponse> iccmAppointment(IccmAppointmentRequest param){ |
| | | log.info("ãæµ·åº·è®¿å®¢é¢çº¦ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.iccmAppointment(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<IccmAppointmentResponse>>(){}; |
| | | BaseResponse<IccmAppointmentResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康访客é¢çº¦"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·è®¿å®¢é¢çº¦ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *访客é¢çº¦åæ¶ |
| | | * @return |
| | | */ |
| | |
| | | return null; |
| | | } |
| | | /** |
| | | *访客å
ç»è®°é¢çº¦ |
| | | * @return |
| | | */ |
| | | public static BaseResponse<IccmAppointmentMDJResponse> iccmAppiontmentMDJ(IccmAppointmentMDJRequest param){ |
| | | log.info("ãæµ·åº·è®¿å®¢å
ç»è®°é¢çº¦ã================å¼å§===="+JSONObject.toJSONString(param)); |
| | | try { |
| | | String res = HKTools.visitAppiontmentMDJ(JSONObject.toJSONString(param)); |
| | | TypeReference typeReference = |
| | | new TypeReference< BaseResponse<IccmAppointmentMDJResponse> >(){}; |
| | | BaseResponse<IccmAppointmentMDJResponse> result = JSONObject.parseObject(res, typeReference.getType()); |
| | | logResult(result,"海康访客å
ç»è®°é¢çº¦"); |
| | | return result; |
| | | }catch (Exception e){ |
| | | log.error("ãæµ·åº·è®¿å®¢å
ç»è®°é¢çº¦ã================失败====ï¼\n"+ e.getMessage()); |
| | | } |
| | | return null; |
| | | } |
| | | /** |
| | | *访客æéç»å表æ¥è¯¢ï¼åé¡µï¼ |
| | | * @return |
| | | */ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | @Data |
| | | @ApiModel("æå°_å
¥ååå ä¿¡æ¯è¡¨") |
| | | @TableName("`platform_reason`") |
| | | public class PlatformReason { |
| | | public class PlatformReason extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | @ApiModelProperty(value = "ç¶æ 0æ£å¸¸ 1ç¦ç¨", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0æ£å¸¸ 1ç¦ç¨") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | @ApiModelProperty(value = "å®¡æ¹æ¨¡çç¼ç (å
³èapprove_templ)", example = "1") |
| | | @ExcelColumn(name="å®¡æ¹æ¨¡çç¼ç (å
³èapprove_templ)") |
| | | private Integer approveTemplId; |
| | | @ApiModelProperty(value = "åç»å", example = "1") |
| | | @TableField(exist = false) |
| | | private String groupName; |
| | | |
| | | } |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.PlatformReason; |
| | |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | void deleteById(Integer id, LoginUserInfo user); |
| | | |
| | | /** |
| | | * å é¤ |
| | |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | |
| | | * @return long |
| | | */ |
| | | long count(PlatformReason platformReason); |
| | | |
| | | void updateStatusById(PlatformReason param); |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.PlatformReasonMapper; |
| | | import com.doumee.dao.business.model.Platform; |
| | | import com.doumee.dao.business.model.PlatformGroup; |
| | | import com.doumee.dao.business.model.PlatformReason; |
| | | import com.doumee.service.business.PlatformReasonService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.query.MPJQueryWrapper; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public Integer create(PlatformReason platformReason) { |
| | | platformReason.setIsdeleted(Constants.ZERO); |
| | | platformReason.setStatus(Constants.ZERO); |
| | | platformReason.setCreator(platformReason.getLoginUserInfo().getId()); |
| | | platformReason.setCreateDate(new Date()); |
| | | platformReason.setEditDate(platformReason.getCreateDate()); |
| | | platformReason.setEditor(platformReason.getCreator()); |
| | | platformReasonMapper.insert(platformReason); |
| | | return platformReason.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | platformReasonMapper.deleteById(id); |
| | | public void deleteById(Integer id, LoginUserInfo user) { |
| | | PlatformReason param = new PlatformReason(); |
| | | param.setId(id); |
| | | param.setIsdeleted(Constants.ONE); |
| | | param.setEditor(user.getId()); |
| | | param.setEditDate(new Date()); |
| | | platformReasonMapper.updateById(param); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | public void deleteByIdInBatch(List<Integer> ids, LoginUserInfo user) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | platformReasonMapper.deleteBatchIds(ids); |
| | | for(Integer id : ids){ |
| | | deleteById(id,user); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(PlatformReason platformReason) { |
| | | platformReason.setEditDate(new Date()); |
| | | platformReason.setEditor(platformReason.getLoginUserInfo().getId()); |
| | | platformReasonMapper.updateById(platformReason); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public PageData<PlatformReason> findPage(PageWrap<PlatformReason> pageWrap) { |
| | | IPage<PlatformReason> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<PlatformReason> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<PlatformReason> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | queryWrapper.selectAll(PlatformReason.class) |
| | | .selectAs(PlatformGroup::getName,PlatformReason::getGroupName) |
| | | .leftJoin(PlatformGroup.class,PlatformGroup::getId,PlatformReason::getGroupId); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getId, pageWrap.getModel().getId()); |
| | | queryWrapper.eq(PlatformReason::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getCreator, pageWrap.getModel().getCreator()); |
| | | queryWrapper.eq(PlatformReason::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(PlatformReason::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(PlatformReason::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.ge(PlatformReason::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.le(PlatformReason::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getEditor, pageWrap.getModel().getEditor()); |
| | | queryWrapper.eq(PlatformReason::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(PlatformReason::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(PlatformReason::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.ge(PlatformReason::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.le(PlatformReason::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | queryWrapper.eq(PlatformReason::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getRemark, pageWrap.getModel().getRemark()); |
| | | queryWrapper.eq(PlatformReason::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getReason() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getReason, pageWrap.getModel().getReason()); |
| | | queryWrapper.like(PlatformReason::getReason, pageWrap.getModel().getReason()); |
| | | } |
| | | if (pageWrap.getModel().getIocode() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getIocode, pageWrap.getModel().getIocode()); |
| | | queryWrapper.eq(PlatformReason::getIocode, pageWrap.getModel().getIocode()); |
| | | } |
| | | if (pageWrap.getModel().getGroupId() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getGroupId, pageWrap.getModel().getGroupId()); |
| | | queryWrapper.eq(PlatformReason::getGroupId, pageWrap.getModel().getGroupId()); |
| | | } |
| | | if (pageWrap.getModel().getLimitNum() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getLimitNum, pageWrap.getModel().getLimitNum()); |
| | | queryWrapper.eq(PlatformReason::getLimitNum, pageWrap.getModel().getLimitNum()); |
| | | } |
| | | if (pageWrap.getModel().getSortnum() != null) { |
| | | queryWrapper.lambda().eq(PlatformReason::getSortnum, pageWrap.getModel().getSortnum()); |
| | | queryWrapper.eq(PlatformReason::getSortnum, pageWrap.getModel().getSortnum()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | queryWrapper.orderByAsc(PlatformReason::getSortnum); |
| | | return PageData.from(platformReasonMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | |
| | | QueryWrapper<PlatformReason> wrapper = new QueryWrapper<>(platformReason); |
| | | return platformReasonMapper.selectCount(wrapper); |
| | | } |
| | | @Override |
| | | public void updateStatusById(PlatformReason platform) { |
| | | PlatformReason model =platformReasonMapper.selectById(platform.getId()); |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯¥è®°å½ä¸åå¨ï¼"); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = platform.getLoginUserInfo(); |
| | | } |
| | | PlatformReason update = new PlatformReason(); |
| | | update.setEditDate(new Date()); |
| | | update.setId(model.getId()); |
| | | update.setEditor(loginUserInfo.getId()); |
| | | update.setStatus(platform.getStatus()); |
| | | platformReasonMapper.updateById(update); |
| | | } |
| | | |
| | | } |
| | |
| | | public void updateStatusById(Platform platform) { |
| | | Platform model =platformMapper.selectById(platform.getId()); |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼äººåä¿¡æ¯ä¸åå¨ï¼"); |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯¥è®°å½ä¿¡æ¯ä¸åå¨ï¼"); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = platform.getLoginUserInfo(); |
| | | } |
| | | Platform update = new Platform(); |
| | | update.setId(model.getId()); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(loginUserInfo.getId()); |
| | | update.setStatus(platform.getStatus()); |
| | |
| | | .ge(pageWrap.getModel().getEditDate() != null, Platform::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())) |
| | | .le(pageWrap.getModel().getEditDate() != null, Platform::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())) |
| | | .eq(pageWrap.getModel().getIsdeleted() != null, Platform::getIsdeleted, pageWrap.getModel().getIsdeleted()) |
| | | .eq(pageWrap.getModel().getName() != null, Platform::getName, pageWrap.getModel().getName()) |
| | | .like(pageWrap.getModel().getName() != null, Platform::getName, pageWrap.getModel().getName()) |
| | | .eq(pageWrap.getModel().getRemark() != null, Platform::getRemark, pageWrap.getModel().getRemark()) |
| | | .eq(pageWrap.getModel().getStatus() != null, Platform::getStatus, pageWrap.getModel().getStatus()) |
| | | .eq(pageWrap.getModel().getSortnum() != null, Platform::getSortnum, pageWrap.getModel().getSortnum()) |
| | |
| | | param = new PrivilegeGroupRequest(); |
| | | param.setPageNo(curPage); |
| | | param.setPageSize(100); |
| | | BaseResponse<PrivilegeGroupListResponse> response = HKService.privilegeGroup(param); |
| | | // BaseResponse<PrivilegeGroupListResponse> response = HKService.privilegeGroup(param); |
| | | // if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | // response = HKService.privilegIccmeGroup(param);//æ¥å£V1çæ¬ä¸åå¨ï¼è°ç¨iccmçæ¬æ¥å£ |
| | | // } |
| | | BaseResponse<PrivilegeGroupListResponse> response = HKService.privilegIccmeGroup(param);//æ¥å£V1çæ¬ä¸åå¨ï¼è°ç¨iccmçæ¬æ¥å£ |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | response = HKService.privilegIccmeGroup(param);//æ¥å£V1çæ¬ä¸åå¨ï¼è°ç¨iccmçæ¬æ¥å£ |
| | | } |
| | | if(response == null || !StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)){ |
| | | response = HKService.privilegIccmeGroup(param); |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对ä¸èµ·ï¼æµ·åº·åæ¥æ°æ®å¤±è´¥~"); |
| | | } |
| | | PrivilegeGroupListResponse r = response.getData(); |
| | |
| | | @Autowired |
| | | private WxPlatNotice wxPlatNotice; |
| | | /** |
| | | * åæ¥æµ·åº·è®¿å®¢ä¿¡æ¯,æ ¹æ®erp忥ç»ç»ç»æï¼å®æ¶æ£æ¥éè¦ä¸åå°æµ·åº·çç»ç»ä¿¡æ¯ |
| | | * åæ¥æµ·åº·è®¿å®¢ä¿¡æ¯æ¯å¦å·²ç¾ç¦»ç¶æ |
| | | */ |
| | | @Override |
| | | public void getOutTimeVisitRecord(){ |
| | |
| | | Date date = new Date(); |
| | | for(Visits c : list) { |
| | | //å起海康é¢çº¦æ¥å£ï¼éè¦ç»è®°ï¼ï¼æ ¹æ®é¢çº¦è¿åæ¥å£å°è£
ç³è¯·è®°å½æ´æ°å段 |
| | | getUpdateModelByResponse(c,date,roleList,path); |
| | | // getUpdateModelByResponse(c,date,roleList,path); |
| | | getUpdateModelByResponseIccm(c,date,roleList,path); |
| | | visitsMapper.updateById(c); |
| | | if(Objects.isNull(c.getParentId())){ |
| | | wxPlatNotice.sendVisitAuditTemplateNotice(c, |
| | |
| | | * @param c |
| | | * @param date |
| | | * @param date |
| | | * @param type 0éè¦ç»è®° 1å
ç»è®° |
| | | */ |
| | | private void getUpdateModelByResponse( Visits c,Date date, List<DeviceRole> roleList,String path ) { |
| | | String code = null; |
| | |
| | | } |
| | | reson = response!=null?JSONObject.toJSONString(response):""; |
| | | } |
| | | |
| | | if (code!= null && id!=null) { |
| | | //海康ä¸åæå |
| | | c.setHkId( id);//é¢çº¦æ è¯ |
| | |
| | | c.setRemark("ä¸å海康æåï¼"); |
| | | c.setStatus(Constants.VisitStatus.xfSuccess);//ä¸å海康æå |
| | | } else { |
| | | //海康ä¸å失败 |
| | | c.setRemark("ä¸å海康失败,åå ï¼"+ reson); |
| | | c.setStatus(Constants.VisitStatus.xfFail);//ä¸å海康失败 |
| | | } |
| | | c.setHkStatus(Constants.ONE); |
| | | c.setHkDate(date); |
| | | } |
| | | private void getUpdateModelByResponseIccm( Visits c,Date date, List<DeviceRole> roleList,String path ) { |
| | | String code = null; |
| | | String id = null; |
| | | String qrcode = null; |
| | | String reson = ""; |
| | | //å起海康é¢çº¦æ¥å£ |
| | | if(Constants.equalsInteger(c.getVisitType(),Constants.ZERO)){ |
| | | //ï¼éè¦ç»è®°ï¼ |
| | | c.setVisitType(Constants.ZERO); |
| | | IccmAppointmentRequest request = getHkRequestParaIccm(c,roleList,path); |
| | | if(request == null){ |
| | | //海康ä¸åæå |
| | | c.setStatus(Constants.VisitStatus.xfFail);//ä¸å海康失败 |
| | | c.setRemark("ä¸åæµ·åº·åæ°ä¸æ£ç¡®ï¼"); |
| | | c.setHkStatus(Constants.ONE); |
| | | c.setHkDate(date); |
| | | return; |
| | | } |
| | | BaseResponse<IccmAppointmentResponse> response = HKService.iccmAppointment(request); |
| | | code =response!=null ?response.getCode():null; |
| | | if((response!=null && response.getData()!=null |
| | | && response.getData().getAppointmentInfoList() !=null |
| | | && response.getData().getAppointmentInfoList().size()>0)){ |
| | | id =response.getData().getOrderId(); |
| | | qrcode =response.getData().getAppointmentInfoList().get(0).getQRCode(); |
| | | } |
| | | reson = response!=null?JSONObject.toJSONString(response):""; |
| | | }else{ |
| | | //å
ç»è®° |
| | | c.setVisitType(Constants.ONE); |
| | | IccmAppointmentMDJRequest request =getHkMDJRequestParamIccm(c,roleList,path); |
| | | if(request == null){ |
| | | //海康ä¸åæå |
| | | c.setStatus(Constants.VisitStatus.xfFail);//ä¸å海康失败 |
| | | c.setRemark("ä¸å海康å
ç»è®°åæ°ä¸æ£ç¡®ï¼"); |
| | | c.setHkStatus(Constants.ONE); |
| | | c.setHkDate(date); |
| | | return; |
| | | } |
| | | BaseResponse<IccmAppointmentMDJResponse> response = HKService.iccmAppiontmentMDJ(request ); |
| | | code =response!=null ?response.getCode():null; |
| | | if(response!=null && response.getData()!=null){ |
| | | id = response.getData().getOrderId(); |
| | | qrcode =response.getData().getQRCode(); |
| | | } |
| | | reson = response!=null?JSONObject.toJSONString(response):""; |
| | | } |
| | | if (code!= null && id!=null) { |
| | | //海康ä¸åæå |
| | | c.setHkId( id);//é¢çº¦æ è¯ |
| | | c.setQrcode(qrcode); |
| | | c.setRemark("ä¸å海康æåï¼"); |
| | | c.setStatus(Constants.VisitStatus.xfSuccess);//ä¸å海康æå |
| | | }else { |
| | | //海康ä¸å失败 |
| | | c.setRemark("ä¸å海康失败,åå ï¼"+ reson); |
| | | c.setStatus(Constants.VisitStatus.xfFail);//ä¸å海康失败 |
| | |
| | | request.setVisitorPermissionSet(getVisitPermissonRequest(roleList,c)); |
| | | return request; |
| | | } |
| | | private IccmAppointmentMDJRequest getHkMDJRequestParamIccm(Visits c,List<DeviceRole> roleList,String path) { |
| | | IccmAppointmentMDJRequest request = new IccmAppointmentMDJRequest(); |
| | | IccmAppointmentVistorRequest info =getRequestInfoByVisitIccm(c,path); |
| | | if(info == null ){ |
| | | //人è¸ä¸ºç©ºï¼ä¸è½è¿è¡æ¨é |
| | | return null; |
| | | } |
| | | request.setVisitStartTime(DateUtil.getISO8601Timestamp2(c.getStarttime())); |
| | | request.setVisitEndTime(DateUtil.getISO8601Timestamp2(c.getEndtime())); |
| | | request.setReceptionistId(c.getReceptMemberHkId());//被访人海康ç¼ç |
| | | if(StringUtils.isNotBlank(c.getReason())){ |
| | | char[] charArray = c.getReason().toCharArray(); |
| | | int length = charArray.length; |
| | | if(length>32){ |
| | | request.setVisitPurpose(c.getReason().substring(0,32)); |
| | | }else{ |
| | | request.setVisitPurpose(c.getReason()); |
| | | } |
| | | } |
| | | request.setVisitorInfo(info); |
| | | request.setVisitorPermissionSet(getVisitPermissonRequestIccm(roleList,c)); |
| | | return request; |
| | | } |
| | | |
| | | /** |
| | | * 访客æéç» |
| | |
| | | */ |
| | | private VisitAppointmentPermissonRequest getVisitPermissonRequest(List<DeviceRole> roleList, Visits c) { |
| | | VisitAppointmentPermissonRequest p = new VisitAppointmentPermissonRequest(); |
| | | //è·åæéç»éå |
| | | String[] roles = getHkRoles(c.getDoors(),roleList); |
| | | if(roles==null || roles.length ==0){ |
| | | //使ç¨é»è®¤è®¿å®¢æéç» |
| | | p.setDefaultPrivilegeGroupFlag(Constants.ONE+""); |
| | | }else{ |
| | | //æå®æææµ·åº·è®¿å®¢æéç»æ°æ® |
| | | p.setDefaultPrivilegeGroupFlag(Constants.ZERO+""); |
| | | p.setPrivilegeGroupIds(roles); |
| | | } |
| | | return p; |
| | | } |
| | | private IccmPermissionSetRequest getVisitPermissonRequestIccm(List<DeviceRole> roleList, Visits c) { |
| | | IccmPermissionSetRequest p = new IccmPermissionSetRequest(); |
| | | //è·åæéç»éå |
| | | String[] roles = getHkRoles(c.getDoors(),roleList); |
| | | if(roles==null || roles.length ==0){ |
| | |
| | | request.setVisitorInfoList(infolist); |
| | | return request; |
| | | } |
| | | private IccmAppointmentRequest getHkRequestParaIccm(Visits c,List<DeviceRole> roleList,String path ) { |
| | | IccmAppointmentRequest request = new IccmAppointmentRequest(); |
| | | //ç³è¯·äººä¿¡æ¯ |
| | | IccmAppointmentVistorRequest info =getRequestInfoByVisitIccm(c,path); |
| | | if(info == null ){ |
| | | //人è¸ä¸ºç©ºï¼ä¸è½è¿è¡æ¨é |
| | | return null; |
| | | } |
| | | request.setVisitStartTime(DateUtil.getISO8601Timestamp(c.getStarttime())); |
| | | request.setVisitEndTime(DateUtil.getISO8601Timestamp(c.getEndtime())); |
| | | request.setReceptionistId(c.getReceptMemberHkId());//被访人海康ç¼ç |
| | | |
| | | if(StringUtils.isNotBlank(c.getReason())){ |
| | | char[] charArray = c.getReason().toCharArray(); |
| | | int length = charArray.length; |
| | | if(length>32){ |
| | | request.setVisitPurpose(c.getReason().substring(0,32)); |
| | | }else{ |
| | | request.setVisitPurpose(c.getReason()); |
| | | } |
| | | } |
| | | //è·åæéç»éå |
| | | request.setVisitorPermissionSet(getVisitPermissonRequestIccm(roleList,c)); |
| | | List<IccmAppointmentVistorRequest> infolist = new ArrayList<>(); |
| | | infolist.add(info); |
| | | request.setVisitorInfoList(infolist); |
| | | return request; |
| | | } |
| | | |
| | | private VisitAppointmentVistorRequest getRequestInfoByVisit(Visits c,String path) { |
| | | VisitAppointmentVistorRequest info = new VisitAppointmentVistorRequest(); |
| | |
| | | |
| | | return info; |
| | | } |
| | | private IccmAppointmentVistorRequest getRequestInfoByVisitIccm(Visits c,String path) { |
| | | IccmAppointmentVistorRequest info = new IccmAppointmentVistorRequest(); |
| | | //äººè¸æ°æ® |
| | | if(StringUtils.isBlank(c.getName()) |
| | | ||StringUtils.isBlank(c.getPhone()) |
| | | || StringUtils.isBlank(c.getFaceImg()) ){ |
| | | return null; |
| | | } |
| | | if(StringUtils.isNotBlank(c.getFaceImg())){ |
| | | info.setVisitorPhoto(ImageBase64Util.Image2Base64(path+c.getFaceImg())); |
| | | } |
| | | if(info.getVisitorPhoto() == null){ |
| | | return null; |
| | | } |
| | | if(StringUtils.isNotBlank(c.getName())){ |
| | | char[] charArray = c.getName().toCharArray(); |
| | | int length = charArray.length; |
| | | if(length>32){ |
| | | info.setVisitorName(c.getName().substring(0,32)); |
| | | }else{ |
| | | info.setVisitorName(c.getName()); |
| | | } |
| | | } |
| | | |
| | | if(StringUtils.isNotBlank(c.getCompanyName())){ |
| | | char[] charArray = c.getCompanyName().toCharArray(); |
| | | int length = charArray.length; |
| | | if(length>32){ |
| | | info.setVisitorWorkUnit(c.getCompanyName().substring(0,32)); |
| | | }else{ |
| | | info.setVisitorWorkUnit(c.getCompanyName()); |
| | | } |
| | | } |
| | | info.setPhoneNo(c.getPhone()); |
| | | info.setPlateNo(c.getCarNos()); |
| | | info.setGender(c.getSex()+""); |
| | | if(Constants.equalsInteger(c.getIdcardType(),Constants.ZERO)){ |
| | | info.setCertificateType(HKConstants.CertificateType.SHENFENZHENG.getKey()+""); |
| | | info.setCertificateNo(DESUtil.decrypt(Constants.EDS_PWD, c.getIdcardNo())); |
| | | } else if(Constants.equalsInteger(c.getIdcardType(),Constants.TWO)){ |
| | | info.setCertificateType(HKConstants.CertificateType.HUZHAO.getKey()+""); |
| | | info.setCertificateNo(DESUtil.decrypt(Constants.EDS_PWD, c.getIdcardNo())); |
| | | } |
| | | |
| | | return info; |
| | | } |
| | | |
| | | private String[] getHkRoles(String doors, List<DeviceRole> roleList) { |
| | | if(StringUtils.isBlank(doors) || roleList.size()==0|| roleList.size()==0){ |