commit
796bdfa10f
|
|
@ -0,0 +1,30 @@
|
|||
package com.engine.organization.entity.employee.vo;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/31
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class EmployeeVO {
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 分部
|
||||
*/
|
||||
private String companyName;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
private String departmentName;
|
||||
|
||||
/**
|
||||
* 直接上级
|
||||
*/
|
||||
private String manager;
|
||||
|
||||
}
|
||||
|
|
@ -41,14 +41,14 @@ public class ExtendInfoBO {
|
|||
|
||||
// 封装对象为table组件
|
||||
public static List<Map<String, Object>> convertInfoListToTable(User user, List<ExtendInfoPO> infoPOList, int viewAttr, boolean showLabel) {
|
||||
List<Map<String, Object>> lsCol = new ArrayList<Map<String, Object>>();
|
||||
Map<String, Object> col = null;
|
||||
List<Map<String, Object>> lsCol = new ArrayList<>();
|
||||
Map<String, Object> col;
|
||||
|
||||
int width = 100 / infoPOList.size();
|
||||
for (int i = 0; infoPOList != null && i < infoPOList.size(); i++) {
|
||||
ExtendInfoPO extendInfoPO = infoPOList.get(i);
|
||||
String tmpkey = extendInfoPO.getFieldName();
|
||||
col = new HashMap<String, Object>();
|
||||
col = new HashMap<>();
|
||||
col.put("title", extendInfoPO.getFieldNameDesc());
|
||||
|
||||
col.put("key", tmpkey);
|
||||
|
|
@ -114,7 +114,7 @@ public class ExtendInfoBO {
|
|||
|
||||
// 浏览按钮特殊处理
|
||||
if (FieldType.BROWSER.equals(fieldItem.getType())) {
|
||||
BrowserBean browserConditionParam = OrganizationFormItemUtil.browserItem(user, 2, 16, fieldItem.getViewAttr(), false, extendInfoPO.getFieldNameDesc(), extendInfoPO.getBrowserType(), extendInfoPO.getFieldName(), "").getBrowserConditionParam();
|
||||
BrowserBean browserConditionParam = OrganizationFormItemUtil.browserItem(user, 2, 16, fieldItem.getViewAttr(), false, extendInfoPO.getFieldNameDesc(), extendInfoPO.getBrowserType(), extendInfoPO.getFieldName(), extendInfoPO.getCustomBrowserId()).getBrowserConditionParam();
|
||||
fieldItem.setBrowserConditionParam(browserConditionParam);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,11 @@ public class ExtendInfoPO {
|
|||
*/
|
||||
private Integer browserShow;
|
||||
|
||||
/**
|
||||
* 自定义浏览按钮标识
|
||||
*/
|
||||
private String customBrowserId;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,32 @@
|
|||
package com.engine.organization.entity.job.po;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/31
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class JobDTPO {
|
||||
private Long id;
|
||||
private Long mainId;
|
||||
private String levelId;
|
||||
private String gradeId;
|
||||
private String levelIdspan;
|
||||
private String gradeIdspan;
|
||||
|
||||
private Long creator;
|
||||
private int deleteType;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
|
|
@ -46,6 +46,10 @@ public class GradePO {
|
|||
* 禁用标记
|
||||
*/
|
||||
private int forbiddenTag;
|
||||
/**
|
||||
* 是否被引用
|
||||
*/
|
||||
private int isUsed;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,6 +44,10 @@ public class LevelPO {
|
|||
*禁用标记
|
||||
*/
|
||||
private int forbiddenTag;
|
||||
/**
|
||||
* 是否被引用
|
||||
*/
|
||||
private int isUsed;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13,25 +13,29 @@ import java.util.Date;
|
|||
@AllArgsConstructor
|
||||
public class SchemePO {
|
||||
/**
|
||||
*自增主键
|
||||
* 自增主键
|
||||
*/
|
||||
private long id;
|
||||
/**
|
||||
*编号
|
||||
* 编号
|
||||
*/
|
||||
private String schemeNo;
|
||||
/**
|
||||
*方案名称
|
||||
* 方案名称
|
||||
*/
|
||||
private String schemeName;
|
||||
/**
|
||||
*方案说明
|
||||
* 方案说明
|
||||
*/
|
||||
private String schemeDescription;
|
||||
/**
|
||||
*禁用标记
|
||||
* 禁用标记
|
||||
*/
|
||||
private int forbiddenTag;
|
||||
/**
|
||||
* 是否被引用
|
||||
*/
|
||||
private int isUsed;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import lombok.NoArgsConstructor;
|
|||
"t.scheme_name," +
|
||||
"t.scheme_description," +
|
||||
"t.forbidden_tag," +
|
||||
"t.is_used," +
|
||||
"t.creator," +
|
||||
"t.delete_type," +
|
||||
"t.create_time," +
|
||||
|
|
@ -30,8 +31,8 @@ import lombok.NoArgsConstructor;
|
|||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX,
|
||||
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates",otherpara = "column:forbidden_tag"),
|
||||
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom",popedompara = "column:forbidden_tag")
|
||||
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates", otherpara = "column:is_used"),
|
||||
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom", popedompara = "column:is_used")
|
||||
)
|
||||
public class SchemeTableVO {
|
||||
/**
|
||||
|
|
@ -39,7 +40,11 @@ public class SchemeTableVO {
|
|||
*/
|
||||
@OrganizationTableColumn(column = "id", display = false)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 是否被引用
|
||||
*/
|
||||
@OrganizationTableColumn(column = "isUsed", display = false)
|
||||
private Integer isUsed;
|
||||
|
||||
/**
|
||||
* 方案编号
|
||||
|
|
|
|||
|
|
@ -0,0 +1,37 @@
|
|||
package com.engine.organization.mapper.job;
|
||||
|
||||
import com.engine.organization.entity.job.po.JobDTPO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/31
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface JobDTMapper {
|
||||
/**
|
||||
* 查询明细表数据
|
||||
*
|
||||
* @param mainId
|
||||
* @return
|
||||
*/
|
||||
List<JobDTPO> listJobDTByMainID(@Param("mainId") Long mainId);
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param mainId
|
||||
*/
|
||||
int deleteByIds(@Param("mainId") Long mainId);
|
||||
|
||||
/**
|
||||
* 添加数据
|
||||
*
|
||||
* @param jobDTPO
|
||||
* @return
|
||||
*/
|
||||
int insertIgnoreNull(JobDTPO jobDTPO);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<?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.job.JobDTMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.organization.entity.job.po.JobDTPO">
|
||||
<result column="id" property="id"/>
|
||||
<result column="mainid" property="mainId"/>
|
||||
<result column="level_id" property="levelId"/>
|
||||
<result column="grade_id" property="gradeId"/>
|
||||
<result column="level_id_span" property="levelIdspan"/>
|
||||
<result column="grade_id_span" property="gradeIdspan"/>
|
||||
<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.mainid,
|
||||
t.level_id,
|
||||
t.grade_id,
|
||||
t.level_id_span,
|
||||
t.grade_id_span
|
||||
</sql>
|
||||
<insert id="insertIgnoreNull">
|
||||
INSERT INTO jcl_org_jobdt
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<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>
|
||||
|
||||
<if test="mainId != null ">
|
||||
mainid,
|
||||
</if>
|
||||
<if test="levelId != null ">
|
||||
level_id,
|
||||
</if>
|
||||
<if test="gradeId != null ">
|
||||
grade_id,
|
||||
</if>
|
||||
<if test="levelIdspan != null ">
|
||||
level_id_span,
|
||||
</if>
|
||||
<if test="gradeIdspan != null ">
|
||||
grade_id_span,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
|
||||
<if test="creator != null">
|
||||
#{creator},
|
||||
</if>
|
||||
<if test="deleteType != null">
|
||||
#{deleteType},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="mainId != null ">
|
||||
#{mainId},
|
||||
</if>
|
||||
<if test="levelId != null ">
|
||||
#{levelId},
|
||||
</if>
|
||||
<if test="gradeId != null ">
|
||||
#{gradeId},
|
||||
</if>
|
||||
<if test="levelIdspan != null ">
|
||||
#{levelIdspan},
|
||||
</if>
|
||||
<if test="gradeIdspan != null ">
|
||||
#{gradeIdspan},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
delete
|
||||
from jcl_org_jobdt
|
||||
where mainid = #{mainId}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="listJobDTByMainID" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_jobdt t
|
||||
WHERE delete_type = 0
|
||||
AND mainid = #{mainId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -9,11 +9,11 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/20
|
||||
* @Version V1.0
|
||||
**/
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/24
|
||||
* @version: 1.0
|
||||
*/
|
||||
public interface JobMapper {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -23,8 +23,17 @@ public interface GradeMapper {
|
|||
*/
|
||||
List<GradePO> listByNo(@Param("gradeNo") String gradeNo);
|
||||
|
||||
/**
|
||||
* 根据等级方案查询数据
|
||||
*
|
||||
* @param schemeId
|
||||
* @return
|
||||
*/
|
||||
List<GradePO> listGradesBySchemeId(@Param("schemeId") long schemeId);
|
||||
|
||||
/**
|
||||
* 获取职级根据ID
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -32,6 +41,7 @@ public interface GradeMapper {
|
|||
|
||||
/**
|
||||
* 插入职级
|
||||
*
|
||||
* @param gradePO
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -62,6 +72,7 @@ public interface GradeMapper {
|
|||
|
||||
/**
|
||||
* 根据禁用标记统计
|
||||
*
|
||||
* @param tag
|
||||
* @return
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -49,6 +49,11 @@
|
|||
and forbidden_tag = #{tag}
|
||||
</if>
|
||||
</select>
|
||||
<select id="listGradesBySchemeId" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_grade t where delete_type = 0 and scheme_id = #{schemeId}
|
||||
</select>
|
||||
|
||||
<update id="updateGrade" parameterType="com.engine.organization.entity.scheme.po.GradePO">
|
||||
update jcl_org_grade
|
||||
|
|
|
|||
|
|
@ -73,6 +73,15 @@ public interface JobService {
|
|||
*/
|
||||
int updateForm(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 复制岗位到指定部门
|
||||
*
|
||||
* @param id
|
||||
* @param departmentId
|
||||
* @return
|
||||
*/
|
||||
int copyJobItem(long id, long departmentId);
|
||||
|
||||
/**
|
||||
* 更新禁用标记
|
||||
*
|
||||
|
|
|
|||
|
|
@ -98,9 +98,6 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
}
|
||||
return item.getFieldName();
|
||||
}).collect(Collectors.joining(","));
|
||||
//if (TYPE_JOB.equals(extendType)) {
|
||||
// fields += "";
|
||||
//}
|
||||
// 去除null 元素
|
||||
List<Map<String, Object>> maps = getExtDTMapper().listCompExtDT(tableName, id, fields);
|
||||
maps.removeIf(Objects::isNull);
|
||||
|
|
@ -177,13 +174,6 @@ public class ExtServiceImpl extends Service implements ExtService {
|
|||
}
|
||||
map.put(extendInfoPO.getFieldName(), params.get(extendInfoPO.getFieldName() + "_" + i));
|
||||
}
|
||||
//// 岗位管理,添加特殊字段
|
||||
//if (TYPE_JOB.equals(extendType)) {
|
||||
// map.put("level_id", params.get("level_id_" + i));
|
||||
// map.put("level_id_span", params.get("level_id_span_" + i));
|
||||
// map.put("grade_id", params.get("grade_id_" + i));
|
||||
// map.put("grade_id_span", params.get("grade_id_span_" + i));
|
||||
//}
|
||||
map.put("mainid", id);
|
||||
map.put("creator", user.getUID());
|
||||
map.put("delete_type", 0);
|
||||
|
|
|
|||
|
|
@ -17,16 +17,23 @@ import com.engine.organization.entity.company.po.CompPO;
|
|||
import com.engine.organization.entity.department.bo.DepartmentBO;
|
||||
import com.engine.organization.entity.department.dto.DepartmentListDTO;
|
||||
import com.engine.organization.entity.department.po.DepartmentPO;
|
||||
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
|
||||
import com.engine.organization.entity.extend.po.ExtendInfoPO;
|
||||
import com.engine.organization.entity.job.bo.JobBO;
|
||||
import com.engine.organization.entity.job.dto.JobListDTO;
|
||||
import com.engine.organization.entity.job.param.JobSearchParam;
|
||||
import com.engine.organization.entity.job.po.JobDTPO;
|
||||
import com.engine.organization.entity.job.po.JobPO;
|
||||
import com.engine.organization.entity.scheme.po.GradePO;
|
||||
import com.engine.organization.entity.searchtree.SearchTree;
|
||||
import com.engine.organization.entity.searchtree.SearchTreeParams;
|
||||
import com.engine.organization.mapper.comp.CompMapper;
|
||||
import com.engine.organization.mapper.department.DepartmentMapper;
|
||||
import com.engine.organization.mapper.extend.ExtendGroupMapper;
|
||||
import com.engine.organization.mapper.job.JobDTMapper;
|
||||
import com.engine.organization.mapper.job.JobMapper;
|
||||
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.service.ExtService;
|
||||
|
|
@ -86,6 +93,10 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
return MapperProxyFactory.getProxy(JobMapper.class);
|
||||
}
|
||||
|
||||
private JobDTMapper getJobDTMapper() {
|
||||
return MapperProxyFactory.getProxy(JobDTMapper.class);
|
||||
}
|
||||
|
||||
private CompMapper getCompMapper() {
|
||||
return MapperProxyFactory.getProxy(CompMapper.class);
|
||||
}
|
||||
|
|
@ -143,7 +154,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
@Override
|
||||
public Map<String, Object> listPage(JobSearchParam param) {
|
||||
Map<String, Object> datas = new HashMap<>();
|
||||
JobPO jobPO = JobBO.convertParamsToPO(param, (long) user.getUID());
|
||||
JobPO jobPO = JobBO.convertParamsToPO(param, user.getUID());
|
||||
boolean filter = isFilter(jobPO);
|
||||
PageInfo<JobListDTO> pageInfos;
|
||||
List<JobListDTO> allList = getJobMapper().listNoFilter();
|
||||
|
|
@ -336,7 +347,27 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
// 拓展页面分组
|
||||
resultMap.put("tabInfo", getExtService(user).getTabInfo(EXTEND_TYPE, JCL_ORG_JOBEXT));
|
||||
// 处理明细表
|
||||
resultMap.put("tables", getExtService(user).getExtendTables(user, EXTEND_TYPE, JCL_ORG_JOBEXT_DT1, id, viewAttr, false));
|
||||
List<Map<String, Object>> extendTables = getExtService(user).getExtendTables(user, EXTEND_TYPE, JCL_ORG_JOBEXT_DT1, id, viewAttr, false);
|
||||
|
||||
Map<String, Object> tableMap = new HashMap<>();
|
||||
tableMap.put("hide", false);
|
||||
tableMap.put("tabname", "职等职级");
|
||||
Map<String, Object> tabinfoMap = new HashMap<>();
|
||||
List<ExtendInfoPO> infoPOList = new ArrayList<>();
|
||||
infoPOList.add(ExtendInfoPO.builder().fieldName("gradeId").fieldNameDesc("职级").controlType(3).isrequired(1).browserType("161").customBrowserId("gradeBrowser").build());
|
||||
infoPOList.add(ExtendInfoPO.builder().fieldName("levelId").fieldNameDesc("职等").controlType(3).isrequired(1).browserType("162").customBrowserId("levelBrowser").build());
|
||||
tabinfoMap.put("columns", ExtendInfoBO.convertInfoListToTable(user, infoPOList, viewAttr, false));
|
||||
tabinfoMap.put("rownum", "rownum");
|
||||
// 去除null 元素
|
||||
List<JobDTPO> maps = getJobDTMapper().listJobDTByMainID(id);
|
||||
maps.removeIf(Objects::isNull);
|
||||
tabinfoMap.put("datas", maps);
|
||||
tableMap.put("tabinfo", tabinfoMap);
|
||||
// 添加明细表
|
||||
extendTables.add(0, tableMap);
|
||||
|
||||
resultMap.put("tables", extendTables);
|
||||
|
||||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
|
||||
apiDatas.put("result", resultMap);
|
||||
|
|
@ -350,8 +381,18 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
OrganizationAssert.isEmpty(list, "编号不允许重复");
|
||||
JobPO jobPO = JobBO.convertParamsToPO(params, user.getUID());
|
||||
jobPO.setIsKey(null == jobPO.getIsKey() ? 0 : jobPO.getIsKey());
|
||||
// 设置对应的等级方案
|
||||
return getJobMapper().insertIgnoreNull(jobPO);
|
||||
int insertCount = getJobMapper().insertIgnoreNull(jobPO);
|
||||
if (null != jobPO.getSchemeId()) {
|
||||
// 插入明细表信息
|
||||
// 根据等级方案查询职等、职级
|
||||
List<GradePO> gradePOS = MapperProxyFactory.getProxy(GradeMapper.class).listGradesBySchemeId(jobPO.getSchemeId());
|
||||
for (GradePO gradePO : gradePOS) {
|
||||
List<Map<String, Object>> maps = MapperProxyFactory.getProxy(LevelMapper.class).listLevelsByIds(QueryParam.builder().ids(gradePO.getLevelId()).build().getIds());
|
||||
String levelNames = maps.stream().map(item -> (String) item.get("name")).collect(Collectors.joining(","));
|
||||
insertCount += getJobDTMapper().insertIgnoreNull(JobDTPO.builder().levelId(gradePO.getLevelId()).gradeId(gradePO.getId() + "").levelIdspan(levelNames).gradeIdspan(gradePO.getGradeName()).mainId(jobPO.getId()).creator((long) user.getUID()).deleteType(0).createTime(new Date()).updateTime(new Date()).build());
|
||||
}
|
||||
}
|
||||
return insertCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -365,11 +406,29 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
updateCount += getJobMapper().updateBaseJob(jobPO);
|
||||
// 更新主表拓展表
|
||||
updateCount += getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOBEXT, params, groupId, jobPO.getId());
|
||||
//更新明细表
|
||||
// 更新明细表
|
||||
getJobDTMapper().deleteByIds(jobPO.getId());
|
||||
int rowNum = Util.getIntValue((String) params.get("rownum"));
|
||||
for (int i = 0; i < rowNum; i++) {
|
||||
String levelId = (String) params.get("levelId_" + i);
|
||||
String gradeId = (String) params.get("gradeId_" + i);
|
||||
String levelIdspan = (String) params.get("levelIdspan_" + i);
|
||||
String gradeIdspan = (String) params.get("gradeIdspan_" + i);
|
||||
getJobDTMapper().insertIgnoreNull(JobDTPO.builder().levelId(levelId).gradeId(gradeId).levelIdspan(levelIdspan).gradeIdspan(gradeIdspan).mainId(jobPO.getId()).creator((long) user.getUID()).deleteType(0).createTime(new Date()).updateTime(new Date()).build());
|
||||
}
|
||||
getExtService(user).updateExtDT(user, EXTEND_TYPE, JCL_ORG_JOBEXT_DT1, params, jobPO.getId());
|
||||
return updateCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int copyJobItem(long id, long departmentId) {
|
||||
JobPO jobById = getJobMapper().getJobById(id);
|
||||
// TODO 自动编号
|
||||
jobById.setJobNo("复制_" + jobById.getJobNo());
|
||||
jobById.setParentDept(departmentId);
|
||||
return getJobMapper().insertIgnoreNull(jobById);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateForbiddenTagById(JobSearchParam params) {
|
||||
JobPO jobPO = JobPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
|
||||
|
|
@ -624,7 +683,7 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
// 岗位序列
|
||||
SearchConditionItem sequenceBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "岗位序列", "161", "sequenceId", "sequenceBrowser");
|
||||
// 等级方案
|
||||
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 1, false, "等级方案", "161", "schemeId", "schemeBrowser");
|
||||
SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 3, false, "等级方案", "161", "schemeId", "schemeBrowser");
|
||||
// 上级岗位
|
||||
SearchConditionItem parentJobBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "上级岗位", "161", "parentJob", "jobBrowser");
|
||||
// 是否关键岗
|
||||
|
|
|
|||
|
|
@ -171,6 +171,18 @@ public class JobController {
|
|||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/copyJobItem")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult copyJobItem(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody JobSearchParam param) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getJobWrapper(user).copyJobItem(param.getId(), param.getParentDept()));
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID批量删除数据
|
||||
*
|
||||
|
|
|
|||
|
|
@ -100,6 +100,17 @@ public class JobWrapper extends Service {
|
|||
return getJobService(user).updateForm(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制岗位到指定部门
|
||||
*
|
||||
* @param id
|
||||
* @param departmentId
|
||||
* @return
|
||||
*/
|
||||
public int copyJobItem(long id, long departmentId) {
|
||||
return getJobService(user).copyJobItem(id, departmentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param params
|
||||
* @return
|
||||
|
|
|
|||
Loading…
Reference in New Issue