已添加10个文件
已修改35个文件
已重命名14个文件
| | |
| | | "fix": "eslint --ext .js,.vue src --fix" |
| | | }, |
| | | "dependencies": { |
| | | "@amap/amap-jsapi-loader": "^1.0.1", |
| | | "@riophae/vue-treeselect": "^0.4.0", |
| | | "@wangeditor/editor": "^5.1.23", |
| | | "@wangeditor/editor-for-vue": "^1.0.2", |
| | |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywPatrolPoint/delete/${id}`) |
| | | } |
| | | // 详æ
|
| | | export function detail (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywPatrolPoint/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ |
| | | export function getStaffList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/ywList', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/member/exportExcel', data, { |
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | export function getFloorList (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywFloor/list', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | // 导åºExcel |
| | | export function exportExcel (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywFloor/exportExcel', data, { |
| | |
| | | export function fetchList (data) { |
| | | return request.post('/visitsAdmin/cloudService/system/user/page', data) |
| | | } |
| | | // æ¥è¯¢ææå
é¨äººå |
| | | export function getUserList (data) { |
| | | return request.post('/visitsAdmin/cloudService/system/user/findInternalList', data) |
| | | } |
| | | |
| | | // æ°å»º |
| | | export function create (data) { |
| | |
| | | export function create (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/create', data) |
| | | } |
| | | |
| | | // ææ´¾ |
| | | export function dispatchOrder (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/dispatchOrder', data) |
| | | } |
| | | // å¤ç |
| | | export function dealOrder (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/dealOrder', data) |
| | | } |
| | | // ä¿®æ¹ |
| | | export function updateById (data) { |
| | | return request.post('/visitsAdmin/cloudService/business/ywWorkorder/updateById', data) |
| | |
| | | export function deleteById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywWorkorder/delete/${id}`) |
| | | } |
| | | // æ¥è¯¢è¯¦æ
|
| | | export function detailById (id) { |
| | | return request.get(`/visitsAdmin/cloudService/business/ywWorkorder/${id}`) |
| | | } |
| | | |
| | | // æ¹éå é¤ |
| | | export function deleteByIdInBatch (ids) { |
| | |
| | | }, |
| | | mounted() { |
| | | // needChangePwd 0 : é»è®¤å¯ç éè¦ä¿®æ¹ï¼1 ä¸éè¦ |
| | | if (this.userInfo &&(!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0')) { |
| | | this.visible.changePwd = true |
| | | } |
| | | // if (this.userInfo &&(!this.userInfo.needChangePwd || this.userInfo.needChangePwd == '0')) { |
| | | // this.visible.changePwd = true |
| | | // } |
| | | }, |
| | | filters: { |
| | | // å±ç¤ºåç§° |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!-- |
| | | æè¿°ï¼ææ¾å°å¾ç»ä»¶ï¼é»è®¤å°ºå¯¸æ¯ 500 * 300 |
| | | |
| | | æ¥æ¶å±æ§åæ°ï¼ |
| | | lat: 纬度 |
| | | lng: ç»åº¦ |
| | | |
| | | èªå®ä¹äºä»¶ï¼ |
| | | drag: ææ¾å®æäºä»¶ |
| | | |
| | | 示ä¾ï¼ |
| | | <mapDrag @drag="dragMap" lat="22.574405" lng="114.095388"></mapDrag> |
| | | --> |
| | | <template> |
| | | <div class="m-map"> |
| | | <div class="search"> |
| | | <el-form @submit.native.prevent> |
| | | <input |
| | | :id="search_id" |
| | | v-model="input" |
| | | type="text" |
| | | placeholder="请è¾å
¥å
³é®å" |
| | | autocomplete="off" |
| | | > |
| | | <input type="text" style="display: none"> |
| | | <button type="primary" @click="searchMap">æç´¢</button> |
| | | </el-form> |
| | | <div v-show="searchKey" id="js-result" class="result" /> |
| | | </div> |
| | | <!-- <div id="panel" /> --> |
| | | <!-- æç´¢ç»ææ --> |
| | | <div v-if="showsearchResult" class="tool_search_result"> |
| | | <ul> |
| | | <li |
| | | v-for="(item, index) in poiList" |
| | | :key="index" |
| | | @click="markerResult(item)" |
| | | > |
| | | {{ item.name }} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | <div id="js-container" class="map">æ£å¨å è½½æ°æ® ...</div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import remoteLoad from '@/utils/remoteLoad.js' |
| | | import bus from '@/eventBus/eventBus.js' |
| | | // import { MapKey, securityJsCode } from '@/api/config' |
| | | import AMapLoader from '@amap/amap-jsapi-loader' |
| | | const MapKey = 'c477e250c63cde947d7e9072bdcf9e65' |
| | | const securityJsCode = '746ae93f3f20c7fc30134109bd55fd19' |
| | | export default { |
| | | props: { |
| | | lat: { |
| | | type: String, |
| | | default: '' |
| | | }, |
| | | lng: { |
| | | type: String, |
| | | default: '' |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | autoOptions: { |
| | | input: '' |
| | | }, |
| | | showsearchResult: false, |
| | | search_id: 'searchId', |
| | | input: '', |
| | | searchPlaceInput: '', |
| | | searchKey: '', |
| | | placeSearch: null, |
| | | dragStatus: false, |
| | | AMapUI: null, |
| | | AMap: null, |
| | | positionImage: require('@/assets/icons/position.png'), |
| | | marker: {}, |
| | | map: null, |
| | | poiList: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | searchPlaceInput(newValue) { |
| | | if (newValue != null) { |
| | | // this.placeSearch.search(newValue) |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | bus.$on('share_id', val => { |
| | | this.autoOptions.input = val |
| | | }) |
| | | bus.$on('share', val => { |
| | | this.searchPlaceInput = val |
| | | }) |
| | | }, |
| | | mounted() { |
| | | this.initMap() |
| | | this.sendId() |
| | | }, |
| | | methods: { |
| | | sendMsg() { |
| | | bus.$emit('share', this.input) |
| | | }, |
| | | sendId() { |
| | | bus.$emit('share_id', this.search_id) |
| | | }, |
| | | // å®ä¾åå°å¾ |
| | | initMap() { |
| | | window._AMapSecurityConfig = { securityJsCode } |
| | | AMapLoader.load({ |
| | | key: MapKey, // ç³è¯·å¥½çWeb端å¼åè
Keyï¼é¦æ¬¡è°ç¨ load æ¶å¿
å¡« |
| | | version: '2.0', // æå®è¦å è½½ç JSAPI ççæ¬ï¼ç¼ºçæ¶é»è®¤ä¸º 1.4.15 |
| | | plugins: ['AMap.ToolBar', 'AMap.Geocoder', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.MapType', 'AMap.HawkEye', 'AMap.Scale', 'AMap.AutoComplete'] // éè¦ä½¿ç¨ççæä»¶å表ï¼å¦æ¯ä¾å°º'AMap.Scale'ç |
| | | }).then((AMap) => { |
| | | this.map = new AMap.Map('js-container', { // 设置å°å¾å®¹å¨id |
| | | viewMode: '3D', // æ¯å¦ä¸º3Då°å¾æ¨¡å¼ |
| | | zoom: 11, // åå§åå°å¾çº§å« |
| | | center: [117.279952, 31.850109] // åå§åå°å¾ä¸å¿ç¹ä½ç½® |
| | | }) |
| | | this.map.addControl(new AMap.ToolBar()) |
| | | this.mapOn(AMap) |
| | | }).catch(e => { |
| | | console.log(e) |
| | | }) |
| | | }, |
| | | searchMap() { |
| | | var placeSearch = new AMap.PlaceSearch({ |
| | | // æé å°ç¹æ¥è¯¢ç±» |
| | | pageSize: 30, // å页æ¾ç¤ºç»ææ¡æ° |
| | | pageIndex: 1, // 页ç |
| | | citylimit: false, // æ¯å¦å¼ºå¶éå¶å¨è®¾ç½®çåå¸å
æç´¢ |
| | | map: this.map, // å±ç°ç»æçå°å¾å®ä¾ |
| | | // panel: 'panel', // ç»æå表å°å¨æ¤å®¹å¨ä¸è¿è¡å±ç¤ºã |
| | | autoFitView: true // æ¯å¦èªå¨è°æ´å°å¾è§é使ç»å¶ç Markerç¹é½å¤äºè§å£çå¯è§èå´ |
| | | }) |
| | | // å
³é®åæ¥è¯¢ |
| | | const cur = this |
| | | placeSearch.search(this.input, (status, result) => { |
| | | // æ¥è¯¢æåæ¶ï¼resultå³å¯¹åºå¹é
çPOIä¿¡æ¯ |
| | | console.log(status) |
| | | console.log(result) |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | cur.showsearchResult = true |
| | | cur.poiList = result.poiList.pois |
| | | } else { |
| | | cur.showsearchResult = false |
| | | cur.poiList = [] |
| | | cur.$message({ |
| | | message: 'æ²¡ææ¥å°ç»æ', |
| | | type: 'warning' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | markerResult(data) { |
| | | // this.input = data.name |
| | | // this.searchMap() |
| | | const that = this |
| | | const { lat, lng } = data.location |
| | | window._AMapSecurityConfig = { securityJsCode } |
| | | AMapLoader.load({ |
| | | key: MapKey, // ç³è¯·å¥½çWeb端å¼åè
Keyï¼é¦æ¬¡è°ç¨ load æ¶å¿
å¡« |
| | | version: '2.0', // æå®è¦å è½½ç JSAPI ççæ¬ï¼ç¼ºçæ¶é»è®¤ä¸º 1.4.15 |
| | | plugins: ['AMap.ToolBar', 'AMap.Geocoder', 'AMap.PlaceSearch', 'AMap.Geolocation', 'AMap.MapType', 'AMap.HawkEye', 'AMap.Scale', 'AMap.AutoComplete'] // éè¦ä½¿ç¨ççæä»¶å表ï¼å¦æ¯ä¾å°º'AMap.Scale'ç |
| | | }).then((AMap) => { |
| | | this.map = new AMap.Map('js-container', { // 设置å°å¾å®¹å¨id |
| | | viewMode: '3D', // æ¯å¦ä¸º3Då°å¾æ¨¡å¼ |
| | | zoom: 18, // åå§åå°å¾çº§å« |
| | | center: [lng, lat] // åå§åå°å¾ä¸å¿ç¹ä½ç½® |
| | | }) |
| | | this.map.addControl(new AMap.ToolBar()) |
| | | const address = data.name |
| | | const marker = new AMap.Marker({ |
| | | position: new AMap.LngLat(lng, lat), |
| | | icon: that.positionImage, |
| | | anchor: 'bottom-center' |
| | | }) |
| | | // map.remove(that.marker) |
| | | this.map.add(marker) |
| | | that.marker = marker |
| | | that.showsearchResult = false |
| | | that.$emit('center', { lnglat: lng + ',' + lat, address }) |
| | | this.mapOn(AMap) |
| | | }).catch(e => { |
| | | console.log(e) |
| | | }) |
| | | // var marker = new AMap.Marker({ |
| | | // position: [Number(data.location.lng), Number(data.location.lat)], |
| | | // cursor: 'pointer', |
| | | // // icon: carIcon, |
| | | // autoRotation: true, |
| | | // angle: 0, |
| | | // offset: new AMap.Pixel(-36, -30), |
| | | // }) |
| | | // marker.setMap(this.mapall) |
| | | // this.mapall.setFitView(); |
| | | }, |
| | | // å°å¾äºä»¶çå¬ |
| | | mapOn(AMap) { |
| | | const { map } = this |
| | | const that = this |
| | | const geocoder = new AMap.Geocoder() |
| | | let address = '' |
| | | // çå¬å°å¾ç¹å»äºä»¶ |
| | | map.on('click', function(e) { |
| | | // è·åç¹å»ä½ç½®åæ |
| | | const { lat, lng } = e.lnglat |
| | | // 设置æ è®°ç¹ |
| | | const marker = new AMap.Marker({ |
| | | position: new AMap.LngLat(lng, lat), |
| | | icon: that.positionImage, |
| | | anchor: 'bottom-center' |
| | | }) |
| | | map.remove(that.marker) |
| | | map.add(marker) |
| | | that.marker = marker |
| | | geocoder.getAddress([lng, lat], function(status, result) { |
| | | address = result.regeocode.formattedAddress |
| | | that.showsearchResult = false |
| | | that.$emit('center', { lng, lat, address }) |
| | | }) |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="css"> |
| | | .m-map { |
| | | min-width: 500px; |
| | | min-height: 300px; |
| | | position: relative; |
| | | } |
| | | .m-map .map { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .m-map .search { |
| | | position: absolute; |
| | | top: 10px; |
| | | left: 10px; |
| | | width: 285px; |
| | | z-index: 1; |
| | | } |
| | | .m-map .search input { |
| | | width: 220px; |
| | | border: 1px solid #ccc; |
| | | height: 30px; |
| | | box-sizing: border-box; |
| | | line-height: 20px; |
| | | padding: 5px; |
| | | outline: none; |
| | | } |
| | | .m-map .search button { |
| | | line-height: 26px; |
| | | background: #fff; |
| | | border: 1px solid #ccc; |
| | | width: 50px; |
| | | text-align: center; |
| | | } |
| | | .m-map .result { |
| | | max-height: 300px; |
| | | overflow: auto; |
| | | margin-top: 10px; |
| | | } |
| | | #panel { |
| | | position: absolute; |
| | | top: 50px; |
| | | left: 10px; |
| | | width: 270px; |
| | | z-index: 1; |
| | | } |
| | | .tool_search_result { |
| | | position: absolute; |
| | | top: 40px; |
| | | left: 10px; |
| | | width: 270px; |
| | | height: 300px; |
| | | overflow: auto; |
| | | z-index: 1; |
| | | border: 1px solid rgb(175, 175, 173); |
| | | border-top: none; |
| | | background: #fff; |
| | | opacity: 0.8; |
| | | bottom: auto; |
| | | z-index: 12; |
| | | position: absolute; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | |
| | | } |
| | | .tool_search_result ul { |
| | | width: 100%; |
| | | list-style: none; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | .tool_search_result ul li { |
| | | font-size: 12px; |
| | | cursor: pointer; |
| | | color: rgb(23, 40, 75); |
| | | text-align: center; |
| | | width: 100%; |
| | | line-height: 2; |
| | | padding: 5px 10px; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px dashed rgb(170, 170, 172); |
| | | display: block; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .tool_search_result ul li:last-child { |
| | | border: none; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from 'vue'
|
| | | // å
å¼ç»ä»¶ä¹é´è¿è¡éè¡
|
| | | export default new Vue()
|
| | |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList', |
| | | checkStrictly: true |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="ç»çº¬åº¦"> |
| | | |
| | | <el-input v-model="form.lnglat" disabled v-trim /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <mapDrag class="mapbox" @center="getCenter" /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¡æ£å
容" prop="content"> |
| | | <el-input type="textarea" :rows="4" v-model="form.content" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸ä¼ å¾ç" prop="imgurl"> |
| | | <UploadAvatarImage :file="{ 'imgurlfull': form.imgurlfull, 'imgurl': form.imgurl }" |
| | | :uploadData="{ folder: 'projects' }" @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" |
| | | :uploadData="{ folder: 'ywPatrol/' }" @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" |
| | | @uploadBegin="isUploading = true" /> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import mapDrag from '@/components/common/map/mapDrag.vue' |
| | | import { fetchList } from '@/api/business/category' |
| | | import { detail } from '@/api/Inspection/ywPatrolPoint' |
| | | export default { |
| | | name: 'OperaYwPatrolPointWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow, UploadAvatarImage }, |
| | | components: { GlobalWindow, UploadAvatarImage, mapDrag }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | |
| | | code: '', |
| | | content: '', |
| | | imgurl: '', |
| | | areaId: '', |
| | | areaId: 0, |
| | | areaIds: [], |
| | | addr: '' |
| | | }, |
| | | deviceList: [], |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | initData() { |
| | | open(title, row) { |
| | | this.title = title |
| | | this.visible = true |
| | | if (row && row.id) { |
| | | this.getDetail(row) |
| | | } |
| | | }, |
| | | getDetail(row) { |
| | | detail(row.id).then(res => { |
| | | this.form = { ...res } |
| | | // this.$set(this.form, 'areaId', res.areaId) |
| | | // console.log('res', res) |
| | | // console.log('res', this.form) |
| | | this.initData(res.areaId) |
| | | }) |
| | | }, |
| | | initData(areaId) { |
| | | fetchList({ |
| | | model: { type: 4 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | console.log('this.form.areaId', this.form) |
| | | |
| | | if (areaId) { |
| | | this.cateList.forEach(item => { |
| | | if (item.childCategoryList) { |
| | | item.childCategoryList.forEach(item2 => { |
| | | if (item2.id == areaId) { |
| | | this.$set(this.form, 'areaIds', [item.id, item2.id]) |
| | | console.log('areaIds', this.form) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | | this.$set(this.form, 'catePId', e[0]) |
| | | this.$set(this.form, 'cateId', '') |
| | | } else if (e && e.length == 2) { |
| | | this.$set(this.form, 'catePId', e[0]) |
| | | this.$set(this.form, 'cateId', e[1]) |
| | | getCenter(data) { |
| | | // console.log(data) |
| | | // this.$set(this.form, 'postion', data.address) |
| | | if(data.lng){ |
| | | this.$set(this.form, 'lnglat', data.lng + ',' + data.lat) |
| | | } else { |
| | | this.$set(this.form, 'catePId', '') |
| | | this.$set(this.form, 'cateId', '') |
| | | this.$set(this.form, 'lnglat', '') |
| | | } |
| | | this.search() |
| | | this.$set(this.form, 'longitude', data.lng) |
| | | this.$set(this.form, 'latitude', data.lat) |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 2) { |
| | | this.$set(this.form, 'areaId', e[1]) |
| | | } else { |
| | | this.$set(this.form, 'areaId', '') |
| | | } |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.form.imgurl = file.imgurl |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .mapbox { |
| | | width: 100%; |
| | | height: 400px; |
| | | margin-bottom: 20px; |
| | | float: left; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | editClick(row) { |
| | | if (row && row.id) { |
| | | this.$refs.operaYwPatrolPointWindow.open('ç¼è¾å·¡æ£ç¹') |
| | | this.$refs.operaYwPatrolPointWindow.open('ç¼è¾å·¡æ£ç¹', row) |
| | | } else { |
| | | this.$refs.operaYwPatrolPointWindow.open('æ°å»ºå·¡æ£ç¹') |
| | | } |
| | | this.$refs.operaYwPatrolPointWindow.initData() |
| | | // this.$refs.operaYwPatrolPointWindow.initData() |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | |
| | | <template> |
| | | <GlobalWindow :title="param.id ? 'ç¼è¾è®¾å¤' : 'æ°å»ºè®¾å¤'" :confirmWorking="subLoading" :visible.sync="isShowModal" width="600px" @close="close" |
| | | @confirm="handleSub"> |
| | | <GlobalWindow :title="param.id ? 'ç¼è¾è®¾å¤' : 'æ°å»ºè®¾å¤'" :confirmWorking="subLoading" :visible.sync="isShowModal" |
| | | width="600px" @close="close" @confirm="handleSub"> |
| | | <el-form :model="param" ref="paramRef" :rules="rules"> |
| | | <el-form-item label="设å¤ç¼ç " prop="code"> |
| | | <el-input v-model="param.code" placeholder="请è¾å
¥" v-trim /> |
| | |
| | | <el-input v-model="param.modelNo" placeholder="请è¾å
¥" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤åç±»" prop=""> |
| | | <el-cascader v-model="param.areaIds" @change="changeSel" placeholder="è¯·éæ©å·¡æ£åºå" clearable :options="cateList" |
| | | <el-cascader v-model="param.areaIds" @change="changeSel" placeholder="è¯·éæ©è®¾å¤åç±»" clearable :options="cateList" |
| | | :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList', |
| | | checkStrictly: true |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="设å¤ç®¡çå" prop=""> |
| | | <el-select v-model="param.realName" filterable clearable> |
| | | <el-option value="0" label="xxx"></el-option> |
| | | <el-select v-model="param.userId" clearable filterable class="w400"> |
| | | <el-option v-for="item in staffList" :label="item.realname" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æå¨ä½ç½®" prop=""> |
| | |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { fetchList } from '@/api/business/category' |
| | | import { create, updateById } from '@/api/Inspection/device' |
| | | import { getUserList } from '@/api/system/user' |
| | | import { Message } from 'element-ui' |
| | | export default { |
| | | components: { GlobalWindow, UploadAvatarImage }, |
| | |
| | | name: [{ required: true, message: '请è¾å
¥' }], |
| | | code: [{ required: true, message: '请è¾å
¥' }] |
| | | }, |
| | | staffList: [] |
| | | |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | getStaff() { |
| | | getUserList({}).then(res => { |
| | | this.staffList = res |
| | | }) |
| | | }, |
| | | initData() { |
| | | fetchList({ |
| | | model: { type: 5 }, |
| | |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | }) |
| | | |
| | | this.getStaff() |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 1) { |
| | | this.$set(this.param, 'catePId', e[0]) |
| | | this.$set(this.param, 'cateId', '') |
| | | } else if (e && e.length == 2) { |
| | | this.$set(this.param, 'catePId', e[0]) |
| | | this.$set(this.param, 'cateId', e[1]) |
| | | if (e && e.length == 2) { |
| | | this.$set(this.param, 'areaId', e[1]) |
| | | } else { |
| | | this.$set(this.param, 'catePId', '') |
| | | this.$set(this.param, 'cateId', '') |
| | | this.$set(this.param, 'areaId', '') |
| | | } |
| | | this.search() |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.$set(this.param, 'imgurl', file.imgurl) |
| | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped></style> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æå±æ¥¼å®" prop="buildingId"> |
| | | <el-select v-model="form.buildingId" placeholder="è¯·éæ©æ¥¼å®" clearable> |
| | | <el-select v-model="form.buildingId" @change="changeBuild" placeholder="è¯·éæ©æ¥¼å®" clearable> |
| | | <el-option v-for="item in buildList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="楼å±" prop="floor"> |
| | | <el-input v-model="form.floor" placeholder="请è¾å
¥æ¥¼å±" v-trim /> |
| | | <el-select v-model="form.floor" placeholder="è¯·éæ©æ¥¼å±" clearable> |
| | | <el-option v-for="item in floorList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¿å·" prop="roomNum"> |
| | | <el-input v-model="form.roomNum" placeholder="请è¾å
¥æ¿å·" v-trim /> |
| | |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { getBuildList } from '@/api/project/ywBuilding' |
| | | import { getFloorList } from '@/api/project/yeFloor' |
| | | export default { |
| | | name: 'OperaYwRoomWindow', |
| | | extends: BaseOpera, |
| | |
| | | }, |
| | | projectList: [], |
| | | buildList: [], |
| | | floorList: [], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | }, |
| | | changeProject(e) { |
| | | this.form.buildingId = '' |
| | | getBuildList({id: e}).then(res => { |
| | | getBuildList({projectId: e}).then(res => { |
| | | this.buildList = res || [] |
| | | }) |
| | | }, |
| | | changeBuild(e) { |
| | | this.form.floor = '' |
| | | getFloorList({buildingId: e}).then(res => { |
| | | this.floorList = res || [] |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | |
| | | let page = pagination.page |
| | | fetchList({ capacity, page, model: { buildingId: id } }).then(res => { |
| | | this.list = res.records |
| | | this.pagination.total = res.total |
| | | }) |
| | | }, |
| | | editClick(row) { |
| | |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="projectName" label="项ç®" min-width="100px"></el-table-column> |
| | | <el-table-column prop="buildingName" label="楼å®" min-width="70px"></el-table-column> |
| | | <el-table-column prop="floor" label="楼å±" min-width="60px"></el-table-column> |
| | | <el-table-column prop="floorName" label="楼å±" min-width="60px"></el-table-column> |
| | | <el-table-column prop="roomNum" label="æ¿å·" min-width="60px"></el-table-column> |
| | | <el-table-column prop="rentArea" label="计ç§é¢ç§¯(m²)" min-width="80px"></el-table-column> |
| | | <el-table-column prop="feeArea" label="计费é¢ç§¯(m²)" min-width="80px"></el-table-column> |
| | |
| | | <template> |
| | | <GlobalWindow width="800px" :title="title" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <GlobalWindow width="800px" :title="title" :visible.sync="visible" @close="close" :confirm-working="isWorking" @confirm="confirm"> |
| | | <el-form :model="form" ref="form" :rules="rules"> |
| | | <el-form-item label="ä½ç½®ç±»å" prop="areaType"> |
| | | <el-select v-model="form.areaType"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="éæ©æ¥¼å±" prop="floorId"> |
| | | <el-form-item v-if="form.areaType == 1" label="éæ©æ¥¼å±" prop="floorId"> |
| | | <el-select v-model="form.floorId"> |
| | | <el-option v-for="item in levelList" clearable filterable :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.areaType == 0" label="éæ©æ¿é´" prop="roomId"> |
| | | <el-select v-model="form.roomId" clearable filterable> |
| | | <el-option v-for="item in roomList" :label="item.name" :value="item.id" /> |
| | | <el-option v-for="item in roomList" :label="item.roomNum" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åç±»" prop="cateId"> |
| | |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { getBuildList } from '@/api/project/ywBuilding' |
| | | import { getRoomList } from '@/api/project/ywRoom' |
| | | import { fetchList } from '@/api/project/yeFloor' |
| | | import { getFloorList } from '@/api/project/yeFloor' |
| | | import { fetchList as getCateList } from '@/api/business/category.js' |
| | | import { rules } from './config' |
| | | export default { |
| | |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch', |
| | | fileList: [], |
| | | uploadData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | | folder: 'YW_WORKORDER_FILE' |
| | | }, |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.$emit('close') |
| | | }, |
| | | getProject() { |
| | | getProjectList({}).then(res => { |
| | | this.projectList = res |
| | |
| | | changeBuild(e) { |
| | | this.$set(this.form, 'floorId', '') |
| | | this.$set(this.form, 'roomId', '') |
| | | if(this.form.areaType == 1){ |
| | | this.getLevel(e) |
| | | }else{ |
| | | this.getRoom(e) |
| | | } |
| | | |
| | | |
| | | }, |
| | | getLevel(buildingId) { |
| | | fetchList({ model: { buildingId }, capacity: 9999, page: 1 }).then(res => { |
| | | this.levelList = res.records |
| | | getFloorList({ buildingId}).then(res => { |
| | | this.levelList = res |
| | | }) |
| | | }, |
| | | getRoom(buildingId) { |
| | |
| | | }else{ |
| | | this.$set(this.form, 'cateId', '') |
| | | } |
| | | |
| | | }, |
| | | getCate() { |
| | | getCateList({ |
| | |
| | | fileurlFull: item.url |
| | | }) |
| | | } |
| | | console.log('file', this.fileList) |
| | | // this.$set(this.param, 'faceImg', file.imgurl) |
| | | |
| | | // console.log('file', this.fileList) |
| | | this.$set(this.form, 'fileList', this.fileList) |
| | | // this.$set(this.param, 'faceImgUrl', file.imgurlfull) |
| | | }, |
| | | handleDelImg(i) { |
| | | this.fileList.splice(i, 1) |
| | | this.$set(this.form, 'fileList', this.fileList) |
| | | }, |
| | | close() { |
| | | this.isShowModal = false |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow width="820px" title="å·¥å详æ
" :visible.sync="visible" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm"> |
| | | <div class="main"> |
| | | <div class="title"> |
| | | <span>å·¥å详æ
</span> |
| | | <div> |
| | | <div class="status primaryColor" v-if="info.dealStatus == 0 || info.dealStatus == null">å¾
ææ´¾</div> |
| | | <div class="status" v-if="info.dealStatus == 1">å·²ææ´¾</div> |
| | | <div class="status gray" v-if="info.dealStatus == 2">å·²å¤ç</div> |
| | | </div> |
| | | </div> |
| | | <div class="list"> |
| | | <div class="item"> |
| | | <div class="la">ä½ç½®ç±»å</div> |
| | | <div class="val">{{ info.areaType == 0 ? '室å
ç»´ä¿®' : 'å
Œ
±ç»´ä¿®' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">对åºä½ç½®</div> |
| | | <div class="val">{{ info.buildingName }} / {{ info.roomNum || info.floorName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">å·¥åç±»å«</div> |
| | | <div class="val">{{ info.categoryName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">䏿¥äºº</div> |
| | | <div class="val">{{ info.creatorName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">䏿¥äººçµè¯</div> |
| | | <div class="val">{{ info.creatorPhone }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="la">䏿¥æ¶é´</div> |
| | | <div class="val">{{ info.createDate }}</div> |
| | | </div> |
| | | <div class="item max"> |
| | | <div class="la">ä¸é¨æ¶é´</div> |
| | | <div class="val">{{ info.getDate }}</div> |
| | | </div> |
| | | <div class="item max"> |
| | | <div class="la">é®é¢æè¿°</div> |
| | | <div class="val">{{ info.content }}</div> |
| | | </div> |
| | | <div class="item max"> |
| | | <div class="la">é®é¢å¾ç</div> |
| | | <div class="value" v-if="info.fileList == null || !info.fileList.length">æ </div> |
| | | <div class="value" v-if="info.fileList != null && info.fileList.length"> |
| | | <div v-for="item in info.fileList" :key="item.id" style="display: inline;margin-right: 20px"> |
| | | <video v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')" ref="videoRef" controls preload="auto" |
| | | style="width: 80px;height: 80px;object-fit: contain;" :src="item.fileurlFull" /> |
| | | <el-image v-else-if="item.fileurlFull" style="width:80px; height: 80px" :src="item.fileurlFull" |
| | | :preview-src-list="[item.fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="title">å·¥åå¤ç</div> |
| | | <el-form :model="param" ref="form" :rules="rules"> |
| | | <template v-if="info.dealStatus == 0 || info.dealStatus == null"> |
| | | <el-form-item label="å¤çæ¹å¼" prop="dealType"> |
| | | <div> |
| | | <el-radio v-model="param.dealType" :label="0">ææ´¾</el-radio> |
| | | <el-radio v-model="param.dealType" :label="1">ç´æ¥åå¤</el-radio> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item v-if="param.dealType == 0" label="ææ´¾ç»" prop="dealUserId"> |
| | | <el-select v-model="param.dealUserId" clearable filterable class="w400"> |
| | | <el-option v-for="item in staffList" :label="item.realname" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="param.dealType == 1" label="åå¤å
容" prop="dealInfo"> |
| | | <el-input type="textarea" class="w400" :rows="4" v-model="param.dealInfo" placeholder="请填å说æ"></el-input> |
| | | </el-form-item> |
| | | </template> |
| | | <template v-if="info.dealStatus == 1 && info.dealUserId === userInfo.id"> |
| | | <el-form-item label="å¤çæ¶é´" prop="getDate"> |
| | | <el-date-picker type="datetime" class="w400" v-model="param.getDate" format="yyyy-MM-dd HH:mm" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="è¯·éæ©"></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="åå¤å
容" prop="dealInfo"> |
| | | <el-input type="textarea" class="w400" :rows="4" v-model="param.dealInfo" placeholder="请填å说æ"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç°åºå¾ç"> |
| | | <div class="file_list"> |
| | | <el-upload class="avatar-uploader" :data="uploadData" multiple :limit="6" :auto-upload="true" :action="uploadImgUrl" |
| | | :show-file-list="false" :on-success="uploadAvatarSuccess" :on-error="uploadError" |
| | | :before-upload="beforeUpload"> |
| | | <div class="upload_wrap"> |
| | | <i class="el-icon-plus avatar-uploader-icon"></i> |
| | | <div>å¾ç/è§é¢</div> |
| | | </div> |
| | | </el-upload> |
| | | <div v-for="(item, i) in dealFileList" :key="i" class="item"> |
| | | <i @click="handleDelImg(i)" class="el-icon-error close"></i> |
| | | <el-image :src="item.fileurlFull" :preview-src-list="[item.fileurlFull]" v-if="item.type == 0" |
| | | class="img"></el-image> |
| | | <video :src="item.fileurlFull" controls v-if="item.type == 1" class="img"></video> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | </template> |
| | | <template v-if="info.dealStatus == 2"> |
| | | <div class="list"> |
| | | <div class="item item2"> |
| | | <div class="la">å¤çæ¶é´ï¼</div> |
| | | <div class="val">{{ info.getDate }}</div> |
| | | </div> |
| | | <div class="item item2"> |
| | | <div class="la">å¤ç夿³¨ï¼</div> |
| | | <div class="val">{{ info.dealInfo }}</div> |
| | | </div> |
| | | <div class="item item2"> |
| | | <div class="la">ç°åºç
§çï¼</div> |
| | | <div class="value" v-if="info.dealFileList == null || !info.dealFileList.length">æ </div> |
| | | <div class="value" v-if="info.dealFileList != null && info.dealFileList.length"> |
| | | <div v-for="item in info.dealFileList" :key="item.id" style="display: inline;margin-right: 20px"> |
| | | <video v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')" ref="videoRef" controls |
| | | preload="auto" style="width: 80px;height: 80px;object-fit: contain;" :src="item.fileurlFull" /> |
| | | <el-image v-else-if="item.fileurlFull" style="width:80px; height: 80px" :src="item.fileurlFull" |
| | | :preview-src-list="[item.fileurlFull]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </el-form> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import { detailById, dispatchOrder, dealOrder } from '@/api/workorder/ywWorkorder' |
| | | import { getUserList } from '@/api/system/user' |
| | | import { Message, Loading } from 'element-ui' |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | extends: BaseOpera, |
| | | data() { |
| | | return { |
| | | id: '', |
| | | visible: false, |
| | | param: { |
| | | dealType: 0 |
| | | }, |
| | | info: {}, |
| | | rules: { |
| | | dealType: [{ required: true, message: 'è¯·éæ©' }], |
| | | dealUserId: [{ required: true, message: 'è¯·éæ©' }], |
| | | }, |
| | | staffList: [], |
| | | |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/uploadBatch', |
| | | dealFileList: [], |
| | | uploadData: { |
| | | folder: 'HIDDEN_DANGER_FILE' |
| | | }, |
| | | } |
| | | }, |
| | | computed: { |
| | | userInfo() { |
| | | return this.$store.state.userInfo |
| | | } |
| | | }, |
| | | created() { |
| | | this.getStaff() |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | const { param, id, dealFileList, info } = this |
| | | let fn = null |
| | | if(info.dealStatus == 0 || info.dealStatus == null){ |
| | | fn = param.dealType == 0 ? dispatchOrder : dealOrder |
| | | }else{ |
| | | fn = dealOrder |
| | | } |
| | | fn({ |
| | | id, |
| | | ...param, |
| | | dealFileList |
| | | }).then(res => { |
| | | Message.success('æäº¤æå') |
| | | this.visible = false |
| | | this.$emit('success') |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getDetail() { |
| | | const { id } = this |
| | | detailById(id).then(res => { |
| | | this.info = res |
| | | }) |
| | | }, |
| | | getStaff() { |
| | | getUserList({}).then(res => { |
| | | this.staffList = res |
| | | }) |
| | | }, |
| | | beforeUpload(file) { |
| | | if (['video/mp4', 'video/ogg', 'video/flv', 'video/avi', 'video/wmv', 'video/rmvb', 'image/jpeg', 'image/jpg', 'image/png', 'image/gif'].indexOf(file.type) == -1) { |
| | | this.$message.error('请ä¸ä¼ æ£ç¡®çè§é¢/å¾çæ ¼å¼') |
| | | return false |
| | | } |
| | | if (this.dealFileList.length > 8) return Message.warning('ç°åºå¾çä¸è½è¶
è¿9å¼ ') |
| | | this.loadingInstance = Loading.service({ |
| | | lock: true, |
| | | text: 'Loading', |
| | | spinner: 'el-icon-loading', |
| | | background: 'rgba(0, 0, 0, 0.7)' |
| | | }) |
| | | }, |
| | | uploadError() { |
| | | this.$nextTick(() => { // 以æå¡çæ¹å¼è°ç¨ç Loading éè¦å¼æ¥å
³é |
| | | if (this.loadingInstance) { |
| | | this.loadingInstance.close() |
| | | } |
| | | }) |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.$nextTick(() => { // 以æå¡çæ¹å¼è°ç¨ç Loading éè¦å¼æ¥å
³é |
| | | if (this.loadingInstance) { |
| | | this.loadingInstance.close() |
| | | } |
| | | }) |
| | | console.log('file', file) |
| | | const item = file.data[0] |
| | | if (['.mp4', '.avi', '.flv', '.wmv'].some(char => item.imgaddr.includes(char))) { |
| | | this.dealFileList.push({ |
| | | type: 1, |
| | | fileurl: item.imgaddr, |
| | | fileurlFull: item.url |
| | | }) |
| | | } else { |
| | | this.dealFileList.push({ |
| | | type: 0, |
| | | fileurl: item.imgaddr, |
| | | fileurlFull: item.url |
| | | }) |
| | | } |
| | | console.log('file', this.dealFileList) |
| | | // this.$set(this.param, 'faceImg', file.imgurl) |
| | | // this.$set(this.param, 'faceImgUrl', file.imgurlfull) |
| | | }, |
| | | handleDelImg(i) { |
| | | this.dealFileList.splice(i, 1) |
| | | }, |
| | | close() { |
| | | this.visible = false |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import '@/assets/style/variables.scss'; |
| | | |
| | | .main { |
| | | padding-top: 20px; |
| | | |
| | | .title { |
| | | font-weight: 500; |
| | | font-size: 18px; |
| | | color: $primary-color; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | .status { |
| | | padding: 0 6px; |
| | | height: 22px; |
| | | line-height: 22px; |
| | | border-radius: 2px; |
| | | border: 1px solid #00BA92; |
| | | color: #00BA92; |
| | | font-weight: 400; |
| | | font-size: 12px; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .primaryColor { |
| | | border: 1px solid $primary-color; |
| | | } |
| | | |
| | | .gray { |
| | | color: gray; |
| | | border: 1px solid gray; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | /* background: #F7F7F7; */ |
| | | border-radius: 2px; |
| | | padding: 15px 20px; |
| | | margin-bottom: 16px; |
| | | |
| | | .item { |
| | | width: 33.3%; |
| | | margin-bottom: 12px; |
| | | |
| | | .la { |
| | | color: #7f7f7f; |
| | | margin-top: 2px; |
| | | } |
| | | } |
| | | |
| | | .item2 { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .max { |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .file_list { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | |
| | | .avatar-uploader { |
| | | width: 92px; |
| | | height: 92px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | border: 1px dashed #d9d9d9; |
| | | } |
| | | |
| | | .item { |
| | | width: 92px; |
| | | max-height: 92px; |
| | | margin-left: 10px; |
| | | position: relative; |
| | | border: 1px dashed #d9d9d9; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .close { |
| | | font-size: 20px; |
| | | position: absolute; |
| | | right: -10px; |
| | | top: -10px; |
| | | z-index: 111; |
| | | color: red; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .img { |
| | | width: 92px; |
| | | max-height: 92px; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <TableLayout :permissions="['business:ywworkorder:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item prop="areaType"> |
| | | <el-form-item prop="areaType" label="ä½ç½®ç±»å«"> |
| | | <el-select v-model="searchForm.areaType"> |
| | | <el-option label="室å
ç»´ä¿®" value="0"></el-option> |
| | | <el-option label="å
Œ
±ç»´ä¿®" value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è¯·éæ©æ¥ä¿®åºå" prop="buildingId"> |
| | | <el-input v-model="searchForm.buildingId" placeholder="请è¾å
¥æå±é¡¹ç®ç¼ç ï¼å
³èyw_building)" |
| | | @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="鿩项ç®" prop="projectId"> |
| | | <el-select v-model="searchForm.projectId" @change="getBuild" clearable filterable> |
| | | <el-option v-for="item in projectList" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="cateId"> |
| | | <el-input v-model="searchForm.cateId" placeholder="æ¥ä¿®ç©åç±»å«" @keypress.enter.native="search"></el-input> |
| | | <el-form-item label="éæ©æ¥¼å®" prop="buildingId"> |
| | | <el-select v-model="searchForm.buildingId" clearable filterable> |
| | | <el-option v-for="item in buildList" :label="item.name" :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item prop="cateId" label="ç©åç±»å«"> |
| | | <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="è¯·éæ©å·¡æ£åºå" clearable |
| | | :options="cateList" :props="{ |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childCategoryList' |
| | | }"></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="æäº¤æ¥æ"> |
| | | <el-date-picker v-model="searchForm.selDate" @change="changeSelDate" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" type="daterange"></el-date-picker> |
| | | </el-form-item> |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywworkorder:exportExcel']" |
| | |
| | | <span v-if="scope.row.areaType == 1">å
Œ
񆧆</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" label="æ¥ä¿®åºå" min-width="100px"></el-table-column> |
| | | <el-table-column prop="cateName" label="æ¥ä¿®ç©åç±»å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="userName" label="䏿¥äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="submitDate" label="䏿¥æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="" label="æ¥ä¿®åºå" min-width="100px"> |
| | | <template v-slot="scope"> |
| | | <span>{{ scope.row.buildingName }} / {{ scope.row.areaType == 0 ? scope.row.roomNum : scope.row.floorName |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="categoryName" label="ç©åç±»å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="creatorName" label="䏿¥äºº" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="䏿¥æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="dealUserName" label="å¤ç人" min-width="100px"></el-table-column> |
| | | <el-table-column label="å¤çç»æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | |
| | | <span v-if="row.dealStatus == 2">å·²å¤ç</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" |
| | | label="æä½" min-width="80" fixed="right"> |
| | | <el-table-column v-if="containPermissions(['business:ywworkorder:update'])" label="æä½" min-width="80" |
| | | fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <span class="primaryColor cu">æ¥ç详æ
</span> |
| | | <span @click="handleDetail(row)" class="primaryColor cu">æ¥ç详æ
</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <Detail v-if="showDetail" ref="DetailRef" @close="showDetail = false" @success="search" /> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaYwWorkorderWindow ref="operaYwWorkorderWindow" @success="handlePageChange" /> |
| | | </TableLayout> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaYwWorkorderWindow from './components/OperaYwWorkorderWindow' |
| | | import Detail from './components/detail' |
| | | import { getBuildList } from '@/api/project/ywBuilding' |
| | | import { getProjectList } from '@/api/project/ywProject' |
| | | import { fetchList as getCateList } from '@/api/business/category.js' |
| | | export default { |
| | | name: 'YwWorkorder', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaYwWorkorderWindow }, |
| | | components: { TableLayout, Pagination,Detail, OperaYwWorkorderWindow }, |
| | | data() { |
| | | return { |
| | | // æç´¢ |
| | | showDetail: false, |
| | | searchForm: { |
| | | selDate: [], |
| | | areaType: '', |
| | | creator: '', |
| | | createDate: '', |
| | | editor: '', |
| | | editDate: '', |
| | | isdeleted: '', |
| | | title: '', |
| | | remark: '', |
| | | status: '', |
| | | sortnum: '', |
| | | content: '', |
| | | getDate: '', |
| | | areaIds: '', |
| | | projectId: '', |
| | | buildingId: '', |
| | | roomId: '', |
| | | userId: '', |
| | | phone: '', |
| | | submitDate: '', |
| | | cateId: '', |
| | | code: '', |
| | | dealStatus: '', |
| | | dispatchUserId: '', |
| | | dispatchDate: '', |
| | | dispatchInfo: '', |
| | | dealUserId: '', |
| | | dealDate: '', |
| | | dealInfo: '', |
| | | dealType: '' |
| | | } |
| | | }, |
| | | projectList: [], |
| | | buildList: [], |
| | | cateList: [], |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | this.initData() |
| | | }, |
| | | methods: { |
| | | handleDetail(row) { |
| | | this.showDetail = true |
| | | this.$nextTick(() => { |
| | | this.$refs.DetailRef.visible = true |
| | | this.$refs.DetailRef.id = row.id |
| | | this.$refs.DetailRef.getDetail() |
| | | |
| | | }) |
| | | }, |
| | | initData() { |
| | | getProjectList({}).then(res => { |
| | | this.projectList = res |
| | | }) |
| | | getCateList({ |
| | | model: { type: 3 }, |
| | | capacity: 1000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.cateList = res.records || [] |
| | | }) |
| | | }, |
| | | getBuild(projectId) { |
| | | this.$set(this.searchForm, 'buildingId', '') |
| | | getBuildList({ projectId }).then(res => { |
| | | this.buildList = res |
| | | }) |
| | | }, |
| | | changeSel(e) { |
| | | if (e && e.length == 2) { |
| | | this.$set(this.searchForm, 'cateId', e[1]) |
| | | } else { |
| | | this.$set(this.searchForm, 'cateId', '') |
| | | } |
| | | }, |
| | | reset() { |
| | | this.searchForm = { |
| | | selDate: [], |
| | | areaType: '', |
| | | areaIds: '', |
| | | projectId: '', |
| | | buildingId: '', |
| | | cateId: '', |
| | | } |
| | | this.search() |
| | | }, |
| | | changeSelDate(e) { |
| | | if (e && e.length > 0) { |
| | | this.$set(this.searchForm, 'queryStartTime', e[0] + ' 00:00:00') |
| | | this.$set(this.searchForm, 'queryEndTime', e[1] + ' 23:59:59') |
| | | } else { |
| | | this.$set(this.searchForm, 'queryStartTime', '') |
| | | this.$set(this.searchForm, 'queryEndTime', '') |
| | | } |
| | | |
| | | }, |
| | | } |
| | | } |
| | | </script> |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/NoticesCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemDataPermissionCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDataPermissionBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemDepartmentCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDepartmentBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemDictCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemDictDataCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemLoginLogCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemMenuCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemMenuBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemMonitorCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemPermissionCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemPermissionBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemPositionCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemPositionBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemRoleCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemRoleBiz; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemTraceLogCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.config.annotation.CloudRequiredPermission; |
ÎļþÃû´Ó server/system_service/src/main/java/com/doumee/api/cloud/SystemUserCloudController.java ÐÞ¸Ä |
| | |
| | | package com.doumee.api.cloud; |
| | | package com.doumee.cloud; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.biz.system.SystemUserBiz; |
| | |
| | | public static final String SPECIAL_COMPANY_ID ="SPECIAL_COMPANY_ID" ; |
| | | public static final String YW_DEVICE ="YW_DEVICE" ; |
| | | public static final String YW_PATROL ="YW_PATROL" ; |
| | | public static final String YW_CONTRACT_BILL ="YW_CONTRACT_BILL" ; |
| | | |
| | | public static final String RESERVATION_TOTAL_NUM ="RESERVATION_TOTAL_NUM" ; |
| | | public static final String SIGN_IN_PLACE_LAT ="SIGN_IN_PLACE_LAT" ; |
| | |
| | | public static final String ERP ="ERP" ; |
| | | public static final Integer THREE =3 ; |
| | | public static final Integer FOUR =4 ; |
| | | public static final Integer SEVEN =7 ; |
| | | public static final Integer FIVE =5 ; |
| | | public static final String ORG_USER_ORIGIN = "ORG_USER_ORIGIN"; |
| | | public static final String VIRTUAL_CARD_INDEX = "02098469790"; |
| | |
| | | public static final String MYSQL_BACKUP_DIR ="MYSQL_BACKUP_DIR" ; |
| | | public static final String EVENT_FILES_PRIVATE_DOMAIN ="EVENT_FILES_PRIVATE_DOMAIN" ; |
| | | public static final String EVENT_FILES_PUBLIC_DOMAIN ="EVENT_FILES_PUBLIC_DOMAIN" ; |
| | | public static final String YW_CONTRACT_FILE = "YW_CONTRACT_FILE"; |
| | | public static boolean DEALING_HK_SYNCPRIVILEGE= false; |
| | | public static boolean DEALING_HK_SYNCDEVICE = false; |
| | | public static boolean DEALING_HK_SYNCPLATFORM = false; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | public interface BillPayStatus{ |
| | | //è®¿å®¢ç¶æ(0:æªç¾å°,1:å·²ç¾å°,2:å·²ç¾é,3:æ»ç,4:æªè®¿é®,5:èªå¨ç¾ç¦»,6:æªç¾é) |
| | | int waitSign = 0; |
| | | int signin= 1; |
| | | int signout = 2; |
| | | int noleave =3; |
| | | int novisit =4; |
| | | int autoOut =5; |
| | | int noSignout =6; |
| | | /** |
| | | * è´¦åç±»å 0ç§èµæ¡æ¬¾ 1ç©ä¸æ¡æ¬¾ 2ç§èµæ¼é 3ç©ä¸æ¼é 4èªå»ºè´¦å |
| | | */ |
| | | public interface contractBillType{ |
| | | int lease = 0; |
| | | int property= 1; |
| | | int leaseDeposit = 2; |
| | | int propertyDeposit =3; |
| | | int create =4; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä½ä¸ç±»å 0èªæè½¦å¸è´§ 1èªæè½¦è£
è´§ 2å¤å车å¸è´§ 3å¤å车è£
è´§ 4å¸å
¬å¸å¤å车å¸è´§ |
| | |
| | | FN_DEVICE_RECORD_FILE(6, "é宿å¡å¹³å°è¿ç»´è®°å½å¾ç ", "é宿å¡å¹³å°è¿ç»´è®°å½å¾ç "), |
| | | FN_PATROL_POINT_FILE(7, "å·¡æ£ç¹éä»¶ ", "å·¡æ£ç¹éä»¶ "), |
| | | FN_CONTRACT_BILL_FILE(8, "ååè´¦åéä»¶ ", "ååè´¦åéä»¶ "), |
| | | YW_CONTRACT_FILE(9, "ååéä»¶ ", "ååéä»¶ "), |
| | | FN_CONTRACT_REVENUE_FILE(10, "æ¶æ¯æµæ°´éä»¶ ", "ååè´¦åéä»¶ "), |
| | | |
| | | ; |
| | | // æååé |
| | | private String name; |
| | |
| | | return noteinfo; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * è¿ç»´ååãå·¥åä¿¡æ¯è®°å½ç±»å |
| | | * æä½ç±»å 0å·¥åå建 1ææ´¾ 2å¤ç 3ååå建 4åååæ´ 5ååéç§ |
| | | */ |
| | | public enum YwLogType{ |
| | | WORKORDER_CREATE(0, "å·¥åå建", "å·¥åå建"), |
| | | WORKORDER_DISPATCH(1, "工忿´¾", "工忿´¾"), |
| | | WORKORDER_DEAL(2, "å·¥åå¤ç ", "å·¥åå¤ç "), |
| | | CONTRACT_CREATE(3, "ååå建 ", "ååå建 "), |
| | | CONTRACT_UPDATE(4, "åååæ´ ", "åååæ´ "), |
| | | CONTRACT_BACK(5, "ååéç§ ", "ååéç§ "), |
| | | |
| | | ; |
| | | // æååé |
| | | private String name; |
| | | private int key; |
| | | private String noteinfo;// æè¿° |
| | | |
| | | // æé æ¹æ³ |
| | | YwLogType(int key, String name, String noteinfo) { |
| | | this.name = name; |
| | | this.key = key; |
| | | this.noteinfo = noteinfo; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getName(int index) { |
| | | for (MultiFile c : MultiFile.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.name; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // æ®éæ¹æ³ |
| | | public static String getInfo(int index) { |
| | | for (YwLogType c : YwLogType.values()) { |
| | | if (c.getKey() == index) { |
| | | return c.noteinfo; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | // get set æ¹æ³ |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public int getKey() { |
| | | return key; |
| | | } |
| | | |
| | | public void setKey(int key) { |
| | | this.key = key; |
| | | } |
| | | |
| | | public String getNoteinfo() { |
| | | return noteinfo; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywcontractbill:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | |
| | | return ApiResponse.success(ywContractBillService.findById(id)); |
| | | return ApiResponse.success(ywContractBillService.getDetail(id)); |
| | | } |
| | | } |
| | |
| | | ywContract.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractService.create(ywContract)); |
| | | } |
| | | @PreventRepeat |
| | | @ApiOperation("éç§") |
| | | @PostMapping("/backRent") |
| | | @CloudRequiredPermission("business:ywcontract:update") |
| | | public ApiResponse backRent(@RequestBody YwContract ywContract,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContract.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractService.backRent(ywContract)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwContractRevenue; |
| | | import com.doumee.service.business.YwContractRevenueService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/11/25 10:29 |
| | | */ |
| | | @Api(tags = "è¿ç»´ååæ¶æ¯æµæ°´") |
| | | @RestController |
| | | @RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/business/ywContractRevenue") |
| | | public class YwContractRevenueCloudController extends BaseController { |
| | | |
| | | @Autowired |
| | | private YwContractRevenueService ywContractRevenueService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:create") |
| | | public ApiResponse create(@RequestBody YwContractRevenue ywContractRevenue,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractRevenue.setLoginUserInfo(getLoginUser(token)); |
| | | return ApiResponse.success(ywContractRevenueService.create(ywContractRevenue)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractRevenueService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywContractRevenueService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:update") |
| | | public ApiResponse updateById(@RequestBody YwContractRevenue ywContractRevenue,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractRevenueService.updateById(ywContractRevenue); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å
³éæµæ°´") |
| | | @GetMapping("/close") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:update") |
| | | public ApiResponse close(@RequestParam Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractRevenueService.closeRevenue(id,getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:query") |
| | | public ApiResponse<PageData<YwContractRevenue>> findPage (@RequestBody PageWrap<YwContractRevenue> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractRevenueService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("æ¶æ¯å表") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:query") |
| | | public ApiResponse<List<YwContractRevenue>> list (@RequestBody YwContractRevenue ywContractRevenue,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractRevenueService.findList(ywContractRevenue)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwContractRevenue> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ExcelExporter.build(YwContractRevenue.class).export(ywContractRevenueService.findPage(pageWrap).getRecords(), "è¿ç»´ååæ¶æ¯æµæ°´", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywcontractrevenue:query") |
| | | public ApiResponse findById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywContractRevenueService.getDetail(id)); |
| | | } |
| | | } |
| | |
| | | return ApiResponse.success(ywFloorService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:ywfloor:query") |
| | | public ApiResponse<List<YwFloor>> findList (@RequestBody YwFloor pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap. setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywFloorService.findList(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywfloor:exportExcel") |
| | |
| | | .host(host) |
| | | .select() |
| | | .apis( basePackage("com.doumee.cloud")) |
| | | // .apis( basePackage("com.doumee.api.cloud")) |
| | | // .apis( basePackage("com.doumee.api.common")) |
| | | |
| | | // .apis( basePackage("com.doumee.cloud.openapi;com.doumee.api.common")) |
| | |
| | | @Autowired |
| | | private InterfaceLogService interfaceLogService; |
| | | |
| | | @PostConstruct |
| | | // @PostConstruct |
| | | public int initHkConfig(){ |
| | | //è·åæ ¹ç»ç»ç¼ç |
| | | initHkParamConfig(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.YwContractRevenue; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/11/25 10:29 |
| | | */ |
| | | public interface YwContractRevenueMapper extends MPJBaseMapper<YwContractRevenue> { |
| | | |
| | | } |
| | |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | @ApiModelProperty(value = "ååæè¦") |
| | | @ExcelColumn(name="ååæè¦") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¾
æ§è¡ 1æ§è¡ä¸ 2已尿 3å·²éç§", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¾
æ§è¡ 1æ§è¡ä¸ 2已尿 3å·²éç§") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "è´¦åç»æ¸
ç¶æï¼ 0å¾
仿¬¾ 1é¨åæ¶æ¬¾ 2å·²ç»æ¸
3å·²å
³é", example = "1") |
| | | @ExcelColumn(name="è´¦åç»æ¸
ç¶æï¼ 0å¾
仿¬¾ 1é¨åæ¶æ¬¾ 2å·²ç»æ¸
3å·²å
³é") |
| | | private Integer billStatus; |
| | | |
| | | @ApiModelProperty(value = "ç±»å 0ç©ä¸ç§èµ 1ç©ä¸ 2ç§èµ", example = "1") |
| | | @ExcelColumn(name="ç±»å 0ç©ä¸ç§èµ 1ç©ä¸ 2ç§èµ") |
| | |
| | | @ApiModelProperty(value = "è系人ç¼ç ï¼å
³èmemebr)", example = "1") |
| | | @ExcelColumn(name="è系人ç¼ç ï¼å
³èmemebr)") |
| | | private Integer memberId; |
| | | @ApiModelProperty(value = "éç§ç±»å 0å°æéç§ 1æ¢æ¿éç§ 2è¿çº¦éç§ 3ååéç§", example = "1") |
| | | @ExcelColumn(name="éç§ç±»å 0å°æéç§ 1æ¢æ¿éç§ 2è¿çº¦éç§ 3ååéç§") |
| | | private Integer btType; |
| | | |
| | | @ApiModelProperty(value = "éç§æä½æ¶é´") |
| | | @ExcelColumn(name="éç§æä½æ¶é´") |
| | | private Date btActDate; |
| | | |
| | | @ApiModelProperty(value = "éç§æä½äººï¼å
³èsystem_user)", example = "1") |
| | | @ExcelColumn(name="éç§æä½äººï¼å
³èsystem_user)") |
| | | private Integer btActUserId; |
| | | |
| | | @ApiModelProperty(value = "éç§åå ") |
| | | @ExcelColumn(name="éç§åå ") |
| | | private String btInfo; |
| | | |
| | | @ApiModelProperty(value = "éç§æè¦") |
| | | @ExcelColumn(name="éç§æè¦") |
| | | private String btRemark; |
| | | |
| | | @ApiModelProperty(value = "éç§æ¥æ") |
| | | @ExcelColumn(name="éç§æ¥æ") |
| | | private Date btDate; |
| | | |
| | | @ApiModelProperty(value = "éç§ç»å人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="éç§ç»å人ç¼ç ") |
| | | private Integer btUserId; |
| | | |
| | | @ApiModelProperty(value = "éç§ç¾å°æ¥æ") |
| | | @ExcelColumn(name="éç§ç¾å°æ¥æ") |
| | | private Date btSignDate; |
| | | |
| | | @ApiModelProperty(value = "éç§ç»ç®éé¢å计", example = "1") |
| | | @ExcelColumn(name="éç§ç»ç®éé¢å计") |
| | | private BigDecimal btFee; |
| | | @ApiModelProperty(value = "ç§èµæ¡æ¬¾æ¼éï¼å
ï¼", example = "1") |
| | | @ExcelColumn(name="ç§èµæ¡æ¬¾æ¼éï¼å
ï¼") |
| | | private BigDecimal zlDeposit; |
| | |
| | | @ApiModelProperty(value = "å
¬å¸åç§°") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | @ApiModelProperty(value = "ç»å人å§å") |
| | | @TableField(exist = false) |
| | | private String userName; |
| | | @ApiModelProperty(value = "项ç®å") |
| | | @TableField(exist = false) |
| | | private String projectName; |
| | | @ApiModelProperty(value = "ç§å®¢åç§°") |
| | | @TableField(exist = false) |
| | | private String renterName; |
| | | @ApiModelProperty(value = "å建人å§å") |
| | | @TableField(exist = false) |
| | | private String creatorName; |
| | | @ApiModelProperty(value = "ç§èµæ»é¢ç§¯", example = "1") |
| | | @TableField(exist = false) |
| | | private BigDecimal totalArea; |
| | | @ApiModelProperty(value = "ç©ä¸æ¡æ¬¾éå") |
| | | @TableField(exist = false) |
| | | private List<YwContractDetail> wyDetailList; |
| | | @ApiModelProperty(value = "æä½æ¥å¿éå") |
| | | @TableField(exist = false) |
| | | private List<YwWorkorderLog> logList; |
| | | @ApiModelProperty(value = "è´¦åéå") |
| | | @TableField(exist = false) |
| | | private List<YwContractBill> billList; |
| | | @ApiModelProperty(value = "éæ°å¼å§æ¶é´") |
| | | @TableField(exist = false) |
| | | private Date queryStartTime; |
| | |
| | | @ApiModelProperty(value = "æ¥è¯¢ç»ææ¶é´") |
| | | @TableField(exist = false) |
| | | private Date queryEndTime; |
| | | @ApiModelProperty(value = "鿬¾å
³éè´¦åæ°") |
| | | @TableField(exist = false) |
| | | private int btCLoseBill; |
| | | @ApiModelProperty(value = "鿬¾æªç»æ¸
è´¦åæ°") |
| | | @TableField(exist = false) |
| | | private int btWaitBill; |
| | | |
| | | @ApiModelProperty(value = "éç§æ¶æ°å¢çæ¶ä»æ¬¾è´¦å") |
| | | @TableField(exist = false) |
| | | private List<YwContractBill> addBillList; |
| | | @ApiModelProperty(value = "å½åæ¯æéæ¬¾ä¿®æ¹éé¢çè´¦åéå") |
| | | @TableField(exist = false) |
| | | private List<YwContractBill> canBackRentBills; |
| | | } |
| | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | @ApiModelProperty(value = "è´¦ååç§°") |
| | | @ExcelColumn(name="è´¦ååç§°") |
| | | private String title; |
| | | @ApiModelProperty(value = "ç±»å 0ç§èµæ¡æ¬¾ 1ç©ä¸æ¡æ¬¾ 2ç§èµæ¼é 3ç©ä¸æ¼é", example = "1") |
| | | @ExcelColumn(name="ç±»å 0ç§èµæ¡æ¬¾ 1ç©ä¸æ¡æ¬¾ 2ç§èµæ¼é 3ç©ä¸æ¼é") |
| | | @ApiModelProperty(value = "è´¦åç¼å·") |
| | | private String code; |
| | | @ApiModelProperty(value = "ç±»å 0ååè´¦å 1èªå»ºè´¦å", example = "1") |
| | | @ExcelColumn(name="è´¦åæ¥æº",index = 12,width = 6,valueMapping = "0=ååè´¦å;1=èªå»ºè´¦å;") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0å¼å§ï¼1å
³éï¼", example = "1") |
| | | @ExcelColumn(name="ç¶æ 0å¼å§ï¼1å
³éï¼") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´") |
| | | @ExcelColumn(name="å¼å§æ¶é´") |
| | | @ExcelColumn(name="计费å¼å§æ¥æ",index = 10,width = 6,dateFormat = "yyyy-MM-dd") |
| | | private Date startDate; |
| | | |
| | | @ApiModelProperty(value = "å®é
仿¬¾æ¥") |
| | | @ExcelColumn(name="å®é
仿¬¾æ¥") |
| | | private Date actPayDate; |
| | | @ApiModelProperty(value = "计å仿¬¾æ¥") |
| | | @ExcelColumn(name="计å仿¬¾æ¥") |
| | | private Date planPayDate; |
| | | @ApiModelProperty(value = "ç»ææ¶é´") |
| | | @ExcelColumn(name="ç»ææ¶é´") |
| | | @ExcelColumn(name="è®¡è´¹ç»ææ¥æ",index = 11,width = 6,dateFormat = "yyyy-MM-dd") |
| | | private Date endDate; |
| | | |
| | | @ApiModelProperty(value = "å®é
仿¬¾æ¥") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actPayDate; |
| | | |
| | | @ApiModelProperty(value = "计å仿¬¾æ¥") |
| | | @ExcelColumn(name="计å仿¬¾æ¥") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date planPayData; |
| | | |
| | | @ApiModelProperty(value = "å®é
仿¬¾æ¥") |
| | | @ExcelColumn(name="å®é
仿¬¾æ¥") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date actPayData; |
| | | private Date planPayDate; |
| | | |
| | | @ApiModelProperty(value = "ååæ¡æ¬¾ç¼ç ï¼å
³èyw_contract_detail)", example = "1") |
| | | @ExcelColumn(name="ååæ¡æ¬¾ç¼ç ï¼å
³èyw_contract_detail)") |
| | | private Integer detailId; |
| | | |
| | | @ApiModelProperty(value = "ååç¼ç ï¼å
³èyw_contract)", example = "1") |
| | | @ExcelColumn(name="ååç¼ç ï¼å
³èyw_contract)") |
| | | private Integer contractId; |
| | | |
| | | @ApiModelProperty(value = "æåºç ", example = "1") |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "æ»éé¢", example = "1") |
| | | @ExcelColumn(name="æ»éé¢") |
| | | @ApiModelProperty(value = "è´¦åéé¢", example = "1") |
| | | @ExcelColumn(name="è´¦åéé¢",index = 4,width = 6) |
| | | private BigDecimal totleFee; |
| | | |
| | | @ApiModelProperty(value = "è´¹ç¨ç±»åï¼0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=æ¼éï¼3=ä¿è¯éï¼4=æ°´çµè´¹ï¼5=æé¡¹è´¹ï¼6=å
¶ä»", example = "1") |
| | | @ExcelColumn(name="è´¹ç¨ç±»åï¼0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=æ¼éï¼3=ä¿è¯éï¼4=æ°´çµè´¹ï¼5=æé¡¹è´¹ï¼6=å
¶ä»") |
| | | @ApiModelProperty(value = "åºæ¶éé¢", example = "1") |
| | | @ExcelColumn(name="åºæ¶éé¢",index = 5,width = 6) |
| | | private BigDecimal receivableFee; |
| | | |
| | | @ApiModelProperty(value = "è´¹ç¨ç±»åï¼0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=ç§èµæ¼éï¼3=ç©ä¸æ¼éï¼4=æ°´çµè´¹ï¼5=æé¡¹è´¹ï¼6=å
¶ä»; 7=ä¿è¯é", example = "1") |
| | | @ExcelColumn(name="è´¹ç¨ç±»å",index = 8,width = 6,valueMapping = "0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=ç§èµæ¼éï¼3=ç©ä¸æ¼é;4=æ°´çµè´¹;5=æé¡¹è´¹ï¼6=å
¶ä»;7=ä¿è¯é;") |
| | | private Integer costType; |
| | | |
| | | @ApiModelProperty(value = "è´¦åç±»åï¼0=æ¶æ¬¾ï¼1=仿¬¾", example = "1") |
| | | @ExcelColumn(name="è´¦åç±»åï¼0=æ¶æ¬¾ï¼1=仿¬¾") |
| | | private Integer billType; |
| | | |
| | | @ApiModelProperty(value = "è´¹ç¨ç±»åï¼0=å¨æè´¹ç¨ï¼1=䏿¬¡æ§è´¹ç¨") |
| | | @TableField(exist = false) |
| | | private Integer feeType; |
| | | |
| | | @ApiModelProperty(value = "æå±å
¬å¸", example = "1") |
| | | @ExcelColumn(name="æå±å
¬å¸") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "仿¬¾ç¶æï¼0=å¾
æ¶æ¬¾ï¼1=å·²ç»æ¸
ï¼2=é¨åç»æ¸
ï¼3=å¾
仿¬¾ï¼4=å¾
鿬¾ï¼5=å·²å
³é") |
| | | @ExcelColumn(name="仿¬¾ç¶æï¼0=å¾
æ¶æ¬¾ï¼1=å·²ç»æ¸
ï¼2=é¨åç»æ¸
ï¼3=å¾
仿¬¾ï¼4=å¾
鿬¾ï¼5=å·²å
³é") |
| | | @ExcelColumn(name="ç»æ¸
ç¶æ",index = 3,width = 6,valueMapping = "0=å¾
æ¶æ¬¾;1=å·²ç»æ¸
;2=é¨åç»æ¸
;3=å¾
仿¬¾;4=å¾
鿬¾;5=å·²å
³é;") |
| | | private Integer payStatus; |
| | | |
| | | @ApiModelProperty(value = "éç§ç±»å 0å°æéç§ 1æ¢æ¿éç§ 2è¿çº¦éç§ 3ååéç§", example = "1") |
| | | @ExcelColumn(name="éç§ç±»å 0å°æéç§ 1æ¢æ¿éç§ 2è¿çº¦éç§ 3ååéç§") |
| | | private Integer btType; |
| | | |
| | | @ApiModelProperty(value = "éç§æä½æ¶é´") |
| | | @ExcelColumn(name="éç§æä½æ¶é´") |
| | | private Date btActDate; |
| | | |
| | | @ApiModelProperty(value = "éç§æä½äººï¼å
³èsystem_user)", example = "1") |
| | | @ExcelColumn(name="éç§æä½äººï¼å
³èsystem_user)") |
| | | private Integer btActUserId; |
| | | |
| | | @ApiModelProperty(value = "éç§åå ") |
| | | @ExcelColumn(name="éç§åå ") |
| | | private String btInfo; |
| | | |
| | | @ApiModelProperty(value = "éç§æ¥æ") |
| | | @ExcelColumn(name="éç§æ¥æ") |
| | | private Date btDate; |
| | | |
| | | @ApiModelProperty(value = "éç§ç»å人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="éç§ç»å人ç¼ç ") |
| | | private Integer btUserId; |
| | | |
| | | @ApiModelProperty(value = "éç§ç¾å°æ¥æ") |
| | | @ExcelColumn(name="éç§ç¾å°æ¥æ") |
| | | private Date btSignDate; |
| | | |
| | | @ApiModelProperty(value = "éç§ç»ç®éé¢å计", example = "1") |
| | | @ExcelColumn(name="éç§ç»ç®éé¢å计") |
| | | private BigDecimal btFee; |
| | | @ApiModelProperty(value = "客æ·åç§°ï¼ä»æ¬¾æ¹ï¼", example = "1") |
| | | @ExcelColumn(name="客æ·åç§°",index = 0,width = 10) |
| | | @TableField(exist = false) |
| | | private String customerName; |
| | | |
| | | @ApiModelProperty(value = "åååç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String contractName; |
| | | |
| | | @ApiModelProperty(value = "å
¬å¸åç§°", example = "1") |
| | | @TableField(exist = false) |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty(value = "åå·æ¥æ", example = "1",hidden = true) |
| | | @TableField(exist = false) |
| | | private String codeDate; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ååç¼å·", example = "1") |
| | | @ExcelColumn(name="ååç¼å·",index = 2,width = 10) |
| | | @TableField(exist = false) |
| | | private String contractCode; |
| | | |
| | | @ApiModelProperty(value = "æ¥¼å®æ¿é´", example = "1") |
| | | @ExcelColumn(name="æ¥¼å®æ¿é´",index = 1,width = 10) |
| | | @TableField(exist = false) |
| | | private String roomPathName; |
| | | |
| | | @ApiModelProperty(value = "计å仿¬¾æ¥ - å¼å§") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date planPayDateStart; |
| | | |
| | | |
| | | @ApiModelProperty(value = "计å仿¬¾æ¥ - ç»æ") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date planPayDateEnd; |
| | | |
| | | @ApiModelProperty(value = "宿¶éé¢") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="宿¶éé¢",index = 6,width = 6) |
| | | private BigDecimal actReceivableFee; |
| | | |
| | | @ApiModelProperty(value = "éæ¶éé¢") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="éæ¶éé¢",index = 7,width = 6) |
| | | private BigDecimal needReceivableFee; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦é¾æï¼0=å¦ï¼1=æ¯") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="æ¯å¦é¾æ",index = 9,width = 6,valueMapping = "0=æªé¾æï¼1=已龿") |
| | | private Integer isOverdue; |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯", example = "1") |
| | | @TableField(exist = false) |
| | | private List<Multifile> multifileList; |
| | | |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯", example = "1") |
| | | @ApiModelProperty(value = "å
³èæ¿é´æ°æ®", example = "1") |
| | | @TableField(exist = false) |
| | | private List<YwContractRoom> ywContractRoomList; |
| | | |
| | | @ApiModelProperty(value = "æ¶æ¯æµæ°´", example = "1") |
| | | @TableField(exist = false) |
| | | private List<YwContractRevenue> ywContractRevenueList; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.constants.OperaType; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import com.doumee.dao.business.vo.EditRecordDataVO; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´ååæ¶æ¯æµæ°´ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/11/25 10:29 |
| | | */ |
| | | @Data |
| | | @ApiModel("è¿ç»´ååæ¶æ¯æµæ°´") |
| | | @TableName("`yw_contract_revenue`") |
| | | public class YwContractRevenue extends LoginUserModel { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="åå»ºæ¥æ",index = 8,width = 10,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0=å¼å¯ï¼1=å
³é", example = "1") |
| | | @ExcelColumn(name="ç¶æ",index = 10,width = 10,valueMapping = "0=å¼å¯;1=å
³é") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "åçéé¢", example = "1") |
| | | @ExcelColumn(name="åçéé¢",index = 5,width = 10) |
| | | private BigDecimal actReceivableFee; |
| | | |
| | | @ApiModelProperty(value = "å®é
仿¬¾æ¥") |
| | | @ExcelColumn(name="å
¥è´¦æ¥æ",index = 7,width = 10,dateFormat = "yyyy-MM-dd") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date actPayDate; |
| | | |
| | | @ApiModelProperty(value = "仿¬¾ç±»åï¼0=ç°éï¼1=ç½é¶è½¬è´¦ï¼2=POSæºï¼3=æ¯ä»å®ï¼4=微信ï¼5=转账æ¯ç¥¨ï¼6=å
¶ä»", example = "1") |
| | | @ExcelColumn(name="æ¶æ¬¾æ¹å¼",index = 6,width = 10,valueMapping = "0=ç°é;1=ç½é¶è½¬è´¦;2=POSæº;3=æ¯ä»å®;4=微信;5=转账æ¯ç¥¨;6=å
¶ä»;") |
| | | private Integer payType; |
| | | |
| | | @ApiModelProperty(value = "æå±å
¬å¸ï¼å
³è companyï¼", example = "1") |
| | | private Integer companyId; |
| | | |
| | | @ApiModelProperty(value = "æ¶æ¯è´¦æ·ï¼å
³èyw_account)", example = "1") |
| | | private Integer accountId; |
| | | |
| | | @ApiModelProperty(value = "åå主é®ï¼å
³èyw_contractï¼", example = "1") |
| | | private Integer contractId; |
| | | |
| | | @ApiModelProperty(value = "è´¦å主é®ï¼å
³èyw_contract_billï¼", example = "1") |
| | | private Integer billId; |
| | | |
| | | @ApiModelProperty(value = "æ¶æ¯ç±»åï¼0=æ¶å
¥ï¼1=æ¯åº", example = "1") |
| | | @ExcelColumn(name="æ¶æ¯ç±»å",index = 4,width = 10,valueMapping = "0=æ¶å
¥;1=æ¯åº") |
| | | private Integer revenueType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "ååç¼å·", example = "1") |
| | | @ExcelColumn(name="ååç¼å·",index = 1,width = 10) |
| | | @TableField(exist = false) |
| | | private String contractCode; |
| | | |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°") |
| | | @TableField(exist = false) |
| | | private String customerNme; |
| | | |
| | | @ApiModelProperty(value = "客æ·åç§°ï¼ä»æ¬¾æ¹ï¼", example = "1") |
| | | @ExcelColumn(name="客æ·åç§°",index = 0,width = 10) |
| | | @TableField(exist = false) |
| | | private String customerName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å建人åç§°") |
| | | @ExcelColumn(name="å建人",index = 9,width = 10) |
| | | private String realname; |
| | | |
| | | @ApiModelProperty(value = "å
³èæ¿é´æ°æ®", example = "1") |
| | | @TableField(exist = false) |
| | | private List<YwContractRoom> ywContractRoomList; |
| | | |
| | | |
| | | @ApiModelProperty(value = "éä»¶ä¿¡æ¯", example = "1") |
| | | @TableField(exist = false) |
| | | private List<Multifile> multifileList; |
| | | |
| | | @ApiModelProperty(value = "å
¥è´¦æ¥æ - å¼å§") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date payDateStart; |
| | | |
| | | @ApiModelProperty(value = "å
¥è´¦æ¥æ - ç»æ") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date payDateEnd; |
| | | |
| | | @ApiModelProperty(value = "æ¥¼å®æ¿é´", example = "1") |
| | | @ExcelColumn(name="æ¿å·",index = 2,width = 10) |
| | | @TableField(exist = false) |
| | | private String roomPathName; |
| | | |
| | | @ApiModelProperty(value = "è´¦åç¼å·", example = "1") |
| | | @ExcelColumn(name="è´¦åç¼å·",index = 3,width = 16) |
| | | @TableField(exist = false) |
| | | private String billCode; |
| | | |
| | | @ApiModelProperty(value = "æä½è®°å½", example = "1") |
| | | @TableField(exist = false) |
| | | private List<EditRecordDataVO> editRecordDataVOList; |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.doumee.core.model.LoginUserModel; |
| | | import io.swagger.annotations.ApiModel; |
| | |
| | | @ExcelColumn(name="æåºç ") |
| | | private Integer sortnum; |
| | | |
| | | @ApiModelProperty(value = "项ç®åç§°") |
| | | @TableField(exist = false) |
| | | private String projectName; |
| | | @ApiModelProperty(value = "楼å®åç§°") |
| | | @TableField(exist = false) |
| | | private String buildingName; |
| | | @ApiModelProperty(value = "楼å±åç§°") |
| | | @TableField(exist = false) |
| | | private String floorName; |
| | | @ApiModelProperty(value = "æ¿é´åç§°") |
| | | @TableField(exist = false) |
| | | private String roomName; |
| | | } |
| | |
| | | @ExcelColumn(name="计ç§é¢ç§¯ï¼å¹³æ¹ç±³ï¼") |
| | | private BigDecimal rentArea; |
| | | |
| | | @ApiModelProperty(value = "æ¥¼å±æ°", example = "1") |
| | | @ExcelColumn(name="æ¥¼å±æ°") |
| | | @ApiModelProperty(value = "楼å±ç¼ç ï¼å
³èyw_floor)", example = "1") |
| | | @ExcelColumn(name="楼å±ç¼ç ") |
| | | private Integer floor; |
| | | |
| | | @ApiModelProperty(value = "æå±é¡¹ç®ç¼ç ï¼å
³èyw_project)", example = "1") |
| | |
| | | @ApiModelProperty(value = "楼å®åç§°") |
| | | @TableField(exist = false) |
| | | private String buildingName; |
| | | @ApiModelProperty(value = "楼å±åç§°") |
| | | @TableField(exist = false) |
| | | private String floorName; |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "æå±æ¿é´ç¼ç ï¼å
³èyw_room)", example = "1") |
| | | @ExcelColumn(name="æå±æ¿é´ç¼ç ï¼å
³èyw_room)") |
| | | private Integer roomId; |
| | | @ApiModelProperty(value = "æå±æ¥¼å±ç¼ç ï¼å
³èyw_floor)", example = "1") |
| | | @ExcelColumn(name="æå±æ¥¼å±ç¼ç ï¼å
³èyw_floor)") |
| | | private Integer floorId; |
| | | |
| | | @ApiModelProperty(value = "ææ¥äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="ææ¥äººç¼ç ") |
| | |
| | | @ApiModelProperty(value = "æ¿æºåç§°") |
| | | @TableField(exist = false) |
| | | private String roomName; |
| | | @ApiModelProperty(value = "楼å±åç§°") |
| | | @TableField(exist = false) |
| | | private String floorName; |
| | | @ApiModelProperty(value = "æ¿å·") |
| | | @TableField(exist = false) |
| | | private String roomNum; |
| | |
| | | @ApiModelProperty(value = "å¤ç人å§å") |
| | | @TableField(exist = false) |
| | | private String dealUserName; |
| | | @ApiModelProperty(value = "ç±»å«åç§°") |
| | | @TableField(exist = false) |
| | | private String categoryName; |
| | | @ApiModelProperty(value = "åé
人å§å") |
| | | @TableField(exist = false) |
| | | private String dispatchUserName; |
| | |
| | | @ApiModelProperty(value = "æä½è®°å½å表") |
| | | @TableField(exist = false) |
| | | private List<YwWorkorderLog> logList; |
| | | @ApiModelProperty(value = "éæ°å¼å§æ¶é´") |
| | | @TableField(exist = false) |
| | | private Date queryStartTime; |
| | | |
| | | @ApiModelProperty(value = "æ¥è¯¢ç»ææ¶é´") |
| | | @TableField(exist = false) |
| | | private Date queryEndTime; |
| | | } |
| | |
| | | @ExcelColumn(name="ç®ä»") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "æä½ç±»å 0å·¥åå建 1ææ´¾ 2å¤ç", example = "1") |
| | | @ExcelColumn(name="æä½ç±»å 0å·¥åå建 1ææ´¾ 2å¤ç") |
| | | @ApiModelProperty(value = "æä½ç±»å 0å·¥åå建 1ææ´¾ 2å¤ç 3ååå建 4åååæ´ 5ååéç§ ", example = "1") |
| | | @ExcelColumn(name="æä½ç±»å 0å·¥åå建 1ææ´¾ 2å¤ç 3ååå建 4åååæ´ 5ååéç§") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "å
³è对象ç¼ç ") |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.doumee.dao.business.model.Approve; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | | * |
| | | * @Author : Rk |
| | | * @create 2024/5/23 14:56 |
| | | */ |
| | | @Data |
| | | public class EditRecordDataVO { |
| | | |
| | | @ApiModelProperty(value = "æä½æ¶é´") |
| | | private Date editTime; |
| | | |
| | | @ApiModelProperty(value = "æä½äºº") |
| | | private String editUserName; |
| | | |
| | | @ApiModelProperty(value = "æä½å¤æ³¨") |
| | | private String editRemark; |
| | | |
| | | } |
| | |
| | | * @return long |
| | | */ |
| | | long count(YwContractBill ywContractBill); |
| | | |
| | | YwContractBill getDetail(Integer id); |
| | | |
| | | /** |
| | | * å¤çè´¦åç¼å· |
| | | */ |
| | | void dealDayBillCode(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.YwContractRevenue; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * è¿ç»´ååæ¶æ¯æµæ°´Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/11/25 10:29 |
| | | */ |
| | | public interface YwContractRevenueService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param ywContractRevenue å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(YwContractRevenue ywContractRevenue); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param ywContractRevenue å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(YwContractRevenue ywContractRevenue); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param ywContractRevenue å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(YwContractRevenue ywContractRevenue); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param ywContractRevenues å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<YwContractRevenue> ywContractRevenues); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return YwContractRevenue |
| | | */ |
| | | YwContractRevenue findById(Integer id); |
| | | |
| | | YwContractRevenue getDetail(Integer id); |
| | | |
| | | void closeRevenue(Integer id, LoginUserInfo loginUserInfo); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param ywContractRevenue å®ä½å¯¹è±¡ |
| | | * @return YwContractRevenue |
| | | */ |
| | | YwContractRevenue findOne(YwContractRevenue ywContractRevenue); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param ywContractRevenue å®ä½å¯¹è±¡ |
| | | * @return List<YwContractRevenue> |
| | | */ |
| | | List<YwContractRevenue> findList(YwContractRevenue ywContractRevenue); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<YwContractRevenue> |
| | | */ |
| | | PageData<YwContractRevenue> findPage(PageWrap<YwContractRevenue> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param ywContractRevenue å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(YwContractRevenue ywContractRevenue); |
| | | } |
| | |
| | | * @return long |
| | | */ |
| | | long count(YwContract ywContract); |
| | | |
| | | Integer backRent(YwContract ywContract); |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.YwContractBillMapper; |
| | | import com.doumee.dao.business.YwContractRoomMapper; |
| | | import com.doumee.dao.business.model.YwContract; |
| | | import com.doumee.dao.business.model.YwContractBill; |
| | | import com.doumee.dao.business.model.YwContractRoom; |
| | | import com.doumee.dao.business.model.YwCustomer; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.service.business.YwContractBillService; |
| | |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¿ç»´ååè´¦åä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Autowired |
| | | private YwContractRevenueMapper ywContractRevenueMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private YwContractMapper ywContractMapper; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public Integer create(YwContractBill ywContractBill) { |
| | | if(Objects.isNull(ywContractBill) |
| | | || Objects.isNull(ywContractBill.getContractId()) |
| | | || Objects.isNull(ywContractBill.getTotleFee()) |
| | | || Objects.isNull(ywContractBill.getPlanPayData()) |
| | | || Objects.isNull(ywContractBill.getPlanPayDate()) |
| | | || Objects.isNull(ywContractBill.getCostType()) |
| | | || Objects.isNull(ywContractBill.getBillType()) |
| | | || Objects.isNull(ywContractBill.getCompanyId()) |
| | | || Objects.isNull(ywContractBill.getStartDate()) |
| | | || Objects.isNull(ywContractBill.getEndDate()) |
| | | || com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywContractBill.getYwContractRoomList()) |
| | | || Objects.nonNull(ywContractBill.getFeeType()) |
| | | || (Constants.equalsInteger(ywContractBill.getFeeType(),Constants.ZERO)&& (Objects.isNull(ywContractBill.getStartDate()) |
| | | || Objects.isNull(ywContractBill.getEndDate()))) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | YwContract ywContract = ywContractMapper.selectById(ywContractBill.getContractId()); |
| | | if(Objects.isNull(ywContract)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(ywContract.getStatus(),Constants.THREE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ååç¶æå·²æµè½¬,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | |
| | | LoginUserInfo loginUserInfo = ywContractBill.getLoginUserInfo(); |
| | | ywContractBill.setReceivableFee(ywContractBill.getTotleFee()); |
| | | ywContractBill.setCreateDate(new Date()); |
| | | ywContractBill.setCreator(loginUserInfo.getId()); |
| | | ywContractBill.setIsdeleted(Constants.ZERO); |
| | | ywContractBill.setType(Constants.ONE); |
| | | ywContractBill.setStatus(Constants.ZERO); |
| | | ywContractBillMapper.insert(ywContractBill); |
| | | |
| | | //æ¿æºæ°æ® |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBill.getYwContractRoomList())){ |
| | | for (YwContractRoom ywContractRoom:ywContractBill.getYwContractRoomList()) { |
| | | if(Objects.isNull(ywContractRoom) |
| | |
| | | ywContractRoom.setIsdeleted(Constants.ZERO); |
| | | ywContractRoom.setContractId(ywContractBill.getId()); |
| | | ywContractRoom.setType(Constants.ONE); |
| | | |
| | | } |
| | | ywContractRoomMapper.insert(ywContractBill.getYwContractRoomList()); |
| | | } |
| | | |
| | | //éä»¶æ°æ® |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBill.getMultifileList())){ |
| | | for (Multifile multifile:ywContractBill.getMultifileList()) { |
| | | if(Objects.isNull(multifile) |
| | |
| | | multifile.setCreator(loginUserInfo.getId()); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjType(Constants.MultiFile.FN_PATROL_POINT_FILE.getKey()); |
| | | multifile.setObjType(Constants.MultiFile.FN_CONTRACT_BILL_FILE.getKey()); |
| | | multifile.setObjId(ywContractBill.getId()); |
| | | } |
| | | multifileMapper.insert(ywContractBill.getMultifileList()); |
| | |
| | | return ywContractBillMapper.selectById(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public YwContractBill getDetail(Integer id) { |
| | | YwContractBill ywContractBill = ywContractBillMapper.selectJoinOne(YwContractBill.class, |
| | | new MPJLambdaWrapper<YwContractBill>().selectAll(YwContractBill.class) |
| | | .select(" ( select ifnull(sum(yw.ACT_RECEIVABLE_FEE),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ") |
| | | .selectAs(YwContract::getCode,YwContractBill::getContractCode) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContractBill::getId,id)); |
| | | if(Objects.isNull(ywContractBill)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | |
| | | //æ¿æºæ°æ® |
| | | ywContractBill.setYwContractRoomList(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) |
| | | .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(YwContractRoom::getContractId,id) |
| | | .eq(YwContractRoom::getType,Constants.ONE) |
| | | )); |
| | | |
| | | //éä»¶æ°æ® |
| | | List<Multifile> multifileList = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId,id) |
| | | .eq(Multifile::getObjType,Constants.MultiFile.FN_CONTRACT_BILL_FILE.getKey())); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(multifileList)){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_CONTRACT_BILL).getCode(); |
| | | for (Multifile multifile:multifileList) { |
| | | if(StringUtils.isNotBlank(multifile.getFileurl())){ |
| | | multifile.setFileurlFull(path + multifile.getFileurl()); |
| | | } |
| | | } |
| | | ywContractBill.setMultifileList(multifileList); |
| | | } |
| | | return ywContractBill; |
| | | } |
| | | |
| | | @Override |
| | | public YwContractBill findOne(YwContractBill ywContractBill) { |
| | | QueryWrapper<YwContractBill> wrapper = new QueryWrapper<>(ywContractBill); |
| | |
| | | IPage<YwContractBill> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwContractBill> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwContractBill model = pageWrap.getModel(); |
| | | IPage<YwContractBill> iPage = ywContractBillMapper.selectJoinPage(page,YwContractBill.class, |
| | | queryWrapper.selectAll(YwContractBill.class) |
| | | .select(" ( select ifnull(sum(yw.ACT_RECEIVABLE_FEE),0) from yw_contract_revenue yw where yw.bill_id = t.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee ") |
| | | .selectAs(YwContract::getCode,YwContractBill::getContractCode) |
| | | .selectAs(YwCustomer::getName,YwContractBill::getCustomerName) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getCustomerName()), |
| | | YwCustomer::getName,model.getCustomerName()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getStatus()), |
| | | YwContractBill::getStatus,model.getStatus()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getPayStatus()), |
| | | YwContractBill::getPayStatus,model.getPayStatus()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getType()), |
| | | YwContractBill::getType,model.getType()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getContractId()), |
| | | YwContractBill::getContractId,model.getContractId()) |
| | | .ge(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateStart()),YwContractBill::getPlanPayDate, Utils.Date.getStart(model.getPlanPayDateStart())) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getPlanPayDateEnd()),YwContractBill::getPlanPayDate, Utils.Date.getEnd(model.getPlanPayDateEnd())) ) |
| | | ; |
| | | |
| | | return PageData.from(ywContractBillMapper.selectPage(page, queryWrapper)); |
| | | this.dealRoomDetail(iPage.getRecords()); |
| | | for (YwContractBill ywContractBill:iPage.getRecords()) { |
| | | //éæ¶éé¢ |
| | | ywContractBill.setNeedReceivableFee( |
| | | ywContractBill.getReceivableFee().subtract(ywContractBill.getActReceivableFee()) |
| | | ); |
| | | //æ¯å¦é¾æ |
| | | if(Constants.equalsInteger(ywContractBill.getStatus(),Constants.ZERO) && (Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ZERO) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.TWO) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.THREE) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.FOUR)) |
| | | && ywContractBill.getEndDate().getTime() < System.currentTimeMillis()){ |
| | | ywContractBill.setIsOverdue(Constants.ONE); |
| | | }else{ |
| | | ywContractBill.setIsOverdue(Constants.ZERO); |
| | | } |
| | | //楼å®åç§° |
| | | List<YwContractRoom> ywContractRoomList = ywContractBill.getYwContractRoomList(); |
| | | StringBuilder roomPathName = new StringBuilder(); |
| | | for (YwContractRoom ywContractRoom:ywContractRoomList) { |
| | | if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){ |
| | | roomPathName.append(ywContractRoom.getProjectName()); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){ |
| | | roomPathName.append(ywContractRoom.getBuildingName()); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){ |
| | | roomPathName.append(ywContractRoom.getFloorName()); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){ |
| | | roomPathName.append(ywContractRoom.getRoomName()); |
| | | } |
| | | if(StringUtils.isNotBlank(roomPathName)){ |
| | | roomPathName.append(";"); |
| | | } |
| | | } |
| | | ywContractBill.setRoomPathName(roomPathName.toString()); |
| | | } |
| | | |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | public void dealRoomDetail(List<YwContractBill> ywContractBillList){ |
| | | //æ¥è¯¢è´¦åä¸çæ¥¼å®æ°æ® |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBillList)){ |
| | | //è·åæææ°æ® |
| | | List<Integer> billIdList = ywContractBillList.stream().map(i->i.getId()).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(billIdList)){ |
| | | 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) |
| | | .in(YwContractRoom::getContractId,billIdList) |
| | | .eq(YwContractRoom::getType,Constants.ONE) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){ |
| | | for (YwContractBill ywContractBill:ywContractBillList) { |
| | | ywContractBill.setYwContractRoomList( |
| | | ywContractRoomList.stream().filter(i->Constants.equalsInteger(i.getContractId(),ywContractBill.getId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public long count(YwContractBill ywContractBill) { |
| | | QueryWrapper<YwContractBill> wrapper = new QueryWrapper<>(ywContractBill); |
| | | return ywContractBillMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void dealDayBillCode(){ |
| | | List<YwContractBill> ywContractBillList = ywContractBillMapper.selectJoinList(YwContractBill.class, |
| | | new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class) |
| | | .select(" DATE(CREATE_DATE) as codeDate") |
| | | .isNull(YwContractBill::getCode) |
| | | .orderByAsc(YwContractBill::getId) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBillList)){ |
| | | List<String> codeDateList = ywContractBillList.stream().map(i->i.getCodeDate()).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(codeDateList)){ |
| | | Set<String> codeDateSet = new HashSet<String>(codeDateList); |
| | | for (String codeDate:codeDateSet) { |
| | | //è·åå½åæ¥æçæ°æ® |
| | | List<YwContractBill> codeDateBillList = |
| | | ywContractBillList.stream().filter(i->i.getCodeDate().equals(codeDate)).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(codeDateBillList)){ |
| | | continue; |
| | | } |
| | | //æ¥è¯¢æå¤§çåå· |
| | | YwContractBill ywContractBill = ywContractBillMapper.selectOne(new QueryWrapper<YwContractBill>().lambda() |
| | | .isNotNull(YwContractBill::getCode) |
| | | .apply(" CREATE_DATE like '"+codeDate+"%' ") |
| | | .orderByDesc(YwContractBill::getId) |
| | | ); |
| | | Integer maxCode = Constants.ONE; |
| | | if(Objects.nonNull(ywContractBill)){ |
| | | maxCode = Integer.valueOf(ywContractBill.getCode().replace("ZD"+codeDate,"")); |
| | | } |
| | | for (YwContractBill contractBill:codeDateBillList) { |
| | | maxCode = maxCode + 1; |
| | | contractBill.setCode("ZD" + codeDate + "-" + StringUtils.leftPad(maxCode.toString() , 4,"0")); |
| | | ywContractBillMapper.update(null, new UpdateWrapper<YwContractBill>().lambda().set(YwContractBill::getCode,contractBill.getCode()) |
| | | .eq(YwContractBill::getId,ywContractBill.getId())); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.dao.CompanyMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.vo.EditRecordDataVO; |
| | | import com.doumee.dao.system.MultifileMapper; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.Multifile; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.YwContractRevenueService; |
| | | 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.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * è¿ç»´ååæ¶æ¯æµæ°´Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2024/11/25 10:29 |
| | | */ |
| | | @Service |
| | | public class YwContractRevenueServiceImpl implements YwContractRevenueService { |
| | | |
| | | @Autowired |
| | | private YwContractRevenueMapper ywContractRevenueMapper; |
| | | |
| | | @Autowired |
| | | private YwContractBillMapper ywContractBillMapper; |
| | | |
| | | @Autowired |
| | | private YwContractMapper ywContractMapper; |
| | | |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | |
| | | @Autowired |
| | | private YwAccountMapper ywAccountMapper; |
| | | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | |
| | | @Autowired |
| | | private YwContractRoomMapper ywContractRoomMapper; |
| | | |
| | | @Autowired |
| | | private SystemUserMapper systemUserMapper; |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {Exception.class,BusinessException.class}) |
| | | public Integer create(YwContractRevenue ywContractRevenue) { |
| | | if(Objects.isNull(ywContractRevenue) |
| | | || Objects.isNull(ywContractRevenue.getActReceivableFee()) |
| | | || Objects.isNull(ywContractRevenue.getActPayDate()) |
| | | || Objects.isNull(ywContractRevenue.getPayType()) |
| | | || Objects.isNull(ywContractRevenue.getCompanyId()) |
| | | || Objects.isNull(ywContractRevenue.getAccountId()) |
| | | || Objects.isNull(ywContractRevenue.getBillId()) |
| | | || ywContractRevenue.getActReceivableFee().compareTo(BigDecimal.ZERO) <= Constants.ZERO |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | YwContractBill ywContractBill = ywContractBillMapper.selectById(ywContractRevenue.getBillId()); |
| | | if(Objects.isNull(ywContractBill)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°è´¦åä¿¡æ¯"); |
| | | } |
| | | if(!Constants.equalsInteger(ywContractBill.getStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è´¦åç¶æå·²æµè½¬,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | if(!(Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ZERO) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.TWO) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.THREE) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.FOUR) |
| | | )){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è´¦åç»æ¸
ç¶æå·²æµè½¬,æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | Company company =companyMapper.selectById(ywContractRevenue.getCompanyId()); |
| | | if(Objects.isNull(company)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°æå±å
¬å¸ä¿¡æ¯"); |
| | | } |
| | | YwAccount ywAccount =ywAccountMapper.selectById(ywContractRevenue.getAccountId()); |
| | | if(Objects.isNull(ywAccount)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°æ¶æ¯è´¦æ·ä¿¡æ¯"); |
| | | } |
| | | LoginUserInfo loginUserInfo = ywContractRevenue.getLoginUserInfo(); |
| | | ywContractRevenue.setCreateDate(new Date()); |
| | | ywContractRevenue.setCreator(loginUserInfo.getId()); |
| | | ywContractRevenue.setIsdeleted(Constants.ZERO); |
| | | ywContractRevenue.setStatus(Constants.ZERO); |
| | | ywContractRevenue.setContractId(ywContractBill.getContractId()); |
| | | //æ ¹æ®æ¶æ¯æ
åµ æ´æ°è´¦åæ°æ® |
| | | //æ¥è¯¢å½åè´¦åä¸ å·²æ¯ä»çè´¹ç¨ |
| | | List<YwContractRevenue> ywContractRevenueList = ywContractRevenueMapper.selectList(new QueryWrapper<YwContractRevenue>().lambda().eq(YwContractRevenue::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContractRevenue::getStatus,Constants.ZERO) |
| | | ); |
| | | //å·²æ¯ä»éé¢ |
| | | BigDecimal payTotal = BigDecimal.ZERO; |
| | | //å¾
æ¯ä»éé¢ |
| | | BigDecimal waitPayTotal = BigDecimal.ZERO; |
| | | //æ 仿¬¾è®°å½ åä¸ºåæ¬¡æ¯ä» æ ¹æ®è´¦åç±»å å¤ææ¯æ¯åº / æ¶å
¥ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywContractRevenueList)){ |
| | | ywContractRevenue.setRevenueType(ywContractBill.getType()); |
| | | if(ywContractRevenue.getActReceivableFee().compareTo(ywContractBill.getReceivableFee())>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"请è¾å
¥æ£ç¡®çéé¢ï¼"); |
| | | }else if(ywContractRevenue.getActReceivableFee().compareTo(ywContractBill.getReceivableFee())==Constants.ZERO){ |
| | | ywContractBill.setPayStatus(Constants.ONE); |
| | | }else{ |
| | | ywContractBill.setPayStatus(Constants.TWO); |
| | | } |
| | | }else{ |
| | | //è·åå·²æ¯ä»çæ»éé¢ ï¼å¯è½ææ¶å
¥ ææ¯åºï¼ |
| | | payTotal = ywContractRevenueList.stream().map(i->i.getActReceivableFee().multiply( |
| | | BigDecimal.valueOf(Constants.equalsInteger(ywContractRevenue.getRevenueType(),Constants.ZERO)?Constants.ONE:-Constants.ONE)) |
| | | ).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | //è·åå¾
æ¯ä»æ¬¾éé¢ å¦æè´¦åç±»å为æ¯åº æ ï¼è´¦åç±»å为æ¶å
¥ ä¸ å¾
æ¯ä»éé¢ å°äº 0ï¼ å为æ¯ä» |
| | | waitPayTotal = ywContractBill.getReceivableFee().subtract(payTotal); |
| | | //妿å¾
æ¯ä»éé¢ å¤§äº 0 忝 æ¶å
¥ å¦åæ¯æ¯åº å
¶ä»ç¶æ 为å¼å¸¸ï¼ |
| | | if(waitPayTotal.compareTo(BigDecimal.ZERO)>Constants.ZERO){ |
| | | ywContractRevenue.setRevenueType(Constants.ZERO); |
| | | }else if(waitPayTotal.compareTo(BigDecimal.ZERO)<Constants.ZERO){ |
| | | ywContractRevenue.setRevenueType(Constants.ONE); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æ¶æ¯éé¢å¼å¸¸!请è系管çå"); |
| | | } |
| | | //å¾
æ¯ä»çæµæ°´ å¦æä¸ºæ¶å
¥ 忝坹 éé¢å¼ å¦ææ¯æ¯åº åè·åç»å¯¹å¼ è¿è¡å¯¹æ¯ |
| | | if(Constants.equalsInteger(ywContractRevenue.getRevenueType(),Constants.ZERO)){ |
| | | //妿æ¯ä»éé¢ å¤§äº å¾
æ¯ä»éé¢ åæç¤ºå¼å¸¸ 妿æ¯ä»éé¢å°äº å¾
æ¯ä»éé¢ åç¶æä¸åå å
¶ä»ç¶æ å¼å¸¸ |
| | | if(waitPayTotal.compareTo(ywContractRevenue.getActReceivableFee())>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"请è¾å
¥æ£ç¡®çéé¢ï¼"); |
| | | }else if(waitPayTotal.compareTo(ywContractRevenue.getActReceivableFee())==Constants.ZERO){ |
| | | ywContractBill.setPayStatus(Constants.ONE); |
| | | } |
| | | }else{ |
| | | waitPayTotal = waitPayTotal.abs(); |
| | | if(waitPayTotal.compareTo(ywContractRevenue.getActReceivableFee())>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"请è¾å
¥æ£ç¡®çéé¢ï¼"); |
| | | }else if(waitPayTotal.compareTo(ywContractRevenue.getActReceivableFee())==Constants.ZERO){ |
| | | ywContractBill.setPayStatus(Constants.ONE); |
| | | } |
| | | } |
| | | } |
| | | ywContractRevenueMapper.insert(ywContractRevenue); |
| | | ywContractBillMapper.updateById(ywContractBill); |
| | | //åå¨éä»¶ä¿¡æ¯ |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRevenue.getMultifileList())){ |
| | | for (Multifile multifile:ywContractRevenue.getMultifileList()) { |
| | | if(Objects.isNull(multifile) |
| | | || StringUtils.isBlank(multifile.getFileurl()) |
| | | || StringUtils.isBlank(multifile.getName())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"éä»¶ä¿¡æ¯é误"); |
| | | } |
| | | multifile.setCreator(loginUserInfo.getId()); |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjType(Constants.MultiFile.FN_CONTRACT_REVENUE_FILE.getKey()); |
| | | multifile.setObjId(ywContractRevenue.getId()); |
| | | } |
| | | multifileMapper.insert(ywContractRevenue.getMultifileList()); |
| | | } |
| | | return ywContractRevenue.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | ywContractRevenueMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(YwContractRevenue ywContractRevenue) { |
| | | UpdateWrapper<YwContractRevenue> deleteWrapper = new UpdateWrapper<>(ywContractRevenue); |
| | | ywContractRevenueMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | ywContractRevenueMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(YwContractRevenue ywContractRevenue) { |
| | | ywContractRevenueMapper.updateById(ywContractRevenue); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<YwContractRevenue> ywContractRevenues) { |
| | | if (CollectionUtils.isEmpty(ywContractRevenues)) { |
| | | return; |
| | | } |
| | | for (YwContractRevenue ywContractRevenue: ywContractRevenues) { |
| | | this.updateById(ywContractRevenue); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public YwContractRevenue findById(Integer id) { |
| | | return ywContractRevenueMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public YwContractRevenue getDetail(Integer id) { |
| | | YwContractRevenue ywContractRevenue = ywContractRevenueMapper.selectJoinOne( |
| | | YwContractRevenue.class, |
| | | new MPJLambdaWrapper<YwContractRevenue>().selectAll(YwContractRevenue.class) |
| | | .selectAs(YwContractBill::getCode,YwContractRevenue::getBillCode) |
| | | .selectAs(YwContract::getCode,YwContractRevenue::getContractCode) |
| | | .selectAs(YwCustomer::getName,YwContractRevenue::getCustomerName) |
| | | .selectAs(SystemUser::getRealname,YwContractRevenue::getRealname) |
| | | .leftJoin(YwContractBill.class,YwContractBill::getId,YwContractRevenue::getBillId) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwContractRevenue::getCreator) |
| | | .eq(YwContractRevenue::getId,id) |
| | | ); |
| | | |
| | | this.getRecordData(ywContractRevenue); |
| | | |
| | | return ywContractRevenue; |
| | | } |
| | | |
| | | /** |
| | | * æä½è®°å½ |
| | | * @param ywContractRevenue |
| | | */ |
| | | public void getRecordData(YwContractRevenue ywContractRevenue){ |
| | | List<EditRecordDataVO> editRecordDataVOList = new ArrayList(); |
| | | //æ¨¡ææµæ°´è®°å½ |
| | | if(Objects.nonNull(ywContractRevenue.getCreateDate())){ |
| | | EditRecordDataVO editRecordDataVO = new EditRecordDataVO(); |
| | | editRecordDataVO.setEditRemark("åå»ºæµæ°´"); |
| | | editRecordDataVO.setEditTime(ywContractRevenue.getCreateDate()); |
| | | SystemUser createUser = systemUserMapper.selectById(ywContractRevenue.getCreator()); |
| | | if(Objects.nonNull(createUser)){ |
| | | editRecordDataVO.setEditUserName(createUser.getRealname()); |
| | | } |
| | | editRecordDataVOList.add(editRecordDataVO); |
| | | } |
| | | if(Objects.nonNull(ywContractRevenue.getEditor())){ |
| | | EditRecordDataVO editRecordDataVO = new EditRecordDataVO(); |
| | | editRecordDataVO.setEditRemark("å
³éæµæ°´"); |
| | | editRecordDataVO.setEditTime(ywContractRevenue.getEditDate()); |
| | | SystemUser closeUser = systemUserMapper.selectById(ywContractRevenue.getEditor()); |
| | | if(Objects.nonNull(closeUser)){ |
| | | editRecordDataVO.setEditUserName(closeUser.getRealname()); |
| | | } |
| | | editRecordDataVOList.add(editRecordDataVO); |
| | | } |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(editRecordDataVOList)){ |
| | | ywContractRevenue.setEditRecordDataVOList(editRecordDataVOList); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void closeRevenue(Integer id,LoginUserInfo loginUserInfo) { |
| | | YwContractRevenue ywContractRevenue = ywContractRevenueMapper.selectById(id); |
| | | if(Objects.isNull(ywContractRevenue)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | YwContractBill ywContractBill = ywContractBillMapper.selectById(ywContractRevenue.getBillId()); |
| | | if(Objects.isNull(ywContractBill)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | YwContract ywContract = ywContractMapper.selectById(ywContractBill.getContractId()); |
| | | if(Objects.isNull(ywContract)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | if(Constants.equalsInteger(ywContract.getStatus(),Constants.THREE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ååç¶æå·²æµè½¬,æ æ³æä½"); |
| | | } |
| | | if(Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ONE) |
| | | || Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.TWO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"è´¦åç¶æå·²æµè½¬,æ æ³æä½"); |
| | | } |
| | | //æ¥è¯¢è´¦åä¸ ææçè´¦å |
| | | List<YwContractRevenue> ywContractRevenueList = ywContractRevenueMapper.selectList(new QueryWrapper<YwContractRevenue>().lambda().eq(YwContractRevenue::getStatus,Constants.ZERO) |
| | | .eq(YwContractRevenue::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContractRevenue::getBillId,ywContractRevenue.getBillId()) |
| | | .ne(YwContractRevenue::getId,id) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(ywContractRevenueList)){ |
| | | //æ å
¶ä»æµæ°´è®°å½ æ ¹æ®è´¦åå建类å åæ´ç¶æ |
| | | //èªå»ºè´¦å æ ¹æ®è´¦åæ¶æ¯ç±»åè¿è¡ åæ´ç¶æ |
| | | if(Constants.equalsInteger(ywContractBill.getType(),Constants.ONE)){ |
| | | if(Constants.equalsInteger(ywContractBill.getBillType(),Constants.ZERO)){ |
| | | ywContractBill.setPayStatus(Constants.ZERO); |
| | | }else{ |
| | | ywContractBill.setPayStatus(Constants.THREE); |
| | | } |
| | | }else{ |
| | | //ååè´¦å å为 å¾
æ¶æ¬¾ |
| | | ywContractBill.setPayStatus(Constants.ZERO); |
| | | } |
| | | }else{ |
| | | //åå¨å
¶ä»æµæ°´ åç»ä¸åæ´ä¸º é¨åç»ç® |
| | | ywContractBill.setPayStatus(Constants.TWO); |
| | | } |
| | | |
| | | ywContractBillMapper.update(null,new UpdateWrapper<YwContractBill>().lambda() |
| | | .set(YwContractBill::getPayStatus,ywContractBill.getPayStatus()) |
| | | .set(YwContractBill::getEditor,loginUserInfo.getId()) |
| | | .set(YwContractBill::getEditDate," now() ") |
| | | .eq(YwContractBill::getId,ywContractBill.getId()) |
| | | ); |
| | | |
| | | ywContractRevenueMapper.update(null,new UpdateWrapper<YwContractRevenue>().lambda() |
| | | .set(YwContractRevenue::getStatus,Constants.ONE) |
| | | .set(YwContractRevenue::getEditor,loginUserInfo.getId()) |
| | | .set(YwContractRevenue::getEditDate," now() ") |
| | | .eq(YwContractRevenue::getId,id)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public YwContractRevenue findOne(YwContractRevenue ywContractRevenue) { |
| | | QueryWrapper<YwContractRevenue> wrapper = new QueryWrapper<>(ywContractRevenue); |
| | | return ywContractRevenueMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<YwContractRevenue> findList(YwContractRevenue ywContractRevenue) { |
| | | List<YwContractRevenue> ywContractRevenueList = ywContractRevenueMapper.selectJoinList(YwContractRevenue.class,new MPJLambdaWrapper<YwContractRevenue>() |
| | | .selectAll(YwContractRevenue.class) |
| | | .selectAs(YwCustomer::getName,YwContractRevenue::getCustomerNme) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractRevenue::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .eq(YwContractRevenue::getStatus,Constants.ZERO) |
| | | .eq(Objects.nonNull(ywContractRevenue) && Objects.nonNull(ywContractRevenue.getBillId()),YwContractRevenue::getBillId,ywContractRevenue.getBillId()) |
| | | ); |
| | | return ywContractRevenueList; |
| | | } |
| | | |
| | | @Override |
| | | public PageData<YwContractRevenue> findPage(PageWrap<YwContractRevenue> pageWrap) { |
| | | IPage<YwContractRevenue> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwContractRevenue> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | YwContractRevenue model = pageWrap.getModel(); |
| | | IPage<YwContractRevenue> iPage = ywContractRevenueMapper.selectJoinPage(page,YwContractRevenue.class, |
| | | queryWrapper.selectAll(YwContractRevenue.class) |
| | | .selectAs(YwContractBill::getCode,YwContractRevenue::getBillCode) |
| | | .selectAs(YwContract::getCode,YwContractRevenue::getContractCode) |
| | | .selectAs(YwCustomer::getName,YwContractRevenue::getCustomerName) |
| | | .selectAs(SystemUser::getRealname,YwContractRevenue::getRealname) |
| | | .leftJoin(YwContractBill.class,YwContractBill::getId,YwContractRevenue::getBillId) |
| | | .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwContractRevenue::getCreator) |
| | | .eq(YwContractRevenue::getIsdeleted,Constants.ZERO) |
| | | .like(Objects.nonNull(model)&&StringUtils.isNotBlank(model.getCustomerNme()), |
| | | YwCustomer::getName,model.getCustomerNme()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getPayType()), |
| | | YwContractRevenue::getPayType,model.getPayType()) |
| | | .eq(Objects.nonNull(model)&&Objects.nonNull(model.getRevenueType()), |
| | | YwContractRevenue::getRevenueType,model.getRevenueType()) |
| | | .ge(Objects.nonNull(model)&&Objects.nonNull(model.getPayDateStart()),YwContractRevenue::getActPayDate, Utils.Date.getStart(model.getPayDateStart())) |
| | | .le(Objects.nonNull(model)&&Objects.nonNull(model.getPayDateEnd()),YwContractRevenue::getActPayDate, Utils.Date.getEnd(model.getPayDateEnd())) ) |
| | | ; |
| | | |
| | | this.dealRoomDetail(iPage.getRecords()); |
| | | |
| | | for (YwContractRevenue ywContractRevenue:iPage.getRecords()) { |
| | | //楼å®åç§° |
| | | List<YwContractRoom> ywContractRoomList = ywContractRevenue.getYwContractRoomList(); |
| | | StringBuilder roomPathName = new StringBuilder(); |
| | | for (YwContractRoom ywContractRoom:ywContractRoomList) { |
| | | if(StringUtils.isNotBlank(ywContractRoom.getProjectName())){ |
| | | roomPathName.append(ywContractRoom.getProjectName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getBuildingName())){ |
| | | roomPathName.append(ywContractRoom.getBuildingName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getFloorName())){ |
| | | roomPathName.append(ywContractRoom.getFloorName()+"/"); |
| | | } |
| | | if(StringUtils.isNotBlank(ywContractRoom.getRoomName())){ |
| | | roomPathName.append(ywContractRoom.getRoomName()); |
| | | } |
| | | if(StringUtils.isNotBlank(roomPathName)){ |
| | | roomPathName.append(";"); |
| | | } |
| | | } |
| | | ywContractRevenue.setRoomPathName(roomPathName.toString()); |
| | | } |
| | | return PageData.from(iPage); |
| | | } |
| | | |
| | | |
| | | public void dealRoomDetail(List<YwContractRevenue> ywContractRevenueList){ |
| | | //æ¥è¯¢è´¦åä¸çæ¥¼å®æ°æ® |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRevenueList)){ |
| | | //è·åæææ°æ® |
| | | List<Integer> billIdList = ywContractRevenueList.stream().map(i->i.getBillId()).collect(Collectors.toList()); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(billIdList)){ |
| | | 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) |
| | | .in(YwContractRoom::getContractId,billIdList) |
| | | .eq(YwContractRoom::getType,Constants.ONE) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractRoomList)){ |
| | | for (YwContractRevenue ywContractRevenue:ywContractRevenueList) { |
| | | ywContractRevenue.setYwContractRoomList( |
| | | ywContractRoomList.stream().filter(i->Constants.equalsInteger(i.getContractId(),ywContractRevenue.getBillId())).collect(Collectors.toList()) |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public long count(YwContractRevenue ywContractRevenue) { |
| | | QueryWrapper<YwContractRevenue> wrapper = new QueryWrapper<>(ywContractRevenue); |
| | | return ywContractRevenueMapper.selectCount(wrapper); |
| | | } |
| | | } |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | @Autowired |
| | | private MultifileMapper multifileMapper; |
| | | @Autowired |
| | | private YwWorkorderLogMapper ywWorkorderLogMapper; |
| | | @Autowired |
| | | private CompanyMapper companyMapper; |
| | | @Autowired |
| | | private YwProjectMapper projectMapper; |
| | |
| | | @Autowired |
| | | private MemberMapper memberMapper; |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer create(YwContract model) { |
| | | isParamValidCreated(model); |
| | | |
| | | model.setCreator(model.getLoginUserInfo().getId()); |
| | | model.setIsdeleted(Constants.ZERO); |
| | | model.setCreateDate(new Date()); |
| | |
| | | model.setEditDate(model.getCreateDate()); |
| | | model.setEditor(model.getCreator()); |
| | | model.setStatus(Constants.ZERO);//å¾
æ§è¡ |
| | | model.setRemark(getRemarlByParam(model)); |
| | | ywContractMapper.insert(model); |
| | | dealDetailListBiz(model);//å¤çæ¡æ¬¾ä¿¡æ¯ |
| | | dealMultifileBiz(model);//å¤çéä»¶ä¿¡æ¯ |
| | | dealLogBiz(model,Constants.YwLogType.CONTRACT_CREATE,null,null);//è®°å½æ°å»ºæ¥å¿ |
| | | return model.getId(); |
| | | } |
| | | |
| | | private String getRemarlByParam(YwContract model) { |
| | | |
| | | String str = ""; |
| | | YwContractDetail zl = model.getZlDetailList()!=null&&model.getZlDetailList().size()>0?model.getZlDetailList().get(0):null; |
| | | YwContractDetail yw = model.getWyDetailList()!=null&&model.getWyDetailList().size()>0?model.getWyDetailList().get(0):null; |
| | | //èµ·ç§æ¥2024/06/01ï¼ç§èµæ°ä¸º500ã¡ã馿ç§èµä¸æä¸ä»ï¼ç§éåä»·35å
/ã¡Â·æã馿ç©ä¸ä¸æä¸ä»ï¼ç©ä¸åä»·4.3å
/ã¡Â·æ |
| | | String str0 = "ååæè¦ï¼èµ·ç§æ¥{param1}ï¼ç§èµæ°ä¸º{param2}ã¡ã馿ç§èµ{param3}ï¼ç§éåä»·{param4}å
{param5}ã馿ç©ä¸{param6}ï¼ç©ä¸åä»·{param7}{param8}"; |
| | | String str1 = "ååæè¦ï¼èµ·ç§æ¥{param1}ï¼ç§èµæ°ä¸º{param2}ã¡ã馿ç§èµ{param3}ï¼ç§éåä»·{param4}å
{param5}ã"; |
| | | String str2 = "ååæè¦ï¼èµ·ç§æ¥{param1}ï¼é¦æç©ä¸{param6}ï¼ç©ä¸åä»·{param7}å
{param8}"; |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO)){ |
| | | str= str0; |
| | | } |
| | | if(Constants.equalsInteger(model.getType(),Constants.ONE)){ |
| | | str= str1; |
| | | } |
| | | if(Constants.equalsInteger(model.getType(),Constants.TWO)){ |
| | | str= str2; |
| | | } |
| | | str = str.replace("{param1}",DateUtil.getDateLongSlash(model.getStartDate())) |
| | | .replace("{param2}",model.getTotalArea().intValue()+"") |
| | | .replace("{param3}",getPayTypeByNum(model.getZlPayType())) |
| | | .replace("{param4}",zl!=null&&zl.getPrice()!=null?(zl.getPrice().intValue()+""):"0") |
| | | .replace("{param5}",getPayTypeByNum(model.getWyPayType())) |
| | | .replace("{param6}",getUnitTypeByNum(zl)) |
| | | .replace("{param7}",zl!=null&&yw.getPrice()!=null?(zl.getPrice().intValue()+""):"0") |
| | | .replace("{param8}",getUnitTypeByNum(yw)); |
| | | return str; |
| | | } |
| | | private String getbackRentRemarkByParam(YwContract model) { |
| | | BigDecimal fee = Constants.formatBigdecimal(model.getBtFee()); |
| | | String str = "éç§æè¦ï¼å©ä½æªç»æ¸
è´¦å{param1}份ï¼å
³éè´¦å{param2}份ãéç§æ¥{param3}ï¼éç§è´¹ç¨å计é{param4}{param5}å
ãã"; |
| | | str = str.replace("{param1}",model.getBtWaitBill()+"") |
| | | .replace("{param2}",DateUtil.getDateLongSlash(model.getBtDate())) |
| | | .replace("{param3}",fee.compareTo(new BigDecimal(0)) >=0?"æ¶":"ä»") |
| | | .replace("{param4}",(fee.compareTo(new BigDecimal(0)) >=0? |
| | | Constants.formatBigdecimal(model.getBtFee()).intValue() |
| | | :(Constants.formatBigdecimal(model.getBtFee()).intValue() * -1))+"" ); |
| | | 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 "䏿¬¡æ§ä»æ¬¾"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * éç§æäº¤ |
| | | * @param param |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer backRent(YwContract param){ |
| | | isParamValidBackRent(param); |
| | | param.setEditDate(new Date()); |
| | | param.setEditor(param.getLoginUserInfo().getId()); |
| | | //å¤ç |
| | | dealBackRentBillBiz(param); |
| | | YwContract update = new YwContract(); |
| | | update.setEditDate(new Date()); |
| | | update.setEditor(param.getLoginUserInfo().getId()); |
| | | update.setBtActDate(update.getEditDate()); |
| | | update.setBtActUserId(update.getEditor()); |
| | | update.setStatus(Constants.THREE); |
| | | update.setBtInfo(param.getBtInfo()); |
| | | update.setBtDate(param.getBtDate()); |
| | | update.setBtType(param.getBtType()); |
| | | update.setBtUserId(param.getBtUserId()); |
| | | update.setBtFee(param.getBtFee()); |
| | | update.setBtRemark(getbackRentRemarkByParam(param)); |
| | | ywContractMapper.updateById(update); |
| | | dealLogBiz(param,Constants.YwLogType.CONTRACT_BACK,null,null); |
| | | return param.getId(); |
| | | } |
| | | |
| | | private void dealBackRentBillBiz(YwContract param) { |
| | | //æ¥è¯¢ååå
¨é¨è´¦åä¿¡æ¯ |
| | | List<YwContractBill> closeBills = new ArrayList<>();//带å
³é |
| | | List<YwContractBill> newBills = new ArrayList<>();//æ°çè´¦å |
| | | List<YwContractBill> noBills = new ArrayList<>();//ä¸éè¦ç»ç®çè´¦å |
| | | List<YwContractBill> yjBills = new ArrayList<>();//æ¼éè´¦å |
| | | List<YwContractBill> canBills = new ArrayList<>();//å¯éç§ä¿®æ¹æ°æ® |
| | | List<YwContractBill> allBills = ywContractBillMapper.selectList(new QueryWrapper<YwContractBill>(). |
| | | select("*," + |
| | | "( select ifnull(sum(yw.ACT_RECEIVABLE_FEE),0) from yw_contract_revenue yw where yw.bill_id = yw_contract_bill.id and yw.status = 0 and yw.isdeleted = 0 ) as actReceivableFee " ) |
| | | .lambda(). |
| | | eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContractBill::getContractId,param.getId())); |
| | | if(allBills!=null && allBills.size()>0){ |
| | | for(YwContractBill bill: allBills){ |
| | | //仿¬¾ç¶æï¼0=å¾
æ¶æ¬¾ï¼1=å·²ç»æ¸
ï¼2=é¨åç»æ¸
ï¼3=å¾
仿¬¾ï¼4=å¾
鿬¾ï¼5=å·²å
³é |
| | | // å¦ææ¯æ¼éæè
ä¿è¯éï¼ä¸æ¯æé款ï¼ä¿æåæ¥çç¶æï¼ 0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=ç§èµæ¼éï¼3=ç©ä¸æ¼éï¼4=æ°´çµè´¹ï¼5=æé¡¹è´¹ï¼6=å
¶ä»;7=ä¿è¯é |
| | | if(Constants.equalsInteger(Constants.THREE,bill.getCostType()) |
| | | || Constants.equalsInteger(Constants.FOUR,bill.getCostType()) |
| | | ||Constants.equalsInteger(Constants.SEVEN,bill.getCostType())){ |
| | | //æ¼éåä¿è¯é |
| | | yjBills.add(bill); |
| | | continue; |
| | | } |
| | | if(Constants.equalsInteger(bill.getPayStatus(),Constants.ZERO) |
| | | ||Constants.equalsInteger(bill.getPayStatus(),Constants.THREE)){ |
| | | if(bill.getStartDate().getTime()>param.getEditDate().getTime()){ |
| | | //å¦æè¿æ²¡å¼å§ï¼è´¦åç´æ¥å
³é |
| | | closeBills.add(bill); |
| | | noBills.add(bill); |
| | | }else{ |
| | | canBills.add(bill); |
| | | } |
| | | }else if(Constants.equalsInteger(bill.getPayStatus(),Constants.ONE) ){ |
| | | if(bill.getEndDate().getTime()<param.getEditDate().getTime()){ |
| | | //å¦æå·²ç»æ¸
ï¼è´¦åç´æ¥å
³é |
| | | noBills.add(bill); |
| | | }else{ |
| | | canBills.add(bill); |
| | | } |
| | | }else if(Constants.equalsInteger(bill.getPayStatus(),Constants.TWO) ){ |
| | | canBills.add(bill); |
| | | } |
| | | } |
| | | } |
| | | if(closeBills.size()>0){ |
| | | //ç´æ¥å
³éå
³éè´¦å |
| | | for(YwContractBill b : closeBills){ |
| | | b.setStatus(Constants.ONE); |
| | | b.setEditDate(param.getEditDate()); |
| | | b.setEditor(param.getEditor()); |
| | | //å
³é订å |
| | | ywContractBillMapper.updateById(b); |
| | | } |
| | | } |
| | | int yjNoBills =0; |
| | | if(yjBills.size()>0){ |
| | | // å¦ææ¯æ¼éæè
ä¿è¯éï¼ä¸æ¯æé款ï¼ä¿æåæ¥çç¶æï¼ 0=ç§èµè´¹ï¼1=ç©ä¸è´¹ï¼2=ç§èµæ¼éï¼3=ç©ä¸æ¼éï¼4=æ°´çµè´¹ï¼5=æé¡¹è´¹ï¼6=å
¶ä»;7=ä¿è¯é |
| | | for(YwContractBill bill : yjBills){ |
| | | if(!Constants.equalsInteger(bill.getPayStatus(),Constants.ONE) ){ |
| | | //å¦ææ¯æªç»æ¸
æ¼é |
| | | yjNoBills ++; |
| | | } |
| | | } |
| | | } |
| | | BigDecimal totalBackFee = new BigDecimal(0); |
| | | if(canBills.size()>0){ |
| | | //ç´æ¥å
³éå
³éè´¦å |
| | | for(YwContractBill b : canBills){ |
| | | BigDecimal fee = new BigDecimal(0); |
| | | YwContractBill editBill = getEditBillFromListByParam(b,param.getCanBackRentBills()); |
| | | if(editBill != null){ |
| | | //仿¬¾ç¶æï¼0=å¾
æ¶æ¬¾ï¼1=å·²ç»æ¸
ï¼2=é¨åç»æ¸
ï¼3=å¾
仿¬¾ï¼4=å¾
鿬¾ï¼5=å·²å
³é |
| | | //å¦æè´¦åä¿¡æ¯åäºç¼è¾ï¼éé¢è®¡ç® 宿¶éé¢ å ä¿®æ¹ååºæ¶éé¢ä½å¯¹æ¯ï¼å¤ææ¯å¦åºè¯¥é款 |
| | | fee = Constants.formatBigdecimal(b.getActReceivableFee()).subtract(editBill.getReceivableFee()); |
| | | if(fee.compareTo(new BigDecimal(0))== 0){ |
| | | //å¦æè´¹ç¨æ£å¥½ï¼åä¿®æ¹è´¦åä¿¡æ¯ä¸ºå·²ç»æ¸
|
| | | b.setStatus(Constants.ONE); |
| | | }else if(fee.compareTo(new BigDecimal(0))> 0){ |
| | | //妿éè¦è¿è¡éæ¬¾ï¼æ´æ°è´¦åä¿¡æ¯ä¸ºå¾
鿬¾ |
| | | b.setStatus(Constants.FOUR); |
| | | }else if(fee.compareTo(new BigDecimal(0)) < 0){ |
| | | //å¦æè´¦åè¿ææ¬¾å¾
æ¶ï¼åä¿æç¶æä¸å |
| | | } |
| | | } |
| | | b.setEditDate(param.getEditDate()); |
| | | b.setEditor(param.getEditor()); |
| | | b.setBtActDate(param.getBtActDate()); |
| | | b.setBtDate(param.getBtDate()); |
| | | b.setBtFee(fee); |
| | | b.setBtInfo(param.getBtInfo()); |
| | | b.setBtUserId(param.getBtUserId()); |
| | | b.setBtSignDate(param.getBtSignDate()); |
| | | b.setBtType(param.getBtType()); |
| | | //å
³é订å |
| | | ywContractBillMapper.updateById(b); |
| | | totalBackFee = totalBackFee.add(fee);//ç´¯è®¡éæ¬¾éé¢ |
| | | } |
| | | } |
| | | if(param.getAddBillList()!=null && param.getAddBillList().size()>0){ |
| | | for(YwContractBill addBill : param.getAddBillList()){ |
| | | addBill.setIsdeleted(Constants.ZERO); |
| | | addBill.setContractId(param.getId()); |
| | | addBill.setType(Constants.ONE); |
| | | addBill.setStatus(Constants.ZERO); |
| | | if(Constants.equalsInteger(addBill.getBillType(),Constants.ZERO)){ |
| | | //å¦ææ¯æ¶æ¬¾ |
| | | totalBackFee = totalBackFee.add(Constants.formatBigdecimal(addBill.getActReceivableFee())); |
| | | addBill.setPayStatus(Constants.ZERO); |
| | | addBill.setBtFee(Constants.formatBigdecimal(addBill.getActReceivableFee())); |
| | | }else{ |
| | | //妿æ¯ä»æ¬¾ |
| | | addBill.setPayStatus(Constants.THREE); |
| | | addBill.setBtFee(Constants.formatBigdecimal(addBill.getActReceivableFee()).multiply(new BigDecimal(-1))); |
| | | } |
| | | totalBackFee = totalBackFee.add(Constants.formatBigdecimal(addBill.getBtFee())); |
| | | addBill.setEditDate(param.getEditDate()); |
| | | addBill.setEditor(param.getEditor()); |
| | | addBill.setBtActDate(param.getBtActDate()); |
| | | addBill.setBtDate(param.getBtDate()); |
| | | addBill.setBtInfo(param.getBtInfo()); |
| | | addBill.setBtUserId(param.getBtUserId()); |
| | | addBill.setBtSignDate(param.getBtSignDate()); |
| | | addBill.setBtType(param.getBtType()); |
| | | newBills.add(addBill); |
| | | } |
| | | ywContractBillMapper.insert(param.getAddBillList());//æ¹éæå
¥æ°æ® |
| | | } |
| | | param.setBtWaitBill(canBills.size() + newBills.size()+yjNoBills);//æªæ¸
ç®çè´¦åæ°é |
| | | param.setBtCLoseBill(closeBills.size()); |
| | | param.setBtFee(totalBackFee); |
| | | } |
| | | |
| | | private YwContractBill getEditBillFromListByParam(YwContractBill b, List<YwContractBill> canBackRentBills) { |
| | | for(YwContractBill d : canBackRentBills){ |
| | | if(Constants.equalsInteger(b.getId(),d.getId())){ |
| | | return d; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | private void isParamValidBackRent(YwContract param) { |
| | | if(param.getId()==null |
| | | || param.getBtType() == null |
| | | || param.getBtDate() == null |
| | | || param.getBtUserId() == null |
| | | || param.getBtSignDate() == null |
| | | ||StringUtils.isBlank( param.getBtInfo())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | YwContract model = ywContractMapper.selectById(param.getId()); |
| | | if(model==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼ååä¿¡æ¯ä¸åå¨ï¼è¯·è¿ååè¡¨å·æ°éè¯ï¼"); |
| | | } |
| | | |
| | | SystemUser user = systemUserMapper.selectById(param.getUserId()); |
| | | if(user ==null || (user.getDeleted()!=null&& user.getDeleted() )){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼ç»å人信æ¯ä¸åå¨ï¼"); |
| | | } |
| | | if(param.getAddBillList()!=null && param.getAddBillList().size()>0){ |
| | | for(YwContractBill bill: param.getAddBillList()){ |
| | | if(bill.getCostType() == null |
| | | ||bill.getFeeType() == null |
| | | ||bill.getReceivableFee() == null |
| | | ||bill.getReceivableFee().compareTo(new BigDecimal(0)) < 1 |
| | | ||bill.getCompanyId() == null |
| | | ||bill.getPlanPayDate() == null |
| | | ||bill.getBillType() == null |
| | | ||(Constants.equalsInteger(bill.getBillType(),Constants.ZERO) |
| | | &&Constants.equalsInteger(bill.getFeeType(),Constants.ZERO) |
| | | && (bill.getStartDate() ==null || bill.getEndDate() ==null) )){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对ä¸èµ·ï¼è¯·æè¦æ±å¡«åèªå»ºè´¦åä¿¡æ¯ï¼"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void dealDetailListBiz(YwContract model) { |
| | |
| | | bill.setStatus(Constants.ZERO); |
| | | bill.setStartDate(model.getStartDate()); |
| | | bill.setEndDate(model.getEndDate()); |
| | | bill.setType(type); |
| | | bill.setType(Constants.ZERO); |
| | | bill.setCostType(type); |
| | | bill.setTotleFee(type==Constants.THREE?model.getZlDeposit():model.getWyDeposit());//æ¼éè´¹ç¨ |
| | | bill.setSortnum(0); |
| | | bill.setTitle(type==Constants.THREE?"ç§èµæ¼é":"ç©ä¸æ¼é" ); |
| | | return bill; |
| | | } |
| | | |
| | |
| | | bill.setContractId(model.getId()); |
| | | bill.setStatus(Constants.ZERO); |
| | | bill.setDetailId(d.getId()); |
| | | bill.setType(d.getType()); |
| | | bill.setCostType(d.getType()); |
| | | bill.setType(Constants.ZERO); |
| | | return bill; |
| | | } |
| | | |
| | |
| | | return data; |
| | | } |
| | | |
| | | private void initFiles(YwContract model) { |
| | | List<Multifile> multifiles = multifileMapper.selectList(new QueryWrapper<Multifile>().lambda() |
| | | .eq(Multifile::getObjId, model.getId() ) |
| | | .in(Multifile::getObjType, Arrays.asList(new Integer[]{Constants.MultiFile.YW_CONTRACT_FILE.getKey()})) |
| | | .eq(Multifile::getIsdeleted,Constants.ZERO)); |
| | | if(multifiles!=null){ |
| | | String path = systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode() |
| | | +systemDictDataBiz.queryByCode(Constants.FTP,Constants.YW_CONTRACT_FILE).getCode(); |
| | | for(Multifile f : multifiles){ |
| | | if(StringUtils.isBlank(f.getFileurl())){ |
| | | continue; |
| | | } |
| | | f.setFileurlFull(path+f.getFileurl()); |
| | | //ç°åºæ
åµ |
| | | if(model.getFileList() == null){ |
| | | model.setFileList(new ArrayList<>()); |
| | | } |
| | | model.getFileList().add(f); |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | private void dealMultifileBiz(YwContract model) { |
| | |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(model.getId()); |
| | | multifile.setCreator(model.getCreator()); |
| | | multifile.setObjType(Constants.MultiFile.YW_WORKORDER_PROBLEM.getKey()); |
| | | multifile.setObjType(Constants.MultiFile.YW_CONTRACT_FILE.getKey()); |
| | | multifile.setSortnum(i+1); |
| | | fileList.add(multifile); |
| | | } |
| | |
| | | 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()))); |
| | | } |
| | | YwCustomer customer = customerMapper.selectById(model.getRenterId()); |
| | | if(customer ==null || Constants.equalsInteger(customer.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼éæ©ç§å®¢ä¿¡æ¯ä¸åå¨ï¼è¯·è¿åå·æ°éè¯ï¼"); |
| | |
| | | this.updateById(ywContract); |
| | | } |
| | | } |
| | | |
| | | private void dealLogBiz(YwContract model,Constants.YwLogType type,String param1,String param2) { |
| | | YwWorkorderLog log = new YwWorkorderLog(); |
| | | log.setCreateDate(model.getEditDate()); |
| | | log.setCreator(model.getCreator()); |
| | | log.setJobId(model.getId()); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | log.setObjId(model.getId()+""); |
| | | log.setObjType(type.getKey()); |
| | | log.setParam1(param1); |
| | | log.setParam2(param2); |
| | | log.setTitle(type.getNoteinfo()); |
| | | ywWorkorderLogMapper.insert(log); |
| | | } |
| | | @Override |
| | | public YwContract findById(Integer id) { |
| | | return ywContractMapper.selectById(id); |
| | | MPJLambdaWrapper<YwContract> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwContract.class ) |
| | | .selectAs(Company::getName,YwContract::getCompanyName ) |
| | | .selectAs(SystemUser::getRealname,YwContract::getUserName ) |
| | | .selectAs(YwCustomer::getName,YwContract::getRenterName ) |
| | | .selectAs(YwProject::getName,YwContract::getProjectName ) |
| | | .select("t4.realname",YwContract::getCreatorName ) |
| | | .leftJoin(Company.class,Company::getId,YwContract::getCompanyId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwContract::getUserId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwContract::getCreator) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwContract::getProjectId) |
| | | .leftJoin(YwCustomer.class,YwCustomer::getId,YwContract::getRenterId); |
| | | YwContract model = ywContractMapper.selectJoinOne(YwContract.class,queryWrapper); |
| | | if(model != null){ |
| | | //ååéä»¶ |
| | | initFiles(model); |
| | | //æ¥è¯¢æ¿æºä¿¡æ¯æ°æ® |
| | | MPJLambdaWrapper<YwRoom> rw = new MPJLambdaWrapper<>(); |
| | | rw.selectAll(YwRoom.class ) |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor) |
| | | .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)); |
| | | |
| | | //æ¥è¯¢ç§è³æ¡æ¬¾ä¿¡æ¯ |
| | | MPJLambdaWrapper<YwContractDetail> dw = new MPJLambdaWrapper<>(); |
| | | dw.selectAll(YwContractDetail.class ) |
| | | .eq(YwContractDetail::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContractDetail::getContractId,model.getId()) |
| | | .in(YwContractDetail::getType,Constants.ZERO,Constants.TWO) |
| | | .orderByAsc(YwContractDetail::getSortnum); |
| | | model.setZlDetailList(ywContractDetailMapper.selectJoinList(YwContractDetail.class,dw)); |
| | | //æ¥è¯¢ç©æ¥æ¡æ¬¾ä¿¡æ¯ |
| | | dw = new MPJLambdaWrapper<>(); |
| | | dw.selectAll(YwContractDetail.class ) |
| | | .eq(YwContractDetail::getIsdeleted,Constants.ZERO) |
| | | .eq(YwContractDetail::getContractId,model.getId()) |
| | | .in(YwContractDetail::getType,Constants.ONE,Constants.THREE) |
| | | .orderByAsc(YwContractDetail::getSortnum); |
| | | model.setWyDetailList(ywContractDetailMapper.selectJoinList(YwContractDetail.class,dw)); |
| | | |
| | | //æ¥è¯¢æä½æ¥å¿è®°å½ |
| | | YwWorkorderLog log = new YwWorkorderLog(); |
| | | log.setJobId(model.getId()); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | model.setLogList(ywWorkorderLogMapper.selectList(new QueryWrapper<YwWorkorderLog>(log) |
| | | .lambda() |
| | | .in(YwWorkorderLog::getObjType,Constants.YwLogType.CONTRACT_BACK.getKey() |
| | | ,Constants.YwLogType.CONTRACT_CREATE.getKey() |
| | | ,Constants.YwLogType.CONTRACT_UPDATE.getKey()) |
| | | .orderByAsc(YwWorkorderLog::getCreateDate))); |
| | | |
| | | //æ¥è¯¢è´¦åéå |
| | | model.setBillList(ywContractBillMapper.selectJoinList(YwContractBill.class,new MPJLambdaWrapper<YwContractBill>() |
| | | .selectAll(YwContractBill.class ) |
| | | .eq( YwContractBill::getContractId,model.getId()) |
| | | .eq(YwContractBill::getIsdeleted,Constants.ZERO) |
| | | .orderByAsc(YwContractBill::getSortnum,YwContractBill::getCreateDate))); |
| | | model.setCanBackRentBills(new ArrayList<>()); |
| | | long nowStart = Utils.Date.getStart(new Date()).getTime(); |
| | | long nowEnd = Utils.Date.getEnd(new Date()).getTime(); |
| | | if(model.getBillList()!=null && model.getBillList().size()>0){ |
| | | for(YwContractBill bill: model.getBillList()){ |
| | | //仿¬¾ç¶æï¼0=å¾
æ¶æ¬¾ï¼1=å·²ç»æ¸
ï¼2=é¨åç»æ¸
ï¼3=å¾
仿¬¾ï¼4=å¾
鿬¾ï¼5=å·²å
³é |
| | | if(Constants.equalsInteger(bill.getPayStatus(),Constants.ZERO) |
| | | ||Constants.equalsInteger(bill.getPayStatus(),Constants.THREE)){ |
| | | if(bill.getStartDate().getTime()>nowEnd){ |
| | | //å¦æè¿æ²¡å¼å§ï¼è´¦åç´æ¥å
³é |
| | | continue; |
| | | } |
| | | model.getCanBackRentBills().add(bill); |
| | | |
| | | }else if(Constants.equalsInteger(bill.getPayStatus(),Constants.ONE) ){ |
| | | if(bill.getEndDate().getTime()<nowStart){ |
| | | //å¦æå·²ç»æ¸
ï¼è´¦åç´æ¥å
³é |
| | | continue; |
| | | } |
| | | model.getCanBackRentBills().add(bill); |
| | | }else if(Constants.equalsInteger(bill.getPayStatus(),Constants.TWO) ){ |
| | | model.getCanBackRentBills().add(bill); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | return model; |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public List<YwFloor> findList(YwFloor ywFloor) { |
| | | ywFloor.setIsdeleted(Constants.ZERO); |
| | | QueryWrapper<YwFloor> wrapper = new QueryWrapper<>(ywFloor); |
| | | return ywFloorMapper.selectList(wrapper); |
| | | } |
| | |
| | | import com.doumee.dao.business.YwBuildingMapper; |
| | | import com.doumee.dao.business.YwRoomMapper; |
| | | import com.doumee.dao.business.model.YwBuilding; |
| | | import com.doumee.dao.business.model.YwFloor; |
| | | import com.doumee.dao.business.model.YwProject; |
| | | import com.doumee.dao.business.model.YwRoom; |
| | | import com.doumee.service.business.YwRoomService; |
| | |
| | | public PageData<YwRoom> findPage(PageWrap<YwRoom> pageWrap) { |
| | | IPage<YwRoom> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<YwRoom> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwBuilding.class ) |
| | | queryWrapper.selectAll(YwRoom.class ) |
| | | .selectAs(YwProject::getName,YwRoom::getProjectName) |
| | | .selectAs(YwFloor::getName,YwRoom::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwRoom::getBuildingName) |
| | | .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId); |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * è¿ç»´å·¥åä¿¡æ¯è¡¨Serviceå®ç° |
| | |
| | | private YwRoomMapper ywRoomMapper; |
| | | @Autowired |
| | | private YwBuildingMapper ywBuildingMapper; |
| | | @Autowired |
| | | private YwFloorMapper ywFloorMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | model.setIsdeleted(Constants.ZERO); |
| | | model.setCreateDate(new Date()); |
| | | model.setStatus(Constants.ZERO); |
| | | model.setDealStatus(Constants.ZERO); |
| | | model.setEditDate(model.getCreateDate()); |
| | | model.setEditor(model.getCreator()); |
| | | ywWorkorderMapper.insert(model); |
| | |
| | | if(StringUtils.isBlank(multifile.getFileurl())){ |
| | | continue; |
| | | } |
| | | multifile.setCreateDate(new Date()); |
| | | multifile.setCreateDate(model.getCreateDate()); |
| | | multifile.setEditDate(model.getCreateDate()); |
| | | multifile.setCreator(model.getEditor()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(model.getId()); |
| | | multifile.setCreator(model.getCreator()); |
| | | multifile.setEditor(model.getCreator()); |
| | | multifile.setObjType(Constants.MultiFile.YW_WORKORDER_PROBLEM.getKey()); |
| | | multifile.setSortnum(i+1); |
| | | fileList.add(multifile); |
| | |
| | | if(fileList.size()>0){ |
| | | multifileMapper.insert(fileList); |
| | | } |
| | | dealLogBiz(model,Constants.ZERO,model.getLoginUserInfo().getRealname(),null);//è®°å½æ°å»ºæ¥å¿ |
| | | dealLogBiz(model,Constants.YwLogType.WORKORDER_CREATE,model.getLoginUserInfo().getRealname(),null);//è®°å½æ°å»ºæ¥å¿ |
| | | return model.getId(); |
| | | } |
| | | |
| | | private void dealLogBiz(YwWorkorder model, int type,String param1,String param2) { |
| | | private void dealLogBiz(YwWorkorder model,Constants.YwLogType type,String param1,String param2) { |
| | | YwWorkorderLog log = new YwWorkorderLog(); |
| | | log.setCreateDate(model.getEditDate()); |
| | | log.setCreator(model.getCreator()); |
| | | log.setJobId(model.getId()); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | log.setObjId(model.getId()+""); |
| | | log.setObjType(type); |
| | | log.setObjType(type.getKey()); |
| | | log.setParam1(param1); |
| | | log.setParam2(param2); |
| | | if(type ==0){ |
| | | log.setTitle("å建工å"); |
| | | }else if(type ==1){ |
| | | log.setTitle("åæ´¾å·¥å"); |
| | | }else if(type ==2){ |
| | | log.setTitle("å¤çå·¥å"); |
| | | } |
| | | log.setTitle(type.getNoteinfo()); |
| | | ywWorkorderLogMapper.insert(log); |
| | | } |
| | | |
| | |
| | | model.setProjectId(room.getProjectId()); |
| | | }else{ |
| | | //妿æ¯å
Œ
±åºåè£
ä¿®ï¼å¿
é¡»éæ©æ¥¼å®ä¿¡æ¯ |
| | | if(model.getBuildingId()==null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯·éæ©æ£ç¡®ç楼å®ä¿¡æ¯ï¼"); |
| | | if(model.getFloorId()==null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯·éæ©æ£ç¡®ç楼å±ä¿¡æ¯ï¼"); |
| | | } |
| | | YwBuilding room = ywBuildingMapper.selectById(model.getRoomId()); |
| | | YwFloor room = ywFloorMapper.selectById(model.getFloorId()); |
| | | if(room ==null || Constants.equalsInteger(room.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯·éæ©æ£ç¡®ç楼å®ä¿¡æ¯ï¼"); |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼è¯·éæ©æ£ç¡®ç楼å±ä¿¡æ¯ï¼"); |
| | | } |
| | | model.setBuildingId(room.getBuildingId()); |
| | | model.setProjectId(room.getProjectId()); |
| | | } |
| | | } |
| | |
| | | if(model ==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼å·¥åä¿¡æ¯ä¸åå¨ï¼"); |
| | | } |
| | | if(!Constants.equalsInteger(model.getDealStatus(),Constants.ZERO) && !Constants.equalsInteger(model.getDealStatus(),Constants.ONE)){ |
| | | if(!Constants.equalsInteger(model.getDealStatus(),Constants.ZERO) |
| | | // && !Constants.equalsInteger(model.getDealStatus(),Constants.ONE) |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼å·¥åç¶æå·²æµè½¬ï¼ä¸æ¯æå½åæä½ï¼"); |
| | | } |
| | | |
| | |
| | | update.setDispatchUserId(update.getEditor()); |
| | | update.setDispatchDate(update.getEditDate()); |
| | | update.setDispatchInfo(ywWorkorder.getDispatchInfo()); |
| | | update.setDealUserId(ywWorkorder.getDealUserId()); |
| | | ywWorkorderMapper.updateById(update); |
| | | dealLogBiz(model,Constants.ONE,model.getLoginUserInfo().getRealname(),user.getRealname());//è®°å½æ°å»ºæ¥å¿ |
| | | dealLogBiz(model,Constants.YwLogType.WORKORDER_DISPATCH,ywWorkorder.getLoginUserInfo().getRealname(),user.getRealname());//è®°å½æ°å»ºæ¥å¿ |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼å·¥åç¶æå·²æµè½¬ï¼ä¸æ¯æå½åæä½ï¼"); |
| | | } |
| | | |
| | | SystemUser user = systemUserMapper.selectById(ywWorkorder.getDealUserId()); |
| | | if(user ==null || (user.getDeleted()!=null&& user.getDeleted() )){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼å工信æ¯ä¸åå¨ï¼"); |
| | | } |
| | | // SystemUser user = systemUserMapper.selectById(ywWorkorder.getDealUserId()); |
| | | // if(user ==null || (user.getDeleted()!=null&& user.getDeleted() )){ |
| | | // throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼å工信æ¯ä¸åå¨ï¼"); |
| | | // } |
| | | YwWorkorder update = new YwWorkorder(); |
| | | update.setId(model.getId()); |
| | | update.setEditDate(new Date()); |
| | |
| | | update.setDealStatus(Constants.TWO); |
| | | update.setDealUserId(update.getEditor()); |
| | | update.setDealDate(update.getEditDate()); |
| | | update.setDealInfo(ywWorkorder.getDispatchInfo()); |
| | | update.setDealInfo(ywWorkorder.getDealInfo()); |
| | | ywWorkorderMapper.updateById(update); |
| | | dealLogBiz(model,Constants.TWO,model.getLoginUserInfo().getRealname(),null);//è®°å½æ°å»ºæ¥å¿ |
| | | |
| | | List<Multifile> fileList = new ArrayList<>(); |
| | | if(ywWorkorder.getDealFileList()!=null && ywWorkorder.getDealFileList().size()>0){ |
| | | for (int i = 0; i < ywWorkorder.getDealFileList().size(); i++) { |
| | | Multifile multifile = ywWorkorder.getDealFileList().get(i); |
| | | if(StringUtils.isBlank(multifile.getFileurl())){ |
| | | continue; |
| | | } |
| | | multifile.setCreateDate(update.getEditDate()); |
| | | multifile.setCreator(update.getEditor()); |
| | | multifile.setEditDate(update.getEditDate()); |
| | | multifile.setIsdeleted(Constants.ZERO); |
| | | multifile.setObjId(model.getId()); |
| | | multifile.setEditor(update.getEditor()); |
| | | multifile.setObjType(Constants.MultiFile.YW_WORKORDER_DEAL.getKey()); |
| | | multifile.setSortnum(i+1); |
| | | fileList.add(multifile); |
| | | } |
| | | } |
| | | if(fileList.size()>0){ |
| | | multifileMapper.insert(fileList); |
| | | } |
| | | dealLogBiz(model,Constants.YwLogType.WORKORDER_DEAL,ywWorkorder.getLoginUserInfo().getRealname(),null);//è®°å½æ°å»ºæ¥å¿ |
| | | } |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | |
| | | |
| | | @Override |
| | | public YwWorkorder findById(Integer id) { |
| | | MPJLambdaWrapper<YwWorkorder> wrapper = new MPJLambdaWrapper<>(); |
| | | wrapper.selectAll(YwWorkorder.class ) |
| | | .select("t4.realname",YwWorkorder::getDealUserName) |
| | | .select("t3.realname",YwWorkorder::getDispatchUserName) |
| | | .selectAs(SystemUser::getRealname,YwWorkorder::getCreatorName) |
| | | .selectAs(SystemUser::getMobile,YwWorkorder::getCreatorPhone) |
| | | .selectAs(Company::getCompanyNamePath,YwWorkorder::getCreatorCompany) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getCreator) |
| | | .leftJoin(Company.class,Company::getId,SystemUser::getCompanyId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getDispatchUserId) |
| | | MPJLambdaWrapper<YwWorkorder> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwWorkorder.class ) |
| | | .selectAs(SystemUser::getRealname,YwWorkorder::getDealUserName) |
| | | .select("t3.realname",YwWorkorder::getCreatorName) |
| | | .selectAs(Category::getName,YwWorkorder::getCategoryName) |
| | | .selectAs(YwRoom::getName,YwWorkorder::getRoomName) |
| | | .selectAs(YwRoom::getRoomNum,YwWorkorder::getRoomNum) |
| | | .selectAs(YwFloor::getName,YwWorkorder::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwWorkorder::getBuildingName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getDealUserId) |
| | | .leftJoin(Category.class,Category::getId,YwWorkorder::getCateId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getCreator) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwWorkorder::getRoomId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwWorkorder::getFloorId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwWorkorder::getBuildingId) |
| | | .eq(YwWorkorder::getId,id); |
| | | YwWorkorder model = ywWorkorderMapper.selectJoinOne(YwWorkorder.class,wrapper); |
| | | YwWorkorder model = ywWorkorderMapper.selectJoinOne(YwWorkorder.class,queryWrapper); |
| | | initFiles(model);//读åéä»¶ä¿¡æ¯ |
| | | YwWorkorderLog log = new YwWorkorderLog(); |
| | | log.setJobId(model.getId()); |
| | | log.setIsdeleted(Constants.ZERO); |
| | | model.setLogList(ywWorkorderLogMapper.selectList(new QueryWrapper<YwWorkorderLog>(log).lambda().orderByAsc(YwWorkorderLog::getCreateDate))); |
| | | model.setLogList(ywWorkorderLogMapper.selectList(new QueryWrapper<YwWorkorderLog>(log) |
| | | .lambda() |
| | | .in(YwWorkorderLog::getObjType,Constants.YwLogType.WORKORDER_DEAL.getKey() |
| | | ,Constants.YwLogType.WORKORDER_CREATE.getKey() |
| | | ,Constants.YwLogType.WORKORDER_DISPATCH.getKey()) |
| | | .orderByAsc(YwWorkorderLog::getCreateDate))); |
| | | return model; |
| | | } |
| | | |
| | |
| | | @Override |
| | | public PageData<YwWorkorder> findPage(PageWrap<YwWorkorder> pageWrap) { |
| | | IPage<YwWorkorder> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<YwWorkorder> queryWrapper = new QueryWrapper<>(); |
| | | MPJLambdaWrapper<YwWorkorder> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(YwWorkorder.class ) |
| | | .selectAs(SystemUser::getRealname,YwWorkorder::getDealUserName) |
| | | .select("t3.realname",YwWorkorder::getCreatorName) |
| | | .selectAs(Category::getName,YwWorkorder::getCategoryName) |
| | | .selectAs(YwRoom::getName,YwWorkorder::getRoomName) |
| | | .selectAs(YwRoom::getRoomNum,YwWorkorder::getRoomNum) |
| | | .selectAs(YwFloor::getName,YwWorkorder::getFloorName) |
| | | .selectAs(YwBuilding::getName,YwWorkorder::getBuildingName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getDealUserId) |
| | | .leftJoin(Category.class,Category::getId,YwWorkorder::getCateId) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,YwWorkorder::getCreator) |
| | | .leftJoin(YwRoom.class,YwRoom::getId,YwWorkorder::getRoomId) |
| | | .leftJoin(YwFloor.class,YwFloor::getId,YwWorkorder::getFloorId) |
| | | .leftJoin(YwBuilding.class,YwBuilding::getId,YwWorkorder::getBuildingId); |
| | | pageWrap.getModel().setIsdeleted(Constants.ZERO); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getId, pageWrap.getModel().getId()); |
| | | queryWrapper.eq(YwWorkorder::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getCreator, pageWrap.getModel().getCreator()); |
| | | queryWrapper.eq(YwWorkorder::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(YwWorkorder::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(YwWorkorder::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.ge(YwWorkorder::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.le(YwWorkorder::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getEditor, pageWrap.getModel().getEditor()); |
| | | queryWrapper.eq(YwWorkorder::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(YwWorkorder::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(YwWorkorder::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.ge(YwWorkorder::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.le(YwWorkorder::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | queryWrapper.eq(YwWorkorder::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getTitle() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getTitle, pageWrap.getModel().getTitle()); |
| | | queryWrapper.eq(YwWorkorder::getTitle, pageWrap.getModel().getTitle()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getRemark, pageWrap.getModel().getRemark()); |
| | | queryWrapper.eq(YwWorkorder::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getStatus() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getStatus, pageWrap.getModel().getStatus()); |
| | | queryWrapper.eq(YwWorkorder::getStatus, pageWrap.getModel().getStatus()); |
| | | } |
| | | if (pageWrap.getModel().getSortnum() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getSortnum, pageWrap.getModel().getSortnum()); |
| | | queryWrapper.eq(YwWorkorder::getSortnum, pageWrap.getModel().getSortnum()); |
| | | } |
| | | if (pageWrap.getModel().getContent() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getContent, pageWrap.getModel().getContent()); |
| | | queryWrapper.eq(YwWorkorder::getContent, pageWrap.getModel().getContent()); |
| | | } |
| | | if (pageWrap.getModel().getGetDate() != null) { |
| | | queryWrapper.lambda().ge(YwWorkorder::getGetDate, Utils.Date.getStart(pageWrap.getModel().getGetDate())); |
| | | queryWrapper.lambda().le(YwWorkorder::getGetDate, Utils.Date.getEnd(pageWrap.getModel().getGetDate())); |
| | | queryWrapper.ge(YwWorkorder::getGetDate, Utils.Date.getStart(pageWrap.getModel().getGetDate())); |
| | | queryWrapper.le(YwWorkorder::getGetDate, Utils.Date.getEnd(pageWrap.getModel().getGetDate())); |
| | | } |
| | | if (pageWrap.getModel().getProjectId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getProjectId, pageWrap.getModel().getProjectId()); |
| | | queryWrapper.eq(YwWorkorder::getProjectId, pageWrap.getModel().getProjectId()); |
| | | } |
| | | if (pageWrap.getModel().getBuildingId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getBuildingId, pageWrap.getModel().getBuildingId()); |
| | | queryWrapper.eq(YwWorkorder::getBuildingId, pageWrap.getModel().getBuildingId()); |
| | | } |
| | | if (pageWrap.getModel().getRoomId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getRoomId, pageWrap.getModel().getRoomId()); |
| | | queryWrapper.eq(YwWorkorder::getRoomId, pageWrap.getModel().getRoomId()); |
| | | } |
| | | if (pageWrap.getModel().getUserId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getUserId, pageWrap.getModel().getUserId()); |
| | | queryWrapper.eq(YwWorkorder::getUserId, pageWrap.getModel().getUserId()); |
| | | } |
| | | if (pageWrap.getModel().getPhone() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getPhone, pageWrap.getModel().getPhone()); |
| | | queryWrapper.eq(YwWorkorder::getPhone, pageWrap.getModel().getPhone()); |
| | | } |
| | | if (pageWrap.getModel().getSubmitDate() != null) { |
| | | queryWrapper.lambda().ge(YwWorkorder::getSubmitDate, Utils.Date.getStart(pageWrap.getModel().getSubmitDate())); |
| | | queryWrapper.lambda().le(YwWorkorder::getSubmitDate, Utils.Date.getEnd(pageWrap.getModel().getSubmitDate())); |
| | | queryWrapper.ge(YwWorkorder::getSubmitDate, Utils.Date.getStart(pageWrap.getModel().getSubmitDate())); |
| | | queryWrapper.le(YwWorkorder::getSubmitDate, Utils.Date.getEnd(pageWrap.getModel().getSubmitDate())); |
| | | } |
| | | if (pageWrap.getModel().getCateId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getCateId, pageWrap.getModel().getCateId()); |
| | | queryWrapper.eq(YwWorkorder::getCateId, pageWrap.getModel().getCateId()); |
| | | } |
| | | if (pageWrap.getModel().getAreaType() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getAreaType, pageWrap.getModel().getAreaType()); |
| | | queryWrapper.eq(YwWorkorder::getAreaType, pageWrap.getModel().getAreaType()); |
| | | } |
| | | if (pageWrap.getModel().getCode() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getCode, pageWrap.getModel().getCode()); |
| | | queryWrapper.eq(YwWorkorder::getCode, pageWrap.getModel().getCode()); |
| | | } |
| | | if (pageWrap.getModel().getDealStatus() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getDealStatus, pageWrap.getModel().getDealStatus()); |
| | | queryWrapper.eq(YwWorkorder::getDealStatus, pageWrap.getModel().getDealStatus()); |
| | | } |
| | | if (pageWrap.getModel().getDispatchUserId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getDispatchUserId, pageWrap.getModel().getDispatchUserId()); |
| | | queryWrapper.eq(YwWorkorder::getDispatchUserId, pageWrap.getModel().getDispatchUserId()); |
| | | } |
| | | if (pageWrap.getModel().getDispatchDate() != null) { |
| | | queryWrapper.lambda().ge(YwWorkorder::getDispatchDate, Utils.Date.getStart(pageWrap.getModel().getDispatchDate())); |
| | | queryWrapper.lambda().le(YwWorkorder::getDispatchDate, Utils.Date.getEnd(pageWrap.getModel().getDispatchDate())); |
| | | queryWrapper.ge(YwWorkorder::getDispatchDate, Utils.Date.getStart(pageWrap.getModel().getDispatchDate())); |
| | | queryWrapper.le(YwWorkorder::getDispatchDate, Utils.Date.getEnd(pageWrap.getModel().getDispatchDate())); |
| | | } |
| | | if (pageWrap.getModel().getDispatchInfo() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getDispatchInfo, pageWrap.getModel().getDispatchInfo()); |
| | | queryWrapper.eq(YwWorkorder::getDispatchInfo, pageWrap.getModel().getDispatchInfo()); |
| | | } |
| | | if (pageWrap.getModel().getDealUserId() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getDealUserId, pageWrap.getModel().getDealUserId()); |
| | | queryWrapper.eq(YwWorkorder::getDealUserId, pageWrap.getModel().getDealUserId()); |
| | | } |
| | | if (pageWrap.getModel().getDealDate() != null) { |
| | | queryWrapper.lambda().ge(YwWorkorder::getDealDate, Utils.Date.getStart(pageWrap.getModel().getDealDate())); |
| | | queryWrapper.lambda().le(YwWorkorder::getDealDate, Utils.Date.getEnd(pageWrap.getModel().getDealDate())); |
| | | queryWrapper.ge(YwWorkorder::getDealDate, Utils.Date.getStart(pageWrap.getModel().getDealDate())); |
| | | queryWrapper.le(YwWorkorder::getDealDate, Utils.Date.getEnd(pageWrap.getModel().getDealDate())); |
| | | } |
| | | if (pageWrap.getModel().getDealInfo() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getDealInfo, pageWrap.getModel().getDealInfo()); |
| | | queryWrapper.eq(YwWorkorder::getDealInfo, pageWrap.getModel().getDealInfo()); |
| | | } |
| | | if (pageWrap.getModel().getDealType() != null) { |
| | | queryWrapper.lambda().eq(YwWorkorder::getDealType, pageWrap.getModel().getDealType()); |
| | | queryWrapper.eq(YwWorkorder::getDealType, pageWrap.getModel().getDealType()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | queryWrapper.ge(Objects.nonNull(pageWrap.getModel().getQueryStartTime()), YwWorkorder::getCreateDate, pageWrap.getModel().getQueryStartTime()) |
| | | .le(Objects.nonNull(pageWrap.getModel().getQueryEndTime()), YwWorkorder::getCreateDate, pageWrap.getModel().getQueryEndTime()); |
| | | queryWrapper.orderByDesc(YwContract::getCreateDate ); |
| | | return PageData.from(ywWorkorderMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |