|
@@ -1,12 +1,5 @@
|
|
|
package com.persagy.transfer.service.impl;
|
|
|
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.HashMap;
|
|
|
-import java.util.List;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -16,15 +9,16 @@ import com.persagy.transfer.mapper.RwdObjectWdMapper;
|
|
|
import com.persagy.transfer.mapper.WdclassRelPersagyMapper;
|
|
|
import com.persagy.transfer.mapper.WdfacilityRelPersagyMapper;
|
|
|
import com.persagy.transfer.mapper.WdprojRelPersagyprojMapper;
|
|
|
-import com.persagy.transfer.pojo.dto.HydomcAsset;
|
|
|
-import com.persagy.transfer.pojo.dto.RwdObjectWd;
|
|
|
-import com.persagy.transfer.pojo.dto.WdclassRelPersagy;
|
|
|
-import com.persagy.transfer.pojo.dto.WdfacilityRelPersagy;
|
|
|
-import com.persagy.transfer.pojo.dto.WdprojRelPersagyproj;
|
|
|
+import com.persagy.transfer.pojo.dto.*;
|
|
|
import com.persagy.transfer.service.IPersagyDbService;
|
|
|
import com.persagy.transfer.service.IWdDbService;
|
|
|
-
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* @description: 博锐尚格数据源业务处理
|
|
@@ -90,7 +84,7 @@ public class PersagyDbServiceImpl implements IPersagyDbService {
|
|
|
classCodeList.add(wdclassRelPersagy.getClassCode());
|
|
|
persagyProjectIdList.add(wdprojRelPersagyproj.getPersagyProjectid());
|
|
|
// 根据外循环对象的classCode、objType='equipment',内循环对象的persagyProjectId,查询wd_object_wd_?表
|
|
|
- rwdObjecWdList = this.rwdObjectWdMapper.listByProjectId(wdclassRelPersagy.getClassCode(), OBJ_TYPE, StringUtil.lowerFirst(wdprojRelPersagyproj.getPersagyProjectid()));
|
|
|
+ rwdObjecWdList = this.rwdObjectWdMapper.listByProjectId(StringUtil.lowerFirst(wdprojRelPersagyproj.getPersagyProjectid()), wdclassRelPersagy.getClassCode(), OBJ_TYPE);
|
|
|
if (rwdObjecWdList != null && !rwdObjecWdList.isEmpty()) {
|
|
|
this.handleFieldMapping(rwdObjecWdList, wdprojRelPersagyproj, wdclassRelPersagy);
|
|
|
}
|
|
@@ -113,7 +107,7 @@ public class PersagyDbServiceImpl implements IPersagyDbService {
|
|
|
infosObj = JSONObject.parseObject(rwdObjectWd.getInfos());
|
|
|
if (infosObj != null && !infosObj.isEmpty()) {
|
|
|
/*万达设备信息对象数据同步*/
|
|
|
- this.wdDbService.sycnHydomcAsset(infosObj, wdprojRelPersagyproj.getWdProjectid(), hydomcAsset, rwdObjectWd.getValid(), rwdObjectWd.getUpdateTime(), wdclassRelPersagy.getClassstructureid(),rwdObjectWd.getUpdateUser());
|
|
|
+ this.wdDbService.sycnHydomcAsset(infosObj, wdprojRelPersagyproj.getWdProjectid(), hydomcAsset, rwdObjectWd.getValid(), rwdObjectWd.getUpdateTime(), wdclassRelPersagy.getClassstructureid(), rwdObjectWd.getUpdateUser());
|
|
|
/*万达设备参数信息数据同步*/
|
|
|
if (wdfacilityRelList == null) { // 循环万达项目ID与博锐尚格项目ID映射表数据时,wdfacility_rel_persagy只查询一次
|
|
|
wdfacilityRelList = this.listWdfacilityRelPersagy(wdclassRelPersagy.getWdClassCode(), wdclassRelPersagy.getClassstructureid());
|