如果同步过来,这条ID的设备编号被删掉了(就是由非空变为空),需要把CFS里这条设备信息删掉

This commit is contained in:
曹鹏飞 2026-01-29 16:52:54 +08:00
parent 64f7d7cf74
commit d58eaae0d1
2 changed files with 8 additions and 2 deletions

View File

@ -158,8 +158,8 @@ public class AdminDeviceService {
} else if (StrUtil.isBlank(u.getProductLine5__c())) {
log.error("设备机型为空,{}", JSONUtil.toJsonStr(u));
} else {
Device ent = deviceMap.get(u.getId());
if (StrUtil.isNotBlank(u.getMachine_Number__c())) {
Device ent = deviceMap.get(u.getId());
if (Objects.nonNull(ent)) {
ent.setUpdateBy("crm");
ent.setUpdateTime(LocalDateTime.now());
@ -239,6 +239,9 @@ public class AdminDeviceService {
}
ent.setAddress(u.getSpecificAddress__c());
result.add(ent);
}else if (Objects.nonNull(ent)){
ent.setDataValidState(false);
result.add(ent);
}
}
});

View File

@ -167,8 +167,8 @@ public class AdminDeviceService {
log.error("设备机型为空,{}", JSONUtil.toJsonStr(u));
} else {
log.debug("处理设备:"+u.getMachine_Number__c());
GongfuDevice ent = deviceMap.get(u.getId());
if (StrUtil.isNotBlank(u.getMachine_Number__c())) {
GongfuDevice ent = deviceMap.get(u.getId());
if (Objects.nonNull(ent)) {
ent.setUpdateBy("crm");
ent.setUpdateTime(LocalDateTime.now());
@ -251,6 +251,9 @@ public class AdminDeviceService {
ent.setAddress(u.getSpecificAddress__c());
ent.setDataValidState(true);
result.add(ent);
}else if (Objects.nonNull(ent)){
ent.setDataValidState(false);
result.add(ent);
}
}
});