LAPTOP-FO2T5SIU\35838 9 hónapja%!(EXTRA string=óta)
szülő
commit
6338ec0622

+ 6 - 2
pro-base/src/main/java/com/idea/customerManagement/service/IntentionalDepositService.java

@@ -35,6 +35,7 @@ import com.rockstar.util.StringUtils;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Arrays;
 import java.util.Date;
@@ -141,12 +142,12 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
         }
         ParkInfo parkInfo = parkInfoMapper.selectByPrimaryKey(groupId);
         ParkFloorDisc parkFloorDisc = parkFloorDiscMapper.selectByPrimaryKey(discId);
-        String serialNumber = parkInfo.getGroupName()+ parkFloorDisc.getName() + "YXJ" + number;
+        String serialNumber = parkInfo.getGroupName()+ parkFloorDisc.getName() + "-YXJ" + number;
         return serialNumber;
     }
 
     /**
-     * 获取收据流水号(意向金编号)
+     * 获取收据流水号(金编号)
      * @param id
      * @return
      */
@@ -263,6 +264,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
      * @param model
      * @return
      */
+    @Transactional
     public int toDeposit(IntentionalDeposit model) {
 
         String houseId = model.getHouseId();
@@ -326,6 +328,8 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
         ParkRoom parkRoom = new ParkRoom();
         parkRoom.setId(response.getId());
         parkRoom.setIsChoose(1);
+        // 已认购
+        parkRoom.setSoldStatus(2);
         parkRoomMapper.updateByPrimaryKeySelective(parkRoom);
 
         // 票据管理 新增一条记录

+ 8 - 2
pro-base/src/main/java/com/idea/paymentManagement/service/PayLogService.java

@@ -242,12 +242,18 @@ public class PayLogService implements BaseService<PayLog, PayLogExample> {
         payLogDto.setHouseName(contractManage.getHouseName());
         payLogDto.setPaymentMethod(contractManage.getPaymentMethod());
 //        payLogDto.setDeadLine(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, contractManage.getDeadline()));
-        payLogDto.setReceivableMoney(contractManage.getTotalPrice());
         // 查询已收房款
         String receivedMoneyStr = extendMapper.getMoneyByContractId(contractId, 1);
         BigDecimal receivedMoney = new BigDecimal(receivedMoneyStr);
         // 欠款
-        BigDecimal arrears = contractManage.getTotalPrice().subtract(receivedMoney);
+        BigDecimal arrears = BigDecimal.ZERO;
+        // 应收
+        BigDecimal receivableMoney = BigDecimal.ZERO;
+        if(ObjectUtil.isNotNull(contractManage.getTotalPrice())){
+            arrears = contractManage.getTotalPrice().subtract(receivedMoney);
+            receivableMoney = contractManage.getTotalPrice();
+        }
+        payLogDto.setReceivableMoney(receivableMoney);
         payLogDto.setReceivedMoney(receivedMoney);
         payLogDto.setArrears(arrears);
         return payLogDto;

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

@@ -15,6 +15,11 @@
     left join frame_user on frame_user.id = intentional_deposit.created_id
     left join park_info on park_info.id = intentional_deposit.group_id
     left join park_floor_disc on park_floor_disc.id = intentional_deposit.disc_id
+    <where>
+        <if test="buyerName !=null and buyerName != '' " >
+            and customer_management.buyer_name like concat('%',#{buyerName},'%')
+        </if>
+    </where>
   </select>
 
 </mapper>

+ 4 - 10
pro-base/src/main/resources/mybatis/paymentManagement/MaintenanceFundsManagementExtendMapper.xml

@@ -8,23 +8,17 @@
            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
+           left join maintenance_funds_management on contract_manage.id = maintenance_funds_management.contract_id
     <where>
         and contract_manage.contract_status = '2'
       <if test="houseName != null and houseName != ''">
         and house_name like concat('%',#{houseName},'%')
       </if>
-      <if test="contractStatus != null and contractStatus != ''">
-        and contract_status = #{contractStatus}
-      </if>
-      <if test="signingDateFrom != null and signingDateFrom != ''">
-        and signing_date >= #{signingDateFrom}
-      </if>
-      <if test="signingDateTo != null and signingDateTo != ''">
-        and signing_date &lt;= #{signingDateTo}
+      <if test="fundCollectionStatus != null and fundCollectionStatus != ''">
+        and contract_manage.fund_collection_status = #{fundCollectionStatus}
       </if>
       <if test="buyerName != null and buyerName != ''">
-        and customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
+        and maintenance_funds_management.customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
       </if>
     </where>
   </select>

+ 2 - 8
pro-base/src/main/resources/mybatis/paymentManagement/PayLogExtendMapper.xml

@@ -25,14 +25,8 @@
       <if test="houseName != null and houseName != ''">
         and house_name like concat('%',#{houseName},'%')
       </if>
-      <if test="contractStatus != null and contractStatus != ''">
-        and contract_status = #{contractStatus}
-      </if>
-      <if test="signingDateFrom != null and signingDateFrom != ''">
-        and signing_date >= #{signingDateFrom}
-      </if>
-      <if test="signingDateTo != null and signingDateTo != ''">
-        and signing_date &lt;= #{signingDateTo}
+      <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},'%'))