From bbcade0aa73354bf775fe91f88dd618bab6ea4a4 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 03 十二月 2024 19:14:15 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/funingyunwei

---
 admin/src/views/contract/components/contractEdit.vue                                                        |    8 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwRoomServiceImpl.java         |    4 
 h5/pages/workOrder/edit.vue                                                                                 |    2 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java         |    7 
 h5/pages/common/memberSel.vue                                                                               |    2 
 admin/src/components/business/OperaInternalCompanyWindow.vue                                                |    2 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java     |   61 ++++
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwProjectServiceImpl.java      |   21 +
 h5/pages/polling/task.vue                                                                                   |  439 +++++++++++++++++++++------------------
 h5/pages/workOrder/list.vue                                                                                 |    2 
 admin/src/views/project/housingList.vue                                                                     |    6 
 server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwProjectCloudController.java              |    5 
 admin/src/views/business/internalCompany.vue                                                                |    2 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwCustomerServiceImpl.java     |    3 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java   |    1 
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwProjectService.java               |    3 
 h5/pages/operation/record.vue                                                                               |    2 
 server/system_service/src/main/java/com/doumee/core/utils/DateCompare.java                                  |   26 +-
 server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java |    7 
 admin/src/router/index.js                                                                                   |    4 
 admin/src/views/business/internalMember.vue                                                                 |    2 
 server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/DataDTO.java                        |   29 ++
 22 files changed, 384 insertions(+), 254 deletions(-)

