|
@ -58,6 +58,10 @@ import com.epmet.dto.result.demand.IcResiDemandDictDTO; |
|
|
import com.epmet.entity.*; |
|
|
import com.epmet.entity.*; |
|
|
import com.epmet.excel.support.ExportResiUserItemDTO; |
|
|
import com.epmet.excel.support.ExportResiUserItemDTO; |
|
|
import com.epmet.feign.*; |
|
|
import com.epmet.feign.*; |
|
|
|
|
|
import com.epmet.opendata.dto.form.CaResidentDetailsFormDTO; |
|
|
|
|
|
import com.epmet.opendata.dto.form.GetResidentDetailByIdCardFormDTO; |
|
|
|
|
|
import com.epmet.opendata.dto.result.ResidentByIdCardResultDTO; |
|
|
|
|
|
import com.epmet.opendata.feign.GuardarDatosFeignClient; |
|
|
import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; |
|
|
import com.epmet.resi.partymember.feign.ResiPartyMemberOpenFeignClient; |
|
|
import com.epmet.service.*; |
|
|
import com.epmet.service.*; |
|
|
import com.github.pagehelper.Page; |
|
|
import com.github.pagehelper.Page; |
|
@ -137,6 +141,8 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
private IcPartyMemberDao icPartyMemberDao; |
|
|
private IcPartyMemberDao icPartyMemberDao; |
|
|
@Resource |
|
|
@Resource |
|
|
private IcVolunteerDao icVolunteerDao; |
|
|
private IcVolunteerDao icVolunteerDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private GuardarDatosFeignClient feignClient; |
|
|
@Resource |
|
|
@Resource |
|
|
private ResiPartyMemberOpenFeignClient resiPartyMemberOpenFeignClient; |
|
|
private ResiPartyMemberOpenFeignClient resiPartyMemberOpenFeignClient; |
|
|
|
|
|
|
|
@ -977,6 +983,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
map.put("groupByTables", new ArrayList<>(groupByTables)); |
|
|
map.put("groupByTables", new ArrayList<>(groupByTables)); |
|
|
return map; |
|
|
return map; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param formDTO |
|
|
* @param formDTO |
|
|
* @Description 查询个人数据 |
|
|
* @Description 查询个人数据 |
|
@ -1064,6 +1071,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
} |
|
|
} |
|
|
return personData; |
|
|
return personData; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param formDTO |
|
|
* @param formDTO |
|
|
* @Description 根据名字搜索 |
|
|
* @Description 根据名字搜索 |
|
@ -2020,10 +2028,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public List<HouseIcResiUserResultDTO> getResiUserGroupHomeId(RentTenantDataFormDTO formDTO) { |
|
|
public List<HouseIcResiUserResultDTO> getResiUserGroupHomeId(RentTenantDataFormDTO formDTO) { |
|
|
//如果是组织 且非顶级组织 则利用pids 查询 本级及下级
|
|
|
//如果是组织 且非顶级组织 则利用pids 查询 本级及下级
|
|
@ -2261,8 +2265,64 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void bindHome(BindHomeFormDTO form) { |
|
|
|
|
|
// 根据idCard获取ca_redident表的数据
|
|
|
|
|
|
if (StringUtils.isBlank(form.getIdCard())) { |
|
|
|
|
|
throw new RenException("身份证号不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
GetResidentDetailByIdCardFormDTO dto = new GetResidentDetailByIdCardFormDTO(); |
|
|
|
|
|
dto.setIdCard(form.getIdCard()); |
|
|
|
|
|
Result<ResidentByIdCardResultDTO> result = feignClient.getResidentDetailByIdCard(dto); |
|
|
|
|
|
ResidentByIdCardResultDTO residentDetailByIdCard = result.getData(); |
|
|
|
|
|
if (org.springframework.util.StringUtils.isEmpty(residentDetailByIdCard)) { |
|
|
|
|
|
throw new RenException("获取不到人的信息"); |
|
|
|
|
|
} |
|
|
|
|
|
// 根据房屋id获取房屋信息
|
|
|
|
|
|
if (StringUtils.isBlank(form.getHomeId())) { |
|
|
|
|
|
throw new RenException("房屋id不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
HouseInfoCache houseInfo = CustomerIcHouseRedis.getHouseInfo(form.getCustomerId(), form.getHomeId()); |
|
|
|
|
|
if (org.springframework.util.StringUtils.isEmpty(houseInfo)) { |
|
|
|
|
|
throw new RenException("获取不到房屋信息"); |
|
|
|
|
|
} |
|
|
|
|
|
// 将人的信息放入ic_resi_user对象中
|
|
|
|
|
|
IcResiUserEntity entity = new IcResiUserEntity(); |
|
|
|
|
|
entity.setCustomerId(form.getCustomerId()); |
|
|
|
|
|
if (StringUtils.isBlank(residentDetailByIdCard.getIdCard()) |
|
|
|
|
|
&& StringUtils.isBlank(residentDetailByIdCard.getResidentName()) |
|
|
|
|
|
&& StringUtils.isBlank(residentDetailByIdCard.getTelephone()) |
|
|
|
|
|
&& StringUtils.isBlank(residentDetailByIdCard.getBirthday().toString())) { |
|
|
|
|
|
entity.setIdCard(residentDetailByIdCard.getIdCard()); |
|
|
|
|
|
entity.setName(residentDetailByIdCard.getResidentName()); |
|
|
|
|
|
entity.setMobile(residentDetailByIdCard.getTelephone()); |
|
|
|
|
|
entity.setBirthday(residentDetailByIdCard.getBirthday().toString()); |
|
|
|
|
|
} else { |
|
|
|
|
|
throw new RenException("人信息不全"); |
|
|
|
|
|
} |
|
|
|
|
|
// 将房屋的信息放入ic_resi_user对象中
|
|
|
|
|
|
if (StringUtils.isBlank(houseInfo.getHomeId()) |
|
|
|
|
|
&& StringUtils.isBlank(houseInfo.getNeighborHoodId()) |
|
|
|
|
|
&& StringUtils.isBlank(houseInfo.getBuildingId()) |
|
|
|
|
|
&& StringUtils.isBlank(houseInfo.getBuildingUnitId())) { |
|
|
|
|
|
entity.setHomeId(houseInfo.getHomeId()); |
|
|
|
|
|
entity.setVillageId(houseInfo.getNeighborHoodId()); |
|
|
|
|
|
entity.setBuildId(houseInfo.getBuildingId()); |
|
|
|
|
|
entity.setUnitId(houseInfo.getBuildingUnitId()); |
|
|
|
|
|
} else { |
|
|
|
|
|
throw new RenException("房屋信息不全"); |
|
|
|
|
|
} |
|
|
|
|
|
if (baseDao.selectCountByIdCard(form.getIdCard(), form.getCustomerId()) > 0) { |
|
|
|
|
|
baseDao.updateByIdCard(entity); |
|
|
|
|
|
} else { |
|
|
|
|
|
baseDao.insert(entity); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* desc:根据字段值获取 options |
|
|
* desc:根据字段值获取 options |
|
|
|
|
|
* |
|
|
* @param customerId |
|
|
* @param customerId |
|
|
* @param columnName |
|
|
* @param columnName |
|
|
* @return |
|
|
* @return |
|
|