瀏覽代碼

户室开锁记录

chenfan 1 月之前
父節點
當前提交
c595b98778
共有 26 個文件被更改,包括 6128 次插入110 次删除
  1. 63 0
      doc/cf20250604.sql
  2. 23 41
      pro-base/src/main/java/com/idea/buildManage/controller/ParkRoomReservationController.java
  3. 22 0
      pro-base/src/main/java/com/idea/buildManage/dto/ParkRoomDoorLogDto.java
  4. 30 0
      pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomDoorLogMapper.java
  5. 30 0
      pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomDoorMapper.java
  6. 30 0
      pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomDoorSyncMapper.java
  7. 5 1
      pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomReservationExtendMapper.java
  8. 288 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoor.java
  9. 2121 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorExample.java
  10. 138 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorLog.java
  11. 1061 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorLogExample.java
  12. 38 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorSync.java
  13. 401 0
      pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorSyncExample.java
  14. 195 0
      pro-base/src/main/java/com/idea/buildManage/service/ParkRoomDoorLogService.java
  15. 162 0
      pro-base/src/main/java/com/idea/buildManage/service/ParkRoomDoorService.java
  16. 104 0
      pro-base/src/main/java/com/idea/buildManage/service/ParkRoomDoorSyncService.java
  17. 37 4
      pro-base/src/main/java/com/idea/buildManage/service/ParkRoomReservationService.java
  18. 38 0
      pro-base/src/main/java/com/idea/buildManage/task/ParkRoomReservationTask.java
  19. 75 0
      pro-base/src/main/java/com/idea/buildManage/util/DoorLogType.java
  20. 47 0
      pro-base/src/main/java/com/idea/buildManage/util/ReservationStatus.java
  21. 91 0
      pro-base/src/main/java/com/idea/buildManage/vo/ParkRoomDoorLogVo.java
  22. 3 2
      pro-base/src/main/java/com/idea/util/ApartmentUtil.java
  23. 338 0
      pro-base/src/main/resources/mybatis/buildManage/ParkRoomDoorLogMapper.xml
  24. 575 0
      pro-base/src/main/resources/mybatis/buildManage/ParkRoomDoorMapper.xml
  25. 181 0
      pro-base/src/main/resources/mybatis/buildManage/ParkRoomDoorSyncMapper.xml
  26. 32 62
      pro-base/src/main/resources/mybatis/buildManage/ParkRoomReservationExtendMapper.xml

+ 63 - 0
doc/cf20250604.sql

@@ -0,0 +1,63 @@
+drop table if exists park_room_door;
+create table park_room_door
+(
+    id                    varchar(255) not null
+        primary key,
+    room_id               varchar(255) null comment '房间ID',
+    room_name             varchar(255) null comment '房间名称',
+    floor_id              varchar(255) null comment '楼层ID',
+    floor_name            varchar(255) null comment '楼层名称',
+    building_id           varchar(255) null comment '楼栋ID',
+    building_name         varchar(255) null comment '楼栋名称',
+    house_id              varchar(255) null comment '小区ID',
+    house_name            varchar(255) null comment '小区名称',
+    room_state            int          null comment '房间状态(1 闲置 2 出租 4到期 5打扫 6维修)',
+    electric_num          int          null comment '门锁电量',
+    lock_mac              varchar(255) null comment '门锁MAC',
+    lock_state            int          null comment '门锁状态(3 在线 4离线)',
+    aes_key               varchar(255) null comment '门锁AES秘钥',
+    admin_auth_code       varchar(255) null comment '管理员鉴权码',
+    general_auth_code     varchar(255) null comment '普通用户鉴权码',
+    temp_auth_code        varchar(255) null comment '临时鉴权码',
+    ble_protocol_ver      varchar(255) null comment '蓝牙锁协议版本',
+    hardware_version      varchar(255) null comment '门锁硬件版本',
+    software_version      varchar(255) null comment '门锁软件版本',
+    imsi                  varchar(255) null comment 'IMSI',
+    imei                  varchar(255) null comment 'IMEI',
+    iccid                 varchar(255) null comment 'ICCID:资费卡号',
+    rsrp                  varchar(255) null comment '信号接收功率',
+    sinr                  varchar(255) null comment '信号与干扰加噪声比',
+    cat1_software_version varchar(255) null comment 'CAT1的软件版本',
+    cat1_hardware_version varchar(255) null comment 'CAT1的硬件版本',
+    create_time           datetime     null comment '创建时间'
+)
+    comment '门锁房间列表' row_format = DYNAMIC;
+
+drop table if exists park_room_door_sync;
+create table park_room_door_sync
+(
+    id        varchar(255) not null
+        primary key,
+    room_id   varchar(255) null comment '房间id',
+    sync_time datetime     null comment '上次同步日志时间'
+)
+    comment '门锁房间同步信息' row_format = DYNAMIC;
+
+drop table if exists park_room_door_log;
+create table park_room_door_log
+(
+    id            varchar(255)  not null
+        primary key,
+    room_id       varchar(255)  null comment '房间id',
+    log_id        varchar(255)  null comment '日志ID',
+    log_type      int           null comment '日志类型',
+    lock_type     int           null comment '门锁类型',
+    lock_mac      varchar(255)  null comment '门锁mac',
+    update_time   datetime      null comment '日志触发时间',
+    log_level     varchar(255)  null comment '日志等级(DEBUG,INFO,WARN,ERROR)',
+    create_time   datetime      null comment '日志创建时间',
+    log_alert     varchar(2000) null comment '日志描述',
+    sync_time     datetime      null comment '同步时间',
+    looking_notes varchar(4000) null comment '备注',
+    update_user   varchar(255)  null comment '操作人'
+) comment '门锁日志表' row_format = DYNAMIC;

+ 23 - 41
pro-base/src/main/java/com/idea/buildManage/controller/ParkRoomReservationController.java

@@ -3,44 +3,45 @@ package com.idea.buildManage.controller;
 import com.alibaba.excel.EasyExcel;
 import com.github.pagehelper.PageInfo;
 import com.idea.buildManage.dto.BindSearchDto;
+import com.idea.buildManage.dto.ParkRoomDoorLogDto;
 import com.idea.buildManage.dto.ParkRoomReservationDto;
 import com.idea.buildManage.dto.RoomSearchDto;
-import com.idea.buildManage.model.ParkRoomBindDoorExample;
+import com.idea.buildManage.model.ParkRoomDoorLog;
 import com.idea.buildManage.model.ParkRoomReservation;
-import com.idea.buildManage.model.ParkRoomReservationExcel;
 import com.idea.buildManage.service.ParkRoomBindDoorService;
+import com.idea.buildManage.service.ParkRoomDoorLogService;
 import com.idea.buildManage.service.ParkRoomReservationService;
+import com.idea.buildManage.vo.ParkRoomDoorLogVo;
 import com.idea.buildManage.vo.ParkRoomVo;
-import com.idea.util.ApartmentUtil;
 import com.rockstar.common.base.BaseController;
 import com.rockstar.common.domain.AjaxResult;
 import com.rockstar.frame.model.extend.DateTrans;
 import com.rockstar.frame.model.extend.TableSplitResult;
 import com.rockstar.frame.model.extend.Tablepar;
 import com.rockstar.shiro.util.ShiroUtils;
-import com.rockstar.util.DateUtils;
 import io.swagger.annotations.Api;
 import org.apache.commons.collections.CollectionUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