diff --git a/admin/src/components/business/OperaInternalCompanyWindow.vue b/admin/src/components/business/OperaInternalCompanyWindow.vue
index 984e196..7526ba7 100644
--- a/admin/src/components/business/OperaInternalCompanyWindow.vue
+++ b/admin/src/components/business/OperaInternalCompanyWindow.vue
@@ -39,7 +39,7 @@
       // 琛ㄥ崟鏁版嵁
       form: {
         id: null,
-        type: '2',
+        type: '1',
         name: '',
         parentId: null,
         disable: false,
diff --git a/admin/src/router/index.js b/admin/src/router/index.js
index db35fa8..f69ea19 100644
--- a/admin/src/router/index.js
+++ b/admin/src/router/index.js
@@ -10,8 +10,8 @@
 
 const router = new VueRouter({
   // + (process.env.VUE_APP_ROUTER_MODE === 'hash' ? '#' : '')
-  base: process.env.VUE_APP_CONTEXT_PATH,
-  mode: process.env.VUE_APP_ROUTER_MODE,
+  // base: process.env.VUE_APP_CONTEXT_PATH,
+  mode: 'hash',
   routes: [
     // 鐧诲綍
     {
diff --git a/admin/src/views/business/internalCompany.vue b/admin/src/views/business/internalCompany.vue
index 2db8298..4779ed7 100644
--- a/admin/src/views/business/internalCompany.vue
+++ b/admin/src/views/business/internalCompany.vue
@@ -73,7 +73,7 @@
       loading: false,
       sorting: false,
       searchForm: {
-        type: 2
+        type: 1
       },
       list: [],
       total: 0
diff --git a/admin/src/views/business/internalMember.vue b/admin/src/views/business/internalMember.vue
index 98ae806..f6d0dfd 100644
--- a/admin/src/views/business/internalMember.vue
+++ b/admin/src/views/business/internalMember.vue
@@ -287,7 +287,7 @@
     },
     // 鑾峰彇缁勭粐鏍�
     getfindCompanyTreePage () {
-      fetchList()
+      fetchList(1)
         .then(res => {
           if (res && res.length > 0) {
             res[0].fsStatus = 1
diff --git a/admin/src/views/contract/components/contractEdit.vue b/admin/src/views/contract/components/contractEdit.vue
index ba9a693..e7c7356 100644
--- a/admin/src/views/contract/components/contractEdit.vue
+++ b/admin/src/views/contract/components/contractEdit.vue
@@ -135,7 +135,7 @@
                 <el-button type="text" size="medium" @click="addZl">澧炲姞</el-button>
               </div>
               <div class="list">
-                <template v-for="(item, index) in form.zlDetailList" :key="index">
+                <div v-for="(item, index) in form.zlDetailList" :key="index">
                   <el-form-item label="璧峰鏃ユ湡" prop="time">
                     <el-date-picker type="daterange" v-model="item.time" @change="getDate1($event, index)" value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨" />
                   </el-form-item>
@@ -152,7 +152,7 @@
                       <el-link :underline="false" type="danger" @click="deleZl(index)" style="margin-left: 20px; flex-shrink: 0;">鍒犻櫎</el-link>
                     </div>
                   </el-form-item>
-                </template>
+                </div>
               </div>
             </el-form>
           </div>
@@ -218,7 +218,7 @@
                 <el-button type="text" size="medium" @click="addWy">澧炲姞</el-button>
               </div>
               <div class="list">
-                <template v-for="(item, index) in form.wyDetailList" :key="index">
+                <div v-for="(item, index) in form.wyDetailList" :key="index">
                   <el-form-item label="璧峰鏃ユ湡" prop="time">
                     <el-date-picker type="daterange" v-model="item.time" @change="getDate2($event, index)" value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨" />
                   </el-form-item>
@@ -235,7 +235,7 @@
                       <el-link :underline="false" type="danger" @click="deleWy(index)" style="margin-left: 20px; flex-shrink: 0;">鍒犻櫎</el-link>
                     </div>
                   </el-form-item>
-                </template>
+                </div>
               </div>
             </el-form>
           </div>
diff --git a/admin/src/views/project/housingList.vue b/admin/src/views/project/housingList.vue
index b5becde..898b009 100644
--- a/admin/src/views/project/housingList.vue
+++ b/admin/src/views/project/housingList.vue
@@ -40,9 +40,9 @@
         <el-table-column prop="feeArea" label="璁¤垂闈㈢Н(m虏)" min-width="80px"></el-table-column>
         <el-table-column prop="" label="绉熻祦鐘舵��" min-width="80px">
           <template v-slot="{row}">
-            <span v-if="row.leaseStatus == 0">寰呯璧�</span>
-            <span v-if="row.leaseStatus == 1">宸茬璧�</span>
-            <span v-if="row.leaseStatus == 2">鏈紑鍚璧�</span>
+            <span v-if="row.leaseStatus == 0">寰呯</span>
+            <span v-else-if="row.leaseStatus == 1">宸茬</span>
+            <span v-else>-</span>
           </template>
         </el-table-column>
         <el-table-column prop="isInvestment" label="鎷涘晢鐘舵��" min-width="60px">
diff --git a/h5/pages/common/memberSel.vue b/h5/pages/common/memberSel.vue
index ee80a52..24c5818 100644
--- a/h5/pages/common/memberSel.vue
+++ b/h5/pages/common/memberSel.vue
@@ -64,7 +64,7 @@
 					realname: param.name,
 					id: param.id
 				}).then(res => {
-					this.memberList = res.data || []
+					this.memberList = [{id: '', realname: '鍏ㄩ儴'}, ...res.data]
 				})
 			}
 		}
diff --git a/h5/pages/operation/record.vue b/h5/pages/operation/record.vue
index 18c1025..14fc07e 100644
--- a/h5/pages/operation/record.vue
+++ b/h5/pages/operation/record.vue
@@ -99,7 +99,7 @@
 			},
 			getpeo() {
 				findInternalList().then(res => {
-					this.columns = [res.data]
+					this.columns = [...res.data]
 				})
 			},
 			confirm(e) {
diff --git a/h5/pages/polling/task.vue b/h5/pages/polling/task.vue
index e93198f..e89f434 100644
--- a/h5/pages/polling/task.vue
+++ b/h5/pages/polling/task.vue
@@ -1,173 +1,196 @@
 <template>
 	<view class="main_app">
-<!-- 		<view class="head_wrap">
+		<!-- 		<view class="head_wrap">
 			<view class="search_wrap">
 				<image class="mr12 search" src="@/static/home/ic_search@2x.png" mode="widthFix"></image>
 				<input v-model="param.keyword" @confirm="getList()" type="text" placeholder="鎼滅储妤煎畤/鎴块棿鍚嶇О" placeholder-class="placeholder9" />
 			</view>
-		</view> -->
-		<!--  -->
-		<view class="tabs">
-			<view class="tab" :class="{active: param.queryStatus == '0,1'}" @click="tabsClick('0,1')">
-				<text>寰呭鐞�</text>
-				<text class="border"></text>
-			</view>
-			<view class="tab" :class="{active: param.queryStatus == 3}" @click="tabsClick(3)">
-				<text>宸插鐞�</text>
-				<text class="border"></text>
-			</view>
-			<view class="tab" @click="allClick">
-				<view class="name">
-					<image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image>
-					<image v-else class="icon" src="@/static/check.png" mode=""></image>
-					<text>鏌ョ湅鍏ㄩ儴</text>
-				</view>
-				<text class="border"></text>
-			</view>
+		</view> -->
+		<!--  -->
+		<view class="tabs">
+			<view class="tab" :class="{active: param.queryStatus == '0,1'}" @click="tabsClick('0,1')">
+				<text>寰呭鐞�</text>
+				<text class="border"></text>
+			</view>
+			<view class="tab" :class="{active: param.queryStatus == 3}" @click="tabsClick(3)">
+				<text>宸插鐞�</text>
+				<text class="border"></text>
+			</view>
+			<view class="tab" @click="allClick">
+				<view class="name">
+					<image v-if="selectAll" class="icon" src="@/static/checked.png" mode=""></image>
+					<image v-else class="icon" src="@/static/check.png" mode=""></image>
+					<text>鏌ョ湅鍏ㄩ儴</text>
+				</view>
+				<text class="border"></text>
+			</view>
 		</view>
 		<!--  -->
-		<view class="list">
-			<view class="item" v-for="item in list" @click="itemClick(item)">
-				<image v-if="item.status == 0 || item.status == 1" src="@/static/side/xunjianed.png" class="icon"></image>
-				<image v-else src="@/static/side/xunjian.png" class="icon"></image>
-				<view class="content">
-					<view class="name_wrap line">
-						<view class="name">{{item.planTitle}}</view>
-						<view class="status" :class="{
-							green: item.status == 1,
-							red: item.status == 2,
-							gray: item.status == 3 || item.status == 4
-						}">{{statusM[item.status]}}</view>
-					</view>
-					<view class="line" v-if="item.startDate">浠诲姟鏃ユ湡锛歿{ item.startDate.slice(0, 11) }}</view>
-					<view class="line">鎵ц鏃堕棿锛歿{ item.startDate.slice(11, 16) }} 鑷� {{ item.endDate.slice(11, 16) }}</view>
-					<view class="line">
-						<view>瀹屾垚鎯呭喌锛歿{item.finishNum || 0}}/{{item.patrolNum}}</view>
-						<view class="btn">
-							<image src="@/static/side/ic_saoma@2x.png" class="saoma" mode=""></image>
-							<view>鎵爜宸℃</view>
-						</view>
+		<scroll-view scroll-y="true" class="scroll_Y" @scrolltolower="scrolltolower">
+			<view class="list">
+				<view class="item" v-for="item in list" @click="itemClick(item)">
+					<image v-if="item.status == 0 || item.status == 1" src="@/static/side/xunjianed.png" class="icon"></image>
+					<image v-else src="@/static/side/xunjian.png" class="icon"></image>
+					<view class="content">
+						<view class="name_wrap line">
+							<view class="name">{{item.planTitle}}</view>
+							<view class="status" :class="{
+								green: item.status == 1,
+								red: item.status == 2,
+								gray: item.status == 3 || item.status == 4
+							}">{{statusM[item.status]}}</view>
+						</view>
+						<view class="line" v-if="item.startDate">浠诲姟鏃ユ湡锛歿{ item.startDate.slice(0, 11) }}</view>
+						<view class="line">鎵ц鏃堕棿锛歿{ item.startDate.slice(11, 16) }} 鑷� {{ item.endDate.slice(11, 16) }}</view>
+						<view class="line">
+							<view>瀹屾垚鎯呭喌锛歿{item.finishNum || 0}}/{{item.patrolNum}}</view>
+							<view class="btn">
+								<image src="@/static/side/ic_saoma@2x.png" class="saoma" mode=""></image>
+								<view>鎵爜宸℃</view>
+							</view>
+						</view>
 					</view>
 				</view>
 			</view>
-		</view>
+		</scroll-view>
+
 		<!--  -->
 	</view>
 </template>
 
-<script>
-	import { ywPatrolTaskPost } from '@/api'
+<script>
+	import {
+		ywPatrolTaskPost
+	} from '@/api'
 	export default {
 		data() {
 			return {
-				param: {
-					queryStatus: '0,1'
-				},
-				list: [],
-				activeTab: 0,
-				selectAll: false,
-				page: 1,
-				
-				statusM: {
-					0: '寰呭紑濮�',
-					1: '杩涜涓�',
-					2: '宸茶秴鏈�',
-					3: '宸插畬鎴�',
-					4: '宸插彇娑�',
+				param: {
+					queryStatus: '0,1'
+				},
+				list: [],
+				activeTab: 0,
+				selectAll: false,
+				page: 1,
+
+				statusM: {
+					0: '寰呭紑濮�',
+					1: '杩涜涓�',
+					2: '宸茶秴鏈�',
+					3: '宸插畬鎴�',
+					4: '宸插彇娑�',
 				}
 			};
-		},
-		onLoad() {
-			this.getList()
-		},
-		onReachBottom() {
-			const {total,list} = this
-			if (list.length < total) {
-				this.page = this.page + 1
-				this.getList()
-			} else {
-				this.showToast('鏆傛棤鏇村鏁版嵁')
-			}
 		},
-		methods: {
-			tabsClick(val) {
-				this.param.status = val
-				this.page = 1
-				this.list = []
-				this.getList()
-			},
-			allClick() {
-				this.selectAll = !this.selectAll
-				this.list = []
-				this.page = 1
-				this.getList()
-			},
-			itemClick(item) {
-				uni.navigateTo({
-					url: '/pages/polling/detail?id=' + item.id
-				})
-			},
-			getList() {
-				const { page, param, selectAll } = this
-				ywPatrolTaskPost({
-					model: {...param, dealUserId: selectAll ? '' : uni.getStorageSync('userInfo').id, },
-					page,
-					capacity: 10
-				}).then(res => {
-					this.list = [...this.list, ...res.data.records]
-					this.total = res.data.total
-				})
+		onLoad() {
+			this.getList()
+		},
+		methods: {
+			scrolltolower() {
+				const {
+					total,
+					list
+				} = this
+				if (list.length < total) {
+					this.page = this.page + 1
+					this.getList()
+				} else {
+					this.showToast('鏆傛棤鏇村鏁版嵁')
+				}
+			},
+			tabsClick(val) {
+				this.param.queryStatus = val
+				this.page = 1
+				this.list = []
+				this.getList()
+			},
+			allClick() {
+				this.selectAll = !this.selectAll
+				this.list = []
+				this.page = 1
+				this.getList()
+			},
+			itemClick(item) {
+				uni.navigateTo({
+					url: '/pages/polling/detail?id=' + item.id
+				})
+			},
+			getList() {
+				const {
+					page,
+					param,
+					selectAll
+				} = this
+				ywPatrolTaskPost({
+					model: {
+						...param,
+						dealUserId: selectAll ? '' : uni.getStorageSync('userInfo').id,
+					},
+					page,
+					capacity: 10
+				}).then(res => {
+					this.list = [...this.list, ...res.data.records]
+					this.total = res.data.total
+				})
 			}
 		}
 	}
 </script>
 
-<style lang="scss" scoped>
-	.main_app{
-		padding: 0 30rpx;
-	}
-	.tabs{
-		display: flex;
-		width: 750rpx;
-		margin: 12rpx -30rpx 0;
-		border-bottom: 1rpx solid #E5E5E5;
-		.tab{
-			font-size: 30rpx;
-			color: #666666;
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			justify-content: flex-end;
-			height: 88rpx;
-			.name{
-				display: flex;
-				align-items: center;
-			}
-			.icon{
-				width: 28rpx;
-				height: 28rpx;
-				margin-right: 10rpx;
-			}
-			.border{
-				width: 54rpx;
-				height: 6rpx;
-				background-color: #fff;
-				border-radius: 3rpx;
-				margin-top: 24rpx;
-			}
-		}
-		.active{
-			font-weight: 600;
-			font-size: 32rpx;
-			color: #222222;
-			.border{
-				background-color: $primaryColor;
-			}
-			
-		}
-		
+<style lang="scss" scoped>
+	.main_app {
+		padding: 0 30rpx;
 	}
+
+	.tabs {
+		display: flex;
+		width: 750rpx;
+		margin: 12rpx -30rpx 0;
+		border-bottom: 1rpx solid #E5E5E5;
+
+		.tab {
+			font-size: 30rpx;
+			color: #666666;
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: flex-end;
+			height: 88rpx;
+
+			.name {
+				display: flex;
+				align-items: center;
+			}
+
+			.icon {
+				width: 28rpx;
+				height: 28rpx;
+				margin-right: 10rpx;
+			}
+
+			.border {
+				width: 54rpx;
+				height: 6rpx;
+				background-color: #fff;
+				border-radius: 3rpx;
+				margin-top: 24rpx;
+			}
+		}
+
+		.active {
+			font-weight: 600;
+			font-size: 32rpx;
+			color: #222222;
+
+			.border {
+				background-color: $primaryColor;
+			}
+
+		}
+
+	}
+
 	.head_wrap {
 		display: flex;
 		align-items: center;
@@ -180,9 +203,11 @@
 			background: #F7F7F7;
 			border-radius: 38rpx;
 			padding-left: 30rpx;
-			input{
-				flex: 1;
+
+			input {
+				flex: 1;
 			}
+
 			.search {
 				width: 28rpx;
 				height: 28rpx;
@@ -191,70 +216,86 @@
 
 	}
 
+	.scroll_Y {
+		height: calc(100vh - 230rpx);
+	}
+
 	.list {
 		.item {
 			display: flex;
-			// height: 290rpx;
-			padding: 30rpx 0;
+			// height: 290rpx;
+			padding: 30rpx 0;
 			border-bottom: 2rpx solid #E5E5E5;
+			&:nth-last-child(1){
+				border: none;
+			}
 			.icon {
 				width: 80rpx;
-				height: 80rpx;
+				height: 80rpx;
 				margin-right: 24rpx;
 			}
 
 			.content {
-				flex: 1;
-				color: #666666;
-				display: flex;
-				flex-direction: column;
-				justify-content: space-between;
-				.line{
-					margin-bottom: 20rpx;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					.btn{
-						display: flex;
-						align-items: center;
-						justify-content: center;
-						width: 180rpx;
-						height: 60rpx;
-						background: $primaryColor;
-						color: #fff;
-						font-size: 26rpx;
-						box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0,104,255,0.3);
-						border-radius: 30rpx;
-						.saoma{
-							width: 28rpx;
-							height: 28rpx;
-							margin-right: 8rpx;
-						}
-					}
-					&:nth-last-child(1){
-						margin-bottom: 0;
-					}
-				}
-				.name_wrap{
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					.name{
-						display: flex;
-						align-items: flex-end;
-						font-weight: 600;
-						font-size: 34rpx;
-						color: #222222;
-					}
-					.status{
-						color: $primaryColor;
-					}
-					.green{
-						color: #0ADE79;
-					}
-					.gray{
-						color: #999999;
-					}
+				flex: 1;
+				color: #666666;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.line {
+					margin-bottom: 20rpx;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.btn {
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						width: 180rpx;
+						height: 60rpx;
+						background: $primaryColor;
+						color: #fff;
+						font-size: 26rpx;
+						box-shadow: 0rpx 4rpx 12rpx 0rpx rgba(0, 104, 255, 0.3);
+						border-radius: 30rpx;
+
+						.saoma {
+							width: 28rpx;
+							height: 28rpx;
+							margin-right: 8rpx;
+						}
+					}
+
+					&:nth-last-child(1) {
+						margin-bottom: 0;
+					}
+				}
+
+				.name_wrap {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.name {
+						display: flex;
+						align-items: flex-end;
+						font-weight: 600;
+						font-size: 34rpx;
+						color: #222222;
+					}
+
+					.status {
+						color: $primaryColor;
+					}
+
+					.green {
+						color: #0ADE79;
+					}
+
+					.gray {
+						color: #999999;
+					}
 				}
 			}
 		}
diff --git a/h5/pages/workOrder/edit.vue b/h5/pages/workOrder/edit.vue
index f51e237..4225aa1 100644
--- a/h5/pages/workOrder/edit.vue
+++ b/h5/pages/workOrder/edit.vue
@@ -26,7 +26,7 @@
 					<u-icon name="arrow-right" color="#999999" size="15"></u-icon>
 				</view>
 			</view>
-			<view class="item">
+			<view class="item" v-if="param.areaType == 0">
 				<view class="la">涓婇棬鏃堕棿</view>
 				<view class="line sel_wrap" @click="showTime = true">
 					<view class="left" :class="param.getDate ? '' : 'placeholder9'">{{ param.getDate ? param.getDate : '璇烽�夋嫨' }}
diff --git a/h5/pages/workOrder/list.vue b/h5/pages/workOrder/list.vue
index 6336405..7928b55 100644
--- a/h5/pages/workOrder/list.vue
+++ b/h5/pages/workOrder/list.vue
@@ -44,7 +44,7 @@
 						<view class="line">浣嶇疆绫诲瀷锛歿{item.areaType == '0' ? '瀹ゅ唴瑁呬慨' : '鍏叡鍖哄煙'}}</view>
 						<view class="line">宸ュ崟鍒嗙被锛歿{item.categoryName}}</view>
 						<view class="line">涓婃姤鏃堕棿锛歿{item.createDate}}</view>
-						<view class="line">涓婇棬鏃堕棿锛歿{item.getDate}}</view>
+						<view class="line" v-if="item.getDate">涓婇棬鏃堕棿锛歿{item.getDate}}</view>
 					</view>
 				</view>
 				<view v-if="list.length == 0" class="empty_wrap">
diff --git a/server/system_service/src/main/java/com/doumee/core/utils/DateCompare.java b/server/system_service/src/main/java/com/doumee/core/utils/DateCompare.java
index e6be864..630334d 100644
--- a/server/system_service/src/main/java/com/doumee/core/utils/DateCompare.java
+++ b/server/system_service/src/main/java/com/doumee/core/utils/DateCompare.java
@@ -39,17 +39,17 @@
      *                                浠ュ勾涓哄崟浣嶇浉宸负锛�6骞�
      *                                浠ユ湀涓哄崟浣嶇浉宸负锛�73涓湀
      *                                浠ユ棩涓哄崟浣嶇浉宸负锛�2220澶�
-     * @param fromDate
-     * @param toDate
+     * @param toDateOrigin
      * @return
      */
-    public static DateCompare dayCompare(Date fromDate,Date toDate,Date freeStart,Date freeEnd){
+    public static DateCompare dayCompare(Date fromDateOrigin,Date toDateOrigin,Date freeStart,Date freeEnd){
         //寮�濮嬫椂闂村線鍚庡欢浼革紝闄ゅ幓鏈夋晥鏃舵湡
-        fromDate = DateUtil.addDaysToDate(fromDate,getIntersectingDays(fromDate,DateUtil.addDaysToDate(toDate,1),freeStart,DateUtil.addDaysToDate(freeEnd,1)));
-        if(toDate.getTime()<  fromDate.getTime()){
+        Date fromDate = DateUtil.addDaysToDate(fromDateOrigin,getIntersectingDays(fromDateOrigin,DateUtil.addDaysToDate(toDateOrigin,1),freeStart,DateUtil.addDaysToDate(freeEnd,1)));
+        if(toDateOrigin.getTime()<  fromDate.getTime()){
             return DateCompare.builder().day(0).month(0).year(0).yearFloat(new BigDecimal(0)).monthFloat(new BigDecimal(0)).build();
         }
-        toDate = DateUtil.addDaysToDate(toDate,1);//鍖呭惈鎴鏃ユ湡
+        Date toDate =DateUtil.addDaysToDate(toDateOrigin, 1);
+//        toDate = DateUtil.addDaysToDate(toDate,1);//鍖呭惈鎴鏃ユ湡
         Calendar  from  =  Calendar.getInstance();
         from.setTime(fromDate);
         Calendar  to  =  Calendar.getInstance();
@@ -67,7 +67,7 @@
         BigDecimal yearFloat = new BigDecimal(year) ;
         BigDecimal monthFloat = new BigDecimal(month) ;
 
-        int yearDays = day - (DateUtil.daysBetweenDates(DateUtil.addYearToDate(fromDate,year),fromDate)+1);
+        int yearDays = day - (DateUtil.daysBetweenDates(DateUtil.addYearToDate(fromDate,year),fromDate));
         if(yearDays!=0){
             if(yearDays <0){
                 year = year-1;
@@ -76,7 +76,7 @@
             }
             yearFloat = yearFloat.add(new BigDecimal(1.0*yearDays).divide(new BigDecimal(365.0), 15,RoundingMode.HALF_UP));
         }
-        int monthDays = day - (DateUtil.daysBetweenDates(DateUtil.addMonthToDate(fromDate,month),fromDate)+1) ;
+        int monthDays = day - (DateUtil.daysBetweenDates(DateUtil.addMonthToDate(fromDate,month),fromDate)) ;
         if(monthDays!=0){
             if(monthDays <0){
                 month = month-1;
@@ -89,7 +89,7 @@
     }
 
     public static void main(String[] args) {
-        DateCompare dateCompare =   DateCompare.monthYearCompare(DateUtil.getDateFromString("2024-12-02 00:00:00"),DateUtil.getDateByString("2025-01-02 00:00:00") );
+        DateCompare dateCompare =   DateCompare.monthYearCompare(DateUtil.getDateFromString("2025-06-03 00:00:00"),DateUtil.getDateByString("2025-09-02 00:00:00") );
         System.out.println(dateCompare.day);
         System.out.println(dateCompare.monthDays);
         System.out.println(dateCompare.month);
@@ -99,9 +99,9 @@
         System.out.println(dateCompare.year);
         System.out.println(dateCompare.yearFloat);
     }
-    public static DateCompare monthYearCompare(Date fromDate,Date toDate ){
+    public static DateCompare monthYearCompare(Date fromDate,Date toDateOrigin ){
         //寮�濮嬫椂闂村線鍚庡欢浼革紝闄ゅ幓鏈夋晥鏃舵湡
-        toDate =DateUtil.addDaysToDate(toDate, 1);
+        Date toDate =DateUtil.addDaysToDate(toDateOrigin, 1);
         Calendar  from  =  Calendar.getInstance();
         from.setTime(fromDate);
         Calendar  to  =  Calendar.getInstance();
@@ -119,7 +119,7 @@
         BigDecimal yearFloat = new BigDecimal(year) ;
         BigDecimal monthFloat = new BigDecimal(month) ;
 
-        int yearDays = day - (DateUtil.daysBetweenDates(DateUtil.addYearToDate(fromDate,year),fromDate)+1);
+        int yearDays = day - (DateUtil.daysBetweenDates(DateUtil.addYearToDate(fromDate,year),fromDate));
         if(yearDays!=0){
             if(yearDays <0){
                 year = year-1;
@@ -128,7 +128,7 @@
             }
             yearFloat = yearFloat.add(new BigDecimal(1.0*yearDays).divide(new BigDecimal(365.0), 15,RoundingMode.HALF_UP));
         }
-        int monthDays = day - (DateUtil.daysBetweenDates(DateUtil.addMonthToDate(fromDate,month),fromDate)+1) ;
+        int monthDays = day - (DateUtil.daysBetweenDates(DateUtil.addMonthToDate(fromDate,month),fromDate)) ;
         if(monthDays!=0){
             if(monthDays <0){
                 month = month-1;
diff --git a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwProjectCloudController.java b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwProjectCloudController.java
index 02e8e94..02ec71c 100644
--- a/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwProjectCloudController.java
+++ b/server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwProjectCloudController.java
@@ -7,6 +7,7 @@
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
 import com.doumee.core.utils.Constants;
+import com.doumee.dao.business.dto.DataDTO;
 import com.doumee.dao.business.model.YwProject;
 import com.doumee.dao.business.model.YwRoom;
 import com.doumee.dao.business.vo.ProjectDataVO;
@@ -90,8 +91,8 @@
     @ApiOperation("椤圭洰鏍�")
     @PostMapping("/tree")
     @CloudRequiredPermission("business:ywproject:query")
-    public ApiResponse<List<ProjectDataVO>> tree (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
-        return ApiResponse.success(ywProjectService.projectTree());
+    public ApiResponse<List<ProjectDataVO>> tree (@RequestBody DataDTO dataDTO, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
+        return ApiResponse.success(ywProjectService.projectTree(dataDTO));
     }
 
 
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/DataDTO.java b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/DataDTO.java
new file mode 100644
index 0000000..82dad9d
--- /dev/null
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/dto/DataDTO.java
@@ -0,0 +1,29 @@
+package com.doumee.dao.business.dto;
+
+import com.doumee.core.model.LoginUserInfo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * Created by IntelliJ IDEA.
+ *
+ * @Author : Rk
+ * @create 2024/5/20 14:54
+ */
+@Data
+@ApiModel("鏃ユ湡鏌ヨ绫�")
+public class DataDTO {
+
+    @ApiModelProperty(value = "椤圭洰涓婚敭")
+    private Integer projectId;
+
+    @ApiModelProperty(value = "寮�濮嬫棩鏈�: yyyy-MM-dd")
+    private String startDate;
+
+    @ApiModelProperty(value = "缁撴潫鏃ユ湡: yyyy-MM-dd")
+    private String endDate;
+
+}
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwProjectService.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwProjectService.java
index d4232c7..7175677 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwProjectService.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/YwProjectService.java
@@ -3,6 +3,7 @@
 import com.doumee.core.model.LoginUserInfo;
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
+import com.doumee.dao.business.dto.DataDTO;
 import com.doumee.dao.business.model.YwProject;
 import com.doumee.dao.business.vo.ProjectDataVO;
 
@@ -99,5 +100,5 @@
     long count(YwProject ywProject);
 
 
-    List<ProjectDataVO> projectTree();
+    List<ProjectDataVO> projectTree(DataDTO dataDTO);
 }
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
index ad6f19c..85e4aac 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -2118,9 +2118,6 @@
         ){
             throw new BusinessException(ResponseStatus.BAD_REQUEST);
         }
-        if(StringUtils.isNotBlank(member.getEmail())&&!Constants.validEmail(member.getEmail())){
-            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇峰~鍐欐纭殑email");
-        }
         LoginUserInfo loginUserInfo = member.getLoginUserInfo();
         member.setCreator(loginUserInfo.getId());
         member.setCreateDate(new Date());
@@ -2162,8 +2159,10 @@
     @Override
     public List<Member> ywList(Member member) {
         List<Member> memberList = memberMapper.selectList(new QueryWrapper<Member>()
-                .lambda().eq(Member::getIsdeleted,Constants.ZERO)
+                .lambda()
+                .eq(Member::getIsdeleted,Constants.ZERO)
                         .eq(Member::getStatus,Constants.ZERO)
+                .eq(Objects.nonNull(member.getCustomerId()),Member::getCustomerId,member.getCustomerId())
                 .eq(Member::getType,Constants.memberType.customer)
         );
         return memberList;
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
index 03953ce..0c3e1dc 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractBillServiceImpl.java
@@ -98,11 +98,14 @@
             ywContractBill.setEndDate(ywContractBill.getPlanPayDate());
         }
         //鏌ヨ鍚堝悓涓嬬殑鏈�澶х殑搴忓彿
-        List<YwContractBill> ywContractBillList = ywContractBillMapper.selectList(new QueryWrapper<YwContractBill>().lambda().eq(YwContractBill::getContractId,ywContract.getId()).orderByDesc(YwContractBill::getId));
+        List<YwContractBill> ywContractBillList = ywContractBillMapper.selectList(new QueryWrapper<YwContractBill>()
+                .lambda().eq(YwContractBill::getContractId,ywContract.getId())
+                .in(YwContractBill::getCostType,Constants.ZERO,Constants.SIX,Constants.FOUR,Constants.FIVE,7)
+                .orderByDesc(YwContractBill::getId));
         if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ywContractBillList)){
             ywContractBill.setSortnum(ywContractBillList.size() + 1 );
         }else{
-            ywContractBill.setSortnum(Constants.ZERO);
+            ywContractBill.setSortnum(0);
         }
         ywContractBillMapper.insert(ywContractBill);
 
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
index 90cf756..2e5a8ff 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -91,6 +91,7 @@
     }
 
     private void dealRoomsForContract(YwContract model) {
+        this.dealRoomsValid(model);
         List<YwContractRoom> list = new ArrayList<>();
         for(YwRoom room :model.getRoomList()){
             YwContractRoom t = new YwContractRoom();
@@ -106,6 +107,46 @@
         }
         ywContractRoomMapper.insert(list);
     }
+
+    private void dealRoomsValid(YwContract model){
+        List<Integer> roomIds = model.getRoomList().stream().map(i->i.getId()).collect(Collectors.toList());
+        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(roomIds)){
+            if(ywContractMapper.selectJoinCount(new MPJLambdaWrapper<YwContract>()
+                    .leftJoin(YwContractRoom.class,YwContractRoom::getContractId,YwContract::getId)
+                    .eq(YwContractRoom::getType,Constants.ZERO)
+                    .in(YwContractRoom::getRoomId,roomIds)
+                    .in(YwContract::getStatus,Constants.ZERO,Constants.ONE,Constants.TWO)
+                    .apply(" (" +
+                            " ( t.START_DATE < '"+DateUtil.getFomartDate(model.getEndDate(),"yyyy-MM-dd HH:mm:ss")+"'  and t.END_DATE > '"+DateUtil.getFomartDate(model.getStartDate(),"yyyy-MM-dd HH:mm:ss")+"' ) " +
+                            "or " +
+                            " ( t.START_DATE < '"+DateUtil.getFomartDate(model.getEndDate(),"yyyy-MM-dd HH:mm:ss")+"'  and t.END_DATE > '"+DateUtil.getFomartDate(model.getStartDate(),"yyyy-MM-dd HH:mm:ss")+"' ) " +
+                            " ) ")
+
+            )>Constants.ZERO){
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鎴挎簮宸茶鍗犵敤璇峰埛鏂伴噸璇�");
+            };
+
+            if(ywContractMapper.selectJoinCount(new MPJLambdaWrapper<YwContract>()
+                    .leftJoin(YwContractRoom.class,YwContractRoom::getContractId,YwContract::getId)
+                    .eq(YwContractRoom::getType,Constants.ZERO)
+                    .in(YwContractRoom::getRoomId,roomIds)
+                    .in(YwContract::getStatus,Constants.THREE)
+                    .apply(" ( t.START_DATE < '"+DateUtil.getFomartDate(model.getBtDate(),"yyyy-MM-dd HH:mm:ss")+"' " +
+                            " and t.END_DATE > '"+DateUtil.getFomartDate(model.getStartDate(),"yyyy-MM-dd HH:mm:ss")+"' ) " )
+            )>Constants.ZERO){
+                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鎴挎簮宸茶鍗犵敤璇峰埛鏂伴噸璇�");
+            };
+
+
+
+        }
+
+
+
+
+
+    }
+
 
     @Override
     public   List<YwContractBill> getBillList(YwContract model){
@@ -311,9 +352,6 @@
         update.setBtFee(param.getBtFee());
         update.setBtRemark(getbackRentRemarkByParam(param));
         ywContractMapper.updateById(update);
-//        if(1==1){
-//            throw new BusinessException(ResponseStatus.NOT_ALLOWED);
-//        }
         dealLogBiz(param,Constants.YwLogType.CONTRACT_BACK, param.getLoginUserInfo().getRealname(),getbackRentLogByParam(param));
         return param.getId();
     }
@@ -441,12 +479,17 @@
                 totalBackFee = totalBackFee.add(fee);//绱閫�娆鹃噾棰�
             }
         }
+        List<YwContractBill> ywContractBillList = ywContractBillMapper.selectList(new QueryWrapper<YwContractBill>()
+                .lambda().eq(YwContractBill::getContractId,param.getId()).orderByDesc(YwContractBill::getId));
+        Integer sortNum = ywContractBillList.size();
         if(param.getAddBillList()!=null && param.getAddBillList().size()>0){
             for(YwContractBill addBill : param.getAddBillList()){
+                sortNum = sortNum + 1 ;
                 addBill.setIsdeleted(Constants.ZERO);
                 addBill.setContractId(param.getId());
                 addBill.setType(Constants.ONE);
                 addBill.setStatus(Constants.ZERO);
+                addBill.setTotleFee(addBill.getReceivableFee());
                 if(Constants.equalsInteger(addBill.getFeeType(),Constants.ONE)){
                     addBill.setStartDate(addBill.getPlanPayDate());
                     addBill.setEndDate(addBill.getPlanPayDate());
@@ -470,6 +513,7 @@
                 addBill.setBtUserId(param.getBtUserId());
                 addBill.setBtSignDate(param.getBtSignDate());
                 addBill.setBtType(param.getBtType());
+                addBill.setSortnum(sortNum );
                 newBills.add(addBill);
             }
             ywContractBillMapper.insert(param.getAddBillList());//鎵归噺鎻掑叆鏁版嵁
@@ -648,12 +692,15 @@
         }
         int num =1;
         for(int i=0;i<billList1.size();i++){
-            billList1.get(i).setSortnum(num);
-            num++;
+            if(Constants.equalsInteger( billList1.get(i).getCostType(),Constants.ZERO)){
+                billList1.get(i).setSortnum(num++);
+            }
         }
+        num =1;
         for(int i=0;i<billList2.size();i++){
-            billList2.get(i).setSortnum(num);
-            num++;
+            if(Constants.equalsInteger( billList2.get(i).getCostType(),Constants.ONE)){
+                billList2.get(i).setSortnum(num++);
+            }
         }
         if(model.getId()!=null){
             ywContractBillMapper.insert(billList1);
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwCustomerServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwCustomerServiceImpl.java
index 1fc2a89..f36d94a 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwCustomerServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwCustomerServiceImpl.java
@@ -61,9 +61,6 @@
             throw new BusinessException(ResponseStatus.BAD_REQUEST);
         }
         LoginUserInfo loginUserInfo = ywCustomer.getLoginUserInfo();
-        if(StringUtils.isNotBlank(ywCustomer.getEmail())&&!Constants.validEmail(ywCustomer.getEmail())){
-            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"璇峰~鍐欐纭殑email");
-        }
         ywCustomer.setStatus(Constants.ZERO);
         ywCustomer.setIsdeleted(Constants.ZERO);
         ywCustomer.setCreator(loginUserInfo.getId());
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java
index 651d6f1..8267901 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwPatrolTaskServiceImpl.java
@@ -146,6 +146,7 @@
                 .leftJoin(YwPatrolScheme.class,YwPatrolScheme::getId,YwPatrolTask::getSchemeId)
                 .eq(YwPatrolTask::getIsdeleted, Constants.ZERO)
                 .eq(Objects.nonNull(model.getStatus()) && !Constants.equalsInteger(model.getStatus(),Constants.TWO),YwPatrolTask::getStatus, model.getStatus())
+                .eq(Objects.nonNull(model.getDealUserId()),YwPatrolTask::getDealUserId, model.getDealUserId())
                 .apply(Objects.nonNull(model.getStatus()) && Constants.equalsInteger(model.getStatus(),Constants.TWO)," t.status = 1 and t.END_DATE > now() ")
                 .apply(StringUtils.isNotBlank(model.getQueryStatus())," find_in_set(t.status ,'"+model.getQueryStatus()+"') ")
                 .like(StringUtils.isNotBlank(model.getPlanTitle()),YwPatrolScheme::getTitle,model.getPlanTitle())
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwProjectServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwProjectServiceImpl.java
index b5dfdb8..e47627a 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwProjectServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwProjectServiceImpl.java
@@ -6,11 +6,13 @@
 import com.doumee.core.model.PageData;
 import com.doumee.core.model.PageWrap;
 import com.doumee.core.utils.Constants;
+import com.doumee.core.utils.DateUtil;
 import com.doumee.core.utils.Utils;
 import com.doumee.dao.business.YwBuildingMapper;
 import com.doumee.dao.business.YwFloorMapper;
 import com.doumee.dao.business.YwProjectMapper;
 import com.doumee.dao.business.YwRoomMapper;
+import com.doumee.dao.business.dto.DataDTO;
 import com.doumee.dao.business.model.*;
 import com.doumee.dao.business.vo.CompanyTree;
 import com.doumee.dao.business.vo.ProjectDataVO;
@@ -230,11 +232,12 @@
 
 
     @Override
-    public List<ProjectDataVO> projectTree(){
+    public List<ProjectDataVO> projectTree(DataDTO dataDTO){
         List<ProjectDataVO> projectDataVOList = new ArrayList<>();
         List<YwProject>  ywProjectList = ywProjectMapper.selectList(new QueryWrapper<YwProject>().lambda()
                 .eq(YwProject::getIsdeleted,Constants.ZERO)
                 .eq(YwProject::getStatus,Constants.ZERO)
+                .eq(Objects.nonNull(dataDTO.getProjectId()),YwProject::getId,dataDTO.getProjectId())
                 .orderByAsc(YwProject::getSortnum)
         );
         for (YwProject ywProject:ywProjectList) {
@@ -247,6 +250,7 @@
         List<YwBuilding>  ywBuildingList = ywBuildingMapper.selectList(new QueryWrapper<YwBuilding>().lambda()
                 .eq(YwBuilding::getIsdeleted,Constants.ZERO)
                 .eq(YwBuilding::getStatus,Constants.ZERO)
+                .eq(Objects.nonNull(dataDTO.getProjectId()),YwBuilding::getProjectId,dataDTO.getProjectId())
                 .orderByAsc(YwBuilding::getSortnum)
         );
 
@@ -262,6 +266,7 @@
         List<YwFloor>  ywFloorList = ywFloorMapper.selectList(new QueryWrapper<YwFloor>().lambda()
                 .eq(YwFloor::getIsdeleted,Constants.ZERO)
                 .eq(YwFloor::getStatus,Constants.ZERO)
+                .eq(Objects.nonNull(dataDTO.getProjectId()),YwFloor::getProjectId,dataDTO.getProjectId())
                 .orderByAsc(YwFloor::getSortnum)
         );
 
@@ -273,19 +278,25 @@
             projectDataVOList.add(projectDataVO);
         }
 
-
-
         List<YwRoom>  ywRoomList = ywRoomMapper.selectList(new QueryWrapper<YwRoom>().lambda()
                 .eq(YwRoom::getIsdeleted,Constants.ZERO)
                 .eq(YwRoom::getStatus,Constants.ZERO)
+                .eq(Objects.nonNull(dataDTO.getProjectId()),YwRoom::getProjectId,dataDTO.getProjectId())
+                .apply(Objects.nonNull(dataDTO)&&Objects.nonNull(dataDTO.getStartDate())&&Objects.nonNull(dataDTO.getEndDate())," id not in  (" +
+                        " SELECT y2.room_id FROM  yw_contract y1 left join yw_contract_room y2 on y1.id = y2.contract_id where 1 = 1 and y1.`STATUS` in( 0,1,2) " +
+                        " and y1.START_DATE < '"+dataDTO.getEndDate()+" 00:00:00' and y1.END_DATE > '"+ dataDTO.getStartDate() +"  00:00:00' " +
+                        "  ) ")
+                .apply(Objects.nonNull(dataDTO)&&Objects.nonNull(dataDTO.getStartDate())&&Objects.nonNull(dataDTO.getEndDate())," id not in  (" +
+                        " SELECT y2.room_id FROM  yw_contract y1 left join yw_contract_room y2 on y1.id = y2.contract_id where 1 = 1 and y1.`STATUS` = 3 " +
+                        " and y1.START_DATE < '"+dataDTO.getEndDate()+" 00:00:00' and y1.BT_DATE > '"+ dataDTO.getStartDate() +"  00:00:00' " +
+                        "  ) ")
                 .orderByAsc(YwRoom::getSortnum)
         );
-
 
         for (YwRoom data:ywRoomList) {
             ProjectDataVO projectDataVO = new ProjectDataVO();
             BeanUtils.copyProperties(data,projectDataVO);
-            projectDataVO.setName(data.getCode());
+            projectDataVO.setName(data.getCode() + " " + data.getArea() +"銕�");
             projectDataVO.setPId(data.getFloor());
             projectDataVO.setLv(Constants.THREE);
             projectDataVOList.add(projectDataVO);
diff --git a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwRoomServiceImpl.java b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwRoomServiceImpl.java
index 8cf6dd7..87d1ec9 100644
--- a/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwRoomServiceImpl.java
+++ b/server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwRoomServiceImpl.java
@@ -150,9 +150,9 @@
                 .selectAs(YwProject::getName,YwRoom::getProjectName)
                 .selectAs(YwFloor::getName,YwRoom::getFloorName)
                 .selectAs(YwBuilding::getName,YwRoom::getBuildingName)
-                .select(" select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END  " +
+                .select(" ifnull( ( select case when y1.status = 3 then now() BETWEEN y1.START_DATE and y1.BT_DATE else now() BETWEEN y1.START_DATE and y1.END_DATE END  " +
                         "from yw_contract y1 left join yw_contract_room y2 on y1.id = y2.CONTRACT_ID and y2.TYPE = 0  " +
-                        "where y1.`STATUS` <> 4  and y2.room_id = t.id order by y1.create_date desc  limit 1   ",YwRoom::getLeaseStatus)
+                        "where y1.`STATUS` <> 4  and y2.room_id = t.id order by y1.create_date desc  limit 1  ) ,0) ",YwRoom::getLeaseStatus)
                 .leftJoin(YwProject.class,YwProject::getId,YwRoom::getProjectId)
                 .leftJoin(YwBuilding.class,YwBuilding::getId,YwRoom::getBuildingId)
                 .leftJoin(YwFloor.class,YwFloor::getId,YwRoom::getFloor);

--
Gitblit v1.9.3