LAPTOP-FO2T5SIU\35838 hace 9 meses
padre
commit
f9698bae9d

+ 0 - 2
pro-base/src/main/java/com/idea/customerManagement/model/RoomSelectionInfo.java

@@ -54,8 +54,6 @@ public class RoomSelectionInfo implements Serializable {
 
     private String fileList;
 
-    private String depositNumber;
-
     private static final long serialVersionUID = 1L;
 
 }

+ 0 - 70
pro-base/src/main/java/com/idea/customerManagement/model/RoomSelectionInfoExample.java

@@ -526,76 +526,6 @@ public class RoomSelectionInfoExample {
             return (Criteria) this;
         }
 
-        public Criteria andDepositNumberIsNull() {
-            addCriterion("deposit_number is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberIsNotNull() {
-            addCriterion("deposit_number is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberEqualTo(String value) {
-            addCriterion("deposit_number =", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberNotEqualTo(String value) {
-            addCriterion("deposit_number <>", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberGreaterThan(String value) {
-            addCriterion("deposit_number >", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberGreaterThanOrEqualTo(String value) {
-            addCriterion("deposit_number >=", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberLessThan(String value) {
-            addCriterion("deposit_number <", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberLessThanOrEqualTo(String value) {
-            addCriterion("deposit_number <=", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberLike(String value) {
-            addCriterion("deposit_number like", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberNotLike(String value) {
-            addCriterion("deposit_number not like", value, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberIn(List<String> values) {
-            addCriterion("deposit_number in", values, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberNotIn(List<String> values) {
-            addCriterion("deposit_number not in", values, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberBetween(String value1, String value2) {
-            addCriterion("deposit_number between", value1, value2, "depositNumber");
-            return (Criteria) this;
-        }
-
-        public Criteria andDepositNumberNotBetween(String value1, String value2) {
-            addCriterion("deposit_number not between", value1, value2, "depositNumber");
-            return (Criteria) this;
-        }
-
         public Criteria andStatusIsNull() {
             addCriterion("status is null");
             return (Criteria) this;

+ 14 - 8
pro-base/src/main/java/com/idea/customerManagement/service/IntentionalDepositService.java

@@ -267,6 +267,13 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
     @Transactional
     public int toDeposit(IntentionalDeposit model) {
 
+
+        // 转定金
+        model.setStatus(2);
+        model.setHandleId(ShiroUtils.getUserId());
+        model.setHandleDate(new Date());
+        int result = modelMapper.updateByPrimaryKeySelective(model);
+
         String houseId = model.getHouseId();
         String customerManagementId = model.getCustomerManagementId();
 
@@ -288,6 +295,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
         // 新增选房信息
         String roomSelectionInfoId = IdUtil.simpleUUID();
         RoomSelectionInfo roomSelectionInfo = new RoomSelectionInfo();
+        roomSelectionInfo.setId(roomSelectionInfoId);
         roomSelectionInfo.setCustomerManagementId(customerManagementId);
         roomSelectionInfo.setHouseId(response.getId());
         roomSelectionInfo.setBuildId(response.getBuildId());
@@ -295,11 +303,13 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
         roomSelectionInfo.setGroupId(response.getGroupId());
         roomSelectionInfo.setCreatedAt(new Date());
         roomSelectionInfo.setCreatedId(ShiroUtils.getUserId());
-        roomSelectionInfo.setReceivableMoney(response.getSubscriptionFunds());
+        roomSelectionInfo.setReceivableMoney(model.getReceivableMoney());
+        roomSelectionInfo.setReceivedAmount(model.getReceivedAmount());
         // 收取状态 意向金转入
         roomSelectionInfo.setStatus(3);
-        roomSelectionInfo.setId(roomSelectionInfoId);
-        roomSelectionInfo.setDepositNumber(model.getDepositSerialNumber());
+        roomSelectionInfo.setSerialNumber(model.getDepositSerialNumber());
+        roomSelectionInfo.setPaymentMethod(model.getPaymentMethod());
+        roomSelectionInfo.setCollectionTime(model.getCollectionTime());
         roomSelectionInfoMapper.insertSelective(roomSelectionInfo);
 
         // 转定金后生产合同
@@ -358,11 +368,7 @@ public class IntentionalDepositService implements BaseService<IntentionalDeposit
             receiptManageService.updateByPrimaryKeySelective(manage);
         }
 
-        // 转定金
-        model.setStatus(2);
-        model.setHandleId(ShiroUtils.getUserId());
-        model.setHandleDate(new Date());
-        int result = modelMapper.updateByPrimaryKeySelective(model);
+
 
         return result;
 

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

@@ -20,6 +20,7 @@
             and customer_management.buyer_name like concat('%',#{buyerName},'%')
         </if>
     </where>
+    order by created_at desc
   </select>
 
 </mapper>

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

@@ -40,5 +40,6 @@
                 and room_selection_info.customer_management_id in (select customer_management_id from buyer where name like concat('%',#{buyerName},'%'))
             </if>
         </where>
+        order by created_at desc
     </select>
 </mapper>

+ 13 - 30
pro-base/src/main/resources/mybatis/customerManagement/RoomSelectionInfoMapper.xml

@@ -8,7 +8,6 @@
     <result column="disc_id" jdbcType="VARCHAR" property="discId" />
     <result column="build_id" jdbcType="VARCHAR" property="buildId" />
     <result column="house_id" jdbcType="VARCHAR" property="houseId" />
-    <result column="deposit_number" jdbcType="VARCHAR" property="depositNumber" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="receivable_money" jdbcType="DECIMAL" property="receivableMoney" />
     <result column="received_amount" jdbcType="DECIMAL" property="receivedAmount" />
@@ -84,9 +83,9 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, customer_management_id, group_id, disc_id, build_id, house_id, deposit_number,
-    status, receivable_money, received_amount, payment_method, serial_number, collection_id,
-    collection_time, created_id, created_at, updated_at, updated_id
+    id, customer_management_id, group_id, disc_id, build_id, house_id, status, receivable_money,
+    received_amount, payment_method, serial_number, collection_id, collection_time, created_id,
+    created_at, updated_at, updated_id
   </sql>
   <sql id="Blob_Column_List">
     remark, file_list
@@ -142,18 +141,18 @@
   <insert id="insert" parameterType="com.idea.customerManagement.model.RoomSelectionInfo">
     insert into room_selection_info (id, customer_management_id, group_id,
                                      disc_id, build_id, house_id,
-                                     deposit_number, status, receivable_money,
-                                     received_amount, payment_method, serial_number,
-                                     collection_id, collection_time, created_id,
-                                     created_at, updated_at, updated_id,
-                                     remark, file_list)
+                                     status, receivable_money, received_amount,
+                                     payment_method, serial_number, collection_id,
+                                     collection_time, created_id, created_at,
+                                     updated_at, updated_id, remark,
+                                     file_list)
     values (#{id,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR}, #{groupId,jdbcType=VARCHAR},
             #{discId,jdbcType=VARCHAR}, #{buildId,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR},
-            #{depositNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{receivableMoney,jdbcType=DECIMAL},
-            #{receivedAmount,jdbcType=DECIMAL}, #{paymentMethod,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR},
-            #{collectionId,jdbcType=VARCHAR}, #{collectionTime,jdbcType=TIMESTAMP}, #{createdId,jdbcType=VARCHAR},
-            #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{updatedId,jdbcType=VARCHAR},
-            #{remark,jdbcType=LONGVARCHAR}, #{fileList,jdbcType=LONGVARCHAR})
+            #{status,jdbcType=INTEGER}, #{receivableMoney,jdbcType=DECIMAL}, #{receivedAmount,jdbcType=DECIMAL},
+            #{paymentMethod,jdbcType=INTEGER}, #{serialNumber,jdbcType=VARCHAR}, #{collectionId,jdbcType=VARCHAR},
+            #{collectionTime,jdbcType=TIMESTAMP}, #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP},
+            #{updatedAt,jdbcType=TIMESTAMP}, #{updatedId,jdbcType=VARCHAR}, #{remark,jdbcType=LONGVARCHAR},
+            #{fileList,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.idea.customerManagement.model.RoomSelectionInfo">
     insert into room_selection_info
@@ -176,9 +175,6 @@
       <if test="houseId != null">
         house_id,
       </if>
-      <if test="depositNumber != null">
-        deposit_number,
-      </if>
       <if test="status != null">
         status,
       </if>
@@ -238,9 +234,6 @@
       <if test="houseId != null">
         #{houseId,jdbcType=VARCHAR},
       </if>
-      <if test="depositNumber != null">
-        #{depositNumber,jdbcType=VARCHAR},
-      </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
@@ -309,9 +302,6 @@
       <if test="record.houseId != null">
         house_id = #{record.houseId,jdbcType=VARCHAR},
       </if>
-      <if test="record.depositNumber != null">
-        deposit_number = #{record.depositNumber,jdbcType=VARCHAR},
-      </if>
       <if test="record.status != null">
         status = #{record.status,jdbcType=INTEGER},
       </if>
@@ -364,7 +354,6 @@
     disc_id = #{record.discId,jdbcType=VARCHAR},
     build_id = #{record.buildId,jdbcType=VARCHAR},
     house_id = #{record.houseId,jdbcType=VARCHAR},
-    deposit_number = #{record.depositNumber,jdbcType=VARCHAR},
     status = #{record.status,jdbcType=INTEGER},
     receivable_money = #{record.receivableMoney,jdbcType=DECIMAL},
     received_amount = #{record.receivedAmount,jdbcType=DECIMAL},
@@ -390,7 +379,6 @@
     disc_id = #{record.discId,jdbcType=VARCHAR},
     build_id = #{record.buildId,jdbcType=VARCHAR},
     house_id = #{record.houseId,jdbcType=VARCHAR},
-    deposit_number = #{record.depositNumber,jdbcType=VARCHAR},
     status = #{record.status,jdbcType=INTEGER},
     receivable_money = #{record.receivableMoney,jdbcType=DECIMAL},
     received_amount = #{record.receivedAmount,jdbcType=DECIMAL},
@@ -424,9 +412,6 @@
       <if test="houseId != null">
         house_id = #{houseId,jdbcType=VARCHAR},
       </if>
-      <if test="depositNumber != null">
-        deposit_number = #{depositNumber,jdbcType=VARCHAR},
-      </if>
       <if test="status != null">
         status = #{status,jdbcType=INTEGER},
       </if>
@@ -476,7 +461,6 @@
         disc_id = #{discId,jdbcType=VARCHAR},
         build_id = #{buildId,jdbcType=VARCHAR},
         house_id = #{houseId,jdbcType=VARCHAR},
-        deposit_number = #{depositNumber,jdbcType=VARCHAR},
         status = #{status,jdbcType=INTEGER},
         receivable_money = #{receivableMoney,jdbcType=DECIMAL},
         received_amount = #{receivedAmount,jdbcType=DECIMAL},
@@ -499,7 +483,6 @@
         disc_id = #{discId,jdbcType=VARCHAR},
         build_id = #{buildId,jdbcType=VARCHAR},
         house_id = #{houseId,jdbcType=VARCHAR},
-        deposit_number = #{depositNumber,jdbcType=VARCHAR},
         status = #{status,jdbcType=INTEGER},
         receivable_money = #{receivableMoney,jdbcType=DECIMAL},
         received_amount = #{receivedAmount,jdbcType=DECIMAL},