|
@ -40,6 +40,7 @@ import com.epmet.dao.IcUserDemandSatisfactionDao; |
|
|
import com.epmet.dao.IcUserDemandServiceDao; |
|
|
import com.epmet.dao.IcUserDemandServiceDao; |
|
|
import com.epmet.dto.CustomerAgencyDTO; |
|
|
import com.epmet.dto.CustomerAgencyDTO; |
|
|
import com.epmet.dto.CustomerGridDTO; |
|
|
import com.epmet.dto.CustomerGridDTO; |
|
|
|
|
|
import com.epmet.dto.IcResiUserDTO; |
|
|
import com.epmet.dto.IcUserDemandRecDTO; |
|
|
import com.epmet.dto.IcUserDemandRecDTO; |
|
|
import com.epmet.dto.form.CustomerGridFormDTO; |
|
|
import com.epmet.dto.form.CustomerGridFormDTO; |
|
|
import com.epmet.dto.form.FindIcUserFormDTO; |
|
|
import com.epmet.dto.form.FindIcUserFormDTO; |
|
@ -154,6 +155,31 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
updateEntity.setStatus(UserDemandConstant.PENDING); |
|
|
updateEntity.setStatus(UserDemandConstant.PENDING); |
|
|
updateEntity.setEvaluateFlag(false); |
|
|
updateEntity.setEvaluateFlag(false); |
|
|
updateEntity.setId(dto.getDemandRecId()); |
|
|
updateEntity.setId(dto.getDemandRecId()); |
|
|
|
|
|
//记录发放积分
|
|
|
|
|
|
IcResiDemandDictEntity icResiDemandDictEntity=demandDictService.getByCode(dto.getCustomerId(),dto.getCategoryCode()); |
|
|
|
|
|
if(null!=icResiDemandDictEntity){ |
|
|
|
|
|
updateEntity.setAwardPoint(icResiDemandDictEntity.getAwardPoint()); |
|
|
|
|
|
} |
|
|
|
|
|
//查找需求人居住的房子
|
|
|
|
|
|
Result<IcResiUserDTO> demandUserRes=epmetUserOpenFeignClient.getIcResiUserDTO(dto.getDemandUserId()); |
|
|
|
|
|
if(!demandUserRes.success()||null==demandUserRes.getData()){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询需求人信息异常"); |
|
|
|
|
|
} |
|
|
|
|
|
updateEntity.setDemandUserHouseId(demandUserRes.getData().getVillageId()); |
|
|
|
|
|
// 查询需求人的居住地址
|
|
|
|
|
|
Set<String> houseIds=new HashSet<>(); |
|
|
|
|
|
houseIds.add(updateEntity.getDemandUserHouseId()); |
|
|
|
|
|
Result<List<HouseInfoDTO>> houseInfoRes=govOrgOpenFeignClient.queryListHouseInfo(houseIds); |
|
|
|
|
|
if(houseInfoRes.success()&&CollectionUtils.isNotEmpty(houseInfoRes.getData())){ |
|
|
|
|
|
HouseInfoDTO houseInfoDTO=houseInfoRes.getData().get(NumConstant.ZERO); |
|
|
|
|
|
updateEntity.setServiceLocation(houseInfoDTO.getNeighborAddress(). |
|
|
|
|
|
concat(houseInfoDTO.getNeighborHoodName()) |
|
|
|
|
|
.concat(houseInfoDTO.getBuildingName()) |
|
|
|
|
|
.concat(houseInfoDTO.getUnitName()) |
|
|
|
|
|
.concat(houseInfoDTO.getDoorName())); |
|
|
|
|
|
updateEntity.setLongitude(houseInfoDTO.getBuildingLongitude()); |
|
|
|
|
|
updateEntity.setLatitude(houseInfoDTO.getBuildingLatitude()); |
|
|
|
|
|
} |
|
|
baseDao.updateById(updateEntity); |
|
|
baseDao.updateById(updateEntity); |
|
|
|
|
|
|
|
|
IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); |
|
|
IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); |
|
@ -197,6 +223,31 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
insertEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER); |
|
|
insertEntity.setDemandUserType(UserDemandConstant.IC_RESI_USER); |
|
|
insertEntity.setStatus(UserDemandConstant.PENDING); |
|
|
insertEntity.setStatus(UserDemandConstant.PENDING); |
|
|
insertEntity.setEvaluateFlag(false); |
|
|
insertEntity.setEvaluateFlag(false); |
|
|
|
|
|
//记录发放积分
|
|
|
|
|
|
IcResiDemandDictEntity icResiDemandDictEntity=demandDictService.getByCode(fromDTO.getCustomerId(),fromDTO.getCategoryCode()); |
|
|
|
|
|
if(null!=icResiDemandDictEntity){ |
|
|
|
|
|
insertEntity.setAwardPoint(icResiDemandDictEntity.getAwardPoint()); |
|
|
|
|
|
} |
|
|
|
|
|
//查找需求人居住的房子
|
|
|
|
|
|
Result<IcResiUserDTO> demandUserRes=epmetUserOpenFeignClient.getIcResiUserDTO(fromDTO.getDemandUserId()); |
|
|
|
|
|
if(!demandUserRes.success()||null==demandUserRes.getData()){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询需求人信息异常"); |
|
|
|
|
|
} |
|
|
|
|
|
insertEntity.setDemandUserHouseId(demandUserRes.getData().getVillageId()); |
|
|
|
|
|
// 查询需求人的居住地址
|
|
|
|
|
|
Set<String> houseIds=new HashSet<>(); |
|
|
|
|
|
houseIds.add(insertEntity.getDemandUserHouseId()); |
|
|
|
|
|
Result<List<HouseInfoDTO>> houseInfoRes=govOrgOpenFeignClient.queryListHouseInfo(houseIds); |
|
|
|
|
|
if(houseInfoRes.success()&&CollectionUtils.isNotEmpty(houseInfoRes.getData())){ |
|
|
|
|
|
HouseInfoDTO houseInfoDTO=houseInfoRes.getData().get(NumConstant.ZERO); |
|
|
|
|
|
insertEntity.setServiceLocation(houseInfoDTO.getNeighborAddress(). |
|
|
|
|
|
concat(houseInfoDTO.getNeighborHoodName()) |
|
|
|
|
|
.concat(houseInfoDTO.getBuildingName()) |
|
|
|
|
|
.concat(houseInfoDTO.getUnitName()) |
|
|
|
|
|
.concat(houseInfoDTO.getDoorName())); |
|
|
|
|
|
insertEntity.setLongitude(houseInfoDTO.getBuildingLongitude()); |
|
|
|
|
|
insertEntity.setLatitude(houseInfoDTO.getBuildingLatitude()); |
|
|
|
|
|
} |
|
|
baseDao.insert(insertEntity); |
|
|
baseDao.insert(insertEntity); |
|
|
IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); |
|
|
IcUserDemandOperateLogEntity logEntity=new IcUserDemandOperateLogEntity(); |
|
|
logEntity.setCustomerId(fromDTO.getCustomerId()); |
|
|
logEntity.setCustomerId(fromDTO.getCustomerId()); |
|
|