Browse Source

代码暂存 避免大量冲突

dev_shibei_match
jianjun 4 years ago
parent
commit
7b8c5c5b46
  1. 21
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/IdAndNameDTO.java
  2. 6
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonAggFeignClient.java
  3. 8
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallBackFactory.java
  4. 4
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallback.java
  5. 11
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java
  6. 16
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/CustomerStaffInfoCache.java
  7. 54
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/StaffOrgsCache.java
  8. 17
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java
  9. 82
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/StaffAgencyDTO.java
  10. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffAgencyDao.java
  11. 11
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffDepartmentDao.java
  12. 40
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java
  13. 21
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java
  14. 18
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java
  15. 17
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml
  16. 12
      epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffDepartmentDao.xml

21
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/IdAndNameDTO.java

@ -0,0 +1,21 @@
package com.epmet.commons.tools.dto.form;
import lombok.Data;
import java.io.Serializable;
/**
* desc:通用Id and Name 不要轻易修改
*
* @author: LiuJanJun
* @date: 2021/8/19 4:12 下午
* @version: 1.0
*/
@Data
public class IdAndNameDTO implements Serializable {
private static final long serialVersionUID = 4481647404402681862L;
private String id;
private String name;
}

6
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonUserFeignClient.java → epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/CommonAggFeignClient.java

