diff --git a/docs/表结构SQL/MySQL.sql b/docs/表结构SQL/MySQL.sql
index e07ea392..9f0e7172 100644
--- a/docs/表结构SQL/MySQL.sql
+++ b/docs/表结构SQL/MySQL.sql
@@ -481,7 +481,7 @@ CREATE TABLE HR_LOG (
operate_desc varchar(100) NULL,
operator_id int NULL,
operator_name varchar(100) NULL,
- create_time date NULL,
+ create_time datetime NULL,
operate_type int NULL,
params_str varchar(2000) NULL,
client_ip varchar(100) NULL,
@@ -494,3 +494,21 @@ CREATE TABLE HR_LOG (
value varchar(100) NULL,
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)
+);
diff --git a/docs/表结构SQL/Oracle.sql b/docs/表结构SQL/Oracle.sql
index 600b39f1..57df152b 100644
--- a/docs/表结构SQL/Oracle.sql
+++ b/docs/表结构SQL/Oracle.sql
@@ -462,4 +462,22 @@ CREATE TABLE HR_LOG (
MESSAGE NVARCHAR2(2000) NULL,
VALUE NVARCHAR2(100) NULL,
CONSTRAINT HR_LOG_PK PRIMARY KEY (ID)
-);
\ No newline at end of file
+);
+
+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)
+);
diff --git a/docs/表结构SQL/SqlServer.sql b/docs/表结构SQL/SqlServer.sql
index 04c850ba..f791ae5b 100644
--- a/docs/表结构SQL/SqlServer.sql
+++ b/docs/表结构SQL/SqlServer.sql
@@ -461,4 +461,22 @@ CREATE TABLE HR_LOG (
message varchar(2000) NULL,
value varchar(100) NULL,
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)
);
\ No newline at end of file
diff --git a/src/com/engine/organization/entity/hrmresource/bo/HrmRelationBO.java b/src/com/engine/organization/entity/hrmresource/bo/HrmRelationBO.java
new file mode 100644
index 00000000..d1bff0ba
--- /dev/null
+++ b/src/com/engine/organization/entity/hrmresource/bo/HrmRelationBO.java
@@ -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();
+ }
+}
diff --git a/src/com/engine/organization/entity/hrmresource/param/HrmRelationSaveParam.java b/src/com/engine/organization/entity/hrmresource/param/HrmRelationSaveParam.java
new file mode 100644
index 00000000..04a0c1e4
--- /dev/null
+++ b/src/com/engine/organization/entity/hrmresource/param/HrmRelationSaveParam.java
@@ -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;
+}
diff --git a/src/com/engine/organization/entity/hrmresource/po/HrmRelationPO.java b/src/com/engine/organization/entity/hrmresource/po/HrmRelationPO.java
new file mode 100644
index 00000000..0e9c7899
--- /dev/null
+++ b/src/com/engine/organization/entity/hrmresource/po/HrmRelationPO.java
@@ -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;
+
+}
diff --git a/src/com/engine/organization/mapper/hrmresource/HrmRelationMapper.java b/src/com/engine/organization/mapper/hrmresource/HrmRelationMapper.java
new file mode 100644
index 00000000..2d82fdd5
--- /dev/null
+++ b/src/com/engine/organization/mapper/hrmresource/HrmRelationMapper.java
@@ -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);
+}
diff --git a/src/com/engine/organization/mapper/hrmresource/HrmRelationMapper.xml b/src/com/engine/organization/mapper/hrmresource/HrmRelationMapper.xml
new file mode 100644
index 00000000..01b0b6f7
--- /dev/null
+++ b/src/com/engine/organization/mapper/hrmresource/HrmRelationMapper.xml
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+ INSERT INTO jcl_org_hrmrelation
+
+
+ creator,
+
+
+ delete_type,
+
+
+ create_time,
+
+
+ update_time,
+
+
+ id,
+
+
+ scheme_id,
+
+
+ level_id,
+
+
+ grade_id,
+
+
+ sequence_id,
+
+
+ post_id,
+
+
+ post_info_id,
+
+
+ company_id,
+
+
+ department_id,
+
+
+ job_id,
+
+
+
+
+ #{creator},
+
+
+ #{deleteType},
+
+
+ #{createTime},
+
+
+ #{updateTime},
+
+
+ #{id},
+
+
+ #{schemeId},
+
+
+ #{levelId},
+
+
+ #{gradeId},
+
+
+ #{sequenceId},
+
+
+ #{postId},
+
+
+ #{postInfoId},
+
+
+ #{companyId},
+
+
+ #{departmentId},
+
+
+ #{jobId},
+
+
+
+
+ update jcl_org_hrmrelation
+
+ 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},
+
+ WHERE id = #{id} AND delete_type = 0
+
+
+
+
+
\ No newline at end of file
diff --git a/src/com/engine/organization/mapper/scheme/GradeMapper.java b/src/com/engine/organization/mapper/scheme/GradeMapper.java
index 562aaee5..4e246948 100644
--- a/src/com/engine/organization/mapper/scheme/GradeMapper.java
+++ b/src/com/engine/organization/mapper/scheme/GradeMapper.java
@@ -2,10 +2,12 @@ package com.engine.organization.mapper.scheme;
import com.engine.organization.entity.scheme.po.GradePO;
+import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
+import java.util.Map;
/**
* @Author dxfeng
@@ -81,4 +83,8 @@ public interface GradeMapper {
List listUsedId();
List getGradeNameByIds(@Param("ids") Collection ids);
+
+ @MapKey("id")
+ List