|
@@ -85,13 +85,7 @@
|
|
|
<select id="reportList" resultType="com.idea.customerManagement.dto.CustomerManagementDto">
|
|
|
select p.group_name,p.group_id,f.id discId, f.name disc_name,
|
|
|
(select count(1) from mnp_building where disc_id = f.id) buildCount,
|
|
|
- (select count(1) from park_room where disc_id = f.id) roomCount,
|
|
|
- (select count(1) from customer_management where disc_id = f.id and status = 2 ) waitSigningCount,
|
|
|
- (select count(1) from customer_management where disc_id = f.id and status = 3 ) signingCount,
|
|
|
- (select count(1) from customer_management where disc_id = f.id and status = 4 ) enteredCount,
|
|
|
- (select count(1) from contract_manage where collection_status = 2 and house_id in (
|
|
|
- select id from park_room where disc_id = f.id
|
|
|
- ) ) settledCount
|
|
|
+ (select count(1) from park_room where disc_id = f.id) roomCount
|
|
|
from park_floor_disc f
|
|
|
left join park_info p on p.id = f.group_id
|
|
|
left join park_room r on r.disc_id = f.id
|
|
@@ -114,4 +108,29 @@
|
|
|
select customer_management_id from buyer
|
|
|
)
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getContractCountByDiscIdAndStatus" resultType="java.lang.Integer">
|
|
|
+ select ifnull(count(1),0) from contract_manage
|
|
|
+ <where>
|
|
|
+ and house_id in (
|
|
|
+ select id from park_room where disc_id = #{discId}
|
|
|
+ )
|
|
|
+ <if test="status != null and status != '' ">
|
|
|
+ and contract_status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test="collectionStatus != null and collectionStatus != '' ">
|
|
|
+ and collection_status = #{collectionStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getCheckInCountByDiscId" resultType="java.lang.Integer">
|
|
|
+ select ifnull(count(1),0) from check_in where contract_manage_id in (
|
|
|
+ select id from contract_manage where house_id in (
|
|
|
+ select id from park_room where disc_id = #{discId}
|
|
|
+ )
|
|
|
+ ) and status = '1'
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|