@ -1,7 +1,7 @@
package com.epmet.commons.tools.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.feign.fallback.CommonUserFeignClientFallBackFactory;
import com.epmet.commons.tools.feign.fallback.CommonAggFeignClientFallBackFactory;
import com.epmet.commons.tools.redis.common.bean.CustomerStaffInfoCache;
import com.epmet.commons.tools.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.PostMapping;
* @Description
* @Author sun
*/
@FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory = CommonUserFeignClientFallBackFactory.class)
public interface CommonUserFeignClient {
@FeignClient(name = ServiceConstant.DATA_AGGREGATOR_SERVER, fallbackFactory = CommonAggFeignClientFallBackFactory.class)
public interface CommonAggFeignClient {
/**
* desc:根据工作人员Id 获取工作人员信息

8
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonUserFeignClientFallBackFactory.java → epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallBackFactory.java

@ -1,18 +1,18 @@
package com.epmet.commons.tools.feign.fallback;
import com.epmet.commons.tools.exception.ExceptionUtils;
import com.epmet.commons.tools.feign.CommonUserFeignClient;
import com.epmet.commons.tools.feign.CommonAggFeignClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class CommonUserFeignClientFallBackFactory implements FallbackFactory<CommonUserFeignClient> {
private CommonUserFeignClientFallback fallback = new CommonUserFeignClientFallback();
public class CommonAggFeignClientFallBackFactory implements FallbackFactory<CommonAggFeignClient> {
private CommonAggFeignClientFallback fallback = new CommonAggFeignClientFallback();
@Override
public CommonUserFeignClient create(Throwable cause) {
public CommonAggFeignClient create(Throwable cause) {
log.error(String.format("FeignClient调用发生异常,异常信息:%s", ExceptionUtils.getThrowableErrorStackTrace(cause)));
return fallback;
}

4
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonUserFeignClientFallback.java → epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/feign/fallback/CommonAggFeignClientFallback.java

@ -1,7 +1,7 @@
package com.epmet.commons.tools.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.feign.CommonUserFeignClient;
import com.epmet.commons.tools.feign.CommonAggFeignClient;
import com.epmet.commons.tools.redis.common.bean.CustomerStaffInfoCache;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
* @Date 2020/4/24 11:17
**/
@Component
public class CommonUserFeignClientFallback implements CommonUserFeignClient {
public class CommonAggFeignClientFallback implements CommonAggFeignClient {
@Override
public Result<CustomerStaffInfoCache> getStaffInfo(String staffId) {

11
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/CustomerStaffRedis.java

@ -20,12 +20,13 @@ package com.epmet.commons.tools.redis.common;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.feign.CommonUserFeignClient;
import com.epmet.commons.tools.feign.CommonAggFeignClient;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.redis.common.bean.CustomerStaffInfoCache;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@ -44,7 +45,9 @@ public class CustomerStaffRedis {
@Autowired
private RedisUtils redisUtils;
@Autowired
private CommonUserFeignClient commonUserFeignClient;
private RedissonClient redissonClient;
@Autowired
private CommonAggFeignClient commonAggFeignClient;
//@PostConstruct
public void init(){
@ -65,10 +68,10 @@ public class CustomerStaffRedis {
boolean empty = roleMap.isEmpty();
if (!empty){
CustomerStaffInfoCache result = ConvertUtils.mapToEntity(roleMap, CustomerStaffInfoCache.class);
return result;
//return result;
}
try {
Result<CustomerStaffInfoCache> staffResult = commonUserFeignClient.getStaffInfo(staffId);
Result<CustomerStaffInfoCache> staffResult = commonAggFeignClient.getStaffInfo(staffId);
if (staffResult == null || !staffResult.success()){
throw new RenException("获取工作人员信息失败");
}

16
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/CustomerStaffInfoCache.java

@ -1,8 +1,10 @@
package com.epmet.commons.tools.redis.common.bean;
import com.epmet.commons.tools.dto.form.IdAndNameDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
@ -55,8 +57,18 @@ public class CustomerStaffInfoCache implements Serializable {
private Map<String,String> roleMap;
/**
* 工作人员所在网格及部门列表
* 所属组织的上级组织
*/
private StaffOrgsCache orgInfo;
private IdAndNameDTO parentAgency;
/**
* 所属网格列表
*/
private List<IdAndNameDTO> gridList;
/**
* 所属部门
*/
private List<IdAndNameDTO> deptList;
}

54
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/common/bean/StaffOrgsCache.java

@ -1,54 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.commons.tools.redis.common.bean;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* desc: 工作人员所属的组织关系
* @date 2021/8/19 10:07 上午
*/
@Data
public class StaffOrgsCache implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 所属组织的上级组织
*/
private IdAndName parentAgency;
/**
* 所属网格列表
*/
private List<IdAndName> gridList;
/**
* 所属部门
*/
private List<IdAndName> deptList;
@Data
class IdAndName {
private String id;
private String name;
}
}

17
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/CustomerStaffResultDTO.java

@ -1,9 +1,10 @@
package com.epmet.dataaggre.dto.epmetuser.result;
import com.epmet.commons.tools.redis.common.bean.StaffOrgsCache;
import com.epmet.commons.tools.dto.form.IdAndNameDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
@ -56,8 +57,18 @@ public class CustomerStaffResultDTO implements Serializable {
private Map<String,String> roleMap;
/**
* 工作人员所在网格及部门列表
* 所属组织的上级组织
*/
private StaffOrgsCache orgInfo;
private IdAndNameDTO parentAgency;
/**
* 所属网格列表
*/
private List<IdAndNameDTO> gridList;
/**
* 所属部门
*/
private List<IdAndNameDTO> deptList;
}

82
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govorg/result/StaffAgencyDTO.java

@ -0,0 +1,82 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dataaggre.dto.govorg.result;
import lombok.Data;
import java.io.Serializable;
/**
* 机关单位信息表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20
*/
@Data
public class StaffAgencyDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* ID
*/
private String agencyId;
/**
* 组织名称
*/
private String agencyName;
/**
* 上级组织机构ID
*/
private String pid;
/**
* 所有上级组织机构ID(以英文:隔开)
*/
private String pids;
/**
* 所有上级名称,-连接
*/
private String allParentName;
private String parentAgencyName;
/**
* 机关级别社区级community
街道:street,
区县级: district,
市级: city
省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province
*/
private String level;
/**
* 地区编码
*/
private String areaCode;
/**
* 当前组织的上级行政地区编码add0204;举例平阴县对应的是济南市3701
*/
private String parentAreaCode;
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffAgencyDao.java

@ -19,11 +19,14 @@ package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govorg.CustomerAgencyDTO;
import com.epmet.dataaggre.dto.govorg.CustomerGridDTO;
import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO;
import com.epmet.dataaggre.entity.govorg.CustomerStaffAgencyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 人员-机关单位关系表
*
@ -44,4 +47,12 @@ public interface CustomerStaffAgencyDao extends BaseDao<CustomerStaffAgencyEntit
* @author sun
*/
CustomerAgencyDTO selectAgencyByStaffId(@Param("customerId") String customerId, @Param("staffId") String staffId);
/**
* desc:获取工作人员在的网格
* @param staffId
* @return
*/
List<CustomerGridDTO> getStaffGridList(@Param("staffId") String staffId);
}

11
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govorg/CustomerStaffDepartmentDao.java

@ -18,8 +18,12 @@
package com.epmet.dataaggre.dao.govorg;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dataaggre.dto.govorg.CustomerDepartmentDTO;
import com.epmet.dataaggre.entity.govorg.CustomerStaffDepartmentEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 部门人员关系表
@ -30,4 +34,11 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface CustomerStaffDepartmentDao extends BaseDao<CustomerStaffDepartmentEntity> {
/**
* desc:获取工作人员所在的部门列表
*
* @param staffId
* @return
*/
List<CustomerDepartmentDTO> getStaffDeptList(@Param("staffId") String staffId);
}

40
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmetuser/impl/EpmetUserServiceImpl.java

@ -3,17 +3,20 @@ package com.epmet.dataaggre.service.epmetuser.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.dynamic.datasource.annotation.DataSource;
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.DateUtils;
import com.epmet.constant.BadgeConstant;
import com.epmet.dataaggre.constant.DataSourceConstant;
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.StaffPatrolDetailDTO;
import com.epmet.dataaggre.dto.epmetuser.StaffPatrolRecordDTO;
import com.epmet.dataaggre.dto.epmetuser.form.*;
import com.epmet.dataaggre.dto.epmetuser.result.*;
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.result.GridStaffResultDTO;
import com.epmet.dataaggre.dto.govorg.result.StaffOrgNameResultDTO;
@ -66,6 +69,8 @@ public class EpmetUserServiceImpl implements EpmetUserService {
private GovProjectService govProjectService;
@Resource
private GovStaffRoleDao govStaffRoleDao;
@Autowired
private CustomerAgencyDao customerAgencyDao;
/**
* @Description 根据UserIds查询
@ -521,11 +526,36 @@ public class EpmetUserServiceImpl implements EpmetUserService {
CustomerStaffEntity staffEntity = customerStaffDao.selectOne(queryWrapper);
CustomerStaffResultDTO result = ConvertUtils.sourceToTarget(staffEntity, CustomerStaffResultDTO.class);
//1.查询当前人员所属组织及下级所有网格列表数据,供后续封装数据使用
/*List<CustomerGridDTO> list = govOrgService.getGridList(staffId);
if (list.size() < NumConstant.ONE) {
return resultList;
}*/
//2.查询工作人员所属组织信息
CustomerAgencyDTO agencyDTO = govOrgService.gridByAgencyId(null,staffId);
if (agencyDTO == null){
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;
}

21
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/GovOrgService.java

@ -2,8 +2,12 @@ package com.epmet.dataaggre.service.govorg;
import com.epmet.commons.tools.security.dto.TokenDto;
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.form.*;
import com.epmet.dataaggre.dto.govorg.form.NextAreaCodeFormDTO;
import com.epmet.dataaggre.dto.govorg.form.OrgStaffListFormDTO;
import com.epmet.dataaggre.dto.govorg.form.StaffDetailV2FormDTO;
import com.epmet.dataaggre.dto.govorg.form.SubOrgFormDTO;
import com.epmet.dataaggre.dto.govorg.result.*;
import com.epmet.dataaggre.dto.resigroup.result.OrgInfoCommonDTO;
@ -110,4 +114,19 @@ public interface GovOrgService {
*/
List<StaffOrgNameResultDTO> getStaffOrgName(List<String> staffIdList);
/**
* desc:工作人员所在网格
* @param staffId
* @return
*/
List<CustomerGridDTO> getStaffGridList(String staffId);
/**
* desc:工作人员所在部门
* @param staffId
* @return
*/
List<CustomerDepartmentDTO> getStaffDeptList(String staffId);
}

18
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govorg/impl/GovOrgServiceImpl.java

@ -7,12 +7,10 @@ import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.RenException;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.dataaggre.constant.DataSourceConstant;
import com.epmet.dataaggre.dao.govorg.CustomerAgencyDao;
import com.epmet.dataaggre.dao.govorg.CustomerGridDao;
import com.epmet.dataaggre.dao.govorg.CustomerStaffAgencyDao;
import com.epmet.dataaggre.dao.govorg.CustomerStaffGridDao;
import com.epmet.dataaggre.dao.govorg.*;
import com.epmet.dataaggre.dto.epmetuser.result.StaffRoleListResultDTO;
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.CustomerStaffAgencyDTO;
import com.epmet.dataaggre.dto.govorg.form.*;
@ -48,6 +46,8 @@ public class GovOrgServiceImpl implements GovOrgService {
@Autowired
private CustomerStaffAgencyDao customerStaffAgencyDao;
@Autowired
private CustomerStaffDepartmentDao customerStaffDepartmentDao;
@Autowired
private CustomerGridDao customerGridDao;
@Autowired
private AreaCodeService areaCodeService;
@ -415,4 +415,14 @@ public class GovOrgServiceImpl implements GovOrgService {
return resultList;
}
@Override
public List<CustomerGridDTO> getStaffGridList(String staffId) {
return customerStaffAgencyDao.getStaffGridList(staffId);
}
@Override
public List<CustomerDepartmentDTO> getStaffDeptList(String staffId) {
return customerStaffDepartmentDao.getStaffDeptList(staffId);
}
}

17
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffAgencyDao.xml

@ -33,8 +33,23 @@
WHERE
csa.del_flag = '0'
AND ca.del_flag = '0'
AND csa.customer_id = #{customerId}
<if test="customerId != null and customerId != ''">
AND csa.customer_id = #{customerId}
</if>
AND csa.user_id = #{staffId}
</select>
<select id="getStaffGridList" resultType="com.epmet.dataaggre.dto.govorg.CustomerGridDTO">
SELECT
g.ID,
g.GRID_NAME
FROM
customer_staff_grid sg
INNER JOIN customer_grid g ON ( sg.GRID_ID = g.ID )
WHERE
sg.DEL_FLAG = '0'
AND g.DEL_FLAG = '0'
AND sg.USER_ID = #{staffId}
</select>
</mapper>

12
epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govorg/CustomerStaffDepartmentDao.xml

@ -2,4 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dataaggre.dao.govorg.CustomerStaffDepartmentDao">
<select id="getStaffDeptList" resultType="com.epmet.dataaggre.dto.govorg.CustomerDepartmentDTO">
SELECT
g.ID,
g.DEPARTMENT_NAME
FROM
customer_staff_department sg
INNER JOIN customer_department g ON ( sg.DEPARTMENT_ID = g.ID )
WHERE
sg.DEL_FLAG = '0'
AND g.DEL_FLAG = '0'
AND sg.USER_ID = #{staffId}
</select>
</mapper>
Loading…
Cancel
Save