Commit 48dcbd46 by 朱淼
parents 9589116e 6a636f72
...@@ -5,14 +5,14 @@ import com.alibaba.fastjson.JSONArray; ...@@ -5,14 +5,14 @@ import com.alibaba.fastjson.JSONArray;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.makeit.module.admin.vo.plat.PlatTenantVO; import com.makeit.module.admin.vo.plat.PlatTenantVO;
import com.makeit.module.iot.dto.Condition;
import com.makeit.module.iot.dto.IotQueryParam; import com.makeit.module.iot.dto.IotQueryParam;
import com.makeit.module.iot.dto.IotSort;
import com.makeit.module.iot.dto.Term;
import com.makeit.module.iot.util.HttpRequest; import com.makeit.module.iot.util.HttpRequest;
import com.makeit.module.iot.util.Response;
import com.makeit.module.iot.util.SimpleHttpRequest; import com.makeit.module.iot.util.SimpleHttpRequest;
import com.makeit.module.iot.vo.*; import com.makeit.module.iot.vo.DeviceInstanceEntity;
import com.makeit.module.iot.vo.DeviceProductEntity;
import com.makeit.module.iot.vo.IotPagerResult;
import com.makeit.module.iot.vo.OrganizationEntity;
import com.makeit.module.iot.vo.ResponseMessage;
import com.makeit.utils.data.convert.JsonUtil; import com.makeit.utils.data.convert.JsonUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -134,8 +134,8 @@ public class IotOrgService extends IotCommonService{ ...@@ -134,8 +134,8 @@ public class IotOrgService extends IotCommonService{
*/ */
public List<DeviceInstanceEntity> getOrgDevice(String iotOrgId) { public List<DeviceInstanceEntity> getOrgDevice(String iotOrgId) {
String url = iotUrl + "device/instance/_query"; String url = iotUrl + "device/instance/_query";
//todo 分页限制 导致设备没全部同步过来
IotQueryParam queryParam = buildQueryParam(10, "id", "dim-assets", "device", iotOrgId, "org", "createTime"); IotQueryParam queryParam = buildQueryParam(10000, "id", "dim-assets", "device", iotOrgId, "org", "createTime");
String body = JsonUtil.toJson(queryParam); String body = JsonUtil.toJson(queryParam);
......
...@@ -158,6 +158,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig ...@@ -158,6 +158,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
List<SysConfig> configList = list(listLambdaQueryWrapper(sysConfig)); List<SysConfig> configList = list(listLambdaQueryWrapper(sysConfig));
JoinUtil.join(configList, sysConfigCategoryService, SysConfig::getCategoryId, SysConfigCategory::getId, (c, cc) -> { JoinUtil.join(configList, sysConfigCategoryService, SysConfig::getCategoryId, SysConfigCategory::getId, (c, cc) -> {
c.setCategoryCode(cc.getCode());
c.setCategoryName(cc.getName()); c.setCategoryName(cc.getName());
}); });
......
...@@ -550,15 +550,43 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -550,15 +550,43 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
.eq(PlatElderSocialRelation::getElderId, dto.getId())); .eq(PlatElderSocialRelation::getElderId, dto.getId()));
platElderSocialRelationService.saveBatch(relationList); platElderSocialRelationService.saveBatch(relationList);
PlatElderHealthInfo healthInfo = BeanDtoVoUtils.convert(dto.getHealthInfo(), PlatElderHealthInfo.class); // PlatElderHealthInfo healthInfo = BeanDtoVoUtils.convert(dto.getHealthInfo(), PlatElderHealthInfo.class);
// healthInfo.setElderId(dto.getId());
//
// platElderHealthInfoService.saveOrUpdate(healthInfo);
//
// PlatElderOtherInfo otherInfo = BeanDtoVoUtils.convert(dto.getOtherInfo(), PlatElderOtherInfo.class);
// otherInfo.setElderId(dto.getId());
//
// platElderOtherInfoService.saveOrUpdate(otherInfo);
PlatElderHealthInfo healthInfo = platElderHealthInfoService.getOne(new QueryWrapper<PlatElderHealthInfo>().lambda()
.eq(PlatElderHealthInfo::getElderId, dto.getId()));
if (healthInfo == null) {
healthInfo = new PlatElderHealthInfo();
}
String healthInfoId = healthInfo.getId();
BeanUtils.copyProperties(dto.getHealthInfo(), healthInfo);
healthInfo.setId(healthInfoId);
healthInfo.setElderId(dto.getId()); healthInfo.setElderId(dto.getId());
platElderHealthInfoService.saveOrUpdate(healthInfo); platElderHealthInfoService.saveOrUpdate(healthInfo);
PlatElderOtherInfo otherInfo = BeanDtoVoUtils.convert(dto.getOtherInfo(), PlatElderOtherInfo.class); PlatElderOtherInfo otherInfo = platElderOtherInfoService.getOne(new QueryWrapper<PlatElderOtherInfo>().lambda()
.eq(PlatElderOtherInfo::getElderId, dto.getId()));
if (otherInfo == null) {
otherInfo = new PlatElderOtherInfo();
}
String otherInfoId = otherInfo.getId();
BeanUtils.copyProperties(dto.getOtherInfo(), otherInfo);
otherInfo.setId(otherInfoId);
otherInfo.setElderId(dto.getId()); otherInfo.setElderId(dto.getId());
platElderOtherInfoService.saveOrUpdate(otherInfo); platElderOtherInfoService.saveOrUpdate(otherInfo);
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment