|
@ -14,6 +14,7 @@ import com.epmet.entity.stats.FactNeighborhoodUserHouseDailyEntity; |
|
|
import com.epmet.service.org.HouseService; |
|
|
import com.epmet.service.org.HouseService; |
|
|
import com.epmet.service.stats.*; |
|
|
import com.epmet.service.stats.*; |
|
|
import com.epmet.service.user.IcResiUserService; |
|
|
import com.epmet.service.user.IcResiUserService; |
|
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
@ -27,6 +28,7 @@ import java.util.*; |
|
|
* @since v1.0.0 2022-05-27 |
|
|
* @since v1.0.0 2022-05-27 |
|
|
*/ |
|
|
*/ |
|
|
@Service |
|
|
@Service |
|
|
|
|
|
@Slf4j |
|
|
public class FactUserHouseServiceImpl implements FactUserHouseService { |
|
|
public class FactUserHouseServiceImpl implements FactUserHouseService { |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
@ -192,6 +194,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { |
|
|
*/ |
|
|
*/ |
|
|
@Override |
|
|
@Override |
|
|
public void statNeighborhood(FactUserHouseFormDTO formDTO) { |
|
|
public void statNeighborhood(FactUserHouseFormDTO formDTO) { |
|
|
|
|
|
log.info("$$$进入业务逻辑"); |
|
|
if (StringUtils.isBlank(formDTO.getDateId())) { |
|
|
if (StringUtils.isBlank(formDTO.getDateId())) { |
|
|
formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); |
|
|
formDTO.setDateId(DateUtils.getBeforeNDay(NumConstant.ONE)); |
|
|
} |
|
|
} |
|
@ -200,7 +203,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { |
|
|
|
|
|
|
|
|
// 先删除历史
|
|
|
// 先删除历史
|
|
|
factNeighborhoodUserHouseDailyService.deleteByDateId(formDTO); |
|
|
factNeighborhoodUserHouseDailyService.deleteByDateId(formDTO); |
|
|
|
|
|
log.info("$$$删除历史完成"); |
|
|
// 保证小区是全部网格后,其余数据进行循环匹配
|
|
|
// 保证小区是全部网格后,其余数据进行循环匹配
|
|
|
List<FactUserHouseResultDTO> neiList = houseService.neighborhoodStatNew(formDTO); |
|
|
List<FactUserHouseResultDTO> neiList = houseService.neighborhoodStatNew(formDTO); |
|
|
List<FactUserHouseResultDTO> houseList = houseService.houseStatNew(formDTO); |
|
|
List<FactUserHouseResultDTO> houseList = houseService.houseStatNew(formDTO); |
|
@ -246,7 +249,7 @@ public class FactUserHouseServiceImpl implements FactUserHouseService { |
|
|
} |
|
|
} |
|
|
addList.add(dto); |
|
|
addList.add(dto); |
|
|
}); |
|
|
}); |
|
|
|
|
|
log.info("$$$addList:::::" + addList); |
|
|
List<FactNeighborhoodUserHouseDailyEntity> entityList = ConvertUtils.sourceToTarget(addList, FactNeighborhoodUserHouseDailyEntity.class); |
|
|
List<FactNeighborhoodUserHouseDailyEntity> entityList = ConvertUtils.sourceToTarget(addList, FactNeighborhoodUserHouseDailyEntity.class); |
|
|
factNeighborhoodUserHouseDailyService.insertBatch(entityList); |
|
|
factNeighborhoodUserHouseDailyService.insertBatch(entityList); |
|
|
} |
|
|
} |
|
|