Browse Source
# Conflicts: # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcNeighborHoodServiceImpl.javamaster
62 changed files with 3443 additions and 126 deletions
@ -0,0 +1,27 @@ |
|||
package com.epmet.commons.tools.utils; |
|||
|
|||
import org.apache.commons.lang3.StringUtils; |
|||
|
|||
/** |
|||
* pid用到的工具 |
|||
*/ |
|||
public class PidUtils { |
|||
|
|||
/** |
|||
* 将orgId和pids组合传话为orgIdPath(包含自己) |
|||
* @param orgId |
|||
* @param pids |
|||
* @return |
|||
*/ |
|||
public static String convertPid2OrgIdPath(String orgId,String pids) { |
|||
StringBuilder orgIdPath = new StringBuilder(); |
|||
if (StringUtils.isBlank(pids) || pids.equals("0")) { |
|||
orgIdPath.append(orgId); |
|||
} else { |
|||
orgIdPath.append(pids).append(":").append(orgId); |
|||
} |
|||
|
|||
return orgIdPath.toString(); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @ClassName AgencyCountCensus$ |
|||
* @Description |
|||
* @Date 2023/4/6 16:46 |
|||
* @Author lichao |
|||
**/ |
|||
@Data |
|||
public class CommunityCountCensusFormDTO implements Serializable { |
|||
|
|||
|
|||
|
|||
private static final long serialVersionUID = 4360690752084258055L; |
|||
|
|||
@NotBlank(message = "组织Id不能为空") |
|||
private String agencyId; |
|||
|
|||
private Date timeStart; |
|||
|
|||
private Date timeEnd; |
|||
|
|||
private Integer pageNum; |
|||
|
|||
private Integer pageSize; |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 根据小区,楼宇,单元名称校验是否存在 |
|||
* @Author wgf |
|||
* @Date 2022/8/24 9:03 |
|||
*/ |
|||
@Data |
|||
public class HouseCountPictureFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 2636608477324780974L; |
|||
|
|||
private String orgIdPath; |
|||
|
|||
private String orgId; |
|||
|
|||
private String orgType; |
|||
|
|||
private Date timeStart; |
|||
|
|||
private Date timeEnd; |
|||
|
|||
private String purpose; |
|||
|
|||
private Integer rentFlag; |
|||
|
|||
private Integer pageSize; |
|||
|
|||
private Integer pageNo; |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
package com.epmet.dto.form.yt; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 下级社区账号登录次数排名入参 |
|||
* @Author yzm |
|||
* @Date 2023/4/6 14:18 |
|||
*/ |
|||
@Data |
|||
public class CommunityLoginFormDTO extends PageFormDTO { |
|||
/** |
|||
* 所选择的组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 组织类型 |
|||
*/ |
|||
private String level; |
|||
|
|||
/** |
|||
* 开始日期:yyyy-MM-dd |
|||
*/ |
|||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 截止日期:yyyy-MM-dd |
|||
*/ |
|||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
private Date endDate; |
|||
} |
|||
|
|||
@ -0,0 +1,42 @@ |
|||
package com.epmet.dto.form.yt; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 下级社区账号登录次数排名入参 |
|||
* @Author yzm |
|||
* @Date 2023/4/6 14:18 |
|||
*/ |
|||
@Data |
|||
public class CountActivityFormDTO extends PageFormDTO { |
|||
/** |
|||
* 所选择的组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 是否活跃 1 活跃 0 不活跃 |
|||
*/ |
|||
private String isActivity; |
|||
|
|||
|
|||
/** |
|||
* 开始日期:yyyy-MM-dd |
|||
*/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 截止日期:yyyy-MM-dd |
|||
*/ |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date endDate; |
|||
} |
|||
|
|||
@ -0,0 +1,15 @@ |
|||
package com.epmet.dto.form.yt; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 九小场所分析 |
|||
* @Author yzm |
|||
* @Date 2023/4/7 16:47 |
|||
*/ |
|||
@Data |
|||
public class EnterpriseCountPlaceTypeFormDTO { |
|||
private String orgId; |
|||
private String orgType; |
|||
} |
|||
|
|||
@ -0,0 +1,41 @@ |
|||
package com.epmet.dto.form.yt; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description 账号登录情况,查询市级账号/区县级账号/镇街级账号/社区级账号登录次数,入参dto |
|||
* @Author yzm |
|||
* @Date 2023/4/6 10:09 |
|||
*/ |
|||
@Data |
|||
public class LoginLogCountByLevelFormDTO { |
|||
/** |
|||
* 所选择的组织id |
|||
*/ |
|||
private String orgId; |
|||
|
|||
/** |
|||
* 组织类型 |
|||
*/ |
|||
private String level; |
|||
|
|||
/** |
|||
* 开始日期:yyyy-MM-dd |
|||
*/ |
|||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
private Date startDate; |
|||
|
|||
/** |
|||
* 截止日期:yyyy-MM-dd |
|||
*/ |
|||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") |
|||
private Date endDate; |
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,20 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @ClassName AgencyCountCensus$ |
|||
* @Description |
|||
* @Date 2023/4/6 16:46 |
|||
* @Author lichao |
|||
**/ |
|||
@Data |
|||
public class AgencyCountCensusResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 4360690752084258055L; |
|||
|
|||
private String level; |
|||
private Integer count; |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @ClassName AgencyCountCensus$ |
|||
* @Description |
|||
* @Date 2023/4/6 16:46 |
|||
* @Author lichao |
|||
**/ |
|||
@Data |
|||
public class CommunityCountCensusResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 4360690752084258055L; |
|||
|
|||
private String agencyId; |
|||
|
|||
private String agencyName; |
|||
|
|||
private Integer count; |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Description: |
|||
* @Author: lichao |
|||
* @Date: 2023/4/7 16:43 |
|||
*/ |
|||
@Data |
|||
public class CommunityListByAgencyIdResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -1677303397440121269L; |
|||
|
|||
private String id; |
|||
|
|||
private String pids; |
|||
|
|||
private String name; |
|||
|
|||
private String streeName; |
|||
|
|||
// private String streeId;
|
|||
|
|||
private String districtName; |
|||
|
|||
// private String districtId;
|
|||
|
|||
private Date createTime; |
|||
} |
|||
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description: |
|||
* @Author: lichao |
|||
* @Date: 2023/4/11 15:05 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class HouseCountPictureListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2063032844842070847L; |
|||
|
|||
private String type; |
|||
|
|||
private Integer count; |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description: |
|||
* @Author: lichao |
|||
* @Date: 2023/4/11 15:05 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class HouseCountPictureResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2063032844842070847L; |
|||
|
|||
private Integer total; |
|||
|
|||
private List<HouseCountPictureListResultDTO> list; |
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Description: |
|||
* @Author: lichao |
|||
* @Date: 2023/4/11 14:41 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class HousePictureListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2063032844842070847L; |
|||
|
|||
private String houseId; |
|||
|
|||
private String districtName; |
|||
|
|||
private String streetName; |
|||
|
|||
private String communityName; |
|||
|
|||
private String gridName; |
|||
|
|||
private String houseName; |
|||
|
|||
private String purposeName; |
|||
|
|||
private String rentFlagName; |
|||
|
|||
private String orgIdPath; |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.result.yt; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2023/4/6 13:33 |
|||
* @Description: 账户活跃情况 |
|||
*/ |
|||
@Data |
|||
public class AccountActivityInfo implements Serializable { |
|||
private static final long serialVersionUID = -918630886413844674L; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String agencyName = ""; |
|||
|
|||
/** |
|||
* 登陆次数 |
|||
*/ |
|||
private String loginCount = ""; |
|||
|
|||
/** |
|||
* 活跃账号数 |
|||
*/ |
|||
private String accountActivityCount = ""; |
|||
|
|||
|
|||
/** |
|||
* 总账号数 |
|||
*/ |
|||
private String accountCount = ""; |
|||
|
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String agencyId = ""; |
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.dto.result.yt; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2023/4/6 13:33 |
|||
* @Description: 账户活跃总数 |
|||
*/ |
|||
@Data |
|||
public class ActivityTatalInfo implements Serializable { |
|||
private static final long serialVersionUID = -918630886413844674L; |
|||
|
|||
|
|||
/** |
|||
* 不活跃账号总数 |
|||
*/ |
|||
private String inactivityCount = ""; |
|||
|
|||
/** |
|||
* 活跃账号总数 |
|||
*/ |
|||
private String activityCount = ""; |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,37 @@ |
|||
package com.epmet.dto.result.yt; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 下级社区账号登录次数排名 |
|||
* @Author yzm |
|||
* @Date 2023/4/6 14:15 |
|||
*/ |
|||
@Data |
|||
public class CommunityLoginResultDTO { |
|||
/** |
|||
* 组织id |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
private String agencyName; |
|||
/** |
|||
* 组织级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) |
|||
*/ |
|||
private String agencyLevel; |
|||
/** |
|||
* 所属街道名称; |
|||
*/ |
|||
private String streetName; |
|||
/** |
|||
* 所属区县名称; |
|||
*/ |
|||
private String districtName; |
|||
/** |
|||
* 登录次数 |
|||
*/ |
|||
private Integer count; |
|||
} |
|||
|
|||
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.result.yt; |
|||
|
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 九小场所分析 |
|||
* @Author yzm |
|||
* @Date 2023/4/7 16:48 |
|||
*/ |
|||
@Data |
|||
public class EnterpriseCountPlaceTypeDetailDTO { |
|||
private String placeType; |
|||
private String placeTypeName; |
|||
private Integer total; |
|||
|
|||
|
|||
public EnterpriseCountPlaceTypeDetailDTO() { |
|||
this.total = NumConstant.ZERO; |
|||
} |
|||
|
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,17 @@ |
|||
package com.epmet.dto.result.yt; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Description 九小场所分析 |
|||
* @Author yzm |
|||
* @Date 2023/4/7 16:47 |
|||
*/ |
|||
@Data |
|||
public class EnterpriseCountPlaceTypeResDTO { |
|||
private Integer total; |
|||
private List<EnterpriseCountPlaceTypeDetailDTO> list; |
|||
} |
|||
|
|||
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.result.yt; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 账号登录情况,查询市级账号/区县级账号/镇街级账号/社区级账号登录次数,返参dto |
|||
* @Author yzm |
|||
* @Date 2023/4/6 10:13 |
|||
*/ |
|||
@Data |
|||
public class LoginLogCountByLevelResultDTO { |
|||
/** |
|||
* 市级账号登录总次数;-1时不展示 |
|||
*/ |
|||
private Integer cityCount; |
|||
/** |
|||
* 区县级账号登录总次数;-1时不展示 |
|||
*/ |
|||
private Integer districtCount; |
|||
/** |
|||
* 镇街级账号登录总次数;-1时不展示 |
|||
*/ |
|||
private Integer streetCount; |
|||
/** |
|||
* 社区级账号登录总次数;-1时不展示 |
|||
*/ |
|||
private Integer communityCount; |
|||
} |
|||
|
|||
@ -0,0 +1,154 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.alibaba.nacos.client.naming.utils.CollectionUtils; |
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.yt.CommunityLoginFormDTO; |
|||
import com.epmet.dto.form.yt.CountActivityFormDTO; |
|||
import com.epmet.dto.form.yt.LoginLogCountByLevelFormDTO; |
|||
import com.epmet.dto.result.yt.ActivityTatalInfo; |
|||
import com.epmet.dto.result.yt.CommunityLoginResultDTO; |
|||
import com.epmet.dto.result.yt.LoginLogCountByLevelResultDTO; |
|||
import com.epmet.excel.yt.AccountActivityExcel; |
|||
import com.epmet.excel.yt.AccountInactivityExcel; |
|||
import com.epmet.service.StaffLoginLogService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
import com.epmet.dto.result.yt.AccountActivityInfo; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 工作人员登录日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2023-04-04 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("staffLoginLog") |
|||
public class StaffLoginLogController { |
|||
|
|||
@Autowired |
|||
private StaffLoginLogService staffLoginLogService; |
|||
|
|||
|
|||
/** |
|||
* 返回市级账号登录总次数、区县级账号登录总次数、镇街级账号登录总次数、社区级账号登录总次数 |
|||
* |
|||
* @param formDTO |
|||
* @return |
|||
*/ |
|||
@PostMapping("count-level") |
|||
public Result<LoginLogCountByLevelResultDTO> countLevel(@RequestBody LoginLogCountByLevelFormDTO formDTO) { |
|||
return new Result<LoginLogCountByLevelResultDTO>().ok(staffLoginLogService.countLevel(formDTO.getOrgId(), formDTO.getLevel(), formDTO.getStartDate(), formDTO.getEndDate())); |
|||
} |
|||
|
|||
/** |
|||
* 下级社区账号登录次数排名 |
|||
* |
|||
* @return |
|||
*/ |
|||
@PostMapping("community-count") |
|||
public Result<PageData<CommunityLoginResultDTO>> communityCount(@RequestBody CommunityLoginFormDTO formDTO) { |
|||
return new Result<PageData<CommunityLoginResultDTO>>().ok(staffLoginLogService.pageCommunityCount(formDTO)); |
|||
} |
|||
|
|||
/** |
|||
* 柱状图:下级组织账号登录次数汇总 |
|||
* |
|||
* @param formDTO |
|||
* @return |
|||
*/ |
|||
@PostMapping("sub-count") |
|||
public Result<PageData<CommunityLoginResultDTO>> querySubCount(@RequestBody LoginLogCountByLevelFormDTO formDTO) { |
|||
return new Result<PageData<CommunityLoginResultDTO>>().ok(staffLoginLogService.querySubCount(formDTO.getOrgId(), formDTO.getLevel(), formDTO.getStartDate(), formDTO.getEndDate())); |
|||
} |
|||
|
|||
/** |
|||
* 查看区县 |
|||
* |
|||
* @param formDTO |
|||
* @return |
|||
*/ |
|||
@PostMapping("district-count") |
|||
public Result<PageData<CommunityLoginResultDTO>> districtCount(@RequestBody CommunityLoginFormDTO formDTO) { |
|||
return new Result<PageData<CommunityLoginResultDTO>>().ok(staffLoginLogService.pageDistrictCount(formDTO.getOrgId(), |
|||
formDTO.getLevel(), formDTO.getStartDate(), |
|||
formDTO.getEndDate(), formDTO.getIsPage(), |
|||
formDTO.getPageNo(), formDTO.getPageSize())); |
|||
} |
|||
|
|||
/** |
|||
* 查看街镇 |
|||
* |
|||
* @param formDTO |
|||
* @return |
|||
*/ |
|||
@PostMapping("street-count") |
|||
public Result<PageData<CommunityLoginResultDTO>> streetCount(@RequestBody CommunityLoginFormDTO formDTO) { |
|||
return new Result<PageData<CommunityLoginResultDTO>>().ok(staffLoginLogService.streetCount(formDTO.getOrgId(), |
|||
formDTO.getStartDate(), |
|||
formDTO.getEndDate(), formDTO.getIsPage(), |
|||
formDTO.getPageNo(), formDTO.getPageSize())); |
|||
} |
|||
|
|||
/*** |
|||
* 获取当前agencyid下 下级组织活跃情况 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.yt.AccountActivityInfo> |
|||
* @author qushutong |
|||
* @date 2023/4/6 13:41 |
|||
*/ |
|||
@PostMapping("getAccountActivityInfo") |
|||
public Result<PageData<AccountActivityInfo>> getAccountActivityInfo(@RequestBody CountActivityFormDTO formDTO) { |
|||
return new Result<PageData<AccountActivityInfo>>().ok(staffLoginLogService.getAccountActivityInfo(formDTO)); |
|||
} |
|||
|
|||
/*** |
|||
* 获取活跃度总数 |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.commons.tools.page.PageData < com.epmet.dto.result.yt.AccountActivityInfo>> |
|||
* @author qushutong |
|||
* @date 2023/4/6 17:35 |
|||
*/ |
|||
@PostMapping("getActivityTotal") |
|||
public Result<ActivityTatalInfo> getActivityTotal(@RequestBody CountActivityFormDTO formDTO) { |
|||
return new Result<ActivityTatalInfo>().ok(staffLoginLogService.getActivityTotal(formDTO)); |
|||
} |
|||
|
|||
|
|||
/*** |
|||
* 导出活跃 |
|||
* @param response |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return void |
|||
* @author qushutong |
|||
* @date 2023/4/6 18:04 |
|||
*/ |
|||
@PostMapping("accountActivityInfo-export") |
|||
public void analysisExport(HttpServletResponse response, @LoginUser TokenDto tokenDto, @RequestBody CountActivityFormDTO formDTO) throws Exception { |
|||
formDTO.setIsPage(false); |
|||
PageData<AccountActivityInfo> res = staffLoginLogService.getAccountActivityInfo(formDTO); |
|||
if (!CollectionUtils.isEmpty(res.getList())) { |
|||
if("1".equals(formDTO.getIsActivity())){ |
|||
// List<AccountActivityExcel> accountActivityExcels = ConvertUtils.sourceToTarget(res.getList(), AccountActivityExcel.class);
|
|||
ExcelUtils.exportExcelToTarget(response, null, res.getList(), AccountActivityExcel.class); |
|||
}else { |
|||
// List<AccountInactivityExcel> accountActivityExcels = ConvertUtils.sourceToTarget(res.getList(), AccountInactivityExcel.class);
|
|||
ExcelUtils.exportExcelToTarget(response, null, res.getList(), AccountInactivityExcel.class); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,75 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.form.yt.CountActivityFormDTO; |
|||
import com.epmet.dto.result.yt.ActivityTatalInfo; |
|||
import com.epmet.dto.result.yt.CommunityLoginResultDTO; |
|||
import com.epmet.dto.result.yt.AccountActivityInfo; |
|||
import com.epmet.entity.StaffLoginLogEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 工作人员登录日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2023-04-04 |
|||
*/ |
|||
@Mapper |
|||
public interface StaffLoginLogDao extends BaseDao<StaffLoginLogEntity> { |
|||
|
|||
/** |
|||
* 各社区登录总次数 |
|||
* |
|||
* @param orgId |
|||
* @param startDate |
|||
* @param endDate |
|||
* @return |
|||
*/ |
|||
List<CommunityLoginResultDTO> pageCommunityCount(@Param("orgId") String orgId, |
|||
@Param("startDate") Date startDate, |
|||
@Param("endDate") Date endDate); |
|||
|
|||
/** |
|||
* 柱状图:下级组织账号登录次数汇总 |
|||
* |
|||
* @param orgId |
|||
* @param startDate |
|||
* @param endDate |
|||
* @return |
|||
*/ |
|||
List<CommunityLoginResultDTO> querySubCount(@Param("orgId") String orgId, |
|||
@Param("startDate") Date startDate, |
|||
@Param("endDate") Date endDate); |
|||
|
|||
/** |
|||
* 各区县登录总次数 |
|||
* |
|||
* @param orgId |
|||
* @param startDate |
|||
* @param endDate |
|||
* @return |
|||
*/ |
|||
List<CommunityLoginResultDTO> pageDistrictCount(@Param("orgId") String orgId, |
|||
@Param("startDate") Date startDate, |
|||
@Param("endDate") Date endDate); |
|||
|
|||
List<CommunityLoginResultDTO> pageStreetCount(@Param("orgId") String orgId, |
|||
@Param("startDate") Date startDate, |
|||
@Param("endDate") Date endDate); |
|||
|
|||
/*** |
|||
* 获取登陆情况 |
|||
* @param formDTO |
|||
* @return com.epmet.dto.result.yt.AccountActivityInfo |
|||
* @author qushutong |
|||
* @date 2023/4/6 13:47 |
|||
*/ |
|||
List<AccountActivityInfo> selectListActivityInfo(CountActivityFormDTO formDTO); |
|||
|
|||
|
|||
ActivityTatalInfo selectOneActivityTotal(CountActivityFormDTO formDTO); |
|||
} |
|||
@ -0,0 +1,73 @@ |
|||
package com.epmet.entity; |
|||
|
|||
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 2023-04-04 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("staff_login_log") |
|||
public class StaffLoginLogEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 工作端用户id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 工作人员姓名 |
|||
*/ |
|||
private String staffName; |
|||
|
|||
/** |
|||
* 工作人员手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 工作人员所属组织id;组织名称在customer_agency |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织级别(社区级:community, |
|||
乡(镇、街道)级:street, |
|||
区县级: district, |
|||
市级: city |
|||
省级:province) |
|||
*/ |
|||
private String agencyLevel; |
|||
|
|||
/** |
|||
* agency_id的直属上级;如果是根组织的用户登录,pid=0或者pid='' |
|||
*/ |
|||
private String pid; |
|||
|
|||
/** |
|||
* AGENCY_ID全路径,包含agency_id自身 |
|||
*/ |
|||
private String orgIdPath; |
|||
|
|||
/** |
|||
* 登录时间 |
|||
*/ |
|||
private Date loginTime; |
|||
|
|||
} |
|||
@ -0,0 +1,50 @@ |
|||
package com.epmet.excel; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelIgnore; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 企事业单位导出excel |
|||
*/ |
|||
@Data |
|||
public class HousePictureListExcelDTO { |
|||
|
|||
|
|||
@ExcelIgnore |
|||
private String houseId; |
|||
|
|||
@ExcelProperty(value = "区县") |
|||
@ColumnWidth(25) |
|||
private String districtName; |
|||
|
|||
@ExcelProperty(value = "镇街") |
|||
@ColumnWidth(25) |
|||
private String streetName; |
|||
|
|||
@ExcelProperty(value = "社区") |
|||
@ColumnWidth(25) |
|||
private String communityName; |
|||
|
|||
@ExcelProperty(value = "网格") |
|||
@ColumnWidth(25) |
|||
private String gridName; |
|||
|
|||
@ExcelProperty(value = "房屋名称") |
|||
@ColumnWidth(25) |
|||
private String houseName; |
|||
|
|||
@ExcelProperty(value = "房屋用途") |
|||
@ColumnWidth(25) |
|||
private String purposeName; |
|||
|
|||
@ExcelProperty(value = "房屋状态") |
|||
@ColumnWidth(25) |
|||
private String rentFlagName; |
|||
@ExcelIgnore |
|||
private String orgIdPath; |
|||
|
|||
} |
|||
@ -0,0 +1,45 @@ |
|||
package com.epmet.excel.yt; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2023/4/6 13:33 |
|||
* @Description: 账户活跃情况 |
|||
*/ |
|||
@Data |
|||
public class AccountActivityExcel implements Serializable { |
|||
private static final long serialVersionUID = -918630886413844674L; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
@Excel(name = "组织名称") |
|||
private String agencyName = ""; |
|||
|
|||
/** |
|||
* 登陆次数 |
|||
*/ |
|||
@Excel(name = "登陆次数") |
|||
private String loginCount = ""; |
|||
|
|||
/** |
|||
* 活跃账号数 |
|||
*/ |
|||
@Excel(name = "活跃账号数") |
|||
private String accountActivityCount = ""; |
|||
|
|||
|
|||
/** |
|||
* 总账号数 |
|||
*/ |
|||
@Excel(name = "总账号数") |
|||
private String accountCount = ""; |
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,28 @@ |
|||
package com.epmet.excel.yt; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
/** |
|||
* @author: qushutong |
|||
* @Date: 2023/4/6 13:33 |
|||
* @Description: 账户不活跃情况 |
|||
*/ |
|||
@Data |
|||
public class AccountInactivityExcel implements Serializable { |
|||
private static final long serialVersionUID = -918630886413844674L; |
|||
|
|||
/** |
|||
* 组织名称 |
|||
*/ |
|||
@Excel(name = "组织名称") |
|||
private String agencyName = ""; |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
} |
|||
@ -0,0 +1,110 @@ |
|||
package com.epmet.mq.listener; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.rocketmq.constants.MQUserPropertys; |
|||
import com.epmet.commons.rocketmq.messages.LoginMQMsg; |
|||
import com.epmet.commons.tools.distributedlock.DistributedLock; |
|||
import com.epmet.commons.tools.exception.ExceptionUtils; |
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.redis.RedisKeys; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.commons.tools.utils.SpringContextUtils; |
|||
import com.epmet.service.StaffLoginLogService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyContext; |
|||
import org.apache.rocketmq.client.consumer.listener.ConsumeConcurrentlyStatus; |
|||
import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently; |
|||
import org.apache.rocketmq.common.message.MessageExt; |
|||
import org.redisson.api.RLock; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
|
|||
import java.util.List; |
|||
import java.util.concurrent.TimeUnit; |
|||
|
|||
/** |
|||
* @author wxz |
|||
* @Description 登录操作日志监听器 |
|||
|
|||
* @return |
|||
* @date 2021.06.07 16:12 |
|||
*/ |
|||
public class StaffLoginLogListener implements MessageListenerConcurrently { |
|||
|
|||
private Logger logger = LoggerFactory.getLogger(getClass()); |
|||
|
|||
private RedisUtils redisUtils; |
|||
|
|||
@Override |
|||
public ConsumeConcurrentlyStatus consumeMessage(List<MessageExt> msgs, ConsumeConcurrentlyContext context) { |
|||
|
|||
if (redisUtils == null) { |
|||
redisUtils = SpringContextUtils.getBean(RedisUtils.class); |
|||
} |
|||
|
|||
try { |
|||
msgs.forEach(msg -> consumeMessage(msg)); |
|||
} catch (Exception e) { |
|||
logger.error(ExceptionUtils.getErrorStackTrace(e)); |
|||
return ConsumeConcurrentlyStatus.RECONSUME_LATER; |
|||
} |
|||
return ConsumeConcurrentlyStatus.CONSUME_SUCCESS; |
|||
} |
|||
|
|||
private void consumeMessage(MessageExt messageExt) { |
|||
String tags = messageExt.getTags(); |
|||
// msg示例:
|
|||
// {
|
|||
// "userId": "5198ef9e3644c4f49457d2b551a1432e",
|
|||
// "appId": "数字社区登录",
|
|||
// "loginTime": "2023-04-04 14:05:37",
|
|||
// "ip": "219.146.91.110",
|
|||
// "fromApp": "gov",
|
|||
// "fromClient": "web"
|
|||
// }
|
|||
String msg = new String(messageExt.getBody()); |
|||
String pendingMsgLabel = messageExt.getUserProperty(MQUserPropertys.BLOCKED_MSG_LABEL); |
|||
logger.info("工作人员登录操作日志监听器-收到消息内容:{}", msg); |
|||
LoginMQMsg msgObj = JSON.parseObject(msg, LoginMQMsg.class); |
|||
|
|||
DistributedLock distributedLock = null; |
|||
RLock lock = null; |
|||
try { |
|||
distributedLock = SpringContextUtils.getBean(DistributedLock.class); |
|||
lock = distributedLock.getLock(String.format("lock:staff_login_log:%s:%s", tags, msgObj.getUserId()), |
|||
30L, 30L, TimeUnit.SECONDS); |
|||
SpringContextUtils.getBean(StaffLoginLogService.class).saveLog(msgObj.getUserId(),msgObj.getLoginTime()); |
|||
} catch (RenException e) { |
|||
// 如果是我们手动抛出的异常,说明在业务可控范围内。目前不需要MQ重试
|
|||
logger.error("【RocketMQ】工作人员登录添加操作日志失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|||
} catch (Exception e) { |
|||
// 不是我们自己抛出的异常,可以让MQ重试
|
|||
logger.error("【RocketMQ】工作人员登录添加操作日志失败:".concat(ExceptionUtils.getErrorStackTrace(e))); |
|||
throw e; |
|||
} finally { |
|||
distributedLock.unLock(lock); |
|||
} |
|||
|
|||
if (StringUtils.isNotBlank(pendingMsgLabel)) { |
|||
try { |
|||
removePendingMqMsgCache(pendingMsgLabel); |
|||
} catch (Exception e) { |
|||
logger.error("【工作人员登录操作事件监听器】-删除mq阻塞消息缓存失败:{}", ExceptionUtils.getErrorStackTrace(e)); |
|||
} |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* @description |
|||
* |
|||
* @param pendingMsgLabel |
|||
* @return |
|||
* @author wxz |
|||
* @date 2021.10.14 16:32:32 |
|||
*/ |
|||
private void removePendingMqMsgCache(String pendingMsgLabel) { |
|||
String key = RedisKeys.blockedMqMsgKey(pendingMsgLabel); |
|||
redisUtils.delete(key); |
|||
//logger.info("【登录操作事件监听器】删除pendingMsgLabel成功:{}", pendingMsgLabel);
|
|||
} |
|||
} |
|||
@ -0,0 +1,97 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.form.yt.CommunityLoginFormDTO; |
|||
import com.epmet.dto.form.yt.CountActivityFormDTO; |
|||
import com.epmet.dto.result.yt.ActivityTatalInfo; |
|||
import com.epmet.dto.result.yt.CommunityLoginResultDTO; |
|||
import com.epmet.dto.result.yt.LoginLogCountByLevelResultDTO; |
|||
import com.epmet.dto.result.yt.AccountActivityInfo; |
|||
import com.epmet.entity.StaffLoginLogEntity; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 工作人员登录日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2023-04-04 |
|||
*/ |
|||
public interface StaffLoginLogService extends BaseService<StaffLoginLogEntity> { |
|||
/** |
|||
* 登录,插入记录 |
|||
* |
|||
* @param staffId |
|||
* @param loginTime |
|||
*/ |
|||
void saveLog(String staffId, Date loginTime); |
|||
|
|||
/** |
|||
* 返回市级账号登录总次数、区县级账号登录总次数、镇街级账号登录总次数、社区级账号登录总次数 |
|||
* |
|||
* @param orgId 为空时,默认当前登录用户所属组织id |
|||
* @param level |
|||
* @param startDate yyyy-MM-dd |
|||
* @param endDate yyyy-MM-dd |
|||
* @return |
|||
*/ |
|||
LoginLogCountByLevelResultDTO countLevel(String orgId, String level, Date startDate, Date endDate); |
|||
|
|||
/** |
|||
* 下级社区账号登录次数排名 |
|||
* |
|||
* @param formDTO |
|||
* @return |
|||
*/ |
|||
PageData<CommunityLoginResultDTO> pageCommunityCount(CommunityLoginFormDTO formDTO); |
|||
|
|||
/** |
|||
* 柱状图:下级组织账号登录次数汇总 |
|||
* |
|||
* @param orgId |
|||
* @param level |
|||
* @param startDate |
|||
* @param endDate |
|||
* @return |
|||
*/ |
|||
PageData<CommunityLoginResultDTO> querySubCount(String orgId, String level, Date startDate, Date endDate); |
|||
|
|||
/** |
|||
* 查看区县 |
|||
* |
|||
* @param orgId |
|||
* @param level |
|||
* @param startDate |
|||
* @param endDate |
|||
* @param isPage |
|||
* @param pageNo |
|||
* @param pageSize |
|||
* @return |
|||
*/ |
|||
PageData<CommunityLoginResultDTO> pageDistrictCount(String orgId, String level, Date startDate, Date endDate, Boolean isPage, Integer pageNo, Integer pageSize); |
|||
|
|||
/** |
|||
* 查看街镇 |
|||
* |
|||
* @param orgId |
|||
* @param startDate |
|||
* @param endDate |
|||
* @param isPage |
|||
* @param pageNo |
|||
* @param pageSize |
|||
* @return |
|||
*/ |
|||
PageData<CommunityLoginResultDTO> streetCount(String orgId, Date startDate, Date endDate, Boolean isPage, Integer pageNo, Integer pageSize); |
|||
|
|||
/*** |
|||
* 获取登陆情况 |
|||
* @param formDTO |
|||
* @return com.epmet.dto.result.yt.AccountActivityInfo |
|||
* @author qushutong |
|||
* @date 2023/4/6 13:47 |
|||
*/ |
|||
PageData<AccountActivityInfo> getAccountActivityInfo(CountActivityFormDTO formDTO); |
|||
|
|||
ActivityTatalInfo getActivityTotal(CountActivityFormDTO formDTO); |
|||
} |
|||
@ -0,0 +1,310 @@ |
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.Constant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.constant.StrConstant; |
|||
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|||
import com.epmet.commons.tools.utils.EpmetRequestHolder; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.utils.SpringContextUtils; |
|||
import com.epmet.dao.StaffLoginLogDao; |
|||
import com.epmet.dto.CustomerAgencyDTO; |
|||
import com.epmet.dto.CustomerStaffDTO; |
|||
import com.epmet.dto.form.yt.CommunityLoginFormDTO; |
|||
import com.epmet.dto.form.yt.CountActivityFormDTO; |
|||
import com.epmet.dto.result.yt.ActivityTatalInfo; |
|||
import com.epmet.dto.result.yt.CommunityLoginResultDTO; |
|||
import com.epmet.dto.result.yt.LoginLogCountByLevelResultDTO; |
|||
import com.epmet.dto.result.yt.AccountActivityInfo; |
|||
import com.epmet.entity.StaffLoginLogEntity; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.service.CustomerAgencyService; |
|||
import com.epmet.service.StaffLoginLogService; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
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 org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 工作人员登录日志表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2023-04-04 |
|||
*/ |
|||
@Service |
|||
public class StaffLoginLogServiceImpl extends BaseServiceImpl<StaffLoginLogDao, StaffLoginLogEntity> implements StaffLoginLogService { |
|||
@Autowired |
|||
private EpmetUserOpenFeignClient userOpenFeignClient; |
|||
|
|||
|
|||
/** |
|||
* 登录,插入记录 |
|||
* |
|||
* @param staffId |
|||
* @param loginTime |
|||
*/ |
|||
@Transactional(rollbackFor = Exception.class) |
|||
@Override |
|||
public void saveLog(String staffId, Date loginTime) { |
|||
CustomerStaffDTO form = new CustomerStaffDTO(); |
|||
form.setUserId(staffId); |
|||
Result<CustomerStaffDTO> result = userOpenFeignClient.getCustomerStaffInfoByUserId(form); |
|||
if (!result.success() || null == result.getData()) { |
|||
return; |
|||
} |
|||
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(result.getData().getCustomerId(), staffId); |
|||
|
|||
StaffLoginLogEntity logEntity = new StaffLoginLogEntity(); |
|||
logEntity.setCustomerId(result.getData().getCustomerId()); |
|||
logEntity.setStaffId(staffId); |
|||
logEntity.setStaffName(staffInfoCacheResult.getRealName()); |
|||
logEntity.setMobile(staffInfoCacheResult.getMobile()); |
|||
logEntity.setAgencyId(staffInfoCacheResult.getAgencyId()); |
|||
CustomerAgencyDTO customerAgencyDTO = SpringContextUtils.getBean(CustomerAgencyService.class).get(staffInfoCacheResult.getAgencyId()); |
|||
logEntity.setAgencyLevel(customerAgencyDTO.getLevel()); |
|||
logEntity.setPid(customerAgencyDTO.getPid()); |
|||
if (StringUtils.isBlank(customerAgencyDTO.getPid()) || NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid())) { |
|||
logEntity.setOrgIdPath(customerAgencyDTO.getId()); |
|||
} else { |
|||
logEntity.setOrgIdPath(customerAgencyDTO.getPids().concat(StrConstant.COLON).concat(customerAgencyDTO.getId())); |
|||
} |
|||
logEntity.setLoginTime(loginTime); |
|||
baseDao.insert(logEntity); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 返回市级账号登录总次数、区县级账号登录总次数、镇街级账号登录总次数、社区级账号登录总次数 |
|||
* |
|||
* @param orgId 为空时,默认当前登录用户所属组织id |
|||
* @param level :组织级别(社区级:community, 乡(镇、街道)级:street,区县级: district,市级: city;省级:province) |
|||
* @param startDate yyyy-MM-dd |
|||
* @param endDate yyyy-MM-dd |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public LoginLogCountByLevelResultDTO countLevel(String orgId, String level, Date startDate, Date endDate) { |
|||
if (StringUtils.isBlank(orgId)) { |
|||
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); |
|||
orgId = staffInfoCacheResult.getAgencyId(); |
|||
level = staffInfoCacheResult.getLevel(); |
|||
} |
|||
String orgIdPath = SpringContextUtils.getBean(CustomerAgencyService.class).getOrgIdPath(orgId); |
|||
LoginLogCountByLevelResultDTO resultDTO = new LoginLogCountByLevelResultDTO(); |
|||
if (Constant.CITY.equals(level)) { |
|||
//市级账号登录
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> cityWrapper = new LambdaQueryWrapper<>(); |
|||
cityWrapper.eq(StaffLoginLogEntity::getAgencyId, orgId) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setCityCount(baseDao.selectCount(cityWrapper)); |
|||
|
|||
// 市下面区县账号
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> districtWrapper = new LambdaQueryWrapper<>(); |
|||
districtWrapper.eq(StaffLoginLogEntity::getPid, orgId) |
|||
.eq(StaffLoginLogEntity::getAgencyLevel, Constant.DISTRICT) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setDistrictCount(baseDao.selectCount(districtWrapper)); |
|||
|
|||
// 市级下面所有街道
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> streetWrapper = new LambdaQueryWrapper<>(); |
|||
streetWrapper.like(StaffLoginLogEntity::getOrgIdPath, orgIdPath) |
|||
.eq(StaffLoginLogEntity::getAgencyLevel, Constant.STREET) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setStreetCount(baseDao.selectCount(streetWrapper)); |
|||
|
|||
// 市级下面所有社区
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> communityWrapper = new LambdaQueryWrapper<>(); |
|||
communityWrapper.like(StaffLoginLogEntity::getOrgIdPath, orgIdPath) |
|||
.eq(StaffLoginLogEntity::getAgencyLevel, Constant.COMMUNITY) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setCommunityCount(baseDao.selectCount(communityWrapper)); |
|||
|
|||
} else if (Constant.DISTRICT.equals(level)) { |
|||
resultDTO.setCityCount(NumConstant.ONE_NEG); |
|||
|
|||
//只展示本区县的登录情况
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> districtWrapper = new LambdaQueryWrapper<>(); |
|||
districtWrapper.eq(StaffLoginLogEntity::getAgencyId, orgId) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setDistrictCount(baseDao.selectCount(districtWrapper)); |
|||
|
|||
// 区县下所有的街道
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> streetWrapper = new LambdaQueryWrapper<>(); |
|||
streetWrapper.like(StaffLoginLogEntity::getOrgIdPath, orgIdPath) |
|||
.eq(StaffLoginLogEntity::getAgencyLevel, Constant.STREET) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setStreetCount(baseDao.selectCount(streetWrapper)); |
|||
|
|||
// 去线下所有社区
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> communityWrapper = new LambdaQueryWrapper<>(); |
|||
communityWrapper.like(StaffLoginLogEntity::getOrgIdPath, orgIdPath) |
|||
.eq(StaffLoginLogEntity::getAgencyLevel, Constant.COMMUNITY) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setCommunityCount(baseDao.selectCount(communityWrapper)); |
|||
|
|||
} else if (Constant.STREET.equals(level)) { |
|||
resultDTO.setCityCount(NumConstant.ONE_NEG); |
|||
resultDTO.setDistrictCount(NumConstant.ONE_NEG); |
|||
|
|||
// 只展示本街道的登录情况
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> streetWrapper = new LambdaQueryWrapper<>(); |
|||
streetWrapper.eq(StaffLoginLogEntity::getAgencyId, orgId) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setStreetCount(baseDao.selectCount(streetWrapper)); |
|||
|
|||
|
|||
// 街道下所有社区
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> communityWrapper = new LambdaQueryWrapper<>(); |
|||
communityWrapper.like(StaffLoginLogEntity::getOrgIdPath, orgIdPath) |
|||
.eq(StaffLoginLogEntity::getAgencyLevel, Constant.COMMUNITY) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setCommunityCount(baseDao.selectCount(communityWrapper)); |
|||
|
|||
} else if (Constant.COMMUNITY.equals(level)) { |
|||
resultDTO.setCityCount(NumConstant.ONE_NEG); |
|||
resultDTO.setDistrictCount(NumConstant.ONE_NEG); |
|||
resultDTO.setStreetCount(NumConstant.ONE_NEG); |
|||
|
|||
// 只展示本社区的登录情况
|
|||
LambdaQueryWrapper<StaffLoginLogEntity> communityWrapper = new LambdaQueryWrapper<>(); |
|||
communityWrapper.eq(StaffLoginLogEntity::getAgencyId, orgId) |
|||
.between(null != startDate && null != endDate, StaffLoginLogEntity::getLoginTime, startDate, endDate); |
|||
resultDTO.setCommunityCount(baseDao.selectCount(communityWrapper)); |
|||
} |
|||
return resultDTO; |
|||
} |
|||
|
|||
@Override |
|||
public PageData<AccountActivityInfo> getAccountActivityInfo(CountActivityFormDTO formDTO) { |
|||
if (formDTO.getIsPage()) { |
|||
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|||
List<AccountActivityInfo> accountActivityInfos = baseDao.selectListActivityInfo(formDTO); |
|||
PageInfo<AccountActivityInfo> pageInfo = new PageInfo<>(accountActivityInfos); |
|||
return new PageData<>(accountActivityInfos, pageInfo.getTotal(),formDTO.getPageSize()); |
|||
} |
|||
List<AccountActivityInfo> accountActivityInfos = baseDao.selectListActivityInfo(formDTO); |
|||
int total = CollectionUtils.isEmpty(accountActivityInfos) ? NumConstant.ZERO : accountActivityInfos.size(); |
|||
return new PageData<>(accountActivityInfos, total); |
|||
} |
|||
|
|||
@Override |
|||
public ActivityTatalInfo getActivityTotal(CountActivityFormDTO formDTO) { |
|||
return baseDao.selectOneActivityTotal(formDTO); |
|||
} |
|||
|
|||
/** |
|||
* 下级社区账号登录次数排名 |
|||
* |
|||
* @param formDTO |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<CommunityLoginResultDTO> pageCommunityCount(CommunityLoginFormDTO formDTO) { |
|||
if (StringUtils.isBlank(formDTO.getOrgId())) { |
|||
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); |
|||
formDTO.setOrgId(staffInfoCacheResult.getAgencyId()); |
|||
// formDTO.setLevel(staffInfoCacheResult.getLevel());
|
|||
} |
|||
if (formDTO.getIsPage()) { |
|||
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); |
|||
List<CommunityLoginResultDTO> list = baseDao.pageCommunityCount(formDTO.getOrgId(), formDTO.getStartDate(), formDTO.getEndDate()); |
|||
PageInfo<CommunityLoginResultDTO> pageInfo = new PageInfo<>(list); |
|||
return new PageData<>(list, pageInfo.getTotal(), formDTO.getPageSize()); |
|||
} |
|||
// 不分页
|
|||
List<CommunityLoginResultDTO> list = baseDao.pageCommunityCount(formDTO.getOrgId(), formDTO.getStartDate(), formDTO.getEndDate()); |
|||
int total = CollectionUtils.isEmpty(list) ? NumConstant.ZERO : list.size(); |
|||
return new PageData<>(list, total, total); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 柱状图:下级组织账号登录次数汇总 |
|||
* |
|||
* @param orgId |
|||
* @param level |
|||
* @param startDate |
|||
* @param endDate |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<CommunityLoginResultDTO> querySubCount(String orgId, String level, Date startDate, Date endDate) { |
|||
if (StringUtils.isBlank(orgId)) { |
|||
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); |
|||
orgId = staffInfoCacheResult.getAgencyId(); |
|||
} |
|||
List<CommunityLoginResultDTO> list = baseDao.querySubCount(orgId, startDate, endDate); |
|||
int total = CollectionUtils.isEmpty(list) ? NumConstant.ZERO : list.size(); |
|||
return new PageData<CommunityLoginResultDTO>(list, total, total); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 查看区县 |
|||
* |
|||
* @param orgId |
|||
* @param level |
|||
* @param startDate |
|||
* @param endDate |
|||
* @param isPage |
|||
* @param pageNo |
|||
* @param pageSize |
|||
* @return 返回agencyId,agencyName,count |
|||
*/ |
|||
@Override |
|||
public PageData<CommunityLoginResultDTO> pageDistrictCount(String orgId, String level, Date startDate, Date endDate, Boolean isPage, Integer pageNo, Integer pageSize) { |
|||
if (StringUtils.isBlank(orgId)) { |
|||
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); |
|||
orgId = staffInfoCacheResult.getAgencyId(); |
|||
} |
|||
if (isPage) { |
|||
PageHelper.startPage(pageNo, pageSize); |
|||
List<CommunityLoginResultDTO> list = baseDao.pageDistrictCount(orgId, startDate, endDate); |
|||
PageInfo<CommunityLoginResultDTO> pageInfo = new PageInfo<>(list); |
|||
return new PageData<>(list, pageInfo.getTotal(), pageSize); |
|||
} |
|||
// 不分页
|
|||
List<CommunityLoginResultDTO> list = baseDao.pageDistrictCount(orgId, startDate, endDate); |
|||
int total = CollectionUtils.isEmpty(list) ? NumConstant.ZERO : list.size(); |
|||
return new PageData<>(list, total, total); |
|||
} |
|||
|
|||
/** |
|||
* 查看街镇 |
|||
* |
|||
* @param orgId |
|||
* @param startDate |
|||
* @param endDate |
|||
* @param isPage |
|||
* @param pageNo |
|||
* @param pageSize |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public PageData<CommunityLoginResultDTO> streetCount(String orgId, Date startDate, Date endDate, Boolean isPage, Integer pageNo, Integer pageSize) { |
|||
if (StringUtils.isBlank(orgId)) { |
|||
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId()); |
|||
orgId = staffInfoCacheResult.getAgencyId(); |
|||
} |
|||
if (isPage) { |
|||
PageHelper.startPage(pageNo, pageSize); |
|||
List<CommunityLoginResultDTO> list = baseDao.pageStreetCount(orgId, startDate, endDate); |
|||
PageInfo<CommunityLoginResultDTO> pageInfo = new PageInfo<>(list); |
|||
return new PageData<>(list, pageInfo.getTotal(), pageSize); |
|||
} |
|||
// 不分页
|
|||
List<CommunityLoginResultDTO> list = baseDao.pageStreetCount(orgId, startDate, endDate); |
|||
int total = CollectionUtils.isEmpty(list) ? NumConstant.ZERO : list.size(); |
|||
return new PageData<>(list, total, total); |
|||
} |
|||
} |
|||
@ -0,0 +1,189 @@ |
|||
<?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.StaffLoginLogDao"> |
|||
|
|||
<resultMap type="com.epmet.entity.StaffLoginLogEntity" id="staffLoginLogMap"> |
|||
<result property="id" column="ID"/> |
|||
<result property="customerId" column="CUSTOMER_ID"/> |
|||
<result property="staffId" column="STAFF_ID"/> |
|||
<result property="staffName" column="STAFF_NAME"/> |
|||
<result property="mobile" column="MOBILE"/> |
|||
<result property="agencyId" column="AGENCY_ID"/> |
|||
<result property="agencyLevel" column="AGENCY_LEVEL"/> |
|||
<result property="pid" column="PID"/> |
|||
<result property="orgIdPath" column="ORG_ID_PATH"/> |
|||
<result property="loginTime" column="LOGIN_TIME"/> |
|||
<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> |
|||
|
|||
<!-- 账号登录情况:各社区登录总次数 --> |
|||
<select id="pageCommunityCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> |
|||
SELECT |
|||
ca.id AS agencyId, |
|||
d.ORGANIZATION_NAME AS districtName, |
|||
s.ORGANIZATION_NAME AS streetName, |
|||
ca.ORGANIZATION_NAME AS agencyName, |
|||
ca.`LEVEL` AS agencyLevel, |
|||
count( l.id ) AS count |
|||
FROM customer_agency ca |
|||
left JOIN staff_login_log l |
|||
ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') |
|||
LEFT JOIN customer_agency s |
|||
ON ( ca.PID = s.ID ) |
|||
LEFT JOIN customer_agency d |
|||
ON ( s.PID = d.ID ) |
|||
WHERE |
|||
ca.DEL_FLAG = '0' |
|||
AND (ca.id = #{orgId} or ca.pids like concat('%',#{orgId},'%') ) |
|||
AND ca.LEVEL = 'community' |
|||
<if test='null != startDate'> |
|||
and l.LOGIN_TIME >= #{startDate} |
|||
</if> |
|||
<if test='null != endDate'> |
|||
and l.LOGIN_TIME <= #{endDate} |
|||
</if> |
|||
GROUP BY ca.id |
|||
order by count(l.id) desc,ca.CREATED_TIME desc |
|||
</select> |
|||
<!--社区活跃列表--> |
|||
<select id="selectListActivityInfo" resultType="com.epmet.dto.result.yt.AccountActivityInfo"> |
|||
SELECT |
|||
COUNT(DISTINCT(l.id)) AS loginCount, |
|||
COUNT(DISTINCT(l.STAFF_ID)) accountActivityCount, |
|||
COUNT(DISTINCT(ag.USER_ID)) accountCount, |
|||
a.ID agencyId, |
|||
a.ALL_PARENT_NAME agencyName |
|||
FROM |
|||
customer_agency a |
|||
LEFT JOIN staff_login_log l ON a.ID = l.AGENCY_ID |
|||
AND a.`LEVEL` = l.AGENCY_LEVEL |
|||
AND l.DEL_FLAG = '0' |
|||
LEFT JOIN customer_staff_agency ag ON a.ID = ag.AGENCY_ID |
|||
AND ag.DEL_FLAG = '0' |
|||
WHERE |
|||
a.DEL_FLAG = '0' |
|||
AND a.`LEVEL` = 'community' |
|||
<if test="orgId!= null and orgId.trim() != ''"> |
|||
AND a.PIDS LIKE CONCAT('%',#{orgId},'%') |
|||
</if> |
|||
<if test='null != startDate'> |
|||
and l.LOGIN_TIME >= #{startDate} |
|||
</if> |
|||
<if test='null != endDate'> |
|||
and l.LOGIN_TIME <= #{endDate} |
|||
</if> |
|||
<choose > |
|||
<when test='isActivity!= null and isActivity == "1" and isActivity.trim() != ""'> |
|||
AND l.AGENCY_ID is NOT NULL |
|||
</when> |
|||
<otherwise> |
|||
AND l.AGENCY_ID is NULL |
|||
</otherwise> |
|||
</choose> |
|||
GROUP BY |
|||
a.ID |
|||
ORDER BY |
|||
COUNT(DISTINCT(l.id)) DESC |
|||
</select> |
|||
|
|||
<!-- 账号登录情况:柱状图:下级组织账号登录次数汇总 --> |
|||
<select id="querySubCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> |
|||
select |
|||
ca.ID AS agencyId, |
|||
ca.ORGANIZATION_NAME AS agencyName, |
|||
ca.level as agencyLevel, |
|||
count(l.ID) AS count |
|||
from customer_agency ca |
|||
left join staff_login_log l |
|||
on(ca.ID=l.AGENCY_ID) |
|||
where ca.DEL_FLAG='0' |
|||
and ca.PID = #{orgId} |
|||
<if test='null != startDate'> |
|||
and l.LOGIN_TIME >= #{startDate} |
|||
</if> |
|||
<if test='null != endDate'> |
|||
and l.LOGIN_TIME <= #{endDate} |
|||
</if> |
|||
group by ca.id |
|||
order by count(l.ID) desc,ca.CREATED_TIME desc |
|||
</select> |
|||
|
|||
<!-- 账号登录情况:查看区县--> |
|||
<select id="pageDistrictCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> |
|||
SELECT |
|||
ca.id AS agencyId, |
|||
ca.ORGANIZATION_NAME AS agencyName, |
|||
ca.LEVEL AS agencyLevel, |
|||
count(l.id) AS count |
|||
FROM customer_agency ca |
|||
left join staff_login_log l |
|||
ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') |
|||
WHERE ca.DEL_FLAG = '0' |
|||
and (ca.id=#{orgId} or ca.pids like concat('%',#{orgId},'%') ) |
|||
AND ca.LEVEL = 'district' |
|||
<if test='null != startDate'> |
|||
and l.LOGIN_TIME >= #{startDate} |
|||
</if> |
|||
<if test='null != endDate'> |
|||
and l.LOGIN_TIME <= #{endDate} |
|||
</if> |
|||
GROUP BY ca.id |
|||
order by count(l.id) desc |
|||
</select> |
|||
|
|||
<!-- 账号登录情况:查看街镇--> |
|||
<select id="pageStreetCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> |
|||
SELECT |
|||
ca.id AS agencyId, |
|||
ca.ORGANIZATION_NAME AS agencyName, |
|||
ca.LEVEL AS agencyLevel, |
|||
pa.ORGANIZATION_NAME as districtName, |
|||
count(l.id) AS count |
|||
FROM customer_agency ca |
|||
left join staff_login_log l |
|||
ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') |
|||
left join customer_agency pa |
|||
on(ca.pid=pa.id) |
|||
WHERE |
|||
ca.DEL_FLAG = '0' |
|||
and (ca.id = #{orgId} or ca.pids like concat('%',#{orgId},'%') ) |
|||
AND ca.LEVEL = 'street' |
|||
<if test='null != startDate'> |
|||
and l.LOGIN_TIME >= #{startDate} |
|||
</if> |
|||
<if test='null != endDate'> |
|||
and l.LOGIN_TIME <= #{endDate} |
|||
</if> |
|||
GROUP BY ca.id |
|||
order by count(l.id) desc |
|||
</select> |
|||
|
|||
<select id="selectOneActivityTotal" resultType="com.epmet.dto.result.yt.ActivityTatalInfo"> |
|||
SELECT |
|||
COUNT(t.activityCount = '0' OR NULL) inactivityCount, |
|||
COUNT(t.activityCount > '0' OR NULL) activityCount |
|||
FROM |
|||
( |
|||
SELECT |
|||
COUNT(DISTINCT(l.ID)) activityCount |
|||
FROM |
|||
customer_agency a |
|||
LEFT JOIN staff_login_log l ON a.ID = l.AGENCY_ID |
|||
WHERE |
|||
a.`LEVEL` = 'community' |
|||
AND a.DEL_FLAG = '0' |
|||
<if test="orgId!= null and orgId.trim() != ''"> |
|||
AND a.PIDS LIKE CONCAT('%',#{orgId},'%') |
|||
</if> |
|||
GROUP BY |
|||
a.ID |
|||
) t; |
|||
|
|||
</select> |
|||
</mapper> |
|||
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.form.resi; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 烟台居民画像入参 |
|||
* @Author yzm |
|||
* @Date 2023/4/11 17:03 |
|||
*/ |
|||
@Data |
|||
public class ResiPortrayalCommonFormDTO extends PageFormDTO { |
|||
/** |
|||
* /gov/org/customeragency/agencygridtree返回的agencyId |
|||
*/ |
|||
private String orgId; |
|||
/** |
|||
* /gov/org/customeragency/agencygridtree返回level=grid时,orgType:grid;其他情况orgType:agency |
|||
*/ |
|||
private String orgType; |
|||
|
|||
/** |
|||
* 查询居民列表 |
|||
* 年龄饼图/学历饼图返回的code |
|||
*/ |
|||
private String code; |
|||
/** |
|||
* 学历:education |
|||
* 年龄:age |
|||
*/ |
|||
private String codeType; |
|||
} |
|||
|
|||
@ -0,0 +1,121 @@ |
|||
package com.epmet.dto.result.resi; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelIgnore; |
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 烟台居民画像,居民列表 |
|||
* @Author yzm |
|||
* @Date 2023/4/12 10:10 |
|||
*/ |
|||
@Data |
|||
public class ResiPortrayalDetailDTO { |
|||
/** |
|||
* 居民id |
|||
*/ |
|||
@ExcelIgnore |
|||
private String icResiUserId; |
|||
|
|||
@ExcelIgnore |
|||
private String gridId; |
|||
|
|||
@ExcelProperty(value = "所属网格") |
|||
@ColumnWidth(30) |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 所属小区ID |
|||
*/ |
|||
@ExcelIgnore |
|||
private String villageId; |
|||
@ExcelIgnore |
|||
private String villageName; |
|||
/** |
|||
* 所属楼宇Id |
|||
*/ |
|||
@ExcelIgnore |
|||
private String buildId; |
|||
@ExcelIgnore |
|||
private String buildName; |
|||
/** |
|||
* 单元id |
|||
*/ |
|||
@ExcelIgnore |
|||
private String unitId; |
|||
@ExcelIgnore |
|||
private String unitName; |
|||
|
|||
/** |
|||
* 所属家庭Id |
|||
*/ |
|||
@ExcelIgnore |
|||
private String homeId; |
|||
|
|||
@ExcelProperty(value = "所属房屋") |
|||
@ColumnWidth(30) |
|||
private String homeName; |
|||
|
|||
/** |
|||
* 所属家庭号 |
|||
* 101 |
|||
*/ |
|||
@ExcelIgnore |
|||
private String doorName; |
|||
|
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
@ExcelProperty(value = "姓名") |
|||
@ColumnWidth(25) |
|||
private String name; |
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
@ExcelProperty(value = "手机号") |
|||
@ColumnWidth(25) |
|||
private String mobile; |
|||
/** |
|||
* 性别:1男;2女;0未知 |
|||
*/ |
|||
@ExcelIgnore |
|||
private String gender; |
|||
/** |
|||
* 性别名称 |
|||
*/ |
|||
@ExcelProperty(value = "性别") |
|||
@ColumnWidth(10) |
|||
private String genderName; |
|||
/** |
|||
* 身份证 |
|||
*/ |
|||
@ExcelProperty(value = "身份证号") |
|||
@ColumnWidth(25) |
|||
private String idCard; |
|||
|
|||
@ExcelProperty(value = "出生日期") |
|||
@ColumnWidth(25) |
|||
private String birthday; |
|||
|
|||
/** |
|||
* 年龄 |
|||
*/ |
|||
@ExcelProperty(value = "年龄") |
|||
@ColumnWidth(10) |
|||
private Integer age; |
|||
/** |
|||
* 学历key |
|||
*/ |
|||
@ExcelIgnore |
|||
private String educationCode; |
|||
/** |
|||
* 学历 |
|||
*/ |
|||
@ExcelProperty(value = "学历") |
|||
@ColumnWidth(10) |
|||
private String educationName; |
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.result.resi; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @Description 烟台居民画像返参 |
|||
* @Author yzm |
|||
* @Date 2023/4/11 17:04 |
|||
*/ |
|||
@Data |
|||
public class ResiPortrayalResultDTO { |
|||
/** |
|||
* 居民数量 |
|||
*/ |
|||
private Integer totalResi; |
|||
/** |
|||
* 年龄分布:50岁以下:0;50-59岁:1;60-69岁:2;70-79岁:3;80岁以上:4 |
|||
* 学历分布:学历key |
|||
*/ |
|||
private String code; |
|||
|
|||
/** |
|||
* 学历分布:小学及文盲/初中..... |
|||
* 年龄分布:50岁以下/50-59岁/60-69岁/70-79岁/80岁以上 |
|||
*/ |
|||
private String codeName; |
|||
} |
|||
|
|||
Loading…
Reference in new issue