独立项目分支。由dev分支回退、BUG修复
parent
47b8f651a9
commit
5715a02a47
@ -1,12 +0,0 @@
|
||||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/06/21
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/bs/hrmorganization/hrmresource")
|
||||
public class HrmResourceController extends com.engine.organization.web.HrmResourceController{
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Path("/bs/hrmorganization/detach")
|
||||
public class ManagerDetachController extends com.engine.organization.web.ManagerDetachController {
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.api.organization.web;
|
||||
|
||||
import javax.ws.rs.Path;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/10/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Path("/bs/hrmorganization/personnelcard")
|
||||
public class PersonnelCardController extends com.engine.organization.web.PersonnelCardController {
|
||||
}
|
@ -1,151 +0,0 @@
|
||||
package com.engine.organization.entity.hrmresource.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/06/21
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class HrmResourcePO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private String workCode;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String lastName;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 账号类型
|
||||
*/
|
||||
private Integer accountType;
|
||||
|
||||
/**
|
||||
* 主账号
|
||||
*/
|
||||
private Long belongTo;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
private Long departmentId;
|
||||
|
||||
/**
|
||||
* 分部
|
||||
*/
|
||||
private Long companyId;
|
||||
|
||||
/**
|
||||
* 职务
|
||||
*/
|
||||
private Long jobActivity;
|
||||
|
||||
/**
|
||||
* 岗位
|
||||
*/
|
||||
private Long jobTitle;
|
||||
|
||||
/**
|
||||
* 职等
|
||||
*/
|
||||
private String jobLevel;
|
||||
|
||||
/**
|
||||
* 职务类别
|
||||
*/
|
||||
private Long jobGroupId;
|
||||
|
||||
/**
|
||||
* 职责描述
|
||||
*/
|
||||
private String jobActivityDesc;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 照片
|
||||
*/
|
||||
private String resourceImageId;
|
||||
|
||||
/**
|
||||
* 办公地点
|
||||
*/
|
||||
private Integer locationId;
|
||||
|
||||
/**
|
||||
* 移动电话
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 办公室电话
|
||||
*/
|
||||
private String telephone;
|
||||
|
||||
/**
|
||||
* 电子邮件
|
||||
*/
|
||||
private String email;
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 入职日期
|
||||
*/
|
||||
private String companyStartDate;
|
||||
|
||||
/**
|
||||
* 参加工作日期
|
||||
*/
|
||||
private String workStartDate;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Integer showOrder;
|
||||
|
||||
private Long ecDepartment;
|
||||
|
||||
private Long ecCompany;
|
||||
|
||||
private String uuid;
|
||||
|
||||
private String jobGrade;
|
||||
|
||||
private String schemeId;
|
||||
|
||||
private String sequenceId;
|
||||
|
||||
private String baseFieldsValue;
|
||||
|
||||
private String baseFields;
|
||||
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
package com.engine.organization.mapper.personnelcard;
|
||||
|
||||
import com.engine.organization.entity.detach.po.ManagerDetachPO;
|
||||
import com.engine.organization.entity.personnelcard.po.CardAccessPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/24
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface CardAccessMapper {
|
||||
|
||||
int insertIgnoreNull(CardAccessPO cardAccessPO);
|
||||
|
||||
int updateCardAccess(CardAccessPO cardAccessPO);
|
||||
|
||||
int deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
ManagerDetachPO selectById(@Param("id") Integer id);
|
||||
}
|
@ -1,225 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.personnelcard.CardAccessMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.personnelcard.po.CardAccessPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="type_id" property="typeId"/>
|
||||
<result column="type_name" property="typeName"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="all_people" property="allPeople"/>
|
||||
<result column="superior" property="superior"/>
|
||||
<result column="all_superior" property="allSuperior"/>
|
||||
<result column="custom" property="custom"/>
|
||||
<result column="creator" property="creator"/>
|
||||
<result column="delete_type" property="deleteType"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t.id
|
||||
, t.type_id
|
||||
, t.type_name
|
||||
, t.status
|
||||
, t.all_people
|
||||
, t.superior
|
||||
, t.all_superior
|
||||
, t.custom
|
||||
, t.creator
|
||||
, t.delete_type
|
||||
, t.create_time
|
||||
, t.update_time
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_cardaccess
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="typeId != null ">
|
||||
type_id,
|
||||
</if>
|
||||
<if test="typeName != null ">
|
||||
type_name,
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
status,
|
||||
</if>
|
||||
<if test="allPeople != null ">
|
||||
all_people,
|
||||
</if>
|
||||
<if test="superior != null ">
|
||||
superior,
|
||||
</if>
|
||||
<if test="allSuperior != null ">
|
||||
all_superior,
|
||||
</if>
|
||||
<if test="custom != null">
|
||||
custom,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="typeId != null ">
|
||||
#{typeId},
|
||||
</if>
|
||||
<if test="typeName != null ">
|
||||
#{typeName},
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
#{status},
|
||||
</if>
|
||||
<if test="allPeople != null ">
|
||||
#{allPeople},
|
||||
</if>
|
||||
<if test="superior != null ">
|
||||
#{superior},
|
||||
</if>
|
||||
<if test="allSuperior != null ">
|
||||
#{allSuperior},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="custom != null">
|
||||
#{custom},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO" databaseId="oracle">
|
||||
<selectKey keyProperty="id" resultType="long" order="AFTER">
|
||||
select JCL_ORG_CARDACCESS_ID.currval from dual
|
||||
</selectKey>
|
||||
INSERT INTO jcl_org_cardaccess
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="typeId != null ">
|
||||
type_id,
|
||||
</if>
|
||||
<if test="typeName != null ">
|
||||
type_name,
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
status,
|
||||
</if>
|
||||
<if test="allPeople != null ">
|
||||
all_people,
|
||||
</if>
|
||||
<if test="superior != null ">
|
||||
superior,
|
||||
</if>
|
||||
<if test="allSuperior != null ">
|
||||
all_superior,
|
||||
</if>
|
||||
<if test="custom != null">
|
||||
custom,
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
creator,
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
delete_type,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="typeId != null ">
|
||||
#{typeId},
|
||||
</if>
|
||||
<if test="typeName != null ">
|
||||
#{typeName},
|
||||
</if>
|
||||
<if test="status != null ">
|
||||
#{status},
|
||||
</if>
|
||||
<if test="allPeople != null ">
|
||||
#{allPeople},
|
||||
</if>
|
||||
<if test="superior != null ">
|
||||
#{superior},
|
||||
</if>
|
||||
<if test="allSuperior != null ">
|
||||
#{allSuperior},
|
||||
</if>
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="custom != null">
|
||||
#{custom},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCardAccess" parameterType="com.engine.organization.entity.personnelcard.po.CardAccessPO">
|
||||
update jcl_org_cardaccess
|
||||
<set>
|
||||
type_id=#{typeId},
|
||||
type_name=#{typeName},
|
||||
status=#{status},
|
||||
all_people=#{allPeople},
|
||||
all_superior=#{allSuperior},
|
||||
custom=#{custom},
|
||||
update_time=#{updateTime},
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
||||
|
||||
<update id="deleteByIds">
|
||||
UPDATE jcl_org_cardaccess
|
||||
SET delete_type = 1
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_cardaccess t
|
||||
WHERE delete_type = 0
|
||||
AND id = #{id}
|
||||
</select>
|
||||
</mapper>
|
@ -1,28 +0,0 @@
|
||||
package com.engine.organization.mapper.personnelcard;
|
||||
|
||||
import com.engine.organization.entity.personnelcard.ResourceBaseTab;
|
||||
import com.engine.organization.entity.personnelcard.User;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/10/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface PersonnelCardMapper {
|
||||
/**
|
||||
* 获取人员卡片User对象
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
User getUserById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取自定义显示栏目
|
||||
* @return
|
||||
*/
|
||||
List<ResourceBaseTab> getResourceBaseTabList();
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.personnelcard.PersonnelCardMapper">
|
||||
<resultMap id="UserMap" type="com.engine.organization.entity.personnelcard.User">
|
||||
<result column="id" property="id"/>
|
||||
<result column="resource_image_id" property="image"/>
|
||||
<result column="last_name" property="name"/>
|
||||
<result column="sex" property="sex"/>
|
||||
<result column="email" property="email"/>
|
||||
<result column="mobile" property="phone"/>
|
||||
<result column="belong_to" property="belongTo"/>
|
||||
<result column="status" property="status"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="BaseTabMap" type="com.engine.organization.entity.personnelcard.ResourceBaseTab">
|
||||
<result column="id" property="id"/>
|
||||
<result column="groupname" property="groupName"/>
|
||||
<result column="grouplabel" property="groupLabel"/>
|
||||
<result column="dsporder" property="dspOrder"/>
|
||||
<result column="isopen" property="isOpen"/>
|
||||
<result column="ismand" property="isMand"/>
|
||||
<result column="isused" property="isUsed"/>
|
||||
<result column="issystem" property="isSystem"/>
|
||||
<result column="linkurl" property="linkUrl"/>
|
||||
<result column="tabnum" property="tabNum"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="getUserById" resultMap="UserMap">
|
||||
select id,
|
||||
resource_image_id,
|
||||
last_name,
|
||||
sex,
|
||||
email,
|
||||
mobile,
|
||||
belong_to,
|
||||
status
|
||||
from jcl_org_hrmresource
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="getResourceBaseTabList" resultMap="BaseTabMap">
|
||||
select *
|
||||
from HrmResourceBaseTab
|
||||
where isopen = 1
|
||||
order by dsporder
|
||||
</select>
|
||||
</mapper>
|
@ -1,29 +0,0 @@
|
||||
package com.engine.organization.mapper.resource;
|
||||
|
||||
|
||||
import com.engine.organization.entity.hrmresource.po.HrmResourcePO;
|
||||
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/6/28
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface ResourceMapper {
|
||||
|
||||
List<HrmResourceVO> listAll(@Param("ids")List<Long> ids);
|
||||
|
||||
List<HrmResourceVO> listDetachAll(@Param("ids") List<Long> ids, @Param("companyIds") List<Long> companyIds);
|
||||
|
||||
List<HrmResourcePO> getResourceListByJobId(@Param("jobId") Long jobId);
|
||||
|
||||
int updateResourceJob(@Param("originalJobId") Long originalJobId, @Param("targetJobId") Long targetJobId, @Param("parentComp") Long parentComp, @Param("parentDept") Long parentDept, @Param("ecCompany") Long ecCompany, @Param("ecDepartment") Long ecDepartment);
|
||||
|
||||
HrmResourcePO getResourceById(@Param("id") String id);
|
||||
|
||||
List<HrmResourcePO> listByNo(@Param("workCode") String workCode);
|
||||
}
|
@ -1,147 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.organization.mapper.resource.ResourceMapper">
|
||||
<resultMap id="HrmResourceMap" type="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="last_name" property="lastName"/>
|
||||
<result column="sex" property="sex"/>
|
||||
<result column="account_type" property="accountType"/>
|
||||
<result column="belong_to" property="belongTo"/>
|
||||
<result column="company_id" property="companyId"/>
|
||||
<result column="department_id" property="departmentId"/>
|
||||
<result column="job_activity" property="jobActivity"/>
|
||||
<result column="job_title" property="jobTitle"/>
|
||||
<result column="job_level" property="jobLevel"/>
|
||||
<result column="job_group_id" property="jobGroupId"/>
|
||||
<result column="job_activity_desc" property="jobActivityDesc"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="resource_image_id" property="resourceImageId"/>
|
||||
<result column="location_id" property="locationId"/>
|
||||
<result column="mobile" property="mobile"/>
|
||||
<result column="telephone" property="telephone"/>
|
||||
<result column="email" property="email"/>
|
||||
<result column="company_start_date" property="companyStartDate"/>
|
||||
<result column="work_start_date" property="workStartDate"/>
|
||||
<result column="show_order" property="showOrder"/>
|
||||
<result column="ec_department" property="ecDepartment"/>
|
||||
<result column="ec_company" property="ecCompany"/>
|
||||
<result column="uuid" property="uuid"/>
|
||||
<result column="job_grade" property="jobGrade"/>
|
||||
<result column="scheme_id" property="schemeId"/>
|
||||
<result column="sequence_id" property="sequenceId"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 表字段 -->
|
||||
<sql id="baseColumns">
|
||||
t.id,t.work_code,t.last_name,t.sex,t.status,t.account_type,
|
||||
t.belong_to,t.ec_company,t.job_title,t.ec_department,t.
|
||||
scheme_id,t.sequence_id,t.job_grade,t.job_level,t.job_group_id,
|
||||
t.job_activity,t.location_id,t.show_order,t.company_start_date,
|
||||
t.work_start_date,t.job_activity_desc,t.resource_image_id,t.mobile,
|
||||
t.telephone,t.email,t.uuid
|
||||
</sql>
|
||||
<update id="updateResourceJob">
|
||||
update jcl_org_hrmresource
|
||||
<set>
|
||||
job_title = #{targetJobId},
|
||||
company_id = #{parentComp},
|
||||
department_id = #{parentDept},
|
||||
ec_company = #{ecCompany},
|
||||
ec_department = #{ecDepartment},
|
||||
</set>
|
||||
where delete_type = 0 and job_title =#{originalJobId}
|
||||
</update>
|
||||
|
||||
<select id="listAll" resultType="com.engine.organization.entity.hrmresource.vo.HrmResourceVO">
|
||||
SELECT t.last_name as lastName,d.dept_name as departmentName,
|
||||
c.comp_name as companyName,t.mobile,t.telephone,t1.last_name as managerName
|
||||
from jcl_org_hrmresource t
|
||||
left join JCL_ORG_DEPT d on t.department_id = d.id
|
||||
left join jcl_org_comp c on t.company_id = c.id
|
||||
left join jcl_org_hrmresource t1 on t.manager_id = t1.id
|
||||
where 1 = 1
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND t.id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!--<include refid="likeSql"/>-->
|
||||
<!--<if test="param.departmentId != null and param.departmentId != ''">-->
|
||||
<!--and t.department_id = #{param.departmentId}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="param.companyId != null and param.companyId != ''">-->
|
||||
<!--and t.company_id = #{param.companyId}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="param.mobile != null and param.mobile != ''">-->
|
||||
<!--and t.mobile = #{param.mobile}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="param.telephone != null and param.telephone != ''">-->
|
||||
<!--and t.telephone = #{param.telephone}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="param.managerId != null and param.managerId != ''">-->
|
||||
<!--and t.manager_id = #{param.managerId}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="param.mobileCall != null and param.mobileCall != ''">-->
|
||||
<!--and t.mobile_call = #{param.mobileCall}-->
|
||||
<!--</if>-->
|
||||
<!--<if test="param.jobTitle != null and param.jobTitle != ''">-->
|
||||
<!--and t.job_title = #{param.jobTitle}-->
|
||||
<!--</if>-->
|
||||
order by t.id asc;
|
||||
</select>
|
||||
<select id="getResourceListByJobId"
|
||||
resultMap="HrmResourceMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_hrmresource t where job_title = #{jobId}
|
||||
</select>
|
||||
<select id="getResourceById" resultType="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_hrmresource t where delete_type = 0 and id = #{id}
|
||||
</select>
|
||||
<select id="listByNo" resultMap="HrmResourceMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_hrmresource t where delete_type = 0 and work_code = #{workCode}
|
||||
</select>
|
||||
<select id="listDetachAll" resultType="com.engine.organization.entity.hrmresource.vo.HrmResourceVO">
|
||||
SELECT t.last_name as lastName,d.dept_name as departmentName,
|
||||
c.comp_name as companyName,t.mobile,t.telephone,t1.last_name as managerName
|
||||
from jcl_org_hrmresource t
|
||||
left join JCL_ORG_DEPT d on t.department_id = d.id
|
||||
left join jcl_org_comp c on t.company_id = c.id
|
||||
left join jcl_org_hrmresource t1 on t.manager_id = t1.id
|
||||
where 1 = 1
|
||||
<if test="ids != null and ids.size > 0">
|
||||
AND t.id IN
|
||||
<foreach collection="ids" open="(" item="id" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
AND c.id IN
|
||||
<foreach collection="companyIds" open="(" item="companyId" separator="," close=")">
|
||||
#{companyId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<sql id="likeSql">
|
||||
<if test="param.lastName != null and param.lastName != ''">
|
||||
AND t.last_name like CONCAT('%',#{param.lastName},'%')
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="likeSql" databaseId="oracle">
|
||||
<if test="param.lastName != null and param.lastName != ''">
|
||||
AND t.last_name like '%'||#{param.lastName}||'%'
|
||||
</if>
|
||||
</sql>
|
||||
<sql id="likeSql" databaseId="sqlserver">
|
||||
<if test="param.lastName != null and param.lastName != ''">
|
||||
AND t.last_name like '%'+#{param.lastName}+'%'
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
|
||||
</mapper>
|
@ -1,28 +0,0 @@
|
||||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.personnelcard.Iframe;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/10/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface HrmPersonnelCardService {
|
||||
/**
|
||||
* 获取人事卡片信息
|
||||
*
|
||||
* @param uId
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getPersonnelCard(Long uId);
|
||||
|
||||
/**
|
||||
* 获取人事自定义显示栏目
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<Iframe> getIframeList();
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
package com.engine.organization.service;
|
||||
|
||||
import com.engine.organization.entity.detach.param.ManagerDetachParam;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public interface ManagerDetachService {
|
||||
|
||||
/**
|
||||
* 获取table列表
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> listPage(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 新建编辑表单
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> getForm(Integer id);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int deleteByIds(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int save(ManagerDetachParam param);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
int updateDetach(ManagerDetachParam param);
|
||||
|
||||
/**
|
||||
* 分权开关
|
||||
* @param isDetach
|
||||
*/
|
||||
String doDetach(String isDetach);
|
||||
}
|
@ -1,192 +0,0 @@
|
||||
package com.engine.organization.service.impl;
|
||||
|
||||
import com.api.browser.bean.BrowserBean;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.api.browser.bean.SearchConditionOption;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.DeleteParam;
|
||||
import com.engine.organization.entity.detach.param.ManagerDetachParam;
|
||||
import com.engine.organization.entity.detach.po.ManagerDetachPO;
|
||||
import com.engine.organization.entity.detach.vo.ManagerDetachVO;
|
||||
import com.engine.organization.mapper.detach.ManagerDetachMapper;
|
||||
import com.engine.organization.mapper.employee.EmployeeMapper;
|
||||
import com.engine.organization.mapper.hrmresource.HrmResourceMapper;
|
||||
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
||||
import com.engine.organization.service.ManagerDetachService;
|
||||
import com.engine.organization.util.HasRightUtil;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import com.engine.organization.util.db.DBType;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.engine.organization.util.relation.EcHrmRelationUtil;
|
||||
import com.weaver.file.ConfigOperator;
|
||||
import com.weaver.general.BaseBean;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class ManagerDetachServiceImpl extends Service implements ManagerDetachService {
|
||||
|
||||
|
||||
private static final String RIGHT_NAME = "MangerDeatch:All";
|
||||
|
||||
public ManagerDetachMapper getMangeDetachMapper() {
|
||||
return MapperProxyFactory.getProxy(ManagerDetachMapper.class);
|
||||
}
|
||||
|
||||
public HrmResourceMapper getHrmResourceMapper() {
|
||||
return MapperProxyFactory.getProxy(HrmResourceMapper.class);
|
||||
}
|
||||
|
||||
public EmployeeMapper getEmployeeMapper() {
|
||||
return MapperProxyFactory.getProxy(EmployeeMapper.class);
|
||||
}
|
||||
|
||||
public SystemDataMapper getSystemDataMapper(){
|
||||
return MapperProxyFactory.getProxy(SystemDataMapper.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
boolean hasRight = HasRightUtil.hasRight(user, RIGHT_NAME, true);
|
||||
resultMap.put("hasRight", hasRight);
|
||||
if (!hasRight) {
|
||||
return resultMap;
|
||||
}
|
||||
String detach = new BaseBean().getPropValue("hrmOrganization", "detach");
|
||||
resultMap.put("isDetach",detach);
|
||||
OrganizationWeaTable<ManagerDetachVO> table = new OrganizationWeaTable<>(user, ManagerDetachVO.class);
|
||||
String sqlWhere = buildSqlWhere(params);
|
||||
table.setSqlwhere(sqlWhere);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
resultMap.putAll(result.getResultMap());
|
||||
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getForm(Integer id) {
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionItem> selectItems = new ArrayList<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionOption> selectOptions = new ArrayList<>();
|
||||
SearchConditionOption moduleOption = new SearchConditionOption("0", "组织管理",true);
|
||||
selectOptions.add(moduleOption);
|
||||
|
||||
SearchConditionItem ecManager = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, true, "管理员", "1", "ecManager", "");
|
||||
ecManager.setRules("required|string");
|
||||
SearchConditionItem ecRolelevel = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "可维护机构", "194", "ecRolelevel", "");
|
||||
ecRolelevel.setRules("required|string");
|
||||
SearchConditionItem module = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "可管理模块", "module");
|
||||
module.setViewAttr(1);
|
||||
module.setDetailtype(2);
|
||||
module.setHasBorder(true);
|
||||
if (id != null) {
|
||||
ManagerDetachPO detachById = getMangeDetachMapper().getDetachById(id);
|
||||
BrowserBean manager = ecManager.getBrowserConditionParam();
|
||||
manager.setReplaceDatas(getEmployeeMapper().getBrowserDatas(DeleteParam.builder().ids(String.valueOf(detachById.getEcManager())).build().getIds()));
|
||||
ecManager.setBrowserConditionParam(manager);
|
||||
BrowserBean roleLevel = ecRolelevel.getBrowserConditionParam();
|
||||
roleLevel.setReplaceDatas(getSystemDataMapper().getBrowserDatas(DeleteParam.builder().ids(String.valueOf(detachById.getEcRolelevel())).build().getIds()));
|
||||
ecRolelevel.setBrowserConditionParam(roleLevel);
|
||||
}
|
||||
selectItems.add(ecManager);
|
||||
selectItems.add(ecRolelevel);
|
||||
selectItems.add(module);
|
||||
addGroups.add(new SearchConditionGroup("基本信息", true, selectItems));
|
||||
apiDatas.put("condition", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
return getMangeDetachMapper().deleteByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(ManagerDetachParam param) {
|
||||
ManagerDetachPO managerDetachPO = ManagerDetachPO.builder()
|
||||
.managerType(0)
|
||||
.ecManager(param.getEcManager())
|
||||
.jclManager(getHrmResourceMapper().getJclResourceId(String.valueOf(param.getEcManager())).intValue())
|
||||
.ecRolelevel(param.getEcRolelevel())
|
||||
.jclRolelevel(EcHrmRelationUtil.getBatchJclCompanyId(param.getEcRolelevel()) != null ? String.valueOf(EcHrmRelationUtil.getBatchJclCompanyId(param.getEcRolelevel())) : null)
|
||||
.manageModule("组织管理")
|
||||
.creator((long)user.getUID())
|
||||
.deleteType(0)
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
.build();
|
||||
|
||||
return getMangeDetachMapper().insertIgnoreNull(managerDetachPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateDetach(ManagerDetachParam param) {
|
||||
ManagerDetachPO managerDetachPO = ManagerDetachPO.builder()
|
||||
.id(param.getId())
|
||||
.ecManager(param.getEcManager())
|
||||
.jclManager(getHrmResourceMapper().getJclResourceId(String.valueOf(param.getEcManager())).intValue())
|
||||
.ecRolelevel(param.getEcRolelevel())
|
||||
.jclRolelevel(EcHrmRelationUtil.getBatchJclCompanyId(param.getEcRolelevel()) != null ? String.valueOf(EcHrmRelationUtil.getBatchJclCompanyId(param.getEcRolelevel())) : null)
|
||||
.build();
|
||||
return getMangeDetachMapper().updateDetach(managerDetachPO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doDetach(String isDetach) {
|
||||
ConfigOperator ConfigOperator = new ConfigOperator();
|
||||
ConfigOperator.setProp("hrmOrganization.properties", "detach", isDetach);
|
||||
return new BaseBean().getPropValue("hrmOrganization", "detach");
|
||||
}
|
||||
|
||||
private String buildSqlWhere(Map<String, Object> params) {
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
String sqlWhere = " where delete_type = 0";
|
||||
String lastName = (String) params.get("ecManager");
|
||||
List<Long> resourceIds = MapperProxyFactory.getProxy(EmployeeMapper.class).getResourceIds(lastName);
|
||||
String ecManager = StringUtils.join(resourceIds,",");
|
||||
if (StringUtils.isNotBlank(lastName)) {
|
||||
sqlWhere += " AND ec_manager in ("+ecManager+") ";
|
||||
}
|
||||
String ecRolelevel = (String) params.get("ecRolelevel");
|
||||
if (StringUtils.isNotBlank(ecRolelevel)) {
|
||||
sqlWhere += " AND " + dbType.concat("ec_rolelevel") + dbType.like(ecRolelevel);
|
||||
}
|
||||
return sqlWhere;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询当前人员所辖分部JCL_ID
|
||||
* @param uId
|
||||
* @return
|
||||
*/
|
||||
public static List<Long> getJclRoleLevels(Integer uId) {
|
||||
List<Long> ecRoleLevels = new ArrayList<>();
|
||||
ManagerDetachMapper mangeDetachMapper = MapperProxyFactory.getProxy(ManagerDetachMapper.class);
|
||||
List<ManagerDetachPO> detachListById = mangeDetachMapper.getDetachListById(uId);
|
||||
for (ManagerDetachPO managerDetachPO : detachListById) {
|
||||
List<Long> ids = Stream.of(managerDetachPO.getJclRolelevel().split(",")).map(Long::parseLong).collect(Collectors.toList());
|
||||
if (CollectionUtils.isNotEmpty(ids)) {
|
||||
ecRoleLevels.addAll(ids);
|
||||
}
|
||||
}
|
||||
return ecRoleLevels;
|
||||
}
|
||||
}
|
@ -0,0 +1,169 @@
|
||||
package com.engine.organization.trigger.cusfielddata;
|
||||
|
||||
import com.engine.organization.entity.commom.RecordInfo;
|
||||
import com.engine.organization.entity.cusfielddata.po.CusFieldData;
|
||||
import com.engine.organization.entity.extend.param.ExtendInfoParams;
|
||||
import com.engine.organization.entity.job.po.JobPO;
|
||||
import com.engine.organization.entity.postion.po.PostInfoPO;
|
||||
import com.engine.organization.entity.postion.po.PostPO;
|
||||
import com.engine.organization.entity.scheme.po.GradePO;
|
||||
import com.engine.organization.entity.scheme.po.LevelPO;
|
||||
import com.engine.organization.entity.scheme.po.SchemePO;
|
||||
import com.engine.organization.entity.sequence.po.SequencePO;
|
||||
import com.engine.organization.mapper.extend.ExtMapper;
|
||||
import com.engine.organization.mapper.hrmresource.SystemDataMapper;
|
||||
import com.engine.organization.mapper.job.JobMapper;
|
||||
import com.engine.organization.mapper.post.PostInfoMapper;
|
||||
import com.engine.organization.mapper.post.PostMapper;
|
||||
import com.engine.organization.mapper.scheme.GradeMapper;
|
||||
import com.engine.organization.mapper.scheme.LevelMapper;
|
||||
import com.engine.organization.mapper.scheme.SchemeMapper;
|
||||
import com.engine.organization.mapper.sequence.SequenceMapper;
|
||||
import com.engine.organization.thread.HrmResourceTriggerRunnable;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import com.wbi.util.Util;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/08/01
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class CusFieldDataTrigger {
|
||||
|
||||
|
||||
public static void run(Long id) {
|
||||
if (null == id) {
|
||||
// 查询人员表最新插入的ID
|
||||
id = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmResourceMaxId();
|
||||
if (null == id) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
boolean updateFlag = false;
|
||||
// 查询当前操作的数据
|
||||
CusFieldData sourceData = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmCusFieldDataByIdAndScopeId(id, -1L);
|
||||
String sourceField100001 = sourceData.getField100001();
|
||||
String sourceField100002 = sourceData.getField100002();
|
||||
String sourceField100003 = sourceData.getField100003();
|
||||
|
||||
// 查询需要更新的数据,没有则创建数据
|
||||
CusFieldData directionData = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmCusFieldDataByIdAndScopeId(id, 3L);
|
||||
if (null == directionData) {
|
||||
directionData = new CusFieldData();
|
||||
directionData.setScope("HrmCustomFieldByInfoType");
|
||||
directionData.setScopeId(3L);
|
||||
directionData.setId(id);
|
||||
MapperProxyFactory.getProxy(SystemDataMapper.class).insertCusFieldData(directionData);
|
||||
}
|
||||
|
||||
// field100002更新
|
||||
if (StringUtils.isNotBlank(sourceField100002)) {
|
||||
directionData.setField100002(sourceField100002);
|
||||
Long gwId = Long.parseLong(sourceField100002);
|
||||
JobPO jobById = MapperProxyFactory.getProxy(JobMapper.class).getJobById(gwId);
|
||||
if (null != jobById) {
|
||||
RecordInfo hrmJobTitleByName = MapperProxyFactory.getProxy(SystemDataMapper.class).getHrmJobTitleByName(jobById.getJobName());
|
||||
Long ecGwId = StringUtils.isNotBlank(hrmJobTitleByName.getId()) ? Long.parseLong(hrmJobTitleByName.getId()) : null;
|
||||
Long ecBmId = jobById.getEcDepartment();
|
||||
Long ecGsId = jobById.getEcCompany();
|
||||
Map<String, Object> hrmResourceMap = new HashMap<>();
|
||||
// 岗位
|
||||
hrmResourceMap.put("jobtitle", ecGwId);
|
||||
// 部门
|
||||
hrmResourceMap.put("departmentid", ecBmId);
|
||||
// 公司
|
||||
hrmResourceMap.put("subcompanyid1", ecGsId);
|
||||
MapperProxyFactory.getProxy(ExtMapper.class).updateTable(ExtendInfoParams.builder().id(id).tableName("hrmresource").params(hrmResourceMap).build());
|
||||
updateFlag = true;
|
||||
|
||||
// 职等职级为空,从岗位取值、更新
|
||||
if (StringUtils.isBlank(sourceField100001)) {
|
||||
if (StringUtils.isNotBlank(jobById.getLevelId())) {
|
||||
// 通过岗位关联,如有多个职等,选取第一个
|
||||
String[] levelArray = jobById.getLevelId().split(",");
|
||||
LevelPO levelByID = MapperProxyFactory.getProxy(LevelMapper.class).getLevelByID(Long.parseLong(levelArray[0]));
|
||||
directionData.setField100008(levelByID.getLevelName());
|
||||
} else {
|
||||
directionData.setField100008(null);
|
||||
}
|
||||
// 职等职级方案
|
||||
if (StringUtils.isNotBlank(Util.null2String(jobById.getSchemeId()))) {
|
||||
SchemePO schemeByID = MapperProxyFactory.getProxy(SchemeMapper.class).getSchemeByID(jobById.getSchemeId());
|
||||
directionData.setField100006(schemeByID.getSchemeName());
|
||||
} else {
|
||||
directionData.setField100006(null);
|
||||
}
|
||||
// 职级
|
||||
if (StringUtils.isNotBlank(jobById.getGradeId())) {
|
||||
GradePO gradeByLevelId = MapperProxyFactory.getProxy(GradeMapper.class).getGradeByID(Long.parseLong(jobById.getGradeId()));
|
||||
directionData.setField100007(gradeByLevelId.getGradeName());
|
||||
} else {
|
||||
directionData.setField100007(null);
|
||||
}
|
||||
// 岗位序列
|
||||
if (StringUtils.isNotBlank(Util.null2String(jobById.getSequenceId()))) {
|
||||
SequencePO sequenceBySchemeId = MapperProxyFactory.getProxy(SequenceMapper.class).getSequenceByID(jobById.getSequenceId());
|
||||
directionData.setField100005(sequenceBySchemeId.getSequenceName());
|
||||
} else {
|
||||
directionData.setField100005(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
directionData.setField100002(null);
|
||||
directionData.setField100008(null);
|
||||
directionData.setField100006(null);
|
||||
directionData.setField100007(null);
|
||||
directionData.setField100005(null);
|
||||
}
|
||||
|
||||
// field100001更新,职等职级
|
||||
if (null != sourceField100001 && sourceField100001.split("A").length == 3) {
|
||||
directionData.setField100001(sourceField100001);
|
||||
String[] field100001Array = sourceField100001.split("A");
|
||||
// 职等
|
||||
long zdId = Long.parseLong(field100001Array[2]);
|
||||
long zjId = Long.parseLong(field100001Array[1]);
|
||||
long xlId = Long.parseLong(field100001Array[0].split("_")[1]);
|
||||
|
||||
LevelPO levelByID = MapperProxyFactory.getProxy(LevelMapper.class).getLevelByID(zdId);
|
||||
directionData.setField100008(levelByID.getLevelName());
|
||||
// 职等职级方案
|
||||
SchemePO schemeByID = MapperProxyFactory.getProxy(SchemeMapper.class).getSchemeByID(levelByID.getSchemeId());
|
||||
directionData.setField100006(schemeByID.getSchemeName());
|
||||
// 职级
|
||||
GradePO gradeByLevelId = MapperProxyFactory.getProxy(GradeMapper.class).getGradeByID(zjId);
|
||||
directionData.setField100007(gradeByLevelId.getGradeName());
|
||||
// 岗位序列
|
||||
SequencePO sequenceBySchemeId = MapperProxyFactory.getProxy(SequenceMapper.class).getSequenceByID(xlId);
|
||||
directionData.setField100005(sequenceBySchemeId.getSequenceName());
|
||||
updateFlag = true;
|
||||
}
|
||||
|
||||
|
||||
if (null != sourceField100003 && sourceField100003.split("_").length == 2) {
|
||||
directionData.setField100003(sourceField100003);
|
||||
String[] field100003Array = sourceField100003.split("_");
|
||||
long zwId = Long.parseLong(field100003Array[1]);
|
||||
// 职务
|
||||
PostInfoPO postInfoByID = MapperProxyFactory.getProxy(PostInfoMapper.class).getPostInfoByID(zwId);
|
||||
directionData.setField100010(postInfoByID.getPostInfoName());
|
||||
// 职务分类
|
||||
PostPO postByID = MapperProxyFactory.getProxy(PostMapper.class).getPostByID(postInfoByID.getPostId());
|
||||
directionData.setField100009(postByID.getPostName());
|
||||
updateFlag = true;
|
||||
}
|
||||
|
||||
// 更新数据
|
||||
if (updateFlag) {
|
||||
MapperProxyFactory.getProxy(SystemDataMapper.class).updateCusFieldData(directionData);
|
||||
}
|
||||
// 刷新组织结构图
|
||||
new HrmResourceTriggerRunnable(id).run();
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package com.engine.organization.util.detach;
|
||||
|
||||
import com.engine.organization.entity.company.po.CompPO;
|
||||
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||
import com.engine.organization.entity.job.dto.JobListDTO;
|
||||
import com.engine.organization.entity.job.po.JobPO;
|
||||
import com.engine.organization.service.impl.ManagerDetachServiceImpl;
|
||||
import com.weaver.general.BaseBean;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/10/28
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class DetachUtil {
|
||||
private boolean DETACH = "true".equals(new BaseBean().getPropValue("hrmOrganization", "detach"));
|
||||
|
||||
private final List<Long> jclRoleLevels;
|
||||
|
||||
public DetachUtil(Integer uId) {
|
||||
if (1 == uId) {
|
||||
DETACH = false;
|
||||
}
|
||||
if (DETACH) {
|
||||
jclRoleLevels = ManagerDetachServiceImpl.getJclRoleLevels(uId);
|
||||
} else {
|
||||
jclRoleLevels = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分权配置过滤分部
|
||||
*/
|
||||
public void filterCompanyList(List<CompPO> companyList) {
|
||||
if (DETACH && CollectionUtils.isNotEmpty(companyList)) {
|
||||
companyList.removeIf(item -> !jclRoleLevels.contains(item.getId()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分权配置过滤分部
|
||||
*/
|
||||
public void filterDepartmentList(List<DepartmentPO> departmentList) {
|
||||
if (DETACH && CollectionUtils.isNotEmpty(departmentList)) {
|
||||
departmentList.removeIf(item -> !jclRoleLevels.contains(item.getParentComp()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分权配置过滤分部
|
||||
*/
|
||||
public void filterJobDTOList(List<JobListDTO> jobList) {
|
||||
if (DETACH && CollectionUtils.isNotEmpty(jobList)) {
|
||||
jobList.removeIf(item -> !jclRoleLevels.contains(item.getParentComp()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分权配置过滤分部
|
||||
*/
|
||||
public void filterJobList(List<JobPO> jobList) {
|
||||
if (DETACH && CollectionUtils.isNotEmpty(jobList)) {
|
||||
jobList.removeIf(item -> !jclRoleLevels.contains(item.getParentComp()));
|
||||
}
|
||||
}
|
||||
|
||||
public String getJclRoleLevels() {
|
||||
return StringUtils.join(jclRoleLevels, ",");
|
||||
}
|
||||
|
||||
public boolean isDETACH() {
|
||||
return DETACH;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,228 +0,0 @@
|
||||
package com.engine.organization.web;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.hrmresource.param.HrmRelationSaveParam;
|
||||
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.HrmResourceWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.POST;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/06/21
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class HrmResourceController {
|
||||
public HrmResourceWrapper getHrmResourceWrapper(User user) {
|
||||
return ServiceUtil.getService(HrmResourceWrapper.class, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 左侧树接口
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getSearchTree")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public Map<String, Object> getSearchTree(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
SearchTreeParams params = JSONObject.toJavaObject((JSON) JSONObject.toJSON(map), SearchTreeParams.class);
|
||||
return getHrmResourceWrapper(user).getSearchTree(params);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取list列表
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/listPage")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult listPage(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
HrmResourceSearchParam param = JSONObject.toJavaObject((JSON) JSONObject.toJSON(map), HrmResourceSearchParam.class);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).listPage(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取新增表单
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getSaveForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getSaveForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).getSaveForm());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/saveBaseForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult saveBaseForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody Map<String, Object> params) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).saveBaseForm(params));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取基础表单
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getBaseForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getBaseForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).getBaseForm(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新表单
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@POST
|
||||
@Path("/updateForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).updateForm(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 高级搜索条件
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getSearchCondition")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).getSearchCondition(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表页顶部按钮
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@Path("/getHasRight")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).getHasRight());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getTabForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getTabForm(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).getTabForm(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/saveTabForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult saveTabForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody HrmRelationSaveParam params) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).saveTabForm(params));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/updateTabForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateTabForm(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody HrmRelationSaveParam params) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getHrmResourceWrapper(user).updateTabForm(params));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,134 +0,0 @@
|
||||
package com.engine.organization.web;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.DeleteParam;
|
||||
import com.engine.organization.entity.detach.param.ManagerDetachParam;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.ManagerDetachWrapper;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: 模块管理分权
|
||||
* @Date 2022/10/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class ManagerDetachController {
|
||||
|
||||
public ManagerDetachWrapper getManagerDetachWrapper(User user) {
|
||||
return ServiceUtil.getService(ManagerDetachWrapper.class,user);
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/getTable")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult listPage(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).listPage(map));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/getTableBtn")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getTableBtn(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).getTableBtn());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@GET
|
||||
@Path("/getSearchCondition")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).getSearchCondition());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getForm")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getForm(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
||||
@QueryParam("id") Integer id) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).getForm(id));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/deleteByIds")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody DeleteParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).deleteByIds(param.getIds()));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@POST
|
||||
@Path("/save")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult saveDetach(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ManagerDetachParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).save(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/update")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult updateDetach(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody ManagerDetachParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).updateDetach(param));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/doDetach")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult doDetach(@Context HttpServletRequest request,@Context HttpServletResponse response,
|
||||
@QueryParam("idDetach") String isDetach) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getManagerDetachWrapper(user).doDetach(isDetach));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
package com.engine.organization.web;
|
||||
|
||||
import com.engine.common.util.ParamUtil;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.util.response.ReturnResult;
|
||||
import com.engine.organization.wrapper.PersonnelCardWrapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.HrmUserVarify;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/10/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PersonnelCardController {
|
||||
public PersonnelCardWrapper getPersonnelCardWrapper(User user) {
|
||||
return ServiceUtil.getService(PersonnelCardWrapper.class, user);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getPersonnelCard")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getPersonnelCard(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
Map<String, Object> map = ParamUtil.request2Map(request);
|
||||
String id = Util.null2String(map.get("id"));
|
||||
return ReturnResult.successed(getPersonnelCardWrapper(user).getPersonnelCard(StringUtils.isBlank(id) ? null : Long.parseLong(id)));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getIframeList")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getIframeList(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getPersonnelCardWrapper(user).getIframeList());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.hrmresource.param.HrmRelationSaveParam;
|
||||
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.service.HrmResourceService;
|
||||
import com.engine.organization.service.impl.HrmResourceServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/06/21
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class HrmResourceWrapper extends OrganizationWrapper {
|
||||
private HrmResourceService getHrmResourceService(User user) {
|
||||
return ServiceUtil.getService(HrmResourceServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
public Map<String, Object> getSearchTree(SearchTreeParams params) {
|
||||
return getHrmResourceService(user).getSearchTree(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> listPage(HrmResourceSearchParam params) {
|
||||
return getHrmResourceService(user).listPage(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> getSaveForm() {
|
||||
return getHrmResourceService(user).getSaveForm();
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.ADD, operateModule = LogModuleNameEnum.RESOURCE, operateDesc = "新增人员")
|
||||
public Long saveBaseForm(Map<String, Object> params) {
|
||||
Long resourceId = getHrmResourceService(user).saveBaseForm(params);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), params.get("last_name").toString(), JSON.toJSONString(params), "新增人员");
|
||||
return resourceId;
|
||||
}
|
||||
|
||||
public Map<String, Object> getBaseForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).getBaseForm(params);
|
||||
}
|
||||
|
||||
public int updateForm(Map<String, Object> params) {
|
||||
int updateForm = getHrmResourceService(user).updateForm(params);
|
||||
return updateForm;
|
||||
}
|
||||
|
||||
public Map<String, Object> getSearchCondition(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).getSearchCondition(params);
|
||||
}
|
||||
|
||||
public Map<String, Object> getHasRight() {
|
||||
return getHrmResourceService(user).getHasRight();
|
||||
}
|
||||
|
||||
public Map<String, Object> getTabForm(Map<String, Object> params) {
|
||||
return getHrmResourceService(user).getTabForm(params);
|
||||
}
|
||||
|
||||
public long saveTabForm(HrmRelationSaveParam params) {
|
||||
return getHrmResourceService(user).saveTabForm(params);
|
||||
}
|
||||
|
||||
public long updateTabForm(HrmRelationSaveParam params) {
|
||||
return getHrmResourceService(user).updateTabForm(params);
|
||||
}
|
||||
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.annotation.Log;
|
||||
import com.engine.organization.entity.detach.param.ManagerDetachParam;
|
||||
import com.engine.organization.entity.detach.po.ManagerDetachPO;
|
||||
import com.engine.organization.enums.LogModuleNameEnum;
|
||||
import com.engine.organization.enums.OperateTypeEnum;
|
||||
import com.engine.organization.mapper.detach.ManagerDetachMapper;
|
||||
import com.engine.organization.service.ManagerDetachService;
|
||||
import com.engine.organization.service.impl.ManagerDetachServiceImpl;
|
||||
import com.engine.organization.util.MenuBtn;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description:
|
||||
* @Date 2022/10/21
|
||||
* @Version V1.0
|
||||
**/
|
||||
public class ManagerDetachWrapper extends OrganizationWrapper {
|
||||
|
||||
public ManagerDetachService getManagerDetachService(User user) {
|
||||
return ServiceUtil.getService(ManagerDetachServiceImpl.class,user);
|
||||
}
|
||||
|
||||
public Map<String, Object> listPage(Map<String, Object> params) {
|
||||
return getManagerDetachService(user).listPage(params);
|
||||
}
|
||||
|
||||
public Map<String, List<MenuBtn>> getTableBtn() {
|
||||
return MenuBtn.getCommonBtnDatas();
|
||||
}
|
||||
|
||||
public Map<String, Object> getSearchCondition() {
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
SearchConditionItem ecManager = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "管理员名称", "ecManager");
|
||||
SearchConditionItem ecRolelevel = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "可管理组织机构", "164", "ecRolelevel", "");
|
||||
conditionItems.add(ecManager);
|
||||
conditionItems.add(ecRolelevel);
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
apiDatas.put("conditions", addGroups);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
public Map<String, Object> getForm(Integer id) {
|
||||
return getManagerDetachService(user).getForm(id);
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.DELETE,operateModule = LogModuleNameEnum.DETACH,operateDesc = "删除分权数据")
|
||||
public int deleteByIds(Collection<Long> ids) {
|
||||
List<ManagerDetachPO> managerDetachPOS = MapperProxyFactory.getProxy(ManagerDetachMapper.class).selectByIds(ids);
|
||||
int deleteByIds = getManagerDetachService(user).deleteByIds(ids);
|
||||
for (ManagerDetachPO managerDetachPO : managerDetachPOS) {
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), String.valueOf(managerDetachPO.getEcManager()), JSON.toJSONString(ids), "删除等级方案");
|
||||
}
|
||||
return deleteByIds;
|
||||
}
|
||||
|
||||
|
||||
@Log(operateType = OperateTypeEnum.ADD,operateModule = LogModuleNameEnum.DETACH,operateDesc = "新增分权管理员")
|
||||
public int save(ManagerDetachParam param) {
|
||||
int save = getManagerDetachService(user).save(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), String.valueOf(param.getEcManager()), JSON.toJSONString(param), "新增分权管理员");
|
||||
return save;
|
||||
}
|
||||
|
||||
@Log(operateType = OperateTypeEnum.UPDATE, operateModule = LogModuleNameEnum.DETACH, operateDesc = "分权数据更新")
|
||||
public int updateDetach(ManagerDetachParam param) {
|
||||
ManagerDetachPO managerDetachPO = MapperProxyFactory.getProxy(ManagerDetachMapper.class).getDetachById(param.getId());
|
||||
int result = getManagerDetachService(user).updateDetach(param);
|
||||
writeOperateLog(new Object() {
|
||||
}.getClass(), String.valueOf(managerDetachPO.getEcManager()), JSON.toJSONString(param), managerDetachPO, MapperProxyFactory.getProxy(ManagerDetachMapper.class).getDetachById(param.getId()));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public String doDetach(String isDetach) {
|
||||
return getManagerDetachService(user).doDetach(isDetach);
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package com.engine.organization.wrapper;
|
||||
|
||||
import com.engine.common.util.ServiceUtil;
|
||||
import com.engine.organization.entity.personnelcard.Iframe;
|
||||
import com.engine.organization.service.HrmPersonnelCardService;
|
||||
import com.engine.organization.service.impl.HrmPersonnelCardServiceImpl;
|
||||
import com.engine.organization.util.OrganizationWrapper;
|
||||
import weaver.hrm.User;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/10/08
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class PersonnelCardWrapper extends OrganizationWrapper {
|
||||
private HrmPersonnelCardService getHrmPersonnelCardService(User user) {
|
||||
return ServiceUtil.getService(HrmPersonnelCardServiceImpl.class, user);
|
||||
}
|
||||
|
||||
|
||||
public Map<String, Object> getPersonnelCard(Long uId) {
|
||||
return getHrmPersonnelCardService(user).getPersonnelCard(uId);
|
||||
}
|
||||
|
||||
public List<Iframe> getIframeList() {
|
||||
return getHrmPersonnelCardService(user).getIframeList();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue