Browse Source

Merge branch 'yantai_zhengwu_master' into dev

master
lichao 2 years ago
parent
commit
88ea3e308d
  1. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/yt/CommunityLoginResultDTO.java
  2. 2
      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. 20
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  5. 85
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  6. 7
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java
  7. 18
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java
  8. 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; 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; import lombok.Data;
/** /**
@ -12,26 +15,36 @@ public class CommunityLoginResultDTO {
/** /**
* 组织id * 组织id
*/ */
@ExcelIgnore
private String agencyId; private String agencyId;
/** /**
* 组织名称 * 组织名称
*/ */
@ColumnWidth(20)
@ExcelProperty(value = "社区名称")
private String agencyName; private String agencyName;
/** /**
* 组织级别社区级community 街道:street, 区县级: district, 市级: city 省级:province * 组织级别社区级community 街道:street, 区县级: district, 市级: city 省级:province
*/ */
@ExcelIgnore
private String agencyLevel; private String agencyLevel;
/** /**
* 所属街道名称 * 所属街道名称
*/ */
@ColumnWidth(20)
@ExcelProperty(value = "所属街道")
private String streetName; private String streetName;
/** /**
* 所属区县名称 * 所属区县名称
*/ */
@ColumnWidth(20)
@ExcelProperty(value = "所属区县")
private String districtName; private String districtName;
/** /**
* 登录次数 * 登录次数
*/ */
@ColumnWidth(20)
@ExcelProperty(value = "登录次数")
private Integer count; private Integer count;
} }

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

@ -530,7 +530,7 @@ public class CustomerAgencyController {
/** /**
* @Description: 返回下级数量统计 * @Description: 返回下级数量统计
* @param agencyId: * @param dto:
* @Return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.AgencyCountCensusResultDTO>> * @Return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.AgencyCountCensusResultDTO>>
* @Author: lichao * @Author: lichao
* @Date: 2023/4/7 14:48 * @Date: 2023/4/7 14:48

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

@ -1,12 +1,21 @@
package com.epmet.controller; 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.alibaba.nacos.client.naming.utils.CollectionUtils;
import com.epmet.commons.tools.annotation.LoginUser; 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.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.ConvertUtils; 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.ExcelUtils;
import com.epmet.commons.tools.utils.Result; 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.CommunityLoginFormDTO;
import com.epmet.dto.form.yt.CountActivityFormDTO; import com.epmet.dto.form.yt.CountActivityFormDTO;
import com.epmet.dto.form.yt.LoginLogCountByLevelFormDTO; 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.AccountActivityExcel;
import com.epmet.excel.yt.AccountInactivityExcel; import com.epmet.excel.yt.AccountInactivityExcel;
import com.epmet.service.StaffLoginLogService; import com.epmet.service.StaffLoginLogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; 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 com.epmet.dto.result.yt.AccountActivityInfo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.util.Date;
import java.util.List; import java.util.List;
@ -33,6 +45,7 @@ import java.util.List;
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2023-04-04 * @since v1.0.0 2023-04-04
*/ */
@Slf4j
@RestController @RestController
@RequestMapping("staffLoginLog") @RequestMapping("staffLoginLog")
public class StaffLoginLogController { public class StaffLoginLogController {
@ -62,6 +75,46 @@ public class StaffLoginLogController {
return new Result<PageData<CommunityLoginResultDTO>>().ok(staffLoginLogService.pageCommunityCount(formDTO)); 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();
}
}
}
/** /**
* 柱状图下级组织账号登录次数汇总 * 柱状图下级组织账号登录次数汇总
* *

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

@ -1674,9 +1674,16 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
CustomerAgencyEntity customerAgency = baseDao.selectById(dto.getAgencyId()); CustomerAgencyEntity customerAgency = baseDao.selectById(dto.getAgencyId());
if (customerAgency != null){ if (customerAgency != null){
Map<String,String> type = new HashMap<>();
String pids = PidUtils.convertPid2OrgIdPath(customerAgency.getId(),customerAgency.getPids()); String pids = PidUtils.convertPid2OrgIdPath(customerAgency.getId(),customerAgency.getPids());
agencyCountCensusResultDTOS = baseDao.agencyCount(pids,dto.getTimeStart(),dto.getTimeEnd()); agencyCountCensusResultDTOS = baseDao.agencyCount(pids,dto.getTimeStart(),dto.getTimeEnd());
agencyCountCensusResultDTOS.forEach(
agencyCountCensusResultDTO ->{
type.put(agencyCountCensusResultDTO.getLevel(),agencyCountCensusResultDTO.getLevel());
}
);
AgencyCountCensusResultDTO agencyCountCensusResultDTOGrid = new AgencyCountCensusResultDTO(); AgencyCountCensusResultDTO agencyCountCensusResultDTOGrid = new AgencyCountCensusResultDTO();
agencyCountCensusResultDTOGrid.setLevel("grid"); agencyCountCensusResultDTOGrid.setLevel("grid");
agencyCountCensusResultDTOGrid.setCount(baseDao.agencyGridCount(pids,dto.getTimeStart(),dto.getTimeEnd())); agencyCountCensusResultDTOGrid.setCount(baseDao.agencyGridCount(pids,dto.getTimeStart(),dto.getTimeEnd()));
@ -1687,9 +1694,22 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao
agencyCountCensusResultDTOStaff.setCount(baseDao.agencyStaffCount(pids,dto.getTimeStart(),dto.getTimeEnd())); agencyCountCensusResultDTOStaff.setCount(baseDao.agencyStaffCount(pids,dto.getTimeStart(),dto.getTimeEnd()));
agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOStaff); agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOStaff);
if (type.get("community") == null){
AgencyCountCensusResultDTO agencyCountCensusResultDTOcom = new AgencyCountCensusResultDTO();
agencyCountCensusResultDTOcom.setLevel("community");
agencyCountCensusResultDTOcom.setCount(0);
agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOcom);
}else if (type.get("street") == null){
AgencyCountCensusResultDTO agencyCountCensusResultDTOstree = new AgencyCountCensusResultDTO();
agencyCountCensusResultDTOstree.setLevel("street");
agencyCountCensusResultDTOstree.setCount(0);
agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOstree);
}
}else{ }else{
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"获取用户组织信息异常","获取用户组织信息异常");
} }
return agencyCountCensusResultDTOS; return agencyCountCensusResultDTOS;
} }

85
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java

@ -416,17 +416,60 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
HouseCountPictureResultDTO resultDTO = new HouseCountPictureResultDTO(); HouseCountPictureResultDTO resultDTO = new HouseCountPictureResultDTO();
Map<String,String> type = new HashMap<>();
resultDTO.setTotal(0); resultDTO.setTotal(0);
if (dto.getOrgType().equals("community") || dto.getOrgType().equals("street") ||dto.getOrgType().equals("district") ||dto.getOrgType().equals("city")){ if (dto.getOrgType().equals("community") || dto.getOrgType().equals("street") ||dto.getOrgType().equals("district") ||dto.getOrgType().equals("city")){
dto.setOrgType("agency"); dto.setOrgType("agency");
} }
resultDTO.setList(baseDao.getHousePurposeCount(dto.getOrgId(),dto.getOrgType(),dto.getTimeStart(),dto.getTimeEnd()));
resultDTO.getList().forEach( List<HouseCountPictureListResultDTO> list = baseDao.getHousePurposeCount(dto.getOrgId(),dto.getOrgType(),dto.getTimeStart(),dto.getTimeEnd());
result->resultDTO.setTotal(resultDTO.getTotal()+result.getCount())
);
list.forEach(
result->{
resultDTO.setTotal(resultDTO.getTotal()+result.getCount());
type.put(result.getType(),result.getType());
}
);
HouseCountPictureListResultDTO houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
if (type.get("1") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("1");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("2") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("2");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("3") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("3");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("4") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("4");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("5") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("5");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("6") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("6");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("7") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("7");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}
resultDTO.setList(list);
return resultDTO; return resultDTO;
} }
@ -435,18 +478,48 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
HouseCountPictureResultDTO resultDTO = new HouseCountPictureResultDTO(); HouseCountPictureResultDTO resultDTO = new HouseCountPictureResultDTO();
Map<String,String> type = new HashMap<>();
resultDTO.setTotal(0); resultDTO.setTotal(0);
if (dto.getOrgType().equals("community") || dto.getOrgType().equals("street") ||dto.getOrgType().equals("district") ||dto.getOrgType().equals("city")){ if (dto.getOrgType().equals("community") || dto.getOrgType().equals("street") ||dto.getOrgType().equals("district") ||dto.getOrgType().equals("city")){
dto.setOrgType("agency"); dto.setOrgType("agency");
} }
resultDTO.setList(baseDao.getHouseStatusCount(dto.getOrgId(),dto.getOrgType(),dto.getTimeStart(),dto.getTimeEnd())); List<HouseCountPictureListResultDTO> list =baseDao.getHouseStatusCount(dto.getOrgId(),dto.getOrgType(),dto.getTimeStart(),dto.getTimeEnd());
resultDTO.getList().forEach( resultDTO.getList().forEach(
result->resultDTO.setTotal(resultDTO.getTotal()+result.getCount()) result->{
type.put(result.getType(),result.getType());
resultDTO.setTotal(resultDTO.getTotal()+result.getCount());
}
); );
HouseCountPictureListResultDTO houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
if (type.get("1") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("1");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("2") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("2");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("3") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("3");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}else if (type.get("0") == null){
houseCountPictureListResultDTO = new HouseCountPictureListResultDTO();
houseCountPictureListResultDTO.setType("0");
houseCountPictureListResultDTO.setCount(0);
list.add(houseCountPictureListResultDTO);
}
resultDTO.setList(list);
return resultDTO; return resultDTO;
} }

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, List<ResiPortrayalResultDTO> queryEducationDistribute(@Param("customerId") String customerId,
@Param("orgId") String orgId, @Param("orgId") String orgId,
@Param("orgType") String orgType); @Param("orgType") String orgType,
@Param("orgIdPath")String orgIdPath);
List<ResiPortrayalResultDTO> selectAgeAgeDistribute(@Param("customerId") String customerId, List<ResiPortrayalResultDTO> selectAgeAgeDistribute(@Param("customerId") String customerId,
@Param("orgId") String orgId, @Param("orgId") String orgId,
@Param("orgType") String orgType); @Param("orgType") String orgType,
@Param("orgIdPath")String orgIdPath);
/** /**
* @param customerId * @param customerId
@ -481,6 +483,7 @@ public interface IcResiUserDao extends BaseDao<IcResiUserEntity> {
List<ResiPortrayalDetailDTO> selectPortrayalResiList(@Param("customerId") String customerId, List<ResiPortrayalDetailDTO> selectPortrayalResiList(@Param("customerId") String customerId,
@Param("orgId") String orgId, @Param("orgId") String orgId,
@Param("orgType") String orgType, @Param("orgType") String orgType,
@Param("orgIdPath") String orgIdPath,
@Param("codeType")String codeType, @Param("codeType")String codeType,
@Param("code") String code); @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(); orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId();
orgType = OrgTypeEnum.AGENCY.getCode(); 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> resultList=getDefaultAgeDistribute();
List<ResiPortrayalResultDTO> list=baseDao.selectAgeAgeDistribute(customerId,orgId,orgType); List<ResiPortrayalResultDTO> list=baseDao.selectAgeAgeDistribute(customerId,orgId,orgType,orgIdPath);
if(CollectionUtils.isEmpty(list)){ if(CollectionUtils.isEmpty(list)){
return resultList; return resultList;
} }
@ -3986,8 +3990,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
if (!dictResult.success() || CollectionUtils.isEmpty(dictResult.getData())) { if (!dictResult.success() || CollectionUtils.isEmpty(dictResult.getData())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "学历字典获取失败", "学历字典获取失败"); 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)); Map<String,Integer> map = totalList.stream().collect(Collectors.toMap(ResiPortrayalResultDTO::getCode,ResiPortrayalResultDTO::getTotalResi));
List<ResiPortrayalResultDTO> resultDTOList = new ArrayList<>(); List<ResiPortrayalResultDTO> resultDTOList = new ArrayList<>();
dictResult.getData().forEach(dict -> { dictResult.getData().forEach(dict -> {
@ -4037,8 +4045,12 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi
orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId(); orgId = CustomerStaffRedis.getStaffInfo(customerId, staffId).getAgencyId();
orgType = OrgTypeEnum.AGENCY.getCode(); orgType = OrgTypeEnum.AGENCY.getCode();
} }
String orgIdPath=StrConstant.EPMETY_STR;
if(OrgTypeEnum.AGENCY.getCode().equals(orgType)){
orgIdPath=CustomerOrgRedis.getOrgIdPath(orgId,orgType);
}
PageHelper.startPage(pageNo, pageSize); 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)){ if(CollectionUtils.isNotEmpty(list)){
Set<String> houseIds=list.stream().map(m -> m.getHomeId()).collect(Collectors.toSet()); 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' r.DEL_FLAG = '0'
AND r.CUSTOMER_ID = #{customerId} AND r.CUSTOMER_ID = #{customerId}
<if test='orgType == "agency" '> <if test='orgType == "agency" '>
AND ( r.AGENCY_ID = #{orgId} OR r.PIDS LIKE concat('%',#{orgId},'%') ) and r.PIDS LIKE concat(#{orgIdPath},'%')
</if> </if>
<if test='orgType == "grid" '> <if test='orgType == "grid" '>
and r.GRID_ID = #{orgId} and r.GRID_ID = #{orgId}
@ -1647,7 +1647,7 @@
and u.BIRTHDAY is not null and u.BIRTHDAY is not null
and u.BIRTHDAY !='' and u.BIRTHDAY !=''
<if test='orgType == "agency" '> <if test='orgType == "agency" '>
AND ( u.AGENCY_ID = #{orgId} OR u.PIDS LIKE concat('%',#{orgId},'%') ) and u.PIDS LIKE concat(#{orgIdPath},'%')
</if> </if>
<if test='orgType == "grid" '> <if test='orgType == "grid" '>
and u.GRID_ID = #{orgId} and u.GRID_ID = #{orgId}
@ -1683,7 +1683,7 @@
AND u.CUSTOMER_ID = #{customerId} AND u.CUSTOMER_ID = #{customerId}
AND u.`STATUS` = '0' AND u.`STATUS` = '0'
<if test='orgType == "agency" '> <if test='orgType == "agency" '>
AND ( u.AGENCY_ID = #{orgId} OR u.PIDS LIKE concat('%',#{orgId},'%') ) and u.PIDS LIKE concat(#{orgIdPath},'%')
</if> </if>
<if test='orgType == "grid" '> <if test='orgType == "grid" '>
and u.GRID_ID = #{orgId} and u.GRID_ID = #{orgId}

Loading…
Cancel
Save