This commit is contained in:
parent
ec7bd987b2
commit
b1d506cf15
|
|
@ -21,5 +21,6 @@ public class TreeData {
|
||||||
private String title;
|
private String title;
|
||||||
private String key;
|
private String key;
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
private Integer schemeId;
|
||||||
private ArrayList<TreeData> children;
|
private ArrayList<TreeData> children;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,6 @@ public interface ManagerDetachMapper {
|
||||||
ManagerDetachPO getDetachById(@Param("id") Integer id);
|
ManagerDetachPO getDetachById(@Param("id") Integer id);
|
||||||
|
|
||||||
List<ManagerDetachPO> getDetachListById(@Param("ecManager") Integer ecManager);
|
List<ManagerDetachPO> getDetachListById(@Param("ecManager") Integer ecManager);
|
||||||
|
|
||||||
|
ManagerDetachPO selectManagerDetachByUid(@Param("uid") Integer uId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -217,4 +217,13 @@
|
||||||
WHERE delete_type = 0
|
WHERE delete_type = 0
|
||||||
and ec_manager = #{ecManager}
|
and ec_manager = #{ecManager}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectManagerDetachByUid" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="baseColumns"/>
|
||||||
|
from jcl_org_detach t
|
||||||
|
where delete_type = 0
|
||||||
|
and ec_manager = #{uid}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -98,4 +98,7 @@ public interface SchemeMapper {
|
||||||
ArrayList<TreeData> getTreeData();
|
ArrayList<TreeData> getTreeData();
|
||||||
|
|
||||||
List<SchemePO> getSchemesByIds(@Param("ids")Collection<Long> ids);
|
List<SchemePO> getSchemesByIds(@Param("ids")Collection<Long> ids);
|
||||||
|
|
||||||
|
|
||||||
|
List<Integer> selectBySubcompanyId(@Param("subCompanyIds") Collection<Integer> subCompanyIds);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,4 +247,14 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="selectBySubcompanyId" resultType="java.lang.Integer">
|
||||||
|
select id
|
||||||
|
from jcl_org_scheme
|
||||||
|
where delete_type = 0
|
||||||
|
AND subcompanyid IN
|
||||||
|
<foreach collection="subCompanyIds" open="(" item="subCompanyId" separator="," close=")">
|
||||||
|
#{subCompanyId}
|
||||||
|
</foreach>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -3,6 +3,7 @@ package com.engine.organization.service;
|
||||||
import com.engine.organization.entity.detach.param.ManagerDetachParam;
|
import com.engine.organization.entity.detach.param.ManagerDetachParam;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -53,4 +54,14 @@ public interface ManagerDetachService {
|
||||||
* @param isDetach
|
* @param isDetach
|
||||||
*/
|
*/
|
||||||
String doDetach(String isDetach);
|
String doDetach(String isDetach);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 获取可管理的分部集合
|
||||||
|
* @Author: liang.cheng
|
||||||
|
* @Date: 2023/8/17 4:47 PM
|
||||||
|
* @param: []
|
||||||
|
* @return: java.util.List<java.lang.Integer>
|
||||||
|
*/
|
||||||
|
List<Integer> selectManagerDetachByUid();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,10 +46,6 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
||||||
return MapperProxyFactory.getProxy(ManagerDetachMapper.class);
|
return MapperProxyFactory.getProxy(ManagerDetachMapper.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResourceMapper getResourceMapper() {
|
|
||||||
return MapperProxyFactory.getProxy(ResourceMapper.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public EmployeeMapper getEmployeeMapper() {
|
public EmployeeMapper getEmployeeMapper() {
|
||||||
return MapperProxyFactory.getProxy(EmployeeMapper.class);
|
return MapperProxyFactory.getProxy(EmployeeMapper.class);
|
||||||
}
|
}
|
||||||
|
|
@ -155,6 +151,15 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
||||||
return new BaseBean().getPropValue("hrmOrganization", "detach");
|
return new BaseBean().getPropValue("hrmOrganization", "detach");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Integer> selectManagerDetachByUid() {
|
||||||
|
ManagerDetachPO managerDetach = getMangeDetachMapper().selectManagerDetachByUid(user.getUID());
|
||||||
|
List<Integer> subCompanyIds = Arrays.stream(managerDetach.getEcRolelevel().split(","))
|
||||||
|
.map(Integer::parseInt)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return subCompanyIds;
|
||||||
|
}
|
||||||
|
|
||||||
private String buildSqlWhere(Map<String, Object> params) {
|
private String buildSqlWhere(Map<String, Object> params) {
|
||||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||||
String sqlWhere = " where delete_type = 0";
|
String sqlWhere = " where delete_type = 0";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue