Pre Merge pull request !152 from reset/develop

pull/152/MERGE
reset 3 years ago committed by Gitee
commit 112931a987
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

Binary file not shown.

@ -6,7 +6,10 @@ INSERT INTO jcl_field_extendgroup
VALUES(2, 2, '基本信息', 1, 0, '2022-06-17', '2022-06-17', NULL, '1', 1, 0);
INSERT INTO jcl_field_extendgroup
(id, extend_type, group_name, creator, delete_type, create_time, update_time, pid, is_show, show_order, is_system_default)
VALUES(3, 3, '信息', 1, 0, '2022-06-17', '2022-06-17', NULL, '1', 1, 0);
VALUES(3, 3, '信息', 1, 0, '2022-06-17', '2022-06-17', NULL, '1', 1, 0);
INSERT INTO jcl_field_extendgroup
(id, extend_type, group_name, creator, delete_type, create_time, update_time, pid, is_show, show_order, is_system_default)
VALUES(4, 4, '基本信息', 1, 0, '2022-06-17', '2022-06-17', NULL, '1', 1, 0);
INSERT INTO jcl_field_extendgroup
(id, extend_type, group_name, creator, delete_type, create_time, update_time, pid, is_show, show_order, is_system_default)
VALUES(5, 3, '职务', 1, 0, '2022-07-05', '2022-07-05', 3, '1', 1, 1);

