LAPTOP-FO2T5SIU\35838 vor 11 Monaten
Ursprung
Commit
d6be48deef
21 geänderte Dateien mit 176 neuen und 53 gelöschten Zeilen
  1. 4 0
      pro-base/src/main/java/com/idea/buyingMore/dto/BuyingMoreDto.java
  2. 4 0
      pro-base/src/main/java/com/idea/customerManagement/dto/ContractManageDto.java
  3. 4 0
      pro-base/src/main/java/com/idea/customerManagement/dto/IntentionalDepositDto.java
  4. 4 0
      pro-base/src/main/java/com/idea/customerManagement/dto/RoomSelectionInfoDto.java
  5. 4 0
      pro-base/src/main/java/com/idea/invoice/dto/InvoiceManageDto.java
  6. 1 1
      pro-base/src/main/java/com/idea/invoice/dto/ReceiptManageDto.java
  7. 5 0
      pro-base/src/main/java/com/idea/paymentManagement/dto/RefundManageDto.java
  8. 5 0
      pro-base/src/main/java/com/idea/saleManage/model/CheckInMore.java
  9. 4 0
      pro-base/src/main/java/com/idea/saleManage/model/PropertyRegistrationMore.java
  10. 24 14
      pro-base/src/main/resources/mybatis/buyingMore/BuyingMoreExtendMapper.xml
  11. 7 0
      pro-base/src/main/resources/mybatis/customerManagement/ContractManageExtendMapper.xml
  12. 9 0
      pro-base/src/main/resources/mybatis/customerManagement/CustomerManagementExtendMapper.xml
  13. 10 0
      pro-base/src/main/resources/mybatis/customerManagement/IntentionalDepositExtendMapper.xml
  14. 6 0
      pro-base/src/main/resources/mybatis/customerManagement/RoomSelectionInfoExtendMapper.xml
  15. 6 0
      pro-base/src/main/resources/mybatis/invoice/InvoiceManageExtendMapper.xml
  16. 6 0
      pro-base/src/main/resources/mybatis/invoice/ReceiptManageExtendMapper.xml
  17. 25 17
      pro-base/src/main/resources/mybatis/paymentManagement/MaintenanceFundsManagementExtendMapper.xml
  18. 30 21
      pro-base/src/main/resources/mybatis/paymentManagement/PayLogExtendMapper.xml
  19. 6 0
      pro-base/src/main/resources/mybatis/paymentManagement/RefundManageExtendMapper.xml
  20. 6 0
      pro-base/src/main/resources/mybatis/saleManage/CheckInMapper.xml
  21. 6 0
      pro-base/src/main/resources/mybatis/saleManage/PropertyRegistrationMapper.xml

+ 4 - 0
pro-base/src/main/java/com/idea/buyingMore/dto/BuyingMoreDto.java

@@ -22,5 +22,9 @@ public class BuyingMoreDto extends BuyingMore {
      */
     private String transferProportionAfterStr;
 
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 
 }

+ 4 - 0
pro-base/src/main/java/com/idea/customerManagement/dto/ContractManageDto.java

@@ -37,4 +37,8 @@ public class ContractManageDto extends ContractManage {
      */
     private String payType;
 
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 }

+ 4 - 0
pro-base/src/main/java/com/idea/customerManagement/dto/IntentionalDepositDto.java

@@ -27,5 +27,9 @@ public class IntentionalDepositDto extends IntentionalDeposit {
 
     private String roomSelectionInfoId;
 
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 
 }

+ 4 - 0
pro-base/src/main/java/com/idea/customerManagement/dto/RoomSelectionInfoDto.java

@@ -55,4 +55,8 @@ public class RoomSelectionInfoDto extends RoomSelectionInfo {
 
     private String intentionalDepositId;
 
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 }

+ 4 - 0
pro-base/src/main/java/com/idea/invoice/dto/InvoiceManageDto.java

@@ -59,5 +59,9 @@ public class InvoiceManageDto extends InvoiceManage {
      */
     private String houseId;
 
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 
 }

+ 1 - 1
pro-base/src/main/java/com/idea/invoice/dto/ReceiptManageDto.java

@@ -8,6 +8,6 @@ public class ReceiptManageDto extends ReceiptManage {
 
     private String createdName;
 
-
+    private String buyerIdentityCard;
 
 }

+ 5 - 0
pro-base/src/main/java/com/idea/paymentManagement/dto/RefundManageDto.java

@@ -22,4 +22,9 @@ public class RefundManageDto extends RefundManage {
 
     private Integer contentType;
 
+
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 }

