Commit 70eba14e by huangjy

fix:修复bug

parent cf5e9f67
...@@ -32,7 +32,14 @@ public class PlatDeviceAttrWechatDTO { ...@@ -32,7 +32,14 @@ public class PlatDeviceAttrWechatDTO {
@ApiModelProperty(value = "读取硬件的系统参数,主要读取服务信息和雷达信息,多个逗号隔开") @ApiModelProperty(value = "读取硬件的系统参数,主要读取服务信息和雷达信息,多个逗号隔开")
private String readProperties; private String readProperties;
@ApiModelProperty(value = "服务信息") @ApiModelProperty(value = "服务信息 {\n" +
" \"password\": \"\",\n" +
" \"port\": 0,\n" +
" \"secure_key\": \"\",\n" +
" \"secure_id\": \"\",\n" +
" \"addr\": \"\",\n" +
" \"username\": \"\"\n" +
" }")
private String usrServerInfo; private String usrServerInfo;
} }
...@@ -27,9 +27,12 @@ import com.makeit.entity.platform.space.PlatSpace; ...@@ -27,9 +27,12 @@ import com.makeit.entity.platform.space.PlatSpace;
import com.makeit.enums.CodeMessageEnum; import com.makeit.enums.CodeMessageEnum;
import com.makeit.enums.CommonEnum; import com.makeit.enums.CommonEnum;
import com.makeit.enums.FileSuffixEnum; import com.makeit.enums.FileSuffixEnum;
import com.makeit.enums.biz.sys.SysConfigCategoryConst;
import com.makeit.enums.id.TreeConst; import com.makeit.enums.id.TreeConst;
import com.makeit.exception.BusinessException; import com.makeit.exception.BusinessException;
import com.makeit.mapper.platform.elder.PlatElderMapper; import com.makeit.mapper.platform.elder.PlatElderMapper;
import com.makeit.module.system.service.SysConfigService;
import com.makeit.module.system.vo.SysConfigVO;
import com.makeit.service.platform.auth.PlatOrgService; import com.makeit.service.platform.auth.PlatOrgService;
import com.makeit.service.platform.elder.*; import com.makeit.service.platform.elder.*;
import com.makeit.service.platform.space.PlatBedService; import com.makeit.service.platform.space.PlatBedService;
...@@ -106,6 +109,8 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -106,6 +109,8 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
@Autowired @Autowired
private PersonalConfigCacheUtil personalConfigCacheUtil; private PersonalConfigCacheUtil personalConfigCacheUtil;
@Autowired
private SysConfigService sysConfigService;
private LambdaQueryWrapper<PlatElder> lambdaQueryWrapper(PlatElderQueryDTO dto) { private LambdaQueryWrapper<PlatElder> lambdaQueryWrapper(PlatElderQueryDTO dto) {
List<String> typeOrgIdList = Lists.newArrayList(); List<String> typeOrgIdList = Lists.newArrayList();
...@@ -227,14 +232,13 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -227,14 +232,13 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
List<PlatElder> dbList = list(lambdaQueryWrapper(dto)); List<PlatElder> dbList = list(lambdaQueryWrapper(dto));
dbList.forEach(e->{ dbList.forEach(e->{
if (StringUtils.isNotBlank(e.getHomeAddressDetail())) { if (StringUtils.isNotBlank(e.getHomeAddress())) {
e.setHomeAddressDetail(e.getHomeAddress()); e.setHomeAddressDetail(e.getHomeAddress());
} }
if (StringUtils.isNotBlank(e.getRegisterAddressDetail())) { if (StringUtils.isNotBlank(e.getRegisterAddress())) {
e.setRegisterAddressDetail(e.getRegisterAddress()); e.setRegisterAddressDetail(e.getRegisterAddress());
} }
}); });
List<PlatElderHealthInfo> healthInfoList = platElderHealthInfoService.list(new QueryWrapper<PlatElderHealthInfo>().lambda() List<PlatElderHealthInfo> healthInfoList = platElderHealthInfoService.list(new QueryWrapper<PlatElderHealthInfo>().lambda()
.in(PlatElderHealthInfo::getElderId, StreamUtil.mapId(dbList, PlatElder::getId))); .in(PlatElderHealthInfo::getElderId, StreamUtil.mapId(dbList, PlatElder::getId)));
Map<String, PlatElderHealthInfo> healthInfoMap = StreamUtil.toMap(healthInfoList, PlatElderHealthInfo::getElderId); Map<String, PlatElderHealthInfo> healthInfoMap = StreamUtil.toMap(healthInfoList, PlatElderHealthInfo::getElderId);
...@@ -243,6 +247,16 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -243,6 +247,16 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
.in(PlatElderOtherInfo::getElderId, StreamUtil.mapId(dbList, PlatElder::getId))); .in(PlatElderOtherInfo::getElderId, StreamUtil.mapId(dbList, PlatElder::getId)));
Map<String, PlatElderOtherInfo> otherInfoMap = StreamUtil.toMap(otherInfoList, PlatElderOtherInfo::getElderId); Map<String, PlatElderOtherInfo> otherInfoMap = StreamUtil.toMap(otherInfoList, PlatElderOtherInfo::getElderId);
List<SysConfigVO> sysConfigVOS1 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_CERTIFICATE_TYPE);
List<SysConfigVO> sysConfigVOS2 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_BLOOD);
List<SysConfigVO> sysConfigVOS3 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_INCOME);
List<SysConfigVO> sysConfigVOS4 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_EDUCATION);
List<SysConfigVO> sysConfigVOS5 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_BELIEF);
List<SysConfigVO> sysConfigVOS6 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_ELDER_TYPE);
List<SysConfigVO> sysConfigVOS7 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_ILLNESS);
List<SysConfigVO> sysConfigVOS8 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_HOBBIES);
List<SysConfigVO> sysConfigVOS9 = sysConfigService.viewListByCategoryCode(SysConfigCategoryConst.ELDER_Food_Prohibition);
List<PlatElderExportVO> list = StreamUtil.map(dbList, e -> { List<PlatElderExportVO> list = StreamUtil.map(dbList, e -> {
PlatElderExportVO vo = BeanDtoVoUtils.convert(e, PlatElderExportVO.class); PlatElderExportVO vo = BeanDtoVoUtils.convert(e, PlatElderExportVO.class);
...@@ -255,7 +269,33 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -255,7 +269,33 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
if (otherInfo != null) { if (otherInfo != null) {
BeanUtils.copyProperties(otherInfo, vo); BeanUtils.copyProperties(otherInfo, vo);
} }
Optional<SysConfigVO> configVO = sysConfigVOS1.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getCertificateType())).findFirst();
vo.setCertificateType(configVO.isPresent() ? configVO.get().getName() : "");
Optional<SysConfigVO> configVO2 = sysConfigVOS2.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getBlood())).findFirst();
vo.setBlood(configVO2.isPresent() ? configVO2.get().getName() : "");
Optional<SysConfigVO> configVO3 = sysConfigVOS3.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getIncome())).findFirst();
vo.setIncome(configVO3.isPresent() ? configVO3.get().getName() : "");
Optional<SysConfigVO> configVO4 = sysConfigVOS4.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getEducation())).findFirst();
vo.setEducation(configVO4.isPresent() ? configVO4.get().getName() : "");
Optional<SysConfigVO> configVO5 = sysConfigVOS5.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getBelief())).findFirst();
vo.setBelief(configVO5.isPresent() ? configVO5.get().getName() : "");
Optional<SysConfigVO> configVO6 = sysConfigVOS6.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getElderType())).findFirst();
vo.setElderType(configVO6.isPresent() ? configVO6.get().getName() : "");
Optional<SysConfigVO> configVO7 = sysConfigVOS7.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getIllness())).findFirst();
vo.setIllness(configVO7.isPresent() ? configVO7.get().getName() : "");
Optional<SysConfigVO> configVO8 = sysConfigVOS8.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getHobbies())).findFirst();
vo.setHobbies(configVO8.isPresent() ? configVO8.get().getName() : "");
Optional<SysConfigVO> configVO9 = sysConfigVOS9.stream().filter(sysConfigVO -> sysConfigVO.getValue().equals(vo.getFoodProhibition())).findFirst();
vo.setFoodProhibition(configVO9.isPresent() ? configVO9.get().getName() : "");
vo.setId(e.getId()); vo.setId(e.getId());
vo.setRemark(e.getRemark()); vo.setRemark(e.getRemark());
......
...@@ -498,6 +498,10 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -498,6 +498,10 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
platSpace.setName(item.getCommunity()); platSpace.setName(item.getCommunity());
platSpace.setType(PlatSpaceEnum.TypeEnum.COMMUNITY.getValue()); platSpace.setType(PlatSpaceEnum.TypeEnum.COMMUNITY.getValue());
platSpace.setOrgId(orgId); platSpace.setOrgId(orgId);
PlatOrg org = platOrgService.getById(orgId);
if (org != null) {
platSpace.setAttribute(org.getType());
}
save(platSpace); save(platSpace);
firstSpaceNameMap.put(platSpace.getName(), platSpace.getId()); firstSpaceNameMap.put(platSpace.getName(), platSpace.getId());
firstId = platSpace.getId(); firstId = platSpace.getId();
......
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