|
@ -19,6 +19,8 @@ import com.epmet.commons.tools.exception.ExceptionUtils; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
|
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
|
|
import com.epmet.commons.tools.redis.RedisKeys; |
|
|
|
|
|
import com.epmet.commons.tools.redis.RedisUtils; |
|
|
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerIcHouseRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerResiUserRedis; |
|
|
import com.epmet.commons.tools.redis.common.CustomerResiUserRedis; |
|
@ -55,6 +57,7 @@ import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.http.entity.ContentType; |
|
|
import org.apache.http.entity.ContentType; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.data.redis.core.RedisTemplate; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.util.CollectionUtils; |
|
@ -136,6 +139,10 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private EpmetUserRemoteService epmetUserRemoteService; |
|
|
private EpmetUserRemoteService epmetUserRemoteService; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private RedisTemplate redisTemplate; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 房屋管理-新增房屋 |
|
|
* 房屋管理-新增房屋 |
|
|
* |
|
|
* |
|
@ -763,6 +770,13 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
formDTO.setOrgId(staffInfo.getAgencyId()); |
|
|
formDTO.setOrgId(staffInfo.getAgencyId()); |
|
|
formDTO.setOrgType("agency"); |
|
|
formDTO.setOrgType("agency"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// redis LC 新增24小时失效的
|
|
|
|
|
|
if (redisTemplate.opsForValue().get(RedisKeys.getHousechart(formDTO.getOrgType(),formDTO.getOrgId()))!=null){ |
|
|
|
|
|
return (HouseChartResultDTO)redisTemplate.opsForValue().get(RedisKeys.getHousechart(formDTO.getOrgType(),formDTO.getOrgId())); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//2.根据入参值查询对应的房屋统计数据
|
|
|
//2.根据入参值查询对应的房屋统计数据
|
|
|
List<HouseChartResultDTO> list = icHouseDao.houseChart(formDTO.getOrgId(), formDTO.getOrgType()); |
|
|
List<HouseChartResultDTO> list = icHouseDao.houseChart(formDTO.getOrgId(), formDTO.getOrgType()); |
|
|
//3.汇总数据
|
|
|
//3.汇总数据
|
|
@ -798,6 +812,10 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { |
|
|
resultDTO.setCzHouseTotalJSY(resultDTO.getCzHouseTotal() - lastMonthUserHouseStats.getCzHouseTotal()); |
|
|
resultDTO.setCzHouseTotalJSY(resultDTO.getCzHouseTotal() - lastMonthUserHouseStats.getCzHouseTotal()); |
|
|
resultDTO.setXzHouseTotalJSY(resultDTO.getXzHouseTotal() - lastMonthUserHouseStats.getXzHouseTotal()); |
|
|
resultDTO.setXzHouseTotalJSY(resultDTO.getXzHouseTotal() - lastMonthUserHouseStats.getXzHouseTotal()); |
|
|
resultDTO.setZzHouseTotalJSY(resultDTO.getZzHouseTotal() - lastMonthUserHouseStats.getZzHouseTotal());*/ |
|
|
resultDTO.setZzHouseTotalJSY(resultDTO.getZzHouseTotal() - lastMonthUserHouseStats.getZzHouseTotal());*/ |
|
|
|
|
|
|
|
|
|
|
|
// 24小时过期
|
|
|
|
|
|
redisTemplate.opsForValue().set(RedisKeys.getHousechart(formDTO.getOrgType(),formDTO.getOrgId()), resultDTO, RedisUtils.DEFAULT_EXPIRE, TimeUnit.SECONDS); |
|
|
|
|
|
|
|
|
return resultDTO; |
|
|
return resultDTO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|