@ -1,133 +1,133 @@
-- JCL_ORG_SCHEME
CREATE TABLE JCL_ORG_SCHEME (
id int auto_increment NOT NULL,
scheme_no varchar(100) NULL,
scheme_name varchar(100) NULL,
scheme_description text NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_SCHEME_PK PRIMARY KEY (id)
id int auto_increment NOT NULL,
scheme_no varchar(100) NULL,
scheme_name varchar(100) NULL,
scheme_description text NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_SCHEME_PK PRIMARY KEY (id)
);
-- JCL_ORG_LEVEL
CREATE TABLE JCL_ORG_LEVEL (
id int auto_increment NOT NULL,
level_no varchar(100) NULL,
level_name varchar(100) NULL,
description text NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_LEVEL_PK PRIMARY KEY (id)
id int auto_increment NOT NULL,
level_no varchar(100) NULL,
level_name varchar(100) NULL,
description text NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_LEVEL_PK PRIMARY KEY (id)
);
-- JCL_ORG_GRADE
CREATE TABLE JCL_ORG_GRADE (
id int auto_increment NOT NULL,
grade_no varchar(100) NULL,
grade_name varchar(100) NULL,
description text NULL,
scheme_id int null,
level_id varchar(100) null,
forbidden_tag int NULL,
id int auto_increment NOT NULL,
grade_no varchar(100) NULL,
grade_name varchar(100) NULL,
description text NULL,
scheme_id int null,
level_id varchar(100) null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_GRADE_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_GRADE_PK PRIMARY KEY (id)
);
-- JCL_ORG_SEQUENCE
CREATE TABLE JCL_ORG_SEQUENCE (
id int auto_increment NOT NULL,
sequence_no varchar(100) NULL,
sequence_name varchar(100) NULL,
description text NULL,
scheme_id int null,
forbidden_tag int NULL,
id int auto_increment NOT NULL,
sequence_no varchar(100) NULL,
sequence_name varchar(100) NULL,
description text NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_SEQUENCE_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_SEQUENCE_PK PRIMARY KEY (id)
);
-- JCL_ORG_POST
CREATE TABLE JCL_ORG_POST (
id int auto_increment NOT NULL,
post_no varchar(100) null,
post_name varchar(100) NULL,
description text NULL,
id int auto_increment NOT NULL,
post_no varchar(100) null,
post_name varchar(100) NULL,
description text NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_POST_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_POST_PK PRIMARY KEY (id)
);
-- JCL_ORG_POST_INFO
CREATE TABLE JCL_ORG_POST_INFO (
id int auto_increment NOT NULL,
post_info_no varchar(100) null,
post_info_name varchar(100) NULL,
post_info_authority text null,
post_info_duty text null,
post_info_qualification text null,
post_id int null,
description text NULL,
forbidden_tag int NULL,
id int auto_increment NOT NULL,
post_info_no varchar(100) null,
post_info_name varchar(100) NULL,
post_info_authority text null,
post_info_duty text null,
post_info_qualification text null,
post_id int null,
description text NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_POST_INFO_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_POST_INFO_PK PRIMARY KEY (id)
);
-- JCL_ORG_COMP
CREATE TABLE JCL_ORG_COMP (
id int auto_increment NOT NULL,
comp_no varchar(100) NULL,
comp_name varchar(100) NULL,
comp_name_short varchar(100) NULL,
parent_company int null,
org_code varchar(100) NULL,
industry int null,
comp_principal int null,
description text NULL,
forbidden_tag int NULL,
show_order int NULL,
id int auto_increment NOT NULL,
comp_no varchar(100) NULL,
comp_name varchar(100) NULL,
comp_name_short varchar(100) NULL,
parent_company int null,
org_code varchar(100) NULL,
industry int null,
comp_principal int null,
description text NULL,
forbidden_tag int NULL,
show_order int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDGROUP
CREATE TABLE JCL_FIELD_EXTENDGROUP (
id int auto_increment NOT NULL,
id int auto_increment NOT NULL,
pid int null,
extend_type int null,
group_name varchar(100) NULL,
extend_type int null,
group_name varchar(100) NULL,
show_order int null,
is_show varchar(100) NULL,
is_system_default int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDTITLE
@ -147,152 +147,152 @@ create table JCL_FIELD_EXTENDTITLE (
-- JCL_FIELD_EXTENDINFO
CREATE TABLE JCL_FIELD_EXTENDINFO (
id int auto_increment NOT NULL,
extend_type int null,
table_name varchar(100) NULL,
field_name varchar(100) NULL,
field_name_desc varchar(100) NULL,
field_type varchar(1000) NULL,
control_type int null,
id int auto_increment NOT NULL,
extend_type int null,
table_name varchar(100) NULL,
field_name varchar(100) NULL,
field_name_desc varchar(100) NULL,
field_type varchar(1000) NULL,
control_type int null,
browser_type varchar(100) NULL,
custom_value text null,
extend_group_id int null,
isenable int null,
isrequired int null,
list_show int null,
search_show int null,
edit_show int null,
add_show int null,
browser_show int null,
show_order int null,
extend_group_id int null,
isenable int null,
isrequired int null,
list_show int null,
search_show int null,
edit_show int null,
add_show int null,
browser_show int null,
show_order int null,
is_system_default int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDINFO_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_FIELD_EXTENDINFO_PK PRIMARY KEY (id)
);
-- JCL_ORG_COMPEXT
CREATE TABLE JCL_ORG_COMPEXT (
id int NOT NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_COMPEXT_PK PRIMARY KEY (id)
id int NOT NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_COMPEXT_PK PRIMARY KEY (id)
);
-- JCL_ORG_COMPEXT_DT1
CREATE TABLE JCL_ORG_COMPEXT_DT1 (
id int auto_increment NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_COMPEXT_DT1_PK PRIMARY KEY (id)
id int auto_increment NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_COMPEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_DEPT
CREATE TABLE JCL_ORG_DEPT (
id int auto_increment NOT NULL,
dept_no varchar(100) NULL,
dept_name varchar(100) NULL,
dept_name_short varchar(100) NULL,
parent_comp int null,
parent_dept int null,
dept_principal int null,
show_order int null,
description text NULL,
forbidden_tag int NULL,
id int auto_increment NOT NULL,
dept_no varchar(100) NULL,
dept_name varchar(100) NULL,
dept_name_short varchar(100) NULL,
parent_comp int null,
parent_dept int null,
dept_principal int null,
show_order int null,
description text NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (id)
);
-- JCL_ORG_DEPTEXT
CREATE TABLE JCL_ORG_DEPTEXT (
id int NOT NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_DEPTEXT_PK PRIMARY KEY (id)
id int NOT NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_DEPTEXT_PK PRIMARY KEY (id)
);
-- JCL_ORG_DEPTEXT_DT1
CREATE TABLE JCL_ORG_DEPTEXT_DT1 (
id int auto_increment NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_DEPTEXT_DT1_PK PRIMARY KEY (id)
id int auto_increment NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_DEPTEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOB
CREATE TABLE JCL_ORG_JOB (
id int auto_increment NOT NULL,
job_no varchar(100) NULL,
job_name varchar(100) NULL,
parent_comp int null,
parent_dept int null,
sequence_id int null,
scheme_id int null,
parent_job int null,
is_key int null,
workplace varchar(100) NULL,
description text null,
work_duty text null,
work_authority text null,
forbidden_tag int NULL,
id int auto_increment NOT NULL,
job_no varchar(100) NULL,
job_name varchar(100) NULL,
parent_comp int null,
parent_dept int null,
sequence_id int null,
scheme_id int null,
parent_job int null,
is_key int null,
workplace varchar(100) NULL,
description text null,
work_duty text null,
work_authority text null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOB_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOB_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOBDT
CREATE TABLE JCL_ORG_JOBDT (
id int auto_increment NOT NULL,
mainid int NULL,
id int auto_increment NOT NULL,
mainid int NULL,
level_id varchar(100) NULL,
grade_id varchar(100) NULL,
level_id_span varchar(1000) NULL,
grade_id_span varchar(1000) NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOBEXT
CREATE TABLE JCL_ORG_JOBEXT (
id int NOT NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOBEXT_PK PRIMARY KEY (id)
id int NOT NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOBEXT_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOBEXT_DT1
CREATE TABLE JCL_ORG_JOBEXT_DT1 (
id int auto_increment NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (id)
id int auto_increment NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_HRMRESOURCE
@ -325,13 +325,46 @@ CREATE TABLE JCL_ORG_HRMRESOURCE (
fax varchar(60) null,
email varchar(60) null,
workroom varchar(60) null,
pass_word varchar(100) null,
sec_level int null,
birthday char(10) null,
folk varchar(30) null,
native_place varchar(100) null,
reg_resident_place varchar(200) null,
certificate_num varchar(60) null,
marital_status char(1) null,
policy varchar(30) null,
be_member_date char(10) null,
be_party_date char(10) null,
islabouunion char(1) null,
degree varchar(30) null,
health_info char(1) null,
education_level int null,
height varchar(10) null,
weight int null,
use_kind int null,
start_date char(10) null,
end_date char(10) null,
probation_end_date char(10) null,
resident_place varchar(200) null,
home_address varchar(100) null,
temp_resident_number varchar(60) null,
company_start_date varchar(10) null,
work_start_date varchar(10) null,
accum_fund_account varchar(30) null,
account_name varchar(200) null,
bank_id int null,
account_id varchar(100) null,
show_order int null,
classification char(1) null,
company_work_year decimal(10,2) null,
work_year decimal(10,2) null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_HRMRESOURCE_PK PRIMARY KEY (id)
);
-- JCL_ORG_HRMRESOURCEEXT
CREATE TABLE JCL_ORG_HRMRESOURCEEXT (
id int NOT NULL,
@ -356,58 +389,58 @@ CREATE TABLE JCL_ORG_HRMRESOURCEEXT_DT1 (
-- JCL_ORG_STAFFPLAN
CREATE TABLE JCL_ORG_STAFFPLAN (
id int auto_increment NOT NULL,
plan_no varchar(100) NULL,
plan_name varchar(100) NULL,
plan_year varchar(100) NULL,
time_start date NULL,
time_end date NULL,
company_id varchar(100) NULL,
description text NULL,
id int auto_increment NOT NULL,
plan_no varchar(100) NULL,
plan_name varchar(100) NULL,
plan_year varchar(100) NULL,
time_start date NULL,
time_end date NULL,
company_id varchar(100) NULL,
description text NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_STAFFPLAN_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_STAFFPLAN_PK PRIMARY KEY (id)
);
-- JCL_ORG_STAFF
CREATE TABLE JCL_ORG_STAFF (
id int auto_increment NOT NULL,
plan_id int null,
comp_id int null,
dept_id int null,
job_id int null,
staff_num int null,
control_policy int null,
permanent_num int null,
freeze_num int null,
lack_status int null,
staff_desc varchar(100) NULL,
description text null,
id int auto_increment NOT NULL,
plan_id int null,
comp_id int null,
dept_id int null,
job_id int null,
staff_num int null,
control_policy int null,
permanent_num int null,
freeze_num int null,
lack_status int null,
staff_desc varchar(100) NULL,
description text null,
is_used int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_STAFF_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_STAFF_PK PRIMARY KEY (id)
);
-- JCL_ORG_STAFFS
CREATE TABLE JCL_ORG_STAFFS (
id int auto_increment NOT NULL,
staff_id int null,
business_type int null,
change_num int null,
business_source int null,
requestid int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (id)
id int auto_increment NOT NULL,
staff_id int null,
business_type int null,
change_num int null,
business_source int null,
requestid int null,
creator int null,
delete_type int null,
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (id)
);
-- JCL_ORG_MAP
@ -440,4 +473,42 @@ CREATE TABLE JCL_ORG_MAP (
create_time date null,
update_time date null,
CONSTRAINT JCL_ORG_MAP PRIMARY KEY (id)
);
);
-- HR_LOG
CREATE TABLE HR_LOG (
id int AUTO_INCREMENT NOT NULL,
operate_desc varchar(100) NULL,
operator_id int NULL,
operator_name varchar(100) NULL,
create_time datetime NULL,
operate_type int NULL,
params_str varchar(2000) NULL,
client_ip varchar(100) NULL,
method_name varchar(100) NULL,
delete_type int NULL,
class_name varchar(100) NULL,
operate_module_name varchar(100) NULL,
operate_module int NULL,
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)
);

@ -1,135 +1,135 @@
-- JCL_ORG_SCHEME
CREATE TABLE JCL_ORG_SCHEME (
ID NUMBER NOT NULL,
SCHEME_NO NVARCHAR2(100) NULL,
SCHEME_NAME NVARCHAR2(100) NULL,
SCHEME_DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_SCHEME_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
SCHEME_NO NVARCHAR2(100) NULL,
SCHEME_NAME NVARCHAR2(100) NULL,
SCHEME_DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_SCHEME_PK PRIMARY KEY (ID)
);
-- JCL_ORG_LEVEL
CREATE TABLE JCL_ORG_LEVEL (
ID NUMBER NOT NULL,
LEVEL_NO NVARCHAR2(100) NULL,
LEVEL_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
SCHEME_ID NUMBER NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_LEVEL_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
LEVEL_NO NVARCHAR2(100) NULL,
LEVEL_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
SCHEME_ID NUMBER NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_LEVEL_PK PRIMARY KEY (ID)
);
-- JCL_ORG_GRADE
CREATE TABLE JCL_ORG_GRADE (
ID NUMBER NOT NULL,
GRADE_NO NVARCHAR2(100) NULL,
GRADE_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
SCHEME_ID NUMBER NULL,
LEVEL_ID NVARCHAR2(100) NULL,
FORBIDDEN_TAG NUMBER NULL,
ID NUMBER NOT NULL,
GRADE_NO NVARCHAR2(100) NULL,
GRADE_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
SCHEME_ID NUMBER NULL,
LEVEL_ID NVARCHAR2(100) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_GRADE_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_GRADE_PK PRIMARY KEY (ID)
);
-- JCL_ORG_SEQUENCE
CREATE TABLE JCL_ORG_SEQUENCE (
ID NUMBER NOT NULL,
SEQUENCE_NO NVARCHAR2(100) NULL,
SEQUENCE_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
SCHEME_ID NUMBER NULL,
FORBIDDEN_TAG NUMBER NULL,
ID NUMBER NOT NULL,
SEQUENCE_NO NVARCHAR2(100) NULL,
SEQUENCE_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
SCHEME_ID NUMBER NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_SEQUENCE_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_SEQUENCE_PK PRIMARY KEY (ID)
);
-- JCL_ORG_POST
CREATE TABLE JCL_ORG_POST (
ID NUMBER NOT NULL,
POST_NO NVARCHAR2(100) NULL,
POST_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
ID NUMBER NOT NULL,
POST_NO NVARCHAR2(100) NULL,
POST_NAME NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_POST_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_POST_PK PRIMARY KEY (ID)
);
-- JCL_ORG_POST_INFO
CREATE TABLE JCL_ORG_POST_INFO (
ID NUMBER NOT NULL,
POST_INFO_NO NVARCHAR2(100) NULL,
POST_INFO_NAME NVARCHAR2(100) NULL,
POST_INFO_AUTHORITY NVARCHAR2(1000) NULL,
POST_INFO_DUTY NVARCHAR2(1000) NULL,
POST_INFO_QUALIFICATION NVARCHAR2(1000) NULL,
POST_ID NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
ID NUMBER NOT NULL,
POST_INFO_NO NVARCHAR2(100) NULL,
POST_INFO_NAME NVARCHAR2(100) NULL,
POST_INFO_AUTHORITY NVARCHAR2(1000) NULL,
POST_INFO_DUTY NVARCHAR2(1000) NULL,
POST_INFO_QUALIFICATION NVARCHAR2(1000) NULL,
POST_ID NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_POST_INFO_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_POST_INFO_PK PRIMARY KEY (ID)
);
-- JCL_ORG_COMP
CREATE TABLE JCL_ORG_COMP (
ID NUMBER NOT NULL,
COMP_NO NVARCHAR2(100) NULL,
COMP_NAME NVARCHAR2(100) NULL,
COMP_NAME_SHORT NVARCHAR2(100) NULL,
PARENT_COMPANY NUMBER NULL,
ORG_CODE NVARCHAR2(100) NULL,
INDUSTRY NUMBER NULL,
COMP_PRINCIPAL NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
SHOW_ORDER NUMBER NULL,
ID NUMBER NOT NULL,
COMP_NO NVARCHAR2(100) NULL,
COMP_NAME NVARCHAR2(100) NULL,
COMP_NAME_SHORT NVARCHAR2(100) NULL,
PARENT_COMPANY NUMBER NULL,
ORG_CODE NVARCHAR2(100) NULL,
INDUSTRY NUMBER NULL,
COMP_PRINCIPAL NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
SHOW_ORDER NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (ID)
);
-- JCL_FIELD_EXTENDGROUP
CREATE TABLE JCL_FIELD_EXTENDGROUP (
ID NUMBER NOT NULL,
PID NUMBER NULL,
ID NUMBER NOT NULL,
PID NUMBER NULL,
EXTEND_TYPE NUMBER NULL,
GROUP_NAME NVARCHAR2(100) NULL,
GROUP_NAME NVARCHAR2(100) NULL,
SHOW_ORDER NUMBER null,
IS_SHOW NVARCHAR2(100) NULL,
IS_SYSTEM_DEFAULT NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (ID)
);
-- JCL_FIELD_EXTENDTITLE
@ -149,152 +149,152 @@ CREATE TABLE JCL_FIELD_EXTENDTITLE (
-- JCL_FIELD_EXTENDINFO
CREATE TABLE JCL_FIELD_EXTENDINFO (
ID NUMBER NOT NULL,
EXTEND_TYPE NUMBER NULL,
TABLE_NAME NVARCHAR2(100) NULL,
FIELD_NAME NVARCHAR2(100) NULL,
FIELD_NAME_DESC NVARCHAR2(100) NULL,
FIELD_TYPE NVARCHAR2(1000) NULL,
CONTROL_TYPE NUMBER NULL,
ID NUMBER NOT NULL,
EXTEND_TYPE NUMBER NULL,
TABLE_NAME NVARCHAR2(100) NULL,
FIELD_NAME NVARCHAR2(100) NULL,
FIELD_NAME_DESC NVARCHAR2(100) NULL,
FIELD_TYPE NVARCHAR2(1000) NULL,
CONTROL_TYPE NUMBER NULL,
CUSTOM_VALUE NVARCHAR2(1000) NULL,
BROWSER_TYPE NVARCHAR2(100) NULL,
EXTEND_GROUP_ID NUMBER NULL,
ISENABLE NUMBER NULL,
ISREQUIRED NUMBER NULL,
LIST_SHOW NUMBER NULL,
SEARCH_SHOW NUMBER NULL,
EDIT_SHOW NUMBER NULL,
ADD_SHOW NUMBER NULL,
BROWSER_SHOW NUMBER NULL,
SHOW_ORDER NUMBER NULL,
EXTEND_GROUP_ID NUMBER NULL,
ISENABLE NUMBER NULL,
ISREQUIRED NUMBER NULL,
LIST_SHOW NUMBER NULL,
SEARCH_SHOW NUMBER NULL,
EDIT_SHOW NUMBER NULL,
ADD_SHOW NUMBER NULL,
BROWSER_SHOW NUMBER NULL,
SHOW_ORDER NUMBER NULL,
IS_SYSTEM_DEFAULT NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_FIELD_EXTENDINFO_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_FIELD_EXTENDINFO_PK PRIMARY KEY (ID)
);
-- JCL_ORG_COMPEXT
CREATE TABLE JCL_ORG_COMPEXT (
ID NUMBER NOT NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_COMPEXT_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_COMPEXT_PK PRIMARY KEY (ID)
);
-- JCL_ORG_COMPEXT_DT1
CREATE TABLE JCL_ORG_COMPEXT_DT1 (
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_COMPEXT_DT1_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_COMPEXT_DT1_PK PRIMARY KEY (ID)
);
-- JCL_ORG_DEPT
CREATE TABLE JCL_ORG_DEPT (
ID NUMBER NOT NULL,
DEPT_NO NVARCHAR2(100) NULL,
DEPT_NAME NVARCHAR2(100) NULL,
DEPT_NAME_SHORT NVARCHAR2(100) NULL,
PARENT_COMP NUMBER NULL,
PARENT_DEPT NUMBER NULL,
DEPT_PRINCIPAL NUMBER NULL,
SHOW_ORDER NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
ID NUMBER NOT NULL,
DEPT_NO NVARCHAR2(100) NULL,
DEPT_NAME NVARCHAR2(100) NULL,
DEPT_NAME_SHORT NVARCHAR2(100) NULL,
PARENT_COMP NUMBER NULL,
PARENT_DEPT NUMBER NULL,
DEPT_PRINCIPAL NUMBER NULL,
SHOW_ORDER NUMBER NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (ID)
);
-- JCL_ORG_DEPTEXT
CREATE TABLE JCL_ORG_DEPTEXT (
ID NUMBER NOT NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_DEPTEXT_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_DEPTEXT_PK PRIMARY KEY (ID)
);
-- JCL_ORG_DEPTEXT_DT1
CREATE TABLE JCL_ORG_DEPTEXT_DT1 (
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_DEPTEXT_DT1_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_DEPTEXT_DT1_PK PRIMARY KEY (ID)
);
-- JCL_ORG_JOB
CREATE TABLE JCL_ORG_JOB (
ID NUMBER NOT NULL,
JOB_NO NVARCHAR2(100) NULL,
JOB_NAME NVARCHAR2(100) NULL,
PARENT_COMP NUMBER NULL,
PARENT_DEPT NUMBER NULL,
SEQUENCE_ID NUMBER NULL,
SCHEME_ID NUMBER NULL,
PARENT_JOB NUMBER NULL,
IS_KEY NUMBER NULL,
WORKPLACE NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
WORK_DUTY NVARCHAR2(1000) NULL,
WORK_AUTHORITY NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
ID NUMBER NOT NULL,
JOB_NO NVARCHAR2(100) NULL,
JOB_NAME NVARCHAR2(100) NULL,
PARENT_COMP NUMBER NULL,
PARENT_DEPT NUMBER NULL,
SEQUENCE_ID NUMBER NULL,
SCHEME_ID NUMBER NULL,
PARENT_JOB NUMBER NULL,
IS_KEY NUMBER NULL,
WORKPLACE NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
WORK_DUTY NVARCHAR2(1000) NULL,
WORK_AUTHORITY NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOB_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOB_PK PRIMARY KEY (ID)
);
-- JCL_ORG_JOBDT
CREATE TABLE JCL_ORG_JOBDT (
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
LEVEL_ID NVARCHAR2(100) NULL,
GRADE_ID NVARCHAR2(100) NULL,
LEVEL_ID_SPAN NVARCHAR2(1000) NULL,
GRADE_ID_SPAN NVARCHAR2(1000) NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (ID)
);
-- JCL_ORG_JOBEXT
CREATE TABLE JCL_ORG_JOBEXT (
ID NUMBER NOT NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOBEXT_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOBEXT_PK PRIMARY KEY (ID)
);
-- JCL_ORG_JOBEXT_DT1
CREATE TABLE JCL_ORG_JOBEXT_DT1 (
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (ID)
ID NUMBER NOT NULL,
MAINID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (ID)
);
-- JCL_ORG_HRMRESOURCE
@ -327,6 +327,40 @@ CREATE TABLE JCL_ORG_HRMRESOURCE (
FAX NVARCHAR2(60) NULL,
EMAIL NVARCHAR2(60) NULL,
WORKROOM NVARCHAR2(60) NULL,
PASS_WORD NVARCHAR2(100) NULL,
SEC_LEVEL NUMBER NULL,
BIRTHDAY CHAR(10) NULL,
FOLK NVARCHAR2(30) NULL,
NATIVE_PLACE NVARCHAR2(100) NULL,
REG_RESIDENT_PLACE NVARCHAR2(200) NULL,
CERTIFICATE_NUM NVARCHAR2(60) NULL,
MARITAL_STATUS CHAR(1) NULL,
POLICY NVARCHAR2(30) NULL,
BE_MEMBER_DATE CHAR(10) NULL,
BE_PARTY_DATE CHAR(10) NULL,
ISLABOUUNION CHAR(1) NULL,
DEGREE NVARCHAR2(30) NULL,
HEALTH_INFO CHAR(1) NULL,
EDUCATION_LEVEL NUMBER NULL,
HEIGHT NVARCHAR2(10) NULL,
WEIGHT NUMBER NULL,
USE_KIND NUMBER NULL,
START_DATE CHAR(10) NULL,
END_DATE CHAR(10) NULL,
PROBATION_END_DATE CHAR(10) NULL,
RESIDENT_PLACE NVARCHAR2(200) NULL,
HOME_ADDRESS NVARCHAR2(100) NULL,
TEMP_RESIDENT_NUMBER NVARCHAR2(60) NULL,
COMPANY_START_DATE NVARCHAR2(10) NULL,
WORK_START_DATE NVARCHAR2(10) NULL,
ACCUM_FUND_ACCOUNT NVARCHAR2(30) NULL,
ACCOUNT_NAME NVARCHAR2(200) NULL,
BANK_ID NUMBER NULL,
ACCOUNT_ID NVARCHAR2(100) NULL,
SHOW_ORDER NUMBER NULL,
CLASSIFICATION CHAR(1) NULL,
COMPANY_WORK_YEAR DECIMAL(10,2) NULL,
WORK_YEAR DECIMAL(10,2) NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
@ -357,56 +391,93 @@ CREATE TABLE JCL_ORG_HRMRESOURCEEXT_DT1 (
-- JCL_ORG_STAFFPLAN
CREATE TABLE JCL_ORG_STAFFPLAN (
ID NUMBER NOT NULL,
PLAN_NO NVARCHAR2(100) NULL,
PLAN_NAME NVARCHAR2(100) NULL,
PLAN_YEAR NVARCHAR2(100) NULL,
TIME_START DATE NULL,
TIME_END DATE NULL,
COMPANY_ID NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
ID NUMBER NOT NULL,
PLAN_NO NVARCHAR2(100) NULL,
PLAN_NAME NVARCHAR2(100) NULL,
PLAN_YEAR NVARCHAR2(100) NULL,
TIME_START DATE NULL,
TIME_END DATE NULL,
COMPANY_ID NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
FORBIDDEN_TAG NUMBER NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_STAFFPLAN_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_STAFFPLAN_PK PRIMARY KEY (ID)
);
-- JCL_ORG_STAFF
CREATE TABLE JCL_ORG_STAFF (
ID NUMBER NOT NULL,
PLAN_ID NUMBER NULL,
COMP_ID NUMBER NULL,
DEPT_ID NUMBER NULL,
JOB_ID NUMBER NULL,
STAFF_NUM NUMBER NULL,
CONTROL_POLICY NUMBER NULL,
PERMANENT_NUM NUMBER NULL,
FREEZE_NUM NUMBER NULL,
LACK_STATUS NUMBER NULL,
STAFF_DESC NVARCHAR2(100) NULL,
ID NUMBER NOT NULL,
PLAN_ID NUMBER NULL,
COMP_ID NUMBER NULL,
DEPT_ID NUMBER NULL,
JOB_ID NUMBER NULL,
STAFF_NUM NUMBER NULL,
CONTROL_POLICY NUMBER NULL,
PERMANENT_NUM NUMBER NULL,
FREEZE_NUM NUMBER NULL,
LACK_STATUS NUMBER NULL,
STAFF_DESC NVARCHAR2(100) NULL,
DESCRIPTION NVARCHAR2(1000) NULL,
IS_USED NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_STAFF_PK PRIMARY KEY (ID)
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_STAFF_PK PRIMARY KEY (ID)
);
-- JCL_ORG_STAFFS
CREATE TABLE JCL_ORG_STAFFS (
ID NUMBER NOT NULL,
STAFF_ID NUMBER NULL,
BUSINESS_TYPE NUMBER NULL,
CHANGE_NUM NUMBER NULL,
BUSINESS_SOURCE NUMBER NULL,
REQUESTID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (ID)
);
ID NUMBER NOT NULL,
STAFF_ID NUMBER NULL,
BUSINESS_TYPE NUMBER NULL,
CHANGE_NUM NUMBER NULL,
BUSINESS_SOURCE NUMBER NULL,
REQUESTID NUMBER NULL,
CREATOR NUMBER NULL,
DELETE_TYPE NUMBER NULL,
CREATE_TIME DATE NULL,
UPDATE_TIME DATE NULL,
CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (ID)
);
CREATE TABLE HR_LOG (
ID NUMBER NOT NULL,
OPERATE_DESC NVARCHAR2(100) NULL,
OPERATOR_ID NUMBER NULL,
OPERATOR_NAME NVARCHAR2(100) NULL,
CREATE_TIME DATE NULL,
OPERATE_TYPE NUMBER NULL,
PARAMS_STR NVARCHAR2(2000) NULL,
CLIENT_IP NVARCHAR2(100) NULL,
METHOD_NAME NVARCHAR2(100) NULL,
DELETE_TYPE NUMBER NULL,
CLASS_NAME NVARCHAR2(100) NULL,
OPERATE_MODULE_NAME NVARCHAR2(100) NULL,
OPERATE_MODULE NUMBER NULL,
MESSAGE NVARCHAR2(2000) NULL,
VALUE NVARCHAR2(100) NULL,
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)
);

@ -1,133 +1,133 @@
-- JCL_ORG_SCHEME
CREATE TABLE JCL_ORG_SCHEME (
id int IDENTITY(1,1) NOT NULL,
scheme_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
scheme_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
scheme_description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_SCHEME_PK PRIMARY KEY (id)
id int IDENTITY(1,1) NOT NULL,
scheme_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
scheme_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
scheme_description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_SCHEME_PK PRIMARY KEY (id)
);
-- JCL_ORG_LEVEL
CREATE TABLE JCL_ORG_LEVEL (
id int IDENTITY(1,1) NOT NULL,
level_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
level_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_LEVEL_PK PRIMARY KEY (id)
id int IDENTITY(1,1) NOT NULL,
level_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
level_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_LEVEL_PK PRIMARY KEY (id)
);
-- JCL_ORG_GRADE
CREATE TABLE JCL_ORG_GRADE (
id int IDENTITY(1,1) NOT NULL,
grade_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
grade_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
scheme_id int null,
level_id varchar(100) null,
forbidden_tag int NULL,
id int IDENTITY(1,1) NOT NULL,
grade_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
grade_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
scheme_id int null,
level_id varchar(100) null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_GRADE_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_GRADE_PK PRIMARY KEY (id)
);
-- JCL_ORG_SEQUENCE
CREATE TABLE JCL_ORG_SEQUENCE (
id int IDENTITY(1,1) NOT NULL,
sequence_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
sequence_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
scheme_id int null,
forbidden_tag int NULL,
id int IDENTITY(1,1) NOT NULL,
sequence_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
sequence_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
scheme_id int null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_SEQUENCE_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_SEQUENCE_PK PRIMARY KEY (id)
);
-- JCL_ORG_POST
CREATE TABLE JCL_ORG_POST (
id int IDENTITY(1,1) NOT NULL,
post_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
post_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
id int IDENTITY(1,1) NOT NULL,
post_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
post_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text COLLATE Chinese_PRC_CI_AS NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_POST_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_POST_PK PRIMARY KEY (id)
);
-- JCL_ORG_POST_INFO
CREATE TABLE JCL_ORG_POST_INFO (
id int IDENTITY(1,1) NOT NULL,
post_info_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
post_info_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
post_info_authority text null,
post_info_duty text null,
post_info_qualification text null,
post_id int null,
description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
id int IDENTITY(1,1) NOT NULL,
post_info_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
post_info_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
post_info_authority text null,
post_info_duty text null,
post_info_qualification text null,
post_id int null,
description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_POST_INFO_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_POST_INFO_PK PRIMARY KEY (id)
);
-- JCL_ORG_COMP
CREATE TABLE JCL_ORG_COMP (
id int IDENTITY(1,1) NOT NULL,
comp_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
comp_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
comp_name_short varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
parent_company int null,
org_code varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
industry int null,
comp_principal int null,
description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
show_order int null,
id int IDENTITY(1,1) NOT NULL,
comp_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
comp_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
comp_name_short varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
parent_company int null,
org_code varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
industry int null,
comp_principal int null,
description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
show_order int null,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_COMP_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDGROUP
CREATE TABLE JCL_FIELD_EXTENDGROUP (
id int IDENTITY(1,1) NOT NULL,
id int IDENTITY(1,1) NOT NULL,
pid int null,
extend_type int null,
group_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
extend_type int null,
group_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
show_order int null,
is_show varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
is_system_default int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_FIELD_EXTENDGROUP_PK PRIMARY KEY (id)
);
-- JCL_FIELD_EXTENDTITLE
@ -147,152 +147,152 @@ create table JCL_FIELD_EXTENDTITLE (
-- JCL_FIELD_EXTENDINFO
CREATE TABLE JCL_FIELD_EXTENDINFO (
id int IDENTITY(1,1) NOT NULL,
extend_type int null,
table_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
field_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
field_name_desc varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
field_type varchar(1000) COLLATE Chinese_PRC_CI_AS NULL,
control_type int null,
id int IDENTITY(1,1) NOT NULL,
extend_type int null,
table_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
field_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
field_name_desc varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
field_type varchar(1000) COLLATE Chinese_PRC_CI_AS NULL,
control_type int null,
custom_value text null,
browser_type varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
extend_group_id int null,
isenable int null,
isrequired int null,
list_show int null,
search_show int null,
edit_show int null,
add_show int null,
browser_show int null,
show_order int null,
extend_group_id int null,
isenable int null,
isrequired int null,
list_show int null,
search_show int null,
edit_show int null,
add_show int null,
browser_show int null,
show_order int null,
is_system_default int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_FIELD_EXTENDINFO_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_FIELD_EXTENDINFO_PK PRIMARY KEY (id)
);
-- JCL_ORG_COMPEXT
CREATE TABLE JCL_ORG_COMPEXT (
id int NOT NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_COMPEXT_PK PRIMARY KEY (id)
id int NOT NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_COMPEXT_PK PRIMARY KEY (id)
);
-- JCL_ORG_COMPEXT_DT1
CREATE TABLE JCL_ORG_COMPEXT_DT1 (
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_COMPEXT_DT1_PK PRIMARY KEY (id)
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_COMPEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_DEPT
CREATE TABLE JCL_ORG_DEPT (
id int IDENTITY(1,1) NOT NULL,
dept_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
dept_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
dept_name_short varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
parent_comp int null,
parent_dept int null,
dept_principal int null,
show_order int null,
description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
id int IDENTITY(1,1) NOT NULL,
dept_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
dept_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
dept_name_short varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
parent_comp int null,
parent_dept int null,
dept_principal int null,
show_order int null,
description text COLLATE Chinese_PRC_CI_AS NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (id)
);
-- JCL_ORG_DEPTEXT
CREATE TABLE JCL_ORG_DEPTEXT (
id int NOT NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_DEPTEXT_PK PRIMARY KEY (id)
id int NOT NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_DEPTEXT_PK PRIMARY KEY (id)
);
-- JCL_ORG_DEPTEXT_DT1
CREATE TABLE JCL_ORG_DEPTEXT_DT1 (
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_DEPTEXT_DT1_PK PRIMARY KEY (id)
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_DEPTEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOB
CREATE TABLE JCL_ORG_JOB (
id int IDENTITY(1,1) NOT NULL,
job_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
job_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
parent_comp int null,
parent_dept int null,
sequence_id int null,
scheme_id int null,
parent_job int null,
is_key int null,
workplace varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text null,
work_duty text null,
work_authority text null,
forbidden_tag int NULL,
id int IDENTITY(1,1) NOT NULL,
job_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
job_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
parent_comp int null,
parent_dept int null,
sequence_id int null,
scheme_id int null,
parent_job int null,
is_key int null,
workplace varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text null,
work_duty text null,
work_authority text null,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOB_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOB_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOBDT
CREATE TABLE JCL_ORG_JOBDT (
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
level_id varchar(100) NULL,
grade_id varchar(100) NULL,
level_id_span varchar(1000) NULL,
grade_id_span varchar(1000) NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOBDT_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOBEXT
CREATE TABLE JCL_ORG_JOBEXT (
id int NOT NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOBEXT_PK PRIMARY KEY (id)
id int NOT NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOBEXT_PK PRIMARY KEY (id)
);
-- JCL_ORG_JOBEXT_DT1
CREATE TABLE JCL_ORG_JOBEXT_DT1 (
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (id)
id int IDENTITY(1,1) NOT NULL,
mainid int NULL,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (id)
);
-- JCL_ORG_HRMRESOURCE
@ -325,6 +325,40 @@ CREATE TABLE JCL_ORG_HRMRESOURCE (
fax varchar(60) null,
email varchar(60) null,
workroom varchar(60) null,
pass_word varchar(100) null,
sec_level int null,
birthday char(10) null,
folk varchar(30) null,
native_place varchar(100) null,
reg_resident_place varchar(200) null,
certificate_num varchar(60) null,
marital_status char(1) null,
policy varchar(30) null,
be_member_date char(10) null,
be_party_date char(10) null,
islabouunion char(1) null,
degree varchar(30) null,
health_info char(1) null,
education_level int null,
height varchar(10) null,
weight int null,
use_kind int null,
start_date char(10) null,
end_date char(10) null,
probation_end_date char(10) null,
resident_place varchar(200) null,
home_address varchar(100) null,
temp_resident_number varchar(60) null,
company_start_date varchar(10) null,
work_start_date varchar(10) null,
accum_fund_account varchar(30) null,
account_name varchar(200) null,
bank_id int null,
account_id varchar(100) null,
show_order int null,
classification char(1) null,
company_work_year decimal(10,2) null,
work_year decimal(10,2) null,
creator int null,
delete_type int null,
create_time datetime null,
@ -356,56 +390,93 @@ CREATE TABLE JCL_ORG_HRMRESOURCEEXT_DT1 (
-- JCL_ORG_STAFFPLAN
CREATE TABLE JCL_ORG_STAFFPLAN (
id int IDENTITY(1,1) NOT NULL,
plan_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
plan_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
plan_year varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
time_start datetime null,
time_end datetime null,
company_id varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text NULL,
id int IDENTITY(1,1) NOT NULL,
plan_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
plan_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
plan_year varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
time_start datetime null,
time_end datetime null,
company_id varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text NULL,
forbidden_tag int NULL,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_STAFFPLAN_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_STAFFPLAN_PK PRIMARY KEY (id)
);
-- JCL_ORG_STAFF
CREATE TABLE JCL_ORG_STAFF (
id int IDENTITY(1,1) NOT NULL,
plan_id int null,
comp_id int null,
dept_id int null,
job_id int null,
staff_num int null,
control_policy int null,
permanent_num int null,
freeze_num int null,
lack_status int null,
staff_desc varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text null,
id int IDENTITY(1,1) NOT NULL,
plan_id int null,
comp_id int null,
dept_id int null,
job_id int null,
staff_num int null,
control_policy int null,
permanent_num int null,
freeze_num int null,
lack_status int null,
staff_desc varchar(100) COLLATE Chinese_PRC_CI_AS NULL,
description text null,
is_used int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_STAFF_PK PRIMARY KEY (id)
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_STAFF_PK PRIMARY KEY (id)
);
-- JCL_ORG_STAFFS
CREATE TABLE JCL_ORG_STAFFS (
id int IDENTITY(1,1) NOT NULL,
staff_id int null,
business_type int null,
change_num int null,
business_source int null,
requestid int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (id)
id int IDENTITY(1,1) NOT NULL,
staff_id int null,
business_type int null,
change_num int null,
business_source int null,
requestid int null,
creator int null,
delete_type int null,
create_time datetime null,
update_time datetime null,
CONSTRAINT JCL_ORG_STAFFS_PK PRIMARY KEY (id)
);
CREATE TABLE HR_LOG (
id int IDENTITY(1,1) NOT NULL,
operate_desc varchar(100) NULL,
operator_id int NULL,
operator_name varchar(100) NULL,
create_time datetime NULL,
operate_type int NULL,
params_str varchar(2000) NULL,
client_ip varchar(100) NULL,
method_name varchar(100) NULL,
delete_type int NULL,
class_name varchar(100) NULL,
operate_module_name varchar(100) NULL,
operate_module int NULL,
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)
);

@ -0,0 +1,13 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @Author weaver_cl
* @Description:
* @Date 2022/6/28
* @Version V1.0
**/
@Path("/bs/hrmorganization/common")
public class ExportCommonController extends com.engine.organization.web.ExportCommonController {
}

@ -0,0 +1,12 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2022/06/29
* @version: 1.0
*/
@Path("/bs/hrmorganization/commonimport")
public class ImportCommonController extends com.engine.organization.web.ImportCommonController {
}

@ -0,0 +1,12 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @author:dxfeng
* @createTime: 2022/07/05
* @version: 1.0
*/
@Path("/bs/hrmorganization/log")
public class LogViewController extends com.engine.organization.web.LogViewController{
}

@ -0,0 +1,13 @@
package com.api.organization.web;
import javax.ws.rs.Path;
/**
* @className: OrgChartController
* @author: dengjp
* @date: 2022/7/7
* @description:
**/
@Path("/bs/hrmorganization/orgchart")
public class OrgChartController extends com.engine.organization.web.OrgChartController {
}

@ -1,5 +1,6 @@
package com.engine.organization.annotation;
import com.engine.organization.enums.LogModuleNameEnum;
import com.engine.organization.enums.OperateTypeEnum;
import java.lang.annotation.*;
@ -19,4 +20,9 @@ public @interface Log {
*
*/
String operateDesc() default "";
/**
*
*/
LogModuleNameEnum operateModule() default LogModuleNameEnum.OTHER;
}

@ -0,0 +1,28 @@
package com.engine.organization.common;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;
@Data
@Builder
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class LocalDateRange {
//"开始日期
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date fromDate;
//结束日期
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date endDate;
}

@ -37,7 +37,7 @@ public class LoggerContext implements Serializable {
private String operatorName;
// 创建时间(yyyy-MM-dd HH:mm:ss)
@JSONField(format="yyyy-MM-dd HH:mm:ss")
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
//操作类型增删改查等
@ -58,4 +58,16 @@ public class LoggerContext implements Serializable {
//是否删除
private int deleteType;
// 操作模块名称
private String operateModuleName;
// 操作模块ID
private Integer operateModule;
// 日志信息
private String message;
// 名称
private String value;
}

@ -0,0 +1,124 @@
package com.engine.organization.entity.commom;
import java.util.Objects;
/**
* @author:dxfeng
* @createTime: 2022/07/06
* @version: 1.0
*/
public class FieldInfo {
/**
*
*/
private String fieldName;
/**
*
*/
private Class<?> firstFieldType;
/**
*
*/
private Class<?> secondFieldType;
/**
*
*/
private Object firstVal;
/**
*
*/
private Object secondVal;
public FieldInfo() {
}
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType) {
this.fieldName = fieldName;
this.firstFieldType = firstFieldType;
this.secondFieldType = secondFieldType;
}
public FieldInfo(String fieldName, Class<?> fieldType, Object firstVal, Object secondVal) {
this.fieldName = fieldName;
this.firstFieldType = fieldType;
this.secondFieldType = fieldType;
this.firstVal = firstVal;
this.secondVal = secondVal;
}
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType, Object firstVal, Object secondVal) {
this.fieldName = fieldName;
this.firstFieldType = firstFieldType;
this.secondFieldType = secondFieldType;
this.firstVal = firstVal;
this.secondVal = secondVal;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public Class<?> getFirstFieldType() {
return firstFieldType;
}
public void setFirstFieldType(Class<?> firstFieldType) {
this.firstFieldType = firstFieldType;
}
public Object getFirstVal() {
return firstVal;
}
public void setFirstVal(Object firstVal) {
this.firstVal = firstVal;
}
public void setSecondFieldType(Class<?> secondFieldType) {
this.secondFieldType = secondFieldType;
}
public Class<?> getSecondFieldType() {
return secondFieldType;
}
public Object getSecondVal() {
return secondVal;
}
public void setSecondVal(Object secondVal) {
this.secondVal = secondVal;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FieldInfo fieldInfo = (FieldInfo) o;
return Objects.equals(fieldName, fieldInfo.fieldName) &&
Objects.equals(firstFieldType, fieldInfo.firstFieldType) &&
Objects.equals(secondFieldType, fieldInfo.secondFieldType) &&
Objects.equals(firstVal, fieldInfo.firstVal) &&
Objects.equals(secondVal, fieldInfo.secondVal);
}
@Override
public int hashCode() {
return Objects.hash(fieldName, firstFieldType, secondFieldType, firstVal, secondVal);
}
@Override
public String toString() {
return "FieldInfo{" +
"fieldName='" + fieldName + '\'' +
", firstFieldType=" + firstFieldType +
", secondFieldType=" + secondFieldType +
", firstVal=" + firstVal +
", secondVal=" + secondVal +
'}';
}
}

@ -44,6 +44,8 @@ public class CompBO {
Map<Long, List<CompListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentCompany() && 0 != item.getParentCompany()).collect(Collectors.groupingBy(CompListDTO::getParentCompany));
// 处理被引用数据
List<String> usedIds = MapperProxyFactory.getProxy(CompMapper.class).listUsedId();
// 兼容MySQL
usedIds.addAll(MapperProxyFactory.getProxy(CompMapper.class).listUsedIds());
List<String> collect = Arrays.stream(String.join(",", usedIds).split(",")).collect(Collectors.toList());
return dtoList.stream().peek(e -> {
List<CompListDTO> childList = collects.get(e.getId());

@ -33,7 +33,6 @@ import weaver.systeminfo.SystemEnv;
import java.util.*;
/**
* @description:
* @author:dxfeng
* @createTime: 2022/05/19
* @version: 1.0
@ -52,15 +51,14 @@ public class ExtendInfoBO {
Map<String, Object> col;
int width = 100 / infoPOList.size();
for (int i = 0; infoPOList != null && i < infoPOList.size(); i++) {
ExtendInfoPO extendInfoPO = infoPOList.get(i);
for (ExtendInfoPO extendInfoPO : infoPOList) {
String tmpkey = extendInfoPO.getFieldName();
col = new HashMap<>();
col.put("title", extendInfoPO.getFieldNameDesc());
col.put("key", tmpkey);
col.put("dataIndex", tmpkey);
col.put("com", getFieldDetialInfo(user, extendInfoPO, viewAttr, showLabel, width));
col.put("com", getFieldDetailInfo(user, extendInfoPO, viewAttr, showLabel, width));
col.put("width", width + "%");
@ -73,12 +71,11 @@ public class ExtendInfoBO {
/**
*
*
* @param user
* @param infoFieldParam
* @param extendGroupPO
* @param extendGroupId
* @param showOrder
* @return
* @param user
* @param infoFieldParam
* @param extendGroupPO
* @param extendGroupId ID
* @param showOrder
*/
public static ExtendInfoPO convertFieldParam2ExtendInfo(User user, ExtendInfoFieldParam infoFieldParam, ExtendGroupPO extendGroupPO, Long extendGroupId, Integer showOrder) {
if (null == infoFieldParam) {
@ -146,9 +143,8 @@ public class ExtendInfoBO {
/**
* 使
*
* @param tableName
* @param fieldName
* @return
* @param tableName
* @param fieldName
*/
public static boolean fieldIsUsed(String tableName, String fieldName) {
if (StringUtils.isAnyEmpty(tableName, fieldName)) {
@ -162,13 +158,12 @@ public class ExtendInfoBO {
/**
*
*
* @param user
* @param extendInfoPO
* @param viewAttr
* @return
* @param user
* @param extendInfoPO
* @param viewAttr
*/
private static List<FieldItem> getFieldDetialInfo(User user, ExtendInfoPO extendInfoPO, int viewAttr, boolean showLabel, int width) {
List<FieldItem> ls = new ArrayList<FieldItem>();
private static List<FieldItem> getFieldDetailInfo(User user, ExtendInfoPO extendInfoPO, int viewAttr, boolean showLabel, int width) {
List<FieldItem> ls = new ArrayList<>();
FieldItem fieldItem = createField(user, extendInfoPO, viewAttr, showLabel, width);
ls.add(fieldItem);
return ls;
@ -177,12 +172,11 @@ public class ExtendInfoBO {
/**
*
*
* @param user
* @param extendInfoPO
* @param viewAttr
* @param showLabel
* @param width
* @return
* @param user
* @param extendInfoPO
* @param viewAttr
* @param showLabel
* @param width
*/
private static FieldItem createField(User user, ExtendInfoPO extendInfoPO, int viewAttr, boolean showLabel, int width) {
FieldItem fieldItem = new FieldItem();
@ -192,7 +186,7 @@ public class ExtendInfoBO {
fieldItem.setLabel("");
}
fieldItem.setType(getFieldhtmltype(extendInfoPO.getControlType() + ""));
fieldItem.setType(getFieldHtmlType(extendInfoPO.getControlType() + ""));
fieldItem.setKey(extendInfoPO.getFieldName());
// 查看操作 全部设置为只读
if (1 == viewAttr) {
@ -221,25 +215,32 @@ public class ExtendInfoBO {
/**
*
*
* @param fieldhtmltype
* @return
* @param fieldHtmlType
*/
private static FieldType getFieldhtmltype(String fieldhtmltype) {
private static FieldType getFieldHtmlType(String fieldHtmlType) {
FieldType fieldtype = null;
if (fieldhtmltype.equals("1")) {
fieldtype = FieldType.INPUT;
} else if (fieldhtmltype.equals("2")) {
fieldtype = FieldType.TEXTAREA;
} else if (fieldhtmltype.equals("3")) {
fieldtype = FieldType.BROWSER;
} else if (fieldhtmltype.equals("4")) {
fieldtype = FieldType.CHECKBOX;
} else if (fieldhtmltype.equals("5")) {
fieldtype = FieldType.SELECT;
} else if (fieldhtmltype.equals("6")) {
fieldtype = FieldType.FILEUPLOAD;
} else if (fieldhtmltype.equals("7")) {
fieldtype = FieldType.TEXT;
switch (fieldHtmlType) {
case "1":
fieldtype = FieldType.INPUT;
break;
case "2":
fieldtype = FieldType.TEXTAREA;
break;
case "3":
fieldtype = FieldType.BROWSER;
break;
case "4":
fieldtype = FieldType.CHECKBOX;
break;
case "5":
fieldtype = FieldType.SELECT;
break;
case "6":
fieldtype = FieldType.FILEUPLOAD;
break;
case "7":
fieldtype = FieldType.TEXT;
break;
}
return fieldtype;
}
@ -256,208 +257,228 @@ public class ExtendInfoBO {
HrmFieldManager hrmFieldManager = new HrmFieldManager();
String fieldid = Util.null2String(extendInfoPO.getId());//字段id
String fieldname = Util.null2String(extendInfoPO.getFieldName());//字段名
String fieldlabel = Util.null2String(extendInfoPO.getFieldNameDesc());//字段显示名
// String fieldlabel = Util.null2String(extendInfoPO.getFieldNameDesc());//字段显示名
String fieldlabel = "502327";//字段显示名
String fieldhtmltype = Util.null2String(extendInfoPO.getControlType());//字段类型
String detailtype = Util.null2String(extendInfoPO.getBrowserType());//字段二级类型(浏览框--单人力)
String customValue = Util.null2String(extendInfoPO.getCustomValue());
boolean isQuickSearch = true;
boolean isScope = false;
if (fieldhtmltype.equals("1")) {//单行文本框
if (isScope) {//范围
if (Util.null2String(fieldvalue).length() == 0) {
fieldvalue = new HashMap<String, Object>();
}
searchConditionItem = conditionFactory.createCondition(ConditionType.SCOPE, fieldlabel, new String[]{fieldname, fieldname + "to"});
} else if (detailtype.equals("2")) {//数字
searchConditionItem = conditionFactory.createCondition(ConditionType.INPUTNUMBER, fieldlabel, fieldname, isQuickSearch);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.INPUT, "25034", fieldname, isQuickSearch);
}
} else if (fieldhtmltype.equals("2")) {//多行文本框
searchConditionItem = conditionFactory.createCondition(ConditionType.TEXTAREA, fieldlabel, fieldname);
} else if (fieldhtmltype.equals("3")) {//浏览按钮
customValue = SelectOptionParam.getCustomBrowserId(customValue);
if (detailtype.equals("2")) {
if (!extendInfoPO.getTableName().toLowerCase().contains("_dt")) {
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.DATE, fieldlabel, fieldname, detailtype);
searchConditionItem.setDomkey(new String[]{fieldname + DATE_SELECT, fieldname + DATE_FROM, fieldname + DATE_TO});
searchConditionItem.setOptions(ServiceUtil.getDateSelectFromTo(user.getLanguage()));
}
} else if (detailtype.equals("19")) {
searchConditionItem = conditionFactory.createCondition(ConditionType.TIMEPICKER, fieldlabel, fieldname, detailtype);
} else if (detailtype.equals("402")) { // 年
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname, detailtype);
searchConditionItem.setFormat("yyyy");
searchConditionItem.setMode("year");
searchConditionItem.setPlaceholder(SystemEnv.getHtmlLabelNames("526306", user.getLanguage()));
searchConditionItem.setShowTime(false);
} else if (detailtype.equals("403")) {
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname, detailtype);
searchConditionItem.setFormat("yyyy-MM");
searchConditionItem.setMode("month");
searchConditionItem.setPlaceholder(SystemEnv.getHtmlLabelNames("126137", user.getLanguage()));
searchConditionItem.setShowTime(false);
} else if (detailtype.equals("RANGEPICKER")) {//日期区间
String[] domkey = new String[]{DATE_FROM + fieldname, DATE_TO + fieldname};
searchConditionItem = conditionFactory.createCondition(ConditionType.RANGEPICKER, fieldlabel, domkey);
searchConditionItem.setValue(fieldvalue);
} else if (detailtype.equals("TIMERANGEPICKER")) {//时间区间
String[] domkey = new String[]{fieldname + DATE_Time_FROM, fieldname + DATE_Time_TO};
searchConditionItem = conditionFactory.createCondition(ConditionType.TIMERANGEPICKER, fieldlabel, domkey);
searchConditionItem.setValue(fieldvalue);
} else {
if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) {
BrowserBean browserbean = new BrowserBean(detailtype + "");
BrowserInitUtil browserInitUtil = new BrowserInitUtil();
String fielddbtype = customValue;
if (!customValue.startsWith("browser.")) {
fielddbtype = "browser." + customValue;
}
if (detailtype.equals("161") || detailtype.equals("162")) {
browserInitUtil.initCustomizeBrow(browserbean, fielddbtype, Util.getIntValue(detailtype), user.getUID());
} else {
browserbean.getDataParams().put("cube_treeid", customValue);
browserbean.getDataParams().put("currenttime", System.currentTimeMillis());
browserInitUtil.initBrowser(browserbean, user.getLanguage());
}
searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, fieldlabel, new String[]{fieldname}, browserbean);
switch (fieldhtmltype) {
case "1": //单行文本框
if (detailtype.equals("2")) {//数字
searchConditionItem = conditionFactory.createCondition(ConditionType.INPUTNUMBER, fieldlabel, fieldname, isQuickSearch);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.BROWSER, fieldlabel, fieldname, detailtype);
searchConditionItem = conditionFactory.createCondition(ConditionType.INPUT, "25034", fieldname, isQuickSearch);
}
//searchConditionItem.getBrowserConditionParam().setHideVirtualOrg(hrmFieldBean.getHideVirtualOrg());
List<Map<String, Object>> replaceDatas = new ArrayList<Map<String, Object>>();
String tmpFieldValue = Util.null2String(fieldvalue);
if (detailtype.equals("mkqshift")) {
ShiftManagementToolKit shiftManagementToolKit = new ShiftManagementToolKit();
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
String fieldshowname = Util.null2String(shiftManagementToolKit.getShiftOnOffWorkSections(fieldvalues[i], user.getLanguage()));
if (fieldshowname.length() == 0) continue;
Map<String, Object> replaceData = new HashMap<String, Object>();
replaceData.put("id", fieldvalues[i]);
replaceData.put("name", fieldshowname);
replaceDatas.add(replaceData);
}
} else if (detailtype.equals("sensitivewordstype")) {
SensitiveWordTypeComInfo sensitiveWordTypeComInfo = new SensitiveWordTypeComInfo();
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
String fieldshowname = Util.null2String(sensitiveWordTypeComInfo.getName(fieldvalues[i]));
if (fieldshowname.length() == 0) continue;
Map<String, Object> replaceData = new HashMap<String, Object>();
replaceData.put("id", fieldvalues[i]);
replaceData.put("name", fieldshowname);
replaceDatas.add(replaceData);
}
} else if (detailtype.equals("doccategory")) {
List<BrowserValueInfo> fieldvalues = new BrowserValueInfoService().getBrowserValueInfo(detailtype, Util.null2String(fieldvalue));
for (int i = 0; fieldvalues != null && i < fieldvalues.size(); i++) {
BrowserValueInfo valueInfo = fieldvalues.get(i);
String fieldshowname = valueInfo.getName();
if (fieldshowname.length() == 0) {
continue;
break;
case "2": //多行文本框
searchConditionItem = conditionFactory.createCondition(ConditionType.TEXTAREA, fieldlabel, fieldname);
break;
case "3": //浏览按钮
customValue = SelectOptionParam.getCustomBrowserId(customValue);
switch (detailtype) {
case "2":
if (!extendInfoPO.getTableName().toLowerCase().contains("_dt")) {
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.DATE, fieldlabel, fieldname, detailtype);
searchConditionItem.setDomkey(new String[]{fieldname + DATE_SELECT, fieldname + DATE_FROM, fieldname + DATE_TO});
searchConditionItem.setOptions(ServiceUtil.getDateSelectFromTo(user.getLanguage()));
}
Map<String, Object> replaceData = new HashMap<String, Object>();
replaceData.put("id", valueInfo.getId());
replaceData.put("name", fieldshowname);
replaceDatas.add(replaceData);
break;
case "19":
searchConditionItem = conditionFactory.createCondition(ConditionType.TIMEPICKER, fieldlabel, fieldname, detailtype);
break;
case "402": // 年
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname, detailtype);
searchConditionItem.setFormat("yyyy");
searchConditionItem.setMode("year");
searchConditionItem.setPlaceholder(SystemEnv.getHtmlLabelNames("526306", user.getLanguage()));
searchConditionItem.setShowTime(false);
break;
case "403":
searchConditionItem = conditionFactory.createCondition(ConditionType.DATEPICKER, fieldlabel, fieldname, detailtype);
searchConditionItem.setFormat("yyyy-MM");
searchConditionItem.setMode("month");
searchConditionItem.setPlaceholder(SystemEnv.getHtmlLabelNames("126137", user.getLanguage()));
searchConditionItem.setShowTime(false);
break;
case "RANGEPICKER": {//日期区间
String[] domkey = new String[]{DATE_FROM + fieldname, DATE_TO + fieldname};
searchConditionItem = conditionFactory.createCondition(ConditionType.RANGEPICKER, fieldlabel, domkey);
searchConditionItem.setValue(fieldvalue);
break;
}
} else {
if (tmpFieldValue.length() > 0) {
String fieldshowname = hrmFieldManager.getFieldvalue(user, customValue, Util.getIntValue(fieldid), Util.getIntValue(fieldhtmltype), Util.getIntValue(detailtype), tmpFieldValue, 0);
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
String[] fieldshownames = Util.splitString(fieldshowname, ",");
if (detailtype.equals("257")) {
if (fieldshowname.endsWith("&nbsp")) {
fieldshowname = fieldshowname.substring(0, fieldshowname.length() - 5);
case "TIMERANGEPICKER": {//时间区间
String[] domkey = new String[]{fieldname + DATE_Time_FROM, fieldname + DATE_Time_TO};
searchConditionItem = conditionFactory.createCondition(ConditionType.TIMERANGEPICKER, fieldlabel, domkey);
searchConditionItem.setValue(fieldvalue);
break;
}
default:
if (detailtype.equals("161") || detailtype.equals("162") || detailtype.equals("256") || detailtype.equals("257")) {
BrowserBean browserbean = new BrowserBean(detailtype + "");
BrowserInitUtil browserInitUtil = new BrowserInitUtil();
String fielddbtype = customValue;
if (!customValue.startsWith("browser.")) {
fielddbtype = "browser." + customValue;
}
if (detailtype.equals("161") || detailtype.equals("162")) {
browserInitUtil.initCustomizeBrow(browserbean, fielddbtype, Util.getIntValue(detailtype), user.getUID());
} else {
browserbean.getDataParams().put("cube_treeid", customValue);
browserbean.getDataParams().put("currenttime", System.currentTimeMillis());
browserInitUtil.initBrowser(browserbean, user.getLanguage());
}
fieldshownames = Util.splitString(fieldshowname, "&nbsp");
searchConditionItem = new SearchConditionItem(ConditionType.BROWSER, fieldlabel, new String[]{fieldname}, browserbean);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.BROWSER, fieldlabel, fieldname, detailtype);
}
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
if (fieldvalues.length != fieldshownames.length) {
List<Map<String, Object>> replaceDatas = new ArrayList<>();
String tmpFieldValue = Util.null2String(fieldvalue);
switch (detailtype) {
case "mkqshift": {
ShiftManagementToolKit shiftManagementToolKit = new ShiftManagementToolKit();
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
String fieldshowname = Util.null2String(shiftManagementToolKit.getShiftOnOffWorkSections(fieldvalues[i], user.getLanguage()));
if (fieldshowname.length() == 0) continue;
Map<String, Object> replaceData = new HashMap<>();
replaceData.put("id", fieldvalues[i]);
replaceData.put("name", fieldshowname);
replaceDatas.add(replaceData);
}
break;
}
case "sensitivewordstype": {
SensitiveWordTypeComInfo sensitiveWordTypeComInfo = new SensitiveWordTypeComInfo();
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
String fieldshowname = Util.null2String(sensitiveWordTypeComInfo.getName(fieldvalues[i]));
if (fieldshowname.length() == 0) continue;
Map<String, Object> replaceData = new HashMap<>();
replaceData.put("id", fieldvalues[i]);
replaceData.put("name", fieldshowname);
replaceDatas.add(replaceData);
}
break;
}
if (Util.null2String(fieldshownames[i]).length() == 0) {
continue;
case "doccategory": {
List<BrowserValueInfo> fieldvalues = new BrowserValueInfoService().getBrowserValueInfo(detailtype, Util.null2String(fieldvalue));
for (int i = 0; fieldvalues != null && i < fieldvalues.size(); i++) {
BrowserValueInfo valueInfo = fieldvalues.get(i);
String fieldshowname = valueInfo.getName();
if (fieldshowname.length() == 0) {
continue;
}
Map<String, Object> replaceData = new HashMap<>();
replaceData.put("id", valueInfo.getId());
replaceData.put("name", fieldshowname);
replaceDatas.add(replaceData);
}
break;
}
Map<String, Object> replaceData = new HashMap<String, Object>();
replaceData.put("id", fieldvalues[i]);
replaceData.put("name", fieldshownames[i]);
replaceDatas.add(replaceData);
default:
if (tmpFieldValue.length() > 0) {
String fieldshowname = hrmFieldManager.getFieldvalue(user, customValue, Util.getIntValue(fieldid), Util.getIntValue(fieldhtmltype), Util.getIntValue(detailtype), tmpFieldValue, 0);
String[] fieldvalues = Util.splitString(tmpFieldValue, ",");
String[] fieldshownames = Util.splitString(fieldshowname, ",");
if (detailtype.equals("257")) {
if (fieldshowname.endsWith("&nbsp")) {
fieldshowname = fieldshowname.substring(0, fieldshowname.length() - 5);
}
fieldshownames = Util.splitString(fieldshowname, "&nbsp");
}
for (int i = 0; fieldvalues != null && i < fieldvalues.length; i++) {
if (fieldvalues.length != fieldshownames.length) {
break;
}
if (Util.null2String(fieldshownames[i]).length() == 0) {
continue;
}
Map<String, Object> replaceData = new HashMap<>();
replaceData.put("id", fieldvalues[i]);
replaceData.put("name", fieldshownames[i]);
replaceDatas.add(replaceData);
}
}
break;
}
}
fieldvalue = replaceDatas;
break;
}
break;
case "4": //Check框
searchConditionItem = conditionFactory.createCondition(ConditionType.CHECKBOX, fieldlabel, fieldname);
if (detailtype.equals("2")) {
searchConditionItem.setConditionType(ConditionType.SWITCH);
}
fieldvalue = replaceDatas;
}
} else if (fieldhtmltype.equals("4")) {//Check框
searchConditionItem = conditionFactory.createCondition(ConditionType.CHECKBOX, fieldlabel, fieldname);
if (detailtype.equals("2")) {
searchConditionItem.setConditionType(ConditionType.SWITCH);
}
} else if (fieldhtmltype.equals("5")) { //选择框
break;
case "5": //选择框
List<SearchConditionOption> searchConditionOptions = SelectOptionParam.convertJsonToListOption(customValue);
searchConditionItem = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname, searchConditionOptions);
if (detailtype.equals("") || detailtype.equals("0")) {
detailtype = "1";
}
searchConditionItem.setKey(Util.null2String(fieldvalue));
searchConditionItem.setValue(fieldvalue + "");
searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3));
} else if (fieldhtmltype.equals("6")) {//附件
if (fieldname.equals("resourceimageid")) {
searchConditionItem = conditionFactory.createCondition(ConditionType.RESOURCEIMG, fieldlabel, fieldname, isQuickSearch);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.UPLOAD, fieldlabel, fieldname, isQuickSearch);
searchConditionItem.setUploadUrl("/api/doc/upload/uploadFile");
searchConditionItem.setCategory("category");
searchConditionItem.setMaxFilesNumber(10);
searchConditionItem.setMultiSelection(true);
Map<String, Object> otherParamsMap = new HashMap<>();
otherParamsMap.put("showClearAll", false);
otherParamsMap.put("showOrder", true);
searchConditionItem.setOtherParams(otherParamsMap);
if (Util.null2String(fieldvalue).length() > 0) {
List<Object> datas = new ArrayList<Object>();
Map<String, Object> data = null;
String[] tmpIds = Util.splitString(Util.null2String(fieldvalue), ",");
for (int i = 0; i < tmpIds.length; i++) {
String fileid = tmpIds[i];
ImageFileManager manager = new ImageFileManager();
manager.getImageFileInfoById(Util.getIntValue(fileid));
String filename = manager.getImageFileName();
String extname = filename.contains(".") ? filename.substring(filename.lastIndexOf(".") + 1) : "";
data = new HashMap<String, Object>();
data.put("acclink", "/weaver/weaver.file.FileDownload?fileid=" + fileid);
data.put("fileExtendName", extname);
data.put("fileid", fileid);
//if (Util.null2String(this.isMobile).equals("1")) {
// data.put("filelink", "/spa/document/static4mobile/index.html#/attach/" + fileid);
//} else {
data.put("filelink", "/spa/document/index2file.jsp?imagefileId=" + fileid + "#/main/document/fileView");
//}
data.put("filename", filename);
data.put("filesize", manager.getImgsize());
data.put("imgSrc", "");
data.put("isImg", "");
data.put("loadlink", "/weaver/weaver.file.FileDownload?fileid=" + fileid + "&download=1");
data.put("showDelete", "true");
data.put("showLoad", "true");
datas.add(data);
List<SearchConditionOption> searchConditionOptions = SelectOptionParam.convertJsonToListOption(customValue);
searchConditionItem = conditionFactory.createCondition(ConditionType.SELECT, fieldlabel, fieldname, searchConditionOptions);
if (detailtype.equals("") || detailtype.equals("0")) {
detailtype = "1";
}
searchConditionItem.setKey(Util.null2String(fieldvalue));
searchConditionItem.setValue(fieldvalue + "");
searchConditionItem.setDetailtype(Util.getIntValue(detailtype, 3));
break;
case "6": //附件
if (fieldname.equals("resourceimageid")) {
searchConditionItem = conditionFactory.createCondition(ConditionType.RESOURCEIMG, fieldlabel, fieldname, isQuickSearch);
} else {
searchConditionItem = conditionFactory.createCondition(ConditionType.UPLOAD, fieldlabel, fieldname, isQuickSearch);
searchConditionItem.setUploadUrl("/api/doc/upload/uploadFile");
searchConditionItem.setCategory("category");
searchConditionItem.setMaxFilesNumber(10);
searchConditionItem.setMultiSelection(true);
Map<String, Object> otherParamsMap = new HashMap<>();
otherParamsMap.put("showClearAll", false);
otherParamsMap.put("showOrder", true);
searchConditionItem.setOtherParams(otherParamsMap);
if (Util.null2String(fieldvalue).length() > 0) {
List<Object> datas = new ArrayList<>();
Map<String, Object> data;
String[] tmpIds = Util.splitString(Util.null2String(fieldvalue), ",");
for (String fileid : tmpIds) {
ImageFileManager manager = new ImageFileManager();
manager.getImageFileInfoById(Util.getIntValue(fileid));
String filename = manager.getImageFileName();
String extname = filename.contains(".") ? filename.substring(filename.lastIndexOf(".") + 1) : "";
data = new HashMap<>();
data.put("acclink", "/weaver/weaver.file.FileDownload?fileid=" + fileid);
data.put("fileExtendName", extname);
data.put("fileid", fileid);
//if (Util.null2String(this.isMobile).equals("1")) {
// data.put("filelink", "/spa/document/static4mobile/index.html#/attach/" + fileid);
//} else {
data.put("filelink", "/spa/document/index2file.jsp?imagefileId=" + fileid + "#/main/document/fileView");
//}
data.put("filename", filename);
data.put("filesize", manager.getImgsize());
data.put("imgSrc", "");
data.put("isImg", "");
data.put("loadlink", "/weaver/weaver.file.FileDownload?fileid=" + fileid + "&download=1");
data.put("showDelete", "true");
data.put("showLoad", "true");
datas.add(data);
}
searchConditionItem.setDatas(datas);
}
searchConditionItem.setDatas(datas);
}
}
} else if (fieldhtmltype.equals("7")) {//颜色选择
searchConditionItem = conditionFactory.createCondition(ConditionType.COLORPICKER, fieldlabel, fieldname, true);
searchConditionItem.setValue(fieldvalue);
} else if (fieldhtmltype.equals("8")) {//DESCRIPTION
searchConditionItem = conditionFactory.createCondition(ConditionType.DESCRIPTION, fieldlabel, fieldname);
searchConditionItem.setValue(fieldvalue);
break;
case "7": //颜色选择
searchConditionItem = conditionFactory.createCondition(ConditionType.COLORPICKER, fieldlabel, fieldname, true);
searchConditionItem.setValue(fieldvalue);
break;
case "8": //DESCRIPTION
searchConditionItem = conditionFactory.createCondition(ConditionType.DESCRIPTION, fieldlabel, fieldname);
searchConditionItem.setValue(fieldvalue);
break;
}
if (searchConditionItem != null) {
BrowserInitUtil.setConditionItemDefaultValue(searchConditionItem, fieldvalue, 2);

@ -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,338 @@
package com.engine.organization.entity.hrmresource.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author:dxfeng
* @createTime: 2022/06/27
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class HrmResourceImportParam {
/**
* id
*/
private Long id;
/**
* work_code
*/
private String work_code;
/**
* login_id
*/
private String login_id;
/**
* last_name
*/
private String last_name;
/**
* sex
*/
private String sex;
/**
* account_type
*/
private String account_type;
/**
* belong_to
*/
private String belong_to;
/**
* company_id
*/
private String company_id;
/**
* department_id
*/
private String department_id;
/**
* job_activity
*/
private String job_activity;
/**
* job_title
*/
private String job_title;
/**
* job_call
*/
private String job_call;
/**
* job_level
*/
private String job_level;
/**
* job_group_id
*/
private String job_group_id;
/**
* job_activity_desc
*/
private String job_activity_desc;
/**
* status
*/
private String status;
/**
* system_language
*/
private String system_language;
/**
* resource_image_id
*/
private String resource_image_id;
/**
* messager_url
*/
private String messager_url;
/**
* location_id
*/
private String location_id;
/**
* manager_id
*/
private String manager_id;
/**
* assistant_id
*/
private String assistant_id;
/**
* mobile
*/
private String mobile;
/**
* telephone
*/
private String telephone;
/**
* mobile_call
*/
private String mobile_call;
/**
* fax
*/
private String fax;
/**
* email
*/
private String email;
/**
* workroom
*/
private String workroom;
/**
* pass_word
*/
private String pass_word;
/**
* sec_level
*/
private String sec_level;
/**
* birthday
*/
private String birthday;
/**
* folk
*/
private String folk;
/**
* native_place
*/
private String native_place;
/**
* reg_resident_place
*/
private String reg_resident_place;
/**
* certificate_num
*/
private String certificate_num;
/**
* marital_status
*/
private String marital_status;
/**
* policy
*/
private String policy;
/**
* be_member_date
*/
private String be_member_date;
/**
* be_party_date
*/
private String be_party_date;
/**
* islabouunion
*/
private String islabouunion;
/**
* degree
*/
private String degree;
/**
* health_info
*/
private String health_info;
/**
* education_level
*/
private String education_level;
/**
* height
*/
private String height;
/**
* weight
*/
private Integer weight;
/**
* use_kind
*/
private String use_kind;
/**
* start_date
*/
private String start_date;
/**
* end_date
*/
private String end_date;
/**
* probation_end_date
*/
private String probation_end_date;
/**
* resident_place
*/
private String resident_place;
/**
* home_address
*/
private String home_address;
/**
* temp_resident_number
*/
private String temp_resident_number;
/**
* company_start_date
*/
private String company_start_date;
/**
* work_start_date
*/
private String work_start_date;
/**
* accum_fund_account
*/
private String accum_fund_account;
/**
* account_name
*/
private String account_name;
/**
* bank_id
*/
private String bank_id;
/**
* account_id
*/
private String account_id;
/**
* show_order
*/
private Integer show_order;
/**
* classification
*/
private String classification;
/**
* woprk_year
*/
private String work_year;
/**
* company_work_year
*/
private String company_work_year;
private String baseFieldsValue="";
private String baseFields="";
private Long creator;
private int deleteType;
private Date createTime;
private Date updateTime;
}

@ -1,5 +1,6 @@
package com.engine.organization.entity.hrmresource.param;
import com.engine.organization.common.BaseQueryParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -14,7 +15,7 @@ import lombok.NoArgsConstructor;
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class HrmResourceSearchParam {
public class HrmResourceSearchParam extends BaseQueryParam {
/**
*
*/

@ -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;
}

@ -40,7 +40,7 @@ public class HrmResourcePO {
/**
*
*/
private Integer sex;
private String sex;
/**
*
@ -75,7 +75,7 @@ public class HrmResourcePO {
/**
*
*/
private Long jobCall;
private Integer jobCall;
/**
*
@ -120,12 +120,12 @@ public class HrmResourcePO {
/**
*
*/
private Long managerId;
private Integer managerId;
/**
*
*/
private Long assistantId;
private Integer assistantId;
/**
*
@ -161,4 +161,175 @@ public class HrmResourcePO {
private int deleteType;
private Date createTime;
private Date updateTime;
/**
*
*/
private String passWord;
/**
*
*/
private Integer secLevel;
/**
*
*/
private String birthday;
/**
*
*/
private String folk;
/**
*
*/
private String nativePlace;
/**
*
*/
private String regResidentPlace;
/**
*
*/
private String certificateNum;
/**
*
*/
private String maritalStatus;
/**
*
*/
private String policy;
/**
*
*/
private String beMemberDate;
/**
*
*/
private String bePartyDate;
/**
*
*/
private String islabouunion;
/**
*
*/
private String degree;
/**
*
*/
private String healthInfo;
/**
*
*/
private Integer educationLevel;
/**
*
*/
private String height;
/**
*
*/
private Integer weight;
/**
*
*/
private Integer useKind;
/**
*
*/
private String startDate;
/**
*
*/
private String endDate;
/**
*
*/
private String probationEndDate;
/**
*
*/
private String residentPlace;
/**
*
*/
private String homeAddress;
/**
*
*/
private String tempResidentNumber;
/**
*
*/
private String companyStartDate;
/**
*
*/
private String workStartDate;
/**
*
*/
private String accumFundAccount;
/**
*
*/
private String accountName;
/**
*
*/
private Integer bankId;
/**
*
*/
private String accountId;
/**
*
*/
private Integer showOrder;
/**
*
*/
private Integer classification;
private String workYear;
private String companyWorkYear;
private String baseFieldsValue="";
private String baseFields="";
}

@ -23,9 +23,11 @@ import lombok.NoArgsConstructor;
"t.company_id," +
"t.mobile," +
"t.telephone," +
"t.manager_id ",
"t.manager_id, " +
"t.show_order ",
fromSql = "FROM jcl_org_hrmresource t ",
orderby = " id ",
orderby = " show_order ",
sortway = " asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", text = "发消息"),
@ -75,4 +77,7 @@ public class HrmResourceVO {
*/
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "manager_id", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getManagerName")
private String managerName;
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "show_order", orderkey = "show_order")
private Integer showOrder;
}

@ -0,0 +1,85 @@
package com.engine.organization.entity.hrmresource.vo;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.OrganizationTable;
import com.engine.organization.annotation.OrganizationTableColumn;
import com.engine.organization.annotation.OrganizationTableOperate;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2022/07/01
* @version: 1.0
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@OrganizationTable(pageId = "2f2011f7-f915-11ec-8d51-00e04c680716",
fields = "t.id," +
"t.lastname," +
"t.departmentid," +
"t.subcompanyid1," +
"t.mobile," +
"t.telephone," +
"t.managerid, " +
"t.dsporder ",
fromSql = "FROM hrmresource t ",
orderby = " dsporder ",
sortway = " asc",
primarykey = "id",
operates = {
@OrganizationTableOperate(index = "0", text = "发消息"),
@OrganizationTableOperate(index = "1", text = "发送邮件"),
@OrganizationTableOperate(index = "1", text = "发送短信"),
@OrganizationTableOperate(index = "1", text = "新建日程"),
@OrganizationTableOperate(index = "1", text = "系统信息"),
},
tableType = WeaTableType.CHECKBOX
)
public class ScHrmResourceVO {
/**
*
*/
@OrganizationTableColumn(column = "id", display = false)
private Long id;
/**
*
*/
@OrganizationTableColumn(text = "姓名", width = "25%", column = "lastname")
private String lastName;
/**
*
*/
@OrganizationTableColumn(text = "部门", width = "25%", column = "departmentid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScDepartmentName")
private String departmentName;
/**
*
*/
@OrganizationTableColumn(text = "分部", width = "25%", column = "subcompanyid1", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScCompanyName")
private String companyName;
/**
*
*/
@OrganizationTableColumn(text = "移动电话", width = "25%", column = "mobile")
private String mobile;
/**
*
*/
@OrganizationTableColumn(text = "办公室电话", width = "25%", column = "telephone")
private String telephone;
/**
*
*/
@OrganizationTableColumn(text = "直接上级", width = "25%", column = "managerid", transmethod = "com.engine.organization.transmethod.HrmResourceTransMethod.getScManagerName")
private String managerName;
@OrganizationTableColumn(text = "显示顺序", width = "25%", column = "dsporder", orderkey = "dsporder")
private Integer showOrder;
}

@ -31,16 +31,16 @@ public class JobListDTO {
*
*/
private Integer isUsed;
/**
*
*/
@TableTitle(title = "名称", dataIndex = "jobName", key = "jobName",width = "150")
private String jobName;
/**
*
*/
@TableTitle(title = "编号", dataIndex = "jobNo", key = "jobNo")
private String jobNo;
/**
*
*/
@TableTitle(title = "名称", dataIndex = "jobName", key = "jobName")
private String jobName;
/**
*
*/

@ -0,0 +1,204 @@
package com.engine.organization.entity.logview.bo;
import java.util.*;
import java.util.stream.Collectors;
/**
*
*
* @author:dxfeng
* @createTime: 2022/07/06
* @version: 1.0
*/
public abstract class AbstractEquator implements Equator {
private static final List<Class<?>> WRAPPER = Arrays.asList(Byte.class, Short.class,
Integer.class, Long.class, Float.class, Double.class, Character.class,
Boolean.class, String.class);
private List<String> includeFields;
private List<String> excludeFields;
/**
* true
* <p>
*
* <p>
* true
*/
private boolean bothExistFieldOnly = true;
public AbstractEquator() {
includeFields = Collections.emptyList();
excludeFields = new ArrayList<>();
excludeFields.add("creator");
excludeFields.add("createTime");
excludeFields.add("updateTime");
excludeFields.add("deleteType");
excludeFields.add("staffNum");
}
/**
* @param bothExistFieldOnly
*/
public AbstractEquator(boolean bothExistFieldOnly) {
includeFields = Collections.emptyList();
excludeFields = Collections.emptyList();
this.bothExistFieldOnly = bothExistFieldOnly;
}
/**
*
*
* @param includeFields null
* @param excludeFields null
*/
public AbstractEquator(List<String> includeFields, List<String> excludeFields) {
this.includeFields = includeFields;
this.excludeFields = excludeFields;
}
/**
*
*
* @param includeFields null
* @param excludeFields null
* @param bothExistFieldOnly true
*/
public AbstractEquator(List<String> includeFields, List<String> excludeFields, boolean bothExistFieldOnly) {
this.includeFields = includeFields;
this.excludeFields = excludeFields;
this.bothExistFieldOnly = bothExistFieldOnly;
}
/**
*
*
* @param first 1
* @param second 2
* @return
*/
@Override
public boolean isEquals(Object first, Object second) {
List<String> diff = getDiffFields(first, second);
return diff == null || diff.isEmpty();
}
/**
* equals
* <p>
*
*
* @param fieldInfo
* @return
*/
protected boolean isFieldEquals(FieldInfo fieldInfo) {
// 先判断排除,如果需要排除,则无论在不在包含范围,都一律不比对
if (isExclude(fieldInfo)) {
return true;
}
// 如果有指定需要包含的字段而且当前字段不在需要包含的字段中则不比对
if (!isInclude(fieldInfo)) {
return true;
}
return nullableEquals(fieldInfo.getFirstVal(), fieldInfo.getSecondVal());
}
/**
*
*/
protected boolean isInclude(FieldInfo fieldInfo) {
// 没有指定需要包含的字段,则全部都包含
if (includeFields == null || includeFields.isEmpty()) {
return true;
}
return includeFields.contains(fieldInfo.getFieldName());
}
/**
*
*/
protected boolean isExclude(FieldInfo fieldInfo) {
// 如果有指定需要排除的字段,而且当前字段是需要排除字段,则直接返回 true
return excludeFields != null && !excludeFields.isEmpty() && excludeFields.contains(fieldInfo.getFieldName());
}
/**
*
*
* @param first 1
* @param second 2
* @return FieldInfo
*/
List<String> compareSimpleField(Object first, Object second) {
boolean eq = Objects.equals(first, second);
if (eq) {
return Collections.emptyList();
} else {
Object obj = first == null ? second : first;
Class<?> clazz = obj.getClass();
// 不等的字段名称使用类的名称
return Collections.singletonList("[" + clazz.getSimpleName() + "]:由" + first + "修改为" + second);
}
}
/**
*
*
* @param first 1
* @param second 2
* @return
*/
boolean isSimpleField(Object first, Object second) {
Object obj = first == null ? second : first;
Class<?> clazz = obj.getClass();
return clazz.isPrimitive() || WRAPPER.contains(clazz);
}
/**
*
*/
Set<String> getAllFieldNames(Set<String> firstFields, Set<String> secondFields) {
Set<String> allFields;
// 只取交集
if (isBothExistFieldOnly()) {
allFields = firstFields.stream().filter(secondFields::contains).collect(Collectors.toSet());
} else {
// 否则取并集
allFields = new HashSet<>(firstFields);
allFields.addAll(secondFields);
}
return allFields;
}
private boolean nullableEquals(Object first, Object second) {
if (first instanceof Collection
&& second instanceof Collection) {
// 如果两个都是集合类型,尝试转换为数组再进行深度比较
return Objects.deepEquals(((Collection) first).toArray(), ((Collection) second).toArray());
}
return Objects.deepEquals(first, second);
}
public void setIncludeFields(List<String> includeFields) {
this.includeFields = includeFields;
}
public void setExcludeFields(List<String> excludeFields) {
this.excludeFields = excludeFields;
}
public void setBothExistFieldOnly(boolean bothExistFieldOnly) {
this.bothExistFieldOnly = bothExistFieldOnly;
}
public List<String> getIncludeFields() {
return includeFields;
}
public List<String> getExcludeFields() {
return excludeFields;
}
public boolean isBothExistFieldOnly() {
return bothExistFieldOnly;
}
}

@ -0,0 +1,31 @@
package com.engine.organization.entity.logview.bo;
import java.util.List;
/**
*
*
* @author:dxfeng
* @createTime: 2022/07/06
* @version: 1.0
*/
public interface Equator {
/**
*
*
* @param first 1
* @param second 2
* @return
*/
boolean isEquals(Object first, Object second);
/**
*
*
* @param first 1
* @param second 2
* @return
*/
List<String> getDiffFields(Object first, Object second);
}

@ -0,0 +1,133 @@
package com.engine.organization.entity.logview.bo;
import org.apache.commons.lang3.StringUtils;
import java.lang.reflect.Field;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
/**
*
*
* @author:dxfeng
* @createTime: 2022/07/06
* @version: 1.0
*/
public class FieldBaseEquator extends AbstractEquator {
private static final Map<Class<?>, Map<String, Field>> CACHE = new ConcurrentHashMap<>();
// 忽略
private List<String> ignoreFields = new ArrayList<>();
public FieldBaseEquator() {
}
public FieldBaseEquator(boolean bothExistFieldOnly) {
super(bothExistFieldOnly);
}
public FieldBaseEquator(List<String> includeFields, List<String> excludeFields, boolean bothExistFieldOnly) {
super(includeFields, excludeFields, bothExistFieldOnly);
}
/**
*
*
* @param includeFields null
* @param excludeFields null
*/
public FieldBaseEquator(List<String> includeFields, List<String> excludeFields) {
super(includeFields, excludeFields);
}
/**
* {@inheritDoc}
*/
@Override
public List<String> getDiffFields(Object first, Object second) {
if (first == second) {
return Collections.emptyList();
}
// 先尝试判断是否为简单数据类型
if (isSimpleField(first, second)) {
return compareSimpleField(first, second);
}
Set<String> allFieldNames;
// 获取所有字段
Map<String, Field> firstFields = getAllFields(first);
Map<String, Field> secondFields = getAllFields(second);
if (first == null) {
allFieldNames = secondFields.keySet();
} else if (second == null) {
allFieldNames = firstFields.keySet();
} else {
allFieldNames = getAllFieldNames(firstFields.keySet(), secondFields.keySet());
}
List<String> diffFields = new LinkedList<>();
for (String fieldName : allFieldNames) {
try {
Field firstField = firstFields.getOrDefault(fieldName, null);
Field secondField = secondFields.getOrDefault(fieldName, null);
Object firstVal = null;
Class<?> firstType = null;
Class<?> secondType = null;
Object secondVal = null;
if (firstField != null) {
firstField.setAccessible(true);
firstVal = firstField.get(first);
firstType = firstField.getType();
}
if (secondField != null) {
secondField.setAccessible(true);
secondVal = secondField.get(second);
secondType = secondField.getType();
}
FieldInfo fieldInfo = new FieldInfo(fieldName, firstType, secondType);
fieldInfo.setFirstVal(firstVal);
fieldInfo.setSecondVal(secondVal);
if (!isFieldEquals(fieldInfo) && isNoneEmpty(firstVal, secondVal)) {
diffFields.add("[" + fieldName + "]:由\"" + firstVal + "\"修改为\"" + secondVal + "\"");
}
} catch (IllegalAccessException e) {
throw new IllegalStateException("获取属性进行比对发生异常: " + fieldName, e);
}
}
return diffFields;
}
private Map<String, Field> getAllFields(Object obj) {
if (obj == null) {
return Collections.emptyMap();
}
return CACHE.computeIfAbsent(obj.getClass(), k -> {
Map<String, Field> fieldMap = new HashMap<>(8);
Class<?> cls = k;
while (cls != Object.class) {
Field[] fields = cls.getDeclaredFields();
for (Field field : fields) {
// 一些通过字节码注入改写类的框架会合成一些字段,如 jacoco 的 $jacocoData 字段
// 正常情况下这些字段都需要被排除掉
if (!field.isSynthetic()) {
fieldMap.put(field.getName(), field);
}
}
cls = cls.getSuperclass();
}
return fieldMap;
});
}
/**
* null
*
* @param firstVal
* @param secondVal
* @return
*/
private boolean isNoneEmpty(Object firstVal, Object secondVal) {
String first = null == firstVal ? "" : firstVal.toString();
String second = null == secondVal ? "" : secondVal.toString();
return !StringUtils.isAllBlank(first, second);
}
}

@ -0,0 +1,120 @@
package com.engine.organization.entity.logview.bo;
import java.util.Objects;
/**
*
*
* @author:dxfeng
* @createTime: 2022/07/06
* @version: 1.0
*/
public class FieldInfo {
/**
*
*/
private String fieldName;
/**
*
*/
private Class<?> firstFieldType;
/**
*
*/
private Class<?> secondFieldType;
/**
*
*/
private Object firstVal;
/**
*
*/
private Object secondVal;
public FieldInfo() {
}
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType) {
this.fieldName = fieldName;
this.firstFieldType = firstFieldType;
this.secondFieldType = secondFieldType;
}
public FieldInfo(String fieldName, Class<?> fieldType, Object firstVal, Object secondVal) {
this.fieldName = fieldName;
this.firstFieldType = fieldType;
this.secondFieldType = fieldType;
this.firstVal = firstVal;
this.secondVal = secondVal;
}
public FieldInfo(String fieldName, Class<?> firstFieldType, Class<?> secondFieldType, Object firstVal, Object secondVal) {
this.fieldName = fieldName;
this.firstFieldType = firstFieldType;
this.secondFieldType = secondFieldType;
this.firstVal = firstVal;
this.secondVal = secondVal;
}
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
public Class<?> getFirstFieldType() {
return firstFieldType;
}
public void setFirstFieldType(Class<?> firstFieldType) {
this.firstFieldType = firstFieldType;
}
public Object getFirstVal() {
return firstVal;
}
public void setFirstVal(Object firstVal) {
this.firstVal = firstVal;
}
public void setSecondFieldType(Class<?> secondFieldType) {
this.secondFieldType = secondFieldType;
}
public Class<?> getSecondFieldType() {
return secondFieldType;
}
public Object getSecondVal() {
return secondVal;
}
public void setSecondVal(Object secondVal) {
this.secondVal = secondVal;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FieldInfo fieldInfo = (FieldInfo) o;
return Objects.equals(fieldName, fieldInfo.fieldName) &&
Objects.equals(firstFieldType, fieldInfo.firstFieldType) &&
Objects.equals(secondFieldType, fieldInfo.secondFieldType) &&
Objects.equals(firstVal, fieldInfo.firstVal) &&
Objects.equals(secondVal, fieldInfo.secondVal);
}
@Override
public int hashCode() {
return Objects.hash(fieldName, firstFieldType, secondFieldType, firstVal, secondVal);
}
@Override
public String toString() {
return "[\"" + fieldName + "\":由\"" + firstVal + "\"修改为\"" + secondVal;
}
}

@ -0,0 +1,168 @@
package com.engine.organization.entity.logview.bo;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
/**
* getter
* <p>
* get is
* <p>
*
* @author:dxfeng
* @createTime: 2022/07/06
* @version: 1.0
*/
public class GetterBaseEquator extends AbstractEquator {
private static final String GET = "get";
private static final String IS = "is";
private static final String GET_IS = "get|is";
private static final String GET_CLASS = "getClass";
private static final Map<Class<?>, Map<String, Method>> CACHE = new ConcurrentHashMap<>();
public GetterBaseEquator() {
}
/**
* @param bothExistFieldOnly
*/
public GetterBaseEquator(boolean bothExistFieldOnly) {
super(bothExistFieldOnly);
}
/**
*
*
* @param includeFields null
* @param excludeFields null
*/
public GetterBaseEquator(List<String> includeFields, List<String> excludeFields) {
super(includeFields, excludeFields);
}
/**
*
*
* @param includeFields null
* @param excludeFields null
* @param bothExistFieldOnly true
*/
public GetterBaseEquator(List<String> includeFields, List<String> excludeFields, boolean bothExistFieldOnly) {
super(includeFields, excludeFields, bothExistFieldOnly);
}
/**
* {@inheritDoc}
*/
@Override
public List<String> getDiffFields(Object first, Object second) {
if (first == null && second == null) {
return Collections.emptyList();
}
// 先尝试判断是否为普通数据类型
if (isSimpleField(first, second)) {
return compareSimpleField(first, second);
}
Set<String> allFieldNames;
// 获取所有字段
Map<String, Method> firstGetters = getAllGetters(first);
Map<String, Method> secondGetters = getAllGetters(second);
if (first == null) {
allFieldNames = secondGetters.keySet();
} else if (second == null) {
allFieldNames = firstGetters.keySet();
} else {
allFieldNames = getAllFieldNames(firstGetters.keySet(), secondGetters.keySet());
}
List<String> diffFields = new LinkedList<>();
for (String fieldName : allFieldNames) {
try {
Method firstGetterMethod = firstGetters.getOrDefault(fieldName, null);
Method secondGetterMethod = secondGetters.getOrDefault(fieldName, null);
Object firstVal = firstGetterMethod != null ? firstGetterMethod.invoke(first) : null;
Object secondVal = secondGetterMethod != null ? secondGetterMethod.invoke(second) : null;
FieldInfo fieldInfo = new FieldInfo(fieldName, getReturnType(firstGetterMethod), getReturnType(secondGetterMethod));
fieldInfo.setFirstVal(firstVal);
fieldInfo.setSecondVal(secondVal);
if (!isFieldEquals(fieldInfo)) {
diffFields.add("[" + fieldName + "]:由" + firstVal + "修改为" + secondVal);
}
} catch (IllegalAccessException | InvocationTargetException e) {
throw new IllegalStateException("获取属性进行比对发生异常: " + fieldName, e);
}
}
return diffFields;
}
private Class<?> getReturnType(Method method) {
return method == null ? null : method.getReturnType();
}
/**
* getter
*
* @return key -> fieldName, value -> getter
*/
private Map<String, Method> getAllGetters(Object obj) {
if (obj == null) {
return Collections.emptyMap();
}
return CACHE.computeIfAbsent(obj.getClass(), k -> {
Class<?> clazz = obj.getClass();
Map<String, Method> getters = new LinkedHashMap<>(8);
while (clazz != Object.class) {
Method[] methods = clazz.getDeclaredMethods();
for (Method m : methods) {
// getter 方法必须是 public 且没有参数的
if (!Modifier.isPublic(m.getModifiers()) || m.getParameterTypes().length > 0) {
continue;
}
if (m.getReturnType() == Boolean.class || m.getReturnType() == boolean.class) {
// 如果返回值是 boolean 则兼容 isXxx 的写法
if (m.getName().startsWith(IS)) {
String fieldName = uncapitalize(m.getName().substring(2));
getters.put(fieldName, m);
continue;
}
}
// 以get开头但排除getClass()方法
if (m.getName().startsWith(GET) && !GET_CLASS.equals(m.getName())) {
String fieldName = uncapitalize(m.getName().replaceFirst(GET_IS, ""));
getters.put(fieldName, m);
}
}
clazz = clazz.getSuperclass(); //得到父类,然后赋给自己
}
return getters;
});
}
/**
* commons-lang3StringUtils
* <p>
* 使
*/
private String uncapitalize(final String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
return str;
}
final int firstCodepoint = str.codePointAt(0);
final int newCodePoint = Character.toLowerCase(firstCodepoint);
if (firstCodepoint == newCodePoint) {
return str;
}
final int[] newCodePoints = new int[strLen];
int outOffset = 0;
newCodePoints[outOffset++] = newCodePoint;
for (int inOffset = Character.charCount(firstCodepoint); inOffset < strLen; ) {
final int codepoint = str.codePointAt(inOffset);
newCodePoints[outOffset++] = codepoint;
inOffset += Character.charCount(codepoint);
}
return new String(newCodePoints, 0, outOffset);
}
}

@ -0,0 +1,25 @@
package com.engine.organization.entity.logview.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author:dxfeng
* @createTime: 2022/07/05
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class LogViewSearchParam {
private Long operatorId;
private Long companyId;
private Long departmentId;
private String operateDate;
private String startDate;
private String endDate;
private String moduleType;
}

@ -0,0 +1,57 @@
package com.engine.organization.entity.logview.vo;
import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.organization.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* @author:dxfeng
* @createTime: 2022/07/05
* @version: 1.0
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@OrganizationTable(pageId = "caef4d3e-fc3d-11ec-a203-00e04c680716",
fields = "t.id, t.operator_name, t.create_time, t.operate_type, t.client_ip, t.operate_module_name,t.operate_desc,t.message,t.value,t.params_str",
fromSql = "FROM hr_log t ",
primarykey = "id",
orderby = "create_time",
tableType = WeaTableType.NONE
)
public class LogViewVO {
@OrganizationTableColumn(text = "操作时间", width = "20%", column = "create_time", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getDateTimeFormat")
private Date createTime;
@OrganizationTableColumn(text = "操作者", width = "16%", column = "operator_name")
private String operator;
@OrganizationTableColumn(text = "操作类型", width = "16%", column = "operate_type", transmethod = "com.engine.organization.transmethod.LogViewTransMethod.getOperateType")
private String operateType;
@OrganizationTableColumn(text = "操作描述", width = "16%", column = "operate_desc")
private String operateDesc;
@OrganizationTableColumn(text = "对象", width = "16%", column = "value")
private String value;
@OrganizationTableColumn(text = "所属模块", width = "16%", column = "operate_module_name")
private String operateModuleName;
@OrganizationTableColumn(text = "修改详情", width = "16%", column = "message")
private String showDetail;
@OrganizationTableColumn(text = "操作IP", width = "16%", column = "client_ip")
private String clientIp;
@OrganizationTableColumn(text = "操作参数", width = "16%", column = "params_str", display = false)
private String paramsStr;
}

@ -43,7 +43,7 @@ public class PostInfoSearchParam {
/**
*
*/
private Integer postId;
private Long postId;
/**
*
*/

@ -45,7 +45,7 @@ public class PostInfoPO {
/**
*
*/
private Integer postId;
private Long postId;
/**
*
*/

@ -0,0 +1,39 @@
package com.engine.organization.enums;
/**
* @author:dxfeng
* @createTime: 2022/07/04
* @version: 1.0
*/
public enum LogModuleNameEnum {
SCHEME("等级方案", 1),
LEVEL("职等", 2),
GRADE("职级", 3),
SEQUENCE("岗位序列", 4),
POSTINFO("职务管理", 6),
GROUP("集团管理", 7),
COMPANY("分部管理", 8),
DEPARTMENT("部门管理", 9),
JOB("岗位管理", 10),
RESOURCE("人员管理", 11),
STAFFPLAN("编制方案", 12),
STAFF("编制上报", 13),
OTHER("其他模块", 99);
private String name;
private Integer value;
LogModuleNameEnum(String name, Integer value) {
this.name = name;
this.value = value;
}
public Integer getValue() {
return value;
}
public String getName() {
return name;
}
}

@ -10,7 +10,10 @@ public enum OperateTypeEnum {
ADD("1", "新增"),
UPDATE("2", "更新"),
DELETE("4", "删除");
DELETE("4", "删除"),
MOVE("5", "转移"),
MERGE("6", "合并"),
COPY("7", "复制");
private String value;

@ -28,6 +28,8 @@ public interface CompMapper {
*/
List<String> listUsedId();
List<String> listUsedIds();
/**
*
*
@ -140,4 +142,22 @@ public interface CompMapper {
* @return
*/
int getMaxShowOrder();
/**
* ID
*
* @param companyName
* @param parentCompany
* @return
*/
Long getIdByNameAndPid(@Param("companyName") String companyName, @Param("parentCompany") Long parentCompany);
/**
*
*
* @param parentCompany
* @return
*/
Integer countTopCompany(@Param("parentCompany") Long parentCompany);
}

@ -52,6 +52,21 @@
and NVL(parent_company,'0')='0'
</sql>
<sql id="nullParentCompany">
and ifnull(parent_company,0) =
#{parentCompany}
</sql>
<sql id="nullParentCompany" databaseId="sqlserver">
and isnull(parent_company,0) =
#{parentCompany}
</sql>
<sql id="nullParentCompany" databaseId="oracle">
and NVL(parent_company,0) =
#{parentCompany}
</sql>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.company.po.CompPO" keyProperty="id"
keyColumn="id" useGeneratedKeys="true">
INSERT INTO jcl_org_comp
@ -135,7 +150,9 @@
#{description},
</if>
0,
#{showOrder},
<if test="showOrder != null ">
#{showOrder},
</if>
</trim>
</insert>
@ -249,10 +266,6 @@
from JCL_ORG_JOB
where delete_type = 0
union
select company_id
from JCL_ORG_STAFFPLAN
where delete_type = 0
union
select comp_id
from JCL_ORG_STAFF
where delete_type = 0
@ -261,6 +274,21 @@
select max(show_order)
from jcl_org_comp
</select>
<select id="getIdByNameAndPid" resultType="java.lang.Long">
select id
from jcl_org_comp
where delete_type = 0 and comp_name = #{companyName}
<include refid="nullParentCompany"/>
</select>
<select id="countTopCompany" resultType="java.lang.Integer">
select COUNT(id) from jcl_org_comp where 1=1
<include refid="nullParentCompany"/>
</select>
<select id="listUsedIds" resultType="java.lang.String">
select company_id
from JCL_ORG_STAFFPLAN
where delete_type = 0
</select>
<update id="updateForbiddenTagById" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
update jcl_org_comp

@ -114,4 +114,13 @@ public interface DepartmentMapper {
* @return
*/
int getMaxShowOrder();
/**
*
* @param departmentName
* @param parentCompany
* @param parentDepartment
* @return
*/
Long getIdByNameAndPid(@Param("departmentName") String departmentName, @Param("parentCompany") Long parentCompany, @Param("parentDepartment") Long parentDepartment);
}

@ -140,6 +140,27 @@
select max(show_order)
from jcl_org_dept
</select>
<select id="getIdByNameAndPid" resultType="java.lang.Long">
select id
from jcl_org_dept
where delete_type = 0 and dept_name = #{departmentName}
and parent_comp = #{parentCompany}
<include refid="nullParentDepartment"/>
</select>
<sql id="nullParentDepartment">
and ifnull(parent_dept,0) =
#{parentDepartment}
</sql>
<sql id="nullParentDepartment" databaseId="sqlserver">
and isnull(parent_dept,0) =
#{parentDepartment}
</sql>
<sql id="nullParentDepartment" databaseId="oracle">
and NVL(parent_dept,0) =
#{parentDepartment}
</sql>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.department.po.DepartmentPO"
keyProperty="id"

@ -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>

@ -0,0 +1,47 @@
package com.engine.organization.mapper.hrmresource;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @description:
* @author:dxfeng
* @createTime: 2022/05/20
* @version: 1.0
*/
public interface HrmResourceMapper {
/**
* ID
*
* @return
*/
Long getMaxId();
/**
* ID
*
* @param id
* @return
*/
String getLastNameById(@Param("id") Long id);
/**
* ID
*
* @param keyField
* @param keyFieldValue
* @return
*/
Integer getIdByKeyField(@Param("keyField") String keyField, @Param("keyFieldValue") String keyFieldValue);
/**
*
*
* @param keyField
* @return
*/
List<JSONObject> getKeyMapByKetField(@Param("keyField") String keyField);
}

@ -0,0 +1,45 @@
<?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.HrmResourceMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
<result column="id" property="id"/>
<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.creator
, t.delete_type
, t.create_time
, t.update_time
</sql>
<select id="getMaxId" resultType="java.lang.Long">
select max(id)
from jcl_org_hrmresource
</select>
<select id="getLastNameById" resultType="java.lang.String">
select last_name
from jcl_org_hrmresource
where delete_type = 0
and id = #{id}
</select>
<select id="getIdByKeyField" resultType="java.lang.Integer">
select id
from jcl_org_hrmresource
where delete_type = 0
and ${keyField} = #{keyFieldValue}
</select>
<select id="getKeyMapByKetField" resultType="com.alibaba.fastjson.JSONObject">
select id, account_type, certificate_num, login_id, work_code, ${keyField}
from jcl_org_hrmresource
</select>
</mapper>

@ -0,0 +1,33 @@
package com.engine.organization.mapper.hrmresource;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @author:dxfeng
* @createTime: 2022/06/30
* @version: 1.0
*/
public interface SystemDataMapper {
JSONObject getSysLanguageByLicense();
List<JSONObject> getSysLanguageByActivable();
List<JSONObject> getHrmEducationLevelData();
List<JSONObject> getHrmJobCallData();
List<JSONObject> getHrmLocationsByCountryId();
List<JSONObject> getHrmUseKindData();
String getScCompanyNameById(@Param("companyId") String companyId);
String getScDepartmentNameById(@Param("departmentId") String departmentId);
String getScHrmResourceNameById(@Param("managerId") String managerId);
}

@ -0,0 +1,51 @@
<?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.SystemDataMapper">
<select id="getSysLanguageByLicense" resultType="com.alibaba.fastjson.JSONObject">
select multilanguage, (select id from syslanguage where language='简体中文' or language='中文') as cnLanguageId
from license
</select>
<select id="getSysLanguageByActivable" resultType="com.alibaba.fastjson.JSONObject">
select id, language
from syslanguage
where activable = 1
</select>
<select id="getHrmEducationLevelData" resultType="com.alibaba.fastjson.JSONObject">
select id, name
from HrmEducationLevel
</select>
<select id="getHrmJobCallData" resultType="com.alibaba.fastjson.JSONObject">
select id, name
from HrmJobCall
</select>
<select id="getHrmLocationsByCountryId" resultType="com.alibaba.fastjson.JSONObject">
select id, locationname
from HrmLocations
where countryid = 1
</select>
<select id="getHrmUseKindData" resultType="com.alibaba.fastjson.JSONObject">
select id, name
from HrmUseKind
</select>
<select id="getScCompanyNameById" resultType="java.lang.String">
select subcompanyname
from hrmsubcompany
where id = #{companyId}
</select>
<select id="getScDepartmentNameById" resultType="java.lang.String">
select departmentname
from hrmdepartment
where id = #{departmentId}
</select>
<select id="getScHrmResourceNameById" resultType="java.lang.String">
select lastname
from hrmresource
where id = #{managerId}
</select>
</mapper>

@ -53,6 +53,8 @@ public interface JobMapper {
*/
JobPO getJobById(@Param("id") Long id);
List<JobPO> getJobsByIds(@Param("ids") Collection<Long> ids);
/**
* ID
*
@ -131,4 +133,15 @@ public interface JobMapper {
* @return
*/
int getMaxShowOrder();
/**
*
*
* @param jobName
* @param parentCompany
* @param parentDepartment
* @param parentJob
* @return
*/
Long getIdByNameAndPid(@Param("jobName") String jobName, @Param("parentCompany") Long parentCompany, @Param("parentDepartment") Long parentDepartment, @Param("parentJob") Long parentJob);
}

@ -337,6 +337,39 @@
select max(show_order)
from jcl_org_job
</select>
<select id="getIdByNameAndPid" resultType="java.lang.Long">
select id
from jcl_org_job
where delete_type = 0 and job_name = #{jobName}
and parent_comp = #{parentCompany}
and parent_dept = #{parentDepartment}
<include refid="nullparentJob"/>
</select>
<select id="getJobsByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_job t
where delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<sql id="nullparentJob">
and ifnull(parent_job,0) =
#{parentJob}
</sql>
<sql id="nullparentJob" databaseId="sqlserver">
and isnull(parent_job,0) =
#{parentJob}
</sql>
<sql id="nullparentJob" databaseId="oracle">
and NVL(parent_job,0) =
#{parentJob}
</sql>
<sql id="likeSQL">

@ -25,8 +25,11 @@ public interface PostInfoMapper {
*/
List<PostInfoPO> listByNo(@Param("postInfoNo") String postInfoNo);
PostInfoPO getPostInfoByNameAndPostId(@Param("postInfoName") String postInfoName, @Param("postId") Long postId);
/**
* ID
*
* @param id
* @return
*/
@ -39,10 +42,11 @@ public interface PostInfoMapper {
* @return
*/
@MapKey("id")
List<Map<String,Object>> listPostInfosByIds(@Param("ids") Collection<Long> ids);
List<Map<String, Object>> listPostInfosByIds(@Param("ids") Collection<Long> ids);
/**
*
*
* @param postInfoPO
* @return
*/
@ -63,6 +67,7 @@ public interface PostInfoMapper {
* @return
*/
int updateForbiddenTagById(PostInfoPO postInfoPO);
/**
*
*
@ -71,4 +76,5 @@ public interface PostInfoMapper {
int deleteByIds(@Param("ids") Collection<Long> ids);
List<PostInfoPO> getPostInfosByIds(@Param("ids") Collection<Long> ids);
}

@ -60,6 +60,20 @@
#{id}
</foreach>
</select>
<select id="getPostInfoByNameAndPostId" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_post_info t where post_info_name = #{postInfoName} and post_id = #{postId} AND delete_type = 0
</select>
<select id="getPostInfosByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_post_info t where delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<update id="updatePostInfo" parameterType="com.engine.organization.entity.postion.po.PostInfoPO">
update jcl_org_post_info

@ -26,6 +26,8 @@ public interface PostMapper {
*/
PostPO getPostByID(@Param("id") long id);
List<PostPO> listByName(@Param("postName") String postName);
/**
* ID
*
@ -65,4 +67,5 @@ public interface PostMapper {
*/
int deleteByIds(@Param("ids") Collection<Long> ids);
List<PostPO> getPostsByIds(@Param("ids") Collection<Long> ids);
}

@ -49,7 +49,24 @@
</select>
<select id="getTreeData" resultMap="TreeResultMap">
select id , post_name from jcl_org_post where delete_type ='0'
select id, post_name
from jcl_org_post
where delete_type = '0'
</select>
<select id="listByName" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_post t where post_name = #{postName} AND delete_type = 0
</select>
<select id="getPostsByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_post t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<update id="updatePost" parameterType="com.engine.organization.entity.postion.po.PostPO">
@ -109,7 +126,6 @@
</insert>
<update id="deleteByIds">
UPDATE jcl_org_post
SET delete_type = 1

@ -0,0 +1,18 @@
package com.engine.organization.mapper.resource;
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);
}

@ -0,0 +1,70 @@
<?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="BaseResultMap" type="com.engine.organization.entity.hrmresource.po.HrmResourcePO">
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
id,last_name,department_id,company_id,mobile,telephone,manager_id
</sql>
<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>
<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>

@ -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
@ -79,4 +81,10 @@ public interface GradeMapper {
int getCountByTag(@Param("tag") int tag);
List<String> listUsedId();
List<String> getGradeNameByIds(@Param("ids") Collection<Long> ids);
@MapKey("id")
List<Map<String, Object>> listGradessByIds(@Param("ids") Collection<Long> ids);
}

@ -59,6 +59,24 @@
from JCL_ORG_JOBDT
where delete_type = 0
</select>
<select id="getGradeNameByIds" resultType="java.lang.String">
select grade_name from jcl_org_grade where delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</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 jcl_org_grade

@ -96,4 +96,6 @@ public interface LevelMapper {
* @return
*/
ArrayList<TreeData> getTreeData();
List<LevelPO> getLevelsByIds(@Param("ids")Collection<Long> ids);
}

@ -80,6 +80,15 @@
from jcl_org_level
where delete_type = '0'
</select>
<select id="getLevelsByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_level t where delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<update id="updateLevel" parameterType="com.engine.organization.entity.scheme.po.LevelPO">
update jcl_org_level

@ -87,4 +87,6 @@ public interface SchemeMapper {
* @return
*/
ArrayList<TreeData> getTreeData();
List<SchemePO> getSchemesByIds(@Param("ids")Collection<Long> ids);
}

@ -78,6 +78,16 @@
from jcl_org_scheme
where delete_type = '0'
</select>
<select id="getSchemesByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_scheme t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.scheme.po.SchemePO" keyProperty="id"
keyColumn="id" useGeneratedKeys="true">

@ -85,4 +85,5 @@ public interface SequenceMapper {
*/
int getCountByTag(@Param("tag") int tag);
List<SequencePO> getSequencesByIds(@Param("ids") Collection<Long> ids);
}

@ -64,6 +64,16 @@
select sequence_id
from JCL_ORG_JOB
</select>
<select id="getSequencesByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_sequence t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<update id="updateSequence" parameterType="com.engine.organization.entity.sequence.po.SequencePO">
update jcl_org_sequence

@ -1,4 +1,4 @@
package com.engine.organization.mapper.SISLog;
package com.engine.organization.mapper.sislog;
import com.engine.organization.entity.LoggerContext;

@ -1,6 +1,6 @@
<?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.SISLog.SISLogMapper">
<mapper namespace="com.engine.organization.mapper.sislog.SISLogMapper">
<resultMap id="BaseResultMap" type="com.engine.organization.entity.LoggerContext">
<!--<result column="id" property="id"/>-->
<!--<result column="operate_desc" property="operateDesc"/>-->
@ -17,7 +17,9 @@
<!-- 表字段 -->
<sql id="baseColumns">
t.id
t
.
id
, t.operate_desc
, t.operator_id
, t.operator_name
@ -45,7 +47,11 @@
client_ip,
method_name,
class_name,
delete_type
delete_type,
operate_module_name,
operate_module,
message,
value
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
#{operateDesc},
@ -57,12 +63,13 @@
#{clientIp},
#{methodName},
#{className},
#{deleteType}
#{deleteType},
#{operateModuleName},
#{operateModule},
#{message},
#{value}
</trim>
</insert>
</mapper>

@ -63,4 +63,6 @@ public interface StaffMapper {
* @return
*/
List<String> listUsedId();
List<StaffPO> getStaffsByIds(@Param("ids") Collection<Long> ids);
}

@ -63,6 +63,16 @@
and job_id = #{jobId}
</if>
</select>
<select id="getStaffsByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_staff t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<update id="updateStaff" parameterType="com.engine.organization.entity.staff.po.StaffPO">
update jcl_org_staff

@ -72,4 +72,6 @@ public interface StaffPlanMapper {
* @return
*/
List<String> listUsedId();
List<StaffPlanPO> getStaffPlansByIds(@Param("ids") Collection<Long> ids);
}

@ -64,6 +64,16 @@
from JCL_ORG_STAFF
where delete_type = 0
</select>
<select id="getStaffPlansByIds" resultMap="BaseResultMap">
select
<include refid="baseColumns"/>
from jcl_org_staffplan t
WHERE delete_type = 0
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</select>
<update id="updateStaffPlan" parameterType="com.engine.organization.entity.staff.po.StaffPlanPO">
update jcl_org_staffplan

@ -0,0 +1,22 @@
package com.engine.organization.service;
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.util.List;
/**
* @Author weaver_cl
* @Description:
* @Date 2022/6/28
* @Version V1.0
**/
public interface ExportCommonService {
/**
*
* @param ids
* @return
*/
XSSFWorkbook resourceExport(List<Long> ids);
}

@ -38,7 +38,7 @@ public interface ExtService {
* @param groupId
* @return
*/
List<SearchConditionItem> getExtSaveForm(User user, String extendType, String tableName, int viewAttr, String groupId, String autoNoField, String serialType);
List<SearchConditionItem> getExtSaveForm(User user, String extendType, String tableName, int viewAttr, String groupId, String autoNoField, String serialType, String... readOnlyFields);
/**
*

@ -1,5 +1,6 @@
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.searchtree.SearchTreeParams;
@ -73,4 +74,25 @@ public interface HrmResourceService {
* @return
*/
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);
}

@ -0,0 +1,33 @@
package com.engine.organization.service;
import weaver.hrm.User;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2022/06/29
* @version: 1.0
*/
public interface ImportCommonService {
/**
*
*
* @param params
* @param request
* @return
*/
Map<String, Object> saveImportResource(Map<String, Object> params, HttpServletRequest request);
/**
*
*
* @param params
* @param request
* @param user
* @return
*/
Map<String, Object> saveImport(Map<String, Object> params, HttpServletRequest request, User user);
}

@ -0,0 +1,24 @@
package com.engine.organization.service;
import com.engine.organization.entity.logview.param.LogViewSearchParam;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2022/07/05
* @version: 1.0
*/
public interface LogViewService {
/**
*
*
* @param param
* @return
*/
Map<String, Object> listPage(LogViewSearchParam param);
Map<String, Object> getSearchCondition();
String showDetailById(Long id);
}

@ -0,0 +1,19 @@
package com.engine.organization.service;
import weaver.hrm.User;
import java.util.Map;
/**
* @className: OrgChartService
* @author: dengjp
* @date: 2022/7/7
* @description: Service
**/
public interface OrgChartService {
Map<String, Object> getOptionCondition(Map<String, Object> request2Map, User user);
Map<String, Object> getCompanyData(Map<String, Object> request2Map, User user);
Map<String, Object> getUserData(Map<String, Object> request2Map, User user);
}

@ -29,7 +29,7 @@ public interface SchemeService {
* @param param
* @return
*/
Map<String, Object> save(SchemeSearchParam param);
int save(SchemeSearchParam param);
/**
*
@ -37,21 +37,23 @@ public interface SchemeService {
* @param param
* @return
*/
Map<String, Object> updateScheme(SchemeSearchParam param);
int updateScheme(SchemeSearchParam param);
/**
*
*
* @param params
* @return
*/
void updateForbiddenTagById(SchemeSearchParam params);
int updateForbiddenTagById(SchemeSearchParam params);
/**
* ID
*
* @param ids
* @return
*/
void deleteByIds(Collection<Long> ids);
int deleteByIds(Collection<Long> ids);
/**
*

@ -141,7 +141,7 @@ public class CompServiceImpl extends Service implements CompService {
// 判断是否开启自动编号
compNo = repeatDetermine(compNo);
params.put("comp_no", compNo);
if (StringUtils.isBlank(params.get("show_order").toString())) {
if (null == params.get("show_order") || StringUtils.isBlank(params.get("show_order").toString())) {
int maxShowOrder = getCompMapper().getMaxShowOrder();
params.put("show_order", maxShowOrder + 1);
}

@ -1,19 +1,13 @@
package com.engine.organization.service.impl;
import com.engine.core.impl.Service;
import com.engine.organization.annotation.Log;
import com.engine.organization.entity.LoggerContext;
import com.engine.organization.entity.po.Demo;
import com.engine.organization.enums.OperateTypeEnum;
import com.engine.organization.mapper.DemoMapper;
import com.engine.organization.service.DemoService;
import com.engine.organization.util.HrmI18nUtil;
import com.engine.organization.util.LogAspect;
import com.engine.organization.util.OrganizationAssert;
import com.engine.organization.util.db.MapperProxyFactory;
import com.weaverboot.frame.ioc.anno.classAnno.WeaIocService;
import java.lang.reflect.Method;
import java.util.List;
/**
@ -22,24 +16,42 @@ import java.util.List;
* @Date 2022/4/27
* @Version V1.0
**/
@WeaIocService
//@WeaIocService
//@WeaIocReplaceComponent("demoService") //如不标注名称,则按类的全路径注入
public class DemoServiceImpl extends Service implements DemoService {
@Override
@Log(operateType = OperateTypeEnum.ADD,operateDesc = "测试自定义日志")
//@Log(operateType = OperateTypeEnum.ADD,operateDesc = "测试自定义日志")
public List<Demo> list(String name) {
OrganizationAssert.notNull(name,HrmI18nUtil.getI18nLabel(34721,"参数不能为空") );
OrganizationAssert.notNull(name, HrmI18nUtil.getI18nLabel(34721, "参数不能为空"));
List<Demo> demos = MapperProxyFactory.getProxy(DemoMapper.class).listAll();
//操作日志记录
Method method = new Object(){}.getClass().getEnclosingMethod();
LoggerContext loggerContext = LoggerContext.builder().operatorId(user.getUID()).operatorName(user.getLastname()).build();
LogAspect logAspect = new LogAspect(DemoServiceImpl.class,method,loggerContext);
logAspect.start();
////操作日志记录
//Method method = new Object() {
//}.getClass().getEnclosingMethod();
//LoggerContext loggerContext = LoggerContext.builder().operatorId(user.getUID()).operatorName(user.getLastname()).build();
//LogAspect logAspect = new LogAspect(DemoServiceImpl.class, method, loggerContext);
//logAspect.start();
return demos;
}
//这个是接口后置方法,大概的用法跟前置方法差不多,稍有差别
//注解名称为WeaReplaceAfter
//返回类型必须为String
//参数叫WeaAfterReplaceParam这个类前四个参数跟前置方法的那个相同不同的是多了一个叫data的String这个是那个接口执行完返回的报文
//@WeaReplaceAfter(value = "/api/bs/hrmorganization/scheme/updateForbiddenTagById",order = 1)
// public void after(WeaAfterReplaceParam weaAfterReplaceParam){
//
// String data = weaAfterReplaceParam.getData();//这个就是接口执行完的报文
// System.out.println(data);
// //日志记录
// }
}

@ -388,12 +388,16 @@ public class DepartmentServiceImpl extends Service implements DepartmentService
// 处理自动编号
deptById.setDeptNo(CodeRuleUtil.generateCode(RuleCodeType.DEPARTMENT, deptById.getDeptNo(), false));
deptById.setParentComp(Long.parseLong(copyParam.getCompany()));
deptById.setParentDept(null);
// 显示顺序字段
deptById.setShowOrder(maxShowOrder + i + 1);
insertCount += getDepartmentMapper().insertIgnoreNull(deptById);
if ("1".equals(copyParam.getCopyJob())) {
List<JobPO> jobPOS = MapperProxyFactory.getProxy(JobMapper.class).listJobsByDepartmentId(idList.get(i));
int maxJobOrder = MapperProxyFactory.getProxy(JobMapper.class).getMaxShowOrder();
Integer maxJobOrder = MapperProxyFactory.getProxy(JobMapper.class).getMaxShowOrder();
if (maxJobOrder == null) {
maxJobOrder = 0;
}
recursionCopyJob((long) user.getUID(), jobPOS, deptById.getParentComp(), deptById.getId(), maxJobOrder);
}
}

@ -0,0 +1,61 @@
package com.engine.organization.service.impl;
import com.engine.core.impl.Service;
import com.engine.organization.entity.hrmresource.param.HrmResourceSearchParam;
import com.engine.organization.entity.hrmresource.vo.HrmResourceVO;
import com.engine.organization.mapper.resource.ResourceMapper;
import com.engine.organization.service.ExportCommonService;
import com.engine.organization.util.HrmI18nUtil;
import com.engine.organization.util.db.MapperProxyFactory;
import com.engine.organization.util.excel.ExcelUtil;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.util.*;
/**
* @Author weaver_cl
* @Description:
* @Date 2022/6/28
* @Version V1.0
**/
public class ExportCommonServiceImpl extends Service implements ExportCommonService {
@Override
public XSSFWorkbook resourceExport(List<Long> ids) {
List<HrmResourceVO> hrmResourceVOS = MapperProxyFactory.getProxy(ResourceMapper.class).listAll(ids);
if (hrmResourceVOS == null) {
hrmResourceVOS = new ArrayList<>();
}
// 1.工作簿名称
String sheetName = HrmI18nUtil.getI18nLabel(85368, "人员档案数据");
// 2.表头(后面动态获取)
List<List<Object>> excelSheetData = new ArrayList<>();
String[] header = {
HrmI18nUtil.getI18nLabel( 93270, "姓名"),
HrmI18nUtil.getI18nLabel( 93272, "部门"),
HrmI18nUtil.getI18nLabel( 93274, "分部"),
HrmI18nUtil.getI18nLabel( 93275, "移动电话"),
HrmI18nUtil.getI18nLabel( 93278, "办公室电话"),
HrmI18nUtil.getI18nLabel( 93279, "直接上级")};
excelSheetData.add(Arrays.asList(header));
//数据
List<List<Object>> rows = new LinkedList<>();
for (HrmResourceVO vo : hrmResourceVOS) {
List<Object> row = new LinkedList<>();
row.add(vo.getLastName());
row.add(vo.getDepartmentName());
row.add(vo.getCompanyName());
row.add(vo.getMobile());
row.add(vo.getTelephone());
row.add(vo.getManagerName());
rows.add(row);
}
excelSheetData.addAll(rows);
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
}
}

@ -74,7 +74,7 @@ public class ExtServiceImpl extends Service implements ExtService {
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, null == compExtMap ? null : compExtMap.get(extendInfoPO.getFieldName()));
item.setFieldcol(16);
if (2 == viewAttr) {
if (readOnlyFieldList.contains(extendInfoPO.getFieldName())) {
if (CollectionUtils.isNotEmpty(readOnlyFieldList) && readOnlyFieldList.contains(extendInfoPO.getFieldName())) {
item.setViewAttr(1);
} else if (1 == extendInfoPO.getIsrequired()) {
item.setViewAttr(3);
@ -91,17 +91,20 @@ public class ExtServiceImpl extends Service implements ExtService {
}
@Override
public List<SearchConditionItem> getExtSaveForm(User user, String extendType, String tableName, int viewAttr, String groupId, String autoNoField, String serialType) {
public List<SearchConditionItem> getExtSaveForm(User user, String extendType, String tableName, int viewAttr, String groupId, String autoNoField, String serialType, String... readOnlyFields) {
List<SearchConditionItem> conditionItems = new ArrayList<>();
// 2编辑 1查看
OrganizationAssert.notNull(groupId, "请选择对应的拓展页");
List<ExtendInfoPO> infoPOList = getExtendInfoMapper().listFields(extendType, groupId, tableName, ExtendInfoOperateType.ADD.getValue());
// 组装拓展页内容
List<String> readOnlyFieldList = Arrays.asList(readOnlyFields);
for (ExtendInfoPO extendInfoPO : infoPOList) {
SearchConditionItem item = ExtendInfoBO.getSearchConditionItem(user, viewAttr, extendInfoPO, null);
item.setFieldcol(16);
if (1 == extendInfoPO.getIsrequired()) {
if (CollectionUtils.isNotEmpty(readOnlyFieldList) && readOnlyFieldList.contains(extendInfoPO.getFieldName())) {
item.setViewAttr(1);
} else if (1 == extendInfoPO.getIsrequired()) {
item.setViewAttr(3);
item.setRules("required");
}

@ -157,8 +157,24 @@ public class GradeServiceImpl extends Service implements GradeService {
BrowserBean levelBrowserBean = levelBrowserItem.getBrowserConditionParam();
List<Map<String, Object>> levelMaps = getLevelMapper().listLevelsByIds(DeleteParam.builder().ids(gradePO.getLevelId()).build().getIds());
levelBrowserBean.setReplaceDatas(levelMaps);
long l = System.currentTimeMillis();
Map<String, Object> completeParams = levelBrowserBean.getCompleteParams();
completeParams.put("currenttime", l);
completeParams.put("scheme_id_"+ l,gradePO.getSchemeId());
Map<String, Object> conditionDataParams = levelBrowserBean.getConditionDataParams();
conditionDataParams.put("currenttime", l);
conditionDataParams.put("scheme_id_"+ l,gradePO.getSchemeId());
Map<String, Object> dataParams = levelBrowserBean.getDataParams();
dataParams.put("currenttime", l);
dataParams.put("scheme_id_"+ l,gradePO.getSchemeId());
Map<String, Object> destDataParams = levelBrowserBean.getDestDataParams();
destDataParams.put("currenttime", l);
destDataParams.put("scheme_id_"+ l,gradePO.getSchemeId());
levelBrowserItem.setBrowserConditionParam(levelBrowserBean);
levelBrowserItem.setRelatekey("schemeId");
// 编辑状态下,编号只读
// gradeNoCondition.setViewAttr(1);
}

@ -1,5 +1,6 @@
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.cloudstore.eccom.result.WeaResultMsg;
@ -12,8 +13,11 @@ import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.department.bo.DepartmentBO;
import com.engine.organization.entity.department.po.DepartmentPO;
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.vo.HrmResourceVO;
import com.engine.organization.entity.hrmresource.po.HrmRelationPO;
import com.engine.organization.entity.hrmresource.vo.ScHrmResourceVO;
import com.engine.organization.entity.job.bo.JobBO;
import com.engine.organization.entity.job.po.JobPO;
import com.engine.organization.entity.searchtree.SearchTree;
@ -21,7 +25,14 @@ 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.ExtendTitleMapper;
import com.engine.organization.mapper.hrmresource.HrmRelationMapper;
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.HrmResourceService;
import com.engine.organization.util.MenuBtn;
@ -39,6 +50,7 @@ import weaver.hrm.User;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @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 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() {
return MapperProxyFactory.getProxy(DepartmentMapper.class);
}
@ -102,6 +142,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
return ServiceUtil.getService(ExtServiceImpl.class, user);
}
@Override
public Map<String, Object> getSearchTree(SearchTreeParams params) {
String keyword = params.getKeyword();
@ -114,7 +155,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
@Override
public Map<String, Object> listPage(HrmResourceSearchParam params) {
Map<String, Object> resultMap = new HashMap<>();
OrganizationWeaTable<HrmResourceVO> table = new OrganizationWeaTable<>(user, HrmResourceVO.class);
OrganizationWeaTable<ScHrmResourceVO> table = new OrganizationWeaTable<>(user, ScHrmResourceVO.class);
String sqlWhere = buildSqlWhere(params);
table.setSqlwhere(sqlWhere);
WeaResultMsg result = new WeaResultMsg(false);
@ -206,7 +247,7 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> conditionItems = new ArrayList<>();
SearchConditionItem lastNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "姓名", "lastName");
SearchConditionItem managerIdItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "直接上级", "managerId");
SearchConditionItem managerIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "直接上级", "1", "managerId", "");
SearchConditionItem companyIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "分部", "161", "companyId", "compBrowser");
SearchConditionItem departmentIdItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "部门", "161", "departmentId", "deptBrowser");
SearchConditionItem telephoneItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "办公电话", "telephone");
@ -234,14 +275,125 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName("导入人员").type("BTN_Import").build());
//topMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName("导入人员").type("BTN_Import").build());
btnDatas.put("topMenu", topMenuList);
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建人员").type("BTN_Addnew").build());
rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName("导入人员").type("BTN_Import").build());
//rightMenuList.add(MenuBtn.builder().isBatch("1").isTop("1").menuFun("import").menuIcon("icon-coms-leading-in").menuName("导入人员").type("BTN_Import").build());
rightMenuList.add(MenuBtn.builder().isBatch("0").isTop("0").menuFun("custom").menuIcon("icon-coms-task-list").menuName("显示列定制").type("BTN_COLUMN").build());
btnDatas.put("rightMenu", rightMenuList);
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);
}
}
/**
*
*
@ -250,22 +402,22 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
*/
private String buildSqlWhere(HrmResourceSearchParam params) {
DBType dbType = DBType.get(new RecordSet().getDBType());
String sqlWhere = " where t.delete_type ='0' ";
String sqlWhere = " where 1=1 ";
String lastName = params.getLastName();
if (StringUtils.isNotBlank(lastName)) {
sqlWhere += " AND t.last_name " + dbType.like(lastName);
sqlWhere += " AND t.lastname " + dbType.like(lastName);
}
Long managerId = params.getManagerId();
if (null != managerId) {
sqlWhere += " AND t.manager_id = '" + managerId + "'";
sqlWhere += " AND t.managerid = '" + managerId + "'";
}
Long companyId = params.getCompanyId();
if (null != companyId) {
sqlWhere += " AND t.company_id = '" + companyId + "'";
sqlWhere += " AND t.subcompanyid1 = '" + companyId + "'";
}
Long departmentId = params.getDepartmentId();
if (null != departmentId) {
sqlWhere += " AND t.department_id = '" + departmentId + "'";
sqlWhere += " AND t.departmentid = '" + departmentId + "'";
}
String telephone = params.getTelephone();
if (StringUtils.isNotBlank(telephone)) {
@ -277,11 +429,11 @@ public class HrmResourceServiceImpl extends Service implements HrmResourceServic
}
String mobileCall = params.getMobileCall();
if (StringUtils.isNotBlank(mobileCall)) {
sqlWhere += " AND t.mobile_call " + dbType.like(mobileCall);
sqlWhere += " AND t.mobilecall " + dbType.like(mobileCall);
}
Long jobTitle = params.getJobTitle();
if (null != jobTitle) {
sqlWhere += " AND t.job_title = '" + jobTitle + "'";
sqlWhere += " AND t.jobtitle = '" + jobTitle + "'";
}
return sqlWhere;

@ -0,0 +1,105 @@
package com.engine.organization.service.impl;
import com.engine.core.impl.Service;
import com.engine.organization.entity.hrmresource.param.HrmResourceImportParam;
import com.engine.organization.service.ImportCommonService;
import com.engine.organization.util.saveimport.HrmResourceImportAdaptUtil;
import com.engine.organization.util.saveimport.HrmResourceImportProcessUtil;
import com.engine.organization.util.saveimport.SaveImportProcessUtil;
import weaver.file.FileUploadToPath;
import weaver.general.BaseBean;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.systeminfo.SystemEnv;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2022/06/29
* @version: 1.0
*/
public class ImportCommonServiceImpl extends Service implements ImportCommonService {
@Override
public Map<String, Object> saveImportResource(Map<String, Object> params, HttpServletRequest request) {
Map<String, Object> returnMap = new HashMap<>();
try {
String keyField = (String) params.get("keyField");
switch (keyField) {
case "workcode":
params.put("keyField","work_code");
break;
case "lastname":
params.put("keyField","last_name");
break;
case "loginid":
params.put("keyField","login_id");
break;
default:
break;
}
/*综合考虑多数据源后,实现通过配置文件配置适配器和解析类*/
List<Object> lsErrorInfo = new ArrayList<>();
HrmResourceImportAdaptUtil importAdaptUtil = new HrmResourceImportAdaptUtil();
FileUploadToPath fu = new FileUploadToPath(request);
int language = this.user.getLanguage();
importAdaptUtil.setUserlanguage(language);
List<String> errorInfo = importAdaptUtil.creatImportMap(fu);
//如果读取数据和验证模板没有发生错误
if (errorInfo.isEmpty()) {
Map<String, HrmResourceImportParam> hrMap = importAdaptUtil.getHrmImportMap();
HrmResourceImportProcessUtil importProcessUtil = new HrmResourceImportProcessUtil();
importProcessUtil.init(request);
importProcessUtil.processMap(hrMap);
} else {
Map<String, Object> error;
for (String s : errorInfo) {
error = new HashMap<>();
error.put("message", Util.null2String(s));
lsErrorInfo.add(error);
}
}
returnMap.put("errorInfo", lsErrorInfo);
returnMap.put("status", "1");
} catch (Exception e) {
returnMap.put("status", "-1");
returnMap.put("message", e.getMessage());
}
return returnMap;
}
@Override
public Map<String, Object> saveImport(Map<String, Object> params, HttpServletRequest request, User user) {
Map<String, Object> returnMap = new HashMap<>();
request.getSession(true).setAttribute("importBaseCreater", user);
try {
List<Object> lsErrorInfo = new ArrayList<>();
SaveImportProcessUtil importProcessUtil = new SaveImportProcessUtil();
List<String> errorInfo = importProcessUtil.importXls(request);
if (errorInfo != null && !errorInfo.isEmpty()) {
Map<String, Object> error;
for (String s : errorInfo) {
error = new HashMap<>();
error.put("message", Util.null2String(s));
lsErrorInfo.add(error);
}
}
returnMap.put("errorInfo", lsErrorInfo);
returnMap.put("status", "1");
returnMap.put("message", SystemEnv.getHtmlLabelName(24645, user.getLanguage()));
} catch (Exception e) {
new BaseBean().writeLog("导入基础数据失败:" + e);
returnMap.put("status", "-1");
returnMap.put("message", e.getMessage());
}
returnMap.put("pid", request.getSession(true).getAttribute("importExcelPid"));
return returnMap;
}
}

@ -17,8 +17,6 @@ import com.engine.organization.entity.company.po.CompPO;
import com.engine.organization.entity.department.bo.DepartmentBO;
import com.engine.organization.entity.department.po.DepartmentPO;
import com.engine.organization.entity.employee.vo.EmployeeTableVO;
import com.engine.organization.entity.extend.bo.ExtendInfoBO;
import com.engine.organization.entity.extend.po.ExtendInfoPO;
import com.engine.organization.entity.extend.po.ExtendTitlePO;
import com.engine.organization.entity.job.bo.JobBO;
import com.engine.organization.entity.job.dto.JobListDTO;
@ -215,12 +213,6 @@ public class JobServiceImpl extends Service implements JobService {
SearchConditionItem isKeyItem = OrganizationFormItemUtil.selectItem(user, isKeyOptions, 2, 16, 6, false, "是否关键岗", "forbiddenTag");
// 工作地点
SearchConditionItem workplaceItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作地点", "workplace");
// 工作概述
// SearchConditionItem descriptionItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作概述", "description");
// 任职职责
//SearchConditionItem workDutyItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "任职职责", "workDuty");
// 工作权限
// SearchConditionItem workAuthorityItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "工作权限", "workAuthority");
// 禁用标记
List<SearchConditionOption> selectOptions = new ArrayList<>();
SearchConditionOption enableOption = new SearchConditionOption("true", "启用");
@ -238,9 +230,6 @@ public class JobServiceImpl extends Service implements JobService {
conditionItems.add(parentJobBrowserItem);
conditionItems.add(isKeyItem);
conditionItems.add(workplaceItem);
//conditionItems.add(descriptionItem);
//conditionItems.add(workDutyItem);
//conditionItems.add(workAuthorityItem);
conditionItems.add(forbiddenTagItem);
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
@ -256,7 +245,7 @@ public class JobServiceImpl extends Service implements JobService {
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
List<SearchConditionItem> items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendTitle.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue());
List<SearchConditionItem> items = getExtService(user).getExtSaveForm(user, EXTEND_TYPE + "", JCL_ORG_JOB, 2, extendTitle.getId().toString(), "job_no", RuleCodeType.JOBTITLES.getValue(), "scheme_id", "parent_comp");
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
@ -286,7 +275,7 @@ public class JobServiceImpl extends Service implements JobService {
List<ExtendTitlePO> extendTitles = getExtendTitleMapper().getTitlesByGroupID(GROUP_ID);
if (CollectionUtils.isNotEmpty(extendTitles)) {
for (ExtendTitlePO extendTitle : extendTitles) {
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_JOB : JCL_ORG_JOBEXT, viewAttr, id, extendTitle.getId().toString(), "");
List<SearchConditionItem> items = getExtService(user).getExtForm(user, EXTEND_TYPE + "", GROUP_ID.equals(Long.parseLong(groupId)) ? JCL_ORG_JOB : JCL_ORG_JOBEXT, viewAttr, id, extendTitle.getId().toString(), "scheme_id", "parent_comp");
if (CollectionUtils.isNotEmpty(items)) {
addGroups.add(new SearchConditionGroup(extendTitle.getTitle(), true, items));
}
@ -301,23 +290,6 @@ public class JobServiceImpl extends Service implements JobService {
// 处理明细表
List<Map<String, Object>> extendTables = getExtService(user).getExtendTables(user, EXTEND_TYPE, Long.parseLong(groupId), 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").customValue("[\"browser\",{\"value\":\"161\",\"valueSpan\":\"自定义单选\",\"replaceDatas\":[{\"id\":\"161\",\"name\":\"自定义单选\"}]},{\"value\":\"gradeBrowser\",\"valueSpan\":\"职级浏览按钮\",\"replaceDatas\":[{\"showname\":\"gradeBrowser\",\"shownamespan\":\"gradeBrowser\",\"namespan\":\"职级浏览按钮\",\"name\":\"职级浏览按钮\",\"showtypespan\":\"列表式\",\"randomFieldIdspan\":\"\",\"showtype\":\"1\",\"randomFieldId\":\"gradeBrowser\",\"id\":\"gradeBrowser\"}]}]").build());
infoPOList.add(ExtendInfoPO.builder().fieldName("levelId").fieldNameDesc("职等").controlType(3).isrequired(1).browserType("162").customValue("[\"browser\",{\"value\":\"162\",\"valueSpan\":\"自定义多选\",\"replaceDatas\":[{\"id\":\"162\",\"name\":\"自定义多选\"}]},{\"value\":\"LevelBrowser\",\"valueSpan\":\"职等浏览按钮\",\"replaceDatas\":[{\"showname\":\"LevelBrowser\",\"shownamespan\":\"LevelBrowser\",\"namespan\":\"职等浏览按钮\",\"name\":\"职等浏览按钮\",\"showtypespan\":\"列表式\",\"randomFieldIdspan\":\"\",\"showtype\":\"1\",\"randomFieldId\":\"LevelBrowser\",\"id\":\"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<>();
@ -337,8 +309,9 @@ public class JobServiceImpl extends Service implements JobService {
JobSearchParam searchParam = JSONObject.parseObject(JSONObject.toJSONString(params), JobSearchParam.class);
params.put("is_key", null == searchParam.getIsKey() ? 0 : searchParam.getIsKey());
DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept());
params.put("parent_comp", departmentPO.getParentComp());
// TODO 处理ec表关联关系
//DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept());
//params.put("parent_comp", departmentPO.getParentComp());
if (StringUtils.isBlank(params.get("show_order").toString())) {
int maxShowOrder = getJobMapper().getMaxShowOrder();
params.put("show_order", maxShowOrder + 1);
@ -376,22 +349,13 @@ public class JobServiceImpl extends Service implements JobService {
// 更新主表数据
params.put("is_key", searchParam.getIsKey());
DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept());
params.put("parent_comp", departmentPO.getParentComp());
// TODO 处理ec表关联关系
//DepartmentPO departmentPO = MapperProxyFactory.getProxy(DepartmentMapper.class).getDeptById(searchParam.getParentDept());
//params.put("parent_comp", departmentPO.getParentComp());
getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOB, params, "", searchParam.getId());
// 更新主表拓展表
getExtService(user).updateExtForm(user, EXTEND_TYPE, JCL_ORG_JOBEXT, params, groupId, searchParam.getId());
// 更新明细表
getJobDTMapper().deleteByIds(searchParam.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(searchParam.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, searchParam.getId());
return searchParam.getId();
}

@ -0,0 +1,124 @@
package com.engine.organization.service.impl;
import com.api.browser.bean.SearchConditionGroup;
import com.api.browser.bean.SearchConditionItem;
import com.api.browser.bean.SearchConditionOption;
import com.api.browser.util.ConditionType;
import com.cloudstore.eccom.result.WeaResultMsg;
import com.engine.core.impl.Service;
import com.engine.email.util.EmailCommonCondition;
import com.engine.email.util.EmailConditionItem;
import com.engine.organization.component.OrganizationWeaTable;
import com.engine.organization.entity.logview.param.LogViewSearchParam;
import com.engine.organization.entity.logview.vo.LogViewVO;
import com.engine.organization.service.LogViewService;
import com.engine.organization.util.OrganizationFormItemUtil;
import org.apache.commons.lang.StringUtils;
import weaver.general.TimeUtil;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:dxfeng
* @createTime: 2022/07/05
* @version: 1.0
*/
public class LogViewServiceImpl extends Service implements LogViewService {
@Override
public Map<String, Object> listPage(LogViewSearchParam param) {
Map<String, Object> resultMap = new HashMap<>();
OrganizationWeaTable<LogViewVO> table = new OrganizationWeaTable<>(user, LogViewVO.class);
String sqlWhere = buildSqlWhere(param);
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> getSearchCondition() {
Map<String, Object> apiDatas = new HashMap<>();
List<SearchConditionGroup> addGroups = new ArrayList<>();
List<SearchConditionItem> conditionItems = new ArrayList<>();
// 操作者
SearchConditionItem operatorId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者", "1", "operatorId", "");
//操作时间
SearchConditionItem dateItem = OrganizationFormItemUtil.dateItem(user,2,16,true,2,"操作时间","operateDate");
// 操作者部门
SearchConditionItem departmentId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者部门", "161", "departmentId", "deptBrowser");
// 操作者分部
SearchConditionItem companyId = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "操作者分部", "161", "companyId", "compBrowser");
conditionItems.add(operatorId);
conditionItems.add(dateItem);
conditionItems.add(departmentId);
conditionItems.add(companyId);
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
apiDatas.put("conditions", addGroups);
return apiDatas;
}
@Override
public String showDetailById(Long id) {
return null;
}
static class DateGroupData {
private String name;
private String value;
public DateGroupData(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
}
private String buildSqlWhere(LogViewSearchParam param) {
if (null == param) {
return "";
}
String sqlWhere = " where delete_type = 0 ";
if (StringUtils.isNotBlank(param.getModuleType())) {
sqlWhere += " and operate_module = '" + param.getModuleType() + "'";
}
if (null != param.getOperatorId()) {
sqlWhere += " and operator_id = '" + param.getOperatorId() + "'";
}
if (null != param.getCompanyId()) {
sqlWhere += " and operator_id in (select id from hrmresource where subcompanyid1 = '" + param.getCompanyId() + "')";
}
if (null != param.getDepartmentId()) {
sqlWhere += " and operator_id in (select id from hrmresource where departmentid = '" + param.getDepartmentId() + "')";
}
if (StringUtils.isNotBlank(param.getOperateDate()) && !"-1".equals(param.getOperateDate())) {
if (!"6".equals(param.getOperateDate())) {
sqlWhere += " and create_time >= '" + TimeUtil.getDateByOption(param.getOperateDate() + "", "0") + " 00:00:00'";
sqlWhere += " and create_time <= '" + TimeUtil.getDateByOption(param.getOperateDate() + "", "") + " 23:59:59'";
} else {
if (StringUtils.isNotBlank(param.getStartDate())) {
sqlWhere += " and create_time >= '" + param.getStartDate() + "'";
}
if (StringUtils.isNotBlank(param.getEndDate())) {
sqlWhere += " and create_time <= '" + param.getEndDate() + "'";
}
}
}
return sqlWhere;
}
}

@ -0,0 +1,249 @@
package com.engine.organization.service.impl;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import com.engine.core.impl.Service;
import com.engine.organization.service.OrgChartService;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.hrm.User;
import java.util.*;
/**
* @className: OrgChartServiceImpl
* @author: dengjp
* @date: 2022/7/7
* @description: ServiceImpl
**/
public class OrgChartServiceImpl extends Service implements OrgChartService {
@Override
public Map<String, Object> getOptionCondition(Map<String, Object> request2Map, User user) {
RecordSet rs = new RecordSet();
String type = (String) request2Map.get("type");
rs.executeQuery("select id, companyname from HrmCompanyVirtual order by id");
Map<String, Object> result = new HashMap<>();
List<Map<String, Object>> fclasslist = new ArrayList<>();
Map<String, Object> defaultItem = new HashMap<>();
defaultItem.put("id", "0");
defaultItem.put("companyname", "行政维度");
fclasslist.add(defaultItem);
while(rs.next()) {
Map<String, Object> item = new HashMap<>();
item.put("id", rs.getString("id"));
item.put("companyname", rs.getString("companyname"));
fclasslist.add(item);
}
rs.executeQuery("select id, fnumber, fname from jcl_org_map " +("company".equals(type) ? "where ftype in (0, 1, 2)" : "") +" order by ftype , id ");
List<Map<String, Object>> companylist = new ArrayList<>();
Map<String, Object> defaultCompanyItem = new HashMap<>();
defaultCompanyItem.put("id", "0");
defaultCompanyItem.put("fname", "集团");
companylist.add(defaultCompanyItem);
while(rs.next()) {
Map<String, Object> item = new HashMap<>();
item.put("id", rs.getString("id"));
item.put("fnumber", rs.getString("fnumber"));
item.put("fname", rs.getString("fname"));
companylist.add(item);
}
result.put("api_status", true);
result.put("fclasslist", fclasslist);
result.put("companylist", companylist);
return result;
}
@Override
public Map<String, Object> getCompanyData(Map<String, Object> request2Map, User user) {
String date = (String) request2Map.get("date"); // 数据日期
if(StringUtils.isBlank(date)) {
date = DateUtil.format( DateUtil.offset(new Date() , DateField.DAY_OF_MONTH, 1), "yyyy-MM-dd");
}
String fclass = (String) request2Map.get("fclass"); // 维度
String root = (String) request2Map.get("root"); // 根节点
String level = (String) request2Map.get("level"); // 显示层级
if(StringUtils.isBlank(level)) {
level = "3";
}
String fisvitual = (String) request2Map.get("fisvitual"); // 是否显示虚拟组织
if(StringUtils.isBlank(fisvitual)) {
fisvitual = "0";
}
String whereSql = " where 1 = 1 ";
whereSql += " and (fdatebegin <= '"+ date +"' and fdateend >= '"+ date +"') or (fdatebegin <= '"+ date +"' and fdateend is null ) ";
whereSql += " and fclass = " + fclass +" ";
if("0".equals(fisvitual)) {
whereSql += " and fisvitual = 0 ";
}else {
whereSql += " and fisvitual in (0, 1) ";
}
String whereItemSql = " ";
if("0".equals(root)) { // 集团的情况
whereItemSql += " and ftype = 0 ";
} else {
whereItemSql += " and id = '" + root +"' ";
}
// 获取根节点
RecordSet rs = new RecordSet();
rs.executeQuery("select id, fname, ftype, fparentid from jcl_org_map " + whereSql + whereItemSql);
List<Map<String, Object>> list = new ArrayList<>();
String id = null;
if(rs.next()) {
Map<String, Object> item = new HashMap<>();
id = rs.getString("id");
item.put("id", rs.getString("id"));
item.put("fname", rs.getString("fname"));
item.put("ftype", rs.getString("ftype"));
item.put("parentId", null);
list.add(item);
}
int currentLevel = 1;
if(currentLevel + 1 <= Integer.parseInt(level)) {
findCompanyItemByParantId(id, currentLevel + 1, level, rs, list, whereSql);
}
Map<String, Object> result = new HashMap<>();
result.put("api_status", true);
result.put("data", list);
return result;
}
private void findCompanyItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql) {
rs.executeQuery("select id, fname, ftype, fparentid from jcl_org_map " + whereSql + " and fparentid = " + id);
List<Map<String, Object>> currentList = new ArrayList<>();
while(rs.next()) {
Map<String, Object> item = new HashMap<>();
item.put("id", rs.getString("id"));
item.put("fname", rs.getString("fname"));
item.put("ftype", rs.getString("ftype"));
item.put("parentId", rs.getString("fparentid"));
currentList.add(item);
}
list.addAll(currentList);
for (Map<String, Object> stringObjectMap : currentList) {
if(currentLevel + 1 <= Integer.parseInt(level)) {
findCompanyItemByParantId((String) stringObjectMap.get("id"), currentLevel + 1, level, rs, list, whereSql);
}
}
}
@Override
public Map<String, Object> getUserData(Map<String, Object> request2Map, User user) {
String date = (String) request2Map.get("date"); // 数据日期
if(StringUtils.isBlank(date)) {
date = DateUtil.format( DateUtil.offset(new Date() , DateField.DAY_OF_MONTH, 1), "yyyy-MM-dd");
}
String fclass = (String) request2Map.get("fclass"); // 维度
String root = (String) request2Map.get("root"); // 根节点
String level = (String) request2Map.get("level"); // 显示层级
if(StringUtils.isBlank(level)) {
level = "3";
}
String fisvitual = (String) request2Map.get("fisvitual"); // 是否显示虚拟组织
if(StringUtils.isBlank(fisvitual)) {
fisvitual = "0";
}
String whereSql = " where 1 = 1 ";
whereSql += " and (t.fdatebegin <= '"+ date +"' and t.fdateend >= '"+ date +"') or (t.fdatebegin <= '"+ date +"' and t.fdateend is null ) ";
whereSql += " and t.fclass = " + fclass +" ";
if("0".equals(fisvitual)) {
whereSql += " and t.fisvitual = 0 ";
}else {
whereSql += " and t.fisvitual in (0, 1) ";
}
String whereItemSql = " ";
if("0".equals(root)) { // 集团的情况
whereItemSql += " and t.ftype = 0 ";
} else {
whereItemSql += " and t.id = '" + root +"' ";
}
// 获取根节点
RecordSet rs = new RecordSet();
rs.executeQuery("select t.id, t.fname, t.ftype, t.fparentid, t.fleadername, t.fleaderimg, t.fleaderjob, t.fplan, t.fonjob from jcl_org_map t " + whereSql + whereItemSql);
List<Map<String, Object>> list = new ArrayList<>();
String id = null;
if(rs.next()) {
Map<String, Object> item = new HashMap<>();
id = rs.getString("id");
item.put("id", rs.getString("id"));
item.put("fname", rs.getString("fname"));
item.put("ftype", rs.getString("ftype"));
item.put("parentId", null);
item.put("fleadername", rs.getString("fleadername"));
item.put("fleaderimg", rs.getString("fleaderimg"));
item.put("fleaderjob", rs.getString("fleaderjob"));
item.put("fplan", rs.getString("fplan"));
item.put("fonjob", rs.getString("fonjob"));
list.add(item);
}
int currentLevel = 1;
if(currentLevel + 1 <= Integer.parseInt(level)) {
findUserItemByParantId(id, currentLevel + 1, level, rs, list, whereSql);
}
Map<String, Object> result = new HashMap<>();
result.put("api_status", true);
result.put("data", list);
return result;
}
private void findUserItemByParantId(String id, int currentLevel, String level, RecordSet rs, List<Map<String, Object>> list, String whereSql) {
rs.executeQuery("select t.id, t.fname, t.ftype, t.fparentid, t.fleadername, t.fleaderimg, t.fleaderjob, t.fplan, t.fonjob, t.fnumber from jcl_org_map t " + whereSql + " and t.fparentid = " + id);
List<Map<String, Object>> currentList = new ArrayList<>();
while(rs.next()) {
Map<String, Object> item = new HashMap<>();
item.put("id", rs.getString("id"));
item.put("fname", rs.getString("fname"));
item.put("ftype", rs.getString("ftype"));
item.put("parentId", rs.getString("fparentid"));
item.put("fleadername", rs.getString("fleadername"));
item.put("fleaderimg", rs.getString("fleaderimg"));
item.put("fleaderjob", rs.getString("fleaderjob"));
item.put("fplan", rs.getString("fplan"));
item.put("fonjob", rs.getString("fonjob"));
item.put("fnumber", rs.getString("fnumber"));
currentList.add(item);
}
for (Map<String, Object> stringObjectMap : currentList) {
if("4".equals(stringObjectMap.get("ftype"))) { // 员工信息
rs.executeQuery("select id, mobile, homeaddress from hrmresource where id = ? ", stringObjectMap.get("fnumber"));
if(rs.next()) {
stringObjectMap.put("mobile", rs.getString("mobile"));
stringObjectMap.put("address", rs.getString("homeaddress"));
}
rs.executeQuery("select departmentname from hrmresource hrm \n" +
"left join hrmdepartment d\n" +
"on hrm.departmentid = d.id\n" +
"where hrm.id = ? ", stringObjectMap.get("fnumber"));
if(rs.next()) {
stringObjectMap.put("department", rs.getString("departmentname"));
}
}
if(currentLevel + 1 <= Integer.parseInt(level)) {
findUserItemByParantId((String) stringObjectMap.get("id"), currentLevel + 1, level, rs, list, whereSql);
}
}
list.addAll(currentList);
}
}

@ -22,7 +22,6 @@ import com.engine.organization.util.db.DBType;
import com.engine.organization.util.db.MapperProxyFactory;
import org.apache.commons.lang3.StringUtils;
import weaver.conn.RecordSet;
import weaver.general.StringUtil;
import weaver.general.Util;
import java.util.*;
@ -143,7 +142,8 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
// 编辑状态下赋值操作
String id = Util.null2String(params.get("id"));
if (!StringUtil.isEmpty(id)) {
String planId = Util.null2String(params.get("planId"));
if (StringUtils.isNotBlank(id)) {
PostInfoPO postInfoPO = getPostInfoMapper().getPostInfoByID(Integer.parseInt(id));
OrganizationAssert.notNull(postInfoPO, "选择的数据不存在,或数据已删除");
@ -161,6 +161,11 @@ public class PostInfoServiceImpl extends Service implements PostInfoService {
postIdBrowser.setBrowserConditionParam(browserBean);
// 编辑状态下,编号只读
// noItem.setViewAttr(1);
}else if(StringUtils.isNotBlank(planId)){
BrowserBean browserBean = postIdBrowser.getBrowserConditionParam();
List<Map<String, Object>> maps = getPostMapper().listPostsByIds(DeleteParam.builder().ids(planId).build().getIds());
browserBean.setReplaceDatas(maps);
postIdBrowser.setBrowserConditionParam(browserBean);
}
selectItems.add(noItem);

@ -60,20 +60,17 @@ public class SchemeServiceImpl extends Service implements SchemeService {
}
@Override
public Map<String, Object> save(SchemeSearchParam param) {
public int save(SchemeSearchParam param) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apidatas = new HashMap<>(16);
List<SchemePO> list = getSchemeMapper().listByNo(Util.null2String(param.getSchemeNo()));
OrganizationAssert.isEmpty(list, "编号不允许重复");
SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID());
getSchemeMapper().insertIgnoreNull(schemePO);
return apidatas;
return getSchemeMapper().insertIgnoreNull(schemePO);
}
@Override
public Map<String, Object> updateScheme(SchemeSearchParam param) {
public int updateScheme(SchemeSearchParam param) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
Map<String, Object> apidatas = new HashMap<>();
SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID());
// 更新前先查询下旧编号,
String oldSchemeNo = getSchemeMapper().getSchemeByID(schemePO.getId()).getSchemeNo();
@ -81,23 +78,22 @@ public class SchemeServiceImpl extends Service implements SchemeService {
List<SchemePO> list = getSchemeMapper().listByNo(Util.null2String(schemePO.getSchemeNo()));
OrganizationAssert.isEmpty(list, "编号不允许重复");
}
getSchemeMapper().updateScheme(schemePO);
return apidatas;
return getSchemeMapper().updateScheme(schemePO);
}
@Override
public void updateForbiddenTagById(SchemeSearchParam params) {
public int updateForbiddenTagById(SchemeSearchParam params) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
SchemePO schemePO = SchemePO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build();
getSchemeMapper().updateForbiddenTagById(schemePO);
return getSchemeMapper().updateForbiddenTagById(schemePO);
}
@Override
public void deleteByIds(Collection<Long> ids) {
public int deleteByIds(Collection<Long> ids) {
HasRightUtil.hasRight(user, RIGHT_NAME, false);
OrganizationAssert.notEmpty(ids, "请选择要删除的数据");
getSchemeMapper().deleteByIds(ids);
return getSchemeMapper().deleteByIds(ids);
}

@ -202,7 +202,7 @@ public class StaffServiceImpl extends Service implements StaffService {
selectOptions.add(option1);
selectOptions.add(option2);
selectOptions.add(option3);
SearchConditionItem controlPolicyItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, false, "控制策略", "controlPolicy");
SearchConditionItem controlPolicyItem = OrganizationFormItemUtil.selectItem(user, selectOptions, 2, 16, 6, true, "控制策略", "controlPolicy");
controlPolicyItem.setViewAttr(3);
controlPolicyItem.setRules("required|string");
SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "描述说明", "description");

@ -2,7 +2,8 @@ package com.engine.organization.transmethod;
import com.engine.organization.mapper.comp.CompMapper;
import com.engine.organization.mapper.department.DepartmentMapper;
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.util.db.MapperProxyFactory;
/**
@ -21,6 +22,21 @@ public class HrmResourceTransMethod {
}
public static String getManagerName(String managerId) {
return MapperProxyFactory.getProxy(EmployeeMapper.class).getEmployeeNameById(Long.parseLong(managerId));
return MapperProxyFactory.getProxy(HrmResourceMapper.class).getLastNameById(Long.parseLong(managerId));
}
public static String getScDepartmentName(String departmentId) {
return MapperProxyFactory.getProxy(SystemDataMapper.class).getScDepartmentNameById(departmentId);
}
public static String getScCompanyName(String subCompanyId) {
return MapperProxyFactory.getProxy(SystemDataMapper.class).getScDepartmentNameById(subCompanyId);
}
public static String getScManagerName(String managerId) {
if ("0".equals(managerId)) {
return "";
}
return MapperProxyFactory.getProxy(SystemDataMapper.class).getScHrmResourceNameById(managerId);
}
}

@ -0,0 +1,65 @@
package com.engine.organization.transmethod;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.engine.organization.enums.OperateTypeEnum;
import org.apache.commons.lang.StringUtils;
/**
* @author:dxfeng
* @createTime: 2022/07/05
* @version: 1.0
*/
public class LogViewTransMethod {
public String getOperateType(String operateType) {
if (StringUtils.isNotBlank(operateType)) {
switch (operateType) {
case "1":
operateType = OperateTypeEnum.ADD.getLabel();
break;
case "2":
operateType = OperateTypeEnum.UPDATE.getLabel();
break;
case "4":
operateType = OperateTypeEnum.DELETE.getLabel();
break;
case "5":
operateType = OperateTypeEnum.MOVE.getLabel();
break;
case "6":
operateType = OperateTypeEnum.MERGE.getLabel();
break;
case "7":
operateType = OperateTypeEnum.COPY.getLabel();
break;
default:
break;
}
return operateType;
}
return "";
}
public String getDateTimeFormat(String dateTime) {
if (StringUtils.isNotBlank(dateTime)) {
dateTime = dateTime.substring(0,19);
}
return dateTime;
}
public static String getFormatJson(String jsonStr) {
if (StringUtils.isNotBlank(jsonStr)) {
try {
JSONObject object = JSONObject.parseObject(jsonStr);
jsonStr = JSON.toJSONString(object, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue,
SerializerFeature.WriteDateUseDateFormat);
jsonStr= jsonStr.replace("\n","<br/>").replace("\t","&nbsp&nbsp&nbsp&nbsp");
} catch (Exception e) {
return jsonStr;
}
}
return jsonStr;
}
}

@ -3,14 +3,12 @@ package com.engine.organization.util;
import com.engine.organization.annotation.Log;
import com.engine.organization.entity.LoggerContext;
import com.engine.organization.enums.DeleteTypeEnum;
import com.engine.organization.mapper.SISLog.SISLogMapper;
import com.engine.organization.mapper.sislog.SISLogMapper;
import com.engine.organization.util.db.MapperProxyFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import java.util.Arrays;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -21,7 +19,7 @@ import java.util.concurrent.Executors;
* @Date 2022/4/27
* @Version V1.0
**/
public class LogAspect<T> {
public class LogAspect<T> {
Class<T> clazz;
@ -32,7 +30,7 @@ public class LogAspect<T> {
private static final Logger logger = LoggerFactory.getLogger(LogAspect.class);
public LogAspect(Class<T> clazz,Method method,LoggerContext loggerContext) {
public LogAspect(Class<T> clazz, Method method, LoggerContext loggerContext) {
this.clazz = clazz;
this.method = method;
this.loggerContext = loggerContext;
@ -46,17 +44,18 @@ public class LogAspect<T> {
boolean f = method.isAnnotationPresent(Log.class);
if (f) {
Log annotation = method.getAnnotation(Log.class);
Parameter[] parameters = method.getParameters();
String value = annotation.operateType().getValue();
String operateDesc = annotation.operateDesc();
String operateModuleName = annotation.operateModule().getName();
Integer operateModule = annotation.operateModule().getValue();
loggerContext.setOperateDesc(operateDesc);
loggerContext.setCreateTime(new Date());
loggerContext.setOperateType(value);
loggerContext.setParamsStr(Arrays.toString(parameters));
loggerContext.setClientIp("127.0.0.1");
loggerContext.setMethodName(method.getName());
loggerContext.setClassName(clazz.getName());
loggerContext.setDeleteType(DeleteTypeEnum.NOT_DELETED.getValue());
loggerContext.setOperateModuleName(operateModuleName);
loggerContext.setOperateModule(operateModule);
MapperProxyFactory.getProxy(SISLogMapper.class).insert(loggerContext);
}
});

@ -154,7 +154,7 @@ public class MenuBtn {
// 新增
rightMenuList.add(MenuBtn.rightMenu_addNew());
// 复制
rightMenuList.add(MenuBtn.rightMenu_copy());
// rightMenuList.add(MenuBtn.rightMenu_copy());
// 日志
rightMenuList.add(MenuBtn.rightMenu_btnLog());
btnDatas.put("rightMenu", rightMenuList);

@ -0,0 +1,460 @@
package com.engine.organization.util;
import com.engine.organization.common.LocalDateRange;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.commons.lang3.time.FastDateFormat;
import weaver.general.BaseBean;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.*;
import java.time.format.DateTimeFormatter;
import java.util.Calendar;
import java.util.Date;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Slf4j
public class OrganizationDateUtil {
public static final ZoneId CTT = ZoneId.of(ZoneId.SHORT_IDS.get("CTT"));
public static final ZoneOffset SHANGHAI_ZONE_OFF_SET = ZoneOffset.ofHours(8);
public static final FastDateFormat DATE_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd");
public static final FastDateFormat DATETIME_FORMAT = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
public static final DateTimeFormatter MONTH_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM");
public static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
public static final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
public static final String MONTH_FORMATTER_PATTERN = "yyyy-MM";
public static final String DATE_FORMATTER_PATTERN = "yyyy-MM-dd";
public static final String DATE_TIME_FORMATTER_PATTERN = "yyyy-MM-dd HH:mm:ss";
/**
* yyyy-MM
**/
private static final String MONTH_REGEX = "^([1-9]\\d{3})-(([0]{0,1}[1-9])|([1][0-2]))$";
/**
* yyyy-MM-dd
**/
private static final String DAY_REGEX = "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$";
/**
*
*/
private static final String DAY_BAR_REGEX = "^[1-9]\\d{3}/([1-9]|1[0-2])/([1-9]|[1-2][0-9]|3[0-1])$";
public static Long localDate2EpochMilli(LocalDate localDate) {
if (localDate == null) {
return NumberUtils.LONG_ZERO;
}
return localDate.atStartOfDay(ZoneId.systemDefault()).toInstant().toEpochMilli();
}
public static Long localDateTime2EpochMilli(LocalDateTime localDateTime) {
if (localDateTime == null) {
return NumberUtils.LONG_ZERO;
}
return localDateTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
}
public static Long localDateTime2EpochMilli(Date localDateTime) {
if (localDateTime == null) {
return NumberUtils.LONG_ZERO;
}
return localDateTime.getTime();
}
public static String getFormatYearMonth(LocalDate localDate) {
if (localDate == null) {
return StringUtils.EMPTY;
}
try {
return localDate.format(MONTH_FORMATTER);
} catch (Exception e) {
log.warn("格式化月份错误", e);
return StringUtils.EMPTY;
}
}
public static String getFormatYearMonth(Date localDate) {
if (localDate == null) {
return StringUtils.EMPTY;
}
try {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(MONTH_FORMATTER_PATTERN);
return simpleDateFormat.format(localDate);
} catch (Exception e) {
log.warn("格式化月份错误", e);
return StringUtils.EMPTY;
}
}
public static String getFormatLocalDate(LocalDate localDate) {
if (localDate == null) {
return StringUtils.EMPTY;
}
try {
return localDate.format(DATE_FORMATTER);
} catch (Exception e) {
log.warn("格式化日期错误", e);
return StringUtils.EMPTY;
}
}
public static String getFormatLocalDate(LocalDateTime localDateTime) {
if (localDateTime == null) {
return StringUtils.EMPTY;
}
try {
return localDateTime.format(DATE_FORMATTER);
} catch (Exception e) {
log.warn("格式化日期错误", e);
return StringUtils.EMPTY;
}
}
public static String getFormatLocalDateTime(LocalDateTime localDateTime) {
if (localDateTime == null) {
return StringUtils.EMPTY;
}
try {
return localDateTime.format(DATE_TIME_FORMATTER);
} catch (Exception e) {
log.warn("格式化日期错误", e);
return StringUtils.EMPTY;
}
}
public static String getFormatLocalDateTime(Date localDateTime) {
if (localDateTime == null) {
return StringUtils.EMPTY;
}
try {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_TIME_FORMATTER_PATTERN);
return simpleDateFormat.format(localDateTime);
} catch (Exception e) {
log.warn("格式化日期错误", e);
return StringUtils.EMPTY;
}
}
public static LocalDateTime dateToLocalDateTime(Date date) {
Instant instant = date.toInstant();
ZoneId zone = ZoneId.systemDefault();
return LocalDateTime.ofInstant(instant, zone);
}
public static LocalDate dateToLocalDate(Date date) {
return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
}
public static Date localDateToDate(LocalDate localDate) {
if (null == localDate) {
return null;
}
ZonedDateTime zonedDateTime = localDate.atStartOfDay(ZoneId.systemDefault());
return Date.from(zonedDateTime.toInstant());
}
public static Date localDateTimeToDate(LocalDateTime localDateTime) {
if (null == localDateTime) {
return null;
}
return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
}
public static String getFormatLocalDate(Date date) {
if (date == null) {
return StringUtils.EMPTY;
}
LocalDateTime localDateTime = dateToLocalDateTime(date);
return getFormatLocalDate(localDateTime);
}
public static YearMonth localDate2YearMonth(Date localDate) {
if (localDate == null) {
return null;
}
Calendar c = Calendar.getInstance();
c.setTime(localDate);
int year = c.get(Calendar.YEAR);
int month = c.get(Calendar.MONTH) + 1;
return YearMonth.of(year, month);
}
public static YearMonth String2YearMonth(String localDate) {
if (checkDay(localDate)) {
return null;
}
return YearMonth.parse(localDate);
}
public static LocalDateRange localDate2Range(Date localDate) {
if (localDate == null) {
return null;
}
return LocalDateRange.builder()
.fromDate(getFirstDayDateOfMonth(localDate))
.endDate(getLastDayOfMonth(localDate))
.build();
}
public static LocalDateRange localDate2YearRange(Date localDate) {
if (localDate == null) {
return null;
}
return LocalDateRange.builder()
.fromDate(getFirstDayDateOfYear(localDate))
.endDate(getLastDayOfYear(localDate))
.build();
}
public static Date getFirstDayDateOfMonth(final Date date) {
final Calendar cal = Calendar.getInstance();
cal.setTime(date);
final int last = cal.getActualMinimum(Calendar.DAY_OF_MONTH);
cal.set(Calendar.DAY_OF_MONTH, last);
return cal.getTime();
}
public static Date getLastDayOfMonth(final Date date) {
final Calendar cal = Calendar.getInstance();
cal.setTime(date);
final int last = cal.getActualMaximum(Calendar.DAY_OF_MONTH);
cal.set(Calendar.DAY_OF_MONTH, last);
return cal.getTime();
}
public static Date getFirstDayDateOfYear(final Date date) {
final Calendar cal = Calendar.getInstance();
cal.setTime(date);
final int last = cal.getActualMinimum(Calendar.DAY_OF_YEAR);
cal.set(Calendar.DAY_OF_YEAR, last);
return cal.getTime();
}
public static Date getLastDayOfYear(final Date date) {
final Calendar cal = Calendar.getInstance();
cal.setTime(date);
final int last = cal.getActualMaximum(Calendar.DAY_OF_YEAR);
cal.set(Calendar.DAY_OF_YEAR, last);
return cal.getTime();
}
public static String getMonthBegin(String specifiedDay) {
int year;
int month;
Pattern pattern = Pattern.compile("\\d+-\\d+");
Matcher matcher = pattern.matcher(specifiedDay);
if (StringUtils.isEmpty(specifiedDay) || !matcher.matches()) {
return null;
} else {
year = Integer.parseInt(specifiedDay.split("-")[0]);
month = Integer.parseInt(specifiedDay.split("-")[1]);
}
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month - 1);
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
Date startDate = calendar.getTime();
return sdf.format(startDate);
}
public static String getYearMonth(int yearNum, int monthNum) {
LocalDateTime dateTime = LocalDateTime.now();
int year = dateTime.getYear() + yearNum;
int month = dateTime.getMonthValue() + monthNum;
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month - 1);
calendar.set(Calendar.DAY_OF_MONTH, 1);
calendar.set(Calendar.HOUR_OF_DAY, 0);
calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0);
calendar.set(Calendar.MILLISECOND, 0);
Date startDate = calendar.getTime();
return sdf.format(startDate);
}
/**
*
*
* @param yearMonth
* @return
*/
public static boolean checkYearMonth(String yearMonth) {
return Pattern.matches(MONTH_REGEX, yearMonth);
}
/**
*
*
* @param day
* @return
*/
public static boolean checkDay(String day) {
return Pattern.matches(DAY_REGEX, day) || Pattern.matches(DAY_BAR_REGEX, day);
}
public static Date parse(String date, String pattern) {
SimpleDateFormat format = new SimpleDateFormat(pattern);
try {
return format.parse(date);
} catch (ParseException e) {
new BaseBean().writeLog(String.format("日期解析异常: %s, %s", date, pattern));
}
return null;
}
/**
* LocalDateYearMonth
*
* @param localDate
* @return
*/
public static YearMonth toYearMonth(LocalDate localDate) {
Objects.requireNonNull(localDate, "localDate");
return YearMonth.of(localDate.getYear(), localDate.getMonthValue());
}
/**
* YearMonthDate
* dayOfMonth13122928
* 使toDateEndOfMonth(YearMonth)
*
* @param yearMonth
* @param dayOfMonth
* @return
*/
public static Date toDate(YearMonth yearMonth, int dayOfMonth) {
Objects.requireNonNull(yearMonth, "yearMonth");
return localDateToDate(yearMonth.atDay(dayOfMonth));
}
/**
* YearMonthDate
*
* @param yearMonth
* @return
*/
public static Date toDateStartOfMonth(YearMonth yearMonth) {
return toDate(yearMonth, 1);
}
/**
* YearMonthDate
*
* @param yearMonth
* @return
*/
public static Date toDateEndOfMonth(YearMonth yearMonth) {
Objects.requireNonNull(yearMonth, "yearMonth");
return localDateToDate(yearMonth.atEndOfMonth());
}
/**
* YearMonthLocalDate
* dayOfMonth13122928
* 使toLocalDateEndOfMonth(YearMonth)
*
* @param yearMonth
* @param dayOfMonth
* @return
*/
public static LocalDate toLocalDate(YearMonth yearMonth, int dayOfMonth) {
Objects.requireNonNull(yearMonth, "yearMonth");
return yearMonth.atDay(dayOfMonth);
}
/**
* YearMonthLocalDate
*
* @param yearMonth
* @return
*/
public static LocalDate toLocalDateStartOfMonth(YearMonth yearMonth) {
return toLocalDate(yearMonth, 1);
}
/**
* YearMonthLocalDate
*
* @param yearMonth
* @return
*/
public static LocalDate toLocalDateEndOfMonth(YearMonth yearMonth) {
Objects.requireNonNull(yearMonth, "yearMonth");
return yearMonth.atEndOfMonth();
}
/**
* StringDate
*
* @param date
* @return
*/
public static Date stringToDateTime(String date) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
Date parse = null;
if (date != null) {
try {
parse = sdf.parse(date);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
return parse;
}
public static Date stringToDate(String date) {
return dateStrToLocalDate(date);
}
//格式化日期
public static String strToDateLong(String strDate) {
Date date = new Date();
try {
date = new SimpleDateFormat("yyyyMMddHHmmss").parse(strDate + "000000");//先按照原格式转换为时间
} catch (ParseException e) {
e.printStackTrace();
}
String str = new SimpleDateFormat("yyyy-MM").format(date);//再将时间转换为对应格式字符串
return str;
}
private static Date dateStrToLocalDate(String date) {
Date localDate = null;
try {
date = date.substring(0, 10);
if (date.contains("/")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
localDate = format.parse(date);
} else if (date.contains("-")) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
localDate = format.parse(date);
}
} catch (Exception e) {
log.error("日期解析异常,{}", date);
localDate = null;
}
return localDate;
}
}

@ -7,6 +7,7 @@ import com.api.browser.util.ConditionFactory;
import com.api.browser.util.ConditionType;
import weaver.hrm.User;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -236,7 +237,29 @@ public class OrganizationFormItemUtil {
/**
*
*
* @param user
* @param colSpan
* @param fieldcol
* @param isQuickSearch
* @param viewAttr
* @param label
* @param name
* @return
*/
public static SearchConditionItem dateItem(User user, int colSpan, int fieldcol, boolean isQuickSearch,
int viewAttr, String label, String name) {
ConditionFactory conditionFactory = new ConditionFactory(user);
SearchConditionItem date = conditionFactory.createCondition(ConditionType.DATE, 502227, name);
date.setColSpan(colSpan);
date.setFieldcol(fieldcol);
date.setIsQuickSearch(isQuickSearch);
date.setViewAttr(viewAttr);
date.setLabel(label);
return date;
}
/**
*
* @param user
* @param colSpan
@ -260,4 +283,48 @@ public class OrganizationFormItemUtil {
}
public static SearchConditionItem dateGroupItem(User user, int colSpan, int fieldcol, boolean isQuickSearch,
int viewAttr, String label, String name) {
ConditionFactory conditionFactory = new ConditionFactory(user);
SearchConditionItem dateGroup = conditionFactory.createCondition(ConditionType.DATEGROUP, 502227, name);
dateGroup.setColSpan(colSpan);
dateGroup.setFieldcol(fieldcol);
dateGroup.setIsQuickSearch(isQuickSearch);
dateGroup.setViewAttr(viewAttr);
dateGroup.setLabel(label);
List<Object> datas = new ArrayList<>();
datas.add(new DateGroupData("全部","0"));
datas.add(new DateGroupData("今天","1"));
datas.add(new DateGroupData("本周","2"));
datas.add(new DateGroupData("本月","3"));
datas.add(new DateGroupData("本季","4"));
datas.add(new DateGroupData("本年","5"));
datas.add(new DateGroupData("上个月","7"));
datas.add(new DateGroupData("上一年","8"));
datas.add(new DateGroupData("指定日期范围","6"));
dateGroup.setDatas(datas);
dateGroup.setValue(new ArrayList<>());
dateGroup.setDateGroup(true);
return dateGroup;
}
static class DateGroupData{
private String name;
private String value;
public DateGroupData(String name, String value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public String getValue() {
return value;
}
}
}

@ -0,0 +1,68 @@
package com.engine.organization.util;
import com.alibaba.fastjson.JSON;
import com.engine.core.impl.Service;
import com.engine.organization.entity.LoggerContext;
import com.engine.organization.entity.logview.bo.FieldBaseEquator;
import com.engine.organization.transmethod.LogViewTransMethod;
import org.apache.commons.collections.CollectionUtils;
import java.lang.reflect.Method;
import java.util.List;
/**
* @author:dxfeng
* @createTime: 2022/07/04
* @version: 1.0
*/
public class OrganizationWrapper extends Service {
/**
*
*
* @param clazz
* @param value
* @param params
* @param before
* @param after
*/
public void writeOperateLog(Class clazz, String value, String params,
Object before, Object after) {
Method method = clazz.getEnclosingMethod();
LoggerContext loggerContext;
if (null != before) {
String formatJson = LogViewTransMethod.getFormatJson(params);
if (null != after) {
FieldBaseEquator fieldBaseEquator = new FieldBaseEquator();
List<String> diffFields = fieldBaseEquator.getDiffFields(before, after);
if (CollectionUtils.isEmpty(diffFields)) {
return;
}
StringBuilder message = new StringBuilder();
for (int i = 0; i < diffFields.size(); i++) {
message.append(i + 1).append(".").append(diffFields.get(i)).append("<br/>");
}
loggerContext = LoggerContext.builder().operatorId(user.getUID()).value(value).clientIp(user.getLoginip()).paramsStr(formatJson).operatorName(user.getLastname()).message(message.toString()).build();
} else {
loggerContext = LoggerContext.builder().operatorId(user.getUID()).value(value).clientIp(user.getLoginip()).paramsStr(formatJson).operatorName(user.getLastname()).message(JSON.toJSONString(before)).build();
}
LogAspect logAspect = new LogAspect(clazz, method, loggerContext);
logAspect.start();
}
}
/**
* @param clazz
* @param value
* @param params
* @param message
*/
public void writeOperateLog(Class clazz, String value, String params,
String message) {
writeOperateLog(clazz, value, params, message, null);
}
}

@ -21,7 +21,7 @@ public class PageInfoSortUtil {
* @return
*/
public static String getSortSql(String sortParams) {
JSONArray jsonArray = JSONObject.parseArray(sortParams);
JSONArray jsonArray = JSONObject.parseArray(sortParams);
if (CollectionUtils.isNotEmpty(jsonArray)) {
JSONObject jsonObject = (JSONObject) jsonArray.get(0);
String orderKey = upperCharToUnderLine(jsonObject.getString("orderkey"));
@ -54,4 +54,28 @@ public class PageInfoSortUtil {
}
return builder.toString();
}
/**
* 线
*
* @param str
* @return
*/
public static String underlineToHump(String str) {
//正则匹配下划线及后一个字符,删除下划线并将匹配的字符转成大写
Matcher matcher = Pattern.compile("_([a-z])").matcher(str);
StringBuffer sb = new StringBuffer(str);
if (matcher.find()) {
sb = new StringBuffer();
//将当前匹配的子串替换成指定字符串并且将替换后的子串及之前到上次匹配的子串之后的字符串添加到StringBuffer对象中
//正则之前的字符和被替换的字符
matcher.appendReplacement(sb, matcher.group(1).toUpperCase());
//把之后的字符串也添加到StringBuffer对象中
matcher.appendTail(sb);
} else {
//去除除字母之外的前面带的下划线
return sb.toString().replaceAll("_", "");
}
return underlineToHump(sb.toString());
}
}

@ -0,0 +1,41 @@
package com.engine.organization.util.excel;
public enum BooleanEnum {
True0("是", Boolean.TRUE),
True1("Y", Boolean.TRUE),
True2("TRUE", Boolean.TRUE),
True3("1", Boolean.TRUE),
True4("YES", Boolean.TRUE),
True5("T", Boolean.TRUE),
False0("否", Boolean.FALSE),
False1("N", Boolean.FALSE),
False2("FALSE", Boolean.FALSE),
False3("0", Boolean.FALSE),
False4("NO", Boolean.FALSE),
False5("F", Boolean.FALSE);
private String name;
private Boolean value;
private BooleanEnum(String name, Boolean value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getValue() {
return value;
}
public void setValue(Boolean value) {
this.value = value;
}
}

@ -0,0 +1,111 @@
package com.engine.organization.util.excel;
/**
*
*/
public class ExcelComment {
int dx1 = 0;
int dy1 = 0;
int dx2 = 0;
int dy2 = 0;
int col1 = 0;
int row1 = 0;
int col2 = 0;
int row2 = 0;
String content;
public int getDx1() {
return dx1;
}
public void setDx1(int dx1) {
this.dx1 = dx1;
}
public int getDy1() {
return dy1;
}
public void setDy1(int dy1) {
this.dy1 = dy1;
}
public int getDx2() {
return dx2;
}
public void setDx2(int dx2) {
this.dx2 = dx2;
}
public int getDy2() {
return dy2;
}
public void setDy2(int dy2) {
this.dy2 = dy2;
}
public int getCol1() {
return col1;
}
public void setCol1(int col1) {
this.col1 = col1;
}
public int getRow1() {
return row1;
}
public void setRow1(int row1) {
this.row1 = row1;
}
public int getCol2() {
return col2;
}
public void setCol2(int col2) {
this.col2 = col2;
}
public int getRow2() {
return row2;
}
public void setRow2(int row2) {
this.row2 = row2;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public ExcelComment(int dx1, int dy1, int dx2, int dy2, int col1, int row1, int col2, int row2, String content) {
this.dx1 = dx1;
this.dy1 = dy1;
this.dx2 = dx2;
this.dy2 = dy2;
this.col1 = col1;
this.row1 = row1;
this.col2 = col2;
this.row2 = row2;
this.content = content;
}
public ExcelComment(int col1, int row1, int col2, int row2, String content) {
this.col1 = col1;
this.row1 = row1;
this.col2 = col2;
this.row2 = row2;
this.content = content;
}
public ExcelComment() {
}
}

@ -0,0 +1,36 @@
package com.engine.organization.util.excel;
import org.apache.commons.lang3.exception.ContextedRuntimeException;
public class ExcelParseException extends ContextedRuntimeException{
private static final long serialVersionUID = -8696742623977630854L;
public ExcelParseException(String message) {
super(message);
this.msgCode = DEFAULT_CODE;
}
public ExcelParseException(String message, Throwable cause) {
super(message, cause);
this.msgCode = DEFAULT_CODE;
}
/**
*
*/
private static final String DEFAULT_CODE = "EXCP0000";
/**
*
*/
private String msgCode;
public String getMsgCode() {
return msgCode;
}
public void setMsgCode(String msgCode) {
this.msgCode = msgCode;
}
}

@ -0,0 +1,262 @@
package com.engine.organization.util.excel;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.exception.ContextedRuntimeException;
import org.apache.poi.ss.usermodel.Sheet;
import org.springframework.web.multipart.MultipartFile;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.*;
import static com.engine.organization.util.excel.ExcelSupport.EXCEL_TYPE_XLSX;
/**
* Excel
**/
public class ExcelParseHelper {
//待校验的行号
private static final int PARSE_EXCEL_ROW_VALID_CELL_INDEX = 0;
//字符开始下标
private static final int CHARACTER_FIRST_INDEX = 0;
/**
* Excel JavaBean
*
* @param file excel
* @param clazz bean
* @param sheetIndex excelsheet0
* @param rowIndex ,0
* @param standardCellNum sheet
* @return
*/
public static <T> List<T> parse2Map(MultipartFile file, Class<T> clazz, int sheetIndex, int rowIndex, int standardCellNum) {
List<List<String>> result = parse2Map(file, sheetIndex, rowIndex, standardCellNum);
List<T> list = new ArrayList<T>();
for (List<String> rowDatas : result) {
T t = setField(clazz, rowDatas);
list.add(t);
}
return list;
}
/**
* Excel JavaBean
*
* @param file excel
* @param clazz bean
* @param sheetIndex excelsheet0
* @param rowIndex ,0
* @param standardCellNum sheet
* @param fileName
* @return
*/
public static <T> List<T> parse2Map(InputStream file, Class<T> clazz, int sheetIndex, int rowIndex, int standardCellNum, String fileName) {
List<List<String>> result = parse2Map(file, sheetIndex, rowIndex, standardCellNum, fileName);
List<T> list = new ArrayList<T>();
for (List<String> rowDatas : result) {
T t = setField(clazz, rowDatas);
list.add(t);
}
return list;
}
/**
* <strong>excel</strong>
*
* @param file
* @param sheetIndex sheet
* @param rowIndex 0
* @return
*/
private static List<List<String>> parse2Map(MultipartFile file, int sheetIndex, int rowIndex, int standardCellNum) {
Sheet sheet = ExcelSupport.parseFile(file, sheetIndex);
int rowCount = sheet.getPhysicalNumberOfRows(); // 总行数
int cellCount = sheet.getRow(PARSE_EXCEL_ROW_VALID_CELL_INDEX).getPhysicalNumberOfCells(); // 总列数
Validate.isTrue(standardCellNum == cellCount, "Error in excel template! Page %s sheet should have %s column data, existing in %s column , please check the template!", sheetIndex, standardCellNum, cellCount);
List<List<String>> result = new ArrayList<List<String>>();
for (; rowIndex < rowCount; rowIndex++) {
List<String> cellResult = new ArrayList<String>();
for (int j = 0; j < cellCount; j++) {
cellResult.add(ExcelSupport.getCellValue(sheet, rowIndex, j));
}
result.add(cellResult);
}
return result;
}
/**
* <strong>excel</strong>
*
* @param file
* @param sheetIndex sheet
* @param rowIndex 0
* @return
*/
private static List<List<String>> parse2Map(InputStream file, int sheetIndex, int rowIndex, int standardCellNum, String fileName) {
Sheet sheet = ExcelSupport.parseFile(file, sheetIndex, fileName);
int rowCount = sheet.getPhysicalNumberOfRows(); // 总行数
int cellCount = sheet.getRow(PARSE_EXCEL_ROW_VALID_CELL_INDEX).getPhysicalNumberOfCells(); // 总列数
Validate.isTrue(standardCellNum == cellCount, "Error in excel template! Page %s sheet should have %s column data, existing in %s column , please check the template!", sheetIndex, standardCellNum, cellCount);
List<List<String>> result = new ArrayList<List<String>>();
for (; rowIndex < rowCount; rowIndex++) {
List<String> cellResult = new ArrayList<String>();
for (int j = 0; j < cellCount; j++) {
cellResult.add(ExcelSupport.getCellValue(sheet, rowIndex, j));
}
result.add(cellResult);
}
return result;
}
/**
* sheetmap
*
* @param file
* @param sheetIndex sheet
* @param rowIndex
* @return
*/
public static List<Map<String, Object>> parse2Map(InputStream file, int sheetIndex, int rowIndex) {
Sheet sheet = ExcelSupport.parseFile(file, sheetIndex, EXCEL_TYPE_XLSX);
int rowCount = sheet.getPhysicalNumberOfRows(); // 总行数
int cellCount = sheet.getRow(PARSE_EXCEL_ROW_VALID_CELL_INDEX).getPhysicalNumberOfCells(); // 总列数
List<String> sheetHeader = ExcelSupport.getSheetHeader(sheet, PARSE_EXCEL_ROW_VALID_CELL_INDEX);
List<Map<String, Object>> result = new ArrayList<>();
for (; rowIndex < rowCount; rowIndex++) {
Map<String, Object> cellResult = new HashMap<>();
for (int j = 0; j < cellCount; j++) {
String key = sheetHeader.get(j);
cellResult.put(key, ExcelSupport.getCellValue(sheet, rowIndex, j));
}
result.add(cellResult);
}
return result;
}
/**
* sheetmap
*
* @param rowIndex
* @return
*/
public static List<Map<String, Object>> parse2Map(Sheet sheet, int rowIndex) {
int rowCount = sheet.getPhysicalNumberOfRows(); // 总行数
int cellCount = sheet.getRow(PARSE_EXCEL_ROW_VALID_CELL_INDEX).getPhysicalNumberOfCells(); // 总列数
List<String> sheetHeader = ExcelSupport.getSheetHeader(sheet, PARSE_EXCEL_ROW_VALID_CELL_INDEX);
List<Map<String, Object>> result = new ArrayList<>();
for (; rowIndex < rowCount; rowIndex++) {
Map<String, Object> cellResult = new HashMap<>();
for (int j = 0; j < cellCount; j++) {
String key = sheetHeader.get(j);
cellResult.put(key, ExcelSupport.getCellValue(sheet, rowIndex, j));
}
result.add(cellResult);
}
return result;
}
/**
* sheetList
*
* @param rowIndex
* @return
*/
public static List<List<String>> parse2List(Sheet sheet, int rowIndex) {
int rowCount = sheet.getPhysicalNumberOfRows(); // 总行数
int cellCount = sheet.getRow(PARSE_EXCEL_ROW_VALID_CELL_INDEX).getPhysicalNumberOfCells(); // 总列数
List<List<String>> result = new ArrayList<List<String>>();
for (; rowIndex < rowCount; rowIndex++) {
List<String> cellResult = new ArrayList<String>();
for (int j = 0; j < cellCount; j++) {
cellResult.add(ExcelSupport.getCellValue(sheet, rowIndex, j));
}
result.add(cellResult);
}
return result;
}
/**
*
*
* @param clazz
* @param rowDatas
* @param <T>
* @return
*/
private static <T> T setField(Class<T> clazz, List<String> rowDatas) {
try {
T obj = clazz.newInstance();
Field[] fields = clazz.getDeclaredFields();
for (Field field : fields) {
ExcelProperty excelProperty = field.getAnnotation(ExcelProperty.class);
if (excelProperty == null) {
continue;
}
int index = excelProperty.index();
Object value = getFieldValue(field, rowDatas.get(index), excelProperty);
field.setAccessible(true);
field.set(obj, value);
}
return obj;
} catch (Exception e) {
throw new ExcelParseException(e.getMessage(), e);
}
}
/**
* <strong>javaBean</strong>
*
* @param field javaBean
* @param value excel
* @param excelProperty javaBeanexcel
* @return
*/
@SuppressWarnings("rawtypes")
private static Object getFieldValue(Field field, String value, ExcelProperty excelProperty) {
if (StringUtils.isEmpty(value)) {
return null;
}
Object val = null;
try {
Class typeClass = field.getType();
if (typeClass == Integer.class) {
val = Integer.valueOf(value);
} else if (typeClass == Long.class) {
val = Long.valueOf(value);
} else if (typeClass == Float.class) {
val = Float.valueOf(value);
} else if (typeClass == Double.class) {
val = Double.valueOf(value);
} else if (typeClass == Date.class) {
val = ExcelSupport.getDate(value, excelProperty.format());
} else if (typeClass == Short.class) {
val = Short.valueOf(value);
} else if (typeClass == Character.class) {
val = value.charAt(CHARACTER_FIRST_INDEX);
} else if (typeClass == BigDecimal.class) {
val = new BigDecimal(value);
} else {
val = value;
}
} catch (Exception e) {
throw new ContextedRuntimeException(excelProperty.msg(), e);
}
return val;
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save