Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei
| | |
| | | "dependencies": { |
| | | "@amap/amap-jsapi-loader": { |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz", |
| | | "resolved": "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz", |
| | | "integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==" |
| | | }, |
| | | "@babel/code-frame": { |
| | |
| | | }, |
| | | "ansi-styles": { |
| | | "version": "4.3.0", |
| | | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", |
| | | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", |
| | | "dev": true, |
| | | "optional": true, |
| | |
| | | }, |
| | | "chalk": { |
| | | "version": "4.1.2", |
| | | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", |
| | | "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz", |
| | | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", |
| | | "dev": true, |
| | | "optional": true, |
| | |
| | | }, |
| | | "color-convert": { |
| | | "version": "2.0.1", |
| | | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", |
| | | "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", |
| | | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", |
| | | "dev": true, |
| | | "optional": true, |
| | |
| | | }, |
| | | "color-name": { |
| | | "version": "1.1.4", |
| | | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", |
| | | "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", |
| | | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "has-flag": { |
| | | "version": "4.0.0", |
| | | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", |
| | | "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz", |
| | | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", |
| | | "dev": true, |
| | | "optional": true |
| | | }, |
| | | "loader-utils": { |
| | | "version": "2.0.4", |
| | | "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "resolved": "https://registry.npmmirror.com/loader-utils/-/loader-utils-2.0.4.tgz", |
| | | "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", |
| | | "dev": true, |
| | | "optional": true, |
| | |
| | | }, |
| | | "supports-color": { |
| | | "version": "7.2.0", |
| | | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", |
| | | "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz", |
| | | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", |
| | | "dev": true, |
| | | "optional": true, |
| | |
| | | }, |
| | | "vue-loader-v16": { |
| | | "version": "npm:vue-loader@16.8.3", |
| | | "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz", |
| | | "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", |
| | | "dev": true, |
| | | "optional": true, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | // return request.post('/visitsAdmin/cloudService/business/areas/treeList', data, { |
| | | // trim: true |
| | | // }) |
| | | return request.post('/visitsAdmin/cloudService/business/areas/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function listByParentId (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/listByParentId', data) |
| | | } |
| | | |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/create', data) |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/updateById', data) |
| | | } |
| | | |
| | | // æ å½¢ |
| | | export function treeList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/areas/listByParentId', data) |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/areas/delete/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | | return request.get('/visitsAdmin/cloudService/business/areas/delete/batch', { |
| | | params: { |
| | | ids |
| | | } |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalAlertWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <el-form :model="form" ref="form" label-width="100px" label-suffix="ï¼" :rules="rules"> |
| | | <el-form-item :label="form.type==0?'å¸åç§°':'å¿åºåç§°'" prop="name"> |
| | | <el-input v-model="form.name" :placeholder="form.type==0?'è¾å
¥å¸åç§°':'è¾å
¥å¿åºåç§°'" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æåºç " prop="sortnum"> |
| | | <el-input v-model="form.sortnum" placeholder="请è¾å
¥æåºç " v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalAlertWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' |
| | | export default { |
| | | name: 'OperaAreasWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalAlertWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | parentId: null, |
| | | name: null, |
| | | sortnum: '0', |
| | | type: '', |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/areas', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 确认æ°å»º |
| | | __confirmCreate () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | this.api.create(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$message.success('æ°å»ºæå') |
| | | this.$emit('success', this.form.parentId) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | }, |
| | | // ç¡®è®¤ä¿®æ¹ |
| | | __confirmEdit () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | // è°ç¨æ°å»ºæ¥å£ |
| | | this.isWorking = true |
| | | this.api.updateById(this.form) |
| | | .then(() => { |
| | | this.visible = false |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.$emit('success', this.form.parentId) |
| | | }) |
| | | .catch(e => { |
| | | this.$message.error(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç»ç±»å" prop="type"> |
| | | <el-radio-group v-model="form.type" :disabled="form.parentType == 0"> |
| | | <el-radio :label="0">ç¸å
³æ¹ç»ç»</el-radio> |
| | | <!-- <el-radio :label="0">ç¸å
³æ¹ç»ç»</el-radio>--> |
| | | <el-radio :label="1">å
é¨ç»ç»</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | |
| | | console.log(target) |
| | | this.form= { |
| | | id: null, |
| | | type: 0, |
| | | type: 1, |
| | | name: '', |
| | | parentId: null, |
| | | disable: false, |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:areas:query']"> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table |
| | | ref="table" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | lazy |
| | | :load="load" |
| | | :tree-props="{ children: 'childList', hasChildren: 'hasChildren' }" |
| | | row-key="id" |
| | | stripe |
| | | border |
| | | :header-row-class-name="'table-header'" |
| | | class="doumee-element-table" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column prop="name" label="å°åºåç§°" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" align="center" min-width="140px"></el-table-column> |
| | | <el-table-column prop="sortnum" label="æåºç " align="center" min-width="140px"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:areas:update', 'business:areas:create', 'business:areas:delete'])" |
| | | label="æä½" |
| | | align="center" |
| | | min-width="220" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{ row }"> |
| | | <el-button type="text" @click="edit(row)" v-permissions="['business:areas:update']">ç¼è¾</el-button> |
| | | <el-button v-if="row.type!=2" type="text" @click="createChild(row)" v-permissions="['business:areas:create']">æ°å»º{{ row.type==0 ? 'å¸' : 'åºå¿' }}</el-button> |
| | | <el-button type="text" @click="deleteById(row)" v-permissions="['business:areas:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaAreasWindow ref="operaAreasWindow" @success="update"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaAreasWindow from '@/components/business/OperaAreasWindow' |
| | | import { listByParentId } from '@/api/business/areas' |
| | | export default { |
| | | name: 'Areas', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaAreasWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | type: 0, |
| | | parentId: '' |
| | | }, |
| | | treeMaps: new Map(), |
| | | parentId: null |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'çå¸åºä¿¡æ¯è¡¨', |
| | | api: '/business/areas', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | |
| | | // 页ç åæ´å¤ç |
| | | handlePageChange (pageIndex) { |
| | | |
| | | this.isWorking.search = true |
| | | listByParentId(this.searchForm) |
| | | .then(data => { |
| | | this.tableData.list = this.dataAddBool(data) |
| | | }) |
| | | .catch(e => { |
| | | console.log(e) |
| | | this.$tip.error('æä½å¤±è´¥') |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | dataAddBool(array) { |
| | | if(array==null){ |
| | | return [] |
| | | } |
| | | array.forEach(item => { |
| | | item.hasChildren = item.type != 2 |
| | | // item.childList = item.childList && this.dataAddBool(item.childList) |
| | | }) |
| | | return array |
| | | }, |
| | | load(tree, treeNode, resolve) { |
| | | this.treeMaps.set(tree.id, { tree, treeNode, resolve }) |
| | | listByParentId({ parentId: tree.id, type: tree.type + 1 }) |
| | | .then(data => { |
| | | resolve(this.dataAddBool(data || [])) |
| | | }) |
| | | .catch(e => { |
| | | console.log(e) |
| | | this.$tip.error('æä½å¤±è´¥') |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | refreshLoadTree(parentId) { |
| | | if (this.treeMaps.get(parentId)) { |
| | | const { tree, treeNode, resolve } = this.treeMaps.get(parentId) |
| | | this.$set(this.$refs.table.store.states.lazyTreeNodeMap, parentId, []) |
| | | if (tree) { // éæ°æ§è¡ç¶èç¹å è½½å级æä½ |
| | | this.load(tree, treeNode, resolve) |
| | | if (tree.parentId) { // è¥åå¨ç·ç·ç»ç¹ï¼åæ§è¡ç·ç·èç¹å è½½å级æä½ï¼é²æ¢æåä¸ä¸ªåèç¹è¢«å é¤åç¶èç¹ä¸æ¾ç¤ºå é¤æé® |
| | | const a = this.treeMaps.get(tree.parentId) |
| | | this.load(a.tree, a.treeNode, a.resolve) |
| | | } |
| | | } |
| | | } else { |
| | | this.handlePageChange() |
| | | } |
| | | }, |
| | | deleteById (row, childConfirm = true) { |
| | | // let message = `确认å é¤${this.module}ã${row[this.configData['field.main']]}ãå?` |
| | | let message = `确认å é¤è¯¥è®°å½å?` |
| | | if (childConfirm && row.childList != null && row.childList.length > 0) { |
| | | // message = `确认å é¤${this.module}ã${row[this.configData['field.main']]}ãåå
¶å${this.module}å?` |
| | | message = `确认å é¤è¯¥è®°å½åå
¶åæ°æ®å?` |
| | | } |
| | | this.$dialog.deleteConfirm(message) |
| | | .then(() => { |
| | | this.isWorking.delete = true |
| | | this.api.deleteById(row[this.configData['field.id']]) |
| | | .then(() => { |
| | | this.$tip.apiSuccess('å 餿å') |
| | | this.refreshLoadTree(row.parentId) |
| | | }) |
| | | .catch(e => { |
| | | console.log(e) |
| | | this.$tip.error('æä½å¤±è´¥') |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.delete = false |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | edit(row) { |
| | | // this.parentId = row.type==0 ? null : row.type==1 ? 'ç¼è¾å¸' : 'ç¼è¾åºå¿' |
| | | this.$refs.operaAreasWindow.open(row.type==0 ? 'ç¼è¾ç' : row.type==1 ? 'ç¼è¾å¸' : 'ç¼è¾åºå¿', row) |
| | | }, |
| | | createChild(row) { |
| | | this.$refs.operaAreasWindow.open(row.type == 0 ? 'æ°å»ºå¸' : 'æ°å»ºå¿åº', { parentId: row.id, name: '', type: row.type + 1 }) |
| | | }, |
| | | update(parentId) { |
| | | this.refreshLoadTree(parentId) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:company:create', 'business:company:sync']"> |
| | | <li><el-button type="primary" v-permissions="['business:company:create']" @click="$refs.OperaInternalCompanyWindow.open('æ°å»ºä¼ä¸',null,null)">æ°å»º</el-button></li> |
| | | <li><el-button @click="sort('top')" :loading="sorting" icon="el-icon-sort-up" v-permissions="['business:company:sort']">ä¸ç§»</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:company:create']" @click="$refs.OperaInternalCompanyWindow.open('æ°å»ºç»ç»',null,null)">æ°å»º</el-button></li> |
| | | <li><el-button @click="sort('top')" :loaing="sorting" icon="el-icon-sort-up" v-permissions="['business:company:sort']">ä¸ç§»</el-button></li> |
| | | <li><el-button @click="sort('bottom')" :loading="sorting" icon="el-icon-sort-down" v-permissions="['business:company:sort']">ä¸ç§»</el-button></li> |
| | | <li><el-button type="primary" v-permissions="['business:company:sync']" :loading="loading" @click="synchronous()">忥</el-button></li> |
| | | </ul> |
| | |
| | | :tree-props="{children: 'childList',hasChildren: 'hasChildren'}" |
| | | row-key="id" |
| | | @selection-change="handleSelectionChange" |
| | | default-expand-all |
| | | > |
| | | default-expand-all> |
| | | <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="80px"> |
| | |
| | | <el-table-column |
| | | label="æä½" |
| | | width="230" |
| | | fixed="right" |
| | | > |
| | | fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('ç¼è¾ä¼ä¸ä¿¡æ¯',{ id: row.parentId,name:row.parentName,type:row.parentType, companyPath:row.parentCompanyPath}, row)" icon="el-icon-edit" v-permissions="['business:company:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('ç¼è¾ç»ç»ä¿¡æ¯',{ id: row.parentId,name:row.parentName,type:row.parentType, companyPath:row.parentCompanyPath}, row)" icon="el-icon-edit" v-permissions="['business:company:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="$refs.OperaInternalCompanyWindow.open('æ°å»ºå级', row,null)" icon="el-icon-plus">æ°å»ºå级</el-button> |
| | | <el-button type="text" @click="deleteById(row)" style="color: red" icon="el-icon-delete" v-permissions="['business:company:delete']">å é¤</el-button> |
| | | </template> |
| | |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ä¼ä¸ä¿¡æ¯è¡¨', |
| | | module: 'ç»ç»ä¿¡æ¯è¡¨', |
| | | api: '/business/company', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:member:delete', 'business:member:create,business:empower:create']"> |
| | | |
| | | |
| | | <li><el-button type="primary" |
| | | @click="$refs.OperaMemberWindow.open('æ°å»ºåå·¥', null, department, searchForm.companyType)" icon="el-icon-plus" |
| | | v-permissions="['business:member:create']">æ°å»ºåå·¥</el-button></li> |
| | |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ¯å¦å¯æè®¿"> |
| | | <!-- <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-button @click="$refs.cardOpeningRecord.open('å¼å¡è®°å½', row.id)" type="text">{{ row.memberCardCount || |
| | | '0'}}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </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 |
| | |
| | | <template slot-scope="{row}"> |
| | | <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" icon="el-icon-plus" @click="empower(row.id)" |
| | | v-permissions="['business:empower:create']">éæ°ææ</el-button>--> |
| | | <el-button type="text" :loading="heading" style="color: red" icon="el-icon-delete" |
| | | @click="updateHead(row, 0)" v-if="row.headStatus == 1" |
| | | v-permissions="['business:member:head']">åæ¶ä¸»ç®¡</el-button> |
| | |
| | | public static final String TIMEOUT_WARNING = "TIMEOUT_WARNING"; |
| | | // FTPæä»¶æå¡å¨èµæºè®¿é®å°å |
| | | |
| | | /** |
| | | * 仿¬¾å¨æç±»å 0=å
æ¯å¹³ç±³å¤©ï¼1=å
æ¯å¹³ç±³æï¼2=å
æ¯å¹³ç±³å¹´ï¼3=å
æ¯å¤©ï¼4=å
æ¯æï¼5=å
æ¯å¹´ï¼6=å
æ¯åºï¼ |
| | | * @param circleType |
| | | * @return |
| | | */ |
| | | public static String getUnitTypeByNum(Integer circleType) { |
| | | |
| | | int zlPayType = Constants.formatIntegerNum(circleType); |
| | | if(zlPayType == 1){ |
| | | return "å
/ã¡Â·æ"; |
| | | }else if(zlPayType == 2){ |
| | | return "å
/ã¡Â·å¤©"; |
| | | }else if(zlPayType == 3){ |
| | | return "å
/天"; |
| | | }else if(zlPayType == 4){ |
| | | return "å
/æ"; |
| | | }else if(zlPayType == 5){ |
| | | return "å
/å¹´"; |
| | | }else if(zlPayType == 6){ |
| | | return "å
/åº"; |
| | | } |
| | | return "å
/ã¡Â·å¤©"; |
| | | } |
| | | |
| | | /** |
| | | * 卿æ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | * @param zlPayType |
| | | * @return |
| | | */ |
| | | public static String getPayTypeByNum(Integer zlPayType) { |
| | | if(zlPayType == 1){ |
| | | return "3个æä¸ä»"; |
| | | }else if(zlPayType == 2){ |
| | | return "6个æä¸ä»"; |
| | | }else if(zlPayType == 3){ |
| | | return "1å¹´ä¸ä»"; |
| | | } |
| | | return "䏿¬¡æ§ä»æ¬¾"; |
| | | } |
| | | |
| | | public static String getRandom6Num( ) { |
| | | Random random = new Random(); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/05/04 18:18 |
| | | */ |
| | | public interface MultifileMapper extends BaseMapper<Multifile> { |
| | | public interface MultifileMapper extends MPJBaseMapper<Multifile> { |
| | | |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String fileurlFull; |
| | | |
| | | @ApiModelProperty(value = "å建人åç§°") |
| | | @TableField(exist = false) |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "å
ç½æä»¶å°å") |
| | | @TableField(exist = false) |
| | |
| | | package com.doumee.cloud.admin; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | |
| | | import com.doumee.service.business.AreasService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:areas:create") |
| | | @CloudRequiredPermission("business:areas:create") |
| | | public ApiResponse create(@RequestBody Areas areas,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | areas.setLoginUserInfo(getLoginUser(token)); |
| | | return ApiResponse.success(areasService.create(areas)); |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:areas:delete") |
| | | @CloudRequiredPermission("business:areas:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | areasService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:areas:delete") |
| | | @CloudRequiredPermission("business:areas:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:areas:update") |
| | | @CloudRequiredPermission("business:areas:update") |
| | | public ApiResponse updateById(@RequestBody Areas areas,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | areas.setLoginUserInfo(getLoginUser(token)); |
| | | areasService.updateById(areas); |
| | |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | // @RequiresPermissions("business:areas:query") |
| | | // @CloudRequiredPermission("business:areas:query") |
| | | public ApiResponse<PageData<Areas>> findPage (@RequestBody PageWrap<Areas> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(areasService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å
¨é¨æ å½¢æ¥è¯¢") |
| | | @PostMapping("/treeList") |
| | | // @RequiresPermissions("business:areas:query") |
| | | // @CloudRequiredPermission("business:areas:query") |
| | | public ApiResponse<List<Areas>> treeList (@RequestBody AreasDto pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | Areas a = new Areas(); |
| | | BeanUtils.copyProperties(pageWrap,a); |
| | |
| | | } |
| | | @ApiOperation("æ ¹æ®ç¶èç¹æ¥ä¸") |
| | | @PostMapping("/listByParentId") |
| | | // @RequiresPermissions("business:areas:query") |
| | | // @CloudRequiredPermission("business:areas:query") |
| | | public ApiResponse<List<Areas>> listByParentId (@RequestBody AreasDto pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | Areas a = new Areas(); |
| | | BeanUtils.copyProperties(pageWrap,a); |
| | |
| | | } |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:areas:exportExcel") |
| | | @CloudRequiredPermission("business:areas:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Areas> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(Areas.class).export(areasService.findPage(pageWrap).getRecords(), "çå¸åºä¿¡æ¯è¡¨", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:areas:query") |
| | | @CloudRequiredPermission("business:areas:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(areasService.findById(id)); |
| | | } |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwContract; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.service.business.YwContractService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public ApiResponse create(@RequestBody YwContract ywContract,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContract.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractService.create(ywContract)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("æ ¹æ®åæ°é¢çæè´¦åä¿¡æ¯") |
| | | @PostMapping("/getBillList") |
| | | @CloudRequiredPermission("business:ywcontract:create") |
| | | public ApiResponse< List<YwContractBill> > getBillList(@RequestBody YwContract ywContract, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContract.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractService.getBillList(ywContract)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("éç§") |
| | |
| | | return ApiResponse.success(ywContractService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å表") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:ywcontract:query") |
| | | public ApiResponse<List<YwContract>> list (@RequestBody YwContract model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractService.findList(model)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywcontract:exportExcel") |
| | |
| | | pageWrap.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractRoomService.findList(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ¥è¯¢ååæè´¦åæ¿é´ä¿¡æ¯") |
| | | @PostMapping("/getContractRoom") |
| | | @CloudRequiredPermission("business:ywcontractroom:query") |
| | | public ApiResponse<List<YwContractRoom>> getContractRoom (@RequestBody YwContractRoom pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractRoomService.getContractRoom(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywcontractroom:query") |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwProject; |
| | | import com.doumee.dao.business.model.YwRoom; |
| | | import com.doumee.dao.business.vo.ProjectDataVO; |
| | | import com.doumee.service.business.YwProjectService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | return ApiResponse.success(ywProjectService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("é¡¹ç®æ ") |
| | | @PostMapping("/tree") |
| | | @CloudRequiredPermission("business:ywproject:query") |
| | | public ApiResponse<List<ProjectDataVO>> tree (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywProjectService.projectTree()); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywproject:exportExcel") |
| | |
| | | @ApiModelProperty(value = "ç§èµæ¡æ¬¾æ¼éï¼å
ï¼", example = "1") |
| | | @ExcelColumn(name="ç§èµæ¡æ¬¾æ¼éï¼å
ï¼") |
| | | private BigDecimal zlDeposit; |
| | | @ApiModelProperty(value = "馿ç§èµæ¡æ¬¾åä»·ï¼å
ï¼", example = "1") |
| | | @ExcelColumn(name="馿ç§èµæ¡æ¬¾åä»·ï¼å
ï¼") |
| | | private BigDecimal zlFirstPrice; |
| | | @ApiModelProperty(value = "馿ç§èµæ¡æ¬¾ä»·æ ¼åä½", example = "1") |
| | | @ExcelColumn(name="馿ç§èµæ¡æ¬¾ä»·æ ¼åä½") |
| | | private Integer zlFirstCircle; |
| | | @ApiModelProperty(value = "ç©ä¸ç§èµæ¡æ¬¾åä»·ï¼å
ï¼", example = "1") |
| | | @ExcelColumn(name="ç©ä¸ç§èµæ¡æ¬¾åä»·ï¼å
ï¼") |
| | | private BigDecimal wyFirstPrice; |
| | | @ApiModelProperty(value = "ç©ä¸ç§èµæ¡æ¬¾ä»·æ ¼åä½", example = "1") |
| | | @ExcelColumn(name="ç©ä¸ç§èµæ¡æ¬¾ä»·æ ¼åä½") |
| | | private Integer wyFirstCircle; |
| | | |
| | | @ApiModelProperty(value = "ç§èµæ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä»", example = "1") |
| | | @ExcelColumn(name="ç§èµæ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä»") |
| | |
| | | @ApiModelProperty(value = "鿬¾æªç»æ¸
è´¦åæ°") |
| | | @TableField(exist = false) |
| | | private int btWaitBill; |
| | | @ApiModelProperty(value = "çæè´¦åç±»å 0ç§èµè´¦å 1ç©ä¸è´¦å") |
| | | @TableField(exist = false) |
| | | private int billType; |
| | | |
| | | @ApiModelProperty(value = "ç§èµç§èµæ¡æ¬¾ä»·æ ¼åä½ï¼æ¦å¿µåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String zlFirstCircleStr; |
| | | @ApiModelProperty(value = "ç©ä¸ç§èµæ¡æ¬¾ä»·æ ¼åä½ï¼æ¦å¿µåç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String wyFirstCircleStr; |
| | | @ApiModelProperty(value = "éç§æ¶æ°å¢çæ¶ä»æ¬¾è´¦å") |
| | | @TableField(exist = false) |
| | | private List<YwContractBill> addBillList; |
| | |
| | | |
| | | @ApiModelProperty(value = "设å¤åå·", example = "1") |
| | | @ExcelColumn(name="设å¤åå·") |
| | | private Integer modelNo; |
| | | private String modelNo; |
| | | |
| | | @ApiModelProperty(value = "æå±åç±»ç¼ç ï¼ç®¡çcategoryï¼", example = "1") |
| | | @ExcelColumn(name="æå±åç±»ç¼ç ï¼ç®¡çcategoryï¼") |
| | |
| | | |
| | | @ApiModelProperty(value = "ä¾åºå") |
| | | @ExcelColumn(name="ä¾åºå") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date company; |
| | | private String supplier; |
| | | |
| | | @ApiModelProperty(value = "è¿ç»´å
容") |
| | | @ExcelColumn(name="è¿ç»´å
容") |
| | |
| | | @TableField(exist = false) |
| | | private String realName; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯") |
| | | @ApiModelProperty(value = "å¾çå°å") |
| | | @TableField(exist = false) |
| | | private Multifile multifile; |
| | | private String fileUrl; |
| | | |
| | | @ApiModelProperty(value = "å¾çå°åå
¨è·¯å¾") |
| | | @TableField(exist = false) |
| | | private String fileFullUrl; |
| | | |
| | | |
| | | // @ApiModelProperty(value = "éä»¶ä¿¡æ¯") |
| | | // @TableField(exist = false) |
| | | // private Multifile multifile; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´",index = 5, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | |
| | | @TableField(exist = false) |
| | | private String pointName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å·¡æ£ç¹ç¼ç ") |
| | | @TableField(exist = false) |
| | | private String code; |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private String deviceName; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯") |
| | | @ApiModelProperty(value = "éä»¶å°å") |
| | | @TableField(exist = false) |
| | | private Multifile multifile; |
| | | private String fileUrl; |
| | | |
| | | @ApiModelProperty(value = "éä»¶å
¨è·¯å¾å°å") |
| | | @TableField(exist = false) |
| | | private String fileFullUrl; |
| | | |
| | | @ApiModelProperty(value = "è¿æ»¤æ°æ®") |
| | | @TableField(exist = false) |
| | |
| | | @ApiModelProperty(value = "å¯æåæ¿æºæ°") |
| | | @TableField(exist = false) |
| | | private Integer roomeRentNum; |
| | | @ApiModelProperty(value = "åå¸åç§°") |
| | | @TableField(exist = false) |
| | | private String cityName; |
| | | @ApiModelProperty(value = "åºååç§°") |
| | | @TableField(exist = false) |
| | | private String areaName; |
| | | @ApiModelProperty(value = "åå¸ç·¨ç¢¼") |
| | | @TableField(exist = false) |
| | | private Integer cityId; |
| | | @ApiModelProperty(value = "ç份åç§°") |
| | | @TableField(exist = false) |
| | | private String provinceName; |
| | | @ApiModelProperty(value = "çid") |
| | | @TableField(exist = false) |
| | | private Integer provinceId; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.doumee.dao.business.model.Approve; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/5/23 14:56 |
| | | */ |
| | | @Data |
| | | public class ProjectDataVO { |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡ä¸»é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "ä¸å¡åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç¶çº§ä¸»é®") |
| | | private Integer pId; |
| | | |
| | | @ApiModelProperty(value = "级å«") |
| | | private Integer lv; |
| | | |
| | | @ApiModelProperty(value = "åéæ°æ®") |
| | | private List<ProjectDataVO> projectDataVOList; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.doumee.config.DataSyncConfig; |
| | | import com.doumee.core.utils.Constants; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2023/7/13 10:40 |
| | | */ |
| | | public class ProjectTree { |
| | | |
| | | // ä¿ååä¸æå»ºæ å½¢çæææ°æ®ï¼éå¸¸æ°æ®åºæ¥è¯¢ç»æï¼ |
| | | public List<ProjectDataVO> nodeList = new ArrayList<>(); |
| | | |
| | | |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * @param nodeList å°æ°æ®éåèµå¼ç»nodeListï¼å³æææ°æ®ä½ä¸ºææèç¹ã |
| | | */ |
| | | public ProjectTree(List<ProjectDataVO> nodeList){ |
| | | this.nodeList = nodeList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åéæå»ºçæææ ¹èç¹ï¼é¡¶çº§èç¹ï¼ "0" |
| | | * @return æææ ¹èç¹Listéå |
| | | */ |
| | | public List<ProjectDataVO> getRootNode(){ |
| | | // ä¿åæææ ¹èç¹ï¼æææ ¹èç¹çæ°æ®ï¼ |
| | | List<ProjectDataVO> rootNodeList = new ArrayList<>(); |
| | | // treeNodeï¼æ¥è¯¢åºçæ¯ä¸æ¡æ°æ®ï¼èç¹ï¼ |
| | | for (ProjectDataVO treeNode : nodeList){ |
| | | if (Objects.isNull(treeNode.getPId()) && Constants.equalsInteger(treeNode.getLv(),Constants.ZERO)) { |
| | | // æ¯ï¼æ·»å |
| | | rootNodeList.add(treeNode); |
| | | } |
| | | } |
| | | return rootNodeList; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®æ¯ä¸ä¸ªé¡¶çº§èç¹ï¼æ ¹èç¹ï¼è¿è¡æå»ºæ å½¢ç»æ |
| | | * @return æå»ºæ´æ£µæ |
| | | */ |
| | | public List<ProjectDataVO> buildTree(){ |
| | | // treeNodesï¼ä¿åä¸ä¸ªé¡¶çº§èç¹ææå»ºåºæ¥ç宿´æ å½¢ |
| | | List<ProjectDataVO> treeNodes = new ArrayList<ProjectDataVO>(); |
| | | // getRootNode()ï¼è·åææçæ ¹èç¹ |
| | | for (ProjectDataVO treeRootNode : getRootNode()) { |
| | | // å°é¡¶çº§èç¹è¿è¡æå»ºåæ |
| | | treeRootNode = buildChildTree(treeRootNode); |
| | | // 宿ä¸ä¸ªé¡¶çº§èç¹ææå»ºçæ å½¢ï¼å¢å è¿æ¥ |
| | | treeNodes.add(treeRootNode); |
| | | } |
| | | return treeNodes; |
| | | } |
| | | |
| | | /** |
| | | * éå½-----æå»ºåæ å½¢ç»æ |
| | | * @param pNode æ ¹èç¹ï¼é¡¶çº§èç¹ï¼ |
| | | * @return æ´æ£µæ |
| | | */ |
| | | public ProjectDataVO buildChildTree(ProjectDataVO pNode){ |
| | | List<ProjectDataVO> childTree = new ArrayList<ProjectDataVO>(); |
| | | // nodeListï¼ææèç¹éåï¼æææ°æ®ï¼ |
| | | for (ProjectDataVO treeNode : nodeList) { |
| | | // 夿å½åèç¹çç¶èç¹IDæ¯å¦çäºæ ¹èç¹çIDï¼å³å½åèç¹ä¸ºå
¶ä¸çåèç¹ |
| | | if (!Objects.isNull(treeNode.getPId()) |
| | | && Constants.equalsInteger(treeNode.getPId(),pNode.getId()) |
| | | && Constants.equalsInteger((treeNode.getLv() - 1 ),pNode.getLv()) |
| | | ) { |
| | | // åéå½è¿è¡å¤æå½åèç¹çæ
åµï¼è°ç¨èªèº«æ¹æ³ |
| | | childTree.add(buildChildTree(treeNode)); |
| | | } |
| | | } |
| | | // for循ç¯ç»æï¼å³èç¹ä¸æ²¡æä»»ä½èç¹ï¼æ å½¢æå»ºç»æï¼è®¾ç½®æ ç»æ |
| | | pNode.setProjectDataVOList(childTree); |
| | | return pNode; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * @return List<YwContractRoom> |
| | | */ |
| | | List<YwContractRoom> findList(YwContractRoom ywContractRoom); |
| | | |
| | | List<YwContractRoom> getContractRoom(YwContractRoom ywContractRoom); |
| | | |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwContract; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwContract ywContract); |
| | | |
| | | List<YwContractBill> getBillList(YwContract ywContract); |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | |
| | | long count(YwContract ywContract); |
| | | |
| | | Integer backRent(YwContract ywContract); |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwProject; |
| | | import com.doumee.dao.business.vo.ProjectDataVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @return long |
| | | */ |
| | | long count(YwProject ywProject); |
| | | |
| | | |
| | | List<ProjectDataVO> projectTree(); |
| | | } |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | return result; |
| | | } |
| | | @Override |
| | | @PostConstruct |
| | | public void cacheData() { |
| | | Areas a = new Areas(); |
| | | a.setIsdeleted(Constants.ZERO); |
| | |
| | | .setSql("hk_company_path=REPLACE(hk_company_path,'"+ model.getCompanyNamePath()+"','"+newName+"')") |
| | | .likeRight(Company::getCompanyPath,model.getCompanyPath())); |
| | | //ä¸å海康å®é²å¹³å° |
| | | if(StringUtils.isNotBlank(model.getHkId())){ |
| | | /* if(StringUtils.isNotBlank(model.getHkId())){ |
| | | if(!editHkOrg(company)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼ç»ç»åæ¥ä¸å失败ï¼è¯·ç¨åéè¯"); |
| | | } |
| | |
| | | if(!addHkOrg(company)){ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼ç»ç»åæ¥ä¸å失败ï¼è¯·ç¨åéè¯"); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private InterfaceLogService interfaceLogService; |
| | | |
| | | @PostConstruct |
| | | // @PostConstruct |
| | | public int initHkConfig(){ |
| | | ArtemisConfig.host = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_HOST).getCode(); |
| | | ArtemisConfig.appKey = systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_APPKEY).getCode(); |
| | |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwContractBillService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | )); |
| | | |
| | | //éä»¶æ°æ® |
| | | List<Multifile> multifileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | List<Multifile> multifileList = multifileMapper.selectJoinList(Multifile.class,new MPJLambdaWrapper<Multifile>() |
| | | .selectAll(Multifile.class) |
| | | .selectAs(SystemUser::getRealname,Multifile::getUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,Multifile::getCreator) |
| | | .eq(Multifile::getObjId,id) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.FN_CONTRACT_BILL_FILE.getKey())); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(multifileList)){ |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwContractRoomMapper; |
| | | import com.doumee.dao.business.model.YwContractRoom; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.YwContractRoomService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * è¿ç»´ååæ¿æºå
³èä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | QueryWrapper<YwContractRoom> wrapper = new QueryWrapper<>(ywContractRoom); |
| | | return ywContractRoomMapper.selectList(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<YwContractRoom> getContractRoom(YwContractRoom ywContractRoom){ |
| | | List<YwContractRoom> ywContractRoomList = ywContractRoomMapper.selectJoinList(YwContractRoom.class,new MPJLambdaWrapper<YwContractRoom>() |
| | | .selectAll(YwContractRoom.class) |
| | | .selectAs(YwProject::getName, YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .selectAs(YwRoom::getName,YwContractRoom::getRoomName) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwContractRoom::getRoomId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) |
| | | .eq(Objects.nonNull(ywContractRoom.getType()),YwContractRoom::getType,ywContractRoom.getType()) |
| | | .eq(Objects.nonNull(ywContractRoom.getContractId()),YwContractRoom::getContractId,ywContractRoom.getContractId())) |
| | | ; |
| | | return ywContractRoomList; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public PageData<YwContractRoom> findPage(PageWrap<YwContractRoom> pageWrap) { |
| | | IPage<YwContractRoom> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | |
| | | dealLogBiz(model,Constants.YwLogType.CONTRACT_CREATE,null,null);//è®°å½æ°å»ºæ¥å¿ |
| | | return model.getId(); |
| | | } |
| | | @Override |
| | | public List<YwContractBill> getBillList(YwContract model){ |
| | | isParamValidForBill(model); |
| | | model.setCreateDate(new Date()); |
| | | model.setEditDate(model.getCreateDate()); |
| | | dealDetailListBiz(model);//å¤çæ¡æ¬¾ä¿¡æ¯ |
| | | return model.getBillList(); |
| | | } |
| | | |
| | | private void isParamValidForBill(YwContract model) { |
| | | if(model.getStartDate() == null |
| | | ||model.getEndDate() == null |
| | | ||model.getProjectId() == null |
| | | ||model.getCompanyId() == null |
| | | ||model.getRoundedUp() == null |
| | | ||model.getRoomIds() == null |
| | | ||model.getRoomIds().size() == 0 |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·æé¡µé¢è¦æ±å¡«åååä¿¡æ¯"); |
| | | } |
| | | if(model.getEndDate().getTime()<= model.getStartDate().getTime()){ |
| | | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ååæææç»ææ¶é´ä¸å¾æ©äºå¼å§æ¶é´ï¼"); |
| | | } |
| | | |
| | | if(model.getBillType() ==0 ){ |
| | | //妿çæç§èµæ¡æ¬¾ |
| | | if( model.getZlDeposit() == null |
| | | ||model.getZlPayType() == null |
| | | || model.getZlPayType()>3 |
| | | || model.getZlPayType()<0 |
| | | ||model.getZlDetailList()==null |
| | | ||model.getZlDetailList().size() ==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·æé¡µé¢è¦æ±å¡«åç§èµæ¡æ¬¾ä¿¡æ¯"); |
| | | } |
| | | if(!(model.getZlFreeEndDate()==null && model.getZlFreeStartDate()==null) && ( |
| | | (model.getZlFreeEndDate()!=null && model.getZlFreeStartDate()==null) |
| | | ||(model.getZlFreeEndDate()==null && model.getZlFreeStartDate()!=null) |
| | | ||model.getZlFreeEndDate().getTime()<= model.getZlFreeStartDate().getTime()) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·éæ©æ£ç¡®çç§èµæ¡æ¬¾å
ç§æä¿¡æ¯ï¼"); |
| | | } |
| | | for(YwContractDetail d :model.getZlDetailList()){ |
| | | if( d.getStartDate() == null |
| | | ||d.getEndDate() == null |
| | | ||d.getPrice() == null |
| | | ||d.getCircleType() == null |
| | | || d.getCircleType()>6 |
| | | || d.getCircleType()<0 |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·æé¡µé¢è¦æ±å¡«åç§èµæ¡æ¬¾ä¿¡æ¯!"); |
| | | } |
| | | if(d.getEndDate().getTime()<= d.getStartDate().getTime()){ |
| | | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç§èµæ¡æ¬¾æææç»ææ¶é´ä¸å¾æ©äºå¼å§æ¶é´ï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(model.getWyPayType(),Constants.ZERO) && |
| | | Constants.equalsInteger(d.getCircleType(),Constants.SIX)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç§èµæ¡æ¬¾åªæéæ©ä¸æ¬¡æ§ä»æ¬¾æ¶ï¼æè½éæ©è¯¥ææ¯åºæ¶è´¹ï¼"); |
| | | } |
| | | } |
| | | } |
| | | if(model.getBillType() == 1 ){ |
| | | //妿çæç©ä¸æ¡æ¬¾ |
| | | if( model.getWyDeposit() == null |
| | | ||model.getWyPayType() == null |
| | | || model.getWyPayType()>3 |
| | | || model.getWyPayType()<0 |
| | | ||model.getWyDetailList()==null |
| | | ||model.getWyDetailList().size() ==0 |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·æé¡µé¢è¦æ±å¡«åç©ä¸æ¡æ¬¾ä¿¡æ¯"); |
| | | } |
| | | if(!(model.getWyFreeEndDate()==null && model.getWyFreeStartDate()==null) && ( |
| | | (model.getWyFreeEndDate()!=null && model.getWyFreeStartDate()==null) |
| | | ||(model.getWyFreeEndDate()==null && model.getWyFreeStartDate()!=null) |
| | | ||model.getWyFreeEndDate().getTime()<= model.getWyFreeStartDate().getTime())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·éæ©æ£ç¡®çç©ä¸æ¡æ¬¾å
ç§æä¿¡æ¯ï¼"); |
| | | } |
| | | for(YwContractDetail d :model.getWyDetailList()){ |
| | | if( d.getStartDate() == null |
| | | ||d.getEditDate() == null |
| | | ||d.getPrice() == null |
| | | ||d.getCircleType() == null |
| | | || d.getCircleType()>6 |
| | | || d.getCircleType()<0 |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·æé¡µé¢è¦æ±å¡«åç©ä¸æ¡æ¬¾ä¿¡æ¯!"); |
| | | } |
| | | if(d.getEndDate().getTime()<= d.getStartDate().getTime()){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç©ä¸æ¡æ¬¾æææç»ææ¶é´ä¸å¾æ©äºå¼å§æ¶é´ï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(model.getWyPayType(),Constants.ZERO) && |
| | | Constants.equalsInteger(d.getCircleType(),Constants.SIX)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç©ä¸æ¡æ¬¾åªæéæ©ä¸æ¬¡æ§ä»æ¬¾æ¶ï¼æè½éæ©è¯¥ææ¯åºæ¶è´¹ï¼"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | YwProject project = projectMapper.selectById(model.getCompanyId()); |
| | | if(project ==null || Constants.equalsInteger(project.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯·éæ©æ£ç¡®ç项ç®ä¿¡æ¯ï¼"); |
| | | } |
| | | List<YwRoom> rooms = roomMapper.selectList(new QueryWrapper<YwRoom>().lambda() |
| | | .eq(YwRoom::getIsdeleted,Constants.ZERO) |
| | | .in(YwRoom::getId,model.getRoomIds()) |
| | | .eq(YwRoom::getProjectId,model.getProjectId()) ); |
| | | if(rooms ==null || rooms.size()==0){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·éæ©å¯¹åºé¡¹ç®ä¸æ£ç¡®çæ¿æºä¿¡æ¯"); |
| | | } |
| | | if(rooms.size() != rooms.size()){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼å卿 æçæ¿æºä¿¡æ¯ï¼"); |
| | | } |
| | | model.setTotalArea(new BigDecimal(0)); |
| | | for(YwRoom r : rooms){ |
| | | model.setTotalArea(model.getTotalArea().add(Constants.formatBigdecimal(r.getArea()))); |
| | | } |
| | | } |
| | | |
| | | private String getRemarlByParam(YwContract model) { |
| | | |
| | |
| | | } |
| | | str = str.replace("{param1}",DateUtil.getDateLongSlash(model.getStartDate())) |
| | | .replace("{param2}",model.getTotalArea().intValue()+"") |
| | | .replace("{param3}",getPayTypeByNum(model.getZlPayType())) |
| | | .replace("{param3}",Constants.getPayTypeByNum(model.getZlPayType())) |
| | | .replace("{param4}",zl!=null&&zl.getPrice()!=null?(zl.getPrice().intValue()+""):"0") |
| | | .replace("{param5}",getPayTypeByNum(model.getWyPayType())) |
| | | .replace("{param6}",getUnitTypeByNum(zl)) |
| | | .replace("{param5}",Constants.getPayTypeByNum(model.getWyPayType())) |
| | | .replace("{param6}",Constants.getUnitTypeByNum(zl!=null?zl.getCircleType():null)) |
| | | .replace("{param7}",zl!=null&&yw.getPrice()!=null?(zl.getPrice().intValue()+""):"0") |
| | | .replace("{param8}",getUnitTypeByNum(yw)); |
| | | .replace("{param8}",Constants.getUnitTypeByNum(yw!=null?yw.getCircleType():null)); |
| | | return str; |
| | | } |
| | | private String getbackRentRemarkByParam(YwContract model) { |
| | |
| | | return str; |
| | | } |
| | | |
| | | private CharSequence getUnitTypeByNum(YwContractDetail zl) { |
| | | if(zl==null){ |
| | | return ""; |
| | | } |
| | | // 仿¬¾å¨æç±»å 0=å
æ¯å¹³ç±³å¤©ï¼1=å
æ¯å¹³ç±³æï¼2=å
æ¯å¹³ç±³å¹´ï¼3=å
æ¯å¤©ï¼4=å
æ¯æï¼5=å
æ¯å¹´ï¼6=å
æ¯åºï¼ |
| | | int zlPayType = Constants.formatIntegerNum(zl.getCircleType()); |
| | | if(zlPayType == 1){ |
| | | return "å
/ã¡Â·æ"; |
| | | }else if(zlPayType == 2){ |
| | | return "å
/ã¡Â·å¤©"; |
| | | }else if(zlPayType == 3){ |
| | | return "å
/天"; |
| | | }else if(zlPayType == 4){ |
| | | return "å
/æ"; |
| | | }else if(zlPayType == 5){ |
| | | return "å
/å¹´"; |
| | | }else if(zlPayType == 6){ |
| | | return "å
/åº"; |
| | | } |
| | | return "å
/ã¡Â·å¤©"; |
| | | } |
| | | |
| | | private CharSequence getPayTypeByNum(Integer zlPayType) { |
| | | //ç§èµæ¯ä»æ¹å¼ 0=䏿¬¡æ§ä»æ¬¾ï¼1=æ¯ä¸ä¸ªæä¸ä»ï¼2=å
个æä¸ä»ï¼3=ä¸å¹´ä¸ä» |
| | | if(zlPayType == 1){ |
| | | return "3个æä¸ä»"; |
| | | }else if(zlPayType == 2){ |
| | | return "6个æä¸ä»"; |
| | | }else if(zlPayType == 3){ |
| | | return "1å¹´ä¸ä»"; |
| | | } |
| | | return "䏿¬¡æ§ä»æ¬¾"; |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | details.add(d); |
| | | } |
| | | } |
| | | ywContractDetailMapper.insert(details);//æ¹éæå
¥æ¡æ¬¾ä¿¡æ¯ä¿¡æ¯ |
| | | if(model.getId()!=null){ |
| | | ywContractDetailMapper.insert(details);//æ¹éæå
¥æ¡æ¬¾ä¿¡æ¯ä¿¡æ¯ |
| | | } |
| | | //å¤çè´¦åä¿¡æ¯ |
| | | dealBillListBiz(model,details); |
| | | } |
| | |
| | | * @param details |
| | | */ |
| | | private void dealBillListBiz(YwContract model, List<YwContractDetail> details) { |
| | | List<YwContractBill> billList = new ArrayList<>(); |
| | | List<YwContractBill> billList1 = new ArrayList<>(); |
| | | List<YwContractBill> billList2 = new ArrayList<>(); |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO ) |
| | | || Constants.equalsInteger(model.getType(),Constants.ONE)){ |
| | | //妿æç§èµæ¡æ¬¾ |
| | | if(Constants.formatBigdecimal(model.getZlDeposit()).compareTo(new BigDecimal(0))>0){ |
| | | //妿æç§èµæ¼é |
| | | billList.add(initDepoistBill(Constants.THREE,model)); |
| | | billList1.add(initDepoistBill(Constants.THREE,model)); |
| | | } |
| | | if(Constants.equalsInteger(model.getZlPayType(), Constants.ZERO)){ |
| | | //妿æ¯ä¸æ¬¡æ§ä»æ¸
|
| | | billList.addAll(getBillsByParamOnce(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | billList1.addAll(getBillsByParamOnce(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | }else if(Constants.equalsInteger(model.getZlPayType(), Constants.ONE)){ |
| | | //妿æ¯ä¸ä¸ªæä¸ä» |
| | | billList.addAll(getBillsByParam3Months(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | billList1.addAll(getBillsByParam3Months(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | }else if(Constants.equalsInteger(model.getZlPayType(), Constants.TWO)){ |
| | | //妿å
个æä¸ä» |
| | | billList.addAll(getBillsByParam6Months(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | billList1.addAll(getBillsByParam6Months(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | }else if(Constants.equalsInteger(model.getZlPayType(), Constants.THREE)){ |
| | | //妿ä¸å¹´ä¸ä» |
| | | billList.addAll(getBillsByParam1Year(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | billList1.addAll(getBillsByParam1Year(model,details,model.getZlFreeStartDate(),model.getZlFreeEndDate())); |
| | | } |
| | | } |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO ) |
| | |
| | | //妿ç©ä¸æ¡æ¬¾ |
| | | if(Constants.formatBigdecimal(model.getWyDeposit()).compareTo(new BigDecimal(0))>0){ |
| | | //妿æç§èµæ¼é |
| | | billList.add(initDepoistBill(Constants.FOUR,model)); |
| | | billList2.add(initDepoistBill(Constants.FOUR,model)); |
| | | } |
| | | if(Constants.equalsInteger(model.getWyPayType(), Constants.ZERO)){ |
| | | //妿æ¯ä¸æ¬¡æ§ä»æ¸
|
| | | billList.addAll(getBillsByParamOnce(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | billList2.addAll(getBillsByParamOnce(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | }else if(Constants.equalsInteger(model.getWyPayType(), Constants.ONE)){ |
| | | //妿æ¯ä¸ä¸ªæä¸ä» |
| | | billList.addAll(getBillsByParam3Months(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | billList2.addAll(getBillsByParam3Months(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | }else if(Constants.equalsInteger(model.getWyPayType(), Constants.TWO)){ |
| | | //妿å
个æä¸ä» |
| | | billList.addAll(getBillsByParam6Months(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | billList2.addAll(getBillsByParam6Months(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | }else if(Constants.equalsInteger(model.getWyPayType(), Constants.THREE)){ |
| | | //妿ä¸å¹´ä¸ä» |
| | | billList.addAll(getBillsByParam1Year(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | billList2.addAll(getBillsByParam1Year(model,details,model.getWyFreeStartDate(),model.getWyFreeEndDate())); |
| | | } |
| | | } |
| | | for(int i=0;i<billList.size();i++){ |
| | | billList.get(i).setSortnum(i+1); |
| | | } |
| | | ywContractBillMapper.insert(billList); |
| | | |
| | | if(model.getBillType() == 0){ |
| | | model.setBillList(billList1); |
| | | }else if(model.getBillType() == 0){ |
| | | model.setBillList(billList2); |
| | | } |
| | | if(model.getId()!=null){ |
| | | for(int i=0;i<billList1.size();i++){ |
| | | billList1.get(i).setSortnum(i+1); |
| | | } |
| | | for(int i=0;i<billList2.size();i++){ |
| | | billList2.get(i).setSortnum(i+1); |
| | | } |
| | | ywContractBillMapper.insert(billList1); |
| | | ywContractBillMapper.insert(billList2); |
| | | } |
| | | } |
| | | |
| | | private YwContractBill initDepoistBill(int type, YwContract model) { |
| | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·æé¡µé¢è¦æ±å¡«åç§èµæ¡æ¬¾ä¿¡æ¯!"); |
| | | } |
| | | if(d.getEndDate().getTime()<= d.getStartDate().getTime()){ |
| | | |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç§èµæ¡æ¬¾æææç»ææ¶é´ä¸å¾æ©äºå¼å§æ¶é´ï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(model.getWyPayType(),Constants.ZERO) && |
| | | Constants.equalsInteger(d.getCircleType(),Constants.SIX)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç§èµæ¡æ¬¾åªæéæ©ä¸æ¬¡æ§ä»æ¬¾æ¶ï¼æè½éæ©è¯¥ææ¯åºæ¶è´¹ï¼"); |
| | | } |
| | | if(model.getZlFirstCircle() == null){//é¦æä¿¡æ¯ |
| | | model.setZlFirstPrice(d.getPrice()); |
| | | model.setZlFirstCircle(d.getCircleType()); |
| | | } |
| | | } |
| | | } |
| | |
| | | if(!Constants.equalsInteger(model.getWyPayType(),Constants.ZERO) && |
| | | Constants.equalsInteger(d.getCircleType(),Constants.SIX)){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼ç©ä¸æ¡æ¬¾åªæéæ©ä¸æ¬¡æ§ä»æ¬¾æ¶ï¼æè½éæ©è¯¥ææ¯åºæ¶è´¹ï¼"); |
| | | } |
| | | if(model.getWyFirstCircle() == null){ |
| | | //é¦æä¿¡æ¯ |
| | | model.setWyFirstPrice(d.getPrice()); |
| | | model.setWyFirstCircle(d.getCircleType()); |
| | | } |
| | | } |
| | | } |
| | |
| | | .eq(YwRoom::getIsdeleted,Constants.ZERO) |
| | | .exists("(select a.id from yw_contract_room a where a.isdeleted=1 and a.room_id=t.id and a.contract_id="+model.getId()+")"); |
| | | model.setRoomList(roomMapper.selectJoinList(YwRoom.class,rw)); |
| | | |
| | | model.setWyFirstCircleStr(Constants.getUnitTypeByNum(model.getWyFirstCircle())); |
| | | model.setZlFirstCircleStr(Constants.getUnitTypeByNum(model.getZlFirstCircle())); |
| | | //æ¥è¯¢ç§è³æ¡æ¬¾ä¿¡æ¯ |
| | | MPJLambdaWrapper<YwContractDetail> dw = new MPJLambdaWrapper<>(); |
| | | dw.selectAll(YwContractDetail.class ) |
| | |
| | | |
| | | @Override |
| | | public List<YwContract> findList(YwContract ywContract) { |
| | | QueryWrapper<YwContract> wrapper = new QueryWrapper<>(ywContract); |
| | | QueryWrapper<YwContract> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda().eq(YwContract::getIsdeleted,Constants.ZERO); |
| | | wrapper.lambda().in(YwContract::getStatus,Constants.ZERO,Constants.ONE,Constants.TWO); |
| | | return ywContractMapper.selectList(wrapper); |
| | | } |
| | | |
| | |
| | | queryWrapper.ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), YwContract::getStartDate, pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()), YwContract::getEndDate, pageWrap.getModel().getQueryEndTime()); |
| | | queryWrapper.orderByDesc(YwContract::getCreateDate ); |
| | | return PageData.from(ywContractMapper.selectJoinPage(page, YwContract.class,queryWrapper)); |
| | | PageData<YwContract> data = PageData.from(ywContractMapper.selectJoinPage(page, YwContract.class,queryWrapper)); |
| | | if(data!=null && data.getRecords()!=null){ |
| | | for(YwContract model : data.getRecords()){ |
| | | model.setWyFirstCircleStr(Constants.getUnitTypeByNum(model.getWyFirstCircle())); |
| | | model.setZlFirstCircleStr(Constants.getUnitTypeByNum(model.getZlFirstCircle())); |
| | | } |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | @Override |
| | |
| | | if(ywDeviceMapper.selectCount(new QueryWrapper<YwDevice>().lambda().eq(YwDevice::getIsdeleted,Constants.ZERO).eq(YwDevice::getCode,ywDevice.getCode()))>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"设å¤ç¼å·éå¤!"); |
| | | } |
| | | // if(StringUtils.isBlank(ywDevice.getCode())){ |
| | | // String code = this.getMaxAutoMaticDeviceCode(); |
| | | // while (ywDeviceMapper.selectCount(new QueryWrapper<YwDevice>().lambda().eq(YwDevice::getIsdeleted,Constants.ZERO).eq(YwDevice::getCode,code))>Constants.ZERO){ |
| | | // code = this.getMaxAutoMaticDeviceCode(); |
| | | // } |
| | | // ywDevice.setCode(code); |
| | | // }else{ |
| | | // |
| | | // } |
| | | ywDevice.setCreateDate(new Date()); |
| | | ywDevice.setCreator(loginUserInfo.getId()); |
| | | ywDevice.setIsdeleted(Constants.ZERO); |
| | | ywDeviceMapper.insert(ywDevice); |
| | | |
| | | if(Objects.nonNull(ywDevice.getMultifile())){ |
| | | ywDevice.getMultifile().setCreator(loginUserInfo.getId()); |
| | | ywDevice.getMultifile().setCreateDate(new Date()); |
| | | ywDevice.getMultifile().setIsdeleted(Constants.ZERO); |
| | | ywDevice.getMultifile().setObjType(Constants.MultiFile.FN_DEVICE_FILE.getKey()); |
| | | ywDevice.getMultifile().setObjId(ywDevice.getId()); |
| | | multifileMapper.insert(ywDevice.getMultifile()); |
| | | if(Objects.nonNull(ywDevice.getFileUrl())){ |
| | | Multifile multifile = new Multifile(); |
| | | multifile.setCreator(loginUserInfo.getId()); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjType(Constants.MultiFile.FN_DEVICE_FILE.getKey()); |
| | | multifile.setObjId(ywDevice.getId()); |
| | | multifile.setFileurl(ywDevice.getFileUrl()); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | |
| | | return ywDevice.getId(); |
| | |
| | | .eq(Multifile::getObjId,ywDevice.getId()) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.FN_DEVICE_FILE.getKey()) |
| | | ); |
| | | if(Objects.nonNull(ywDevice.getMultifile())){ |
| | | ywDevice.getMultifile().setCreator(loginUserInfo.getId()); |
| | | ywDevice.getMultifile().setCreateDate(new Date()); |
| | | ywDevice.getMultifile().setIsdeleted(Constants.ZERO); |
| | | ywDevice.getMultifile().setObjType(Constants.MultiFile.FN_DEVICE_FILE.getKey()); |
| | | ywDevice.getMultifile().setObjId(ywDevice.getId()); |
| | | multifileMapper.insert(ywDevice.getMultifile()); |
| | | if(Objects.nonNull(ywDevice.getFileUrl())){ |
| | | Multifile multifile = new Multifile(); |
| | | multifile.setCreator(loginUserInfo.getId()); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjType(Constants.MultiFile.FN_DEVICE_FILE.getKey()); |
| | | multifile.setObjId(ywDevice.getId()); |
| | | multifile.setFileurl(ywDevice.getFileUrl()); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | |
| | | |
| | |
| | | if(Objects.nonNull(multifile)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_DEVICE).getCode(); |
| | | multifile.setFileurlFull(path + multifile.getFileurl()); |
| | | ywDevice.setMultifile(multifile); |
| | | ywDevice.setFileFullUrl(path + multifile.getFileurl()); |
| | | } |
| | | return ywDevice; |
| | | } |
| | |
| | | ywLinePoint.setCreateDate(new Date()); |
| | | ywLinePoint.setCreator(loginUserInfo.getId()); |
| | | ywLinePoint.setIsdeleted(Constants.ZERO); |
| | | ywLinePoint.setLineId(ywLinePoint.getId()); |
| | | ywLinePoint.setLineId(ywPatrolLine.getId()); |
| | | } |
| | | ywLinePointMapper.insert(ywLinePointList); |
| | | return ywPatrolLine.getId(); |
| | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"å·¡æ£ç¹é
ç½®é误"); |
| | | } |
| | | ywLinePoint.setLineId(ywLinePoint.getId()); |
| | | ywLinePoint.setLineId(ywPatrolLine.getId()); |
| | | ywLinePoint.setCreateDate(new Date()); |
| | | ywLinePoint.setCreator(loginUserInfo.getId()); |
| | | ywLinePoint.setIsdeleted(Constants.ZERO); |
| | |
| | | List<YwLinePoint> ywLinePointList = ywLinePointMapper.selectJoinList(YwLinePoint.class,new MPJLambdaWrapper<YwLinePoint>() |
| | | .selectAll(YwLinePoint.class) |
| | | .selectAs(YwPatrolPoint::getName,YwLinePoint::getPointName) |
| | | .leftJoin(YwPatrolLine.class,YwPatrolLine::getId,YwLinePoint::getPointId) |
| | | .selectAs(YwPatrolPoint::getCode,YwLinePoint::getCode) |
| | | .leftJoin(YwPatrolPoint.class,YwPatrolPoint::getId,YwLinePoint::getPointId) |
| | | .eq(YwLinePoint::getLineId,id) |
| | | .orderByAsc(YwLinePoint::getSortnum) |
| | | ); |
| | |
| | | ywPatrolPointMapper.insert(ywPatrolPoint); |
| | | |
| | | |
| | | if(Objects.nonNull(ywPatrolPoint.getMultifile())){ |
| | | ywPatrolPoint.getMultifile().setCreator(loginUserInfo.getId()); |
| | | ywPatrolPoint.getMultifile().setCreateDate(new Date()); |
| | | ywPatrolPoint.getMultifile().setIsdeleted(Constants.ZERO); |
| | | ywPatrolPoint.getMultifile().setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); |
| | | ywPatrolPoint.getMultifile().setObjId(ywPatrolPoint.getId()); |
| | | multifileMapper.insert(ywPatrolPoint.getMultifile()); |
| | | if(Objects.nonNull(ywPatrolPoint.getFileUrl())){ |
| | | Multifile multifile = new Multifile(); |
| | | multifile.setCreator(loginUserInfo.getId()); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); |
| | | multifile.setObjId(ywPatrolPoint.getId()); |
| | | multifile.setFileurl(ywPatrolPoint.getFileUrl()); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | |
| | | return ywPatrolPoint.getId(); |
| | |
| | | .eq(Multifile::getObjType,Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()) |
| | | ); |
| | | |
| | | if(Objects.nonNull(ywPatrolPoint.getMultifile())){ |
| | | ywPatrolPoint.getMultifile().setCreator(loginUserInfo.getId()); |
| | | ywPatrolPoint.getMultifile().setCreateDate(new Date()); |
| | | ywPatrolPoint.getMultifile().setIsdeleted(Constants.ZERO); |
| | | ywPatrolPoint.getMultifile().setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); |
| | | ywPatrolPoint.getMultifile().setObjId(ywPatrolPoint.getId()); |
| | | multifileMapper.insert(ywPatrolPoint.getMultifile()); |
| | | if(Objects.nonNull(ywPatrolPoint.getFileUrl())){ |
| | | Multifile multifile = new Multifile(); |
| | | multifile.setCreator(loginUserInfo.getId()); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); |
| | | multifile.setObjId(ywPatrolPoint.getId()); |
| | | multifile.setFileurl(ywPatrolPoint.getFileUrl()); |
| | | multifileMapper.insert(multifile); |
| | | } |
| | | |
| | | } |
| | |
| | | if(Objects.nonNull(multifile)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_PATROL).getCode(); |
| | | multifile.setFileurlFull(path + multifile.getFileurl()); |
| | | ywPatrolPoint.setMultifile(multifile); |
| | | ywPatrolPoint.setFileFullUrl(path + multifile.getFileurl()); |
| | | } |
| | | return ywPatrolPoint; |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.*; |
| | |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(YwPatrolScheme ywPatrolScheme) { |
| | | if(Objects.isNull(ywPatrolScheme) |
| | | || StringUtils.isBlank(ywPatrolScheme.getTitle()) |
| | |
| | | //æ¯ææ ¹æ®æ¥æçæ æ ¹æ®æ¥æè·åæ¯åªå¤© |
| | | List<String> days = Arrays.asList(ywPatrolScheme.getCircleDays().split(",")); |
| | | String dayStr = DateUtil.getFomartDate(schemeDate,"dd"); |
| | | if(Objects.isNull(days.stream().filter(i->StringUtils.equals(i,dayStr)).findFirst().get())){ |
| | | Optional<String> optional = days.stream().filter(i->StringUtils.equals(i,dayStr)).findAny(); |
| | | if(Objects.isNull(optional)){ |
| | | return; |
| | | }; |
| | | } |
| | | } |
| | | String schemeDateStr = DateUtil.getDate(schemeDate,"yyyy-MM-dd"); |
| | | //æ¥è¯¢å½å¤©æ¯å¦çæè¿æ°æ® |
| | |
| | | YwPatrolTask model = pageWrap.getModel(); |
| | | queryWrapper.selectAll(YwPatrolTask.class) |
| | | .selectAs(YwPatrolScheme::getCode,YwPatrolTask::getPlanCode) |
| | | .selectAs(YwPatrolScheme::getTitle,YwPatrolTask::getPlanTitle) |
| | | .selectAs(SystemUser::getRealname,YwPatrolTask::getUserName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwPatrolTask::getDealUserId) |
| | | .leftJoin(YwPatrolScheme.class,YwPatrolScheme::getId,YwPatrolTask::getSchemeId) |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwBuildingMapper; |
| | | import com.doumee.dao.business.YwFloorMapper; |
| | | import com.doumee.dao.business.YwProjectMapper; |
| | | import com.doumee.dao.business.model.Company; |
| | | import com.doumee.dao.business.model.YwProject; |
| | | import com.doumee.dao.business.YwRoomMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.CompanyTree; |
| | | import com.doumee.dao.business.vo.ProjectDataVO; |
| | | import com.doumee.dao.business.vo.ProjectTree; |
| | | import com.doumee.service.business.AreasService; |
| | | import com.doumee.service.business.YwProjectService; |
| | | 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.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private YwProjectMapper ywProjectMapper; |
| | | @Autowired |
| | | private AreasService areasService; |
| | | |
| | | @Autowired |
| | | private YwFloorMapper ywFloorMapper; |
| | | |
| | | @Autowired |
| | | private YwRoomMapper ywRoomMapper; |
| | | |
| | | @Autowired |
| | | private YwBuildingMapper ywBuildingMapper; |
| | | |
| | | @Override |
| | | public Integer create(YwProject model) { |
| | |
| | | queryWrapper.lambda().eq(YwProject::getAddr, pageWrap.getModel().getAddr()); |
| | | } |
| | | queryWrapper.lambda().orderByDesc(YwProject::getCreateDate); |
| | | return PageData.from(ywProjectMapper.selectPage(page, queryWrapper)); |
| | | PageData<YwProject> data = PageData.from(ywProjectMapper.selectPage(page, queryWrapper)); |
| | | if(data!=null && data.getRecords()!=null){ |
| | | for(YwProject model :data.getRecords()){ |
| | | if(model.getAreaId()!=null){ |
| | | Areas a = areasService.findById(model.getAreaId(),Constants.TWO); |
| | | if(a != null){ |
| | | model.setAreaName(a.getName()); |
| | | model.setCityId(a.getCityId()); |
| | | model.setCityName(a.getCityName()); |
| | | model.setProvinceId(a.getProvinceId()); |
| | | model.setProvinceName(a.getProvinceName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | @Override |
| | |
| | | QueryWrapper<YwProject> wrapper = new QueryWrapper<>(ywProject); |
| | | return ywProjectMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<ProjectDataVO> projectTree(){ |
| | | List<ProjectDataVO> projectDataVOList = new ArrayList<>(); |
| | | List<YwProject> ywProjectList = ywProjectMapper.selectList(new QueryWrapper<YwProject>().lambda() |
| | | .eq(YwProject::getIsdeleted,Constants.ZERO) |
| | | .eq(YwProject::getStatus,Constants.ZERO) |
| | | .orderByAsc(YwProject::getSortnum) |
| | | ); |
| | | for (YwProject ywProject:ywProjectList) { |
| | | ProjectDataVO projectDataVO = new ProjectDataVO(); |
| | | BeanUtils.copyProperties(ywProject,projectDataVO); |
| | | projectDataVO.setLv(Constants.ZERO); |
| | | projectDataVOList.add(projectDataVO); |
| | | } |
| | | |
| | | List<YwBuilding> ywBuildingList = ywBuildingMapper.selectList(new QueryWrapper<YwBuilding>().lambda() |
| | | .eq(YwBuilding::getIsdeleted,Constants.ZERO) |
| | | .eq(YwBuilding::getStatus,Constants.ZERO) |
| | | .orderByAsc(YwBuilding::getSortnum) |
| | | ); |
| | | |
| | | for (YwBuilding data:ywBuildingList) { |
| | | ProjectDataVO projectDataVO = new ProjectDataVO(); |
| | | BeanUtils.copyProperties(data,projectDataVO); |
| | | projectDataVO.setPId(data.getProjectId()); |
| | | projectDataVO.setLv(Constants.ONE); |
| | | projectDataVOList.add(projectDataVO); |
| | | } |
| | | |
| | | |
| | | List<YwFloor> ywFloorList = ywFloorMapper.selectList(new QueryWrapper<YwFloor>().lambda() |
| | | .eq(YwFloor::getIsdeleted,Constants.ZERO) |
| | | .eq(YwFloor::getStatus,Constants.ZERO) |
| | | .orderByAsc(YwFloor::getSortnum) |
| | | ); |
| | | |
| | | for (YwFloor data:ywFloorList) { |
| | | ProjectDataVO projectDataVO = new ProjectDataVO(); |
| | | BeanUtils.copyProperties(data,projectDataVO); |
| | | projectDataVO.setPId(data.getBuildingId()); |
| | | projectDataVO.setLv(Constants.TWO); |
| | | projectDataVOList.add(projectDataVO); |
| | | } |
| | | |
| | | |
| | | |
| | | List<YwRoom> ywRoomList = ywRoomMapper.selectList(new QueryWrapper<YwRoom>().lambda() |
| | | .eq(YwRoom::getIsdeleted,Constants.ZERO) |
| | | .eq(YwRoom::getStatus,Constants.ZERO) |
| | | .orderByAsc(YwRoom::getSortnum) |
| | | ); |
| | | |
| | | |
| | | for (YwRoom data:ywRoomList) { |
| | | ProjectDataVO projectDataVO = new ProjectDataVO(); |
| | | BeanUtils.copyProperties(data,projectDataVO); |
| | | projectDataVO.setName(data.getCode()); |
| | | projectDataVO.setPId(data.getFloor()); |
| | | projectDataVO.setLv(Constants.THREE); |
| | | projectDataVOList.add(projectDataVO); |
| | | } |
| | | |
| | | ProjectTree treeBuild = new ProjectTree(projectDataVOList); |
| | | projectDataVOList = treeBuild.buildTree(); |
| | | return projectDataVOList; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |