Browse Source

房源档案

LAPTOP-FO2T5SIU\35838 3 months ago
parent
commit
6928a48864

+ 7 - 3
pro-base/src/main/resources/mybatis/buildManage/ParkRoomExtendMapper.xml

@@ -156,6 +156,7 @@
     left join park_floor_disc d on d.id = r.disc_id
     left join mnp_building b on b.id = r.build_id
     <where>
+      and ifnull(r.del_flag,0) = 0
       <if test="groupId != null and groupId != ''">
         and r.group_id = #{groupId}
       </if>
@@ -176,12 +177,15 @@
       select r.*,c.id contractId,c.customer_management_id,c.record_number,c.contract_number,
              c.total_price contractTotalPrice,c.collection_status,c.house_price contractHousePrice,
              c.buyer_money contractBuyerMoney,c.buyer_money receivableMoney,c.signing_date,
-             cm.buyer_identity_card
+             cm.buyer_identity_card,p.area_status
       from park_room r
-      left join contract_manage c on r.id = c.house_id
+      left join park_info p on p.id = r.group_id
+      left join (select id,house_id,max(created_at) from contract_manage group by house_id) c_temp on c_temp.house_id = r.id
+      left join contract_manage c on c.id = c_temp.id
       left join customer_management cm on cm.id = c.customer_management_id
-      and c.created_at = (select max(created_at) from contract_manage where contract_manage.house_id = r.id)
+
       <where>
+        and ifnull(r.del_flag,0) = 0
         <if test="groupId != null and groupId != ''">
           and r.group_id = #{groupId}
         </if>