!151 人员拓展卡片

Merge pull request !151 from dxfeng/feature/dxf
pull/152/MERGE^2
dxfeng 3 years ago committed by Gitee
commit 34dd115da1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -481,7 +481,7 @@ CREATE TABLE HR_LOG (
operate_desc varchar(100) NULL, operate_desc varchar(100) NULL,
operator_id int NULL, operator_id int NULL,
operator_name varchar(100) NULL, operator_name varchar(100) NULL,
create_time date NULL, create_time datetime NULL,
operate_type int NULL, operate_type int NULL,
params_str varchar(2000) NULL, params_str varchar(2000) NULL,
client_ip varchar(100) NULL, client_ip varchar(100) NULL,
@ -494,3 +494,21 @@ CREATE TABLE HR_LOG (
value varchar(100) NULL, value varchar(100) NULL,
CONSTRAINT HR_LOG_PK PRIMARY KEY (id) CONSTRAINT HR_LOG_PK PRIMARY KEY (id)
); );
create table JCL_ORG_HRMRELATION (
id int not null,
scheme_id int null,
level_id varchar(100) null,
grade_id int null,
sequence_id int null,
post_id int null,
post_info_id int null,
company_id int null,
department_id int null,
job_id int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
constraint JCL_ORG_HRMRELATION_PK primary key (id)
);

@ -463,3 +463,21 @@ CREATE TABLE HR_LOG (
VALUE NVARCHAR2(100) NULL, VALUE NVARCHAR2(100) NULL,
CONSTRAINT HR_LOG_PK PRIMARY KEY (ID) CONSTRAINT HR_LOG_PK PRIMARY KEY (ID)
); );
CREATE TABLE JCL_ORG_HRMRELATION (
ID NUMBER NOT NULL,
SCHEME_ID NUMBER NULL,
LEVEL_ID NVARCHAR2(100) NULL,
GRADE_ID NUMBER NULL,
SEQUENCE_ID NUMBER NULL,
POST_ID NUMBER NULL,
POST_INFO_ID NUMBER NULL,
COMPANY_ID NUMBER NULL,
DEPARTMENT_ID NUMBER NULL,
JOB_ID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_HRMRELATION_PK PRIMARY KEY (ID)
);

@ -462,3 +462,21 @@ CREATE TABLE HR_LOG (
value varchar(100) NULL, value varchar(100) NULL,
CONSTRAINT HR_LOG_PK PRIMARY KEY (id) CONSTRAINT HR_LOG_PK PRIMARY KEY (id)
); );
create table JCL_ORG_HRMRELATION (
id int not null,
scheme_id int null,
level_id varchar(100) null,
grade_id int null,
sequence_id int null,
post_id int null,
post_info_id int null,
company_id int null,
department_id int null,
job_id int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
constraint JCL_ORG_HRMRELATION_PK primary key (id)
);

@ -0,0 +1,29 @@
package com.engine.organization.entity.hrmresource.bo;
import com.engine.organization.entity.hrmresource.param.HrmRelationSaveParam;
import com.engine.organization.entity.hrmresource.po.HrmRelationPO;
/**
* @author:dxfeng
* @createTime: 2022/07/11
* @version: 1.0
*/
public class HrmRelationBO {
public static HrmRelationPO convertSaveParamToPO(HrmRelationSaveParam saveParam) {
if (null == saveParam) {
return null;
}
return HrmRelationPO.builder()
.id(saveParam.getId())
.schemeId(saveParam.getSchemeId())
.levelId(saveParam.getLevelId())
.gradeId(saveParam.getGradeId())
.sequenceId(saveParam.getSequenceId())
.postId(saveParam.getPostId())
.postInfoId(saveParam.getPostInfoId())
.companyId(saveParam.getCompanyId())
.departmentId(saveParam.getDepartmentId())
.jobId(saveParam.getJobId())
.build();
}
}

@ -0,0 +1,67 @@
package com.engine.organization.entity.hrmresource.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2022/07/11
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class HrmRelationSaveParam {
/**
* ID
*/
private Long id;
/**
* ID
*/
private Long schemeId;
/**
* ID
*/
private String levelId;
/**
* ID
*/
private Long gradeId;
/**
* ID
*/
private Long sequenceId;
/**
* ID
*/
private Long postId;
/**
* ID
*/
private Long postInfoId;
/**
* ID
*/
private Long companyId;
/**
* ID
*/
private Long departmentId;
/**
* ID
*/
private Long jobId;
}

@ -0,0 +1,75 @@
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/07/11
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class HrmRelationPO {
/**
* ID
*/
private Long id;
/**
* ID
*/
private Long schemeId;
/**
* ID
*/
private String levelId;
/**
* ID
*/
private Long gradeId;
/**
* ID
*/
private Long sequenceId;
/**
* ID
*/
private Long postId;
/**
* ID
*/
private Long postInfoId;
/**
* ID
*/
private Long companyId;
/**
* ID
*/
private Long departmentId;
/**
* ID
*/
private Long jobId;
private Long creator;
private Integer deleteType;
private Date createTime;
private Date updateTime;
}

@ -0,0 +1,18 @@
package com.engine.organization.mapper.hrmresource;
import com.engine.organization.entity.hrmresource.po.HrmRelationPO;
import org.apache.ibatis.annotations.Param;
/**
* @description:
* @author:dxfeng
* @createTime: 2022/05/20
* @version: 1.0
*/
public interface HrmRelationMapper {
HrmRelationPO getRelationById(@Param("id") Long id);
int insertIgnoreNull(HrmRelationPO relationPO);
int updateHrmRelation(HrmRelationPO relationPO);
}

@ -0,0 +1,158 @@
<?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.hrmresource.HrmRelationMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.hrmresource.po.HrmRelationPO">
<result column="id" property="id"/>
<result column="scheme_id" property="schemeId"/>
<result column="level_id" property="levelId"/>
<result column="grade_id" property="gradeId"/>
<result column="sequence_id" property="sequenceId"/>
<result column="post_id" property="postId"/>
<result column="post_info_id" property="postInfoId"/>
<result column="company_id" property="companyId"/>
<result column="department_id" property="departmentId"/>
<result column="job_id" property="jobId"/>
<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.scheme_id
, t.level_id
, t.grade_id
, t.sequence_id
, t.post_id
, t.post_info_id
, t.company_id
, t.department_id
, t.job_id
, t.creator
, t.delete_type
, t.create_time
, t.update_time
</sql>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.hrmresource.po.HrmRelationPO"
keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
INSERT INTO jcl_org_hrmrelation
<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="id != null ">
id,
</if>
<if test="schemeId != null ">
scheme_id,
</if>
<if test="levelId != null ">
level_id,
</if>
<if test="gradeId != null ">
grade_id,
</if>
<if test="sequenceId != null ">
sequence_id,
</if>
<if test="postId != null ">
post_id,
</if>
<if test="postInfoId != null ">
post_info_id,
</if>
<if test="companyId != null ">
company_id,
</if>
<if test="departmentId != null ">
department_id,
</if>
<if test="jobId != null ">
job_id,
</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="id != null">
#{id},
</if>
<if test="schemeId != null">
#{schemeId},
</if>
<if test="levelId != null">
#{levelId},
</if>
<if test="gradeId != null">
#{gradeId},
</if>
<if test="sequenceId != null">
#{sequenceId},
</if>
<if test="postId != null">
#{postId},
</if>
<if test="postInfoId != null">
#{postInfoId},
</if>
<if test="companyId != null">
#{companyId},
</if>
<if test="departmentId != null">
#{departmentId},
</if>
<if test="jobId != null">
#{jobId},
</if>
</trim>
</insert>
<update id="updateHrmRelation" parameterType="com.engine.organization.entity.hrmresource.po.HrmRelationPO">
update jcl_org_hrmrelation
<set>
update_time=#{updateTime},
scheme_id=#{schemeId},
level_id=#{levelId},
grade_id=#{gradeId},
sequence_id=#{sequenceId},
post_id=#{postId},
post_info_id=#{postInfoId},
company_id=#{companyId},
department_id=#{departmentId},
job_id=#{jobId},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<select id="getRelationById" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_hrmrelation t where delete_type = 0
AND id =#{id}
</select>
</mapper>

@ -2,10 +2,12 @@ package com.engine.organization.mapper.scheme;
import com.engine.organization.entity.scheme.po.GradePO; import com.engine.organization.entity.scheme.po.GradePO;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @Author dxfeng * @Author dxfeng
@ -81,4 +83,8 @@ public interface GradeMapper {
List<String> listUsedId(); List<String> listUsedId();
List<String> getGradeNameByIds(@Param("ids") Collection<Long> ids); List<String> getGradeNameByIds(@Param("ids") Collection<Long> ids);
@MapKey("id")
List<Map<String, Object>> listGradessByIds(@Param("ids") Collection<Long> ids);
} }

@ -66,6 +66,17 @@
#{id} #{id}
</foreach> </foreach>
</select> </select>
<select id="listGradessByIds" resultType="java.util.Map">
select
id,
grade_name as name
from jcl_org_grade t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<update id="updateGrade" parameterType="com.engine.organization.entity.scheme.po.GradePO"> <update id="updateGrade" parameterType="com.engine.organization.entity.scheme.po.GradePO">
update jcl_org_grade update jcl_org_grade

@ -1,5 +1,6 @@
package com.engine.organization.service; package com.engine.organization.service;
import com.engine.organization.entity.hrmresource.param.HrmRelationSaveParam;
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam; import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.entity.searchtree.SearchTreeParams;
@ -73,4 +74,25 @@ public interface HrmResourceService {
* @return * @return
*/ */
Map<String, Object> getHasRight(); Map<String, Object> getHasRight();
/**
*
*/
Map<String, Object> getTabForm(Map<String, Object> params);
/**
*
*
* @param params
* @return
*/
long saveTabForm(HrmRelationSaveParam params);
/**
*
*
* @param params
* @return
*/
long updateTabForm(HrmRelationSaveParam params);
} }

@ -1,5 +1,6 @@
package com.engine.organization.service.impl; package com.engine.organization.service.impl;
import com.api.browser.bean.BrowserBean;
import com.api.browser.bean.SearchConditionGroup; import com.api.browser.bean.SearchConditionGroup;
import com.api.browser.bean.SearchConditionItem; import com.api.browser.bean.SearchConditionItem;
import com.cloudstore.eccom.result.WeaResultMsg; import com.cloudstore.eccom.result.WeaResultMsg;
@ -12,7 +13,10 @@ import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.department.bo.DepartmentBO; import com.engine.organization.entity.department.bo.DepartmentBO;
import com.engine.organization.entity.department.po.DepartmentPO; import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.extend.po.ExtendTitlePO; import com.engine.organization.entity.extend.po.ExtendTitlePO;
import com.engine.organization.entity.hrmresource.bo.HrmRelationBO;
import com.engine.organization.entity.hrmresource.param.HrmRelationSaveParam;
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam; import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
import com.engine.organization.entity.hrmresource.po.HrmRelationPO;
import com.engine.organization.entity.hrmresource.vo.ScHrmResourceVO; import com.engine.organization.entity.hrmresource.vo.ScHrmResourceVO;
import com.engine.organization.entity.job.bo.JobBO; import com.engine.organization.entity.job.bo.JobBO;
import com.engine.organization.entity.job.po.JobPO; import com.engine.organization.entity.job.po.JobPO;
@ -21,7 +25,14 @@ import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.mapper.comp.CompMapper; import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper; import com.engine.organization.mapper.department.DepartmentMapper;
import com.engine.organization.mapper.extend.ExtendTitleMapper; import com.engine.organization.mapper.extend.ExtendTitleMapper;
import com.engine.organization.mapper.hrmresource.HrmRelationMapper;
import com.engine.organization.mapper.job.JobMapper; 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.service.ExtService; import com.engine.organization.service.ExtService;
import com.engine.organization.service.HrmResourceService; import com.engine.organization.service.HrmResourceService;
import com.engine.organization.util.MenuBtn; import com.engine.organization.util.MenuBtn;
@ -39,6 +50,7 @@ import weaver.hrm.User;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* @author:dxfeng * @author:dxfeng
@ -82,6 +94,34 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
*/ */
private static final String JCL_ORG_HRMEXT_DT1 = "JCL_ORG_HRMRESOURCEEXT_DT1"; private static final String JCL_ORG_HRMEXT_DT1 = "JCL_ORG_HRMRESOURCEEXT_DT1";
private SchemeMapper getSchemeMapper() {
return MapperProxyFactory.getProxy(SchemeMapper.class);
}
private LevelMapper getLevelMapper() {
return MapperProxyFactory.getProxy(LevelMapper.class);
}
private GradeMapper getGradeMapper() {
return MapperProxyFactory.getProxy(GradeMapper.class);
}
private SequenceMapper getSequenceMapper() {
return MapperProxyFactory.getProxy(SequenceMapper.class);
}
private PostMapper getPostMapper() {
return MapperProxyFactory.getProxy(PostMapper.class);
}
private PostInfoMapper getPostInfoMapper() {
return MapperProxyFactory.getProxy(PostInfoMapper.class);
}
private HrmRelationMapper getHrmRelationMapper() {
return MapperProxyFactory.getProxy(HrmRelationMapper.class);
}
private DepartmentMapper getDepartmentMapper() { private DepartmentMapper getDepartmentMapper() {
return MapperProxyFactory.getProxy(DepartmentMapper.class); return MapperProxyFactory.getProxy(DepartmentMapper.class);
} }
@ -102,6 +142,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
return ServiceUtil.getService(ExtServiceImpl.class, user); return ServiceUtil.getService(ExtServiceImpl.class, user);
} }
@Override @Override
public Map<String, Object> getSearchTree(SearchTreeParams params) { public Map<String, Object> getSearchTree(SearchTreeParams params) {
String keyword = params.getKeyword(); String keyword = params.getKeyword();
@ -243,6 +284,116 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
return btnDatas; return btnDatas;
} }
@Override
public Map<String, Object> getTabForm(Map<String, Object> params) {
String viewAttrStr = (String) params.get("viewAttr");
OrganizationAssert.notBlank(viewAttrStr, "未指定操作类型,请确认");
String id = Util.null2String(params.get("id"));
OrganizationAssert.notBlank(id, "数据有误,请确认");
int viewAttr = Integer.parseInt(viewAttrStr);
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionItem> selectItems = new ArrayList<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
SearchConditionItem schemeId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "等级方案", "161", "schemeId", "schemeBrowser");
schemeId.setRules("required");
SearchConditionItem gradeId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职级", "161", "gradeId", "gradeBrowser");
gradeId.setRules("required");
SearchConditionItem levelId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职等", "162", "levelId", "levelBrowser");
levelId.setRules("required");
SearchConditionItem sequenceId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "岗位序列", "161", "sequenceId", "sequenceBrowser");
sequenceId.setRules("required");
SearchConditionItem postId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职务分类", "161", "postId", "postBrowser");
postId.setRules("required");
SearchConditionItem postInfoId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "职务信息", "161", "postInfoId", "postInfoBrowser");
postInfoId.setRules("required");
SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "分部", "161", "companyId", "compBrowser");
companyId.setRules("required");
SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "部门", "161", "departmentId", "deptBrowser");
departmentId.setRules("required");
SearchConditionItem jobId = OrganizationFormItemUtil.browserItem(user, 2, 17, viewAttr, false, "岗位", "161", "jobId", "jobBrowser");
jobId.setRules("required");
// 编辑状态下赋值操作
HrmRelationPO relationPO = getHrmRelationMapper().getRelationById(Long.parseLong(id));
if (null != relationPO) {
setBrowserValue(schemeId, relationPO.getSchemeId(), getSchemeMapper().listSchemesByIds(Stream.of(relationPO.getSchemeId()).collect(Collectors.toList())), null, null);
setBrowserValue(gradeId, relationPO.getGradeId(), getGradeMapper().listGradessByIds(Stream.of(relationPO.getGradeId()).collect(Collectors.toList())), "scheme_id", relationPO.getSchemeId());
setBrowserValue(levelId, relationPO.getLevelId(), getLevelMapper().listLevelsByIds(DeleteParam.builder().ids(relationPO.getLevelId()).build().getIds()), "grade_id", relationPO.getGradeId());
setBrowserValue(sequenceId, relationPO.getSequenceId(), getSequenceMapper().listSequencesByIds(Stream.of(relationPO.getSequenceId()).collect(Collectors.toList())), "scheme_id", relationPO.getSchemeId());
setBrowserValue(postId, relationPO.getPostId(), getPostMapper().listPostsByIds(Stream.of(relationPO.getPostId()).collect(Collectors.toList())), null, null);
setBrowserValue(postInfoId, relationPO.getPostInfoId(), getPostInfoMapper().listPostInfosByIds(Stream.of(relationPO.getPostInfoId()).collect(Collectors.toList())), "post_id", relationPO.getPostId());
setBrowserValue(companyId, relationPO.getCompanyId(), getCompMapper().listCompsByIds(Stream.of(relationPO.getCompanyId()).collect(Collectors.toList())), null, null);
setBrowserValue(departmentId, relationPO.getDepartmentId(), getDepartmentMapper().listDeptsByIds(Stream.of(relationPO.getDepartmentId()).collect(Collectors.toList())), "comp_id", relationPO.getCompanyId());
setBrowserValue(jobId, relationPO.getJobId(), getJobMapper().listJobsByIds(Stream.of(relationPO.getJobId()).collect(Collectors.toList())), "dept_id", relationPO.getDepartmentId());
}
selectItems.add(schemeId);
selectItems.add(gradeId);
selectItems.add(levelId);
selectItems.add(sequenceId);
selectItems.add(postId);
selectItems.add(postInfoId);
selectItems.add(companyId);
selectItems.add(departmentId);
selectItems.add(jobId);
addGroups.add(new SearchConditionGroup("基本信息", true, selectItems));
HashMap<String, Object> buttonsMap = new HashMap<>();
buttonsMap.put("hasEdit", true);
buttonsMap.put("hasSave", true);
apiDatas.put("buttons", buttonsMap);
apiDatas.put("conditions", addGroups);
return apiDatas;
}
@Override
public long saveTabForm(HrmRelationSaveParam params) {
HrmRelationPO hrmRelationPO = HrmRelationBO.convertSaveParamToPO(params);
hrmRelationPO.setCreator((long) user.getUID());
hrmRelationPO.setCreateTime(new Date());
hrmRelationPO.setDeleteType(0);
getHrmRelationMapper().insertIgnoreNull(hrmRelationPO);
return hrmRelationPO.getId();
}
@Override
public long updateTabForm(HrmRelationSaveParam params) {
HrmRelationPO hrmRelationPO = HrmRelationBO.convertSaveParamToPO(params);
hrmRelationPO.setUpdateTime(new Date());
getHrmRelationMapper().updateHrmRelation(hrmRelationPO);
return hrmRelationPO.getId();
}
/**
*
*
* @param browserItem
* @param browserValue
* @param maps
*/
private void setBrowserValue(SearchConditionItem browserItem, Object browserValue, List<Map<String, Object>> maps, String relateField, Object relatedValue) {
browserItem.setValue(browserValue);
BrowserBean browserBean = browserItem.getBrowserConditionParam();
browserBean.setReplaceDatas(maps);
browserItem.setBrowserConditionParam(browserBean);
if (StringUtils.isNotBlank(relateField) && 1 != browserItem.getViewAttr()) {
long l = System.currentTimeMillis();
Map<String, Object> completeParams = browserBean.getCompleteParams();
completeParams.put("currenttime", l);
completeParams.put(relateField + "_" + l, relatedValue);
Map<String, Object> conditionDataParams = browserBean.getConditionDataParams();
conditionDataParams.put("currenttime", l);
conditionDataParams.put(relateField + "_" + l, relatedValue);
Map<String, Object> dataParams = browserBean.getDataParams();
dataParams.put("currenttime", l);
dataParams.put(relateField + "_" + l, relatedValue);
Map<String, Object> destDataParams = browserBean.getDestDataParams();
destDataParams.put("currenttime", l);
destDataParams.put(relateField + "_" + l, relatedValue);
}
}
/** /**
* *
* *

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.engine.common.util.ParamUtil; import com.engine.common.util.ParamUtil;
import com.engine.common.util.ServiceUtil; 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.hrmresource.param.HrmResourceSearchParam;
import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.util.response.ReturnResult; import com.engine.organization.util.response.ReturnResult;
@ -67,7 +68,7 @@ public class HrmResourceController {
HrmResourceSearchParam param = JSONObject.toJavaObject((JSON) JSONObject.toJSON(map), HrmResourceSearchParam.class); HrmResourceSearchParam param = JSONObject.toJavaObject((JSON) JSONObject.toJSON(map), HrmResourceSearchParam.class);
return ReturnResult.successed(getHrmResourceWrapper(user).listPage(param)); return ReturnResult.successed(getHrmResourceWrapper(user).listPage(param));
} catch (Exception e) { } catch (Exception e) {
return ReturnResult.exceptionHandle(e); return ReturnResult.exceptionHandle(e);
} }
} }
@ -86,7 +87,7 @@ public class HrmResourceController {
User user = HrmUserVarify.getUser(request, response); User user = HrmUserVarify.getUser(request, response);
return ReturnResult.successed(getHrmResourceWrapper(user).getSaveForm()); return ReturnResult.successed(getHrmResourceWrapper(user).getSaveForm());
} catch (Exception e) { } catch (Exception e) {
return ReturnResult.exceptionHandle(e); return ReturnResult.exceptionHandle(e);
} }
} }
@ -105,7 +106,7 @@ public class HrmResourceController {
User user = HrmUserVarify.getUser(request, response); User user = HrmUserVarify.getUser(request, response);
return ReturnResult.successed(getHrmResourceWrapper(user).saveBaseForm(params)); return ReturnResult.successed(getHrmResourceWrapper(user).saveBaseForm(params));
} catch (Exception e) { } catch (Exception e) {
return ReturnResult.exceptionHandle(e); return ReturnResult.exceptionHandle(e);
} }
} }
@ -125,7 +126,7 @@ public class HrmResourceController {
Map<String, Object> map = ParamUtil.request2Map(request); Map<String, Object> map = ParamUtil.request2Map(request);
return ReturnResult.successed(getHrmResourceWrapper(user).getBaseForm(map)); return ReturnResult.successed(getHrmResourceWrapper(user).getBaseForm(map));
} catch (Exception e) { } catch (Exception e) {
return ReturnResult.exceptionHandle(e); return ReturnResult.exceptionHandle(e);
} }
} }
@ -145,7 +146,7 @@ public class HrmResourceController {
Map<String, Object> map = ParamUtil.request2Map(request); Map<String, Object> map = ParamUtil.request2Map(request);
return ReturnResult.successed(getHrmResourceWrapper(user).updateForm(map)); return ReturnResult.successed(getHrmResourceWrapper(user).updateForm(map));
} catch (Exception e) { } catch (Exception e) {
return ReturnResult.exceptionHandle(e); return ReturnResult.exceptionHandle(e);
} }
} }
@ -165,7 +166,7 @@ public class HrmResourceController {
Map<String, Object> map = ParamUtil.request2Map(request); Map<String, Object> map = ParamUtil.request2Map(request);
return ReturnResult.successed(getHrmResourceWrapper(user).getSearchCondition(map)); return ReturnResult.successed(getHrmResourceWrapper(user).getSearchCondition(map));
} catch (Exception e) { } catch (Exception e) {
return ReturnResult.exceptionHandle(e); return ReturnResult.exceptionHandle(e);
} }
} }
@ -184,7 +185,44 @@ public class HrmResourceController {
User user = HrmUserVarify.getUser(request, response); User user = HrmUserVarify.getUser(request, response);
return ReturnResult.successed(getHrmResourceWrapper(user).getHasRight()); return ReturnResult.successed(getHrmResourceWrapper(user).getHasRight());
} catch (Exception e) { } catch (Exception e) {
return ReturnResult.exceptionHandle(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,6 +1,7 @@
package com.engine.organization.wrapper; package com.engine.organization.wrapper;
import com.engine.common.util.ServiceUtil; 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.hrmresource.param.HrmResourceSearchParam;
import com.engine.organization.entity.searchtree.SearchTreeParams; import com.engine.organization.entity.searchtree.SearchTreeParams;
import com.engine.organization.service.HrmResourceService; import com.engine.organization.service.HrmResourceService;
@ -55,5 +56,16 @@ public class HrmResourceWrapper extends OrganizationWrapper {
return getHrmResourceService(user).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);
}
} }

Loading…
Cancel
Save