+ 5 - 0
pro-base/src/main/java/com/idea/saleManage/model/CheckInMore.java

@@ -16,4 +16,9 @@ public class CheckInMore extends CheckIn{
     private String  contractManageId2;
 
     private String customerManagementId;
+
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 }

+ 4 - 0
pro-base/src/main/java/com/idea/saleManage/model/PropertyRegistrationMore.java

@@ -16,4 +16,8 @@ public class PropertyRegistrationMore extends PropertyRegistration {
 
     private String customerManagementId;
 
+    private String buyerIdentityCard;
+
+    private String batchNumber;
+
 }

+ 24 - 14
pro-base/src/main/resources/mybatis/buyingMore/BuyingMoreExtendMapper.xml

@@ -3,20 +3,30 @@
 <mapper namespace="com.idea.buyingMore.mapper.BuyingMoreExtendMapper">
 
   <select id="listByModel" resultType="com.idea.buyingMore.dto.BuyingMoreDto">
-    select b.*,u.truename createdName from buying_more b
-    left join frame_user u on u.id = b.created_id
-    <where>
-        and b.del_flag = 0
-      <if test="buyerName != null and buyerName != ''">
-        and buyer_name like concat('%',#{buyerName},'%')
-      </if>
-      <if test="houseName != null and houseName != ''">
-        and house_name like concat('%',#{houseName},'%')
-      </if>
-      <if test="type != null and type != ''">
-        and type = #{type}
-      </if>
-    </where>
+      select b.*,u.truename createdName from buying_more b
+      left join frame_user u on u.id = b.created_id
+      left join contract_manage c on c.id = b.contract_id
+      <where>
+          and b.del_flag = 0
+          <if test="buyerName != null and buyerName != ''">
+              and buyer_name like concat('%',#{buyerName},'%')
+          </if>
+          <if test="houseName != null and houseName != ''">
+              and house_name like concat('%',#{houseName},'%')
+          </if>
+          <if test="type != null and type != ''">
+              and type = #{type}
+          </if>
+          <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+              and c.customer_management_id in (select customer_management_id from buyer where identity_card like
+              concat('%',#{buyerIdentityCard},'%'))
+          </if>
+          <if test="batchNumber != null and batchNumber != ''">
+              and c.customer_management_id in (select id from customer_management where batch_number like
+              concat('%',#{batchNumber},'%'))
+          </if>
+
+      </where>
       order by b.created_at desc
   </select>
 

+ 7 - 0
pro-base/src/main/resources/mybatis/customerManagement/ContractManageExtendMapper.xml

@@ -23,6 +23,13 @@
             <if test="buyerName != null and buyerName != ''">
                 and customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
             </if>
+            <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+                and customer_management_id in (select customer_management_id from buyer where identity_card like concat('%',#{buyerIdentityCard},'%'))
+            </if>
+            <if test="batchNumber != null and batchNumber != ''">
+                and customer_management_id in (select id from customer_management where batch_number like concat('%',#{batchNumber},'%'))
+            </if>
+
         </where>
         order by created_at desc,updated_at desc
     </select>

+ 9 - 0
pro-base/src/main/resources/mybatis/customerManagement/CustomerManagementExtendMapper.xml

@@ -22,6 +22,15 @@
       <if test="statusStr != null and statusStr != ''">
         and customer_management.status in (${statusStr})
       </if>
+      <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+        and customer_management.buyer_identity_card like concat('%',#{buyerIdentityCard},'%')
+      </if>
+      <if test="houseName != null and houseName != ''">
+        and customer_management.house_name like concat ('%',#{houseName},'%')
+      </if>
+      <if test="batchNumber != null and batchNumber != ''">
+        and customer_management.batch_number like concat ('%',#{batchNumber},'%')
+      </if>
       <if test="groupIdList != null">
         and customer_management.group_id in
         <foreach collection="groupIdList" item="groupId" open="(" close=")" separator="," >

+ 10 - 0
pro-base/src/main/resources/mybatis/customerManagement/IntentionalDepositExtendMapper.xml

@@ -19,6 +19,16 @@
         <if test="buyerName !=null and buyerName != '' " >
             and customer_management.buyer_name like concat('%',#{buyerName},'%')
         </if>
+        <if test="houseName !=null and houseName != '' " >
+            and intentional_deposit.house_name like concat('%',#{houseName},'%')
+        </if>
+        <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+            and customer_management.buyer_identity_card like concat('%',#{buyerIdentityCard},'%')
+        </if>
+        <if test="batchNumber != null and batchNumber != ''">
+            and customer_management.batch_number like concat('%',#{batchNumber},'%')
+        </if>
+
     </where>
     order by created_at desc
   </select>

+ 6 - 0
pro-base/src/main/resources/mybatis/customerManagement/RoomSelectionInfoExtendMapper.xml

@@ -68,6 +68,12 @@
             <if test="houseId !=null and houseId != ''">
                 and room_selection_info.house_id = #{houseId}
             </if>
+            <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+                and cm.buyer_identity_card like concat('%',#{buyerIdentityCard},'%')
+            </if>
+            <if test="batchNumber != null and batchNumber != ''">
+                and cm.batch_number like concat('%',#{batchNumber},'%')
+            </if>
         </where>
         order by created_at desc
     </select>

+ 6 - 0
pro-base/src/main/resources/mybatis/invoice/InvoiceManageExtendMapper.xml

@@ -42,6 +42,12 @@
           <if test="houseId !=null and houseId !=''">
               cm.house_id = #{houseId}
           </if>
+          <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+              and cm.customer_management_id in (select customer_management_id from buyer where identity_card like concat('%',#{buyerIdentityCard},'%'))
+          </if>
+          <if test="batchNumber != null and batchNumber != ''">
+              and cm.customer_management_id in (select id from customer_management where batch_number like concat('%',#{batchNumber},'%'))
+          </if>
       </where>
       order by i.create_time desc
   </select>

+ 6 - 0
pro-base/src/main/resources/mybatis/invoice/ReceiptManageExtendMapper.xml

@@ -16,6 +16,12 @@
             <if test="houseName != null and houseName != ''">
                 and customer_management.house_name like concat('%',#{houseName},'%')
             </if>
+            <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+                and customer_management.id in (select customer_management_id from buyer where identity_card like concat('%',#{buyerIdentityCard},'%'))
+            </if>
+            <if test="batchNumber != null and batchNumber != ''">
+                and receipt_manage.batch_number like concat('%',#{batchNumber},'%')
+            </if>
         </where>
         order by receipt_manage.created_at desc
     </select>

+ 25 - 17
pro-base/src/main/resources/mybatis/paymentManagement/MaintenanceFundsManagementExtendMapper.xml

@@ -4,23 +4,31 @@
 
 
   <select id="listByModel" resultType="com.idea.customerManagement.dto.ContractManageDto">
-    select contract_manage.*,
-           maintenance_funds_management.pay_money receivedMoney,
-           maintenance_funds_management.id maintenanceFundsId
-           from contract_manage
-           left join maintenance_funds_management on contract_manage.id = maintenance_funds_management.contract_id
-    <where>
-        and contract_manage.contract_status in (2,3)
-      <if test="houseName != null and houseName != ''">
-        and contract_manage.house_name like concat('%',#{houseName},'%')
-      </if>
-      <if test="fundCollectionStatus != null and fundCollectionStatus != ''">
-        and contract_manage.fund_collection_status = #{fundCollectionStatus}
-      </if>
-      <if test="buyerName != null and buyerName != ''">
-        and contract_manage.buyer_name like concat('%',#{buyerName},'%')
-      </if>
-    </where>
+      select contract_manage.*,
+      maintenance_funds_management.pay_money receivedMoney,
+      maintenance_funds_management.id maintenanceFundsId
+      from contract_manage
+      left join maintenance_funds_management on contract_manage.id = maintenance_funds_management.contract_id
+      <where>
+          and contract_manage.contract_status in (2,3)
+          <if test="houseName != null and houseName != ''">
+              and contract_manage.house_name like concat('%',#{houseName},'%')
+          </if>
+          <if test="fundCollectionStatus != null and fundCollectionStatus != ''">
+              and contract_manage.fund_collection_status = #{fundCollectionStatus}
+          </if>
+          <if test="buyerName != null and buyerName != ''">
+              and contract_manage.buyer_name like concat('%',#{buyerName},'%')
+          </if>
+          <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+              and contract_manage.customer_management_id in (select customer_management_id from buyer where
+              identity_card like concat('%',#{buyerIdentityCard},'%'))
+          </if>
+          <if test="batchNumber != null and batchNumber != ''">
+              and contract_manage.customer_management_id in (select id from customer_management where batch_number
+              like concat('%',#{batchNumber},'%'))
+          </if>
+      </where>
       order by contract_manage.created_at desc
   </select>
 

+ 30 - 21
pro-base/src/main/resources/mybatis/paymentManagement/PayLogExtendMapper.xml

@@ -38,27 +38,36 @@
 
 
     <select id="listByModel" resultType="com.idea.customerManagement.dto.ContractManageDto">
-    select contract_manage.*,
-           ifnull(sum(pay_log.pay_money),0) receivedMoney,
-           ifnull(contract_manage.buyer_money - sum(pay_log.pay_money),0) arrears
-    from contract_manage
-    left join pay_log on contract_manage.id = pay_log.contract_id
-    and pay_log.pay_type = #{payType} and pay_log.content_type != 7 and pay_log.status = 0
-    <where>
-      and contract_status in (2,3)
-      <if test="houseName != null and houseName != ''">
-        and contract_manage.house_name like concat('%',#{houseName},'%')
-      </if>
-      <if test="collectionStatus != null and collectionStatus != ''">
-        and collection_status = #{collectionStatus}
-      </if>
-      <if test="buyerName != null and buyerName != ''">
-        and contract_manage.customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
-      </if>
-    </where>
-      group by contract_manage.id
-      ORDER BY contract_manage.created_at DESC
-  </select>
+        select contract_manage.*,
+        ifnull(sum(pay_log.pay_money),0) receivedMoney,
+        ifnull(contract_manage.buyer_money - sum(pay_log.pay_money),0) arrears
+        from contract_manage
+        left join pay_log on contract_manage.id = pay_log.contract_id
+        and pay_log.pay_type = #{payType} and pay_log.content_type != 7 and pay_log.status = 0
+        <where>
+            and contract_status in (2,3)
+            <if test="houseName != null and houseName != ''">
+                and contract_manage.house_name like concat('%',#{houseName},'%')
+            </if>
+            <if test="collectionStatus != null and collectionStatus != ''">
+                and collection_status = #{collectionStatus}
+            </if>
+            <if test="buyerName != null and buyerName != ''">
+                and contract_manage.customer_management_id in (select customer_management_id from buyer where name like
+                concat('%',#{buyerName},'%'))
+            </if>
+            <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+                and contract_manage.customer_management_id in (select customer_management_id from buyer where
+                identity_card like concat('%',#{buyerIdentityCard},'%'))
+            </if>
+            <if test="batchNumber != null and batchNumber != ''">
+                and contract_manage.customer_management_id in (select id from customer_management where batch_number
+                like concat('%',#{batchNumber},'%'))
+            </if>
+        </where>
+        group by contract_manage.id
+        ORDER BY contract_manage.created_at DESC
+    </select>
 
     <select id="countByGroupId" resultType="java.lang.Integer">
         select count(1) from pay_log

+ 6 - 0
pro-base/src/main/resources/mybatis/paymentManagement/RefundManageExtendMapper.xml

@@ -31,6 +31,12 @@
       <if test="houseId != null and houseId != ''">
         and refund_manage.house_id = #{houseId}
       </if>
+      <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+        and refund_manage.customer_management_id in (select customer_management_id from buyer where identity_card like concat('%',#{buyerIdentityCard},'%'))
+      </if>
+      <if test="batchNumber != null and batchNumber != ''">
+        and refund_manage.customer_management_id in (select id from customer_management where batch_number like concat('%',#{batchNumber},'%'))
+      </if>
     </where>
   </select>
 </mapper>

+ 6 - 0
pro-base/src/main/resources/mybatis/saleManage/CheckInMapper.xml

@@ -280,5 +280,11 @@
                 and check_in.status = '2'
             </if>
         </if>
+        <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+            and customer_management_id in (select customer_management_id from buyer where identity_card like concat('%',#{buyerIdentityCard},'%'))
+        </if>
+        <if test="batchNumber != null and batchNumber != ''">
+            and customer_management_id in (select id from customer_management where batch_number like concat('%',#{batchNumber},'%'))
+        </if>
     </select>
 </mapper>

+ 6 - 0
pro-base/src/main/resources/mybatis/saleManage/PropertyRegistrationMapper.xml

@@ -277,6 +277,12 @@
       <if test="record.status = '2'">
         and property_registration.status = '2'
       </if>
+      <if test="buyerIdentityCard != null and buyerIdentityCard != ''">
+        and customer_management_id in (select customer_management_id from buyer where identity_card like concat('%',#{buyerIdentityCard},'%'))
+      </if>
+      <if test="batchNumber != null and batchNumber != ''">
+        and customer_management_id in (select id from customer_management where batch_number like concat('%',#{batchNumber},'%'))
+      </if>
     </if>
   </select>
 </mapper>