Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit
已添加2个文件
已删除2个文件
已修改39个文件
已重命名2个文件
| | |
| | | export function create (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/create', data) |
| | | } |
| | | export function memberList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/list', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/updateById', data) |
| | | } |
| | | export function updateHead (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/updateHead', data) |
| | | } |
| | | export function updateWorkStatus (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/updateWorkStatus', data) |
| | | } |
| | | export function updateCanVisit (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/updateCanVisitById', data) |
| | | } |
| | | |
| | | // æ¹éæé» |
| | | export function batchBlock (ids) { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="å§å" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥å§å" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æå±ç»ç»" prop="companyId"> |
| | | <el-cascader |
| | | v-model="form.company" |
| | | :options="department" |
| | | @change="handleChangeCompany" |
| | | :show-all-levels="false" |
| | | clearable |
| | | :props="departprops" |
| | | ></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="ææºå·" prop="phone"> |
| | | <el-input v-model="form.phone" placeholder="请è¾å
¥ææºå·" v-trim/> |
| | | <div style="color: #F56C6C;font-size: 12px">ï¼æ³¨ï¼åå·¥ææºå·å°ä½ä¸ºå¹³å°ç»å½è´¦å·ï¼åå§å¯ç 为系ç»é»è®¤å¯ç é
置项ï¼</div> |
| | | </el-form-item> |
| | | <el-form-item label="身份è¯å·" prop="idcardNo" v-if="form.id ==null"> |
| | | <el-input v-model="form.idcardNo" placeholder="请è¾å
¥èº«ä»½è¯å·" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="ä¿®æ¹èº«ä»½è¯å·" prop="idcardNoNew" v-if="form.id !=null"> |
| | | <el-input v-model="form.idcardNoNew" placeholder="å¯ä¿®æ¹èº«ä»½è¯å·" v-trim/> |
| | | <div style="font-size: 12px" v-if="form.id !=null"> |
| | | ï¼æ³¨ï¼å½å身份è¯å·ä¸º<span style="color: #F56C6C">ã{{form.idcardDecode}}ã</span>ï¼å¦éä¿®æ¹ï¼è¯·å¨è¾å
¥æ å¡«åæ°ç身份è¯å·!ï¼ |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥å·" prop="code"> |
| | | <el-input v-model="form.code" placeholder="请è¾å
¥å工工å·" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="人è¸ç
§ç" prop="faceImgFull" > |
| | | <UploadAvatarImage |
| | | :file="{ 'imgurlfull': form.faceImgFull, 'imgurl': form.faceImg }" |
| | | :uploadData="uploadData" |
| | | @uploadSuccess="uploadAvatarSuccess" |
| | | @uploadEnd="isUploading = false" |
| | | @uploadBegin="isUploading = true" |
| | | /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import {checkMobile, validIdCardNo, validIdCardNoNew} from '@/utils/form' |
| | | export default { |
| | | name: 'OperaCompanyWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, UploadAvatarImage }, |
| | | data () { |
| | | return { |
| | | uploadData: { |
| | | folder: 'member' |
| | | }, |
| | | departprops: { |
| | | label: 'name', |
| | | value: 'id', |
| | | checkStrictly: true |
| | | }, |
| | | department: [], |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | type: '', |
| | | company: [], |
| | | code: '', |
| | | idcardNo: '', |
| | | idcardNoNew: '', |
| | | linkName: '', |
| | | idcardDecode: '', |
| | | companyId: null, |
| | | idcardType: 0, |
| | | phone: '', |
| | | faceImg: '', |
| | | faceImgFull: '' |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | name: [{ required: true, message: '请è¾å
¥åå·¥å§å', trigger: 'blur' }], |
| | | phone: [{ required: true, validator: checkMobile, trigger: 'blur' }], |
| | | companyId: [{ required: true, message: 'è¯·éæ©æå±ç»ç»' }], |
| | | idcardNo: [{ required: true, validator: validIdCardNo, message: '请è¾å
¥èº«ä»½è¯å·', trigger: 'blur' }], |
| | | idcardNoNew: [{ required: false, validator: validIdCardNoNew, trigger: 'blur' }] |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/member.js', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | handleChangeCompany (value) { |
| | | if (this.form.company && this.form.company.length > 1) { |
| | | this.form.companyId = this.form.company[this.form.company.length - 1] |
| | | } |
| | | }, |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open (title, target, depart) { |
| | | this.title = title |
| | | this.department = depart |
| | | this.visible = true |
| | | // æ°å»º |
| | | if (target == null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.form.resetFields() |
| | | this.form[this.configData['field.id']] = null |
| | | this.form.company = [] |
| | | }) |
| | | return |
| | | } |
| | | // ç¼è¾ |
| | | var that = this |
| | | this.$nextTick(() => { |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | this.form.idcardNo = '' |
| | | } |
| | | this.form.company =[] |
| | | if (target.companyId && target.companyPath) { |
| | | var array = target.companyPath.split('/') |
| | | array.forEach(item => { |
| | | if (item && item != null && item != '') { |
| | | that.form.company.push(parseInt(item)) |
| | | } |
| | | }) |
| | | } |
| | | console.log(that.form.company) |
| | | }) |
| | | }, |
| | | // ä¸ä¼ å¾ç |
| | | uploadAvatarSuccess (file) { |
| | | this.form.faceImg = file.imgurl |
| | | this.form.faceImgFull = file.imgurlfull |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | // éªè¯ææºå·ç |
| | | export function checkMobile (rule, value, callback) { |
| | | if (value == null || value.trim() === '') { |
| | | callback() |
| | | callback(new Error('请è¾å
¥æ£ç¡®çææºå·')) |
| | | return |
| | | } |
| | | if (!/^1\d{10}$/.test(value)) { |
| | |
| | | callback() |
| | | } |
| | | |
| | | |
| | | export function numRule(rule, value, callback) { |
| | | export function numRule (rule, value, callback) { |
| | | // debugger |
| | | if (value == null || value < 0 || !value) { |
| | | callback(new Error()) |
| | |
| | | callback() |
| | | } |
| | | } |
| | | export function arrayRule(rule, value, callback) { |
| | | export function arrayRule (rule, value, callback) { |
| | | // debugger |
| | | if (value == null || value.length <= 0 || !value) { |
| | | callback(new Error()) |
| | |
| | | } |
| | | return |
| | | } |
| | | let re = /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/ |
| | | const re = /^[0-9A-HJ-NPQRTUWXY]{2}\d{6}[0-9A-HJ-NPQRTUWXY]{10}$/ |
| | | var result = re.test(value) |
| | | if(!result) { |
| | | if (!result) { |
| | | callback(new Error('请è¾å
¥æ£ç¡®ç社ä¼ä¿¡ç¨ä»£ç ')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | |
| | | |
| | | export function validIdCardNo (rule, value, callback) { |
| | | const pattern = /^[1-9]\d{5}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/ |
| | | if (value == null || value.trim() ==='') { |
| | | callback(new Error('请è¾å
¥èº«ä»½è¯å·')) |
| | | } else if (!pattern.test(value)) { |
| | | callback(new Error('请è¾å
¥æ£ç¡®ç身份è¯å·')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | | export function validIdCardNoNew (rule, value, callback) { |
| | | const pattern = /^[1-9]\d{5}(18|19|20)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/ |
| | | if (value == null || value.trim() ==='') { |
| | | callback() |
| | | } else if (!pattern.test(value)) { |
| | | callback(new Error('请è¾å
¥æ£ç¡®ç身份è¯å·')) |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | |
| | | <span v-if="row.type == 1">å
é¨ç»ç»</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="companyPath" label="ç»ç»è·¯å¾" min-width="100px"></el-table-column> |
| | | <el-table-column prop="companyNamePath" label="ç»ç»è·¯å¾" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editorName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="æåæ´æ°æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column |
| | |
| | | <el-option label="åæ¥å¤±è´¥" value="2"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" > |
| | | <el-checkbox style="font-size: 12px" label="1" v-model="searchForm.includeChild" key="1" >æ¯å¦å
å«ä¸çº§ç»ç»</el-checkbox> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | |
| | | </template> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:delete','business:member:sync']"> |
| | | <ul class="toolbar" v-permissions="['business:member:delete','business:member:create']"> |
| | | <!-- <li><el-button type="primary">é¨ç¦ææ</el-button></li>--> |
| | | <!-- |
| | | <li><el-button type="primary" v-permissions="['business:member:sync']" :loading="loading" @click="synchronous()">忥</el-button></li> |
| | | <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button></li> |
| | | --> |
| | | <li><el-button type="primary" @click="$refs.OperaMemberWindow.open('æ°å»ºåå·¥',null,department)" icon="el-icon-plus" v-permissions="['business:member:create']">æ°å»ºåå·¥</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:member:delete']">æ¹éå é¤</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="phone" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="idcardDecode" label="身份è¯å·" min-width="100px"></el-table-column> |
| | | <el-table-column label="æ§å«" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.sex == 1">ç·</span> |
| | |
| | | <span v-if="row.status == 2" style="color: red">æé»/å»ç»</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="å·¥å·" min-width="100px"></el-table-column> |
| | | <el-table-column label="é¨é¨ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.companyType == 0">ç¸å
³æ¹ç»ç»</span> |
| | | <span v-if="row.companyType == 1">å
é¨ç»ç»</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¨èç¶æ"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeWorkStatus($event, row)" |
| | | v-model="row.workStatus" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="0" |
| | | :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦å¯æè®¿"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | @change="changeCanvisit($event, row)" |
| | | v-model="row.canVisit" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¯æè®¿" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.canVisit != 1">å¦</span> |
| | |
| | | <span v-if="row.hkStatus == 3" style="color: red">ä¸ç¬¦åä¸åæ¡ä»¶</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦ææ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.authStatus == 1" style="color: green">æ¯</span> |
| | | <span v-if="row.authStatus == 0" style="color: red">å¦</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é¨ç¦è§è²" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span>{{row.roleNames.join(',')}}</span> |
| | | <span>{{(row.roleNames && row.roleNames.length) ?row.roleNames.join(','): '-'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="å·¥å·" min-width="100px"></el-table-column> |
| | | <el-table-column label="å¡ç" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button @click="$refs.cardOpeningRecord.open('å¼å¡è®°å½', row.id)" type="text">{{row.memberCardCount || '0'}}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="editorName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="æåæä½æ¶é´" min-width="150px"></el-table-column> |
| | | <el-table-column fixed="right" label="人è¸ä¿¡æ¯" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image |
| | | v-if="row.faceImg" |
| | | v-if="row.faceImgFull" |
| | | style="width: 60px; height: 60px" |
| | | :src="row.faceImg" |
| | | :preview-src-list="[row.faceImg]"> |
| | | :src="row.faceImgFull" |
| | | :preview-src-list="[row.faceImgFull]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="å¡çä¿¡æ¯" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-button @click="$refs.cardOpeningRecord.open('å¼å¡è®°å½', row.id)" type="text">{{row.memberCardCount || '0'}}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete','business:empower:create'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | min-width="280" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="empower(row.id)" v-permissions="['business:empower:create']">éæ°ææ</el-button> |
| | | <el-button type="text" icon="el-icon-edit" @click="$refs.OperaMemberWindow.open('ç¼è¾å工信æ¯',row,department)" v-permissions="['business:empower:update']">ç¼è¾</el-button> |
| | | <el-button type="text" :loading="heading" icon="el-icon-delete" @click="updateHead(row,0)" v-if="row.headStatus ==1 " v-permissions="['business:member:head']">åæ¶ä¸»ç®¡</el-button> |
| | | <el-button type="text" :loading="heading" icon="el-icon-edit" @click="updateHead(row,1)" v-if="row.headStatus == 0" v-permissions="['business:member:head']">设为主管</el-button> |
| | | <el-button type="text" icon="el-icon-plus" @click="empower(row.id)" v-permissions="['business:empower:create']">éæ°ææ</el-button> |
| | | <el-button type="text" icon="el-icon-delete" @click="empower(row.id)" v-permissions="['business:empower:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | </pagination> |
| | | <!-- æ¥ç人åå¼å¡è®°å½ --> |
| | | <cardOpeningRecord ref="cardOpeningRecord" @success="handlePageChange" /> |
| | | <OperaMemberWindow ref="OperaMemberWindow" @success="handlePageChange" /> |
| | | </template> |
| | | </TableLayout1> |
| | | </template> |
| | |
| | | import Pagination from '@/components/common/Pagination' |
| | | import cardOpeningRecord from '@/components/business/cardOpeningRecord' |
| | | import Tree from '@/components/common/Tree' |
| | | import OperaMemberWindow from '@/components/business/OperaMemberWindow' |
| | | import { fetchList } from '@/api/business/company' |
| | | import { memberSync, roleAuth } from '@/api/business/member' |
| | | import { memberSync, roleAuth, updateCanVisit, updateHead, updateWorkStatus } from '@/api/business/member' |
| | | export default { |
| | | name: 'internalMember', |
| | | extends: BaseTable, |
| | | components: { TableLayout1, Pagination, Tree, cardOpeningRecord }, |
| | | components: { TableLayout1, Pagination, Tree, cardOpeningRecord, OperaMemberWindow }, |
| | | data () { |
| | | return { |
| | | TreeList: [], |
| | |
| | | name: '', |
| | | status: '', |
| | | hkStatus: '', |
| | | includeChild: false, |
| | | canVisit: '', |
| | | keyword: '', |
| | | type: 2, |
| | |
| | | companyId: '', |
| | | hasFace: '' |
| | | }, |
| | | loading:false, |
| | | companyTree: [] |
| | | loading: false, |
| | | heading: false, |
| | | working: false, |
| | | canvisiting: false, |
| | | companyTree: [], |
| | | department: [] |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | this.getfindCompanyTreePage() |
| | | }, |
| | | methods: { |
| | | empower(id) { |
| | | empower (id) { |
| | | var that = this |
| | | this.$confirm('ç¡®å®éæ°ææå?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | |
| | | }).then(() => { |
| | | roleAuth(id) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || 'æä½æå') |
| | | that.search() |
| | | }) |
| | | }).catch(() => { |
| | | |
| | | }); |
| | | this.$tip.apiSuccess( 'æä½å¤±è´¥') |
| | | }) |
| | | }, |
| | | // è·åç»ç»æ |
| | | getfindCompanyTreePage () { |
| | |
| | | this.companyTree = res |
| | | // this.searchForm.erpOrgId = res[0].erpId |
| | | this.search() |
| | | this.department = this.getDepartmentTree(res) |
| | | } |
| | | }) |
| | | }, |
| | | getDepartmentTree (tree) { |
| | | if (tree == null) { |
| | | return [] |
| | | } |
| | | return tree.map(item => { |
| | | const newItem = { ...item } |
| | | if (newItem) { |
| | | newItem.children = newItem.childList |
| | | } |
| | | if (item.children && item.children.length == 0) { |
| | | this.$delete(newItem, 'children') |
| | | } else { |
| | | newItem.children = this.getDepartmentTree(newItem.children) |
| | | } |
| | | return newItem |
| | | }) |
| | | }, |
| | | // åæ¥ä¿¡æ¯ |
| | | async synchronous () { |
| | |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | async updateHead (row, type) { |
| | | this.$dialog.actionConfirm('æ¨ç¡®è®¤è¿è¡å½åæä½åï¼', 'é¨é¨ä¸»ç®¡è®¾ç½®æä½æç¤º') |
| | | .then(() => { |
| | | this.heading = true |
| | | updateHead({ id: row.id, headStatus: type }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || 'æä½æå') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.heading = false |
| | | }) |
| | | .catch(() => {}) |
| | | }) |
| | | }, |
| | | changeWorkStatus (e, row) { |
| | | this.working = true |
| | | updateWorkStatus({ id: row.id, workStatus: e }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || 'æä½æå') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.working = false |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | changeCanvisit (e, row) { |
| | | this.canvisiting = true |
| | | updateCanVisit({ id: row.id, canVisit: e }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || 'æä½æå') |
| | | this.search() |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.canvisiting = false |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | callback (row) { |
| | | this.searchForm.erpOrgId = row.erpId |
| | | this.searchForm.companyId = row.id |
| | |
| | | import OperaBookingsDetailWindow from '@/views/meeting/components/OperaBookingsDetailWindow' |
| | | import { findList } from '@/api/meeting/rooms' |
| | | import { getSystemDictData } from '@/api/system/dictData' |
| | | import { fetchTree } from '@/api/system/department' |
| | | import { fetchList } from '@/api/business/company' |
| | | import { cancelById, bookingsDetail } from '@/api/meeting/bookings' |
| | | export default { |
| | | name: 'Bookings', |
| | |
| | | isdeleted: '', |
| | | remark: '', |
| | | name: '', |
| | | roomId: '', |
| | | startTime: '', |
| | | endTime: '', |
| | | content: '' |
| | |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | fetchTree() |
| | | fetchList(1) |
| | | .then(res => { |
| | | this.department = this.newTree(res) |
| | | }) |
| | |
| | | }, |
| | | methods: { |
| | | newTree(tree) { |
| | | if(tree ==null){ |
| | | return [] |
| | | } |
| | | return tree.map(item => { |
| | | let newItem = {...item} |
| | | if (item.children.length == 0) { |
| | | if(newItem){ |
| | | newItem.children=newItem.childList |
| | | } |
| | | if (item.children && item.children.length == 0) { |
| | | this.$delete( newItem, 'children' ) |
| | | } else { |
| | | newItem.children = this.newTree(newItem.children) |
| | |
| | | v-for="item in userList()" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | |
| | | :label="item.department?`${item.department.name}-${item.realname}`:item.realname" |
| | | :label="item.companyId?`${item.companyName}-${item.companyName}`:item.realname" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | id: null, |
| | | sysList: [], |
| | | projectList: [], |
| | | createDate: null, |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: null, |
| | | isdeleted: 0, |
| | |
| | | v-for="item in userList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.department?`${item.department.name}-${item.realname}`:item.realname" |
| | | :label="item.companyId?`${item.companyName}-${item.companyName}`:item.realname" |
| | | ></el-option> |
| | | <!-- :label="`${item.department.name}-${item.realname}`" --> |
| | | <!-- <el-option :key="1" :value="1" label="ç¦ç¨" /> --> |
| | |
| | | queryWrapper.selectAll(Bookings.class); |
| | | queryWrapper.selectAs(Rooms::getName, Bookings::getRoomName); |
| | | queryWrapper.selectAs(SystemUser::getRealname, Bookings::getRealName); |
| | | queryWrapper.selectAs(SystemDepartment::getName, Bookings::getDepartmentName); |
| | | queryWrapper.selectAs(Company::getName, Bookings::getDepartmentName); |
| | | |
| | | queryWrapper.leftJoin(Rooms.class, Rooms::getId, Bookings::getRoomId); |
| | | queryWrapper.leftJoin(SystemUser.class, SystemUser::getId, Bookings::getCreator); |
| | | |
| | | queryWrapper.leftJoin(SystemDepartmentUser.class, SystemDepartmentUser::getUserId, Bookings::getCreator); |
| | | queryWrapper.leftJoin(SystemDepartment.class, SystemDepartment::getId, SystemDepartmentUser::getDepartmentId); |
| | | |
| | | queryWrapper.leftJoin(Company.class,Company::getId,SystemUser::getCompanyId); |
| | | queryWrapper.orderByDesc(Bookings::getCreateDate); |
| | | queryWrapper.eq(Bookings::getIsdeleted, MeetConstants.ZERO); |
| | | |
| | |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()), Bookings::getName, pageWrap.getModel().getName()); |
| | | queryWrapper.eq(pageWrap.getModel().getStatus() != null, Bookings::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getRealName()), SystemUser::getRealname, pageWrap.getModel().getRealName()); |
| | | queryWrapper.eq(pageWrap.getModel().getDepartmentId() != null, SystemDepartment::getId, pageWrap.getModel().getDepartmentId()); |
| | | queryWrapper.eq(pageWrap.getModel().getDepartmentId() != null, SystemUser::getId, pageWrap.getModel().getDepartmentId()); |
| | | |
| | | if (pageWrap.getModel().getStartTime() != null) { |
| | | queryWrapper.ge(Bookings::getStartTime, pageWrap.getModel().getStartTime()); |
| | |
| | | queryWrapper.selectAll(Bookings.class); |
| | | queryWrapper.selectAs(Rooms::getName, Bookings::getRoomName); |
| | | queryWrapper.selectAs(SystemUser::getRealname, Bookings::getRealName); |
| | | queryWrapper.selectAs(SystemDepartment::getName, Bookings::getDepartmentName); |
| | | queryWrapper.selectAs(Company::getName, Bookings::getDepartmentName); |
| | | queryWrapper.leftJoin(Rooms.class, Rooms::getId, Bookings::getRoomId); |
| | | queryWrapper.leftJoin(SystemUser.class, SystemUser::getId, Bookings::getCreator); |
| | | queryWrapper.leftJoin(SystemDepartmentUser.class, SystemDepartmentUser::getUserId, Bookings::getCreator); |
| | | queryWrapper.leftJoin(SystemDepartment.class, SystemDepartment::getId, SystemDepartmentUser::getDepartmentId); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,SystemUser::getCompanyId); |
| | | queryWrapper.eq(Bookings::getIsdeleted, MeetConstants.ZERO); |
| | | queryWrapper.eq(queryParam.getId() != null, Bookings::getId, queryParam.getId()); |
| | | queryWrapper.eq(queryParam.getRoomId() != null, Bookings::getRoomId, queryParam.getRoomId()); |
| | |
| | | |
| | | lambdaWrapper.selectAll(Bookings.class) |
| | | .selectAs(SystemUser::getRealname, Bookings::getRealName) |
| | | .selectAs(SystemDepartment::getName, Bookings::getDepartmentName) |
| | | .selectAs(Company::getName, Bookings::getDepartmentName) |
| | | .selectAs(Rooms::getName, Bookings::getRoomName) |
| | | .select("CASE DAYOFWEEK(t.START_TIME)\n" + |
| | | "\tWHEN 1 THEN \t\"æææ¥\" \tWHEN 2 THEN \"ææä¸\"\n" + |
| | |
| | | // .leftJoin(RoomTime.class, RoomTime::getId, BookingTime::getTimeId) |
| | | .leftJoin(SystemUser.class, SystemUser::getId, Bookings::getCreator) |
| | | .leftJoin(Rooms.class, Rooms::getId, Bookings::getRoomId) |
| | | .leftJoin(SystemDepartmentUser.class, SystemDepartmentUser::getUserId, Bookings::getCreator) |
| | | .leftJoin(SystemDepartment.class, SystemDepartment::getId, SystemDepartmentUser::getDepartmentId) |
| | | .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId) |
| | | .eq(Objects.nonNull(roomId), Bookings::getRoomId, roomId) |
| | | .eq(Bookings::getIsdeleted, MeetConstants.ZERO) |
| | | .eq(Bookings::getStatus, MeetConstants.ZERO) |
| | |
| | | ${AnsiColor.BLUE} |
| | | ================================================================================ |
| | | |
| | | 欢è¿ä½¿ç¨ä¼å¨æ¡æ¶ï¼ååºç¨çï¼ |
| | | 欢è¿ä½¿ç¨è±ç±³æ¡æ¶ï¼ååºç¨çï¼ |
| | | Version :: 1.0 |
| | | |
| | | ââââââââ ââ ââ ââ |
| | | ââââââââ âââ âââ ââââ |
| | | âââ âââ âââ ââââââ |
| | | ââââââââ ââââ ââ ââ ââââ |
| | | âââââââ ââââ ââ ââââââââââ |
| | | âââ ââââââ âââââââââââ |
| | | âââââââââ ââââ âââ âââ |
| | | ââââââââ ââ ââ ââ |
| | | ââââââââ ââ ââ |
| | | ââââââââ ââ ââââââ ââ ââ |
| | | âââ ââââ âââ ââââ ââ ââââ |
| | | âââ âââ âââ ââââââ ââââ |
| | | âââ âââ âââ ââââ ââââ |
| | | âââ ââ âââ âââ âââ |
| | | ââââââââââ âââ âââ âââ |
| | | ââââââââ ââ ââ ââ |
| | | |
| | | å¯å¨ç«¯å£: ${server.port} å¯å¨ç¯å¢: ${project.env} æ¥å¿ç级: ${logback.level} å¯ç¨Swagger: ${swagger.enabled} |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å工信æ¯ç»´æ¤æä½åå²ç±»å 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤ 10æ´æ° 11ææé¨ç¦æé 12离è 13æ¢å¤å¨è |
| | | */ |
| | | public enum UserActionType { |
| | | CANCEL_FREEZE(0, "è§£å»","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãè§£å»ã" ), |
| | | FREEZE(1, "å»ç»","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãå»ç»ã" ), |
| | | BLACKLIST(2, "æé»","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãæé»ã"), |
| | | CANCEL_BLACKLIST(3, "æ¢å¤","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãç§»åºé»ååã" ), |
| | | CANVISIT(4, "设为æè®¿äºº","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ã设为æè®¿äººã" ), |
| | | CANCEL_VISIT(5, "åæ¶æè®¿äºº","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãåæ¶æè®¿äººã" ), |
| | | //ç»ä¿éç¥ |
| | | HIGHCHECKOR(6, "设为é«çº§å®¡æ¹äºº","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ã设为é«çº§å®¡æ¹äººã" ), |
| | | CANCEL_HIGHCHECKOR(7, "åæ¶é«çº§å®¡æ¹äºº","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãåæ¶é«çº§å®¡æ¹äººã" ), |
| | | LEVEL(8, "æå¨ç¦»åº","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãæå¨ç¦»åºã" ), |
| | | DELETE(9, "å é¤","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãå é¤ã" ), |
| | | EDIT(10, "æ´æ°","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãæ´æ°ã" ), |
| | | AUTH_ROLE(11, "ææé¨ç¦æé","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãææé¨ç¦æéã" ), |
| | | WORK_OFF(12, "离è","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ã离èãæä½" ), |
| | | WORK_ON(13, "å¨è","ç±ã${param1}ãäºãæä½æ¶é´ï¼${param2}ãï¼è¿è¡ãå¨èãæä½" ), |
| | | ; |
| | | |
| | | // æååé |
| | | private int key; |
| | | private String name; |
| | | private String info; |
| | | |
| | | // æé æ¹æ³ |
| | | UserActionType(int key, String name,String info ) { |
| | | this.key = key; |
| | | this.info = info; |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getInfo() { |
| | | return info; |
| | | } |
| | | |
| | | public void setInfo(String info) { |
| | | this.info = info; |
| | | } |
| | | } |
| | | |
| | | public enum NoticeObjectType { |
| | | MEETING_BOOK_SUCCESS(0, "ä¼ä¸é¢å®æå","ä¼ä¸é¢å®æå"), |
| | | MEETING_CACEL(1, "ä¼è®®åæ¶","ä¼è®®åæ¶"), |
| | |
| | | } |
| | | |
| | | public static int compareDate(String format, String str1, Date date2) { |
| | | |
| | | Date date1 = null; |
| | | try { |
| | | date1 = fromStringToDate(format, str1); |
| | | } catch (ParseException e) { |
| | | } catch (Exception e) { |
| | | // TODO èªå¨çæ catch å |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | |
| | | stringDate = getFomartDate(new Date(now), formate); |
| | | |
| | | } catch (ParseException e) { |
| | | } catch (Exception e) { |
| | | |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | long now = date.getTime() + (long) Integer.parseInt(days) * DAY_IN_MILLISECOND; |
| | | |
| | | date = new Date(now); |
| | | |
| | | } catch (ParseException e) { |
| | | } catch (Exception e) { |
| | | |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | * |
| | | * å符串形å¼è½¬å为Dateç±»å Stringç±»åæç
§formatæ ¼å¼è½¬ä¸ºDateç±»å |
| | | **/ |
| | | public static Date fromStringToDate(String format, String dateTime) throws ParseException { |
| | | public static Date fromStringToDate(String format, String dateTime) { |
| | | Date date = null; |
| | | SimpleDateFormat sdf = new SimpleDateFormat(format); |
| | | date = sdf.parse(dateTime); |
| | | try { |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat(format); |
| | | date = sdf.parse(dateTime); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | return date; |
| | | } |
| | | |
| ÎļþÃû´Ó server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/CompanyMapper.java ÐÞ¸Ä |
| | |
| | | package com.doumee.dao.business; |
| | | package com.doumee.dao.business.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.Company; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.dao.join; |
| | | |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | /** |
| | | * @author T14 |
| | | */ |
| | | //@Repository |
| | | public interface CompanyJoinMapper extends MPJJoinMapper<Company> { |
| | | } |
| ÎļþÃû´Ó server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/Company.java ÐÞ¸Ä |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | 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; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "è´è´£äººç¼ç ï¼å
³èmember)") |
| | | @ExcelColumn(name="è´è´£äººç¼ç ") |
| | | private String headId; |
| | | private Integer headId; |
| | | |
| | | @ApiModelProperty(value = "ERP忥æ¶é´") |
| | | @ExcelColumn(name="ERP忥æ¶é´") |
| | |
| | | @ApiModelProperty(value = "海康é¨é¨çº§å«è·¯å¾", example = "1") |
| | | @ExcelColumn(name="海康é¨é¨çº§å«è·¯å¾") |
| | | private String hkCompanyPath; |
| | | @ApiModelProperty(value = "èªå»ºé¨é¨ç¼ç 级å«è·¯å¾", example = "1") |
| | | @ExcelColumn(name="èªå»ºé¨é¨ç¼ç 级å«è·¯å¾") |
| | | private String companyPath; |
| | | @ApiModelProperty(value = "èªå»ºé¨é¨çº§å«è·¯å¾", example = "1") |
| | | @ExcelColumn(name="èªå»ºé¨é¨çº§å«è·¯å¾") |
| | | private String companyPath; |
| | | private String companyNamePath; |
| | | @ApiModelProperty(value = "ç¶çº§é¨é¨çº§å«è·¯å¾", example = "1") |
| | | @TableField(exist = false) |
| | | private String parentCompanyPath; |
| | |
| | | |
| | | @ApiModelProperty(value = "0 å¯ç¨ 1 ç¦ç¨") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "ä¼ä¸ç¼ç ï¼å
³ècompanyï¼") |
| | | private Integer companyId; |
| | | @ApiModelProperty(value = "0 å¯ç¨ 1 ç¦ç¨") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | } |
| | |
| | | @Override |
| | | public PageData<SystemUserListVO> findPage(PageWrap<QuerySystemUserDTO> pageWrap) { |
| | | // æ ¹é¨é¨æ¡ä»¶å¤çï¼éæ¥è¯¢æ ¹é¨é¨ä¸ææé¨é¨çç¨æ·ï¼ |
| | | if (pageWrap.getModel().getRootDeptId() != null) { |
| | | /* if (pageWrap.getModel().getRootDeptId() != null) { |
| | | pageWrap.getModel().setDepartmentIds(getDeptIds(pageWrap.getModel().getRootDeptId())); |
| | | } else { |
| | | List<SystemDepartment> list = systemDepartmentService.findList(new QueryWrapper<>()); |
| | | List<Integer> collect = list.stream().map(s -> s.getId()).collect(Collectors.toList()); |
| | | pageWrap.getModel().setDepartmentIds(collect); |
| | | } |
| | | }*/ |
| | | // æ§è¡æ¥è¯¢ |
| | | PageHelper.startPage(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | List<SystemUserListVO> userList = systemUserMapper.selectManageList(pageWrap.getModel(), pageWrap.getOrderByClause()); |
| | |
| | | <!-- æ¥è¯¢ç¨æ·å表 --> |
| | | <resultMap id="SystemUserListVO" type="com.doumee.dao.system.vo.SystemUserListVO" autoMapping="true"> |
| | | <id column="ID" property="id"/> |
| | | <association property="department" javaType="com.doumee.dao.system.model.SystemDepartment"> |
| | | <!-- <association property="department" javaType="com.doumee.dao.system.model.SystemDepartment"> |
| | | <result column="DEPARTMENT_ID" property="id"/> |
| | | <result column="DEPARTMENT_NAME" property="name"/> |
| | | </association> |
| | | </association>--> |
| | | <association property="createUserInfo" javaType="com.doumee.dao.system.model.SystemUser"> |
| | | <result column="CREATE_USER_ID" property="id"/> |
| | | <result column="CREATE_USER_NAME" property="username"/> |
| | |
| | | usr.ID, usr.BIRTHDAY, usr.EMAIL, usr.EMP_NO, usr.MOBILE, usr.AVATAR, usr.USERNAME, usr.REALNAME, usr.SEX, usr.FIXED, usr.CREATE_TIME, usr.UPDATE_TIME, |
| | | sd.ID AS DEPARTMENT_ID, sd.`NAME` AS DEPARTMENT_NAME,usr.wechat_name,usr.status,usr.OPENID,usr.type, |
| | | create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME, create_user.`REALNAME` CREATE_REAL_NAME, |
| | | update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME, create_user.`REALNAME` UPDATE_REAL_NAME |
| | | update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME, create_user.`REALNAME` UPDATE_REAL_NAME, |
| | | sd.name as companyName |
| | | FROM `SYSTEM_USER` usr |
| | | LEFT JOIN `SYSTEM_USER` create_user ON create_user.ID = usr.CREATE_USER |
| | | LEFT JOIN `SYSTEM_USER` update_user ON update_user.ID = usr.UPDATE_USER |
| | | -- LEFT JOIN `SYSTEM_POSITION_USER` spu ON spu.USER_ID = usr.ID AND spu.DELETED = 0 |
| | | -- LEFT JOIN `SYSTEM_POSITION` sp ON sp.ID = spu.POSITION_ID AND sp.DELETED = 0 |
| | | LEFT JOIN `SYSTEM_DEPARTMENT_USER` sdu ON sdu.USER_ID = usr.ID AND sdu.DELETED = 0 |
| | | LEFT JOIN `SYSTEM_DEPARTMENT` sd ON sd.ID = sdu.DEPARTMENT_ID AND sd.DELETED = 0 |
| | | LEFT JOIN `company` sd ON sd.ID = usr.COMPANY_ID AND sd.ISDELETED = 0 |
| | | <if test="dto.roleId != null"> |
| | | RIGHT JOIN system_user_role sur on sur.USER_ID = usr.ID and sur.ROLE_ID = #{dto.roleId} |
| | | </if> |
| | |
| | | <!-- AND spu.POSITION_ID = #{dto.positionId}--> |
| | | <!-- </if>--> |
| | | <if test="dto.strictDeptId != null"> |
| | | AND sdu.DEPARTMENT_ID = #{dto.strictDeptId} |
| | | AND sd.ID = #{dto.strictDeptId} |
| | | </if> |
| | | <if test="dto.departmentIds != null and dto.departmentIds.size > 0"> |
| | | AND sdu.DEPARTMENT_ID IN |
| | | AND sd.ID IN |
| | | <foreach collection="dto.departmentIds" open="(" close=")" separator="," item="id"> |
| | | #{id} |
| | | </foreach> |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | | import com.doumee.service.business.MemberService; |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:member:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | memberService.deleteById(id); |
| | | memberService.deleteById(id,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.deleteByIdInBatch(idList); |
| | | memberService.deleteByIdInBatch(idList,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("人åç§»é¤/è§£å»") |
| | | @PostMapping("/updateRemoveStatusById") |
| | | @RequiresPermissions("business:member:update") |
| | | public ApiResponse updateRemoveStatusById(@RequestBody List<Member> list){ |
| | | if(list.size()>0){ |
| | | memberService.updateRemoveStatusById(list); |
| | | return ApiResponse.success(null); |
| | | }else{ |
| | | return ApiResponse.failed("åæ°é误"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @ApiOperation("人åæé»/å»ç»") |
| | | @PostMapping("/updateVisitsStatusById") |
| | | @RequiresPermissions("business:member:update") |
| | | public ApiResponse updateVisitsStatusById(@RequestBody Member member){ |
| | | memberService.updateVisitsStatusById(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ¹éæé»") |
| | | @GetMapping("/batchBlock") |
| | | @RequiresPermissions("business:member:delete") |
| | |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.batchBlock(idList,2); |
| | | memberService.batchBlock(idList,2,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.batchBlock(idList,1); |
| | | memberService.batchBlock(idList,1,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | return ApiResponse.success(memberService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å页å³å¡ç¨æ·ä¿¡æ¯æ¥è¯¢") |
| | | @PostMapping("/findLaborMemberInfoPage") |
| | | @RequiresPermissions("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findLaborMemberInfoPage(@RequestBody PageWrap<MemberInfoDTO> pageWrap){ |
| | | return ApiResponse.success(memberService.findLaborMemberInfoPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | |
| | | @ApiOperation("å页æ¥è¯¢å
é¨äººåä¿¡æ¯") |
| | | @PostMapping("/findMemberInfoPage") |
| | | @RequiresPermissions("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findMemberInfoPage(@RequestBody PageWrap<MemberQuery> pageWrap){ |
| | | public ApiResponse<PageData<Member>> findMemberInfoPage(@RequestBody PageWrap<MemberQuery> pageWrap){ |
| | | if(pageWrap.getModel().getType().equals(Constants.memberType.visitor)){ |
| | | return ApiResponse.success(memberService.findVisitPage(pageWrap)); |
| | | }else if(pageWrap.getModel().getType().equals(Constants.memberType.internal)){ |
| | |
| | | @ApiOperation("å页æ¥è¯¢è®¿å®¢äººåä¿¡æ¯") |
| | | @PostMapping("/findVisitPage") |
| | | @RequiresPermissions("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findVisitPage (@RequestBody PageWrap<MemberQuery> pageWrap) { |
| | | public ApiResponse<PageData<Member>> findVisitPage (@RequestBody PageWrap<MemberQuery> pageWrap) { |
| | | return ApiResponse.success(memberService.findVisitPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("å¼å¸¸äººåå»ç»/æé»") |
| | | @PostMapping("/findUnusualPage") |
| | | @RequiresPermissions("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findUnusualPage (@RequestBody PageWrap<MemberQuery> pageWrap) { |
| | | public ApiResponse<PageData<Member>> findUnusualPage (@RequestBody PageWrap<MemberQuery> pageWrap) { |
| | | return ApiResponse.success(memberService.findUnusualPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("å建å³å¡å
¬å¸") |
| | | @PostMapping("/createLaborServices") |
| | | @CloudRequiredPermission("business:company:create") |
| | | public ApiResponse<Integer> createLaborServices(@RequestBody Company company,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<Integer> createLaborServices(@RequestBody Company company, @RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | company.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(companyService.createLaborServices(company)); |
| | | } |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:member:create") |
| | | public ApiResponse create(@RequestBody Member member) { |
| | | return ApiResponse.success(memberService.create(member)); |
| | | public ApiResponse create(@RequestBody Member member,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin()) == DataSyncConfig.origin.self){ |
| | | member.setLoginUserInfo(this.getLoginUser(token)); |
| | | Member insert = memberService.create(member); |
| | | //å建人è¸ä¿¡æ¯ |
| | | return ApiResponse.success("æä½æåï¼"); |
| | | }else{ |
| | | return ApiResponse.failed("对ä¸èµ·ï¼æ æéæä½ï¼"); |
| | | } |
| | | } |
| | | |
| | | @PreventRepeat |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:member:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | memberService.deleteById(id); |
| | | memberService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | for (String id : idArray ){ |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.deleteByIdInBatch(idList); |
| | | memberService.deleteByIdInBatch(idList,this.getLoginUser(null)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse updateById(@RequestBody Member member,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | member.setLoginUserInfo(this.getLoginUser(token)); |
| | | memberService.updateById(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("设置æåæ¶ä¸»ç®¡") |
| | | @PostMapping("/updateHead") |
| | | @CloudRequiredPermission("business:member:head") |
| | | public ApiResponse updateHead(@RequestBody Member member,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | member.setLoginUserInfo(this.getLoginUser(token)); |
| | | memberService.updateHead(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®ID ç¦å¯ç¨ ") |
| | | @PostMapping("/updateStatusById") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse updateStatusById(@RequestBody Member member){ |
| | | public ApiResponse updateStatusById(@RequestBody Member member,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | member.setLoginUserInfo(this.getLoginUser(token)); |
| | | memberService.updateStatusById(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("人åç§»é¤/è§£å»") |
| | | @PostMapping("/updateRemoveStatusById") |
| | | @ApiOperation("æ ¹æ®ID 设置å¨èã离è ") |
| | | @PostMapping("/updateWorkStatus") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse updateRemoveStatusById(@RequestBody List<Member> list){ |
| | | if(list.size()>0){ |
| | | memberService.updateRemoveStatusById(list); |
| | | return ApiResponse.success(null); |
| | | }else{ |
| | | return ApiResponse.failed("åæ°é误"); |
| | | } |
| | | |
| | | } |
| | | |
| | | @ApiOperation("人åæé»/å»ç»") |
| | | @PostMapping("/updateVisitsStatusById") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse updateVisitsStatusById(@RequestBody Member member){ |
| | | memberService.updateVisitsStatusById(member); |
| | | public ApiResponse updateWorkStatus(@RequestBody Member member,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | member.setLoginUserInfo(this.getLoginUser(token)); |
| | | memberService.updateWorkStatus(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("æ¹éæé»") |
| | | @GetMapping("/batchBlock") |
| | | @CloudRequiredPermission("business:member:delete") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse batchBlock(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray ){ |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.batchBlock(idList,2); |
| | | memberService.batchBlock(idList,2,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå»ç»") |
| | | @GetMapping("/batchFreeze") |
| | | @CloudRequiredPermission("business:member:delete") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse batchFreeze(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray ){ |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.batchBlock(idList,1); |
| | | memberService.batchBlock(idList,1,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éç§»åºé»åå") |
| | | @GetMapping("/batchRemoveBlock") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse batchCancelBlock(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray ){ |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.batchRemoveBlock(idList,2,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éè§£é¤å»ç»") |
| | | @GetMapping("/batchRemoveFreeze") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse batchRemoveFreeze(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray ){ |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | memberService.batchRemoveBlock(idList,1,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @ApiOperation("æ¯å¦å¯æè®¿ç¶æä¿®æ¹") |
| | | @PostMapping("/updateCanVisitById") |
| | | @CloudRequiredPermission("business:member:update") |
| | | public ApiResponse updateCanVisitById(@RequestBody Member member){ |
| | | public ApiResponse updateCanVisitById(@RequestBody Member member,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | member.setLoginUserInfo(this.getLoginUser(token)); |
| | | memberService.updateCanVisitById(member); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | public ApiResponse<PageData<Member>> findPage (@RequestBody PageWrap<Member> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(memberService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å页å³å¡ç¨æ·ä¿¡æ¯æ¥è¯¢") |
| | | @PostMapping("/findLaborMemberInfoPage") |
| | | @ApiOperation("æ¥è¯¢å
¨é¨") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findLaborMemberInfoPage(@RequestBody PageWrap<MemberInfoDTO> pageWrap){ |
| | | return ApiResponse.success(memberService.findLaborMemberInfoPage(pageWrap)); |
| | | public ApiResponse<List<Member>> findPage (@RequestBody Member model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(memberService.findList(model)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | |
| | | @ApiOperation("å页æ¥è¯¢å
é¨äººåä¿¡æ¯") |
| | | @PostMapping("/findMemberInfoPage") |
| | | @CloudRequiredPermission("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findMemberInfoPage(@RequestBody PageWrap<MemberQuery> pageWrap){ |
| | | public ApiResponse<PageData<Member>> findMemberInfoPage(@RequestBody PageWrap<MemberQuery> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | if(pageWrap.getModel().getType().equals(Constants.memberType.visitor)){ |
| | | return ApiResponse.success(memberService.findVisitPage(pageWrap)); |
| | | }else if(pageWrap.getModel().getType().equals(Constants.memberType.internal)){ |
| | |
| | | @ApiOperation("å页æ¥è¯¢è®¿å®¢äººåä¿¡æ¯") |
| | | @PostMapping("/findVisitPage") |
| | | @CloudRequiredPermission("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findVisitPage (@RequestBody PageWrap<MemberQuery> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<PageData<Member>> findVisitPage (@RequestBody PageWrap<MemberQuery> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(memberService.findVisitPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("å¼å¸¸äººåå»ç»/æé»") |
| | | @PostMapping("/findUnusualPage") |
| | | @CloudRequiredPermission("business:member:query") |
| | | public ApiResponse<PageData<MemberInfoDTO>> findUnusualPage (@RequestBody PageWrap<MemberQuery> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | public ApiResponse<PageData<Member>> findUnusualPage (@RequestBody PageWrap<MemberQuery> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(memberService.findUnusualPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public static String getRootOrg() { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.rootOrg); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, "", null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog("",result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.rootOrg,null); |
| | | } |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public static String editOrg(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.editOrg); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.editOrg,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String addBatchOrg(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.addBatchOrg); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.addBatchOrg,body); |
| | | } |
| | | /** |
| | | * å é¤ç»ç»ä¿¡æ¯ |
| | |
| | | * @return |
| | | */ |
| | | public static String delOrg(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.delBatchOrg); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.delBatchOrg,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String addUser(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.addUser); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.addUser,body); |
| | | } |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public static String addBatchUser(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.addBatchUser); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.addBatchUser,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String delBatchUser(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.delBatchUser); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.delBatchUser,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String editUser(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.editUser); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.editUser,body); |
| | | } |
| | | /** |
| | | * æ·»å 人è¸ä¿¡æ¯ |
| | |
| | | * @return |
| | | */ |
| | | public static String addFace(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.addFace); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.addFace,body); |
| | | } |
| | | /** |
| | | * ç¼è¾äººè¸ä¿¡æ¯ |
| | |
| | | * @return |
| | | */ |
| | | public static String editFace(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.editFace); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.editFace,body); |
| | | } |
| | | /** |
| | | * å é¤äººè¸ä¿¡æ¯ |
| | |
| | | * @return |
| | | */ |
| | | public static String delFace(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.delFace); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.delFace,body); |
| | | } |
| | | /** |
| | | * å
¨éè·å车åºä¿¡æ¯ |
| | |
| | | * @return |
| | | */ |
| | | public static String parkList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.getParkList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.getParkList,body); |
| | | } |
| | | /** |
| | | * æ ¹æ®è½¦åºç¼ç æ¥è¯¢åºå
¥å£å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String entranceList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.getEntranceList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.getEntranceList,body); |
| | | } |
| | | /** |
| | | * 车è¾é¢çº¦ |
| | |
| | | * @return |
| | | */ |
| | | public static String parkAddition(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.parkAddition); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.parkAddition,body); |
| | | } |
| | | /** |
| | | * 车è¾åæ¶é¢çº¦ |
| | |
| | | * @return |
| | | */ |
| | | public static String parkDeletion(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.parkDeletion); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.parkDeletion,body); |
| | | } |
| | | /** |
| | | * åºå®è½¦è¾å
å¼ï¼å
æï¼ |
| | |
| | | * @return |
| | | */ |
| | | public static String carChargeAddtion(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.carChargeAddtion); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.carChargeAddtion,body); |
| | | } |
| | | /** |
| | | * åºå®è½¦è¾åæ¶å
æ |
| | |
| | | * @return |
| | | */ |
| | | public static String carChargeDeletion(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.carChargeDeletion); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.carChargeDeletion,body); |
| | | } |
| | | |
| | | |
| | |
| | | * @return |
| | | */ |
| | | public static InputStream getVisitPicture(String body) throws Exception{ |
| | | |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.visitPicture); |
| | | //åæ°æ ¹æ®æ¥å£å®é
æ
åµè®¾ç½® |
| | | HttpResponse resp = ArtemisHttpUtil.doPostStringImgArtemis( path, body, null, null,"application/json",null); |
| | |
| | | * @return |
| | | */ |
| | | public static String doorSearch(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.doorSearch); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.doorSearch,body); |
| | | } |
| | | /** |
| | | * è·åé¨ç¦è®¾å¤å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String acsDeviceList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.acsDeviceList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.acsDeviceList,body); |
| | | } |
| | | /** |
| | | * å¢éè·åé¨ç¦è®¾å¤å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String acsDeviceTimeRangeList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.acsDeviceList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.acsDeviceList,body); |
| | | } |
| | | /** |
| | | * 访客é¢çº¦ |
| | |
| | | * @return |
| | | */ |
| | | public static String visitAppiontment(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.visitAppiontment); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitAppiontment,body); |
| | | } |
| | | /** |
| | | * 访客å
ç»è®°é¢çº¦ |
| | |
| | | * @return |
| | | */ |
| | | public static String visitAppiontmentMDJ(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.visitAppiontmentMDJ); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitAppiontmentMDJ,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String visitCancel(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.visitCancel); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitCancel,body); |
| | | } |
| | | |
| | | public static String startDoPostStringArtemis(String pathStr,String body){ |
| | | Map<String, String> path = getPath(pathStr); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("tagId", UUID.randomUUID().toString().replace("-", "")); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return result; |
| | | |
| | | } |
| | | /** |
| | | * ç¾ç¦»è®¿å®¢é¢çº¦ |
| | |
| | | * @return |
| | | */ |
| | | public static String visitOut(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.visitOut); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitOut,body); |
| | | } |
| | | /** |
| | | * 访客æéç» |
| | |
| | | * @return |
| | | */ |
| | | public static String privilegeGroup(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.privilegeGroup); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.privilegeGroup,body); |
| | | } |
| | | /** |
| | | * äºä»¶è®¢é
|
| | |
| | | * @return |
| | | */ |
| | | public static String eventSub(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.eventSub); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.eventSub,body); |
| | | } |
| | | /** |
| | | * åæ¶äºä»¶è®¢é
|
| | |
| | | * @return |
| | | */ |
| | | public static String cancelEventSub(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.cancelEventSub); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.cancelEventSub,body); |
| | | } |
| | | /** |
| | | * å建ä¸å¡éæéä¸è½½ä»»å¡ |
| | |
| | | * @return |
| | | */ |
| | | public static String taskAddition(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.taskAddition); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.taskAddition,body); |
| | | } |
| | | /** |
| | | * æ¥è¯¢ä¸å¡éæéæ¥è¯¢è®¾å¤ééç人åæéä¸è½½è¯¦æ
æ»æ°v2 |
| | |
| | | * @return |
| | | */ |
| | | public static String taskProgress(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.taskProgress); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.taskProgress,body); |
| | | } |
| | | /** |
| | | * æ¥è¯¢ä¸å¡éæéä¸è½½ä»»å¡è¿åº¦ |
| | |
| | | * @return |
| | | */ |
| | | public static String taskProgressNum(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.taskProgressNum); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.taskProgressNum,body); |
| | | } |
| | | /** |
| | | * ä¸å¡éæéä¸è½½ä»»å¡ä¸æ·»å æ°æ®_æ ¹æ®äººåä¸è®¾å¤ééæå®ä¸è½½ |
| | |
| | | * @return |
| | | */ |
| | | public static String taskDataAddition(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.taskDataAddition); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.taskDataAddition,body); |
| | | } |
| | | /** |
| | | * ä¸å¡éå¼å§ä¸è½½ä»»å¡ |
| | |
| | | * @return |
| | | */ |
| | | public static String taskStart(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.taskStart); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.taskStart,body); |
| | | } |
| | | /** |
| | | * æ¥è¯¢æéæ¡ç®å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String authItemList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.authItemList); |
| | | Map<String, String> header = new HashMap<>(); |
| | | header.put("tagId", UUID.randomUUID().toString().replace("-", "")); |
| | | // header.put("tagId", "frs"); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.authItemList,body); |
| | | } |
| | | /** |
| | | * æ¹éå¼å¡ |
| | |
| | | * @return |
| | | */ |
| | | public static String cardBingding(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.cardBingding); |
| | | Map<String, String> header = new HashMap<>(); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.cardBingding,body); |
| | | } |
| | | /** |
| | | * éå¡ |
| | |
| | | * @return |
| | | */ |
| | | public static String cardDeletion(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.cardDeletion); |
| | | Map<String, String> header = new HashMap<>(); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.cardDeletion,body); |
| | | } |
| | | /** |
| | | * æ¹éæå¤± |
| | |
| | | * @return |
| | | */ |
| | | public static String cardLoss(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.cardLoss); |
| | | Map<String, String> header = new HashMap<>(); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.cardLoss,body); |
| | | } |
| | | /** |
| | | * æ¹éè§£æ |
| | |
| | | * @return |
| | | */ |
| | | public static String cardUnloss(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.cardUnloss); |
| | | Map<String, String> header = new HashMap<>(); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.cardUnloss,body); |
| | | } |
| | | /** |
| | | * æ¥è¯¢è®¾å¤ééç人åæéä¸è½½è¯¦æ
|
| | |
| | | * @return |
| | | */ |
| | | public static String taskPersoDetail(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.taskPersoDetail); |
| | | Map<String, String> header = new HashMap<>(); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", header);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.taskPersoDetail,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String visitingRecords(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.visitingRecords); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.visitingRecords,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String appointmentRecords(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.appointmentRecords); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.appointmentRecords,body); |
| | | } |
| | | /** |
| | | * è·åå
¨éç»ç»å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String orgAllList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.orgAllList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.orgAllList,body); |
| | | } |
| | | /** |
| | | * è·åå
¨éç¨æ·å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String userAllList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.userAllList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.userAllList,body); |
| | | } |
| | | /** |
| | | * è·åå
¨éç¨æ·å表2(æ ¹æ®æ¡ä»¶å页æ¥è¯¢ï¼ |
| | |
| | | * @return |
| | | */ |
| | | public static String personList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.personList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.personList,body); |
| | | } |
| | | /** |
| | | * å¢éè·åç»ç»å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String orgTimeRangeList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.orgTimeRangeList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.orgTimeRangeList,body); |
| | | } |
| | | /** |
| | | * å¢éè·åç¨æ·å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String userTimeRangeList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.userTimeRangeList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.userTimeRangeList,body); |
| | | } |
| | | /** |
| | | * å¢éè·å车è¾å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String vehicleTimeRangeList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.vehicleTimeRangeList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.vehicleTimeRangeList,body); |
| | | } |
| | | /** |
| | | * å
¨éè·å车è¾å表 |
| | |
| | | * @return |
| | | */ |
| | | public static String vehicleList(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.vehicleList); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.vehicleList,body); |
| | | } |
| | | /** |
| | | * å车åºè¿è½¦è®°å½æ¥è¯¢ |
| | |
| | | * @return |
| | | */ |
| | | public static String parkCrossRecords(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.parkCrossRecords); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.parkCrossRecords,body); |
| | | } |
| | | /** |
| | | * å车åºè¿è½¦è®°å½æ¥è¯¢ |
| | | * 人è¸è¯å |
| | | * @param body |
| | | * @return |
| | | */ |
| | | public static String facePictureCheck(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.facePictureCheck); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.facePictureCheck,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String acsDeviceStatus(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.acsDeviceStatus); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.acsDeviceStatus,body); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public static String tempCarInRecords(String body) { |
| | | Map<String, String> path = getPath(HKConstants.InterfacePath.tempCarInRecords); |
| | | String result = ArtemisHttpUtil.doPostStringArtemis(path, body, null, null, "application/json", null);// post请æ±application/jsonç±»ååæ° |
| | | saveInterfaceLog(body,result,path); |
| | | return result; |
| | | return startDoPostStringArtemis(HKConstants.InterfacePath.tempCarInRecords,body); |
| | | } |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "erpæºæä¸»é® ") |
| | | private String erpOrgId; |
| | | @ApiModelProperty(value = "æºæä¸»é® ") |
| | | private String companyId; |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å
å«ä¸çº§ç»ç»ç¨æ·") |
| | | private Boolean includeChild; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.model.CarEvent; |
| | | import com.doumee.dao.business.model.Member; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | * @date 2023/11/30 15:33 |
| | | */ |
| | | public interface MemberMapper extends BaseMapper<Member> { |
| | | |
| | | |
| | | @Select(" select m.* , c.name as companyName , " + |
| | | " (select count(0) from member_card mc where mc.MEMBER_ID=m.id and mc.ISDELETED=0) as memberCardCount, " + |
| | | " (select GROUP_CONCAT(dr.name) from member_role mr left join device_role dr on dr.id=mr.ROLE_ID " + |
| | | " where mr.MEMBER_ID=m.id and mr.ISDELETED=0 GROUP BY mr.MEMBER_ID) as roleName "+ |
| | | " from member m " + |
| | | " left join company c on m.COMPANY_ID=c.id "+ |
| | | " ${ew.customSqlSegment} ") |
| | | IPage<MemberInfoDTO> getPage(IPage<MemberInfoDTO> page, @Param(Constants.WRAPPER) Wrapper wrapper); |
| | | |
| | | |
| | | void insertBatchSomeColumn(List<Member> list); |
| | | } |
| | |
| | | |
| | | 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("`member`") |
| | | public class Member { |
| | | public class Member extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | |
| | | @ApiModelProperty(value = "访客åç§°/å
é¨äººå") |
| | | @ExcelColumn(name="访客åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "访客年é¾") |
| | | @ExcelColumn(name="访客年é¾") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | |
| | | @ApiModelProperty(value = "身份è¯å·ï¼MD4å å¯ï¼") |
| | | @ExcelColumn(name="身份è¯å·ï¼MD4å å¯ï¼") |
| | | private String idcardNo; |
| | | @ApiModelProperty(value = "ä¿®æ¹ç身份è¯å· ") |
| | | @TableField(exist = false) |
| | | private String idcardNoNew; |
| | | |
| | | @ApiModelProperty(value = "è¯ä»¶æ¾ç¤ºä¿¡æ¯") |
| | | @ExcelColumn(name="è¯ä»¶æ¾ç¤ºä¿¡æ¯") |
| | |
| | | @ApiModelProperty(value = "æµ·åº·åæ¥ç¶æ 0æªåæ¥ 1已忥 2åæ¥å¤±è´¥ 3ä¸ç¬¦åä¸åæ¡ä»¶ 4çå¾
å 餿é ", example = "1") |
| | | @ExcelColumn(name="æµ·åº·åæ¥ç¶æ 0æªåæ¥ 1已忥 2åæ¥å¤±è´¥ 3ä¸ç¬¦åä¸åæ¡ä»¶ 4çå¾
å 餿é") |
| | | private Integer hkStatus; |
| | | @ApiModelProperty(value = "海康ææç¶æ 0æªææ 1å·²ææ ", example = "1") |
| | | @ExcelColumn(name="海康ææç¶æ 0æªææ 1å·²ææ ") |
| | | private Integer authStatus; |
| | | |
| | | @ApiModelProperty(value = "海康æè¿åæ¥æ¶é´") |
| | | @ExcelColumn(name="海康æè¿åæ¥æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date hkDate; |
| | | |
| | | @ApiModelProperty(value = "å¨èç¶æ 0å¨è 1离è", example = "1") |
| | | @ExcelColumn(name="å¨èç¶æ 0å¨è 1离è") |
| | | private Integer workStatus; |
| | | @ApiModelProperty(value = "ERPæ è¯", example = "1") |
| | | @ExcelColumn(name="ERPæ è¯") |
| | | private String erpId; |
| | |
| | | @ApiModelProperty(value = "ç»ç»åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "æåæä½äºº") |
| | | @TableField(exist = false) |
| | | private String editorName; |
| | | @ApiModelProperty(value = "ç»ç»ç±»å") |
| | | @TableField(exist = false) |
| | | private Integer companyType; |
| | | @ApiModelProperty(value = "ç»ç»ç¼ç è·¯å¾") |
| | | @TableField(exist = false) |
| | | private String companyPath; |
| | | @ApiModelProperty(value = "è´è´£äººç¼ç ï¼å
³èmember)") |
| | | @TableField(exist = false) |
| | | private Integer headId; |
| | | @ApiModelProperty(value = "ç»ç»è·¯å¾") |
| | | @TableField(exist = false) |
| | | private String companyNamePath; |
| | | @ApiModelProperty(value = "ç»ç»æµ·åº·ç¼ç ") |
| | | @TableField(exist = false) |
| | | private String hkOrgId; |
| | |
| | | @ApiModelProperty(value = "å§å/ææºå·/å·¥å·") |
| | | @TableField(exist = false) |
| | | private String keyword; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦æäººè¸ï¼0=æ ï¼1=æï¼") |
| | | @TableField(exist = false) |
| | |
| | | @ExcelColumn(name="é¨ç¦æææç»æ",index= 6,dateFormat = "yyyy-MM-dd") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value = "人è¸ç
§ç宿´å°å") |
| | | @TableField(exist = false) |
| | | private String faceImgFull; |
| | | @ApiModelProperty(value = "人è¸ç
§ç宿´å°å") |
| | | @TableField(exist = false) |
| | | private String imgurlFull; |
| | | @ApiModelProperty(value = "æ¯å¦ä¸»ç®¡ 0å¦ 1æ¯", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer headStatus; |
| | | |
| | | @ApiModelProperty(value = "é¨ç¦è§è²åç§°") |
| | | @TableField(exist = false) |
| | | private String roleName; |
| | | |
| | | @ApiModelProperty(value = "é¨ç¦ç»åç§°éå") |
| | | @TableField(exist = false) |
| | | private List<String> roleNames; |
| | | |
| | | } |
| | |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤", example = "1") |
| | | @ExcelColumn(name="ç±»å 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤") |
| | | @ApiModelProperty(value = "ç±»å 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤ 10æ´æ°", example = "1") |
| | | @ExcelColumn(name="ç±»å 0è§£å» 1å»ç» 2æé» 3æ¢å¤ 4设为æè®¿äºº 5åæ¶æè®¿äºº 6设为é«çº§å®¡æ¹äºº 7åæ¶é«çº§å®¡æ¹äºº 8æå¨ç¦»åº 9å é¤ 10æ´æ°") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "人åæä½è®°å½æ¥å¿") |
| | |
| | | import com.doumee.dao.admin.request.UpdateCompanySortDTO; |
| | | import com.doumee.dao.admin.response.CompanyDTO; |
| | | import com.doumee.dao.business.model.Company; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | 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.admin.request.LaborEmpowerDTO; |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.admin.response.StagingDataVO; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.web.reqeust.AccountLoginDTO; |
| | |
| | | * @param member å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(Member member); |
| | | Member create(Member member); |
| | | |
| | | /** |
| | | * |
| | |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | void deleteById(Integer id,LoginUserInfo user); |
| | | |
| | | void roleAuthById(Integer id); |
| | | |
| | |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | void deleteByIdInBatch(List<Integer> ids,LoginUserInfo user); |
| | | |
| | | void batchBlock(List<Integer> ids,Integer type); |
| | | void batchBlock(List<Integer> ids, Integer type, LoginUserInfo loginUserInfo); |
| | | void batchRemoveBlock(List<Integer> ids, Integer type, LoginUserInfo loginUserInfo); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | |
| | | * @param member å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(Member member); |
| | | void updateFace(Member member); |
| | | |
| | | boolean updateFace(Member member); |
| | | |
| | | /** |
| | | * 䏻鮿´æ°å³å¡äººåç¶æ |
| | |
| | | */ |
| | | void updateStatusById(Member member); |
| | | |
| | | void updateVisitsStatusById(Member member); |
| | | |
| | | void updateRemoveStatusById(List<Member> members); |
| | | |
| | | void updateCanVisitById(Member member); |
| | | /** |
| | |
| | | |
| | | |
| | | /** |
| | | * å页å³å¡ç¨æ·ä¿¡æ¯æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<Member> |
| | | */ |
| | | PageData<MemberInfoDTO> findLaborMemberInfoPage(PageWrap<MemberInfoDTO> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param member å®ä½å¯¹è±¡ |
| | |
| | | * @param pageWrap |
| | | * @return |
| | | */ |
| | | PageData<MemberInfoDTO> findMemberInfoPage(PageWrap<MemberQuery> pageWrap); |
| | | PageData<Member> findMemberInfoPage(PageWrap<MemberQuery> pageWrap); |
| | | |
| | | PageData<MemberInfoDTO> findVisitPage(PageWrap<MemberQuery> pageWrap); |
| | | PageData<Member> findVisitPage(PageWrap<MemberQuery> pageWrap); |
| | | |
| | | PageData<MemberInfoDTO> findUnusualPage(PageWrap<MemberQuery> pageWrap); |
| | | PageData<Member> findUnusualPage(PageWrap<MemberQuery> pageWrap); |
| | | |
| | | /** |
| | | * 宿¶å»ç»å
é¨äººå |
| | |
| | | void empowerByList(Member member); |
| | | |
| | | void delHkForce(Member member); |
| | | |
| | | void updateHead(Member member); |
| | | |
| | | void updateWorkStatus(Member member); |
| | | } |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.request.CarsQuery; |
| | | import com.doumee.dao.admin.response.CarsDTO; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.CarsMapper; |
| | | import com.doumee.dao.business.join.CarJoinMapper; |
| | | import com.doumee.dao.business.join.ParkBookJoinMapper; |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.request.UpdateCompanySortDTO; |
| | | import com.doumee.dao.admin.response.CompanyDTO; |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.join.CompanyJoinMapper; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.dao.join.CompanyJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.vo.CompanyTree; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.CompanyService; |
| | | import com.doumee.dao.business.vo.CompanyTree; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | user = company.getLoginUserInfo(); |
| | | } |
| | | String rootOrgId = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_ROOTORG_CODE).getCode(); |
| | | company.setCompanyPath(company.getName());//åç§°è·¯å¾ |
| | | company.setCompanyPath(company.getId()+"/");//åç§°è·¯å¾ |
| | | company.setCompanyNamePath(company.getName());//åç§°è·¯å¾ |
| | | company.setHkParentId(rootOrgId); |
| | | if(company.getParentId() !=null){ |
| | | Company parent = findById(company.getParentId()); |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "对ä¸èµ·ï¼ç¶çº§ç»ç»ä¿¡æ¯å°æªåæ¥ä¸åæå~"); |
| | | } |
| | | company.setHkParentId(parent.getHkId()); |
| | | company.setCompanyPath(parent.getCompanyPath()+"/"+company.getName()); |
| | | company.setCompanyPath(parent.getCompanyPath()+company.getId()+"/"); |
| | | company.setCompanyNamePath(parent.getCompanyNamePath()+"/"+company.getName()); |
| | | } |
| | | company.setHkCompanyPath(company.getCompanyPath()); |
| | | company.setCreateDate(new Date()); |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.AcsDeviceListRequest; |
| | | import com.doumee.core.haikang.model.param.respose.AcsDeviceInfoResponse; |
| | | import com.doumee.core.haikang.model.param.respose.AcsDeviceListResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | 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.DeviceMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Device; |
| | | import com.doumee.dao.business.model.Retention; |
| | | import com.doumee.service.business.DeviceService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 设å¤ä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Date; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.EmpowerMapper; |
| | | import com.doumee.dao.business.join.EmpowerJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import cn.hutool.core.util.PhoneUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.UserAddRequest; |
| | | import com.doumee.core.haikang.model.param.request.UserDelRequest; |
| | | import com.doumee.core.haikang.model.param.respose.UserAddResponse; |
| | | import com.doumee.core.haikang.model.param.respose.UserDelResponse; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | 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.DESUtil; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.core.utils.*; |
| | | import com.doumee.core.utils.redis.RedisUtil; |
| | | import com.doumee.core.wx.WXConstant; |
| | | import com.doumee.dao.admin.request.LaborEmpowerDTO; |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.request.MemberQuery; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.admin.response.StagingDataVO; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.join.RetentionJoinMapper; |
| | | import com.doumee.dao.business.join.UserActionJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.web.reqeust.AccountLoginDTO; |
| | | import com.doumee.dao.web.reqeust.CheckVisitedDTO; |
| | | import com.doumee.dao.web.reqeust.VisitMemberDTO; |
| | | import com.doumee.dao.web.response.MemberVO; |
| | | import com.doumee.dao.web.response.WxAuthorizeVO; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.doumee.service.business.impl.hksync.HkSyncEmpowerServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.ferp.HkSyncOrgUserToHKServiceImpl; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.RandomStringUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Date; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private VisitsMapper visitsMapper; |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | |
| | | @Override |
| | | public Integer create(Member member) { |
| | | memberMapper.insert(member); |
| | | return member.getId(); |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Member create(Member member) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = member.getLoginUserInfo(); |
| | | } |
| | | isMemberParamValid(member); |
| | | //è·ååºçæ¥æ |
| | | //è±ææä½ |
| | | Member insert = initAddMemberModel(member,loginUserInfo); |
| | | //æµ·åº·äººåæ°å¢ä¸å¡ |
| | | if(dealHkUserBiz(insert)){ |
| | | try { |
| | | memberMapper.insert(insert); |
| | | //å建系ç»ç»éè´¦å·ï¼é»è®¤æ ä»»ä½è§è²ï¼ |
| | | createSystemUser(insert); |
| | | }catch (Exception e){ |
| | | //妿åçå¼å¸¸ï¼å é¤å·²ç»å建ç人åä¿¡æ¯ |
| | | deleteHkUserBiz(insert.getHkId()); |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼åå·¥ä¿¡æ¯æ°å»ºå¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼å工信æ¯åæ¥å®é²å¹³å°å¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | return insert; |
| | | } |
| | | private void createSystemUser(Member insert) { |
| | | SystemUser user = new SystemUser(); |
| | | // çæå¯ç ç |
| | | String salt = RandomStringUtils.randomAlphabetic(6); |
| | | // çæå¯ç |
| | | user.setPassword(Utils.Secure.encryptPassword(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.INITIAL_PASSWORD).getCode(), salt)); |
| | | user.setSalt(salt); |
| | | |
| | | // åå»ºç¨æ·è®°å½ |
| | | user.setType(insert.getType()); |
| | | user.setUsername(insert.getPhone()); |
| | | user.setEmpNo(insert.getCode()); |
| | | user.setRealname(insert.getName()); |
| | | user.setCompanyId(insert.getCompanyId()); |
| | | user.setMobile(insert.getPhone()); |
| | | user.setCreateTime(insert.getCreateDate()); |
| | | user.setCreateUser(insert.getCreator()); |
| | | user.setUpdateUser(insert.getEditor()); |
| | | user.setUpdateTime(insert.getEditDate()); |
| | | user.setMemberId(insert.getId()); |
| | | user.setDeleted(Boolean.FALSE); |
| | | user.setFixed(Boolean.FALSE); |
| | | user.setStatus(Constants.ZERO); |
| | | systemUserMapper.insert(user); |
| | | } |
| | | |
| | | private Member initAddMemberModel(Member member, LoginUserInfo loginUserInfo) { |
| | | Member insert= new Member(); |
| | | insert.setCreator(loginUserInfo.getId()); |
| | | insert.setCreateDate(new Date()); |
| | | insert.setEditor(loginUserInfo.getId()); |
| | | insert.setEditDate(new Date()); |
| | | insert.setIsdeleted(Constants.ZERO); |
| | | insert.setCompanyId(member.getCompanyId()); |
| | | insert.setFaceImg(member.getFaceImg()); |
| | | insert.setImgurl(member.getImgurl()); |
| | | insert.setCode(member.getCode()); |
| | | insert.setType(Constants.TWO); |
| | | insert.setHkDate(new Date()); |
| | | insert.setWorkStatus(Constants.ONE);//é»è®¤å¨è |
| | | insert.setCanVisit(Constants.ZERO);//é»è®¤ä¸å¯è®¿é® |
| | | insert.setAuthStatus(Constants.ZERO); |
| | | insert.setName(member.getName()); |
| | | insert.setHkStatus(Constants.ONE); |
| | | insert.setSex(Constants.getSexByCardNo( member.getIdcardNo()));//æ ¹æ®èº«ä»½è¯å·è·åæ§å« |
| | | insert.setBirthday( DateUtil.fromStringToDate("yyyyMMdd",IdcardUtil.getBirthByIdCard(member.getIdcardNo()))); |
| | | insert.setPhone(member.getPhone()); |
| | | insert.setIdcardNo(DESUtil.encrypt(Constants.EDS_PWD, member.getIdcardNo()));//身份è¯å·å å¯ |
| | | insert.setIdcardDecode( Constants.getTuominStr(member.getIdcardNo())); |
| | | insert.setStatus(Constants.ZERO); |
| | | return insert; |
| | | } |
| | | |
| | | /** |
| | | * å 餿µ·åº·äººåä¿¡æ¯ |
| | | * @param hkId |
| | | */ |
| | | private void deleteHkUserBiz(String hkId) { |
| | | UserDelRequest request = new UserDelRequest(); |
| | | request.setPersonIds(new String[]{hkId}); |
| | | BaseResponse<List<UserDelResponse>> result = HKService.delBatchUser(request); |
| | | } |
| | | |
| | | /** |
| | | * æµ·åº·äººåæ°å¢ä¸å¡ |
| | | * @param insert |
| | | * @return |
| | | */ |
| | | private boolean dealHkUserBiz(Member insert) { |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | Company company = companyMapper.selectById(insert.getCompanyId()); |
| | | if(company == null || Constants.equalsInteger(company.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯¥ç»ç»ä¿¡æ¯å·²è¢«å é¤ï¼è¯·å·æ°é¡µé¢éè¯ï¼"); |
| | | } |
| | | if(StringUtils.isBlank(company.getHkId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯¥ç»ç»ä¿¡æ¯æªåæ¥å®é²å¹³å°ï¼è¯·å
åå¾ãç»ç»ç®¡çãèåè¿è¡ç»´æ¤ï¼"); |
| | | } |
| | | insert.setHkOrgId(company.getHkId()); |
| | | UserAddRequest hkAddRequest = HkSyncOrgUserToHKServiceImpl.getUserAddModel(insert,path,Constants.ZERO); |
| | | if(hkAddRequest == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼äººè¸ç
§çæè¯¯ï¼è¯·å°è¯éæ°ä¸ä¼ ï¼"); |
| | | } |
| | | //å¤çæ°å¢æ°æ® |
| | | BaseResponse<UserAddResponse> result = HKService.addUser(hkAddRequest); |
| | | if(result!=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) && result.getData()!=null){ |
| | | insert.setHkId(hkAddRequest.getPersonId()); |
| | | insert.setFaceId(result.getData().getFaceId()); |
| | | if(StringUtils.isNotBlank(insert.getFaceId())){ |
| | | insert.setFaceStatus(Constants.ONE); |
| | | }else{ |
| | | insert.setFaceStatus(Constants.ZERO); |
| | | } |
| | | return true; |
| | | }else if(result!=null ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼åæ¥å®é²å¹³å°å¤±è´¥ã"+result.getMsg()+"ãï¼è¯·è系管çåï¼"); |
| | | } |
| | | return false; |
| | | } |
| | | private boolean dealHkUserForUpdateBiz(Member update ) { |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.MEMBER_IMG).getCode(); |
| | | |
| | | UserAddRequest hkAddRequest = HkSyncOrgUserToHKServiceImpl.getUserAddModel(update,path,Constants.ONE); |
| | | |
| | | //å¤çæ°å¢æ°æ® |
| | | BaseResponse<UserAddResponse> result = HKService.editUser(hkAddRequest); |
| | | if(result!=null && StringUtils.equals(result.getCode(),HKConstants.RESPONSE_SUCCEE) ){ |
| | | update.setHkStatus(Constants.ONE);//已忥 |
| | | update.setRemark("人åä¿¡æ¯å·²åæ¥æå"); |
| | | if(StringUtils.isNotBlank(update.getFaceImg()) && Constants.equalsInteger(update.getFaceStatus(),Constants.ZERO)){ |
| | | //妿æäººè¸ç
§çï¼å¤ç人è¸ç
§ç忥 |
| | | String faceid = HkSyncOrgUserToHKServiceImpl.dealMemberFace(update,path); |
| | | if(StringUtils.isBlank(faceid)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å工人è¸ä¿¡æ¯ä¸åæ ¼ï¼è¯·æ´æ¢äººè¸ç
§çéè¯ï¼"); |
| | | }else{ |
| | | update.setFaceId(faceid); |
| | | update.setFaceStatus(Constants.ONE); |
| | | //å¦æäººè¸è·ä½ ï¼éæ°ä¸åæéæ°æ® |
| | | update.setRemark("人åå人è¸ä¿¡æ¯åæ¥æå"+result.getMsg()); |
| | | //éæ°ææè®¾å¤æé |
| | | // HkSyncOrgUserToHKServiceImpl.dealMemberRoleEmpowerDo(null,update,deviceRoleMapper,empowerMapper,deviceMapper); |
| | | } |
| | | } |
| | | update.setHkDate(update.getEditDate()); |
| | | return true; |
| | | }else if(result!=null ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼åæ¥å®é²å¹³å°å¤±è´¥ã"+result.getMsg()+"ãï¼è¯·è系管çåï¼"); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * æ¸
é¤åå·¥çè®¾å¤æé |
| | | * @param member |
| | | */ |
| | | private void cancelAllMemberEmpower(Member member) { |
| | | //å é¤å
¨é¨æé |
| | | memberRoleMapper.update(null,new UpdateWrapper<MemberRole>().lambda() |
| | | .eq(MemberRole::getMemberId,member.getId()) |
| | | .set(MemberRole::getIsdeleted,Constants.ONE) |
| | | .set(MemberRole::getEdirot,member.getEditor()) |
| | | .set(MemberRole::getEditDate,member.getEditDate())); |
| | | //æææå¾
ä¸åç任塿¹æ 已忶 |
| | | empowerMapper.update(null,new UpdateWrapper<Empower>().lambda() |
| | | .eq(Empower::getMemberId,member.getId()) |
| | | .eq(Empower::getIsdeleted,Constants.ZERO) |
| | | .eq(Empower::getSendStatus,Constants.EmpowerStatus.wait) |
| | | .set(Empower::getIsdeleted,Constants.ONE) |
| | | .set(Empower::getSendStatus,Constants.EmpowerStatus.cancel)); |
| | | //ææä¸åè¿çä»»å¡ï¼æ¹ä¸ºå¾
å 餿é |
| | | empowerMapper.update(null,new UpdateWrapper<Empower>().lambda() |
| | | .eq(Empower::getMemberId,member.getId()) |
| | | .set(Empower::getIsdeleted,Constants.ONE) |
| | | .notIn(Empower::getSendStatus,Constants.EmpowerStatus.fail) |
| | | .set(Empower::getRemark,"çå¾
忥å é¤å®é²å¹³å°") |
| | | .eq(Empower::getIsdeleted,Constants.ZERO) |
| | | .eq(Empower::getIsdeleted,Constants.ZERO) |
| | | .set(Empower::getSendStatus,Constants.ZERO)); |
| | | } |
| | | |
| | | private void isMemberParamValid(Member member) { |
| | | if (StringUtils.isBlank(member.getPhone())||!PhoneUtil.isPhone(member.getPhone())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"çµè¯å·ç æ ¼å¼æè¯¯"); |
| | | } |
| | | if (StringUtils.isBlank(member.getIdcardNo())||!IdcardUtil.isValidCard(member.getIdcardNo())){ |
| | | if(memberMapper.selectCount(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIdcardNo,DESUtil.encrypt(Constants.EDS_PWD, member.getIdcardNo())) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .ne(Member::getId,member.getId())) >0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "身份è¯å·ã"+member.getIdcardNo()+"ã已被使ç¨ï¼ä¸è½éå¤"); |
| | | } |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"身份è¯å·æ ¼å¼æè¯¯"); |
| | | } |
| | | |
| | | SystemUser queryUserDto = new SystemUser(); |
| | | queryUserDto.setUsername(member.getPhone()); |
| | | queryUserDto.setDeleted(Boolean.FALSE); |
| | | SystemUser user = systemUserMapper.selectOne(new QueryWrapper<>(queryUserDto).last("limit 1")); |
| | | if (user != null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "ææºå·ã"+queryUserDto.getUsername()+"ã已被使ç¨ï¼ä¸è½éå¤"); |
| | | } |
| | | // éªè¯å·¥å· |
| | | if (StringUtils.isNotBlank(member.getCode())) { |
| | | queryUserDto = new SystemUser(); |
| | | queryUserDto.setDeleted(Boolean.FALSE); |
| | | queryUserDto.setEmpNo(member.getCode()); |
| | | user = systemUserMapper.selectOne(new QueryWrapper<>(queryUserDto).last("limit 1")); |
| | | if (user != null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "å·¥å·ã"+member.getCode()+"ãå·²åå¨"); |
| | | } |
| | | } |
| | | } |
| | | private Member isMemberUpdateParamValid(Member member) { |
| | | Member model = memberMapper.selectById(member.getId()); |
| | | if(model ==null ||Constants.equalsInteger(member.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯¥å工信æ¯ä¸åå¨ï¼è¯·å·æ°é¡µé¢éè¯ï¼"); |
| | | } |
| | | if (StringUtils.isNotBlank(member.getPhone()) && !PhoneUtil.isPhone(member.getPhone())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"çµè¯å·ç æ ¼å¼æè¯¯"); |
| | | } |
| | | if (StringUtils.isNotBlank(member.getIdcardNoNew())){ |
| | | String encrptNo = (DESUtil.encrypt(Constants.EDS_PWD, member.getIdcardNoNew()));//身份è¯å·å å¯ |
| | | if( !StringUtils.equals(model.getIdcardNo(),encrptNo)&& !IdcardUtil.isValidCard(member.getIdcardNoNew())){ |
| | | //妿åçæ¹åï¼å¹¶ä¸ä¸åæ³ï¼æç¤ºå¼å¸¸ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"ä¿®æ¹çæ°èº«ä»½è¯å·æ ¼å¼æè¯¯"); |
| | | } |
| | | if( !StringUtils.equals(model.getIdcardNo(),encrptNo) ){ |
| | | if(memberMapper.selectCount(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getIdcardNo,encrptNo) |
| | | .eq(Member::getIsdeleted,Constants.ZERO) |
| | | .ne(Member::getId,member.getId())) >0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "身份è¯å·ã"+member.getIdcardNoNew()+"ã已被使ç¨ï¼ä¸è½éå¤"); |
| | | } |
| | | |
| | | member.setSex(Constants.getSexByCardNo( member.getIdcardNoNew()));//æ ¹æ®èº«ä»½è¯å·è·åæ§å« |
| | | member.setIdcardDecode( Constants.getTuominStr(member.getIdcardNoNew())); |
| | | member.setIdcardNo(encrptNo); |
| | | } |
| | | } |
| | | boolean isNeedUpdateUser = false; |
| | | if(StringUtils.isNotBlank(member.getPhone()) && StringUtils.equals(member.getPhone(),model.getPhone())){ |
| | | // å¦æææºå·åçä¿®æ¹ï¼æ ¡éªå¯ä¸æ§ |
| | | SystemUser queryUserDto = new SystemUser(); |
| | | queryUserDto.setUsername(member.getPhone()); |
| | | queryUserDto.setDeleted(Boolean.FALSE); |
| | | SystemUser user = systemUserMapper.selectOne(new QueryWrapper<SystemUser>(queryUserDto).lambda() |
| | | .ne(SystemUser::getMemberId,model.getId()).last("limit 1")); |
| | | if (user != null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "ææºå·ã" + queryUserDto.getUsername() + "ã已被使ç¨ï¼ä¸è½éå¤"); |
| | | } |
| | | isNeedUpdateUser = true; |
| | | } |
| | | if(StringUtils.isNotBlank(member.getCode()) && StringUtils.equals(member.getPhone(),model.getCode())){ |
| | | // éªè¯å·¥å· |
| | | SystemUser queryUserDto = new SystemUser(); |
| | | queryUserDto = new SystemUser(); |
| | | queryUserDto.setDeleted(Boolean.FALSE); |
| | | queryUserDto.setEmpNo(member.getCode()); |
| | | SystemUser user = systemUserMapper.selectOne(new QueryWrapper<SystemUser>(queryUserDto).lambda() |
| | | .ne(SystemUser::getMemberId,model.getId()).last("limit 1")); |
| | | if (user != null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EXISTS.getCode(), "å·¥å·ã"+member.getCode()+"ãå·²åå¨"); |
| | | } |
| | | isNeedUpdateUser = true; |
| | | } |
| | | if(member.getCompanyId()!=null && !Constants.equalsInteger(member.getCompanyId(),model.getCompanyId())){ |
| | | //妿ç»ç»åçåå |
| | | Company company = companyMapper.selectById(member.getCompanyId()); |
| | | if(company == null || Constants.equalsInteger(company.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯¥ç»ç»ä¿¡æ¯å·²è¢«å é¤ï¼è¯·å·æ°é¡µé¢éè¯ï¼"); |
| | | } |
| | | if(StringUtils.isBlank(company.getHkId())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯¥ç»ç»ä¿¡æ¯æªåæ¥å®é²å¹³å°ï¼è¯·å
åå¾ãç»ç»ç®¡çãèåè¿è¡ç»´æ¤ï¼"); |
| | | } |
| | | member.setHkOrgId(company.getHkId()); |
| | | isNeedUpdateUser = true; |
| | | } |
| | | if(isNeedUpdateUser){ |
| | | //æ´æ°ç³»ç»ç¨æ·è´¦å·ä¿¡æ¯ |
| | | systemUserMapper.update(null,new UpdateWrapper<SystemUser>().lambda() |
| | | .set(SystemUser::getUpdateUser,member.getLoginUserInfo().getId()) |
| | | .set(SystemUser::getUpdateTime,new Date()) |
| | | .set(StringUtils.isNotBlank(model.getPhone()),SystemUser::getMobile,member.getPhone()) |
| | | .set(StringUtils.isNotBlank(model.getName()),SystemUser::getRealname,member.getName()) |
| | | .set(model.getCompanyId() !=null,SystemUser::getCompanyId,member.getCompanyId()) |
| | | .set(StringUtils.isNotBlank(model.getCode()),SystemUser::getEmpNo,member.getCode()) |
| | | .eq(SystemUser::getMemberId,model.getId())); |
| | | } |
| | | member.setHkId(model.getHkId()); |
| | | member.setFaceId(model.getFaceId());//人è¸ç¼ç |
| | | return model; |
| | | } |
| | | |
| | | @Transactional |
| | | @Override |
| | | public Integer laborMemberCreate(LaborMemberDTO member) { |
| | | |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | if (PhoneUtil.isPhone(member.getPhone())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"çµè¯å·ç æ ¼å¼æè¯¯"); |
| | | } |
| | |
| | | //è±ææä½ |
| | | String hide = IdcardUtil.hide(member.getIdcardNo(), 5, 14); |
| | | //è½¬æ¢æ¥æ |
| | | DateTime yyyyMMdd = DateUtil.parse(birthByIdCard, "yyyyMMdd"); |
| | | |
| | | Member insert = new Member(); |
| | | insert.setCreator(loginUserInfo.getId()); |
| | | insert.setCreateDate(new Date()); |
| | |
| | | insert.setImgurl(member.getImgurl()); |
| | | insert.setType(Constants.ZERO); |
| | | insert.setName(member.getName()); |
| | | insert.setBirthday(yyyyMMdd); |
| | | insert.setBirthday(DateUtil.fromStringToDate("yyyyMMdd",birthByIdCard)); |
| | | insert.setPhone(member.getPhone()); |
| | | insert.setIdcardNo(Utils.Secure.encryptString(member.getIdcardNo())); |
| | | IdcardUtil.isValidCard(member.getIdcardNo()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | public void deleteById(Integer id,LoginUserInfo user) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | Member member=new Member(); |
| | |
| | | member.setIsdeleted(Constants.ZERO); |
| | | member.setEditor(loginUserInfo.getId()); |
| | | member.setEditDate(new Date()); |
| | | member.setHkStatus(Constants.ZERO); |
| | | member.setRemark("人åå·²å é¤ï¼çå¾
å é¤é¨ç¦æé"); |
| | | memberMapper.updateById(member); |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.DELETE,userActionJoinMapper); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void deleteByIdInBatch(List<Integer> ids,LoginUserInfo loginUserInfo) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Member member=new Member(); |
| | | ids.stream().forEach(s ->{ |
| | | member.setId(s); |
| | | member.setIsdeleted(Constants.ONE); |
| | | member.setHkStatus(Constants.ZERO); |
| | | member.setRemark("人åå·²å é¤ï¼çå¾
å é¤é¨ç¦æé"); |
| | | member.setEditor(loginUserInfo.getId()); |
| | | member.setEditDate(new Date()); |
| | | memberMapper.updateById(member); |
| | | |
| | | UserAction userAction=new UserAction(); |
| | | userAction.setIsdeleted(Constants.ZERO); |
| | | userAction.setCreateDate(new Date()); |
| | | userAction.setCreator(loginUserInfo.getId()); |
| | | userAction.setType(9); |
| | | userAction.setRemark("ç±ã"+loginUserInfo.getUsername()+"ãäºãæä½æ¶é´"+DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")+"ãï¼è¿è¡ãå é¤ã"); |
| | | userAction.setMemberId(s+""); |
| | | userActionJoinMapper.insert(userAction); |
| | | |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.DELETE,userActionJoinMapper); |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /* memberMapper.deleteBatchIds(ids);*/ |
| | | } |
| | | |
| | | /** |
| | | * æé»æè
å»ç»åå·¥ä¿¡æ¯ |
| | | * @param ids |
| | | * @param type |
| | | * @param loginUserInfo |
| | | */ |
| | | @Override |
| | | public void batchBlock(List<Integer> ids,Integer type) { |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void batchBlock(List<Integer> ids,Integer type,LoginUserInfo loginUserInfo) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Member member=new Member(); |
| | | for (Integer id:ids) { |
| | | member = memberMapper.selectById(id); |
| | | Member member = memberMapper.selectById(id); |
| | | if(!Objects.isNull(member)&&member.getStatus()==Constants.ZERO){ |
| | | UserAction userAction=new UserAction(); |
| | | // userAction.setBeforeStatus(member.getStatus()); |
| | | member.setStatus(Constants.TWO); |
| | | member.setEditor(loginUserInfo.getId()); |
| | | member.setEditDate(new Date()); |
| | | member.setAuthStatus(Constants.ZERO);//æªææ |
| | | memberMapper.updateById(member); |
| | | Date date = new Date(); |
| | | member.setEditDate(date); |
| | | member.setEditor(loginUserInfo.getId()); |
| | | //å é¤åå·¥é¨ç¦æé |
| | | cancelAllMemberEmpower(member); |
| | | |
| | | userAction.setIsdeleted(Constants.ZERO); |
| | | userAction.setCreateDate(new Date()); |
| | | userAction.setCreator(loginUserInfo.getId()); |
| | | if(Constants.equalsInteger(type,Constants.ONE)){ |
| | | userAction.setType(Constants.ONE); |
| | | userAction.setRemark("ç±ã"+loginUserInfo.getUsername()+"ãäºãæä½æ¶é´"+DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")+"ãï¼è¿è¡ãå»ç»ã"); |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.FREEZE,userActionJoinMapper); |
| | | } |
| | | if(Constants.equalsInteger(type,Constants.TWO)){ |
| | | userAction.setType(Constants.TWO); |
| | | userAction.setRemark("ç±ã"+loginUserInfo.getUsername()+"ãäºãæä½æ¶é´"+DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")+"ãï¼è¿è¡ãæé»ã"); |
| | | |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.BLACKLIST,userActionJoinMapper); |
| | | } |
| | | userAction.setMemberId(id+""); |
| | | |
| | | userActionJoinMapper.insert(userAction); |
| | | } |
| | | } |
| | | /* memberMapper.deleteBatchIds(ids);*/ |
| | | } |
| | | /** |
| | | * æé»æè
å»ç»åå·¥ä¿¡æ¯ |
| | | * @param ids |
| | | * @param type |
| | | * @param loginUserInfo |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void batchRemoveBlock(List<Integer> ids,Integer type,LoginUserInfo loginUserInfo) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | for (Integer id:ids) { |
| | | Member member = memberMapper.selectById(id); |
| | | if(!Objects.isNull(member)&&member.getStatus()==Constants.ZERO){ |
| | | member.setStatus(Constants.ONE);//æ¢å¤æ£å¸¸ç¶æ |
| | | member.setEditor(loginUserInfo.getId()); |
| | | member.setEditDate(new Date()); |
| | | member.setAuthStatus(Constants.ZERO);//æªææ |
| | | memberMapper.updateById(member); |
| | | Date date = new Date(); |
| | | member.setEditDate(date); |
| | | member.setEditor(loginUserInfo.getId()); |
| | | if(Constants.equalsInteger(type,Constants.ONE)){ |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.CANCEL_FREEZE,userActionJoinMapper); |
| | | } |
| | | if(Constants.equalsInteger(type,Constants.TWO)){ |
| | | saveUserActionBiz(member,loginUserInfo,Constants.UserActionType.CANCEL_BLACKLIST,userActionJoinMapper); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void updateById(Member member) { |
| | | memberMapper.updateById(member); |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updateById(Member updateMember) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = updateMember.getLoginUserInfo(); |
| | | } |
| | | //æ ¡éªåæ° å¹¶ä¸æ´æ°systemuser ææºå·åå·¥å·ä¿¡æ¯ï¼å¦æéè¦ä¿®æ¹çè¯ï¼ |
| | | Member model = isMemberUpdateParamValid(updateMember); |
| | | updateMember.setEditor(loginUserInfo.getId()); |
| | | updateMember.setEditDate(new Date()); |
| | | //æµ·åº·äººåæ°å¢ä¸å¡ |
| | | if(dealHkUserForUpdateBiz(updateMember)){ |
| | | updateMember.setHkId(null); |
| | | updateMember.setAuthStatus(Constants.ZERO); |
| | | memberMapper.update(null,new UpdateWrapper<Member>().lambda() |
| | | .set(Member::getStartTime,null) |
| | | .set(Member::getEndTime,null) |
| | | .set(StringUtils.isNotBlank(updateMember.getPhone()),Member::getPhone,updateMember.getPhone()) |
| | | .set(StringUtils.isNotBlank(updateMember.getName()),Member::getName,updateMember.getName()) |
| | | .set(Member::getEditDate,updateMember.getEditDate()) |
| | | .set(Member::getEditor,updateMember.getEditor()) |
| | | .set(StringUtils.isNotBlank(updateMember.getIdcardNo()),Member::getIdcardNo,updateMember.getIdcardNo()) |
| | | .set(StringUtils.isNotBlank(updateMember.getIdcardDecode()),Member::getIdcardDecode,updateMember.getIdcardDecode()) |
| | | .set(updateMember.getAuthStatus()!=null,Member::getAuthStatus,updateMember.getAuthStatus()) |
| | | .set(updateMember.getHkStatus()!=null,Member::getHkStatus,updateMember.getHkStatus()) |
| | | .set(updateMember.getSex()!=null,Member::getSex,updateMember.getSex()) |
| | | .set(updateMember.getFaceStatus()!=null,Member::getFaceStatus,updateMember.getFaceStatus()) |
| | | .set(updateMember.getHkDate()!=null,Member::getHkDate,updateMember.getHkDate()) |
| | | .set(StringUtils.isNotBlank(updateMember.getRemark()),Member::getRemark,updateMember.getRemark()) |
| | | .set(StringUtils.isNotBlank(updateMember.getFaceImg()),Member::getFaceImg,updateMember.getFaceImg()) |
| | | .set(updateMember.getFaceId()!=null,Member::getFaceId,updateMember.getFaceId()) |
| | | .set(updateMember.getCompanyId()!=null,Member::getCompanyId,updateMember.getCompanyId()) |
| | | .set(StringUtils.isNotBlank(updateMember.getCode()),Member::getCode,updateMember.getCode()) |
| | | .eq(Member::getId,updateMember.getId())); |
| | | cancelAllMemberEmpower(updateMember); |
| | | //è®°å½æä½æ¥å¿ |
| | | saveUserActionBiz(updateMember,loginUserInfo,Constants.UserActionType.EDIT,userActionJoinMapper); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼å工信æ¯åæ¥å®é²å¹³å°å¤±è´¥ï¼è¯·ç¨åéè¯ï¼"); |
| | | } |
| | | } |
| | | |
| | | private void saveUserActionBiz(Member updateMember,LoginUserInfo user, Constants.UserActionType type,UserActionJoinMapper userActionMapper) { |
| | | UserAction userAction=new UserAction(); |
| | | userAction.setIsdeleted(Constants.ZERO); |
| | | userAction.setCreateDate(updateMember.getEditDate()); |
| | | userAction.setCreator(updateMember.getEditor()); |
| | | userAction.setType(type.getKey()); |
| | | String info = type.getInfo(); |
| | | userAction.setRemark(info.replace("${param1}",user!=null?user.getRealname():"").replace("${param2}", com.doumee.core.utils.DateUtil.getPlusTime2(updateMember.getEditDate()))); |
| | | userAction.setMemberId(updateMember.getId()+""); |
| | | userActionMapper.insert(userAction); |
| | | } |
| | | |
| | | @Override |
| | | public void updateFace(Member member) { |
| | | public boolean updateFace(Member member) { |
| | | QueryWrapper<Member> wrapper = new QueryWrapper<>(member); |
| | | wrapper.lambda().ne(Member::getRemark,"人è¸å·²åæ¥ææ°"); |
| | | List<Member> list =memberMapper.selectList(wrapper); |
| | |
| | | update.setRemark("人è¸å·²åæ¥ææ°"); |
| | | update.setFaceStatus(Constants.ONE); |
| | | memberMapper.updateById(update); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | @Override |
| | | public void delHkForce(Member member) { |
| | |
| | | } |
| | | HkSyncEmpowerServiceImpl.doHkDeleteUser(model.getId(),model.getHkId(),new Date(),memberMapper,memberCardMapper); |
| | | } |
| | | @Override |
| | | public void updateHead(Member member) { |
| | | Member model =memberMapper.selectById(member.getId()); |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼äººåä¿¡æ¯ä¸åå¨ï¼"); |
| | | } |
| | | if(model.getCompanyId()!=null) { |
| | | if(Constants.equalsObject(member.getHeadStatus(),Constants.ONE)){ |
| | | //妿æ¯åæ¶ä¸»ç®¡ |
| | | companyMapper.update(null,new UpdateWrapper<Company>().lambda() |
| | | .eq(Company::getId,model.getCompanyId()) |
| | | .set(Company::getHeadId,member.getId())); |
| | | }else{ |
| | | //妿æ¯è®¾ä¸ºä¸»ç®¡ |
| | | companyMapper.update(null,new UpdateWrapper<Company>().lambda() |
| | | .eq(Company::getId,model.getCompanyId()) |
| | | .set(Company::getHeadId,null) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void updateStatusById(Member member) { |
| | | Member model =memberMapper.selectById(member.getId()); |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼äººåä¿¡æ¯ä¸åå¨ï¼"); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = member.getLoginUserInfo(); |
| | | } |
| | | Member update = new Member(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(loginUserInfo.getId()); |
| | | update.setStatus(member.getStatus()); |
| | | memberMapper.updateById(update); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void updateVisitsStatusById(Member member) { |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updateWorkStatus(Member member) { |
| | | Member model =memberMapper.selectById(member.getId()); |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼äººåä¿¡æ¯ä¸åå¨ï¼"); |
| | | } |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | Member result=memberMapper.selectById(member.getId()); |
| | | Integer status=result.getStatus(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = member.getLoginUserInfo(); |
| | | } |
| | | Member update = new Member(); |
| | | update.setId(member.getId()); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(loginUserInfo.getId()); |
| | | update.setStatus(Constants.Status.FREEZE.getValue()); |
| | | update.setId(member.getId()); |
| | | update.setWorkStatus(Constants.equalsInteger(member.getWorkStatus(),Constants.ONE)?Constants.ONE:Constants.ZERO); |
| | | if(Constants.equalsInteger(member.getWorkStatus(),Constants.ONE)){ |
| | | //妿æ¯ç¦»è |
| | | cancelAllMemberEmpower(update); |
| | | } |
| | | update.setAuthStatus(Constants.ZERO); |
| | | memberMapper.updateById(update); |
| | | |
| | | UserAction userAction=new UserAction(); |
| | | userAction.setIsdeleted(Constants.ZERO); |
| | | userAction.setCreateDate(new Date()); |
| | | userAction.setCreator(loginUserInfo.getId()); |
| | | if(Constants.equalsInteger(result.getType(),Constants.TWO)){ |
| | | userAction.setType(Constants.ONE); |
| | | userAction.setRemark("ç±ã"+loginUserInfo.getUsername()+"ãäºãæä½æ¶é´"+DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")+"ãï¼è¿è¡ãå»ç»ã"); |
| | | } |
| | | if(Constants.equalsInteger(result.getType(),Constants.ZERO)){ |
| | | userAction.setType(Constants.TWO); |
| | | userAction.setRemark("ç±ã"+loginUserInfo.getUsername()+"ãäºãæä½æ¶é´"+DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")+"ãï¼è¿è¡ãæé»ã"); |
| | | |
| | | } |
| | | userAction.setMemberId(result.getId()+""); |
| | | userAction.setBeforeStatus(status); |
| | | userActionJoinMapper.insert(userAction); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void updateRemoveStatusById(List<Member> members) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | Date date=new Date(); |
| | | members.stream().forEach(s ->{ |
| | | Member result=memberMapper.selectById(s.getId()); |
| | | Integer status=result.getStatus(); |
| | | Member update = new Member(); |
| | | update.setEditDate(date); |
| | | update.setEditor(loginUserInfo.getId()); |
| | | update.setStatus(Constants.Status.ENABLE.getValue()); |
| | | update.setId(s.getId()); |
| | | memberMapper.updateById(update); |
| | | |
| | | //è§£å»ä¸å¡ å¤çç¨æ·ææå¯¼å
¥è®°å½ |
| | | this.thawMember(result); |
| | | |
| | | UserAction userAction=new UserAction(); |
| | | userAction.setIsdeleted(Constants.ZERO); |
| | | userAction.setCreateDate(new Date()); |
| | | userAction.setCreator(loginUserInfo.getId()); |
| | | if(Constants.equalsInteger(result.getType(),Constants.TWO)){ |
| | | userAction.setType(Constants.ZERO); |
| | | userAction.setBeforeStatus(Constants.ONE); |
| | | } |
| | | if(Constants.equalsInteger(result.getType(),Constants.ONE)){ |
| | | userAction.setBeforeStatus(status); |
| | | userAction.setType(Constants.TWO); |
| | | } |
| | | userAction.setMemberId(result.getId()+""); |
| | | userActionJoinMapper.insert(userAction); |
| | | }); |
| | | //è®°å½æä½æ¥å¿ |
| | | saveUserActionBiz(member,loginUserInfo,Constants.equalsInteger(member.getWorkStatus(),Constants.ONE)?Constants.UserActionType.WORK_OFF:Constants.UserActionType.WORK_ON,userActionJoinMapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updateCanVisitById(Member member) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(loginUserInfo == null){ |
| | | loginUserInfo = member.getLoginUserInfo(); |
| | | } |
| | | Member model =memberMapper.selectById(member.getId()); |
| | | if(model ==null) { |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼äººåä¿¡æ¯ä¸åå¨ï¼"); |
| | | } |
| | | if(Constants.equalsInteger(member.getCanVisit(),model.getCanVisit())){ |
| | | //å¦ææ²¡æåçååï¼ç´æ¥è¿å |
| | | return; |
| | | } |
| | | Member update = new Member(); |
| | | update.setEditDate(new Date()); |
| | | update.setId(member.getId()); |
| | | update.setEditor(loginUserInfo.getId()); |
| | | update.setCanVisit(member.getCanVisit()); |
| | | memberMapper.updateById(update); |
| | | //è®°å½æä½æ¥å¿ |
| | | saveUserActionBiz(member,loginUserInfo,Constants.equalsInteger(member.getCanVisit(),Constants.ONE)?Constants.UserActionType.CANVISIT:Constants.UserActionType.CANCEL_VISIT,userActionJoinMapper); |
| | | } |
| | | |
| | | @Override |
| | |
| | | MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.selectAll(Member.class) |
| | | .selectAs(Company::getName,MemberInfoDTO::getCompanyName) |
| | | .selectAs(Company::getLinkName,MemberInfoDTO::getLinkName); |
| | | .selectAs(Company::getName,Member::getCompanyName) ; |
| | | |
| | | if(null != member.getType()) { |
| | | queryWrapper.eq(Member::getType,member.getType()); |
| | |
| | | queryWrapper.eq(Member::getCompanyId,member.getCompanyId()); |
| | | } |
| | | queryWrapper.eq(Member::getIsdeleted,Constants.ZERO); |
| | | |
| | | List<Member> list = memberJoinMapper.selectJoinList(Member.class,queryWrapper); |
| | | if(list!=null){ |
| | | for(Member m : list){ |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageData<MemberInfoDTO> findLaborMemberInfoPage(PageWrap<MemberInfoDTO> pageWrap) { |
| | | IPage<Member> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>(); |
| | | MemberInfoDTO model = pageWrap.getModel(); |
| | | Utils.MP.blankToNull(model); |
| | | Date end =pageWrap.getModel().getTrainTimeEndTime() !=null? Utils.Date.getEnd(pageWrap.getModel().getTrainTimeEndTime()):new Date(); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | /* .leftJoin(TrainTime.class,TrainTime::getMemberId,Member::getId) |
| | | .leftJoin(Empower.class,Empower::getMemberId,Member::getId);*/ |
| | | |
| | | queryWrapper.selectAll(Member.class) |
| | | .selectAs(Company::getName,MemberInfoDTO::getCompanyName) |
| | | .selectAs(Company::getLinkName,MemberInfoDTO::getLinkName) |
| | | /*.select(" (select Max(tt.END_TIME) from train_time tt where tt.ISDELETED=0 and tt.MEMBER_ID=t.id) as trainTimeEndTime")*/ |
| | | .select(" (select Max(e.END_TIME) from empower e where e.ISDELETED=0 and e.MEMBER_ID=t.id) as empowerEndTime"); |
| | | |
| | | queryWrapper.eq(Member::getType,Constants.ZERO); |
| | | queryWrapper.eq(Objects.nonNull(model.getCompanyId()),Member::getCompanyId,model.getCompanyId()) |
| | | .like(StringUtils.isNotBlank(model.getName()),Member::getName,model.getName()) |
| | | .like(StringUtils.isNotBlank(model.getPhone()),Member::getPhone,model.getPhone()) |
| | | .like(StringUtils.isNotBlank(model.getIdcardDecode()),Member::getIdcardDecode,model.getIdcardDecode()) |
| | | .having(pageWrap.getModel().getTrainTimeEndTime()!=null,"trainTimeEndTime < "+ DateUtil.format(end,"yyyy-MM-dd HH:mm:ss")); |
| | | IPage<MemberInfoDTO> memberIPage = memberJoinMapper.selectJoinPage(page, MemberInfoDTO.class,queryWrapper); |
| | | if (!CollectionUtils.isEmpty(memberIPage.getRecords())){ |
| | | memberIPage.getRecords().forEach(s->s.setSex(IdcardUtil.getGenderByIdCard(s.getIdcardDecode()))); |
| | | } |
| | | return PageData.from(memberIPage); |
| | | } |
| | | |
| | | @Override |
| | | public long count(Member member) { |
| | | QueryWrapper<Member> wrapper = new QueryWrapper<Member>(member); |
| | | wrapper.lambda().like(StringUtils.isNotBlank(member.getRoleIdParam()), Member::getRoleId, member.getRoleIdParam()); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageData<MemberInfoDTO> findMemberInfoPage(PageWrap<MemberQuery> pageWrap) { |
| | | public PageData<Member> findMemberInfoPage(PageWrap<MemberQuery> pageWrap) { |
| | | IPage<Member> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>(); |
| | | |
| | | queryWrapper.selectAll(Member.class); |
| | | queryWrapper.selectAs(Company::getName,Member::getCompanyName); |
| | | queryWrapper.selectAs(SystemUser::getRealname,Member::getEditorName); |
| | | queryWrapper.selectAs(Company::getType,Member::getCompanyType); |
| | | queryWrapper.selectAs(Company::getHeadId,Member::getHeadId); |
| | | queryWrapper.selectAs(Company::getCompanyNamePath,Member::getCompanyNamePath); |
| | | queryWrapper.selectAs(Company::getCompanyPath,Member::getCompanyPath); |
| | | queryWrapper.select(" ( select count(1) from member_card mc where mc.isdeleted = 0 and mc.member_id = t.id ) as memberCardCount "); |
| | | queryWrapper.leftJoin(SystemUser.class,SystemUser::getId,Member::getEditor); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.eq(Member::getType,pageWrap.getModel().getType()); |
| | | // queryWrapper.eq(Objects.nonNull(model.getCompanyId()),Member::getCompanyId,model.getCompanyId()) |
| | | queryWrapper.in(Objects.nonNull(pageWrap.getModel().getCompanyIds())&&pageWrap.getModel().getCompanyIds().size()>0, |
| | | Member::getCompanyId,pageWrap.getModel().getCompanyIds()) |
| | | .and(StringUtils.isNotBlank(pageWrap.getModel().getKeyword()),ms->ms |
| | |
| | | .eq(Objects.nonNull(pageWrap.getModel().getIsdeleted()),Member::getIsdeleted,pageWrap.getModel().getIsdeleted()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getCompanyName()),Company::getName,pageWrap.getModel().getCompanyName()) |
| | | // .eq(Member::getStatus,Constants.Status.ENABLE.getValue()) |
| | | .eq(Member::getType,Constants.memberType.internal) |
| | | // .eq(Member::getType,Constants.memberType.internal) |
| | | .eq(pageWrap.getModel().getHkStatus()!=null,Member::getHkStatus,pageWrap.getModel().getHkStatus()) |
| | | .orderByDesc(!Constants.equalsObject(pageWrap.getModel().getIsdeleted(),Constants.ONE),Member::getCreateDate) |
| | | .orderByDesc(Constants.equalsInteger(pageWrap.getModel().getIsdeleted(),Constants.ONE),Member::getEditDate); |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin())==DataSyncConfig.origin.erp){ |
| | | queryWrapper.eq( StringUtils.isNotBlank(pageWrap.getModel().getErpOrgId()),Member::getErpOrgId,pageWrap.getModel().getErpOrgId()); |
| | | }else{ |
| | | queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getCompanyId()),Member::getCompanyId,pageWrap.getModel().getCompanyId()); |
| | | // queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getCompanyId()),Member::getCompanyId,pageWrap.getModel().getCompanyId()); |
| | | } |
| | | IPage<MemberInfoDTO> memberIPage = memberJoinMapper.selectJoinPage(page, MemberInfoDTO.class,queryWrapper); |
| | | if(pageWrap.getModel().getCompanyId()!=null){ |
| | | if(pageWrap.getModel().getIncludeChild()!=null &&pageWrap.getModel().getIncludeChild() ){ |
| | | //妿å
å«ä¸çº§ç»ç» |
| | | Company company = companyMapper.selectById(pageWrap.getModel().getCompanyId());//æ¥è¯¢ç»ç»ä¿¡æ¯ |
| | | queryWrapper.likeRight(Company::getCompanyPath,company.getCompanyPath()); |
| | | }else{ |
| | | //ä¸å
å«ä¸çº§ç»ç» |
| | | queryWrapper.eq(Company::getId,pageWrap.getModel().getCompanyId()); |
| | | } |
| | | } |
| | | IPage<Member> memberIPage = memberJoinMapper.selectJoinPage(page, Member.class,queryWrapper); |
| | | |
| | | if(CollectionUtils.isNotEmpty(memberIPage.getRecords())){ |
| | | //FTPæä»¶è®¿é®åç¼ |
| | |
| | | List<DeviceRole> deviceRoleList = deviceRoleMapper.selectList(new QueryWrapper<DeviceRole>().lambda() |
| | | .select(DeviceRole::getId,DeviceRole::getName) |
| | | .eq(DeviceRole::getIsdeleted,Constants.ZERO)); |
| | | for (MemberInfoDTO memberInfoDTO:memberIPage.getRecords()) { |
| | | for (Member memberInfoDTO:memberIPage.getRecords()) { |
| | | //è·å¾é¨ç¦ç»åç§°æ°ç» |
| | | memberInfoDTO.setCanVisit(Constants.formatIntegerNum(memberInfoDTO.getCanVisit())); |
| | | memberInfoDTO.setWorkStatus(Constants.formatIntegerNum(memberInfoDTO.getWorkStatus())); |
| | | memberInfoDTO.setHeadStatus(Constants.equalsInteger(memberInfoDTO.getHeadId(),memberInfoDTO.getId())?Constants.ONE:Constants.ZERO); |
| | | memberInfoDTO.setRoleNames(this.dealRoleDatas(memberInfoDTO.getRoleId(),deviceRoleList)); |
| | | //æ¼æ¥åç¼ |
| | | if(StringUtils.isNotBlank(memberInfoDTO.getFaceImg())){ |
| | | memberInfoDTO.setFaceImg(prefixUrl + memberInfoDTO.getFaceImg()); |
| | | memberInfoDTO.setFaceImgFull(prefixUrl + memberInfoDTO.getFaceImg()); |
| | | } |
| | | if(StringUtils.isNotBlank(memberInfoDTO.getImgurl())){ |
| | | memberInfoDTO.setImgurl(prefixUrl + memberInfoDTO.getImgurl()); |
| | | memberInfoDTO.setImgurlFull(prefixUrl + memberInfoDTO.getImgurl()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public PageData<MemberInfoDTO> findVisitPage(PageWrap<MemberQuery> pageWrap) { |
| | | public PageData<Member> findVisitPage(PageWrap<MemberQuery> pageWrap) { |
| | | IPage<Member> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.selectAll(Member.class) |
| | | .selectAs(Company::getName,MemberInfoDTO::getCompanyName) |
| | | .selectAs(Member::getLastVisitDate,MemberInfoDTO::getVisitsLastDate) |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .selectAs(Member::getLastVisitDate,Member::getLastVisitDate) |
| | | .select(" (select count(v.id) from visits v where v.MEMBER_ID=t.id and v.ISDELETED=0 and v.status in (7,8) ) as visitsCount"); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()),Member::getName,pageWrap.getModel().getName()) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getPhone()),Member::getPhone,pageWrap.getModel().getPhone()) |
| | |
| | | if(Constants.formatIntegerNum(dataSyncConfig.getOrgUserDataOrigin())==DataSyncConfig.origin.erp){ |
| | | queryWrapper.eq( StringUtils.isNotBlank(pageWrap.getModel().getErpOrgId()),Member::getErpOrgId,pageWrap.getModel().getErpOrgId()); |
| | | }else{ |
| | | queryWrapper.eq(StringUtils.isNotBlank(pageWrap.getModel().getCompanyId()),Member::getCompanyId,pageWrap.getModel().getCompanyId()); |
| | | queryWrapper.eq((pageWrap.getModel().getCompanyId())!=null,Member::getCompanyId,pageWrap.getModel().getCompanyId()); |
| | | } |
| | | IPage<MemberInfoDTO> memberIPage = memberJoinMapper.selectJoinPage(page, MemberInfoDTO.class,queryWrapper); |
| | | IPage<Member> memberIPage = memberJoinMapper.selectJoinPage(page, Member.class,queryWrapper); |
| | | return PageData.from(memberIPage); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public PageData<MemberInfoDTO> findUnusualPage(PageWrap<MemberQuery> pageWrap) { |
| | | public PageData<Member> findUnusualPage(PageWrap<MemberQuery> pageWrap) { |
| | | IPage<Member> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Member> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.leftJoin(Company.class,Company::getId,Member::getCompanyId); |
| | | queryWrapper.selectAll(Member.class) |
| | | .selectAs(Company::getName,MemberInfoDTO::getCompanyName) |
| | | .selectAs(Company::getName,Member::getCompanyName) |
| | | .select(" (select ua.CREATE_DATE from user_action ua where ua.MEMBER_ID=t.id and ua.ISDELETED=0 order by ua.CREATE_DATE desc limit 1) as optTime") |
| | | .select(" (select s.REALNAME from user_action uac left join system_user s on uac.CREATOR = s.ID where uac.MEMBER_ID=t.id and uac.ISDELETED=0 order by uac.CREATE_DATE desc limit 1) as creatorName") |
| | | .select(" (select STARTTIME from visits v where v.MEMBER_ID=t.id and v.ISDELETED=0 order by CREATE_DATE desc limit 1) as visitsLastDate") |
| | |
| | | .or().like(Member::getVisitCompanyName,pageWrap.getModel().getCompanyName())) |
| | | .like(StringUtils.isNotBlank(pageWrap.getModel().getIdcardNo()),Member::getIdcardNo,pageWrap.getModel().getIdcardNo()) |
| | | .eq(Member::getStatus,Constants.Status.FREEZE.getValue()) |
| | | .eq(StringUtils.isNotBlank(pageWrap.getModel().getCompanyId()),Company::getId,pageWrap.getModel().getCompanyId()) |
| | | .eq((pageWrap.getModel().getCompanyId())!=null,Company::getId,pageWrap.getModel().getCompanyId()) |
| | | .eq(Objects.nonNull(pageWrap.getModel().getCode()),Member::getCode,pageWrap.getModel().getCode()) |
| | | .orderByDesc(Member::getCreateDate); |
| | | |
| | | |
| | | IPage<MemberInfoDTO> memberIPage = memberJoinMapper.selectJoinPage(page, MemberInfoDTO.class,queryWrapper); |
| | | IPage<Member> memberIPage = memberJoinMapper.selectJoinPage(page, Member.class,queryWrapper); |
| | | return PageData.from(memberIPage); |
| | | |
| | | } |
| | |
| | | return; |
| | | } |
| | | List<Integer> memberIds = memberList.stream().map(m->m.getId()).collect(Collectors.toList()); |
| | | |
| | | Date date = new Date(); |
| | | for (Integer id:memberIds) { |
| | | UserAction userAction=new UserAction(); |
| | | userAction.setIsdeleted(Constants.ZERO); |
| | | userAction.setCreateDate(new Date()); |
| | | userAction.setType(1); |
| | | userAction.setRemark("ç±å®æ¶ä»»å¡äºãæä½æ¶é´"+DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")+"ãï¼è¿è¡ãå»ç»ã"); |
| | | userAction.setMemberId(id+""); |
| | | userActionJoinMapper.insert(userAction); |
| | | Member updateMember = new Member(); |
| | | updateMember.setId(id); |
| | | updateMember.setEditDate(date); |
| | | saveUserActionBiz(updateMember,null,Constants.UserActionType.FREEZE,userActionJoinMapper); |
| | | } |
| | | |
| | | |
| | |
| | | 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.MemberInfoDTO; |
| | | import com.doumee.dao.business.ParksMapper; |
| | | import com.doumee.dao.business.join.ParksJoinMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Parks; |
| | | import com.doumee.service.business.ParksService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.ProblemLogMapper; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.join.ProblemLogJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Constants; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.TrainTimeMapper; |
| | | import com.doumee.dao.business.join.TrainTimeJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.TrainTime; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.TrainTimeService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | |
| | | 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.UserActionMapper; |
| | | import com.doumee.dao.business.join.UserActionJoinMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.ParkBook; |
| | | import com.doumee.dao.business.model.UserAction; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.UserActionService; |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.erp.ErpConstants; |
| | | import com.doumee.core.erp.ErpTool; |
| | | import com.doumee.core.erp.model.openapi.request.VisitListRequest; |
| | | import com.doumee.core.erp.model.openapi.request.erp.ApproveAddRequest; |
| | | import com.doumee.core.erp.model.openapi.request.erp.UserInfoRequest; |
| | | import com.doumee.core.erp.model.openapi.response.VisitEventListResponse; |
| | | import com.doumee.core.erp.model.openapi.response.erp.ApproveInfoResponse; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | | import com.doumee.core.haikang.model.HKTools; |
| | | import com.doumee.core.haikang.model.param.BaseResponse; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentCancelRequest; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentOutRequest; |
| | | import com.doumee.core.haikang.model.param.request.VisitAppointmentRequest; |
| | | import com.doumee.core.haikang.model.param.respose.VisitAppointmentResponse; |
| | |
| | | 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.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.join.DeviceJoinMapper; |
| | | import com.doumee.dao.business.join.VisitEventJoinMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.web.reqeust.AuditApproveDTO; |
| | | import com.doumee.dao.web.reqeust.ErpVisitDTO; |
| | | import com.doumee.dao.web.reqeust.ErpWithVisitDTO; |
| | | import com.doumee.dao.web.reqeust.VisitRecordDTO; |
| | | import com.doumee.dao.web.response.InternalHomeVO; |
| | | import com.doumee.dao.web.response.VisitDetailVO; |
| | | import com.doumee.dao.web.response.VisitRecordVO; |
| | | import com.doumee.service.business.ApproveService; |
| | | import com.doumee.service.business.InterfaceLogService; |
| | | import com.doumee.service.business.VisitsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.xiaoymin.knife4j.core.util.CollectionUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.DigestUtils; |
| | | |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | import com.doumee.core.utils.redis.RedisUtil; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.join.CarEventJoinMapper; |
| | | import com.doumee.dao.business.join.DeviceEventJoinMapper; |
| | | import com.doumee.dao.business.join.VisitEventJoinMapper; |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.ImageBase64Util; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.ext.ERPSyncService; |
| | |
| | | } |
| | | } |
| | | |
| | | private UserAddRequest getUserAddModel(Member c,String path,int type) { |
| | | public static UserAddRequest getUserAddModel(Member c,String path,int type) { |
| | | UserAddRequest model = new UserAddRequest(); |
| | | model.setOrgIndexCode(c.getHkOrgId()); |
| | | model.setJobNo(c.getCode()); |
| | | model.setPhoneNo(c.getPhone()); |
| | | model.setCertificateNo(DESUtil.decrypt(Constants.EDS_PWD, c.getIdcardNo())); |
| | | model.setCertificateType(HKConstants.CertificateType.SHENFENZHENG.getKey()+""); |
| | | model.setPersonId(type == 0 ?UUID.randomUUID().toString().replace("-", ""):c.getHkId()); |
| | |
| | | } |
| | | face.setFaceData(imageBase); |
| | | model.getFaces().add(face); |
| | | |
| | | } |
| | | return model; |
| | | } |
| | |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.Cars; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Visits; |
| | |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CompanyMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.VisitsMapper; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.service.business.impl.hksync.HkSyncBaseServiceImpl; |