Browse Source

Merge remote-tracking branch 'origin_elink/yantai_zhengwu_master'

master
yinzuomei 2 years ago
parent
commit
e559090f98
  1. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityLoginResultDTO.java
  2. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  3. 53
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffLoginLogController.java
  4. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  5. 7
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffLoginLogDao.java
  6. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  7. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  8. 32
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffLoginLogServiceImpl.java
  9. 22
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  10. 40
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffLoginLogDao.xml
  11. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  12. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  13. 6
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

13
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityLoginResultDTO.java

@ -1,5 +1,8 @@
package com.epmet.dto.result.yt;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;
/**
@ -12,26 +15,36 @@ public class CommunityLoginResultDTO {
/**
* 组织id
*/
@ExcelIgnore
private String agencyId;
/**
* 组织名称
*/
@ColumnWidth(20)
@ExcelProperty(value = "社区名称")
private String agencyName;
/**
* 组织级别社区级community 街道:street, 区县级: district, 市级: city 省级:province
*/
@ExcelIgnore
private String agencyLevel;
/**
* 所属街道名称
*/
@ColumnWidth(20)
@ExcelProperty(value = "所属街道")
private String streetName;
/**
* 所属区县名称
*/
@ColumnWidth(20)
@ExcelProperty(value = "所属区县")
private String districtName;
/**
* 登录次数
*/
@ColumnWidth(20)
@ExcelProperty(value = "登录次数")
private Integer count;
}

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java

