k94314517
2024-09-30 af3434a79c2a096105668273cfa27c09eacf6ff1
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPlatformsServiceImpl.java
@@ -105,7 +105,7 @@
                //更新状态 (月台状态 0-无车 1-有车 2-超时停靠 3-错误停靠)
                for(PlatformStatusInfoResponse d : allHkList){
                    platformMapper.update(null,new UpdateWrapper<Platform>().lambda()
                            .set(Platform::getStatus,d.getStatus())
                            .set(Platform::getPlatformStatus,d.getStatus())
                            .set(Platform::getEditDate,date)
                            .eq(Platform::getHkId,d.getPlatformId()));
                }
@@ -165,7 +165,9 @@
                    editList.add(model);
                    //清空监控点数据
                    platformDeviceMapper.delete(new UpdateWrapper<PlatformDevice>().lambda()
                            .eq(PlatformDevice::getPlatformId,model.getId()));
                            .eq(PlatformDevice::getPlatformId,model.getId())
                            .eq(PlatformDevice::getType,Constants.ONE)
                    );
                    deviceList.addAll(getCameraList(device.getCameras(),model));
                }else{
                    //如果不存在,则新增数据
@@ -183,7 +185,7 @@
    private List<PlatformDevice> getCameraList(List<PlatformCameraInfoResponse> cameras, Platform model) {
        List<PlatformDevice> list = new ArrayList<>();
        if(cameras!=null || cameras.size()>0){
        if(cameras!=null && cameras.size()>0){
            for(PlatformCameraInfoResponse param :cameras){
                PlatformDevice d = new PlatformDevice();
                d.setCreateDate(model.getCreateDate());
@@ -221,8 +223,6 @@
        model.setRemark(JSONObject.toJSONString(device));
        return  model;
    }
    private Platform getExistedDevice(PlatformListInfoResponse device, List<Platform> allList) {
        if(allList.size()>0){