12 changed files with 342 additions and 23 deletions
@ -0,0 +1,154 @@ |
|||
package com.epmet.dto.stats.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Data |
|||
public class FactUserHouseResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键,customer_id+AGENCY_ID+date_id只有一条记录 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 数据更新至:yyyyMMdd; |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* agency_id所属的机关级别(社区级:community, |
|||
乡(镇、街道)级:street, |
|||
区县级: district, |
|||
市级: city |
|||
省级:province) |
|||
*/ |
|||
private String level; |
|||
|
|||
/** |
|||
* 组织i所属的组织id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 组织i所有上级id |
|||
*/ |
|||
private String pids; |
|||
|
|||
/** |
|||
* 小区总数 |
|||
*/ |
|||
private Integer neighbourhoodsCount; |
|||
|
|||
/** |
|||
* 房屋总数 |
|||
*/ |
|||
private Integer houseCount; |
|||
|
|||
/** |
|||
* 自住房屋总数 |
|||
*/ |
|||
private Integer houseSelfCount; |
|||
|
|||
/** |
|||
* 出租房屋总数 |
|||
*/ |
|||
private Integer houseLeaseCount; |
|||
|
|||
/** |
|||
* 闲置房屋总数 |
|||
*/ |
|||
private Integer houseIdleCount; |
|||
|
|||
/** |
|||
* 居民总数 |
|||
*/ |
|||
private Integer userCount; |
|||
|
|||
/** |
|||
* 常住居民总数 |
|||
*/ |
|||
private Integer userResiCount; |
|||
|
|||
/** |
|||
* 流动居民总数 |
|||
*/ |
|||
private Integer userFloatCount; |
|||
|
|||
/** |
|||
* 当日新增房屋数 |
|||
*/ |
|||
private Integer houseIncr; |
|||
|
|||
/** |
|||
* 当日修改房屋数 |
|||
*/ |
|||
private Integer houseModify; |
|||
|
|||
/** |
|||
* 当日新增居民数 |
|||
*/ |
|||
private Integer userIncr; |
|||
|
|||
/** |
|||
* 当日修改居民数 |
|||
*/ |
|||
private Integer userModify; |
|||
|
|||
/** |
|||
* 删除标识 0未删除、1已删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; |
|||
import com.epmet.dto.stats.result.FactUserHouseResultDTO; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
public interface FactUserHouseService { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<FactAgencyUserHouseDailyDTO> |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
PageData<FactUserHouseResultDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<FactAgencyUserHouseDailyDTO> |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
List<FactUserHouseResultDTO> list(Map<String, Object> params); |
|||
} |
|||
@ -0,0 +1,58 @@ |
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.epmet.commons.tools.enums.OrgLevelEnum; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.dto.stats.result.FactUserHouseResultDTO; |
|||
import com.epmet.service.stats.FactAgencyUserHouseDailyService; |
|||
import com.epmet.service.stats.FactGridUserHouseDailyService; |
|||
import com.epmet.service.stats.FactUserHouseService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Service |
|||
public class FactUserHouseServiceImpl implements FactUserHouseService { |
|||
|
|||
@Autowired |
|||
private FactAgencyUserHouseDailyService factAgencyUserHouseDailyService; |
|||
|
|||
@Autowired |
|||
private FactGridUserHouseDailyService factGridUserHouseDailyService; |
|||
|
|||
@Override |
|||
public PageData<FactUserHouseResultDTO> page(Map<String, Object> params) { |
|||
PageData<FactUserHouseResultDTO> page = null; |
|||
if (params.containsKey("level")) { |
|||
if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString()) || OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { |
|||
page = factGridUserHouseDailyService.page(params); |
|||
} else { |
|||
page = factAgencyUserHouseDailyService.page(params); |
|||
} |
|||
} |
|||
return page; |
|||
} |
|||
|
|||
@Override |
|||
public List<FactUserHouseResultDTO> list(Map<String, Object> params) { |
|||
List<FactUserHouseResultDTO> list = new ArrayList<>(); |
|||
if (params.containsKey("level")) { |
|||
if (OrgLevelEnum.GRID.getCode().equals(params.get("level").toString()) || OrgLevelEnum.COMMUNITY.getCode().equals(params.get("level").toString())) { |
|||
list = ConvertUtils.sourceToTarget(factGridUserHouseDailyService.list(params), FactUserHouseResultDTO.class); |
|||
} else { |
|||
list = ConvertUtils.sourceToTarget(factAgencyUserHouseDailyService.list(params), FactUserHouseResultDTO.class); |
|||
} |
|||
} |
|||
return list; |
|||
} |
|||
|
|||
} |
|||
Loading…
Reference in new issue