Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbom_dianjiang
| | |
| | | VUE_APP_CONTEXT_PATH = './' |
| | | |
| | | # æ¥å£åç¼ |
| | | VUE_APP_API_PREFIX = '/jinkuai_admin' |
| | | VUE_APP_API_PREFIX = '/dianjiang_admin_api' |
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | NODE_ENV = 'development' |
| | | VUE_APP_API_URL = 'http://localhost:10010' |
| | | VUE_APP_API_URL = 'http://localhost:11010' |
| | |
| | | # ç产ç¯å¢é
ç½® |
| | | NODE_ENV = 'production' |
| | | |
| | | # å
³éDEBUG |
| | | VUE_APP_DEBUG = 'off' |
| | | |
| | | VUE_APP_API_URL = 'https://test.doumee.cn/lianhelihua_interface' |
| | | # å¼åç¯å¢é
ç½® |
| | | NODE_ENV = 'development' |
| | | VUE_APP_API_URL = 'http://192.168.0.7:10010/dianjiang_admin_interface' |
| | |
| | | { |
| | | "name": "jinkuai", |
| | | "name": "zbom_dianjiang", |
| | | "version": "1.0.0", |
| | | "private": true, |
| | | "scripts": { |
| | |
| | | this.title = title |
| | | this.fileName = '' |
| | | this.visible = true |
| | | this.type = 0 |
| | | this.type = 1 |
| | | }, |
| | | // å¯¼åºæ¨¡æ¿ |
| | | exportTemplate () { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | width="100%" |
| | | > |
| | | <TableLayout :permissions="['business:cases:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" id="curSearchForm" label-width="100px" inline> |
| | | <el-form-item label="æ é¢" prop="name"> |
| | | <el-input v-model="searchForm.name" style="width: 150px" placeholder="请è¾å
¥æ é¢" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select |
| | | v-model="searchForm.status" |
| | | placeholder="ç¶æ" |
| | | clearable |
| | | style="width: 150px" |
| | | @change="search" |
| | | > |
| | | <el-option :key="0" :value="0" label="å¯ç¨"></el-option> |
| | | <el-option :key="1" :value="1" label="ç¦ç¨"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <!-- <ul class="toolbar" v-permissions="['business:cases:create', 'business:cases:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaCasesWindow.open('æ°å»ºæ¡ä¾',null)" icon="el-icon-plus" v-permissions="['business:cases:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" icon="el-icon-refresh" v-permissions="['business:cases:create']" @click="$refs.OperaCasesImportWindow.open('æ¡ä¾å¯¼å
¥')">æ¹é导å
¥</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:cases:delete']">å é¤</el-button></li> |
| | | </ul>--> |
| | | <el-table |
| | | :height="tableHeight" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | :cell-class-name="setRowClassName" |
| | | border |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="name" label="æ¡ä¾æ é¢" min-width="200px"></el-table-column> |
| | | <el-table-column prop="icon" label="æè¡æ¦å¾é" min-width="220px"> |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex; flex-wrap: wrap;width: 200px;" v-if="row.fileList && row.fileList.length"> |
| | | <div v-for="item in row.fileList" :key="row.id+'_img'+item.id" style=" box-sizing: border-box; margin-right: 10px; " > |
| | | <el-image style="width: 50px; height: 50px;" :src="item.url" |
| | | :preview-src-list="[item.url]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="memberName" label="èå¸" min-width="220px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="orange" style="margin-right: 10px"> {{row.memberCode}}</span> <span>{{row.memberName||''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="startDate" label="å¼å§æ¥æ" min-width="140px"></el-table-column> |
| | | <el-table-column prop="endDate" label="ç»ææ¥æ" min-width="140px"></el-table-column> |
| | | <el-table-column prop="detail" label="æ¡ä¾æè¿°" min-width="230px" ></el-table-column> |
| | | <el-table-column label="ç¶æ" > |
| | | <template slot-scope="{row}"> |
| | | <span class="orange" v-if="row.status==0" >å¯ç¨</span> |
| | | <span class="red" v-if="row.status==1">ç¦ç¨</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦å é¤" > |
| | | <template slot-scope="{row}"> |
| | | <span class="red" v-if="row.deleted==1" >å·²å é¤</span> |
| | | <span class="green" v-else>æªå é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | </TableLayout> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { findAll as memberList } from '@/api/business/member' |
| | | import {findAll as cateList} from "@/api/business/category"; |
| | | export default { |
| | | name: 'OperaCasesListWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | title: '', |
| | | visible: false, |
| | | tableHeight: null, |
| | | searchForm: { |
| | | containDeleted: 1, |
| | | name: '', |
| | | importId: '', |
| | | status: null |
| | | }, |
| | | memberList: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/cases', |
| | | 'field.id': 'id' |
| | | }) |
| | | window.addEventListener('resize', () => { |
| | | this.getTableHeight() |
| | | }) |
| | | cateList({ |
| | | }).then(res => { |
| | | this.cateList = res |
| | | }) |
| | | }, |
| | | methods: { |
| | | setRowClassName({row, rowIndex}) { |
| | | if (row.deleted == 1) { |
| | | return 'warning-row' |
| | | } |
| | | return '' // 妿ä¸éè¦ä»»ä½ç¹æ®æ ·å¼ï¼è¿å空å符串æ null |
| | | }, |
| | | getTableHeight(){ |
| | | this.$nextTick(() => { |
| | | this.tableHeight = window.innerHeight - 180- document.getElementById('curSearchForm').clientHeight |
| | | }) |
| | | }, |
| | | open (title, memberId, importId) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.getTableHeight() |
| | | this.tableData = { |
| | | // å·²éä¸çæ°æ® |
| | | selectedRows: [], |
| | | // æåºçåæ®µ |
| | | sorts: [], |
| | | // å½åé¡µæ°æ® |
| | | list: [], |
| | | // å页 |
| | | pagination: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | this.searchForm.importId = importId |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | /deep/ .window__body { |
| | | overflow-y: hidden !important; |
| | | } |
| | | .table-content .table-wrap .el-table{ |
| | | overflow-y: hidden !important; |
| | | } |
| | | </style> |
| | | <style > |
| | | .success-row { |
| | | background: #f0f9eb; /* æµ
绿è²èæ¯ */ |
| | | } |
| | | .warning-row { |
| | | background: rgba(161, 14, 14, 0.35); /* æµ
红è²èæ¯ */ |
| | | } |
| | | </style> |
| | |
| | | v-for="item in memberList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | :label="item.name+' ã'+item.code+'ã'" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | return { |
| | | isUploading: false, |
| | | uploadData: { |
| | | folder: 'dianjiang/category' |
| | | folder: 'dianjiang/cases' |
| | | }, |
| | | // è¡¨åæ°æ® |
| | | form: { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | width="100%" |
| | | > |
| | | <TableLayout :permissions="['business:cases:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form class="table-search-formCur" ref="searchForm" id="curSearchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="åç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" style="width: 150px" placeholder="请è¾å
¥åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥å·" prop="code"> |
| | | <el-input v-model="searchForm.code" style="width: 150px" placeholder="请è¾å
¥å·¥å·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æåº" prop="zhanquIds"> |
| | | <el-select |
| | | v-model="searchForm.zhanquIds" |
| | | style="width: 150px" |
| | | placeholder="æåº" |
| | | clearable |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList.filter(item=>{return item.type==0})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åä¸åç±»å" prop="bustypeIds"> |
| | | <el-select |
| | | v-model="searchForm.bustypeIds" |
| | | style="width: 150px" |
| | | placeholder="åä¸åç±»å" |
| | | clearable |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList.filter(item=>{return item.type==1})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ
é¿é¢å" prop="fieldIdList"> |
| | | <el-select |
| | | v-model="searchForm.fieldIdList" |
| | | style="width: 150px" |
| | | placeholder="æ
é¿é¢å" |
| | | clearable |
| | | multiple |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList.filter(item=>{return item.type==2})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="èå¸ç级" prop="levelId"> |
| | | <el-select |
| | | v-model="searchForm.levelId" |
| | | style="width: 150px" |
| | | placeholder="èå¸ç级" |
| | | clearable |
| | | @change="search" |
| | | > |
| | | <el-option |
| | | v-for="item in cateList.filter(item=>{return item.type==3})" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select |
| | | v-model="searchForm.status" |
| | | placeholder="ç¶æ" |
| | | clearable |
| | | style="width: 150px" |
| | | @change="search" |
| | | > |
| | | <el-option :key="0" :value="0" label="å¯ç¨"></el-option> |
| | | <el-option :key="1" :value="1" label="ç¦ç¨"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <!-- <ul class="toolbar" v-permissions="['business:cases:create', 'business:cases:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaCasesWindow.open('æ°å»ºæ¡ä¾',null)" icon="el-icon-plus" v-permissions="['business:cases:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" icon="el-icon-refresh" v-permissions="['business:cases:create']" @click="$refs.OperaCasesImportWindow.open('æ¡ä¾å¯¼å
¥')">æ¹é导å
¥</el-button></li> |
| | | <li><el-button type="danger" @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:cases:delete']">å é¤</el-button></li> |
| | | </ul>--> |
| | | <el-table |
| | | :height="tableHeight" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | border |
| | | :cell-class-name="setRowClassName" |
| | | stripe |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="imgurl" label="å¾ç" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image v-if="row.fullImgurl" style="width: 50px; height: 50px; margin-right: 10px" :src="row.fullImgurl" |
| | | :preview-src-list="[row.fullImgurl]"> |
| | | </el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="å·¥å·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="å§å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="sex" label="æ§å«" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.sex ==0">ç·</span> |
| | | <span v-if="row.sex ==1">女</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="positon" label="å²ä½" min-width="120px"></el-table-column> |
| | | <el-table-column prop="levelName" label="ç级" min-width="100px"></el-table-column> |
| | | <el-table-column prop="jobYear" label="ä»ä¸å¹´ä»½" min-width="100px"></el-table-column> |
| | | <el-table-column prop="serveNum" label="æå¡ååº" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.serveNum">{{row.serveNum}}个</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="caseNum" label="æ ææ¡ä¾" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span >{{row.caseNum || 0}}个</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="busTypeNames" label="åä¸åç±»å" min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.typeList && row.typeList.length"> |
| | | <div style="display:inline-block;" v-for="(item,index) in row.typeList">{{item.name||''}} <span v-if="index < row.typeList.length-1" style="display:inline-block;padding: 0px 3px;">/</span></div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="areaNames" label="æå¡æåº" min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.zqList && row.zqList.length"> |
| | | <div style="display:inline-block;" v-for="(item,index) in row.zqList">{{item.name||''}} <span v-if="index < row.zqList.length-1" style="display:inline-block;padding: 0px 3px;">/</span></div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="fieldNames" label="æ
é¿é¢å" min-width="200px"> |
| | | <template slot-scope="{row}"> |
| | | <div v-if="row.fieldList && row.fieldList.length"> |
| | | <div style="display:inline-block;" v-for="(item,index) in row.fieldList">{{item.name||''}} <span v-if="index < row.fieldList.length-1" style="display:inline-block;padding: 0px 3px;">/</span></div> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="fee" label="è´¹ç¨æ å(å
/å¨)" min-width="130px"></el-table-column> |
| | | <el-table-column label="ç¶æ" > |
| | | <template slot-scope="{row}"> |
| | | <span class="orange" v-if="row.status==0" >å¯ç¨</span> |
| | | <span class="red" v-if="row.status==1">ç¦ç¨</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦å é¤" > |
| | | <template slot-scope="{row}"> |
| | | <span class="red" v-if="row.deleted==1" >å·²å é¤</span> |
| | | <span class="green" v-else>æªå é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | </TableLayout> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { findAll as memberList } from '@/api/business/member' |
| | | export default { |
| | | name: 'OperaMemberListWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination }, |
| | | data () { |
| | | return { |
| | | title: '', |
| | | visible: false, |
| | | tableHeight: null, |
| | | searchForm: { |
| | | name: '', |
| | | containDeleted: 1, |
| | | queryFlag: 1, |
| | | code: '', |
| | | status: null, |
| | | levelId: null, |
| | | fieldIdList: [], |
| | | zhanquIds: null, |
| | | bustypeIds: null, |
| | | type: 0 |
| | | }, |
| | | cateList: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/member', |
| | | 'field.id': 'id' |
| | | }) |
| | | window.addEventListener('resize', () => { |
| | | this.getTableHeight() |
| | | }) |
| | | }, |
| | | methods: { |
| | | getTableHeight () { |
| | | this.$nextTick(() => { |
| | | this.tableHeight = window.innerHeight - 180- document.getElementById('curSearchForm').clientHeight |
| | | }) |
| | | |
| | | }, |
| | | loadMemberList () { |
| | | memberList({ |
| | | }).then(res => { |
| | | this.memberList = res |
| | | }) |
| | | }, |
| | | setRowClassName({row, rowIndex}) { |
| | | if (row.deleted == 1) { |
| | | return 'warning-row' |
| | | } |
| | | return '' // 妿ä¸éè¦ä»»ä½ç¹æ®æ ·å¼ï¼è¿å空å符串æ null |
| | | }, |
| | | open (title, importId) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.getTableHeight() |
| | | this.tableData = { |
| | | // å·²éä¸çæ°æ® |
| | | selectedRows: [], |
| | | // æåºçåæ®µ |
| | | sorts: [], |
| | | // å½åé¡µæ°æ® |
| | | list: [], |
| | | // å页 |
| | | pagination: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | this.searchForm.importId = importId |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | /deep/ .window__body { |
| | | overflow-y: hidden !important; |
| | | } |
| | | .table-content .table-wrap .el-table{ |
| | | overflow-y: hidden !important; |
| | | } |
| | | </style> |
| | | <style > |
| | | .success-row { |
| | | background: #f0f9eb; /* æµ
绿è²èæ¯ */ |
| | | } |
| | | .warning-row { |
| | | background: rgba(161, 14, 14, 0.35); /* æµ
红è²èæ¯ */ |
| | | } |
| | | </style> |
| | |
| | | $input-height: 32px; |
| | | .global-window { |
| | | // 头鍿 é¢ |
| | | left: 218px !important; |
| | | /deep/ .el-drawer__header { |
| | | padding: 0 10px 0 0; |
| | | line-height: 40px; |
| | |
| | | v-for="item in memberList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.name" |
| | | :label="item.name+' ã'+item.code+'ã'" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="æ¡ä¾æ é¢" min-width="100px"></el-table-column> |
| | | <el-table-column prop="name" label="æ¡ä¾æ é¢" min-width="200px"></el-table-column> |
| | | <el-table-column prop="icon" label="æè¡æ¦å¾é" min-width="220px"> |
| | | <template slot-scope="{row}"> |
| | | <div style="display: flex; flex-wrap: wrap;width: 200px;" v-if="row.fileList && row.fileList.length"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="memberName" label="èå¸" min-width="120px"></el-table-column> |
| | | <el-table-column prop="memberName" label="èå¸" min-width="220px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="orange" style="margin-right: 10px"> {{row.memberCode}}</span> <span>{{row.memberName||''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="startDate" label="å¼å§æ¥æ" min-width="140px"></el-table-column> |
| | | <el-table-column prop="endDate" label="ç»ææ¥æ" min-width="140px"></el-table-column> |
| | | <el-table-column prop="detail" label="æ¡ä¾æè¿°" min-width="230px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="detail" label="æ¡ä¾æè¿°" min-width="230px" ></el-table-column> |
| | | <el-table-column prop="updateUserName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="æè¿æä½æ¶é´" min-width="150px"></el-table-column> |
| | | <el-table-column label="ç¶æ" fixed="right"> |
| | |
| | | <el-table-column prop="title" label="å
容" min-width="200px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column label="ä¸å¡ç±»å"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type ==0 " >èå¸å¯¼å
¥</span> |
| | | <span v-if="row.type == 1" >æ¡ä¾å¯¼å
¥</span> |
| | | <span v-if="row.type ==0 " class="green">èå¸å¯¼å
¥</span> |
| | | <span v-if="row.type == 1" class="orange" >æ¡ä¾å¯¼å
¥</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="totalNum" label="æ»è®°å½æ°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="doneNum" label="æåå½å
¥æ°é" min-width="100px"></el-table-column> |
| | | <el-table-column prop="doneNum" label="æåå½å
¥æ°é" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.status == 1" class="red">{{row.ingNum}}</span> |
| | | <span v-else>{{ row.doneNum }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="errorNum" label="å½å
¥å¤±è´¥æ°é" min-width="100px"></el-table-column> |
| | | <el-table-column prop="updateUserName" label="æä½äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createTime" label="导å
¥æ¶é´" min-width="150px"></el-table-column> |
| | | <el-table-column prop="updateTime" label="æè¿æä½æ¶é´" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" v-if="row.type ==1" style="color: orange" @click="$refs.OperaCasesListWindow.open('æ¥ç导å
¥æ¡ä¾ã'+row.title+'ã',null, row.id)" icon="el-icon-open">æ¥ç导å
¥æ¡ä¾</el-button> |
| | | <el-button type="text" v-if="row.type ==0" style="color: green" @click="$refs.OperaMemberListWindow.open('æ¥ç导å
¥æ¡ä¾ã'+row.title+'ã', row.id)" icon="el-icon-open">æ¥ç导å
¥èå¸</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaCategoryWindow ref="operaCategoryWindow" @success="handlePageChange"/> |
| | | <OperaMemberListWindow ref="OperaMemberListWindow" @success="handlePageChange"/> |
| | | <OperaCasesListWindow ref="OperaCasesListWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaCategoryWindow from '@/components/business/OperaCategoryWindow' |
| | | import OperaMemberListWindow from '@/components/business/OperaMemberListWindow' |
| | | import OperaCasesListWindow from '@/components/business/OperaCasesListWindow' |
| | | export default { |
| | | name: 'Category', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaCategoryWindow }, |
| | | components: { TableLayout, Pagination, OperaCasesListWindow,OperaMemberListWindow}, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | |
| | | :label="item.name" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select |
| | | v-model="searchForm.status" |
| | |
| | | <el-option :key="1" :value="1" label="ç¦ç¨"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | |
| | | <el-table-column |
| | | v-if="containPermissions(['business:member:update', 'business:member:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | min-width="180" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaMemberWindow.open('ç¼è¾èå¸', row,searchForm.type)" icon="el-icon-edit" v-permissions="['business:member:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.OperaCasesListWindow.open('æ¥çè叿¡ä¾ã'+row.name+'ã', row.id)" icon="el-icon-open">æ¡ä¾</el-button> |
| | | <el-button type="text" style="color: red" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:member:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaMemberWindow ref="operaMemberWindow" @success="handlePageChange"/> |
| | | <OperaMemberImportWindow ref="OperaMemberImportWindow" @success="handlePageChange" /> |
| | | <OperaCasesListWindow ref="OperaCasesListWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaMemberWindow from '@/components/business/OperaMemberWindow' |
| | | import OperaMemberImportWindow from '@/components/business/OperaMemberImportWindow' |
| | | import OperaCasesListWindow from '@/components/business/OperaCasesListWindow' |
| | | import { findAll as cateList } from '@/api/business/category' |
| | | export default { |
| | | name: 'Category', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaMemberWindow ,OperaMemberImportWindow}, |
| | | components: { TableLayout, Pagination, OperaMemberWindow ,OperaMemberImportWindow,OperaCasesListWindow}, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.init; |
| | | |
| | | import com.doumee.service.business.ImportRecordService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class InitService { |
| | | |
| | | @Autowired |
| | | private ImportRecordService importRecordService; |
| | | @PostConstruct |
| | | public void initImportTaskStatus() { |
| | | importRecordService.clearImporTask(); |
| | | } |
| | | } |
| | |
| | | # 端å£å¨é
ç½® |
| | | server: |
| | | port: 10010 |
| | | port: 11010 |
| | | # 项ç®ä¿¡æ¯é
ç½® |
| | | project: |
| | | name: å¿é¦-ç¹å° |
| | |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.8.40</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>dingtalk</artifactId> |
| | | <version>2.2.25</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.dingtalk.open</groupId> |
| | | <artifactId>app-stream-client</artifactId> |
| | | <version>1.3.7</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>alibaba-dingtalk-service-sdk</artifactId> |
| | | <version>2.0.0</version> |
| | | </dependency> |
| | | </dependencies> |
| | | <properties> |
| | | <maven.compiler.source>8</maven.compiler.source> |
| | |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.openxml4j.exceptions.InvalidFormatException; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.xssf.usermodel.XSSFPicture; |
| | | import org.apache.poi.xssf.usermodel.XSSFPictureData; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | | import org.slf4j.Logger; |
| | |
| | | } |
| | | StringBuilder sb = new StringBuilder(); |
| | | for (Object[] os : annotationList){ |
| | | Object val = this.getCellValue(row, column++); |
| | | if (val != null){ |
| | | ExcelColumn ef = (ExcelColumn)os[0]; |
| | | // Get param type and type cast |
| | | Class<?> valType = Class.class; |
| | | if (os[1] instanceof Field){ |
| | | valType = ((Field)os[1]).getType(); |
| | | }else if(os[1] instanceof Method){ |
| | | Method method = ((Method)os[1]); |
| | | if ("get".equals(method.getName().substring(0, 3))){ |
| | | valType = method.getReturnType(); |
| | | }else if("set".equals(method.getName().substring(0, 3))){ |
| | | valType = ((Method)os[1]).getParameterTypes()[0]; |
| | | } |
| | | int tcolumn = column++; |
| | | Object val = this.getCellValue(row, tcolumn);; |
| | | ExcelColumn ef = (ExcelColumn)os[0]; |
| | | // Get param type and type cast |
| | | Class<?> valType = Class.class; |
| | | if (os[1] instanceof Field){ |
| | | valType = ((Field)os[1]).getType(); |
| | | }else if(os[1] instanceof Method){ |
| | | Method method = ((Method)os[1]); |
| | | if ("get".equals(method.getName().substring(0, 3))){ |
| | | valType = method.getReturnType(); |
| | | }else if("set".equals(method.getName().substring(0, 3))){ |
| | | valType = ((Method)os[1]).getParameterTypes()[0]; |
| | | } |
| | | //log.debug("Import value type: ["+i+","+column+"] " + valType); |
| | | try { |
| | | if (valType == String.class){ |
| | | String s = String.valueOf(val.toString()); |
| | | if(StringUtils.endsWith(s, ".0")){ |
| | | val = StringUtils.substringBefore(s, ".0"); |
| | | }else{ |
| | | val = String.valueOf(val.toString()).trim(); |
| | | } |
| | | if(ef.fieldType()== XSSFPictureData.class){ |
| | | XSSFPictureData qrData = null; |
| | | if(val !=null){ |
| | | String tid = String.valueOf(val.toString()).trim(); |
| | | int start = tid.indexOf("(\"")+2; |
| | | int end = tid.indexOf("\","); |
| | | if(start>=0&& end>=1 && end>start){ |
| | | String picId = tid.substring(start,end); |
| | | XSSFPictureData data = this.pictureList.get(picId); |
| | | if(data!= null && data.getData() != null){ |
| | | qrData =data; |
| | | } |
| | | } |
| | | else if (valType == Integer.class){ |
| | | val = Double.valueOf(val.toString()).intValue(); |
| | | }else if (valType == Long.class){ |
| | | val = Double.valueOf(val.toString()).longValue(); |
| | | }else if (valType == Double.class){ |
| | | val = Double.valueOf(val.toString()); |
| | | }else if (valType == Float.class){ |
| | | val = Float.valueOf(val.toString()); |
| | | }else if (valType == Date.class){ |
| | | val = DateUtil.getJavaDate((Double)val); |
| | | }else{ |
| | | if (ef.fieldType() != Class.class){ |
| | | val = ef.fieldType().getMethod("getValue", String.class).invoke(null, val.toString()); |
| | | }else{ |
| | | val = Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(), |
| | | "fieldtype."+valType.getSimpleName()+"Type")).getMethod("getValue", String.class).invoke(null, val.toString()); |
| | | } |
| | | val = null; |
| | | //æ¬æµ®å¾ç |
| | | List<XSSFPictureData> xfData = ExcelPictureUtil.getPicturesFromCell(this.sheet,row.getCell(tcolumn)); |
| | | List<XSSFPictureData> valList =new ArrayList<>(); |
| | | if(qrData!=null){ |
| | | valList.add(qrData); |
| | | } |
| | | if(xfData!=null){ |
| | | valList.addAll(xfData); |
| | | } |
| | | if (valType==List.class){ |
| | | val =valList; |
| | | } else if ( valType==XSSFPictureData.class){ |
| | | val = (valList!=null && valList.size()>0)?valList.get(0):null; |
| | | } |
| | | }else{ |
| | | if (val != null){ |
| | | try { |
| | | if (valType == String.class){ |
| | | String s = String.valueOf(val.toString()); |
| | | if(StringUtils.endsWith(s, ".0")){ |
| | | val = StringUtils.substringBefore(s, ".0"); |
| | | }else{ |
| | | val = String.valueOf(val.toString()).trim(); |
| | | } |
| | | } |
| | | else if (valType == Integer.class){ |
| | | val = Double.valueOf(val.toString()).intValue(); |
| | | }else if (valType == Long.class){ |
| | | val = Double.valueOf(val.toString()).longValue(); |
| | | }else if (valType == Double.class){ |
| | | val = Double.valueOf(val.toString()); |
| | | }else if (valType == Float.class){ |
| | | val = Float.valueOf(val.toString()); |
| | | }else if (valType == Date.class){ |
| | | val = DateUtil.getJavaDate((Double)val); |
| | | }else if (valType == XSSFPictureData.class){ |
| | | }else{ |
| | | if (ef.fieldType() != Class.class){ |
| | | val = ef.fieldType().getMethod("getValue", String.class).invoke(null, val.toString()); |
| | | }else{ |
| | | val = Class.forName(this.getClass().getName().replaceAll(this.getClass().getSimpleName(), |
| | | "fieldtype."+valType.getSimpleName()+"Type")).getMethod("getValue", String.class).invoke(null, val.toString()); |
| | | } |
| | | } |
| | | } catch (Exception ex) { |
| | | log.info("Get cell value ["+i+","+column+"] error: " + ex.toString()); |
| | | val = null; |
| | | } |
| | | |
| | | } catch (Exception ex) { |
| | | log.info("Get cell value ["+i+","+column+"] error: " + ex.toString()); |
| | | val = null; |
| | | } |
| | | // set entity value |
| | | if (os[1] instanceof Field){ |
| | | Reflections.invokeSetter(e, ((Field)os[1]).getName(), val); |
| | | }else if (os[1] instanceof Method){ |
| | | String mthodName = ((Method)os[1]).getName(); |
| | | if ("get".equals(mthodName.substring(0, 3))){ |
| | | mthodName = "set"+StringUtils.substringAfter(mthodName, "get"); |
| | | } |
| | | Reflections.invokeMethod(e, mthodName, new Class[] {valType}, new Object[] {val}); |
| | | } |
| | | } |
| | | if (val != null){ |
| | | try { |
| | | // set entity value |
| | | if (os[1] instanceof Field){ |
| | | Reflections.invokeSetter(e, ((Field)os[1]).getName(), val); |
| | | }else if (os[1] instanceof Method){ |
| | | String mthodName = ((Method)os[1]).getName(); |
| | | if ("get".equals(mthodName.substring(0, 3))){ |
| | | mthodName = "set"+StringUtils.substringAfter(mthodName, "get"); |
| | | } |
| | | Reflections.invokeMethod(e, mthodName, new Class[] {valType}, new Object[] {val}); |
| | | } |
| | | }catch (Exception e1){ |
| | | val =null; |
| | | } |
| | | }else{ |
| | | } |
| | | sb.append(val+", "); |
| | | } |
| | |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.openxml4j.opc.PackagePartName; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.apache.poi.ss.usermodel.WorkbookFactory; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.xssf.usermodel.*; |
| | | |
| | | import java.io.*; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.zip.ZipEntry; |
| | | import java.util.zip.ZipInputStream; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·ååå
æ ¼ä¸çå¾ç |
| | | */ |
| | | |
| | | public static List<XSSFPictureData> getPicturesFromCell(Sheet sheet, Cell cell) { |
| | | try { |
| | | List<XSSFPictureData> cellPictures = new ArrayList<>(); |
| | | XSSFDrawing drawing = ((XSSFSheet) sheet).createDrawingPatriarch(); |
| | | if (drawing != null) { |
| | | List<XSSFPicture> pictures = drawing.getShapes().stream() |
| | | .filter(shape -> shape instanceof XSSFPicture) |
| | | .map(shape -> (XSSFPicture) shape).collect(Collectors.toList()); |
| | | for (XSSFPicture picture : pictures) { |
| | | int rowIndex = picture.getPreferredSize().getRow1(); |
| | | int colIndex = picture.getPreferredSize().getCol1(); |
| | | if (colIndex == cell.getColumnIndex() && rowIndex == cell.getRowIndex()) { |
| | | cellPictures.add(picture.getPictureData()); |
| | | } |
| | | } |
| | | } |
| | | return cellPictures; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private static Map<String, List<XSSFPicture>> getImgPathMap(Sheet sheet) { |
| | | Map<String, List<XSSFPicture>> imgPathMap = new HashMap<>(); |
| | | XSSFDrawing drawing = ((XSSFSheet) sheet).createDrawingPatriarch(); |
| | | if (drawing != null) { |
| | | List<XSSFPicture> pictures = drawing.getShapes().stream() |
| | | .filter(shape -> shape instanceof XSSFPicture) |
| | | .map(shape -> (XSSFPicture) shape).collect(Collectors.toList()); |
| | | for (XSSFPicture picture : pictures) { |
| | | int rowIndex = picture.getPreferredSize().getRow1(); |
| | | int colIndex = picture.getPreferredSize().getCol1(); |
| | | String key = colIndex + "-" + rowIndex; |
| | | List<XSSFPicture> list = null; |
| | | if (imgPathMap.containsKey(key)) { |
| | | list = imgPathMap.get(key); |
| | | } else { |
| | | list = new ArrayList<>(); |
| | | imgPathMap.put(key, list); |
| | | } |
| | | list.add(picture); |
| | | } |
| | | } |
| | | return imgPathMap; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åå¾ççæ©å±å |
| | | */ |
| | | |
| | | private static String getImageExtension(PictureData picture) { |
| | | String mimeType = picture.getMimeType(); |
| | | switch (mimeType) { |
| | | case "image/jpeg": |
| | | return "jpg"; |
| | | case "image/png": |
| | | return "png"; |
| | | default: |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | public static final Integer FOUR = 4; |
| | | public static final Integer SIX = 6; |
| | | public static final Integer FIVE = 5; |
| | | public static final Integer DD_STATUS_SUCCESS_CODE = 200 ; |
| | | public static final Long DD_ERR_CODE = 0L ; |
| | | public static final String INENTITY_FILES = "INENTITY_FILES"; |
| | | public static final String MEMBER_FILES = "MEMBER_FILES"; |
| | | public static final String CATEGORY_FILES = "CATEGORY_FILES"; |
| | |
| | | public static final String ZBOM_TICKET_LOGIN_URL ="ZBOM_TICKET_LOGIN_URL" ; |
| | | public static final String OBJCET_STORAGE = "OBJCET_STORAGE"; |
| | | public static final Object OBJECT_TYPE_CASES = "OBJECT_TYPE_CASES"; |
| | | public static final String DD_TALK = "DD_TALK" ; |
| | | public static final String APP_KEY = "APP_KEY"; |
| | | public static final String APP_SECRET = "APP_SECRET"; |
| | | public static final String DD_USER_TYPE = "DD_USER"; |
| | | public static boolean WORKORDER_SHE_EMAIL_SENDING = false; |
| | | public static boolean DEALING_COMPANY_SYNC = false ; |
| | | public static boolean DEALING_MEMBER_SYNC = false ; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.dingTalk; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyun.dingtalkoauth2_1_0.Client; |
| | | import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest; |
| | | import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponse; |
| | | import com.aliyun.dingtalkoauth2_1_0.models.GetTokenResponse; |
| | | import com.aliyun.dingtalktodo_1_0.models.*; |
| | | import com.aliyun.tea.TeaException; |
| | | import com.aliyun.teautil.models.RuntimeOptions; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dingtalk.api.DefaultDingTalkClient; |
| | | import com.dingtalk.api.DingTalkClient; |
| | | import com.dingtalk.api.request.*; |
| | | import com.dingtalk.api.response.*; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.dao.system.dto.DingLoginDTO; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | | import com.taobao.api.ApiException; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/9/24 16:25 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class DingTalk { |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | |
| | | @Value("${dingtalk.clientId}") |
| | | private String clientId; |
| | | @Value("${dingtalk.clientSecret}") |
| | | private String clientSecret; |
| | | |
| | | /** |
| | | * ä½¿ç¨ Token åå§åè´¦å·Client æ°æ®åæ¥ç±» |
| | | * @return Client com.aliyun.dingtalkoauth2_1_0. |
| | | * @throws Exception |
| | | */ |
| | | public static Client createClient() throws Exception { |
| | | com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config(); |
| | | config.protocol = "https"; |
| | | config.regionId = "central"; |
| | | return new Client(config); |
| | | } |
| | | |
| | | /** |
| | | * å¾
åéç¥ç±» 龿¥æ± |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static com.aliyun.dingtalktodo_1_0.Client createV1Client() throws Exception { |
| | | com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config(); |
| | | config.protocol = "https"; |
| | | config.regionId = "central"; |
| | | return new com.aliyun.dingtalktodo_1_0.Client(config); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åééToken |
| | | * @return |
| | | */ |
| | | public String getToken(){ |
| | | String accessToken = systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.ACCESS_TOKEN).getCode(); |
| | | return accessToken; |
| | | } |
| | | |
| | | private String getAccessToken(String corpId) { |
| | | com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config(); |
| | | config.protocol = "https"; |
| | | config.regionId = "central"; |
| | | try { |
| | | com.aliyun.dingtalkoauth2_1_0.Client client = new com.aliyun.dingtalkoauth2_1_0.Client(config); |
| | | com.aliyun.dingtalkoauth2_1_0.models.GetTokenRequest getTokenRequest = new com.aliyun.dingtalkoauth2_1_0.models.GetTokenRequest() |
| | | .setClientId(clientId) |
| | | .setClientSecret(clientSecret) |
| | | .setGrantType("client_credentials"); |
| | | GetTokenResponse response = client.getToken(corpId, getTokenRequest); |
| | | return response.getBody().accessToken; |
| | | } catch (TeaException err) { |
| | | if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) { |
| | | // err ä¸å«æ code å message 屿§ï¼å¯å¸®å©å¼åå®ä½é®é¢ |
| | | log.error("Error getting access token: {}", err.getMessage()); |
| | | } |
| | | |
| | | } catch (Exception _err) { |
| | | TeaException err = new TeaException(_err.getMessage(), _err); |
| | | if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) { |
| | | // err ä¸å«æ code å message 屿§ï¼å¯å¸®å©å¼åå®ä½é®é¢ |
| | | log.error("Error getting access token: {}", err.getMessage()); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | public OapiV2UserGetuserinfoResponse.UserGetByCodeResponse getDDUserByCode(DingLoginDTO dto) throws ApiException { |
| | | DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/v2/user/getuserinfo"); |
| | | OapiV2UserGetuserinfoRequest req = new OapiV2UserGetuserinfoRequest(); |
| | | req.setCode(dto.getCode()); |
| | | OapiV2UserGetuserinfoResponse rsp = client.execute(req, getAccessToken(dto.getCorpId())); |
| | | if(rsp.getErrcode().equals(Constants.DD_ERR_CODE)){ |
| | | return rsp.getResult(); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),rsp.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.core.dingTalk; |
| | | |
| | | import com.dingtalk.open.app.api.GenericEventListener; |
| | | import com.dingtalk.open.app.api.OpenDingTalkStreamClientBuilder; |
| | | import com.dingtalk.open.app.api.message.GenericOpenDingTalkEvent; |
| | | import com.dingtalk.open.app.api.security.AuthClientCredential; |
| | | import com.dingtalk.open.app.stream.protocol.event.EventAckStatus; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.service.business.MemberService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import shade.com.alibaba.fastjson2.JSONObject; |
| | | |
| | | /** |
| | | * éé 订é
äºä»¶éç¥ |
| | | * |
| | | * @Author : Rk |
| | | * @create 2025/9/24 17:14 |
| | | */ |
| | | @Slf4j |
| | | @Configuration |
| | | public class DingTalkStream { |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Bean |
| | | public void DingTalkStreamRun() throws Exception { |
| | | String appKey = systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.APP_KEY).getCode(); |
| | | String appSecret = systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.APP_SECRET).getCode(); |
| | | |
| | | OpenDingTalkStreamClientBuilder |
| | | .custom() |
| | | .credential(new AuthClientCredential(appKey, appSecret)) |
| | | //注åäºä»¶çå¬ |
| | | .registerAllEventListener(new GenericEventListener() { |
| | | @Override |
| | | public EventAckStatus onEvent(GenericOpenDingTalkEvent event) { |
| | | try { |
| | | //äºä»¶å¯ä¸Id |
| | | String eventId = event.getEventId(); |
| | | log.error("é鿍éäºä»¶Id:{}"+eventId); |
| | | //äºä»¶ç±»å |
| | | String eventType = event.getEventType(); |
| | | log.error("é鿍éäºä»¶ç±»å:{}"+eventType); |
| | | //äºä»¶äº§çæ¶é´ |
| | | Long bornTime = event.getEventBornTime(); |
| | | log.error("é鿍éäºä»¶äº§çæ¶é´:{}"+bornTime); |
| | | //è·åäºä»¶ä½ |
| | | JSONObject bizData = event.getData(); |
| | | log.error("é鿍éäºä»¶è¯¦æ
:{}"+bizData); |
| | | |
| | | //å¤çäºä»¶ |
| | | // process(bizData); |
| | | //æ¶è´¹æå |
| | | return EventAckStatus.SUCCESS; |
| | | } catch (Exception e) { |
| | | //æ¶è´¹å¤±è´¥ |
| | | return EventAckStatus.LATER; |
| | | } |
| | | } |
| | | }) |
| | | .build().start(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import org.apache.poi.xssf.usermodel.XSSFPicture; |
| | | import org.apache.poi.xssf.usermodel.XSSFPictureData; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * å工信æ¯å¯¼å
¥è¡¨ |
| | |
| | | @ApiModel("å工信æ¯å¯¼å
¥") |
| | | public class CasesImport { |
| | | |
| | | // @ExcelColumn(name="åºå·",value = "sn") |
| | | private Integer sn; |
| | | |
| | | @ExcelColumn(name="å§å",value = "name",index = 1) |
| | | @ExcelColumn(name="æ¡ä¾ä¸»é¢",value = "name",index = 1) |
| | | private String name; |
| | | @ExcelColumn(name="ææºå·",value = "phone",index = 2) |
| | | private String phone; |
| | | @ExcelColumn(name="å¼å§æ¥æ",value = "startDate",index = 2) |
| | | private String startDate; |
| | | |
| | | @ExcelColumn(name="身份è¯å·",value = "idcardNo",index = 3) |
| | | private String idcardNo; |
| | | @ExcelColumn(name="ç»ææ¥æ",value = "endDate",index = 3) |
| | | private String endDate; |
| | | |
| | | @ExcelColumn(name="ç»ç»åç§°" , value = "companyName" ,index = 4) |
| | | private String companyName; |
| | | @ExcelColumn(name="æå¡èå¸" , value = "memberCode" ,index = 4) |
| | | private String memberCode; |
| | | @ExcelColumn(name="æå¡èå¸å§å" , value = "memberName" ,index = 5) |
| | | private String memberName; |
| | | |
| | | @ExcelColumn(name="å·¥å·" , value = "code") |
| | | private String code; |
| | | |
| | | @ExcelColumn(name="å²ä½" , value = "code") |
| | | private String positionName; |
| | | |
| | | @ExcelColumn(name="æ¡ä¾è¯´æ" , value = "detail",index = 6) |
| | | private String detail; |
| | | @ExcelColumn(name="æ¡ä¾å¾1" , value = "imageList",fieldType = XSSFPictureData.class,index = 7) |
| | | private List<XSSFPictureData> imageList; |
| | | @ExcelColumn(name="æ¡ä¾å¾2" , value = "imageList1",fieldType = XSSFPictureData.class,index = 8) |
| | | private List<XSSFPictureData> imageList1; |
| | | @ExcelColumn(name="æ¡ä¾å¾3" , value = "imageList2",fieldType = XSSFPictureData.class,index = 9) |
| | | private List<XSSFPictureData> imageList2; |
| | | @ExcelColumn(name="æ¡ä¾å¾4" , value = "imageList3",fieldType = XSSFPictureData.class,index = 10) |
| | | private List<XSSFPictureData> imageList3; |
| | | @ExcelColumn(name="æ¡ä¾å¾5" , value = "imageList4",fieldType = XSSFPictureData.class,index = 11) |
| | | private List<XSSFPictureData> imageList4; |
| | | @ExcelColumn(name="æ¡ä¾å¾6" , value = "imageList5",fieldType = XSSFPictureData.class,index = 12) |
| | | private List<XSSFPictureData> imageList5; |
| | | } |
| | |
| | | import com.doumee.dao.business.model.Category; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import org.apache.poi.xssf.usermodel.XSSFPictureData; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | private String code; |
| | | @ExcelColumn(name="å§å",value = "name",index = 2) |
| | | private String name; |
| | | @ExcelColumn(name="èä¸ç
§",value = "imgurl",index = 3) |
| | | private String imgurl; |
| | | @ExcelColumn(name="èä¸ç
§",value = "imgurl",index = 3,fieldType = XSSFPictureData.class) |
| | | private XSSFPictureData imgurl; |
| | | @ExcelColumn(name="ç级",value = "levelName",index = 4) |
| | | private String levelName; |
| | | @ExcelColumn(name="æ§å«" , value = "sex" ,index = 5) |
| | |
| | | @ApiModelProperty(value = "èå¸å§å", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberName ; |
| | | @ApiModelProperty(value = "èå¸å·¥å·", example = "1") |
| | | @TableField(exist = false) |
| | | private String memberCode ; |
| | | @ApiModelProperty(value = "å¾ééä»¶éå", example = "1") |
| | | @TableField(exist = false) |
| | | private List<Multifile> fileList; |
| | | @ApiModelProperty(value = "æåæä½äººåï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private String updateUserName; |
| | | @ApiModelProperty(value = "å¾çéæ°æ®ï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private List<byte[]> imgdataList; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å
å«å·²å é¤ 0ä¸å
å« 1å
å«ï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private int containDeleted; |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "ç»ææ¶é´ï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Date endtime; |
| | | @ApiModelProperty(value = "è¿è¡ä¸å·²å¤ççæ°éï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private Integer ingNum; |
| | | } |
| | |
| | | @ApiModelProperty(value = "æåæä½äººåï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private String updateUserName; |
| | | @ApiModelProperty(value = "æ¯å¦å
å«å·²å é¤ 0ä¸å
å« 1å
å«ï¼", example = "1") |
| | | @TableField(exist = false) |
| | | private int containDeleted; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author dm |
| | | * @since 2025/03/31 16:44 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç»å½åæ°") |
| | | public class DingLoginDTO implements Serializable { |
| | | |
| | | @NotBlank(message = "codeä¸è½ä¸ºç©º") |
| | | @ApiModelProperty(value = "code") |
| | | private String code; |
| | | |
| | | @NotBlank(message = "corpIdä¸è½ä¸ºç©º") |
| | | @ApiModelProperty(value = "corpId") |
| | | private String corpId; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "ç¨æ·ä¸»é®") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·è§è²ï¼") |
| | | @ApiModelProperty(value = "ç¨æ·è§è²ï¼ (dUser:æ 记为ééç¨æ·)") |
| | | private String roleType; |
| | | |
| | | @ApiModelProperty(value = "æåºç¼ç ") |
| | | private String zhanqu; |
| | | |
| | | @ApiModelProperty(value = "token") |
| | | private String token; |
| | | } |
| | |
| | | ImportRecord importBatch(MultipartFile file, int type ); |
| | | |
| | | void dealImporTask(ImportRecord importRecord); |
| | | void clearImporTask(); |
| | | } |
| | |
| | | MPJLambdaWrapper<Cases> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Cases.class) |
| | | .selectAs(Member::getName,Cases::getMemberName) |
| | | .selectAs(Member::getCode,Cases::getMemberCode) |
| | | .selectAs(SystemUser::getRealname, Member::getUpdateUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,Cases::getUpdateUser) |
| | | .leftJoin(Member.class,Member::getId,Cases::getMemberId); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.eq(pageWrap.getModel().getContainDeleted()!=1,Cases::getDeleted, Constants.ZERO); |
| | | queryWrapper.eq(pageWrap.getModel().getId() != null,Cases::getId, pageWrap.getModel().getId()); |
| | | queryWrapper.eq(pageWrap.getModel().getDeleted() != null,Cases::getDeleted, pageWrap.getModel().getDeleted()); |
| | | queryWrapper.eq(pageWrap.getModel().getCreateUser() != null,Cases::getCreateUser, pageWrap.getModel().getCreateUser()); |
| | | queryWrapper.eq(pageWrap.getModel().getUpdateUser() != null,Cases::getUpdateUser, pageWrap.getModel().getUpdateUser()); |
| | | queryWrapper.eq(pageWrap.getModel().getRemark() != null,Cases::getRemark, pageWrap.getModel().getRemark()); |
| | |
| | | } |
| | | private void initMultifileList(Cases cate) { |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CATEGORY_FILES).getCode(); |
| | | + systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CASES_FILES).getCode(); |
| | | |
| | | Multifile find = new Multifile(); |
| | | find.setObjId(cate.getId()); |
| | |
| | | .orderByAsc(Category::getSortnum) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(categoryList)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.CATEGORY_FILES).getCode(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.CATEGORY_FILES).getCode(); |
| | | for (Category category:categoryList) { |
| | | if(StringUtils.isNotBlank(category.getIcon())){ |
| | | category.setIconFull(path + category.getIcon()); |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.tyyun.TyyZosUtil; |
| | | import com.doumee.dao.business.CasesMapper; |
| | | import com.doumee.dao.business.CategoryMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dto.CasesImport; |
| | | import com.doumee.dao.business.dto.MemberImport; |
| | | import com.doumee.dao.business.model.Cases; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.ImportRecord; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ImportRecordMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.ImportRecordService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import javax.annotation.Resource; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.math.BigDecimal; |
| | |
| | | private MemberMapper memberMapper; |
| | | @Autowired |
| | | private CasesMapper casesMapper; |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | @Resource |
| | |
| | | MPJLambdaWrapper<ImportRecord> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.selectAll(ImportRecord.class ) |
| | | .selectAs(SystemUser::getRealname,ImportRecord::getUpdateUserName) |
| | | .select( "(select count(c.id) from cases c where c.import_id= t.id)",ImportRecord::getIngNum) |
| | | .selectAs(SystemUser::getRealname,ImportRecord::getUpdateUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,ImportRecord::getUpdateUser); |
| | | queryWrapper.eq(pageWrap.getModel().getId() != null,ImportRecord::getId, pageWrap.getModel().getId()); |
| | | queryWrapper.eq(pageWrap.getModel().getDeleted() != null,ImportRecord::getDeleted, pageWrap.getModel().getDeleted()); |
| | |
| | | Map<String, XSSFPictureData> pics = ie.getExcelPictures(); |
| | | if(type == 1) { |
| | | List<CasesImport> importList = (ie.getDataList(CasesImport.class,null)); |
| | | if(importList==null || importList.size()==0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"导å
¥æä»¶æ¡ä¾ä¿¡æ¯å
容为空ï¼"); |
| | | } |
| | | model.setCaseList(isvalidImpartCasesParam(loginUserInfo,pics,importList)); |
| | | model.setTotalNum(model.getCaseList().size()); |
| | | }else{ |
| | | List<MemberImport> importList = (ie.getDataList(MemberImport.class,null)); |
| | |
| | | int index = 1; |
| | | for(MemberImport param :memberList){ |
| | | index ++; |
| | | if(StringUtils.isBlank(param.getImgurl()) |
| | | ||StringUtils.isBlank(param.getFee()) |
| | | ||StringUtils.isBlank(param.getName()) |
| | | ||StringUtils.isBlank(param.getInfo()) |
| | | ||StringUtils.isBlank(param.getJobYear()) |
| | | ||StringUtils.isBlank(param.getPosition()) |
| | | ||StringUtils.isBlank(param.getFieldNames()) |
| | | ||StringUtils.isBlank(param.getSex()) |
| | | ||StringUtils.isBlank(param.getCode()) |
| | | ||StringUtils.isBlank(param.getZqNames()) |
| | | ||StringUtils.isBlank(param.getLevelName()) |
| | | ||StringUtils.isBlank(param.getServeNum()) |
| | | ||StringUtils.isBlank(param.getTypeNames())){ |
| | | if(( param.getImgurl() == null |
| | | ||param.getImgurl().getData() == null |
| | | ||param.getImgurl().getData().length == 0) |
| | | &&StringUtils.isBlank(param.getFee()) |
| | | &&StringUtils.isBlank(param.getName()) |
| | | &&StringUtils.isBlank(param.getInfo()) |
| | | &&StringUtils.isBlank(param.getJobYear()) |
| | | &&StringUtils.isBlank(param.getPosition()) |
| | | &&StringUtils.isBlank(param.getFieldNames()) |
| | | &&StringUtils.isBlank(param.getSex()) |
| | | &&StringUtils.isBlank(param.getCode()) |
| | | &&StringUtils.isBlank(param.getZqNames()) |
| | | &&StringUtils.isBlank(param.getLevelName()) |
| | | &&StringUtils.isBlank(param.getServeNum()) |
| | | &&StringUtils.isBlank(param.getTypeNames())){ |
| | | continue; |
| | | } |
| | | Member member = new Member(); |
| | |
| | | if(StringUtils.isBlank(param.getFee())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡æ°æ®ï¼ è´¹ç¨æ åä¿¡æ¯ä¸è½ä¸ºç©º"); |
| | | } |
| | | if(pics!=null && StringUtils.isNotBlank(param.getImgurl())){ |
| | | /* if(pics!=null && StringUtils.isNotBlank(param.getImgurl())){ |
| | | log.info("===================="+param.getImgurl()); |
| | | int start = param.getImgurl().indexOf("(\"")+2; |
| | | int end = param.getImgurl().indexOf("\","); |
| | |
| | | member.setImgurlData(data.getData()); |
| | | } |
| | | } |
| | | } |
| | | }*/ |
| | | if(param.getImgurl() ==null ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡ã"+param.getName()+"ãæ°æ®ï¼ æªè¯»åå°ä»»ä½èä¸ç
§å¾çæ°æ®"); |
| | | } |
| | | member.setImgurlData(param.getImgurl().getData()); |
| | | if(member.getImgurlData() ==null || member.getImgurlData().length==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡ã"+param.getName()+"ãæ°æ®ï¼ æªè¯»åå°ä»»ä½èä¸ç
§å¾çæ°æ®"); |
| | | } |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼æªè¯»åå°æææ°æ®"); |
| | | } |
| | | return insertMember; |
| | | |
| | | } |
| | | private List<Cases> isvalidImpartCasesParam(LoginUserInfo user, Map<String, XSSFPictureData> pics, List<CasesImport> casesImportList) { |
| | | if(casesImportList ==null || casesImportList.size()==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼æªè¯»åå°æææ°æ®"); |
| | | } |
| | | if(pics ==null || pics.size()==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼æªè¯»åå°ä»»ä½èä¸ç
§å¾çæ°æ®"); |
| | | } |
| | | List<Cases> insertList = new ArrayList<>(); |
| | | List<Member> allList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .eq(Member::getDeleted,Constants.ZERO)); |
| | | allList=allList==null?new ArrayList<>():allList; |
| | | if(allList == null || allList.size()==0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对ä¸èµ·ï¼ 读åè叿°æ®å¼å¸¸ï¼è¯·å
ç»´æ¤è叿°æ®ä¿¡æ¯ï¼"); |
| | | } |
| | | Date date = new Date(); |
| | | int index = 1; |
| | | for(CasesImport param :casesImportList){ |
| | | index ++; |
| | | if( StringUtils.isBlank(param.getName()) |
| | | &&StringUtils.isBlank(param.getMemberCode()) |
| | | &&StringUtils.isBlank(param.getStartDate()) |
| | | &&StringUtils.isBlank(param.getEndDate()) |
| | | &&StringUtils.isBlank(param.getDetail())){ |
| | | continue; |
| | | } |
| | | Cases cases = new Cases(); |
| | | cases.setStartDate(DateUtil.fromStringToDate("yyyy-MM-dd",param.getStartDate())); |
| | | cases.setEndDate(DateUtil.fromStringToDate("yyyy-MM-dd",param.getEndDate())); |
| | | if(StringUtils.isBlank(param.getName())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡æ°æ®ï¼ æ¡ä¾ä¸»é¢ä¸è½ä¸ºç©º"); |
| | | } |
| | | Member member =null; |
| | | for(Member m : allList){ |
| | | if(StringUtils.equals(param.getMemberCode(),m.getCode())){ |
| | | member = m; |
| | | } |
| | | } |
| | | if(member == null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡æ°æ®ï¼ èå¸å·¥å·ã"+param.getMemberCode()+"ãä¿¡æ¯ä¸åå¨ï¼è¯·ç¡®è®¤ä¸è¦éå¤å½å
¥"); |
| | | |
| | | } |
| | | if(StringUtils.isBlank(param.getDetail())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡æ°æ®ï¼ æ¡ä¾è¯´æä¸è½ä¸ºç©º"); |
| | | } |
| | | if(param.getImageList() == null){ |
| | | param.setImageList(new ArrayList<>()); |
| | | } |
| | | param.getImageList().addAll(param.getImageList1()!=null?param.getImageList1():new ArrayList<>()); |
| | | param.getImageList().addAll(param.getImageList2()!=null?param.getImageList2():new ArrayList<>()); |
| | | param.getImageList().addAll(param.getImageList3()!=null?param.getImageList3():new ArrayList<>()); |
| | | param.getImageList().addAll(param.getImageList4()!=null?param.getImageList4():new ArrayList<>()); |
| | | param.getImageList().addAll(param.getImageList5()!=null?param.getImageList5():new ArrayList<>()); |
| | | /* if(param.getImageList() == null |
| | | ||param.getImageList().size() == 0 ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡æ°æ®ï¼ æ¡ä¾å¾ä¿¡æ¯ä¸è½ä¸ºç©º"); |
| | | }*/ |
| | | if(cases.getStartDate()==null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡æ°æ®ï¼ å¼å§æ¥æè¯»å失败"); |
| | | } |
| | | if(cases.getEndDate()==null){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç¬¬"+index+"è¡æ°æ®ï¼ ç»ææ¥æè¯»å失败"); |
| | | } |
| | | cases.setImgdataList(new ArrayList<>()); |
| | | for(XSSFPictureData d : param.getImageList()){ |
| | | cases.getImgdataList().add(d.getData()); |
| | | } |
| | | cases.setCreateTime(date); |
| | | cases.setUpdateTime(date); |
| | | cases.setCreateUser(user.getId()); |
| | | cases.setUpdateUser(user.getId()); |
| | | cases.setAddType(Constants.ONE); |
| | | cases.setDeleted(Constants.ZERO); |
| | | cases.setStatus(Constants.ZERO); |
| | | cases.setName(param.getName()); |
| | | cases.setDetail(param.getDetail()); |
| | | cases.setMemberId(member.getId()); |
| | | |
| | | insertList.add(cases); |
| | | } |
| | | if(insertList ==null || insertList.size()==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼æªè¯»åå°æææ°æ®"); |
| | | } |
| | | return insertList; |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 弿¥æ§è¡æä»¶ä»»å¡ |
| | | */ |
| | | @Override |
| | | public void clearImporTask(){ |
| | | try { |
| | | List<ImportRecord> records = importRecordMapper.selectList(new QueryWrapper<ImportRecord>() |
| | | .select("id,total_num,(select count(c.id) from cases c where c.import_id= import_record.id) as doneNum") |
| | | .lambda() |
| | | .eq(ImportRecord::getDetail,Constants.ZERO) |
| | | .ne(ImportRecord::getStatus,Constants.TWO) |
| | | ); |
| | | for(ImportRecord importRecord : records){ |
| | | importRecord.setErrorNum(Constants.formatIntegerNum(importRecord.getTotalNum()- Constants.formatIntegerNum(importRecord.getDoneNum()))); |
| | | importRecord.setStatus(Constants.TWO); |
| | | importRecord.setUpdateTime(new Date()); |
| | | importRecord.setRemark("任塿§è¡ä¸æï¼å¼ºå¶è®¾ç½®ä»»å¡ç¶æ"); |
| | | importRecordMapper.updateById(importRecord); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | redisTemplate.delete(Constants.RedisKeys.IMPORTING_RECORD); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¤çæ¡ä¾å¯¼å
¥ä»»å¡ |
| | | * @param importRecord |
| | | */ |
| | | |
| | | private int dealCaseImportBiz(ImportRecord importRecord) { |
| | | int success=0; |
| | | String msg =""; |
| | | String msg = ""; |
| | | String nowDate =DateUtil.getNowShortDate(); |
| | | try { |
| | | for(Cases param:importRecord.getCaseList()){ |
| | | |
| | | String bucket =systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.BUCKETNAME).getCode(); |
| | | String folder =systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.CASES_FILES).getCode(); |
| | | TyyZosUtil obs = new TyyZosUtil(systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ENDPOINT).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ACCESS_ID).getCode(), |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE,Constants.ACCESS_KEY).getCode()); |
| | | for(Cases param: importRecord.getCaseList()){ |
| | | int ts =0; |
| | | try { |
| | | param.setImportId(importRecord.getId()); |
| | | param.setAddType(Constants.ONE); |
| | | ts = dealCasesInsert(obs,param,folder,nowDate,bucket); |
| | | }catch (Exception e){ |
| | | log.error("å¤ç人åä¿¡æ¯åçå¼å¸¸{}",e.getMessage()); |
| | | ts =0; |
| | | } |
| | | success += ts; |
| | | } |
| | | obs.shutDown(); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | importRecord.setDoneNum(success); |
| | | importRecord.setErrorNum(importRecord.getTotalNum() - success); |
| | | importRecord.setDetail(msg); |
| | | redisTemplate.delete(Constants.RedisKeys.IMPORTING_RECORD); |
| | | return success; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | @Transactional |
| | | private int dealCasesInsert( TyyZosUtil obs,Cases param,String folder,String nowDate,String bucketName) { |
| | | int success = casesMapper.insert(param); |
| | | if(param.getImgdataList()!=null && param.getImgdataList().size()>0){ |
| | | List<Multifile> multifileList = new ArrayList<>(); |
| | | for(byte[] d : param.getImgdataList()){ |
| | | String fileName = UUID.randomUUID() + ".png"; |
| | | String tempFileName = nowDate + "/" + fileName; |
| | | String key = folder + tempFileName;// æä»¶å |
| | | if (obs.uploadInputstreamObjectNoShutdown(new ByteArrayInputStream(d ) ,bucketName, key)) { |
| | | Multifile s = new Multifile(); |
| | | s.setIsdeleted(Constants.ZERO); |
| | | s.setCreator(param.getCreateUser()); |
| | | s.setCreateDate(param.getCreateTime()); |
| | | s.setObjId(param.getId()); |
| | | s.setType(Constants.ZERO); |
| | | s.setFileurl(tempFileName); |
| | | s.setObjType(Constants.ONE); |
| | | multifileList.add(s); |
| | | param.setImgurl(tempFileName);//è¯ä»¶ç
§å°å |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"å¾éä¸ä¼ 失败ï¼"); |
| | | } |
| | | } |
| | | multifileMapper.insert(multifileList); |
| | | } |
| | | return success; |
| | | } |
| | | |
| | | private int dealMemberInsert( TyyZosUtil obs,Member param,String folder,String nowDate,String bucketName) { |
| | | int success =0; |
| | | try { |
| | |
| | | .apply(Objects.nonNull(model.getBustypeIds())," find_in_set( '["+model.getBustypeIds()+"]', t.BUSTYPE_IDS ) ") |
| | | .apply(Objects.nonNull(model.getZhanquIds())," find_in_set( '["+model.getZhanquIds()+"]', t.ZHANQU_IDS ) ") |
| | | .like(StringUtils.isNotBlank(model.getName()),Member::getName, model.getName()) |
| | | .eq(Objects.nonNull(model.getImportId()),Member::getImportId, model.getImportId()) |
| | | .eq(Objects.nonNull(model.getStatus()),Member::getStatus, model.getStatus()) |
| | | .eq(Member::getDeleted, Constants.ZERO) |
| | | .eq(model.getContainDeleted()!=1,Member::getDeleted, Constants.ZERO) |
| | | .in(Objects.nonNull(model.getLevelId()),Category::getId, model.getLevelId()) |
| | | .eq(Objects.nonNull(model.getCode()),Member::getCode, model.getCode()) |
| | | .orderByDesc(Objects.nonNull(model.getOrderByType())&&Constants.equalsInteger(model.getOrderByType(), Constants.ZERO),Member::getFee) |
| | |
| | | if(Constants.equalsInteger(pageWrap.getModel().getQueryFlag(),Constants.ONE)){ |
| | | queryWrapper.select("(select count(c.id) from cases c where c.deleted=0 and c.member_id=t.id)",Member::getCaseNum); |
| | | } |
| | | if(StringUtils.isNotBlank(model.getFieldIds())){ |
| | | String [] fieldIds = model.getFieldIds().split(","); |
| | | for (String s:fieldIds) { |
| | | queryWrapper.apply("find_in_set( '["+s+"]' , t.FIELD_IDS )"); |
| | | if(CollectionUtils.isNotEmpty(model.getFieldIdList())){ |
| | | String sql = ""; |
| | | for (Integer s:model.getFieldIdList() |
| | | ) { |
| | | sql = sql + (StringUtils.isNotBlank(sql)?" or ":"") + " find_in_set( '["+s+"]' , t.FIELD_IDS ) "; |
| | | } |
| | | queryWrapper.apply(sql); |
| | | } |
| | | if (StringUtils.isNotBlank(model.getQueryZQCode())) { |
| | | Category zhanqu = categoryMapper.selectOne(new QueryWrapper<Category>().lambda() |
| | |
| | | ); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.MEMBER_FILES).getCode(); |
| | | String roleConfig = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.ROLE_CONFIG).getCode(); |
| | | for (Member member:memberIPage.getRecords()) { |
| | | if(CollectionUtils.isNotEmpty(categoryList)){ |
| | | dealMemberField(member,categoryList); |
| | | if(Constants.equalsInteger(pageWrap.getModel().getQueryFlag(),Constants.ONE)) { |
| | | dealMemberCategoryList(member, categoryList); |
| | | } |
| | | dealMemberCategoryList(member, categoryList,pageWrap.getModel().getQueryFlag()); |
| | | } |
| | | member.setFullImgurl(StringUtils.isNotBlank(member.getImgurl())?(path + member.getImgurl()):""); |
| | | if(!Constants.equalsInteger(pageWrap.getModel().getQueryFlag(),Constants.ONE) && (StringUtils.isBlank(roleConfig)||StringUtils.isBlank(model.getQueryUserRole()) |
| | | || !roleConfig.contains(model.getQueryUserRole()))){ |
| | | member.setFee(null); |
| | | } |
| | | if(member.getJobYear()!=null){ |
| | | member.setWorkYears(DateUtil.getCurrentYear( ) - member.getJobYear()+1); |
| | | } |
| | |
| | | return PageData.from(memberIPage); |
| | | } |
| | | |
| | | private void dealMemberCategoryList(Member member, List<Category> categoryList) { |
| | | member.setFieldIdList(new ArrayList<>()); |
| | | member.setBustypeIdList(new ArrayList<>()); |
| | | member.setZhanquIdList(new ArrayList<>()); |
| | | private void dealMemberCategoryList(Member member, List<Category> categoryList, Integer queryFlag) { |
| | | member.setFieldList(new ArrayList<>()); |
| | | member.setTypeList(new ArrayList<>()); |
| | | member.setZqList(new ArrayList<>()); |
| | | member.setBustypeIdList(new ArrayList<>()); |
| | | member.setZhanquIdList(new ArrayList<>()); |
| | | for(Category c:categoryList){ |
| | | // 0=æåº;1=åä¸å;2=æ
é¿é¢å; |
| | | if(Constants.equalsInteger(c.getType(),Constants.ZERO)&& StringUtils.contains(member.getZhanquIds(),"["+c.getId()+"]")){ |
| | | //æåº |
| | | member.getZqList().add(c); |
| | | member.getZhanquIdList().add(c.getId()); |
| | | } |
| | | if(Constants.equalsInteger(c.getType(),Constants.ONE)&& StringUtils.contains(member.getBustypeIds(),"["+c.getId()+"]")){ |
| | | //åä¸å |
| | | member.getTypeList().add(c); |
| | | member.getBustypeIdList().add(c.getId()); |
| | | } |
| | | if(Constants.equalsInteger(c.getType(),Constants.TWO) && StringUtils.contains(member.getFieldIds(),"["+c.getId()+"]")){ |
| | | //æ
é¿é¢å |
| | | member.getFieldList().add(c); |
| | | member.getFieldIdList().add(c.getId()); |
| | | if(Constants.equalsInteger(queryFlag,Constants.ONE)) { |
| | | // 0=æåº;1=åä¸å;2=æ
é¿é¢å; |
| | | if(Constants.equalsInteger(c.getType(),Constants.ZERO)&& StringUtils.contains(member.getZhanquIds(),"["+c.getId()+"]")){ |
| | | //æåº |
| | | member.getZqList().add(c); |
| | | member.getZhanquIdList().add(c.getId()); |
| | | } |
| | | if(Constants.equalsInteger(c.getType(),Constants.TWO) && StringUtils.contains(member.getFieldIds(),"["+c.getId()+"]")){ |
| | | //æ
é¿é¢å |
| | | member.getFieldList().add(c); |
| | | member.getFieldIdList().add(c.getId()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Member findDetailById(Integer id,String queryUserRole) { |
| | | public Member findDetailById(Integer id,String userRole) { |
| | | Member member = memberMapper.selectJoinOne(Member.class, new MPJLambdaWrapper<Member>() |
| | | .selectAll(Member.class) |
| | | .select(" c1.NAME ", Member::getPromotionName) |
| | |
| | | } |
| | | |
| | | String resourcePath = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.RESOURCE_PATH).getCode(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CATEGORY_FILES).getCode(); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.MEMBER_FILES).getCode(); |
| | | String roleConfig = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.ROLE_CONFIG).getCode(); |
| | | member.setFullImgurl(StringUtils.isNotBlank(member.getImgurl())?(resourcePath + path + member.getImgurl()):""); |
| | | List<Cases> casesList = casesMapper.selectList(new QueryWrapper<Cases>().lambda() |
| | |
| | | .orderByDesc(Cases::getId) |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(casesList)){ |
| | | String casePath = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CASES_FILES).getCode(); |
| | | String casePath = systemDictDataBiz.queryByCode(Constants.OBJCET_STORAGE, Constants.CATEGORY_FILES).getCode(); |
| | | for (Cases cases:casesList) { |
| | | List<Multifile> multifileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId,cases.getId()) |
| | |
| | | multifileList.forEach(multifile -> { |
| | | multifile.setUrl(StringUtils.isNotBlank(multifile.getFileurl())?(resourcePath + casePath + multifile.getFileurl()):""); |
| | | }); |
| | | cases.setFileList(multifileList); |
| | | } |
| | | member.setCasesList(casesList); |
| | | } |
| | | if(StringUtils.isBlank(roleConfig)||StringUtils.isBlank(queryUserRole) |
| | | || !roleConfig.contains(queryUserRole)){ |
| | | if(StringUtils.isBlank(roleConfig)||StringUtils.isBlank(userRole) |
| | | || !(roleConfig.contains(userRole)||userRole.equals(Constants.DD_USER_TYPE) )){ |
| | | member.setFee(null); |
| | | } |
| | | return member; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | # 模å¼ï¼testingæµè¯æ¨¡å¼ |
| | | mode: testing |
| | | |
| | | dingtalk: |
| | | clientId: dingulzemj5bynjciapg |
| | | clientSecret: tLnWtSmmTuqjX9a1MvJzYxI1iXVJxEwtyZZYYFQ5cLg57pzzCZ4J8VsVwvmRNtkK |
| | | |
| | | |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.dingtalk.api.response.OapiV2UserGetuserinfoResponse; |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.annotation.LoginRequired; |
| | |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.dingTalk.DingTalk; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | |
| | | import com.doumee.dao.business.dto.LoginRequestNewParam; |
| | | import com.doumee.dao.business.model.Category; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.system.dto.DingLoginDTO; |
| | | import com.doumee.dao.system.model.SystemJob; |
| | | import com.doumee.dao.vo.WebLoginUserVO; |
| | | import com.doumee.service.business.CategoryService; |
| | | import com.doumee.service.business.MemberService; |
| | | import com.sun.deploy.net.HttpUtils; |
| | | import com.taobao.api.ApiException; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | | @Autowired |
| | | private DingTalk dingTalk; |
| | | |
| | | |
| | | @ApiOperation("UKåç¹ç»å½") |
| | | @GetMapping("/ukLogin") |
| | | public void ukLogin(String tick, Object obj, HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | LoginRequestNewParam requestParam = new LoginRequestNewParam(); |
| | | /*// UK_ERROR_URL = "http://u.zhibang.com/sso/web/token/error"; |
| | | // UK_ERROR_URL = "http://u.zhibang.com/sso/web/token/error"; |
| | | String errorUrl =systemDictDataBiz.queryByCode(Constants.ZBOM_PARAM,Constants.ZBOM_UK_ERROR_URL).getCode(); |
| | | try { |
| | | /* try { |
| | | log.error("请æ±åæ°TICKæåå§===========ï¼" + tick); |
| | | JSONObject urlParams = new JSONObject(); |
| | | log.info("请æ±åæ°ï¼" + JSON.toJSONString(urlParams)); |
| | |
| | | response.sendRedirect(requestParam.getRediUrl()+"?token="+token); |
| | | } |
| | | |
| | | @ApiOperation("ééç»å½") |
| | | @PostMapping("/ddLogin") |
| | | public ApiResponse<WebLoginUserVO> ddLogin(@Validated @RequestBody DingLoginDTO dingLoginDTO) throws ApiException { |
| | | WebLoginUserVO loginUserVO = new WebLoginUserVO(); |
| | | OapiV2UserGetuserinfoResponse.UserGetByCodeResponse response = dingTalk.getDDUserByCode(dingLoginDTO); |
| | | if(Objects.nonNull(response)){ |
| | | loginUserVO.setId(response.getUserid()); |
| | | loginUserVO.setRoleType(Constants.DD_USER_TYPE); |
| | | } |
| | | loginUserVO.setToken(jwtTokenUtil.generateToken(loginUserVO)); |
| | | return ApiResponse.success(loginUserVO); |
| | | } |
| | | |
| | | |
| | | private String enCode(String string) { |
| | | // TODO Auto-generated method stub |
| | |
| | | WebLoginUserVO loginUserVO = this.getMemberResponse(); |
| | | pageWrap.getModel().setQueryUserRole(loginUserVO.getRoleType()); |
| | | pageWrap.getModel().setQueryZQCode(loginUserVO.getZhanqu()); |
| | | return ApiResponse.success(memberService.findPage(pageWrap)); |
| | | PageData<Member> pageData = memberService.findPage(pageWrap); |
| | | if(CollectionUtils.isNotEmpty(pageData.getRecords())){ |
| | | String roleConfig = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.ROLE_CONFIG).getCode(); |
| | | if(StringUtils.isBlank(roleConfig)||StringUtils.isBlank(pageWrap.getModel().getQueryUserRole()) |
| | | || ! (roleConfig.contains(pageWrap.getModel().getQueryUserRole()) || pageWrap.getModel().getQueryUserRole().equals(Constants.DD_USER_TYPE) )){ |
| | | pageData.getRecords().forEach(i->{ |
| | | i.setFee(null); |
| | | }); |
| | | } |
| | | } |
| | | return ApiResponse.success(pageData); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |