|
@ -3,17 +3,20 @@ package com.epmet.dataaggre.service.epmetuser.impl; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
|
|
import com.epmet.commons.tools.dto.form.IdAndNameDTO; |
|
|
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.DateUtils; |
|
|
import com.epmet.constant.BadgeConstant; |
|
|
import com.epmet.constant.BadgeConstant; |
|
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
|
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
|
|
import com.epmet.dataaggre.dao.epmetuser.*; |
|
|
import com.epmet.dataaggre.dao.epmetuser.*; |
|
|
|
|
|
import com.epmet.dataaggre.dao.govorg.CustomerAgencyDao; |
|
|
import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO; |
|
|
import com.epmet.dataaggre.dto.epmetuser.CustomerStaffDTO; |
|
|
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolDetailDTO; |
|
|
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolDetailDTO; |
|
|
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO; |
|
|
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO; |
|
|
import com.epmet.dataaggre.dto.epmetuser.form.*; |
|
|
import com.epmet.dataaggre.dto.epmetuser.form.*; |
|
|
import com.epmet.dataaggre.dto.epmetuser.result.*; |
|
|
import com.epmet.dataaggre.dto.epmetuser.result.*; |
|
|
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO; |
|
|
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO; |
|
|
|
|
|
import com.epmet.dataaggre.dto.govorg.CustomerDepartmentDTO; |
|
|
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; |
|
|
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO; |
|
|
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO; |
|
|
import com.epmet.dataaggre.dto.govorg.result.GridStaffResultDTO; |
|
|
import com.epmet.dataaggre.dto.govorg.result.StaffOrgNameResultDTO; |
|
|
import com.epmet.dataaggre.dto.govorg.result.StaffOrgNameResultDTO; |
|
@ -66,6 +69,8 @@ public class EpmetUserServiceImpl implements EpmetUserService { |
|
|
private GovProjectService govProjectService; |
|
|
private GovProjectService govProjectService; |
|
|
@Resource |
|
|
@Resource |
|
|
private GovStaffRoleDao govStaffRoleDao; |
|
|
private GovStaffRoleDao govStaffRoleDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private CustomerAgencyDao customerAgencyDao; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 根据UserIds查询 |
|
|
* @Description 根据UserIds查询 |
|
@ -521,11 +526,36 @@ public class EpmetUserServiceImpl implements EpmetUserService { |
|
|
CustomerStaffEntity staffEntity = customerStaffDao.selectOne(queryWrapper); |
|
|
CustomerStaffEntity staffEntity = customerStaffDao.selectOne(queryWrapper); |
|
|
CustomerStaffResultDTO result = ConvertUtils.sourceToTarget(staffEntity, CustomerStaffResultDTO.class); |
|
|
CustomerStaffResultDTO result = ConvertUtils.sourceToTarget(staffEntity, CustomerStaffResultDTO.class); |
|
|
|
|
|
|
|
|
//1.查询当前人员所属组织及下级所有网格列表数据,供后续封装数据使用
|
|
|
//2.查询工作人员所属组织信息
|
|
|
/*List<CustomerGridDTO> list = govOrgService.getGridList(staffId); |
|
|
CustomerAgencyDTO agencyDTO = govOrgService.gridByAgencyId(null,staffId); |
|
|
if (list.size() < NumConstant.ONE) { |
|
|
if (agencyDTO == null){ |
|
|
return resultList; |
|
|
log.error("getStaffInfo have any agency staffId:{}",staffId); |
|
|
}*/ |
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
result.setAgencyName(agencyDTO.getOrganizationName()); |
|
|
|
|
|
|
|
|
|
|
|
//1.查询当前人员所在的网格列表
|
|
|
|
|
|
List<CustomerGridDTO> list = govOrgService.getStaffGridList(staffId); |
|
|
|
|
|
List<IdAndNameDTO> idAndNameList = new ArrayList<>(); |
|
|
|
|
|
for (CustomerGridDTO customerGridDTO : list) { |
|
|
|
|
|
IdAndNameDTO grid = new IdAndNameDTO(); |
|
|
|
|
|
grid.setId(customerGridDTO.getId()); |
|
|
|
|
|
grid.setName(customerGridDTO.getGridName()); |
|
|
|
|
|
idAndNameList.add(grid); |
|
|
|
|
|
} |
|
|
|
|
|
result.setGridList(idAndNameList); |
|
|
|
|
|
|
|
|
|
|
|
List<CustomerDepartmentDTO> deptList = govOrgService.getStaffDeptList(staffId); |
|
|
|
|
|
idAndNameList = new ArrayList<>(); |
|
|
|
|
|
for (CustomerDepartmentDTO org : deptList) { |
|
|
|
|
|
IdAndNameDTO grid = new IdAndNameDTO(); |
|
|
|
|
|
grid.setId(org.getId()); |
|
|
|
|
|
grid.setName(org.getDepartmentName()); |
|
|
|
|
|
idAndNameList.add(grid); |
|
|
|
|
|
} |
|
|
|
|
|
result.setDeptList(idAndNameList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|