LAPTOP-FO2T5SIU\35838 8 mesi fa
parent
commit
12be1a4990

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

@@ -36,4 +36,6 @@ public class RoomSelectionInfoDto extends RoomSelectionInfo {
      */
     private Double decorationSituation;
 
+    private String createdName;
+
 }

+ 8 - 0
pro-base/src/main/java/com/idea/customerManagement/service/ContractManageService.java

@@ -158,6 +158,14 @@ public class ContractManageService implements BaseService<ContractManage, Contra
 
         model.setUpdatedAt(new Date());
         model.setUpdatedId(ShiroUtils.getUserId());
+        // 如果是已签约
+        if(model.getContractStatus() == 2){
+            // 更新房间已售状态
+            String houseId = model.getHouseId();
+            ParkRoom parkRoom = parkRoomService.selectByPrimaryKey(houseId);
+            parkRoom.setSoldStatus(3);
+            parkRoomService.updateByPrimaryKeySelective(parkRoom);
+        }
         int result = updateByPrimaryKeySelective(model);
         return result;
     }

+ 1 - 0
pro-base/src/main/java/com/idea/customerManagement/service/RoomSelectionInfoService.java

@@ -182,6 +182,7 @@ public class RoomSelectionInfoService implements BaseService<RoomSelectionInfo,
         model.setUpdatedId(ShiroUtils.getUserId());
         model.setStatus(2);
         model.setCollectionId(ShiroUtils.getUserId());
+        model.setCollectionTime(new Date());
         int result = updateByPrimaryKeySelective(model);
         contractManageService.addContract(model);
         // 生成合同

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

@@ -8,10 +8,12 @@
            park_room.room_no,
            park_room.actual_internal_area,
            park_room.actual_build_area,
-           park_room.decoration_situation
+           park_room.decoration_situation,
+           frame_user.truename createdName
            from room_selection_info
     left join mnp_building on mnp_building.id = room_selection_info.build_id
     left join park_room on park_room.id = room_selection_info.house_id
+    left join frame_user on frame_user.id = room_selection_info.created_id
     <where>
         <if test="customerManagementId !=null and customerManagementId != ''">
             and room_selection_info.customer_management_id = #{customerManagementId}

+ 2 - 0
pro-main/src/main/resources/logback-spring.xml

@@ -53,4 +53,6 @@
     <logger name="com.rockstar.frame" level="DEBUG" />
     <logger name="com.rockstar.system" level="DEBUG" />
     <logger name="com.rockstar" level="DEBUG" />
+    <logger name="com.idea.pro.wx" level="INFO" />
+    <logger name="com.idea" level="DEBUG" />
 </configuration>