14 changed files with 1072 additions and 0 deletions
@ -0,0 +1,148 @@ |
|||
package com.epmet.dto.stats; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Data |
|||
public class FactAgencyUserHouseDailyDTO 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; |
|||
|
|||
/** |
|||
* 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,139 @@ |
|||
package com.epmet.dto.stats; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 网格的人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Data |
|||
public class FactGridUserHouseDailyDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键,customer_id+grid_id+date_id只有一条记录 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 数据更新至:yyyyMMdd; |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 网格所属的组织id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 网格所有上级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,45 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; |
|||
import com.epmet.excel.FactUserHouseExcel; |
|||
import com.epmet.service.stats.FactAgencyUserHouseDailyService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestParam; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("factAgencyUserHouseDaily") |
|||
public class FactUserHouseController { |
|||
|
|||
@Autowired |
|||
private FactAgencyUserHouseDailyService factAgencyUserHouseDailyService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<FactAgencyUserHouseDailyDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<FactAgencyUserHouseDailyDTO> page = factAgencyUserHouseDailyService.page(params); |
|||
return new Result<PageData<FactAgencyUserHouseDailyDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<FactAgencyUserHouseDailyDTO> list = factAgencyUserHouseDailyService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, FactUserHouseExcel.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao.stats; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Mapper |
|||
public interface FactAgencyUserHouseDailyDao extends BaseDao<FactAgencyUserHouseDailyEntity> { |
|||
|
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.epmet.dao.stats; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.stats.FactGridUserHouseDailyEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 网格的人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Mapper |
|||
public interface FactGridUserHouseDailyDao extends BaseDao<FactGridUserHouseDailyEntity> { |
|||
|
|||
} |
@ -0,0 +1,118 @@ |
|||
package com.epmet.entity.stats; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_agency_user_house_daily") |
|||
public class FactAgencyUserHouseDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 数据更新至:yyyyMMdd; |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 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,0 +1,109 @@ |
|||
package com.epmet.entity.stats; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 网格的人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("fact_grid_user_house_daily") |
|||
public class FactGridUserHouseDailyEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 数据更新至:yyyyMMdd; |
|||
*/ |
|||
private String dateId; |
|||
|
|||
/** |
|||
* 网格id |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 网格所属的组织id |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* 网格所有上级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,0 +1,90 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Data |
|||
public class FactUserHouseExcel { |
|||
|
|||
@Excel(name = "主键,customer_id+AGENCY_ID+date_id只有一条记录") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户id") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "数据更新至:yyyyMMdd; ") |
|||
private String dateId; |
|||
|
|||
@Excel(name = "组织id") |
|||
private String agencyId; |
|||
|
|||
@Excel(name = "组织i所属的组织id") |
|||
private String pid; |
|||
|
|||
@Excel(name = "组织i所有上级id") |
|||
private String pids; |
|||
|
|||
@Excel(name = "小区总数") |
|||
private Integer neighbourhoodsCount; |
|||
|
|||
@Excel(name = "房屋总数") |
|||
private Integer houseCount; |
|||
|
|||
@Excel(name = "自住房屋总数") |
|||
private Integer houseSelfCount; |
|||
|
|||
@Excel(name = "出租房屋总数") |
|||
private Integer houseLeaseCount; |
|||
|
|||
@Excel(name = "闲置房屋总数") |
|||
private Integer houseIdleCount; |
|||
|
|||
@Excel(name = "居民总数") |
|||
private Integer userCount; |
|||
|
|||
@Excel(name = "常住居民总数") |
|||
private Integer userResiCount; |
|||
|
|||
@Excel(name = "流动居民总数") |
|||
private Integer userFloatCount; |
|||
|
|||
@Excel(name = "当日新增房屋数") |
|||
private Integer houseIncr; |
|||
|
|||
@Excel(name = "当日修改房屋数") |
|||
private Integer houseModify; |
|||
|
|||
@Excel(name = "当日新增居民数") |
|||
private Integer userIncr; |
|||
|
|||
@Excel(name = "当日修改居民数") |
|||
private Integer userModify; |
|||
|
|||
@Excel(name = "删除标识 0未删除、1已删除") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间:第一次提交审核的时间,注意和历史表的第一条记录时间一致") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; |
|||
import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
public interface FactAgencyUserHouseDailyService extends BaseService<FactAgencyUserHouseDailyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<FactAgencyUserHouseDailyDTO> |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
PageData<FactAgencyUserHouseDailyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<FactAgencyUserHouseDailyDTO> |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
List<FactAgencyUserHouseDailyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return FactAgencyUserHouseDailyDTO |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
FactAgencyUserHouseDailyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
void save(FactAgencyUserHouseDailyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
void update(FactAgencyUserHouseDailyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,78 @@ |
|||
package com.epmet.service.stats; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.stats.FactGridUserHouseDailyDTO; |
|||
import com.epmet.entity.stats.FactGridUserHouseDailyEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 网格的人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
public interface FactGridUserHouseDailyService extends BaseService<FactGridUserHouseDailyEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<FactGridUserHouseDailyDTO> |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
PageData<FactGridUserHouseDailyDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<FactGridUserHouseDailyDTO> |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
List<FactGridUserHouseDailyDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return FactGridUserHouseDailyDTO |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
FactGridUserHouseDailyDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
void save(FactGridUserHouseDailyDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
void update(FactGridUserHouseDailyDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-05-27 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,83 @@ |
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.stats.FactAgencyUserHouseDailyDao; |
|||
import com.epmet.dto.stats.FactAgencyUserHouseDailyDTO; |
|||
import com.epmet.entity.stats.FactAgencyUserHouseDailyEntity; |
|||
import com.epmet.service.stats.FactAgencyUserHouseDailyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Service |
|||
public class FactAgencyUserHouseDailyServiceImpl extends BaseServiceImpl<FactAgencyUserHouseDailyDao, FactAgencyUserHouseDailyEntity> implements FactAgencyUserHouseDailyService { |
|||
|
|||
@Override |
|||
public PageData<FactAgencyUserHouseDailyDTO> page(Map<String, Object> params) { |
|||
IPage<FactAgencyUserHouseDailyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, FactAgencyUserHouseDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactAgencyUserHouseDailyDTO> list(Map<String, Object> params) { |
|||
List<FactAgencyUserHouseDailyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, FactAgencyUserHouseDailyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<FactAgencyUserHouseDailyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<FactAgencyUserHouseDailyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public FactAgencyUserHouseDailyDTO get(String id) { |
|||
FactAgencyUserHouseDailyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, FactAgencyUserHouseDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(FactAgencyUserHouseDailyDTO dto) { |
|||
FactAgencyUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactAgencyUserHouseDailyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(FactAgencyUserHouseDailyDTO dto) { |
|||
FactAgencyUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactAgencyUserHouseDailyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,83 @@ |
|||
package com.epmet.service.stats.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.stats.FactGridUserHouseDailyDao; |
|||
import com.epmet.dto.stats.FactGridUserHouseDailyDTO; |
|||
import com.epmet.entity.stats.FactGridUserHouseDailyEntity; |
|||
import com.epmet.service.stats.FactGridUserHouseDailyService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 网格的人房信息统计数,按天统计 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-05-27 |
|||
*/ |
|||
@Service |
|||
public class FactGridUserHouseDailyServiceImpl extends BaseServiceImpl<FactGridUserHouseDailyDao, FactGridUserHouseDailyEntity> implements FactGridUserHouseDailyService { |
|||
|
|||
@Override |
|||
public PageData<FactGridUserHouseDailyDTO> page(Map<String, Object> params) { |
|||
IPage<FactGridUserHouseDailyEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, FactGridUserHouseDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<FactGridUserHouseDailyDTO> list(Map<String, Object> params) { |
|||
List<FactGridUserHouseDailyEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, FactGridUserHouseDailyDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<FactGridUserHouseDailyEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<FactGridUserHouseDailyEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public FactGridUserHouseDailyDTO get(String id) { |
|||
FactGridUserHouseDailyEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, FactGridUserHouseDailyDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(FactGridUserHouseDailyDTO dto) { |
|||
FactGridUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGridUserHouseDailyEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(FactGridUserHouseDailyDTO dto) { |
|||
FactGridUserHouseDailyEntity entity = ConvertUtils.sourceToTarget(dto, FactGridUserHouseDailyEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.stats.FactAgencyUserHouseDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.stats.FactAgencyUserHouseDailyEntity" id="factAgencyUserHouseDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="level" column="LEVEL"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="neighbourhoodsCount" column="NEIGHBOURHOODS_COUNT"/> |
|||
<result property="houseCount" column="HOUSE_COUNT"/> |
|||
<result property="houseSelfCount" column="HOUSE_SELF_COUNT"/> |
|||
<result property="houseLeaseCount" column="HOUSE_LEASE_COUNT"/> |
|||
<result property="houseIdleCount" column="HOUSE_IDLE_COUNT"/> |
|||
<result property="userCount" column="USER_COUNT"/> |
|||
<result property="userResiCount" column="USER_RESI_COUNT"/> |
|||
<result property="userFloatCount" column="USER_FLOAT_COUNT"/> |
|||
<result property="houseIncr" column="HOUSE_INCR"/> |
|||
<result property="houseModify" column="HOUSE_MODIFY"/> |
|||
<result property="userIncr" column="USER_INCR"/> |
|||
<result property="userModify" column="USER_MODIFY"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,34 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dao.stats.FactGridUserHouseDailyDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.stats.FactGridUserHouseDailyEntity" id="factGridUserHouseDailyMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="dateId" column="DATE_ID"/> |
|||
<result property="gridId" column="GRID_ID"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="pids" column="PIDS"/> |
|||
<result property="neighbourhoodsCount" column="NEIGHBOURHOODS_COUNT"/> |
|||
<result property="houseCount" column="HOUSE_COUNT"/> |
|||
<result property="houseSelfCount" column="HOUSE_SELF_COUNT"/> |
|||
<result property="houseLeaseCount" column="HOUSE_LEASE_COUNT"/> |
|||
<result property="houseIdleCount" column="HOUSE_IDLE_COUNT"/> |
|||
<result property="userCount" column="USER_COUNT"/> |
|||
<result property="userResiCount" column="USER_RESI_COUNT"/> |
|||
<result property="userFloatCount" column="USER_FLOAT_COUNT"/> |
|||
<result property="houseIncr" column="HOUSE_INCR"/> |
|||
<result property="houseModify" column="HOUSE_MODIFY"/> |
|||
<result property="userIncr" column="USER_INCR"/> |
|||
<result property="userModify" column="USER_MODIFY"/> |
|||
<result property="delFlag" column="DEL_FLAG"/> |
|||
<result property="revision" column="REVISION"/> |
|||
<result property="createdBy" column="CREATED_BY"/> |
|||
<result property="createdTime" column="CREATED_TIME"/> |
|||
<result property="updatedBy" column="UPDATED_BY"/> |
|||
<result property="updatedTime" column="UPDATED_TIME"/> |
|||
</resultMap> |
|||
|
|||
|
|||
</mapper> |
Loading…
Reference in new issue