@ -535,9 +535,9 @@ public class CustomerAgencyController {
* @Author: lichao
* @Date: 2023/4/7 14:48
*/
@GetMapping("getAgencyCountList")
public Result<List<AgencyCountCensusResultDTO>> getAgencyCountList(@RequestParam String agencyId){
return new Result<List<AgencyCountCensusResultDTO>>().ok(customerAgencyService.getAgencyCountList(agencyId));
@PostMapping("getAgencyCountList")
public Result<List<AgencyCountCensusResultDTO>> getAgencyCountList(@RequestBody CommunityCountCensusFormDTO dto){
return new Result<List<AgencyCountCensusResultDTO>>().ok(customerAgencyService.getAgencyCountList(dto));
}
/**

53
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/StaffLoginLogController.java

@ -1,12 +1,21 @@
package com.epmet.controller;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.alibaba.nacos.client.naming.utils.CollectionUtils;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException;
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.DateUtils;
import com.epmet.commons.tools.utils.ExcelUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter;
import com.epmet.dto.form.yt.CommunityLoginFormDTO;
import com.epmet.dto.form.yt.CountActivityFormDTO;
import com.epmet.dto.form.yt.LoginLogCountByLevelFormDTO;
@ -16,6 +25,7 @@ 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 lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -24,6 +34,8 @@ import org.springframework.web.bind.annotation.RestController;
import com.epmet.dto.result.yt.AccountActivityInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.util.Date;
import java.util.List;
@ -33,6 +45,7 @@ import java.util.List;
* @author generator generator@elink-cn.com
* @since v1.0.0 2023-04-04
*/
@Slf4j
@RestController
@RequestMapping("staffLoginLog")
public class StaffLoginLogController {
@ -62,6 +75,46 @@ public class StaffLoginLogController {
return new Result<PageData<CommunityLoginResultDTO>>().ok(staffLoginLogService.pageCommunityCount(formDTO));
}
/**
* 下级社区账号登录次数排名
*
* @return
*/
@PostMapping("community-count-export")
public void communityCount(HttpServletResponse response, @RequestBody CommunityLoginFormDTO formDTO) throws Exception {
ExcelWriter excelWriter = null;
formDTO.setPageNo(NumConstant.ONE);
formDTO.setPageSize(NumConstant.TEN_THOUSAND);
try {
String fileName = "社区级账号登录情况" + DateUtils.format(new Date()) + ".xlsx";
excelWriter = EasyExcel.write(ExcelUtils.getOutputStreamForExcel(fileName, response), CommunityLoginResultDTO.class).build();
WriteSheet writeSheet = EasyExcel.writerSheet("Sheet1").registerWriteHandler(new FreezeAndFilter()).build();
PageData<CommunityLoginResultDTO> data = null;
List<CommunityLoginResultDTO> list = null;
do {
// 默认查询本组织及下级
data = staffLoginLogService.pageCommunityCount(formDTO);
list = ConvertUtils.sourceToTarget(data.getList(), CommunityLoginResultDTO.class);
formDTO.setPageNo(formDTO.getPageNo() + NumConstant.ONE);
excelWriter.write(list, writeSheet);
} while (org.apache.commons.collections4.CollectionUtils.isNotEmpty(list) && list.size() == formDTO.getPageSize());
} catch (EpmetException e) {
response.reset();
response.setCharacterEncoding("UTF-8");
response.setHeader("content-type", "application/json; charset=UTF-8");
PrintWriter printWriter = response.getWriter();
Result<Object> result = new Result<>().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), e.getMsg());
printWriter.write(JSON.toJSONString(result));
printWriter.close();
} catch (Exception e) {
log.error("社区级账号登录情况export exception", e);
} finally {
if (excelWriter != null) {
excelWriter.finish();
}
}
}
/**
* 柱状图下级组织账号登录次数汇总
*

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -434,11 +434,11 @@ public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
*/
List<AgencyResultDTO> getAllCommunity(String customerId);
List<AgencyCountCensusResultDTO> agencyCount(@Param("pids") String pids);
List<AgencyCountCensusResultDTO> agencyCount(@Param("pids") String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);
Integer agencyGridCount(@Param("pids") String pids);
Integer agencyGridCount(@Param("pids") String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);
Integer agencyStaffCount(@Param("pids") String pids);
Integer agencyStaffCount(@Param("pids") String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);
Integer getCommunityCount(@Param("pids")String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd);

7
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/StaffLoginLogDao.java

@ -33,6 +33,9 @@ public interface StaffLoginLogDao extends BaseDao<StaffLoginLogEntity> {
@Param("startDate") Date startDate,
@Param("endDate") Date endDate);
List<CommunityLoginResultDTO> selectCommunityCount(@Param("orgId") String orgId,
@Param("startDate") Date startDate,
@Param("endDate") Date endDate);
/**
* 柱状图下级组织账号登录次数汇总
*
@ -72,4 +75,8 @@ public interface StaffLoginLogDao extends BaseDao<StaffLoginLogEntity> {
ActivityTatalInfo selectOneActivityTotal(CountActivityFormDTO formDTO);
Integer selectLoginTotalByPath(@Param("orgIdPath") String orgIdPath,
@Param("startDate") Date startDate,
@Param("endDate") Date endDate);
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java

@ -368,10 +368,10 @@ public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity>
/**
* 返回下级数量
* @param agencyId
* @param dto
* @return
*/
List<AgencyCountCensusResultDTO> getAgencyCountList(String agencyId);
List<AgencyCountCensusResultDTO> getAgencyCountList(CommunityCountCensusFormDTO dto);
/**
* @Description: 获取下级组织的社区数量

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java

@ -1662,29 +1662,29 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
/**
* @Description:
* @param agencyId:
* @param dto:
* @Return java.util.List<com.epmet.dto.result.AgencyCountCensusResultDTO>
* @Author: lichao
* @Date: 2023/4/7 14:17
*/
@Override
public List<AgencyCountCensusResultDTO> getAgencyCountList(String agencyId) {
public List<AgencyCountCensusResultDTO> getAgencyCountList(CommunityCountCensusFormDTO dto) {
List<AgencyCountCensusResultDTO> agencyCountCensusResultDTOS = new ArrayList<>();
CustomerAgencyEntity customerAgency = baseDao.selectById(agencyId);
CustomerAgencyEntity customerAgency = baseDao.selectById(dto.getAgencyId());
if (customerAgency != null){
String pids = PidUtils.convertPid2OrgIdPath(customerAgency.getId(),customerAgency.getPids());
agencyCountCensusResultDTOS = baseDao.agencyCount(pids);
agencyCountCensusResultDTOS = baseDao.agencyCount(pids,dto.getTimeStart(),dto.getTimeEnd());
AgencyCountCensusResultDTO agencyCountCensusResultDTOGrid = new AgencyCountCensusResultDTO();
agencyCountCensusResultDTOGrid.setLevel("grid");
agencyCountCensusResultDTOGrid.setCount(baseDao.agencyGridCount(pids));
agencyCountCensusResultDTOGrid.setCount(baseDao.agencyGridCount(pids,dto.getTimeStart(),dto.getTimeEnd()));
agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOGrid);
AgencyCountCensusResultDTO agencyCountCensusResultDTOStaff = new AgencyCountCensusResultDTO();
agencyCountCensusResultDTOStaff.setLevel("staff");
agencyCountCensusResultDTOStaff.setCount(baseDao.agencyStaffCount(pids));
agencyCountCensusResultDTOStaff.setCount(baseDao.agencyStaffCount(pids,dto.getTimeStart(),dto.getTimeEnd()));
agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOStaff);
}else{

32
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/StaffLoginLogServiceImpl.java

@ -9,17 +9,20 @@ 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.PidUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.utils.SpringContextUtils;
import com.epmet.dao.CustomerAgencyDao;
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.AccountActivityInfo;
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.CustomerAgencyEntity;
import com.epmet.entity.StaffLoginLogEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.CustomerAgencyService;
@ -32,6 +35,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -45,6 +49,8 @@ import java.util.List;
public class StaffLoginLogServiceImpl extends BaseServiceImpl<StaffLoginLogDao, StaffLoginLogEntity> implements StaffLoginLogService {
@Autowired
private EpmetUserOpenFeignClient userOpenFeignClient;
@Autowired
private CustomerAgencyDao customerAgencyDao;
/**
@ -242,8 +248,30 @@ public class StaffLoginLogServiceImpl extends BaseServiceImpl<StaffLoginLogDao,
if (StringUtils.isBlank(orgId)) {
CustomerStaffInfoCacheResult staffInfoCacheResult = CustomerStaffRedis.getStaffInfo(EpmetRequestHolder.getLoginUserCustomerId(), EpmetRequestHolder.getLoginUserId());
orgId = staffInfoCacheResult.getAgencyId();
level=staffInfoCacheResult.getLevel();
}
if(Constant.COMMUNITY.equals(level)){
//如果是社区,返回自己
List<CommunityLoginResultDTO> list = baseDao.selectCommunityCount(orgId, startDate, endDate);
int total = CollectionUtils.isEmpty(list) ? NumConstant.ZERO : list.size();
return new PageData<CommunityLoginResultDTO>(list, total, total);
}
//先查询出下级组织
LambdaQueryWrapper<CustomerAgencyEntity> agencyWrapper=new LambdaQueryWrapper<>();
agencyWrapper.eq(CustomerAgencyEntity::getPid,orgId).orderByAsc(CustomerAgencyEntity::getCreatedTime);
List<CustomerAgencyEntity> subAgencyList=customerAgencyDao.selectList(agencyWrapper);
List<CommunityLoginResultDTO> list=new ArrayList<>();
for(CustomerAgencyEntity agencyEntity:subAgencyList){
CommunityLoginResultDTO resultDTO=new CommunityLoginResultDTO();
resultDTO.setAgencyId(agencyEntity.getId());
resultDTO.setAgencyName(agencyEntity.getOrganizationName());
resultDTO.setAgencyLevel(agencyEntity.getLevel());
String orgIdPath=PidUtils.convertPid2OrgIdPath(agencyEntity.getId(),agencyEntity.getPids());
//查询本组织及下级
resultDTO.setCount(baseDao.selectLoginTotalByPath(orgIdPath,startDate,endDate));
list.add(resultDTO);
}
List<CommunityLoginResultDTO> list = baseDao.querySubCount(orgId, startDate, endDate);
// List<CommunityLoginResultDTO> list = baseDao.querySubCount(orgId, startDate, endDate);
int total = CollectionUtils.isEmpty(list) ? NumConstant.ZERO : list.size();
return new PageData<CommunityLoginResultDTO>(list, total, total);
}

22
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -889,6 +889,12 @@
from customer_agency
where DEL_FLAG = 0
and PIDS like concat(#{pids},'%')
<if test="timeStart != null">
and UPDATED_TIME &gt;= #{timeStart}
</if>
<if test="timeEnd != null">
and UPDATED_TIME &lt;= #{timeEnd}
</if>
group by level
</select>
@ -899,6 +905,12 @@
from customer_grid
where DEL_FLAG = 0
and PIDS like concat(#{pids},'%')
<if test="timeStart != null">
and UPDATED_TIME &gt;= #{timeStart}
</if>
<if test="timeEnd != null">
and UPDATED_TIME &lt;= #{timeEnd}
</if>
</select>
@ -911,6 +923,12 @@
and
staff.DEL_FLAG = 0
and agency.PIDS like concat(#{pids},'%')
<if test="timeStart != null">
and agency.UPDATED_TIME &gt;= #{timeStart}
</if>
<if test="timeEnd != null">
and agency.UPDATED_TIME &lt;= #{timeEnd}
</if>
</select>
@ -1212,10 +1230,10 @@
and agency.LEVEL = 'community'
and agency.PIDS like concat(#{pids},'%')
<if test="timeStart != null">
and agency.CREATED_TIME &gt;= #{timeStart}
and agency.UPDATED_TIME &gt;= #{timeStart}
</if>
<if test="timeEnd != null">
and agency.CREATED_TIME &lt;= #{timeEnd}
and agency.UPDATED_TIME &lt;= #{timeEnd}
</if>
</select>
<select id="getCommunityByPidList" resultType="com.epmet.dto.result.CommunityListByAgencyIdResultDTO">

40
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/StaffLoginLogDao.xml

@ -51,6 +51,33 @@
GROUP BY ca.id
order by count(l.id) desc,ca.CREATED_TIME desc
</select>
<!-- 查询某一个社区的登录次数 -->
<select id="selectCommunityCount" 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}
<if test='null != startDate'>
and l.LOGIN_TIME &gt;= #{startDate}
</if>
<if test='null != endDate'>
and l.LOGIN_TIME &lt;= #{endDate}
</if>
</select>
<!--社区活跃列表-->
<select id="selectListActivityInfo" resultType="com.epmet.dto.result.yt.AccountActivityInfo">
SELECT
@ -186,4 +213,17 @@
) t;
</select>
<select id="selectLoginTotalByPath" parameterType="map" resultType="java.lang.Integer">
select
count(l.id)
from staff_login_log l
where l.ORG_ID_PATH like concat(#{orgIdPath},'%')
<if test='null != startDate'>
and l.LOGIN_TIME &gt;= #{startDate}
</if>
<if test='null != endDate'>
and l.LOGIN_TIME &lt;= #{endDate}
</if>
</select>
</mapper>

7
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java

@ -464,11 +464,13 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
*/
List<ResiPortrayalResultDTO> queryEducationDistribute(@Param("customerId") String customerId,
@Param("orgId") String orgId,
@Param("orgType") String orgType);
@Param("orgType") String orgType,
@Param("orgIdPath")String orgIdPath);
List<ResiPortrayalResultDTO> selectAgeAgeDistribute(@Param("customerId") String customerId,
@Param("orgId") String orgId,
@Param("orgType") String orgType);
@Param("orgType") String orgType,
@Param("orgIdPath")String orgIdPath);
/**
* @param customerId
@ -481,6 +483,7 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
List<ResiPortrayalDetailDTO> selectPortrayalResiList(@Param("customerId") String customerId,
@Param("orgId") String orgId,
@Param("orgType") String orgType,
@Param("orgIdPath") String orgIdPath,
@Param("codeType")String codeType,
@Param("code") String code);
}

18
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java

@ -3919,8 +3919,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId();
orgType = OrgTypeEnum.AGENCY.getCode();
}
String orgIdPath=StrConstant.EPMETY_STR;
if(OrgTypeEnum.AGENCY.getCode().equals(orgType)){
orgIdPath=CustomerOrgRedis.getOrgIdPath(orgId,orgType);
}
List<ResiPortrayalResultDTO> resultList=getDefaultAgeDistribute();
List<ResiPortrayalResultDTO> list=baseDao.selectAgeAgeDistribute(customerId,orgId,orgType);
List<ResiPortrayalResultDTO> list=baseDao.selectAgeAgeDistribute(customerId,orgId,orgType,orgIdPath);
if(CollectionUtils.isEmpty(list)){
return resultList;
}
@ -3986,8 +3990,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
if (!dictResult.success() || CollectionUtils.isEmpty(dictResult.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "学历字典获取失败", "学历字典获取失败");
}
String orgIdPath=StrConstant.EPMETY_STR;
if(OrgTypeEnum.AGENCY.getCode().equals(orgType)){
orgIdPath=CustomerOrgRedis.getOrgIdPath(orgId,orgType);
}
//按照学历分组,查询居民数量
List<ResiPortrayalResultDTO> totalList = baseDao.queryEducationDistribute(customerId, orgId, orgType);
List<ResiPortrayalResultDTO> totalList = baseDao.queryEducationDistribute(customerId, orgId, orgType,orgIdPath);
Map<String,Integer> map = totalList.stream().collect(Collectors.toMap(ResiPortrayalResultDTO::getCode,ResiPortrayalResultDTO::getTotalResi));
List<ResiPortrayalResultDTO> resultDTOList = new ArrayList<>();
dictResult.getData().forEach(dict -> {
@ -4037,8 +4045,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId();
orgType = OrgTypeEnum.AGENCY.getCode();
}
String orgIdPath=StrConstant.EPMETY_STR;
if(OrgTypeEnum.AGENCY.getCode().equals(orgType)){
orgIdPath=CustomerOrgRedis.getOrgIdPath(orgId,orgType);
}
PageHelper.startPage(pageNo, pageSize);
List<ResiPortrayalDetailDTO> list = baseDao.selectPortrayalResiList(customerId, orgId, orgType,codeType, code);
List<ResiPortrayalDetailDTO> list = baseDao.selectPortrayalResiList(customerId, orgId, orgType,orgIdPath,codeType, code);
if(CollectionUtils.isNotEmpty(list)){
Set<String> houseIds=list.stream().map(m -> m.getHomeId()).collect(Collectors.toSet());
//查询房子名称

6
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -1606,7 +1606,7 @@
r.DEL_FLAG = '0'
AND r.CUSTOMER_ID = #{customerId}
<if test='orgType == "agency" '>
AND ( r.AGENCY_ID = #{orgId} OR r.PIDS LIKE concat('%',#{orgId},'%') )
and r.PIDS LIKE concat(#{orgIdPath},'%')
</if>
<if test='orgType == "grid" '>
and r.GRID_ID = #{orgId}
@ -1647,7 +1647,7 @@
and u.BIRTHDAY is not null
and u.BIRTHDAY !=''
<if test='orgType == "agency" '>
AND ( u.AGENCY_ID = #{orgId} OR u.PIDS LIKE concat('%',#{orgId},'%') )
and u.PIDS LIKE concat(#{orgIdPath},'%')
</if>
<if test='orgType == "grid" '>
and u.GRID_ID = #{orgId}
@ -1683,7 +1683,7 @@
AND u.CUSTOMER_ID = #{customerId}
AND u.`STATUS` = '0'
<if test='orgType == "agency" '>
AND ( u.AGENCY_ID = #{orgId} OR u.PIDS LIKE concat('%',#{orgId},'%') )
and u.PIDS LIKE concat(#{orgIdPath},'%')
</if>
<if test='orgType == "grid" '>
and u.GRID_ID = #{orgId}

Loading…
Cancel
Save