add interface
This commit is contained in:
@@ -110,8 +110,6 @@
|
||||
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.aliyun:openapiutil:0.1.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.65" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.65" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:3.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.6.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.6.RELEASE" level="project" />
|
||||
@@ -131,6 +129,11 @@
|
||||
<orderEntry type="library" name="Maven: org.json:json:20180130" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.librepdf:openpdf:1.3.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.icepdf.os:icepdf-core:6.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.54" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-ext-jdk15on:1.54" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.54" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.media:jai-core:1.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.20" level="project" />
|
||||
|
||||
@@ -64,4 +64,23 @@ public class EnterpriseUserDAO {
|
||||
public List<EnterpriseUserDO> searchUserByRegionIdsAndKeyword(List<String> regionIds, String keyword, boolean isLeader){
|
||||
return enterpriseUserMapper.searchUserByRegionIdsAndKeyword(regionIds, keyword, isLeader);
|
||||
}
|
||||
|
||||
public boolean isExistDeptUser(String regionId){
|
||||
if(StringUtils.isBlank(regionId)){
|
||||
return false;
|
||||
}
|
||||
return enterpriseUserMapper.getUserCountByRegionId(regionId) > CommonConstants.ZERO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门负责人
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
public List<EnterpriseUserDO> getUserListByDeptLeader(String regionId){
|
||||
if(StringUtils.isBlank(regionId)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return enterpriseUserMapper.getUserListByDeptLeader(regionId);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.mapper.HyIntendDevZoneInfoMapper;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
@@ -48,4 +50,16 @@ public class HyIntendDevZoneInfoDAO {
|
||||
return hyIntendDevZoneInfoMapper.getHyIntendDevZoneInfoList(type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据组织架构获取配置信息
|
||||
* @param regionIds
|
||||
* @return
|
||||
*/
|
||||
public List<HyIntendDevZoneInfoDO> getZoneInfoByRegionIds(List<String> regionIds){
|
||||
if(CollectionUtils.isEmpty(regionIds)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return hyIntendDevZoneInfoMapper.getZoneInfoByRegionIds(regionIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -96,4 +96,16 @@ public class RegionDAO {
|
||||
return regionMapper.deleteRegionByRegionId(regionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有的子节点
|
||||
* @param leadDeptIds
|
||||
*/
|
||||
public List<String> getSubRegionIds(List<String> leadDeptIds) {
|
||||
if(CollectionUtils.isEmpty(leadDeptIds)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<RegionDO> regionList = getRegionByRegionIds(leadDeptIds);
|
||||
List<String> regionPathList = regionList.stream().map(RegionDO::getRegionPath).collect(Collectors.toList());
|
||||
return regionMapper.getSubRegionIds(regionPathList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,4 +84,16 @@ public class UserRegionMappingDAO {
|
||||
return userRegionMappingMapper.getRegionIdsByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
* @param regionIds
|
||||
* @return
|
||||
*/
|
||||
public List<String> getUserListByRegionIds(List<String> regionIds){
|
||||
if(CollectionUtils.isEmpty(regionIds)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return userRegionMappingMapper.getUserListByRegionIds(regionIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,4 +61,20 @@ public interface EnterpriseUserMapper {
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseUserDO> searchUserByRegionIdsAndKeyword(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword, @Param("isLeader") boolean isLeader);
|
||||
|
||||
/**
|
||||
* 获取部门用户数
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
Integer getUserCountByRegionId(@Param("regionId") String regionId);
|
||||
|
||||
|
||||
/**
|
||||
* 获取部门负责人用户列表
|
||||
* @param regionId
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseUserDO> getUserListByDeptLeader(String regionId);
|
||||
|
||||
}
|
||||
@@ -39,4 +39,11 @@ public interface HyIntendDevZoneInfoMapper {
|
||||
* @return
|
||||
*/
|
||||
List<HyIntendDevZoneInfoDO> getHyIntendDevZoneInfoList(String type);
|
||||
|
||||
/**
|
||||
* 根据组织架构获取配置信息
|
||||
* @param regionIds
|
||||
* @return
|
||||
*/
|
||||
List<HyIntendDevZoneInfoDO> getZoneInfoByRegionIds(@Param("regionIds") List<String> regionIds);
|
||||
}
|
||||
@@ -71,4 +71,11 @@ public interface RegionMapper {
|
||||
* @return
|
||||
*/
|
||||
Integer deleteRegionByRegionId(@Param("regionId") String regionId);
|
||||
|
||||
/**
|
||||
* 获取子节点
|
||||
* @param regionPathList
|
||||
* @return
|
||||
*/
|
||||
List<String> getSubRegionIds(@Param("regionPathList") List<String> regionPathList);
|
||||
}
|
||||
@@ -68,4 +68,11 @@ public interface UserRegionMappingMapper {
|
||||
* @return
|
||||
*/
|
||||
List<String> getRegionIdsByUserId(@Param("userId") String userId);
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
* @param regionIds
|
||||
* @return
|
||||
*/
|
||||
List<String> getUserListByRegionIds(@Param("regionIds") List<String> regionIds);
|
||||
}
|
||||
@@ -280,4 +280,12 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getUserCountByRegionId" resultType="integer">
|
||||
select count(1) from enterprise_user where deleted = 0 and user_region_ids like concat("%", #{regionId}, "%")
|
||||
</select>
|
||||
|
||||
<select id="getUserListByDeptLeader" resultMap="BaseResultMap">
|
||||
select user_id, leader_dept_ids from enterprise_user where leader_dept_ids like concat("%", #{regionId}, "%") and deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -128,4 +128,13 @@
|
||||
where type = #{type}
|
||||
and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="getZoneInfoByRegionIds" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
hy_intend_dev_zone_info
|
||||
where
|
||||
deleted = 0 and <foreach collection="regionIds" separator="or" open="(" close=")" item="regionId">associated_region_id like concat("%", #{regionId}, "%")</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -204,4 +204,8 @@
|
||||
<update id="deleteRegionByRegionId">
|
||||
update region set deleted = 1 where region_id = #{regionId}
|
||||
</update>
|
||||
|
||||
<select id="getSubRegionIds" resultType="string">
|
||||
select region_id from region where deleted = 0 and <foreach collection="regionPathList" item="regionPath" open="(" close=")" separator="or"> region_path like (#{regionPath, '%'})</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -131,4 +131,8 @@
|
||||
select region_id from user_region_mapping where user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="getUserListByRegionIds" resultType="string">
|
||||
select user_id from user_region_mapping where region_id in <foreach collection="regionIds" item="regionId" open="(" close=")" separator=",">#{regionId}</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user