|
|
@ -162,6 +162,28 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public void add(TokenDto tokenDto, List<IcResiUserFormDTO> formDTO) { |
|
|
|
//循环自动拼接sql语句,往多个表新增数据
|
|
|
|
//0.校验必填字段是否为空
|
|
|
|
Result<List<ColumnTableNameResultDTO>> resultList = operCustomizeOpenFeignClient.getMustColumn(tokenDto.getCustomerId()); |
|
|
|
if (resultList.success() && null != resultList.getData()) { |
|
|
|
StringBuffer str = new StringBuffer(""); |
|
|
|
formDTO.forEach(f -> { |
|
|
|
resultList.getData().forEach(l -> { |
|
|
|
if (f.getTableName().equals(l.getTableName())) { |
|
|
|
f.getList().forEach(map -> { |
|
|
|
if (!map.containsKey(l.getColumnName())) { |
|
|
|
str.append(str.length() < NumConstant.ONE ? l.getLabel() : "、" + l.getLabel()); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (!"".equals(str)) { |
|
|
|
throw new RenException(String.format("新增居民信息,必要字段值为空,%s值为空", str)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
throw new RenException(String.format("新增居民信息-根据客户Id查询必填信息失败,customerId->%s", tokenDto.getCustomerId())); |
|
|
|
} |
|
|
|
|
|
|
|
//1.先往主表新增数据
|
|
|
|
//主表Id
|
|
|
|
String resiUserId = UUID.randomUUID().toString().replaceAll("-", ""); |
|
|
@ -942,9 +964,18 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PersonDataResultDTO personData(PersonDataFormDTO formDTO) { |
|
|
|
baseDao.personData(formDTO.getUserId()); |
|
|
|
PersonDataResultDTO personData = baseDao.personData(formDTO.getUserId()); |
|
|
|
if (null == personData){ |
|
|
|
return new PersonDataResultDTO(); |
|
|
|
} |
|
|
|
// 房屋信息查询
|
|
|
|
Result<List<String>> listResult = govOrgOpenFeignClient.selectHouseInfoByIdCard(personData.getIdCard()); |
|
|
|
if (!listResult.success()){ |
|
|
|
throw new RenException("查询房屋信息失败"); |
|
|
|
} |
|
|
|
personData.setHouseInfo(listResult.getData()); |
|
|
|
// TODO
|
|
|
|
return null; |
|
|
|
return personData; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|