-import java.net.URLEncoder;
-import java.text.SimpleDateFormat;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
-import java.util.Map;
 
 @RestController
 @RequestMapping(value = "ParkRoomReservationController")
 @Api(value="看房预约单")
 public class ParkRoomReservationController extends BaseController {
 
+    private static final Logger log = LoggerFactory.getLogger(ParkRoomReservationController.class);
     @Autowired
     private ParkRoomReservationService modelService;
     @Autowired
     private ParkRoomBindDoorService parkRoomBindDoorService;
+    @Autowired
+    private ParkRoomDoorLogService parkRoomDoorLogService;
 
     @PostMapping(value = "list",produces = {"application/json;charset=UTF-8"})
     public Object list(Tablepar tablepar, ParkRoomReservation model, DateTrans dt){
@@ -55,9 +56,8 @@ public class ParkRoomReservationController extends BaseController {
     }
 
     @PostMapping(value = "completeListPage",produces = {"application/json;charset=UTF-8"})
-    public Object completeListPage(Tablepar tablepar, ParkRoomReservationDto model){
-        model.setReservationStatus(4);
-        PageInfo<ParkRoomReservation> page = modelService.completeListPage(tablepar,model);
+    public Object completeListPage(Tablepar tablepar, ParkRoomDoorLogDto model){
+        PageInfo<ParkRoomDoorLogVo> page = modelService.completeListPage(tablepar,model);
         return new TableSplitResult<>(page.getPageNum(), page.getTotal(), page.getList());
     }
 
@@ -104,11 +104,11 @@ public class ParkRoomReservationController extends BaseController {
 
     @PostMapping(value = "editLookingNotes",produces = {"application/json;charset=UTF-8"})
     public AjaxResult editLookingNotes(String id, String lookingNotes){
-        ParkRoomReservation model = new ParkRoomReservation();
+        ParkRoomDoorLog model = new ParkRoomDoorLog();
         model.setId(id);
         model.setLookingNotes(lookingNotes);
         model.setUpdateUser(ShiroUtils.getUserId());
-        int result = modelService.updateByPrimaryKeySelective(model);
+        int result = parkRoomDoorLogService.updateByPrimaryKeySelective(model);
         return result(result);
     }
 
@@ -153,44 +153,26 @@ public class ParkRoomReservationController extends BaseController {
     }
 
     @PostMapping(value = "exportData",produces = {"application/json;charset=UTF-8"})
-    public void exportData(HttpServletResponse response, ParkRoomReservationDto model){
-        List<ParkRoomReservation> list = new ArrayList<>();
-        List<ParkRoomReservationExcel> excelList = new ArrayList<>();
+    public void exportData(HttpServletResponse response, ParkRoomDoorLogDto model){
+        List<ParkRoomDoorLogVo> list = new ArrayList<>();
         try{
-            model.setReservationStatus(4);
             list = modelService.completeListPageAll(model);
             if(CollectionUtils.isNotEmpty(list)){
-                for (ParkRoomReservation reservation : list) {
-                    ParkRoomReservationExcel excel = new ParkRoomReservationExcel();
-                    excel.setParkInfoName(reservation.getParkInfoName());
-                    excel.setParkFloorDiscName(reservation.getParkFloorDiscName());
-                    excel.setMnpBuildingNo(reservation.getMnpBuildingNo());
-                    excel.setParkRoomNo(reservation.getParkRoomNo());
-                    excel.setApplicantName(reservation.getApplicantName());
-                    excel.setApplicantPhone(reservation.getApplicantPhone());
-                    excel.setBuyerName(reservation.getBuyerName());
-                    excel.setBuyerPhone(reservation.getBuyerPhone());
-                    excel.setReservationStatusStr(reservation.getReservationStatusStr());
-                    excel.setDoorStatus(reservation.getDoorStatus());
-                    if(null!=reservation.getReservationDate()){
-                        excel.setReservationDate(DateUtils.formatDate(reservation.getReservationDate()));
-                    }
-                    excel.setTimeStr(reservation.getReservationTimeStart() + "~" + reservation.getReservationTimeEnd());
-                    excel.setDoorPassStatusStr(reservation.getDoorPassStatusStr());
-                    excel.setLookingNotes(reservation.getLookingNotes());
-                    excelList.add(excel);
-                }
                 response.setContentType("application/vnd.ms-excel");
                 response.setCharacterEncoding("utf-8");
-                EasyExcel.write(response.getOutputStream(), ParkRoomReservationExcel.class).sheet("my sheet")
-                        .doWrite(excelList);
+                EasyExcel.write(response.getOutputStream(), ParkRoomDoorLogVo.class).sheet("my sheet")
+                        .doWrite(list);
             }
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("户室开锁记录导出失败:{}", e.getMessage());
         } finally {
             list.clear();
-            excelList.clear();
         }
     }
 
+    @PostMapping(value = "getLogById",produces = {"application/json;charset=UTF-8"})
+    public ParkRoomDoorLog getLogById(String id) {
+        return parkRoomDoorLogService.selectByPrimaryKey(id);
+    }
+
 }

+ 22 - 0
pro-base/src/main/java/com/idea/buildManage/dto/ParkRoomDoorLogDto.java

@@ -0,0 +1,22 @@
+package com.idea.buildManage.dto;
+
+import lombok.Data;
+
+@Data
+public class ParkRoomDoorLogDto {
+
+    private String createTimeStart;
+
+    private String createTimeEnd;
+
+    private String roomName;
+
+    private String buildingName;
+
+    private String houseName;
+
+    private String roomAddress;
+
+    private Integer logType;
+
+}

+ 30 - 0
pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomDoorLogMapper.java

@@ -0,0 +1,30 @@
+package com.idea.buildManage.mapper;
+
+import com.idea.buildManage.model.ParkRoomDoorLog;
+import com.idea.buildManage.model.ParkRoomDoorLogExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ParkRoomDoorLogMapper {
+    long countByExample(ParkRoomDoorLogExample example);
+
+    int deleteByExample(ParkRoomDoorLogExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(ParkRoomDoorLog record);
+
+    int insertSelective(ParkRoomDoorLog record);
+
+    List<ParkRoomDoorLog> selectByExample(ParkRoomDoorLogExample example);
+
+    ParkRoomDoorLog selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") ParkRoomDoorLog record, @Param("example") ParkRoomDoorLogExample example);
+
+    int updateByExample(@Param("record") ParkRoomDoorLog record, @Param("example") ParkRoomDoorLogExample example);
+
+    int updateByPrimaryKeySelective(ParkRoomDoorLog record);
+
+    int updateByPrimaryKey(ParkRoomDoorLog record);
+}

+ 30 - 0
pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomDoorMapper.java

@@ -0,0 +1,30 @@
+package com.idea.buildManage.mapper;
+
+import com.idea.buildManage.model.ParkRoomDoor;
+import com.idea.buildManage.model.ParkRoomDoorExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ParkRoomDoorMapper {
+    long countByExample(ParkRoomDoorExample example);
+
+    int deleteByExample(ParkRoomDoorExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(ParkRoomDoor record);
+
+    int insertSelective(ParkRoomDoor record);
+
+    List<ParkRoomDoor> selectByExample(ParkRoomDoorExample example);
+
+    ParkRoomDoor selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") ParkRoomDoor record, @Param("example") ParkRoomDoorExample example);
+
+    int updateByExample(@Param("record") ParkRoomDoor record, @Param("example") ParkRoomDoorExample example);
+
+    int updateByPrimaryKeySelective(ParkRoomDoor record);
+
+    int updateByPrimaryKey(ParkRoomDoor record);
+}

+ 30 - 0
pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomDoorSyncMapper.java

@@ -0,0 +1,30 @@
+package com.idea.buildManage.mapper;
+
+import com.idea.buildManage.model.ParkRoomDoorSync;
+import com.idea.buildManage.model.ParkRoomDoorSyncExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface ParkRoomDoorSyncMapper {
+    long countByExample(ParkRoomDoorSyncExample example);
+
+    int deleteByExample(ParkRoomDoorSyncExample example);
+
+    int deleteByPrimaryKey(String id);
+
+    int insert(ParkRoomDoorSync record);
+
+    int insertSelective(ParkRoomDoorSync record);
+
+    List<ParkRoomDoorSync> selectByExample(ParkRoomDoorSyncExample example);
+
+    ParkRoomDoorSync selectByPrimaryKey(String id);
+
+    int updateByExampleSelective(@Param("record") ParkRoomDoorSync record, @Param("example") ParkRoomDoorSyncExample example);
+
+    int updateByExample(@Param("record") ParkRoomDoorSync record, @Param("example") ParkRoomDoorSyncExample example);
+
+    int updateByPrimaryKeySelective(ParkRoomDoorSync record);
+
+    int updateByPrimaryKey(ParkRoomDoorSync record);
+}

+ 5 - 1
pro-base/src/main/java/com/idea/buildManage/mapper/ParkRoomReservationExtendMapper.java

@@ -1,9 +1,12 @@
 package com.idea.buildManage.mapper;
 
+import com.idea.buildManage.dto.ParkRoomDoorLogDto;
 import com.idea.buildManage.dto.ParkRoomReservationDto;
 import com.idea.buildManage.dto.RoomSearchDto;
 import com.idea.buildManage.model.ParkRoomReservation;
+import com.idea.buildManage.vo.ParkRoomDoorLogVo;
 import com.idea.buildManage.vo.ParkRoomVo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -11,8 +14,9 @@ public interface ParkRoomReservationExtendMapper {
 
     List<ParkRoomReservation> listPage(ParkRoomReservationDto dto);
 
-    List<ParkRoomReservation> completeListPage(ParkRoomReservationDto dto);
+    List<ParkRoomDoorLogVo> completeListPage(ParkRoomDoorLogDto dto);
 
     List<ParkRoomVo> roomListPage(RoomSearchDto dto);
 
+    ParkRoomReservation getReservationByRoomAndTime(@Param("roomId") String roomId, @Param("logTime") String logTime);
 }

+ 288 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoor.java

@@ -0,0 +1,288 @@
+package com.idea.buildManage.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ParkRoomDoor implements Serializable {
+    private String id;
+
+    private String roomId;
+
+    private String roomName;
+
+    private String floorId;
+
+    private String floorName;
+
+    private String buildingId;
+
+    private String buildingName;
+
+    private String houseId;
+
+    private String houseName;
+
+    private Integer roomState;
+
+    private Integer electricNum;
+
+    private String lockMac;
+
+    private Integer lockState;
+
+    private String aesKey;
+
+    private String adminAuthCode;
+
+    private String generalAuthCode;
+
+    private String tempAuthCode;
+
+    private String bleProtocolVer;
+
+    private String hardwareVersion;
+
+    private String softwareVersion;
+
+    private String imsi;
+
+    private String imei;
+
+    private String iccid;
+
+    private String rsrp;
+
+    private String sinr;
+
+    private String cat1SoftwareVersion;
+
+    private String cat1HardwareVersion;
+
+    private Date createTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getRoomId() {
+        return roomId;
+    }
+
+    public void setRoomId(String roomId) {
+        this.roomId = roomId == null ? null : roomId.trim();
+    }
+
+    public String getRoomName() {
+        return roomName;
+    }
+
+    public void setRoomName(String roomName) {
+        this.roomName = roomName == null ? null : roomName.trim();
+    }
+
+    public String getFloorId() {
+        return floorId;
+    }
+
+    public void setFloorId(String floorId) {
+        this.floorId = floorId == null ? null : floorId.trim();
+    }
+
+    public String getFloorName() {
+        return floorName;
+    }
+
+    public void setFloorName(String floorName) {
+        this.floorName = floorName == null ? null : floorName.trim();
+    }
+
+    public String getBuildingId() {
+        return buildingId;
+    }
+
+    public void setBuildingId(String buildingId) {
+        this.buildingId = buildingId == null ? null : buildingId.trim();
+    }
+
+    public String getBuildingName() {
+        return buildingName;
+    }
+
+    public void setBuildingName(String buildingName) {
+        this.buildingName = buildingName == null ? null : buildingName.trim();
+    }
+
+    public String getHouseId() {
+        return houseId;
+    }
+
+    public void setHouseId(String houseId) {
+        this.houseId = houseId == null ? null : houseId.trim();
+    }
+
+    public String getHouseName() {
+        return houseName;
+    }
+
+    public void setHouseName(String houseName) {
+        this.houseName = houseName == null ? null : houseName.trim();
+    }
+
+    public Integer getRoomState() {
+        return roomState;
+    }
+
+    public void setRoomState(Integer roomState) {
+        this.roomState = roomState;
+    }
+
+    public Integer getElectricNum() {
+        return electricNum;
+    }
+
+    public void setElectricNum(Integer electricNum) {
+        this.electricNum = electricNum;
+    }
+
+    public String getLockMac() {
+        return lockMac;
+    }
+
+    public void setLockMac(String lockMac) {
+        this.lockMac = lockMac == null ? null : lockMac.trim();
+    }
+
+    public Integer getLockState() {
+        return lockState;
+    }
+
+    public void setLockState(Integer lockState) {
+        this.lockState = lockState;
+    }
+
+    public String getAesKey() {
+        return aesKey;
+    }
+
+    public void setAesKey(String aesKey) {
+        this.aesKey = aesKey == null ? null : aesKey.trim();
+    }
+
+    public String getAdminAuthCode() {
+        return adminAuthCode;
+    }
+
+    public void setAdminAuthCode(String adminAuthCode) {
+        this.adminAuthCode = adminAuthCode == null ? null : adminAuthCode.trim();
+    }
+
+    public String getGeneralAuthCode() {
+        return generalAuthCode;
+    }
+
+    public void setGeneralAuthCode(String generalAuthCode) {
+        this.generalAuthCode = generalAuthCode == null ? null : generalAuthCode.trim();
+    }
+
+    public String getTempAuthCode() {
+        return tempAuthCode;
+    }
+
+    public void setTempAuthCode(String tempAuthCode) {
+        this.tempAuthCode = tempAuthCode == null ? null : tempAuthCode.trim();
+    }
+
+    public String getBleProtocolVer() {
+        return bleProtocolVer;
+    }
+
+    public void setBleProtocolVer(String bleProtocolVer) {
+        this.bleProtocolVer = bleProtocolVer == null ? null : bleProtocolVer.trim();
+    }
+
+    public String getHardwareVersion() {
+        return hardwareVersion;
+    }
+
+    public void setHardwareVersion(String hardwareVersion) {
+        this.hardwareVersion = hardwareVersion == null ? null : hardwareVersion.trim();
+    }
+
+    public String getSoftwareVersion() {
+        return softwareVersion;
+    }
+
+    public void setSoftwareVersion(String softwareVersion) {
+        this.softwareVersion = softwareVersion == null ? null : softwareVersion.trim();
+    }
+
+    public String getImsi() {
+        return imsi;
+    }
+
+    public void setImsi(String imsi) {
+        this.imsi = imsi == null ? null : imsi.trim();
+    }
+
+    public String getImei() {
+        return imei;
+    }
+
+    public void setImei(String imei) {
+        this.imei = imei == null ? null : imei.trim();
+    }
+
+    public String getIccid() {
+        return iccid;
+    }
+
+    public void setIccid(String iccid) {
+        this.iccid = iccid == null ? null : iccid.trim();
+    }
+
+    public String getRsrp() {
+        return rsrp;
+    }
+
+    public void setRsrp(String rsrp) {
+        this.rsrp = rsrp == null ? null : rsrp.trim();
+    }
+
+    public String getSinr() {
+        return sinr;
+    }
+
+    public void setSinr(String sinr) {
+        this.sinr = sinr == null ? null : sinr.trim();
+    }
+
+    public String getCat1SoftwareVersion() {
+        return cat1SoftwareVersion;
+    }
+
+    public void setCat1SoftwareVersion(String cat1SoftwareVersion) {
+        this.cat1SoftwareVersion = cat1SoftwareVersion == null ? null : cat1SoftwareVersion.trim();
+    }
+
+    public String getCat1HardwareVersion() {
+        return cat1HardwareVersion;
+    }
+
+    public void setCat1HardwareVersion(String cat1HardwareVersion) {
+        this.cat1HardwareVersion = cat1HardwareVersion == null ? null : cat1HardwareVersion.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

文件差異過大導致無法顯示
+ 2121 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorExample.java


+ 138 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorLog.java

@@ -0,0 +1,138 @@
+package com.idea.buildManage.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ParkRoomDoorLog implements Serializable {
+    private String id;
+
+    private String roomId;
+
+    private String logId;
+
+    private Integer logType;
+
+    private Integer lockType;
+
+    private String lockMac;
+
+    private Date updateTime;
+
+    private String logLevel;
+
+    private Date createTime;
+
+    private String logAlert;
+
+    private Date syncTime;
+
+    private String lookingNotes;
+
+    private String updateUser;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getRoomId() {
+        return roomId;
+    }
+
+    public void setRoomId(String roomId) {
+        this.roomId = roomId == null ? null : roomId.trim();
+    }
+
+    public String getLogId() {
+        return logId;
+    }
+
+    public void setLogId(String logId) {
+        this.logId = logId == null ? null : logId.trim();
+    }
+
+    public Integer getLogType() {
+        return logType;
+    }
+
+    public void setLogType(Integer logType) {
+        this.logType = logType;
+    }
+
+    public Integer getLockType() {
+        return lockType;
+    }
+
+    public void setLockType(Integer lockType) {
+        this.lockType = lockType;
+    }
+
+    public String getLockMac() {
+        return lockMac;
+    }
+
+    public void setLockMac(String lockMac) {
+        this.lockMac = lockMac == null ? null : lockMac.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getLogLevel() {
+        return logLevel;
+    }
+
+    public void setLogLevel(String logLevel) {
+        this.logLevel = logLevel == null ? null : logLevel.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getLogAlert() {
+        return logAlert;
+    }
+
+    public void setLogAlert(String logAlert) {
+        this.logAlert = logAlert == null ? null : logAlert.trim();
+    }
+
+    public Date getSyncTime() {
+        return syncTime;
+    }
+
+    public void setSyncTime(Date syncTime) {
+        this.syncTime = syncTime;
+    }
+
+    public String getLookingNotes() {
+        return lookingNotes;
+    }
+
+    public void setLookingNotes(String lookingNotes) {
+        this.lookingNotes = lookingNotes == null ? null : lookingNotes.trim();
+    }
+
+    public String getUpdateUser() {
+        return updateUser;
+    }
+
+    public void setUpdateUser(String updateUser) {
+        this.updateUser = updateUser == null ? null : updateUser.trim();
+    }
+}

文件差異過大導致無法顯示
+ 1061 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorLogExample.java


+ 38 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorSync.java

@@ -0,0 +1,38 @@
+package com.idea.buildManage.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class ParkRoomDoorSync implements Serializable {
+    private String id;
+
+    private String roomId;
+
+    private Date syncTime;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getRoomId() {
+        return roomId;
+    }
+
+    public void setRoomId(String roomId) {
+        this.roomId = roomId == null ? null : roomId.trim();
+    }
+
+    public Date getSyncTime() {
+        return syncTime;
+    }
+
+    public void setSyncTime(Date syncTime) {
+        this.syncTime = syncTime;
+    }
+}

+ 401 - 0
pro-base/src/main/java/com/idea/buildManage/model/ParkRoomDoorSyncExample.java

@@ -0,0 +1,401 @@
+package com.idea.buildManage.model;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+public class ParkRoomDoorSyncExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public ParkRoomDoorSyncExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(String value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(String value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(String value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(String value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(String value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(String value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLike(String value) {
+            addCriterion("id like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotLike(String value) {
+            addCriterion("id not like", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<String> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<String> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(String value1, String value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(String value1, String value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIsNull() {
+            addCriterion("room_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIsNotNull() {
+            addCriterion("room_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdEqualTo(String value) {
+            addCriterion("room_id =", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotEqualTo(String value) {
+            addCriterion("room_id <>", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdGreaterThan(String value) {
+            addCriterion("room_id >", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdGreaterThanOrEqualTo(String value) {
+            addCriterion("room_id >=", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLessThan(String value) {
+            addCriterion("room_id <", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLessThanOrEqualTo(String value) {
+            addCriterion("room_id <=", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdLike(String value) {
+            addCriterion("room_id like", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotLike(String value) {
+            addCriterion("room_id not like", value, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdIn(List<String> values) {
+            addCriterion("room_id in", values, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotIn(List<String> values) {
+            addCriterion("room_id not in", values, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdBetween(String value1, String value2) {
+            addCriterion("room_id between", value1, value2, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andRoomIdNotBetween(String value1, String value2) {
+            addCriterion("room_id not between", value1, value2, "roomId");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeIsNull() {
+            addCriterion("sync_time is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeIsNotNull() {
+            addCriterion("sync_time is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeEqualTo(Date value) {
+            addCriterion("sync_time =", value, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeNotEqualTo(Date value) {
+            addCriterion("sync_time <>", value, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeGreaterThan(Date value) {
+            addCriterion("sync_time >", value, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeGreaterThanOrEqualTo(Date value) {
+            addCriterion("sync_time >=", value, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeLessThan(Date value) {
+            addCriterion("sync_time <", value, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeLessThanOrEqualTo(Date value) {
+            addCriterion("sync_time <=", value, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeIn(List<Date> values) {
+            addCriterion("sync_time in", values, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeNotIn(List<Date> values) {
+            addCriterion("sync_time not in", values, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeBetween(Date value1, Date value2) {
+            addCriterion("sync_time between", value1, value2, "syncTime");
+            return (Criteria) this;
+        }
+
+        public Criteria andSyncTimeNotBetween(Date value1, Date value2) {
+            addCriterion("sync_time not between", value1, value2, "syncTime");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 195 - 0
pro-base/src/main/java/com/idea/buildManage/service/ParkRoomDoorLogService.java

@@ -0,0 +1,195 @@
+package com.idea.buildManage.service;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.mapper.ParkRoomDoorLogMapper;
+import com.idea.buildManage.model.*;
+import com.idea.util.ApartmentUtil;
+import com.rockstar.common.base.BaseService;
+import com.rockstar.common.support.Convert;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.Tablepar;
+import com.rockstar.util.StringUtils;
+import lombok.extern.slf4j.Slf4j;
+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.Date;
+import java.util.List;
+import java.util.UUID;
+
+@Service
+@Slf4j
+public class ParkRoomDoorLogService implements BaseService<ParkRoomDoorLog, ParkRoomDoorLogExample> {
+
+    @Autowired
+    private ParkRoomDoorLogMapper modelMapper;
+
+    @Autowired
+    private ParkRoomDoorSyncService parkRoomDoorSyncService;
+
+    public PageInfo<ParkRoomDoorLog> list(Tablepar tablepar, ParkRoomDoorLog model, DateTrans dt) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<ParkRoomDoorLog> list = modelMapper.selectByExample(getCondition(model,dt));
+        return new PageInfo<>(list);
+    }
+
+    public List<ParkRoomDoorLog> listAll(ParkRoomDoorLog model, DateTrans dt) {
+        return modelMapper.selectByExample(getCondition(model,dt));
+    }
+
+    private ParkRoomDoorLogExample getCondition(ParkRoomDoorLog model, DateTrans dt) {
+        ParkRoomDoorLogExample ex = new ParkRoomDoorLogExample();
+        ex.setOrderByClause("create_time desc");
+        ParkRoomDoorLogExample.Criteria criteria = ex.createCriteria();
+
+        return ex;
+    }
+
+    @Override
+    public int deleteByPrimaryKey(String ids) {
+        List<String> list = Convert.toListStrArray(ids);
+        ParkRoomDoorLogExample example = new ParkRoomDoorLogExample();
+        example.createCriteria().andIdIn(list);
+        return modelMapper.deleteByExample(example);
+    }
+
+    @Override
+    public ParkRoomDoorLog selectByPrimaryKey(String id) {
+        return modelMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public int updateByPrimaryKeySelective(ParkRoomDoorLog record) {
+        return modelMapper.updateByPrimaryKeySelective(record);
+    }
+
+    @Override
+    public int updateByExampleSelective(ParkRoomDoorLog record, ParkRoomDoorLogExample example) {
+        return modelMapper.updateByExampleSelective(record, example);
+    }
+
+    @Override
+    public int updateByExample(ParkRoomDoorLog record, ParkRoomDoorLogExample example) {
+        return modelMapper.updateByExample(record, example);
+    }
+
+    @Override
+    public List<ParkRoomDoorLog> selectByExample(ParkRoomDoorLogExample example) {
+        return modelMapper.selectByExample(example);
+    }
+
+    @Override
+    public long countByExample(ParkRoomDoorLogExample example) {
+        return modelMapper.countByExample(example);
+    }
+
+    public long countByExample(ParkRoomDoorLog model, DateTrans dt) {
+        return modelMapper.countByExample(getCondition(model,dt));
+    }
+
+    @Override
+    public int deleteByExample(ParkRoomDoorLogExample example) {
+        return modelMapper.deleteByExample(example);
+    }
+
+    public int insert(ParkRoomDoorLog record){
+        record.setId(UUID.randomUUID().toString());
+        return insertWithoutId(record);
+    }
+
+    public int insertWithoutId(ParkRoomDoorLog record){
+        record.setSyncTime(new Date());
+        return modelMapper.insert(record);
+    }
+
+    @Override
+    public int insertSelective(ParkRoomDoorLog record) {
+        record.setId(UUID.randomUUID().toString());
+        record.setSyncTime(new Date());
+        return modelMapper.insertSelective(record);
+    }
+
+    @Transactional
+    public void syncRoomLog() throws Exception {
+        List<ParkRoomDoorSync> syncList = parkRoomDoorSyncService.selectByExample(new ParkRoomDoorSyncExample());
+        if(CollectionUtils.isNotEmpty(syncList)){
+            Date now = new Date();
+            int startNum = 0;
+            int pageSize = 50;
+            String token = ApartmentUtil.getToken();
+            for (ParkRoomDoorSync sync : syncList) {
+                Long syncTime = null;
+                if(null!=sync.getSyncTime()){
+                    syncTime = sync.getSyncTime().getTime() / 1000;
+                }
+                JSONObject logObject;
+                try {
+                    logObject = ApartmentUtil.getRoomLockLogListPage(startNum, pageSize, sync.getRoomId(),
+                            token, syncTime, null, null);
+                } catch (Exception e) {
+                    log.error("roomId:{},同步门锁日志任务执行失败 {}", sync.getRoomId(), e.getMessage());
+                    continue;
+                }
+                // 先更新同步信息表
+                sync.setSyncTime(now);
+                parkRoomDoorSyncService.updateByPrimaryKeySelective(sync);
+                if(null!=logObject && StringUtils.isNotEmpty(logObject.getString("list"))){
+                    JSONArray jsonArray = JSON.parseArray(logObject.getString("list"));
+                    if(null!=jsonArray && !jsonArray.isEmpty()){
+                        for (int i = 0; i < jsonArray.size(); i++) {
+                            JSONObject jsonObject = jsonArray.getJSONObject(i);
+                            if(null!=jsonObject.getLong("updateTime")){
+                                jsonObject.put("updateTime", jsonObject.getLong("updateTime") * 1000);
+                            }
+                            if(null!=jsonObject.getLong("createTime")){
+                                jsonObject.put("createTime", jsonObject.getLong("createTime") * 1000);
+                            }
+                        }
+                        List<ParkRoomDoorLog> dataList = JSON.parseArray(jsonArray.toJSONString(), ParkRoomDoorLog.class);
+                        if(CollectionUtils.isNotEmpty(dataList)){
+                            dataList.forEach(item -> {
+                                item.setRoomId(sync.getRoomId());
+                                insert(item);
+                            });
+                        }
+                    }
+                    int totalPages = logObject.getInteger("totalPages");
+                    if(totalPages > 1){
+                        for (int i = 2; i <= totalPages; i++) {
+                            logObject = ApartmentUtil.getRoomLockLogListPage((i-1)*pageSize, pageSize,
+                                    sync.getRoomId(), token, syncTime, null, null);
+                            if(null!=logObject && StringUtils.isNotEmpty(logObject.getString("list"))){
+                                jsonArray = JSON.parseArray(logObject.getString("list"));
+                                if(null!=jsonArray && !jsonArray.isEmpty()){
+                                    for (int j = 0; j < jsonArray.size(); j++) {
+                                        JSONObject jsonObject = jsonArray.getJSONObject(j);
+                                        if(null!=jsonObject.getLong("updateTime")){
+                                            jsonObject.put("updateTime", jsonObject.getLong("updateTime") * 1000);
+                                        }
+                                        if(null!=jsonObject.getLong("createTime")){
+                                            jsonObject.put("createTime", jsonObject.getLong("createTime") * 1000);
+                                        }
+                                    }
+                                    List<ParkRoomDoorLog> dataList = JSON.parseArray(jsonArray.toJSONString(), ParkRoomDoorLog.class);
+                                    if(CollectionUtils.isNotEmpty(dataList)){
+                                        dataList.forEach(item -> {
+                                            item.setRoomId(sync.getRoomId());
+                                            insert(item);
+                                        });
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+}

+ 162 - 0
pro-base/src/main/java/com/idea/buildManage/service/ParkRoomDoorService.java

@@ -0,0 +1,162 @@
+package com.idea.buildManage.service;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.mapper.ParkRoomDoorMapper;
+import com.idea.buildManage.model.ParkRoomDoor;
+import com.idea.buildManage.model.ParkRoomDoorExample;
+import com.idea.buildManage.model.ParkRoomDoorSync;
+import com.idea.buildManage.model.ParkRoomDoorSyncExample;
+import com.idea.util.ApartmentUtil;
+import com.rockstar.common.base.BaseService;
+import com.rockstar.common.support.Convert;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.Tablepar;
+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.*;
+import java.util.stream.Collectors;
+
+@Service
+public class ParkRoomDoorService implements BaseService<ParkRoomDoor, ParkRoomDoorExample> {
+
+    @Autowired
+    private ParkRoomDoorMapper modelMapper;
+
+    @Autowired
+    private ParkRoomDoorSyncService parkRoomDoorSyncService;
+
+    public PageInfo<ParkRoomDoor> list(Tablepar tablepar, ParkRoomDoor model, DateTrans dt) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<ParkRoomDoor> list = modelMapper.selectByExample(getCondition(model,dt));
+        return new PageInfo<>(list);
+    }
+
+    public List<ParkRoomDoor> listAll(ParkRoomDoor model, DateTrans dt) {
+        return modelMapper.selectByExample(getCondition(model,dt));
+    }
+
+    private ParkRoomDoorExample getCondition(ParkRoomDoor model, DateTrans dt) {
+        ParkRoomDoorExample ex = new ParkRoomDoorExample();
+        ex.setOrderByClause("create_time desc");
+        ParkRoomDoorExample.Criteria criteria = ex.createCriteria();
+
+        return ex;
+    }
+
+    @Override
+    public int deleteByPrimaryKey(String ids) {
+        List<String> list = Convert.toListStrArray(ids);
+        ParkRoomDoorExample example = new ParkRoomDoorExample();
+        example.createCriteria().andIdIn(list);
+        return modelMapper.deleteByExample(example);
+    }
+
+    @Override
+    public ParkRoomDoor selectByPrimaryKey(String id) {
+        return modelMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public int updateByPrimaryKeySelective(ParkRoomDoor record) {
+        return modelMapper.updateByPrimaryKeySelective(record);
+    }
+
+    @Override
+    public int updateByExampleSelective(ParkRoomDoor record, ParkRoomDoorExample example) {
+        return modelMapper.updateByExampleSelective(record, example);
+    }
+
+    @Override
+    public int updateByExample(ParkRoomDoor record, ParkRoomDoorExample example) {
+        return modelMapper.updateByExample(record, example);
+    }
+
+    @Override
+    public List<ParkRoomDoor> selectByExample(ParkRoomDoorExample example) {
+        return modelMapper.selectByExample(example);
+    }
+
+    @Override
+    public long countByExample(ParkRoomDoorExample example) {
+        return modelMapper.countByExample(example);
+    }
+
+    public long countByExample(ParkRoomDoor model, DateTrans dt) {
+        return modelMapper.countByExample(getCondition(model,dt));
+    }
+
+    @Override
+    public int deleteByExample(ParkRoomDoorExample example) {
+        return modelMapper.deleteByExample(example);
+    }
+
+    public int insert(ParkRoomDoor record){
+        record.setId(UUID.randomUUID().toString());
+        return insertWithoutId(record);
+    }
+
+    public int insertWithoutId(ParkRoomDoor record){
+        record.setCreateTime(new Date());
+        return modelMapper.insert(record);
+    }
+
+    @Override
+    public int insertSelective(ParkRoomDoor record) {
+        record.setId(UUID.randomUUID().toString());
+        record.setCreateTime(new Date());
+        return modelMapper.insertSelective(record);
+    }
+
+    @Transactional
+    public void syncRoom() throws Exception{
+        deleteByExample(new ParkRoomDoorExample());
+        int startNum = 0;
+        int pageSize = 50;
+        String token = ApartmentUtil.getToken();
+        JSONObject jsonObject = ApartmentUtil.getRoomListPage(startNum, pageSize, token);
+        if(null!=jsonObject && StringUtils.isNotEmpty(jsonObject.getString("list"))){
+            List<ParkRoomDoorSync> syncList = parkRoomDoorSyncService.selectByExample(new ParkRoomDoorSyncExample());
+            Set<String> roomIds = syncList.stream().map(ParkRoomDoorSync::getRoomId).collect(Collectors.toSet());
+            List<ParkRoomDoor> dataList = JSONArray.parseArray(jsonObject.getString("list"), ParkRoomDoor.class);
+            if(CollectionUtils.isNotEmpty(dataList)){
+                dataList.forEach(item -> {
+                    insert(item);
+                    if (!roomIds.contains(item.getRoomId())) {
+                        ParkRoomDoorSync sync = new ParkRoomDoorSync();
+                        sync.setRoomId(item.getRoomId());
+                        parkRoomDoorSyncService.insert(sync);
+                        roomIds.add(item.getRoomId());
+                    }
+                });
+            }
+            int totalPages = jsonObject.getInteger("totalPages");
+            if(totalPages > 1){
+                for (int i = 2; i <= totalPages; i++) {
+                    JSONObject pagesObject = ApartmentUtil.getRoomListPage((i-1)*50, 50, token);
+                    if(null!=pagesObject && StringUtils.isNotEmpty(pagesObject.getString("list"))){
+                        dataList = JSONArray.parseArray(pagesObject.getString("list"), ParkRoomDoor.class);
+                        if(CollectionUtils.isNotEmpty(dataList)){
+                            dataList.forEach(item -> {
+                                insert(item);
+                                if (!roomIds.contains(item.getRoomId())) {
+                                    ParkRoomDoorSync sync = new ParkRoomDoorSync();
+                                    sync.setRoomId(item.getRoomId());
+                                    parkRoomDoorSyncService.insert(sync);
+                                    roomIds.add(item.getRoomId());
+                                }
+                            });
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+}

+ 104 - 0
pro-base/src/main/java/com/idea/buildManage/service/ParkRoomDoorSyncService.java

@@ -0,0 +1,104 @@
+package com.idea.buildManage.service;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.idea.buildManage.mapper.ParkRoomDoorSyncMapper;
+import com.idea.buildManage.model.ParkRoomDoorSync;
+import com.idea.buildManage.model.ParkRoomDoorSyncExample;
+import com.rockstar.common.base.BaseService;
+import com.rockstar.common.support.Convert;
+import com.rockstar.frame.model.extend.DateTrans;
+import com.rockstar.frame.model.extend.Tablepar;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.UUID;
+
+@Service
+public class ParkRoomDoorSyncService implements BaseService<ParkRoomDoorSync, ParkRoomDoorSyncExample> {
+
+    @Autowired
+    private ParkRoomDoorSyncMapper modelMapper;
+
+    public PageInfo<ParkRoomDoorSync> list(Tablepar tablepar, ParkRoomDoorSync model, DateTrans dt) {
+        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+        List<ParkRoomDoorSync> list = modelMapper.selectByExample(getCondition(model,dt));
+        return new PageInfo<>(list);
+    }
+
+    public List<ParkRoomDoorSync> listAll(ParkRoomDoorSync model, DateTrans dt) {
+        return modelMapper.selectByExample(getCondition(model,dt));
+    }
+
+    private ParkRoomDoorSyncExample getCondition(ParkRoomDoorSync model, DateTrans dt) {
+        ParkRoomDoorSyncExample ex = new ParkRoomDoorSyncExample();
+        ex.setOrderByClause("create_time desc");
+        ParkRoomDoorSyncExample.Criteria criteria = ex.createCriteria();
+
+        return ex;
+    }
+
+    @Override
+    public int deleteByPrimaryKey(String ids) {
+        List<String> list = Convert.toListStrArray(ids);
+        ParkRoomDoorSyncExample example = new ParkRoomDoorSyncExample();
+        example.createCriteria().andIdIn(list);
+        return modelMapper.deleteByExample(example);
+    }
+
+    @Override
+    public ParkRoomDoorSync selectByPrimaryKey(String id) {
+        return modelMapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public int updateByPrimaryKeySelective(ParkRoomDoorSync record) {
+        return modelMapper.updateByPrimaryKeySelective(record);
+    }
+
+    @Override
+    public int updateByExampleSelective(ParkRoomDoorSync record, ParkRoomDoorSyncExample example) {
+        return modelMapper.updateByExampleSelective(record, example);
+    }
+
+    @Override
+    public int updateByExample(ParkRoomDoorSync record, ParkRoomDoorSyncExample example) {
+        return modelMapper.updateByExample(record, example);
+    }
+
+    @Override
+    public List<ParkRoomDoorSync> selectByExample(ParkRoomDoorSyncExample example) {
+        return modelMapper.selectByExample(example);
+    }
+
+    @Override
+    public long countByExample(ParkRoomDoorSyncExample example) {
+        return modelMapper.countByExample(example);
+    }
+
+    public long countByExample(ParkRoomDoorSync model, DateTrans dt) {
+        return modelMapper.countByExample(getCondition(model,dt));
+    }
+
+    @Override
+    public int deleteByExample(ParkRoomDoorSyncExample example) {
+        return modelMapper.deleteByExample(example);
+    }
+
+    public int insert(ParkRoomDoorSync record){
+        record.setId(UUID.randomUUID().toString());
+        return insertWithoutId(record);
+    }
+
+    public int insertWithoutId(ParkRoomDoorSync record){
+        return modelMapper.insert(record);
+    }
+
+    @Override
+    public int insertSelective(ParkRoomDoorSync record) {
+        record.setId(UUID.randomUUID().toString());
+        return modelMapper.insertSelective(record);
+    }
+
+}

+ 37 - 4
pro-base/src/main/java/com/idea/buildManage/service/ParkRoomReservationService.java

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.idea.buildManage.dto.BindSearchDto;
+import com.idea.buildManage.dto.ParkRoomDoorLogDto;
 import com.idea.buildManage.dto.ParkRoomReservationDto;
 import com.idea.buildManage.dto.RoomSearchDto;
 import com.idea.buildManage.mapper.ParkRoomReservationExtendMapper;
@@ -13,6 +14,9 @@ import com.idea.buildManage.model.ParkRoomBindDoor;
 import com.idea.buildManage.model.ParkRoomBindDoorExample;
 import com.idea.buildManage.model.ParkRoomReservation;
 import com.idea.buildManage.model.ParkRoomReservationExample;
+import com.idea.buildManage.util.DoorLogType;
+import com.idea.buildManage.util.ReservationStatus;
+import com.idea.buildManage.vo.ParkRoomDoorLogVo;
 import com.idea.buildManage.vo.ParkRoomVo;
 import com.idea.util.ApartmentUtil;
 import com.rockstar.common.base.BaseService;
@@ -55,14 +59,43 @@ public class ParkRoomReservationService implements BaseService<ParkRoomReservati
         return new PageInfo<>(list);
     }
 
-    public PageInfo<ParkRoomReservation> completeListPage(Tablepar tablepar, ParkRoomReservationDto model) {
+    public PageInfo<ParkRoomDoorLogVo> completeListPage(Tablepar tablepar, ParkRoomDoorLogDto model) {
         PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
-        List<ParkRoomReservation> list = parkRoomReservationExtendMapper.completeListPage(model);
+        List<ParkRoomDoorLogVo> list = parkRoomReservationExtendMapper.completeListPage(model);
+        if(CollectionUtils.isNotEmpty(list)){
+            handleLogData(list);
+        }
         return new PageInfo<>(list);
     }
 
-    public List<ParkRoomReservation> completeListPageAll(ParkRoomReservationDto model) {
-        return parkRoomReservationExtendMapper.completeListPage(model);
+    public List<ParkRoomDoorLogVo> completeListPageAll(ParkRoomDoorLogDto model) {
+        List<ParkRoomDoorLogVo> list = parkRoomReservationExtendMapper.completeListPage(model);
+        if(CollectionUtils.isNotEmpty(list)){
+            handleLogData(list);
+        }
+        return list;
+    }
+
+    private void handleLogData(List<ParkRoomDoorLogVo> list) {
+        for (ParkRoomDoorLogVo logVo : list) {
+            if(null!=logVo.getLogType()){
+                logVo.setLogTypeStr(DoorLogType.descriptionFromCode(logVo.getLogType()));
+                // 日志类型为开锁
+                if(logVo.getLogType().equals(DoorLogType.UNLOCK.getCode())){
+                    ParkRoomReservation data = parkRoomReservationExtendMapper.getReservationByRoomAndTime(logVo.getRoomId(), DateUtils.formatDateTime(logVo.getCreateTime()));
+                    if(null!=data){
+                        logVo.setReservationId(data.getId());
+                        logVo.setApplicantName(data.getApplicantName());
+                        logVo.setApplicantPhone(data.getApplicantPhone());
+                        logVo.setBuyerName(data.getBuyerName());
+                        logVo.setBuyerPhone(data.getBuyerPhone());
+                        logVo.setReservationStatusStr(ReservationStatus.descriptionFromCode(data.getReservationStatus()));
+                        logVo.setReservationDate(DateUtils.formatDate(data.getReservationDate()));
+                        logVo.setReservationTimeRange(data.getReservationTimeStart()+"~"+data.getReservationTimeEnd());
+                    }
+                }
+            }
+        }
     }
 
     public PageInfo<ParkRoomVo> roomListPage(Tablepar tablepar, RoomSearchDto model) {

+ 38 - 0
pro-base/src/main/java/com/idea/buildManage/task/ParkRoomReservationTask.java

@@ -13,6 +13,12 @@ public class ParkRoomReservationTask {
     @Autowired
     private ParkRoomReservationService parkRoomReservationService;
 
+    @Autowired
+    private ParkRoomDoorService parkRoomDoorService;
+
+    @Autowired
+    private ParkRoomDoorLogService parkRoomDoorLogService;
+
     /**
      * 每小时执行一次
      * 获取开锁日志
@@ -28,4 +34,36 @@ public class ParkRoomReservationTask {
         }
     }
 
+    /**
+     * 每天执行一次
+     * 同步房间列表
+     */
+    @Scheduled(cron = "0 0 0 * * ?")
+    public void syncRoom() {
+        try {
+            parkRoomDoorService.syncRoom();
+            log.info("同步房间列表任务执行成功");
+            System.out.println("syncRoom success");
+        } catch (Exception e) {
+            log.error("同步房间列表任务执行失败 {}", e.getMessage());
+            System.out.println(e.getMessage());
+        }
+    }
+
+    /**
+     * 每半小时执行一次
+     * 获取门锁日志
+     */
+//    @Scheduled(cron = "0 */30 * * * *")
+    public void syncRoomLog() {
+        try {
+            parkRoomDoorLogService.syncRoomLog();
+            log.info("同步门锁日志任务执行成功");
+            System.out.println("syncRoomLog success");
+        } catch (Exception e) {
+            log.error("同步门锁日志任务执行失败 {}", e.getMessage());
+            System.out.println(e.getMessage());
+        }
+    }
+
 }

+ 75 - 0
pro-base/src/main/java/com/idea/buildManage/util/DoorLogType.java

@@ -0,0 +1,75 @@
+package com.idea.buildManage.util;
+
+import lombok.Getter;
+
+/**
+ * 门锁事件类型枚举
+ */
+@Getter
+public enum DoorLogType {
+    FORCE_DISMANTLE_ALARM(1, "强拆报警"),
+    ILLEGAL_OPERATION_ALARM(2, "非法操作报警(错误次数超限等),系统已锁定"),
+    LOW_BATTERY_ALARM(3, "低电量报警"),
+    UNLOCK(4, "开锁"),
+    ARM(5, "布防"),
+    DISARM(6, "撤防"),
+    COERCIVE_UNLOCK(7, "胁迫开锁"),
+    ADD_AUTHORIZATION(8, "添加授权"),
+    DELETE_AUTHORIZATION(9, "删除授权"),
+    DEADLOCK(10, "反锁"),
+    DEADLOCK_RELEASE(11, "反锁解除"),
+    PICK_LOCK_ALARM(12, "撬锁芯报警"),
+    DOORBELL_EVENT(13, "门铃事件"),
+    DOOR_NOT_CLOSED_PROPERLY(14, "门未关好(假锁报警)"),
+    DOOR_NOT_CLOSED_ALARM(15, "未关门报警"),
+    LOCK_CLOSED_NORMALLY_OPEN(17, "门锁已关闭常开"),
+    MALFUNCTION_ALARM(18, "故障报警"),
+    STATUS_UPDATE_EVENT(19, "状态更新事件"),
+    SWITCH_SYSTEM_LANGUAGE(20, "切换系统语言"),
+    SYSTEM_LOCK_RELEASE(21, "系统锁定状态解除"),
+    REQUEST_TIME_SYNC(22, "申请时间同步"),
+    FACTORY_RESET(23, "门锁已恢复出厂设置"),
+    MODIFY_AUTHORIZATION(24, "修改授权"),
+    KEY_NOT_REMOVED(25, "未拔钥匙事件"),
+    OPEN_LOCK_COVER(26, "打开锁头盖事件"),
+    SYSTEM_PARAM_SETTING(27, "系统参数设置事件"),
+    ENABLE_OR_DISABLE(28, "使能与禁止"),
+    LOCK_EVENT(30, "上锁事件"),
+    LATCH_RETRACT_EVENT(31, "斜舌缩进事件(压把手事件)"),
+    MECHANICAL_KEY_UNLOCK(32, "机械钥匙开锁事件"),
+    LOCK_ACTIVATION(33, "门锁激活事件"),
+    MODIFY_KEY_VALID_TIME(34, "修改钥匙有效时间"),
+    INVALID_KEY_UNLOCK(54, "错误/禁用钥匙开锁事件");
+
+    private final int code;
+    private final String description;
+
+    DoorLogType(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    /**
+     * 根据代码获取枚举实例
+     */
+    public static DoorLogType fromCode(int code) {
+        for (DoorLogType type : values()) {
+            if (type.code == code) {
+                return type;
+            }
+        }
+        throw new IllegalArgumentException("Invalid LockEventType code: " + code);
+    }
+
+    /**
+     * 根据代码获取描述
+     */
+    public static String descriptionFromCode(int code) {
+        for (DoorLogType type : values()) {
+            if (type.code == code) {
+                return type.getDescription();
+            }
+        }
+        return String.valueOf(code);
+    }
+}

+ 47 - 0
pro-base/src/main/java/com/idea/buildManage/util/ReservationStatus.java

@@ -0,0 +1,47 @@
+package com.idea.buildManage.util;
+
+import lombok.Getter;
+
+/**
+ * 看房预约单状态
+ * 1 已预约、2 已取消、3 待入户、4 已完成
+ */
+@Getter
+public enum ReservationStatus {
+    FORCE_DISMANTLE_ALARM(1, "已预约"),
+    ILLEGAL_OPERATION_ALARM(2, "已取消"),
+    LOW_BATTERY_ALARM(3, "待入户"),
+    UNLOCK(4, "已完成");
+
+    private final int code;
+    private final String description;
+
+    ReservationStatus(int code, String description) {
+        this.code = code;
+        this.description = description;
+    }
+
+    /**
+     * 根据代码获取枚举实例
+     */
+    public static ReservationStatus fromCode(int code) {
+        for (ReservationStatus type : values()) {
+            if (type.code == code) {
+                return type;
+            }
+        }
+        throw new IllegalArgumentException("Invalid LockEventType code: " + code);
+    }
+
+    /**
+     * 根据代码获取描述
+     */
+    public static String descriptionFromCode(int code) {
+        for (ReservationStatus type : values()) {
+            if (type.code == code) {
+                return type.getDescription();
+            }
+        }
+        return String.valueOf(code);
+    }
+}

+ 91 - 0
pro-base/src/main/java/com/idea/buildManage/vo/ParkRoomDoorLogVo.java

@@ -0,0 +1,91 @@
+package com.idea.buildManage.vo;
+
+import com.alibaba.excel.annotation.ExcelIgnore;
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class ParkRoomDoorLogVo implements Serializable {
+
+    @ExcelProperty(value = "小区名称")
+    private String houseName;
+    @ExcelProperty(value = "楼栋名称")
+    private String buildingName;
+    @ExcelProperty(value = "房间名称")
+    private String roomName;
+    @ExcelProperty(value = "地址")
+    private String roomAddress;
+    @ExcelProperty(value = "日志类型")
+    private String logTypeStr;
+    @ExcelProperty(value = "房屋关联")
+    private String roomBind;
+    @ExcelProperty(value = "申请人")
+    private String applicantName;
+    @ExcelProperty(value = "申请人电话")
+    private String applicantPhone;
+    @ExcelProperty(value = "购房人")
+    private String buyerName;
+    @ExcelProperty(value = "购房人电话")
+    private String buyerPhone;
+    @ExcelProperty(value = "预约状态")
+    private String reservationStatusStr;
+    @ExcelProperty(value = "开锁日期")
+    private String reservationDate;
+    @ExcelProperty(value = "开锁时段")
+    private String reservationTimeRange;
+    @ExcelProperty(value = "备注")
+    private String lookingNotes;
+    @ExcelProperty(value = "操作人")
+    private String updateUserName;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    @ExcelProperty(value = "日志日期")
+    @ColumnWidth(20)
+    private Date createTime;
+
+    @ExcelIgnore
+    private String id;
+
+    @ExcelIgnore
+    private String roomId;
+
+    @ExcelIgnore
+    private String logId;
+
+    @ExcelIgnore
+    private Integer logType;
+
+    @ExcelIgnore
+    private Integer lockType;
+
+    @ExcelIgnore
+    private String lockMac;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    @ExcelIgnore
+    private Date updateTime;
+
+    @ExcelIgnore
+    private String logLevel;
+
+    @ExcelIgnore
+    private String logAlert;
+
+    @ExcelIgnore
+    private Date syncTime;
+
+    @ExcelIgnore
+    private String floorName;
+
+    @ExcelIgnore
+    private String updateUser;
+
+    @ExcelIgnore
+    private String reservationId;
+
+    private static final long serialVersionUID = 1L;
+}

+ 3 - 2
pro-base/src/main/java/com/idea/util/ApartmentUtil.java

@@ -182,14 +182,15 @@ public class ApartmentUtil {
         jsonObject.put("startNum", startNum);
         jsonObject.put("getNum", getNum);
         jsonObject.put("roomId", roomId);
-        if(null!=beginTime && null!=endTime){
+        if(null!=beginTime){
             jsonObject.put("beginTime", beginTime);
+        }
+        if(null!=endTime){
             jsonObject.put("endTime", endTime);
         }
         if(null!=logType){
             jsonObject.put("logType", logType);
         }
-        jsonObject.put("logType", logType);
         params.put("data", jsonObject);
         String body = params.toJSONString();
         // 发送POST请求

+ 338 - 0
pro-base/src/main/resources/mybatis/buildManage/ParkRoomDoorLogMapper.xml

@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.idea.buildManage.mapper.ParkRoomDoorLogMapper">
+  <resultMap id="BaseResultMap" type="com.idea.buildManage.model.ParkRoomDoorLog">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="room_id" jdbcType="VARCHAR" property="roomId" />
+    <result column="log_id" jdbcType="VARCHAR" property="logId" />
+    <result column="log_type" jdbcType="INTEGER" property="logType" />
+    <result column="lock_type" jdbcType="INTEGER" property="lockType" />
+    <result column="lock_mac" jdbcType="VARCHAR" property="lockMac" />
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="log_level" jdbcType="VARCHAR" property="logLevel" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="log_alert" jdbcType="VARCHAR" property="logAlert" />
+    <result column="sync_time" jdbcType="TIMESTAMP" property="syncTime" />
+    <result column="looking_notes" jdbcType="VARCHAR" property="lookingNotes" />
+    <result column="update_user" jdbcType="VARCHAR" property="updateUser" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, room_id, log_id, log_type, lock_type, lock_mac, update_time, log_level, create_time, 
+    log_alert, sync_time, looking_notes, update_user
+  </sql>
+  <select id="selectByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorLogExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from park_room_door_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from park_room_door_log
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from park_room_door_log
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorLogExample">
+    delete from park_room_door_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.idea.buildManage.model.ParkRoomDoorLog">
+    insert into park_room_door_log (id, room_id, log_id, 
+      log_type, lock_type, lock_mac, 
+      update_time, log_level, create_time, 
+      log_alert, sync_time, looking_notes, 
+      update_user)
+    values (#{id,jdbcType=VARCHAR}, #{roomId,jdbcType=VARCHAR}, #{logId,jdbcType=VARCHAR}, 
+      #{logType,jdbcType=INTEGER}, #{lockType,jdbcType=INTEGER}, #{lockMac,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{logLevel,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
+      #{logAlert,jdbcType=VARCHAR}, #{syncTime,jdbcType=TIMESTAMP}, #{lookingNotes,jdbcType=VARCHAR}, 
+      #{updateUser,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.idea.buildManage.model.ParkRoomDoorLog">
+    insert into park_room_door_log
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="roomId != null">
+        room_id,
+      </if>
+      <if test="logId != null">
+        log_id,
+      </if>
+      <if test="logType != null">
+        log_type,
+      </if>
+      <if test="lockType != null">
+        lock_type,
+      </if>
+      <if test="lockMac != null">
+        lock_mac,
+      </if>
+      <if test="updateTime != null">
+        update_time,
+      </if>
+      <if test="logLevel != null">
+        log_level,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+      <if test="logAlert != null">
+        log_alert,
+      </if>
+      <if test="syncTime != null">
+        sync_time,
+      </if>
+      <if test="lookingNotes != null">
+        looking_notes,
+      </if>
+      <if test="updateUser != null">
+        update_user,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="roomId != null">
+        #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="logId != null">
+        #{logId,jdbcType=VARCHAR},
+      </if>
+      <if test="logType != null">
+        #{logType,jdbcType=INTEGER},
+      </if>
+      <if test="lockType != null">
+        #{lockType,jdbcType=INTEGER},
+      </if>
+      <if test="lockMac != null">
+        #{lockMac,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="logLevel != null">
+        #{logLevel,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="logAlert != null">
+        #{logAlert,jdbcType=VARCHAR},
+      </if>
+      <if test="syncTime != null">
+        #{syncTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="lookingNotes != null">
+        #{lookingNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="updateUser != null">
+        #{updateUser,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorLogExample" resultType="java.lang.Long">
+    select count(*) from park_room_door_log
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update park_room_door_log
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomId != null">
+        room_id = #{record.roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.logId != null">
+        log_id = #{record.logId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.logType != null">
+        log_type = #{record.logType,jdbcType=INTEGER},
+      </if>
+      <if test="record.lockType != null">
+        lock_type = #{record.lockType,jdbcType=INTEGER},
+      </if>
+      <if test="record.lockMac != null">
+        lock_mac = #{record.lockMac,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updateTime != null">
+        update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.logLevel != null">
+        log_level = #{record.logLevel,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.logAlert != null">
+        log_alert = #{record.logAlert,jdbcType=VARCHAR},
+      </if>
+      <if test="record.syncTime != null">
+        sync_time = #{record.syncTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.lookingNotes != null">
+        looking_notes = #{record.lookingNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="record.updateUser != null">
+        update_user = #{record.updateUser,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update park_room_door_log
+    set id = #{record.id,jdbcType=VARCHAR},
+      room_id = #{record.roomId,jdbcType=VARCHAR},
+      log_id = #{record.logId,jdbcType=VARCHAR},
+      log_type = #{record.logType,jdbcType=INTEGER},
+      lock_type = #{record.lockType,jdbcType=INTEGER},
+      lock_mac = #{record.lockMac,jdbcType=VARCHAR},
+      update_time = #{record.updateTime,jdbcType=TIMESTAMP},
+      log_level = #{record.logLevel,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      log_alert = #{record.logAlert,jdbcType=VARCHAR},
+      sync_time = #{record.syncTime,jdbcType=TIMESTAMP},
+      looking_notes = #{record.lookingNotes,jdbcType=VARCHAR},
+      update_user = #{record.updateUser,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.buildManage.model.ParkRoomDoorLog">
+    update park_room_door_log
+    <set>
+      <if test="roomId != null">
+        room_id = #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="logId != null">
+        log_id = #{logId,jdbcType=VARCHAR},
+      </if>
+      <if test="logType != null">
+        log_type = #{logType,jdbcType=INTEGER},
+      </if>
+      <if test="lockType != null">
+        lock_type = #{lockType,jdbcType=INTEGER},
+      </if>
+      <if test="lockMac != null">
+        lock_mac = #{lockMac,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        update_time = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="logLevel != null">
+        log_level = #{logLevel,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="logAlert != null">
+        log_alert = #{logAlert,jdbcType=VARCHAR},
+      </if>
+      <if test="syncTime != null">
+        sync_time = #{syncTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="lookingNotes != null">
+        looking_notes = #{lookingNotes,jdbcType=VARCHAR},
+      </if>
+      <if test="updateUser != null">
+        update_user = #{updateUser,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.idea.buildManage.model.ParkRoomDoorLog">
+    update park_room_door_log
+    set room_id = #{roomId,jdbcType=VARCHAR},
+      log_id = #{logId,jdbcType=VARCHAR},
+      log_type = #{logType,jdbcType=INTEGER},
+      lock_type = #{lockType,jdbcType=INTEGER},
+      lock_mac = #{lockMac,jdbcType=VARCHAR},
+      update_time = #{updateTime,jdbcType=TIMESTAMP},
+      log_level = #{logLevel,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP},
+      log_alert = #{logAlert,jdbcType=VARCHAR},
+      sync_time = #{syncTime,jdbcType=TIMESTAMP},
+      looking_notes = #{lookingNotes,jdbcType=VARCHAR},
+      update_user = #{updateUser,jdbcType=VARCHAR}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 575 - 0
pro-base/src/main/resources/mybatis/buildManage/ParkRoomDoorMapper.xml

@@ -0,0 +1,575 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.idea.buildManage.mapper.ParkRoomDoorMapper">
+  <resultMap id="BaseResultMap" type="com.idea.buildManage.model.ParkRoomDoor">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="room_id" jdbcType="VARCHAR" property="roomId" />
+    <result column="room_name" jdbcType="VARCHAR" property="roomName" />
+    <result column="floor_id" jdbcType="VARCHAR" property="floorId" />
+    <result column="floor_name" jdbcType="VARCHAR" property="floorName" />
+    <result column="building_id" jdbcType="VARCHAR" property="buildingId" />
+    <result column="building_name" jdbcType="VARCHAR" property="buildingName" />
+    <result column="house_id" jdbcType="VARCHAR" property="houseId" />
+    <result column="house_name" jdbcType="VARCHAR" property="houseName" />
+    <result column="room_state" jdbcType="INTEGER" property="roomState" />
+    <result column="electric_num" jdbcType="INTEGER" property="electricNum" />
+    <result column="lock_mac" jdbcType="VARCHAR" property="lockMac" />
+    <result column="lock_state" jdbcType="INTEGER" property="lockState" />
+    <result column="aes_key" jdbcType="VARCHAR" property="aesKey" />
+    <result column="admin_auth_code" jdbcType="VARCHAR" property="adminAuthCode" />
+    <result column="general_auth_code" jdbcType="VARCHAR" property="generalAuthCode" />
+    <result column="temp_auth_code" jdbcType="VARCHAR" property="tempAuthCode" />
+    <result column="ble_protocol_ver" jdbcType="VARCHAR" property="bleProtocolVer" />
+    <result column="hardware_version" jdbcType="VARCHAR" property="hardwareVersion" />
+    <result column="software_version" jdbcType="VARCHAR" property="softwareVersion" />
+    <result column="imsi" jdbcType="VARCHAR" property="imsi" />
+    <result column="imei" jdbcType="VARCHAR" property="imei" />
+    <result column="iccid" jdbcType="VARCHAR" property="iccid" />
+    <result column="rsrp" jdbcType="VARCHAR" property="rsrp" />
+    <result column="sinr" jdbcType="VARCHAR" property="sinr" />
+    <result column="cat1_software_version" jdbcType="VARCHAR" property="cat1SoftwareVersion" />
+    <result column="cat1_hardware_version" jdbcType="VARCHAR" property="cat1HardwareVersion" />
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, room_id, room_name, floor_id, floor_name, building_id, building_name, house_id, 
+    house_name, room_state, electric_num, lock_mac, lock_state, aes_key, admin_auth_code, 
+    general_auth_code, temp_auth_code, ble_protocol_ver, hardware_version, software_version, 
+    imsi, imei, iccid, rsrp, sinr, cat1_software_version, cat1_hardware_version, create_time
+  </sql>
+  <select id="selectByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from park_room_door
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from park_room_door
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from park_room_door
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorExample">
+    delete from park_room_door
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.idea.buildManage.model.ParkRoomDoor">
+    insert into park_room_door (id, room_id, room_name, 
+      floor_id, floor_name, building_id, 
+      building_name, house_id, house_name, 
+      room_state, electric_num, lock_mac, 
+      lock_state, aes_key, admin_auth_code, 
+      general_auth_code, temp_auth_code, ble_protocol_ver, 
+      hardware_version, software_version, imsi, 
+      imei, iccid, rsrp, 
+      sinr, cat1_software_version, cat1_hardware_version, 
+      create_time)
+    values (#{id,jdbcType=VARCHAR}, #{roomId,jdbcType=VARCHAR}, #{roomName,jdbcType=VARCHAR}, 
+      #{floorId,jdbcType=VARCHAR}, #{floorName,jdbcType=VARCHAR}, #{buildingId,jdbcType=VARCHAR}, 
+      #{buildingName,jdbcType=VARCHAR}, #{houseId,jdbcType=VARCHAR}, #{houseName,jdbcType=VARCHAR}, 
+      #{roomState,jdbcType=INTEGER}, #{electricNum,jdbcType=INTEGER}, #{lockMac,jdbcType=VARCHAR}, 
+      #{lockState,jdbcType=INTEGER}, #{aesKey,jdbcType=VARCHAR}, #{adminAuthCode,jdbcType=VARCHAR}, 
+      #{generalAuthCode,jdbcType=VARCHAR}, #{tempAuthCode,jdbcType=VARCHAR}, #{bleProtocolVer,jdbcType=VARCHAR}, 
+      #{hardwareVersion,jdbcType=VARCHAR}, #{softwareVersion,jdbcType=VARCHAR}, #{imsi,jdbcType=VARCHAR}, 
+      #{imei,jdbcType=VARCHAR}, #{iccid,jdbcType=VARCHAR}, #{rsrp,jdbcType=VARCHAR}, 
+      #{sinr,jdbcType=VARCHAR}, #{cat1SoftwareVersion,jdbcType=VARCHAR}, #{cat1HardwareVersion,jdbcType=VARCHAR}, 
+      #{createTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.idea.buildManage.model.ParkRoomDoor">
+    insert into park_room_door
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="roomId != null">
+        room_id,
+      </if>
+      <if test="roomName != null">
+        room_name,
+      </if>
+      <if test="floorId != null">
+        floor_id,
+      </if>
+      <if test="floorName != null">
+        floor_name,
+      </if>
+      <if test="buildingId != null">
+        building_id,
+      </if>
+      <if test="buildingName != null">
+        building_name,
+      </if>
+      <if test="houseId != null">
+        house_id,
+      </if>
+      <if test="houseName != null">
+        house_name,
+      </if>
+      <if test="roomState != null">
+        room_state,
+      </if>
+      <if test="electricNum != null">
+        electric_num,
+      </if>
+      <if test="lockMac != null">
+        lock_mac,
+      </if>
+      <if test="lockState != null">
+        lock_state,
+      </if>
+      <if test="aesKey != null">
+        aes_key,
+      </if>
+      <if test="adminAuthCode != null">
+        admin_auth_code,
+      </if>
+      <if test="generalAuthCode != null">
+        general_auth_code,
+      </if>
+      <if test="tempAuthCode != null">
+        temp_auth_code,
+      </if>
+      <if test="bleProtocolVer != null">
+        ble_protocol_ver,
+      </if>
+      <if test="hardwareVersion != null">
+        hardware_version,
+      </if>
+      <if test="softwareVersion != null">
+        software_version,
+      </if>
+      <if test="imsi != null">
+        imsi,
+      </if>
+      <if test="imei != null">
+        imei,
+      </if>
+      <if test="iccid != null">
+        iccid,
+      </if>
+      <if test="rsrp != null">
+        rsrp,
+      </if>
+      <if test="sinr != null">
+        sinr,
+      </if>
+      <if test="cat1SoftwareVersion != null">
+        cat1_software_version,
+      </if>
+      <if test="cat1HardwareVersion != null">
+        cat1_hardware_version,
+      </if>
+      <if test="createTime != null">
+        create_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="roomId != null">
+        #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="roomName != null">
+        #{roomName,jdbcType=VARCHAR},
+      </if>
+      <if test="floorId != null">
+        #{floorId,jdbcType=VARCHAR},
+      </if>
+      <if test="floorName != null">
+        #{floorName,jdbcType=VARCHAR},
+      </if>
+      <if test="buildingId != null">
+        #{buildingId,jdbcType=VARCHAR},
+      </if>
+      <if test="buildingName != null">
+        #{buildingName,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        #{houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="houseName != null">
+        #{houseName,jdbcType=VARCHAR},
+      </if>
+      <if test="roomState != null">
+        #{roomState,jdbcType=INTEGER},
+      </if>
+      <if test="electricNum != null">
+        #{electricNum,jdbcType=INTEGER},
+      </if>
+      <if test="lockMac != null">
+        #{lockMac,jdbcType=VARCHAR},
+      </if>
+      <if test="lockState != null">
+        #{lockState,jdbcType=INTEGER},
+      </if>
+      <if test="aesKey != null">
+        #{aesKey,jdbcType=VARCHAR},
+      </if>
+      <if test="adminAuthCode != null">
+        #{adminAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="generalAuthCode != null">
+        #{generalAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="tempAuthCode != null">
+        #{tempAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="bleProtocolVer != null">
+        #{bleProtocolVer,jdbcType=VARCHAR},
+      </if>
+      <if test="hardwareVersion != null">
+        #{hardwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="softwareVersion != null">
+        #{softwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="imsi != null">
+        #{imsi,jdbcType=VARCHAR},
+      </if>
+      <if test="imei != null">
+        #{imei,jdbcType=VARCHAR},
+      </if>
+      <if test="iccid != null">
+        #{iccid,jdbcType=VARCHAR},
+      </if>
+      <if test="rsrp != null">
+        #{rsrp,jdbcType=VARCHAR},
+      </if>
+      <if test="sinr != null">
+        #{sinr,jdbcType=VARCHAR},
+      </if>
+      <if test="cat1SoftwareVersion != null">
+        #{cat1SoftwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="cat1HardwareVersion != null">
+        #{cat1HardwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorExample" resultType="java.lang.Long">
+    select count(*) from park_room_door
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update park_room_door
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomId != null">
+        room_id = #{record.roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomName != null">
+        room_name = #{record.roomName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.floorId != null">
+        floor_id = #{record.floorId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.floorName != null">
+        floor_name = #{record.floorName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.buildingId != null">
+        building_id = #{record.buildingId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.buildingName != null">
+        building_name = #{record.buildingName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.houseId != null">
+        house_id = #{record.houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.houseName != null">
+        house_name = #{record.houseName,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomState != null">
+        room_state = #{record.roomState,jdbcType=INTEGER},
+      </if>
+      <if test="record.electricNum != null">
+        electric_num = #{record.electricNum,jdbcType=INTEGER},
+      </if>
+      <if test="record.lockMac != null">
+        lock_mac = #{record.lockMac,jdbcType=VARCHAR},
+      </if>
+      <if test="record.lockState != null">
+        lock_state = #{record.lockState,jdbcType=INTEGER},
+      </if>
+      <if test="record.aesKey != null">
+        aes_key = #{record.aesKey,jdbcType=VARCHAR},
+      </if>
+      <if test="record.adminAuthCode != null">
+        admin_auth_code = #{record.adminAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.generalAuthCode != null">
+        general_auth_code = #{record.generalAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.tempAuthCode != null">
+        temp_auth_code = #{record.tempAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.bleProtocolVer != null">
+        ble_protocol_ver = #{record.bleProtocolVer,jdbcType=VARCHAR},
+      </if>
+      <if test="record.hardwareVersion != null">
+        hardware_version = #{record.hardwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="record.softwareVersion != null">
+        software_version = #{record.softwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="record.imsi != null">
+        imsi = #{record.imsi,jdbcType=VARCHAR},
+      </if>
+      <if test="record.imei != null">
+        imei = #{record.imei,jdbcType=VARCHAR},
+      </if>
+      <if test="record.iccid != null">
+        iccid = #{record.iccid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.rsrp != null">
+        rsrp = #{record.rsrp,jdbcType=VARCHAR},
+      </if>
+      <if test="record.sinr != null">
+        sinr = #{record.sinr,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cat1SoftwareVersion != null">
+        cat1_software_version = #{record.cat1SoftwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="record.cat1HardwareVersion != null">
+        cat1_hardware_version = #{record.cat1HardwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createTime != null">
+        create_time = #{record.createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update park_room_door
+    set id = #{record.id,jdbcType=VARCHAR},
+      room_id = #{record.roomId,jdbcType=VARCHAR},
+      room_name = #{record.roomName,jdbcType=VARCHAR},
+      floor_id = #{record.floorId,jdbcType=VARCHAR},
+      floor_name = #{record.floorName,jdbcType=VARCHAR},
+      building_id = #{record.buildingId,jdbcType=VARCHAR},
+      building_name = #{record.buildingName,jdbcType=VARCHAR},
+      house_id = #{record.houseId,jdbcType=VARCHAR},
+      house_name = #{record.houseName,jdbcType=VARCHAR},
+      room_state = #{record.roomState,jdbcType=INTEGER},
+      electric_num = #{record.electricNum,jdbcType=INTEGER},
+      lock_mac = #{record.lockMac,jdbcType=VARCHAR},
+      lock_state = #{record.lockState,jdbcType=INTEGER},
+      aes_key = #{record.aesKey,jdbcType=VARCHAR},
+      admin_auth_code = #{record.adminAuthCode,jdbcType=VARCHAR},
+      general_auth_code = #{record.generalAuthCode,jdbcType=VARCHAR},
+      temp_auth_code = #{record.tempAuthCode,jdbcType=VARCHAR},
+      ble_protocol_ver = #{record.bleProtocolVer,jdbcType=VARCHAR},
+      hardware_version = #{record.hardwareVersion,jdbcType=VARCHAR},
+      software_version = #{record.softwareVersion,jdbcType=VARCHAR},
+      imsi = #{record.imsi,jdbcType=VARCHAR},
+      imei = #{record.imei,jdbcType=VARCHAR},
+      iccid = #{record.iccid,jdbcType=VARCHAR},
+      rsrp = #{record.rsrp,jdbcType=VARCHAR},
+      sinr = #{record.sinr,jdbcType=VARCHAR},
+      cat1_software_version = #{record.cat1SoftwareVersion,jdbcType=VARCHAR},
+      cat1_hardware_version = #{record.cat1HardwareVersion,jdbcType=VARCHAR},
+      create_time = #{record.createTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.buildManage.model.ParkRoomDoor">
+    update park_room_door
+    <set>
+      <if test="roomId != null">
+        room_id = #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="roomName != null">
+        room_name = #{roomName,jdbcType=VARCHAR},
+      </if>
+      <if test="floorId != null">
+        floor_id = #{floorId,jdbcType=VARCHAR},
+      </if>
+      <if test="floorName != null">
+        floor_name = #{floorName,jdbcType=VARCHAR},
+      </if>
+      <if test="buildingId != null">
+        building_id = #{buildingId,jdbcType=VARCHAR},
+      </if>
+      <if test="buildingName != null">
+        building_name = #{buildingName,jdbcType=VARCHAR},
+      </if>
+      <if test="houseId != null">
+        house_id = #{houseId,jdbcType=VARCHAR},
+      </if>
+      <if test="houseName != null">
+        house_name = #{houseName,jdbcType=VARCHAR},
+      </if>
+      <if test="roomState != null">
+        room_state = #{roomState,jdbcType=INTEGER},
+      </if>
+      <if test="electricNum != null">
+        electric_num = #{electricNum,jdbcType=INTEGER},
+      </if>
+      <if test="lockMac != null">
+        lock_mac = #{lockMac,jdbcType=VARCHAR},
+      </if>
+      <if test="lockState != null">
+        lock_state = #{lockState,jdbcType=INTEGER},
+      </if>
+      <if test="aesKey != null">
+        aes_key = #{aesKey,jdbcType=VARCHAR},
+      </if>
+      <if test="adminAuthCode != null">
+        admin_auth_code = #{adminAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="generalAuthCode != null">
+        general_auth_code = #{generalAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="tempAuthCode != null">
+        temp_auth_code = #{tempAuthCode,jdbcType=VARCHAR},
+      </if>
+      <if test="bleProtocolVer != null">
+        ble_protocol_ver = #{bleProtocolVer,jdbcType=VARCHAR},
+      </if>
+      <if test="hardwareVersion != null">
+        hardware_version = #{hardwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="softwareVersion != null">
+        software_version = #{softwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="imsi != null">
+        imsi = #{imsi,jdbcType=VARCHAR},
+      </if>
+      <if test="imei != null">
+        imei = #{imei,jdbcType=VARCHAR},
+      </if>
+      <if test="iccid != null">
+        iccid = #{iccid,jdbcType=VARCHAR},
+      </if>
+      <if test="rsrp != null">
+        rsrp = #{rsrp,jdbcType=VARCHAR},
+      </if>
+      <if test="sinr != null">
+        sinr = #{sinr,jdbcType=VARCHAR},
+      </if>
+      <if test="cat1SoftwareVersion != null">
+        cat1_software_version = #{cat1SoftwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="cat1HardwareVersion != null">
+        cat1_hardware_version = #{cat1HardwareVersion,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        create_time = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.idea.buildManage.model.ParkRoomDoor">
+    update park_room_door
+    set room_id = #{roomId,jdbcType=VARCHAR},
+      room_name = #{roomName,jdbcType=VARCHAR},
+      floor_id = #{floorId,jdbcType=VARCHAR},
+      floor_name = #{floorName,jdbcType=VARCHAR},
+      building_id = #{buildingId,jdbcType=VARCHAR},
+      building_name = #{buildingName,jdbcType=VARCHAR},
+      house_id = #{houseId,jdbcType=VARCHAR},
+      house_name = #{houseName,jdbcType=VARCHAR},
+      room_state = #{roomState,jdbcType=INTEGER},
+      electric_num = #{electricNum,jdbcType=INTEGER},
+      lock_mac = #{lockMac,jdbcType=VARCHAR},
+      lock_state = #{lockState,jdbcType=INTEGER},
+      aes_key = #{aesKey,jdbcType=VARCHAR},
+      admin_auth_code = #{adminAuthCode,jdbcType=VARCHAR},
+      general_auth_code = #{generalAuthCode,jdbcType=VARCHAR},
+      temp_auth_code = #{tempAuthCode,jdbcType=VARCHAR},
+      ble_protocol_ver = #{bleProtocolVer,jdbcType=VARCHAR},
+      hardware_version = #{hardwareVersion,jdbcType=VARCHAR},
+      software_version = #{softwareVersion,jdbcType=VARCHAR},
+      imsi = #{imsi,jdbcType=VARCHAR},
+      imei = #{imei,jdbcType=VARCHAR},
+      iccid = #{iccid,jdbcType=VARCHAR},
+      rsrp = #{rsrp,jdbcType=VARCHAR},
+      sinr = #{sinr,jdbcType=VARCHAR},
+      cat1_software_version = #{cat1SoftwareVersion,jdbcType=VARCHAR},
+      cat1_hardware_version = #{cat1HardwareVersion,jdbcType=VARCHAR},
+      create_time = #{createTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 181 - 0
pro-base/src/main/resources/mybatis/buildManage/ParkRoomDoorSyncMapper.xml

@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.idea.buildManage.mapper.ParkRoomDoorSyncMapper">
+  <resultMap id="BaseResultMap" type="com.idea.buildManage.model.ParkRoomDoorSync">
+    <id column="id" jdbcType="VARCHAR" property="id" />
+    <result column="room_id" jdbcType="VARCHAR" property="roomId" />
+    <result column="sync_time" jdbcType="TIMESTAMP" property="syncTime" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, room_id, sync_time
+  </sql>
+  <select id="selectByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorSyncExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from park_room_door_sync
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from park_room_door_sync
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from park_room_door_sync
+    where id = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorSyncExample">
+    delete from park_room_door_sync
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.idea.buildManage.model.ParkRoomDoorSync">
+    insert into park_room_door_sync (id, room_id, sync_time
+      )
+    values (#{id,jdbcType=VARCHAR}, #{roomId,jdbcType=VARCHAR}, #{syncTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.idea.buildManage.model.ParkRoomDoorSync">
+    insert into park_room_door_sync
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="roomId != null">
+        room_id,
+      </if>
+      <if test="syncTime != null">
+        sync_time,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="roomId != null">
+        #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="syncTime != null">
+        #{syncTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.idea.buildManage.model.ParkRoomDoorSyncExample" resultType="java.lang.Long">
+    select count(*) from park_room_door_sync
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update park_room_door_sync
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.roomId != null">
+        room_id = #{record.roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.syncTime != null">
+        sync_time = #{record.syncTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update park_room_door_sync
+    set id = #{record.id,jdbcType=VARCHAR},
+      room_id = #{record.roomId,jdbcType=VARCHAR},
+      sync_time = #{record.syncTime,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.idea.buildManage.model.ParkRoomDoorSync">
+    update park_room_door_sync
+    <set>
+      <if test="roomId != null">
+        room_id = #{roomId,jdbcType=VARCHAR},
+      </if>
+      <if test="syncTime != null">
+        sync_time = #{syncTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.idea.buildManage.model.ParkRoomDoorSync">
+    update park_room_door_sync
+    set room_id = #{roomId,jdbcType=VARCHAR},
+      sync_time = #{syncTime,jdbcType=TIMESTAMP}
+    where id = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 32 - 62
pro-base/src/main/resources/mybatis/buildManage/ParkRoomReservationExtendMapper.xml

@@ -79,58 +79,20 @@
         order by create_time desc
     </select>
 
-    <select id="completeListPage" parameterType="com.idea.buildManage.dto.ParkRoomReservationDto"
-            resultType="com.idea.buildManage.model.ParkRoomReservation">
-        select a.id,
-        a.park_info_id,
-        a.park_info_name,
-        a.park_floor_disc_id,
-        a.park_floor_disc_name,
-        a.mnp_building_id,
-        a.mnp_building_no,
-        a.park_room_id,
-        a.park_room_floor,
-        a.park_room_no,
-        a.buyer_name,
-        a.buyer_phone,
-        a.buyer_gender,
-        a.buyer_address,
-        a.applicant_name,
-        a.applicant_phone,
-        a.overview_content,
-        a.reservation_date,
-        a.reservation_time_start,
-        a.reservation_time_end,
-        a.reservation_order,
-        a.reservation_status,
-        case a.reservation_status
-        when 1 then '已预约'
-        when 2 then '已取消'
-        when 3 then '待入户'
-        when 4 then '已完成'
-        end as reservationStatusStr,
-        a.door_pass_status,
-        case a.door_pass_status
-        when 1 then '未发'
-        when 2 then '已发'
-        end as doorPassStatusStr,
-        a.create_user,
-        a.create_time,
-        a.update_user,
-        a.update_time,
-        a.looking_notes,
-        b.truename as createUserName,
-        if(c.id is not null, '已匹配', '未匹配') as doorStatus
-        from park_room_reservation a
-        left join frame_user b on b.id = a.create_user
-        left join park_room_bind_door c on c.park_room_id = a.park_room_id
+    <select id="completeListPage" parameterType="com.idea.buildManage.dto.ParkRoomDoorLogDto"
+            resultType="com.idea.buildManage.vo.ParkRoomDoorLogVo">
+        select a.id, a.room_id, a.log_id, a.log_type, a.lock_type, a.lock_mac, a.update_time, a.log_level,
+        a.create_time, a.log_alert, a.sync_time, a.looking_notes, a.update_user,
+        b.room_name, b.floor_name, b.building_name, b.house_name,
+        concat(b.house_name, b.building_name, b.room_name) as roomAddress,
+        if(c.id is not null, '已关联', '未关联') as roomBind, d.truename as updateUserName
+        from park_room_door_log a
+        left join park_room_door b on b.room_id = a.room_id
+        left join park_room_bind_door c on c.door_pass_id = a.room_id
+        left join frame_user d on d.id = a.update_user
         <where>
-            <if test="keyword!=null and keyword!=''">
-                and (
-                a.buyer_name like concat('%',#{keyword},'%')
-                or
-                a.buyer_phone like concat('%',#{keyword},'%')
-                )
+            <if test="logType!=null">
+                and a.log_type = #{logType}
             </if>
             <if test="createTimeStart!=null and createTimeStart!=''">
                 and date_format(a.create_time, '%Y-%m-%d') &gt;= #{createTimeStart}
@@ -138,23 +100,20 @@
             <if test="createTimeEnd!=null and createTimeEnd!=''">
                 and date_format(a.create_time, '%Y-%m-%d') &lt;= #{createTimeEnd}
             </if>
-            <if test="reservationStatus!=null">
-                and a.reservation_status= #{reservationStatus}
-            </if>
-            <if test="parkInfoId!=null and parkInfoId!=''">
-                and a.park_info_id = #{parkInfoId}
+            <if test="houseName!=null and houseName!=''">
+                and b.house_name like concat('%',#{houseName},'%')
             </if>
-            <if test="mnpBuildingId!=null and mnpBuildingId!=''">
-                and a.mnp_building_id = #{mnpBuildingId}
+            <if test="buildingName!=null and buildingName!=''">
+                and b.building_name like concat('%',#{buildingName},'%')
             </if>
-            <if test="parkRoomNo!=null and parkRoomNo!=''">
-                and a.park_room_no like concat('%',#{parkRoomNo},'%')
+            <if test="roomName!=null and roomName!=''">
+                and b.room_name like concat('%',#{roomName},'%')
             </if>
             <if test="roomAddress!=null and roomAddress!=''">
-                and concat(a.park_info_name, a.park_floor_disc_name, a.mnp_building_no, '号', a.park_room_no, '室') like concat('%',#{roomAddress},'%')
+                and concat(b.house_name, b.building_name, b.room_name) like concat('%',#{roomAddress},'%')
             </if>
         </where>
-        order by park_info_name, mnp_building_no + 0, park_room_no + 0, reservation_date desc
+        order by a.create_time desc, b.house_name, b.building_name + 0, b.room_name + 0
     </select>
 
     <select id="roomListPage" parameterType="com.idea.buildManage.dto.RoomSearchDto"
@@ -181,4 +140,15 @@
         </where>
         order by group_name, build_name + 0, room_no + 0
     </select>
+
+    <select id="getReservationByRoomAndTime" resultType="com.idea.buildManage.model.ParkRoomReservation">
+        select a.*
+        from park_room_reservation a
+        left join park_room_bind_door b on b.park_room_id = a.park_room_id
+        where b.door_pass_id = #{roomId}
+        and CONCAT(DATE_FORMAT(reservation_date, '%Y-%m-%d'), ' ', reservation_time_start, ':00') &lt;= #{logTime}
+        and CONCAT(DATE_FORMAT(reservation_date, '%Y-%m-%d'), ' ', reservation_time_end, ':00') &gt;= #{logTime}
+        limit 1
+    </select>
+
 </mapper>