diff --git a/docs/表结构SQL/MySQL.sql b/docs/表结构SQL/MySQL.sql new file mode 100644 index 00000000..67473587 --- /dev/null +++ b/docs/表结构SQL/MySQL.sql @@ -0,0 +1,400 @@ +-- 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, + 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, + 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, + 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, + 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, + 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, + 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, + 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, + extend_type int null, + group_name varchar(100) NULL, + 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_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, + extend_group int null, + isenable int null, + isrequired int null, + list_show int null, + search_show int null, + edit_show int null, + add_show int null, + button_show int null, + show_order 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) +); + +-- JCL_ORG_COMPEXT +CREATE TABLE JCL_ORG_COMPEXT ( + id int auto_increment 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) +); + +-- 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, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDGROUP_DEPT +CREATE TABLE JCL_FIELD_EXTENDGROUP_DEPT ( + id int auto_increment NOT NULL, + extend_type int null, + group_name varchar(100) NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDGROUP_DEPT_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDINFO_DEPT +CREATE TABLE JCL_FIELD_EXTENDINFO_DEPT ( + 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, + extend_group int null, + isenable int null, + isrequired int null, + list_show int null, + search_show int null, + edit_show int null, + add_show int null, + button_show int null, + show_order int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDINFO_DEPT_PK PRIMARY KEY (id) +); + +-- JCL_ORG_DEPTPEXT +CREATE TABLE JCL_ORG_DEPTPEXT ( + id int auto_increment NOT NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_ORG_DEPTPEXT_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) +); + +-- 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, + job_sequence int null, + scheme_id int null, + parent_job int null, + is_key_job int null, + workplace varchar(100) NULL, + work_description text null, + work_duty text null, + work_authority text null, + forbidden_tag 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) +); + +-- JCL_ORG_JOBDT +CREATE TABLE JCL_ORG_JOBDT ( + id int auto_increment NOT NULL, + mainid int NULL, + job_rank int null, + job_level int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT CL_ORG_DEPTPEXT_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDGROUP_JOB +CREATE TABLE JCL_FIELD_EXTENDGROUP_JOB ( + id int auto_increment NOT NULL, + extend_type int null, + group_name varchar(100) NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDGROUP_JOB_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDINFO_JOB +CREATE TABLE JCL_FIELD_EXTENDINFO_JOB ( + 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, + extend_group int null, + isenable int null, + isrequired int null, + list_show int null, + search_show int null, + edit_show int null, + add_show int null, + button_show int null, + show_order int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDINFO_JOB_PK PRIMARY KEY (id) +); + +-- JCL_ORG_JOBPEXT +CREATE TABLE JCL_ORG_JOBPEXT ( + id int auto_increment NOT NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_ORG_JOBPEXT_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) +); + + +-- JCL_ORG_STAFFPLAN +CREATE TABLE JCL_ORG_STAFFPLAN ( + id int auto_increment NOT NULL, + staffplan_no varchar(100) NULL, + staffplan_name varchar(100) NULL, + staffplan_year varchar(100) NULL, + time_start date NULL, + time_end date NULL, + apply_company int NULL, + description text NULL, + status 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) +); + +-- JCL_ORG_STAFF +CREATE TABLE JCL_ORG_STAFF ( + id int auto_increment NOT NULL, + scheme_id int null, + comp int null, + dept int null, + job int null, + staff_num int null, + control_policy int null, + staff_permanent_num int null, + freeze_num int null, + lack_status int null, + staff_description varchar(100) NULL, + instruction text null, + 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, + business_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) +); + + + + + + + + + diff --git a/docs/表结构SQL/Oracle.sql b/docs/表结构SQL/Oracle.sql new file mode 100644 index 00000000..4f6f4b75 --- /dev/null +++ b/docs/表结构SQL/Oracle.sql @@ -0,0 +1,401 @@ +-- 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, + 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, + 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, + 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, + 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, + 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, + 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, + 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, + EXTEND_TYPE NUMBER NULL, + GROUP_NAME NVARCHAR2(100) NULL, + 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_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, + EXTEND_GROUP NUMBER NULL, + ISENABLE NUMBER NULL, + ISREQUIRED NUMBER NULL, + LIST_SHOW NUMBER NULL, + SEARCH_SHOW NUMBER NULL, + EDIT_SHOW NUMBER NULL, + ADD_SHOW NUMBER NULL, + BUTTON_SHOW NUMBER NULL, + SHOW_ORDER 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) +); + +-- 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) +); + +-- 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) +); + +-- 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, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (ID) +); + +-- JCL_FIELD_EXTENDGROUP_DEPT +CREATE TABLE JCL_FIELD_EXTENDGROUP_DEPT ( + ID NUMBER NOT NULL, + EXTEND_TYPE NUMBER NULL, + GROUP_NAME NVARCHAR2(100) NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_FIELD_EXTENDGROUP_DEPT_PK PRIMARY KEY (ID) +); + +-- JCL_FIELD_EXTENDINFO_DEPT +CREATE TABLE JCL_FIELD_EXTENDINFO_DEPT ( + 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, + EXTEND_GROUP NUMBER NULL, + ISENABLE NUMBER NULL, + ISREQUIRED NUMBER NULL, + LIST_SHOW NUMBER NULL, + SEARCH_SHOW NUMBER NULL, + EDIT_SHOW NUMBER NULL, + ADD_SHOW NUMBER NULL, + BUTTON_SHOW NUMBER NULL, + SHOW_ORDER NUMBER NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_FIELD_EXTENDINFO_DEPT_PK PRIMARY KEY (ID) +); + +-- JCL_ORG_DEPTPEXT +CREATE TABLE JCL_ORG_DEPTPEXT ( + ID NUMBER NOT NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_ORG_DEPTPEXT_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) +); + +-- 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, + JOB_SEQUENCE NUMBER NULL, + SCHEME_ID NUMBER NULL, + PARENT_JOB NUMBER NULL, + IS_KEY_JOB NUMBER NULL, + WORKPLACE NVARCHAR2(100) NULL, + WORK_DESCRIPTION NVARCHAR2(1000) NULL, + WORK_DUTY NVARCHAR2(1000) NULL, + WORK_AUTHORITY NVARCHAR2(1000) NULL, + FORBIDDEN_TAG 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) +); + +-- JCL_ORG_JOBDT +CREATE TABLE JCL_ORG_JOBDT ( + ID NUMBER NOT NULL, + MAINID NUMBER NULL, + JOB_RANK NUMBER NULL, + JOB_LEVEL NUMBER NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT CL_ORG_DEPTPEXT_PK PRIMARY KEY (ID) +); + +-- JCL_FIELD_EXTENDGROUP_JOB +CREATE TABLE JCL_FIELD_EXTENDGROUP_JOB ( + ID NUMBER NOT NULL, + EXTEND_TYPE NUMBER NULL, + GROUP_NAME NVARCHAR2(100) NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_FIELD_EXTENDGROUP_JOB_PK PRIMARY KEY (ID) +); + +-- JCL_FIELD_EXTENDINFO_JOB +CREATE TABLE JCL_FIELD_EXTENDINFO_JOB ( + 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, + EXTEND_GROUP NUMBER NULL, + ISENABLE NUMBER NULL, + ISREQUIRED NUMBER NULL, + LIST_SHOW NUMBER NULL, + SEARCH_SHOW NUMBER NULL, + EDIT_SHOW NUMBER NULL, + ADD_SHOW NUMBER NULL, + BUTTON_SHOW NUMBER NULL, + SHOW_ORDER NUMBER NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_FIELD_EXTENDINFO_JOB_PK PRIMARY KEY (ID) +); + +-- JCL_ORG_JOBPEXT +CREATE TABLE JCL_ORG_JOBPEXT ( + ID NUMBER NOT NULL, + CREATOR NUMBER NULL, + DELETE_TYPE NUMBER NULL, + CREATE_TIME DATE NULL, + UPDATE_TIME DATE NULL, + CONSTRAINT JCL_ORG_JOBPEXT_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) +); + +-- JCL_ORG_STAFFPLAN +CREATE TABLE JCL_ORG_STAFFPLAN ( + ID NUMBER NOT NULL, + STAFFPLAN_NO NVARCHAR2(100) NULL, + STAFFPLAN_NAME NVARCHAR2(100) NULL, + STAFFPLAN_YEAR NVARCHAR2(100) NULL, + TIME_START DATE NULL, + TIME_END DATE NULL, + APPLY_COMPANY NUMBER NULL, + DESCRIPTION NVARCHAR2(1000) NULL, + STATUS 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) +); + +-- JCL_ORG_STAFF +CREATE TABLE JCL_ORG_STAFF ( + ID NUMBER NOT NULL, + SCHEME_ID NUMBER NULL, + COMP NUMBER NULL, + DEPT NUMBER NULL, + JOB NUMBER NULL, + STAFF_NUM NUMBER NULL, + CONTROL_POLICY NUMBER NULL, + STAFF_PERMANENT_NUM NUMBER NULL, + FREEZE_NUM NUMBER NULL, + LACK_STATUS NUMBER NULL, + STAFF_DESCRIPTION NVARCHAR2(100) NULL, + INSTRUCTION NVARCHAR2(1000) NULL, + 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, + BUSINESS_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) +); + + + + + + + + + diff --git a/docs/表结构SQL/SqlServer.sql b/docs/表结构SQL/SqlServer.sql new file mode 100644 index 00000000..a07f5514 --- /dev/null +++ b/docs/表结构SQL/SqlServer.sql @@ -0,0 +1,400 @@ +-- 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, + 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 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, + 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 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, + 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 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, + 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 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, + 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 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, + 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 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, + 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 IDENTITY(1,1) NOT NULL, + extend_type int null, + group_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + 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_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, + extend_group int null, + isenable int null, + isrequired int null, + list_show int null, + search_show int null, + edit_show int null, + add_show int null, + button_show int null, + show_order 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) +); + +-- JCL_ORG_COMPEXT +CREATE TABLE JCL_ORG_COMPEXT ( + id int IDENTITY(1,1) 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 IDENTITY(1,1) 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 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, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_ORG_DEPT_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDGROUP_DEPT +CREATE TABLE JCL_FIELD_EXTENDGROUP_DEPT ( + id int IDENTITY(1,1) NOT NULL, + extend_type int null, + group_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDGROUP_DEPT_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDINFO_DEPT +CREATE TABLE JCL_FIELD_EXTENDINFO_DEPT ( + 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, + extend_group int null, + isenable int null, + isrequired int null, + list_show int null, + search_show int null, + edit_show int null, + add_show int null, + button_show int null, + show_order int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDINFO_DEPT_PK PRIMARY KEY (id) +); + +-- JCL_ORG_DEPTPEXT +CREATE TABLE JCL_ORG_DEPTPEXT ( + id int IDENTITY(1,1) NOT NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_ORG_DEPTPEXT_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 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 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, + job_sequence int null, + scheme_id int null, + parent_job int null, + is_key_job int null, + workplace varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + work_description text null, + work_duty text null, + work_authority text null, + forbidden_tag 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) +); + +-- JCL_ORG_JOBDT +CREATE TABLE JCL_ORG_JOBDT ( + id int IDENTITY(1,1) NOT NULL, + mainid int NULL, + job_rank int null, + job_level int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT CL_ORG_DEPTPEXT_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDGROUP_JOB +CREATE TABLE JCL_FIELD_EXTENDGROUP_JOB ( + id int IDENTITY(1,1) NOT NULL, + extend_type int null, + group_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDGROUP_JOB_PK PRIMARY KEY (id) +); + +-- JCL_FIELD_EXTENDINFO_JOB +CREATE TABLE JCL_FIELD_EXTENDINFO_JOB ( + 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, + extend_group int null, + isenable int null, + isrequired int null, + list_show int null, + search_show int null, + edit_show int null, + add_show int null, + button_show int null, + show_order int null, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_FIELD_EXTENDINFO_JOB_PK PRIMARY KEY (id) +); + +-- JCL_ORG_JOBPEXT +CREATE TABLE JCL_ORG_JOBPEXT ( + id int IDENTITY(1,1) NOT NULL, + creator int null, + delete_type int null, + create_time date null, + update_time date null, + CONSTRAINT JCL_ORG_JOBPEXT_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 date null, + update_time date null, + CONSTRAINT JCL_ORG_JOBEXT_DT1_PK PRIMARY KEY (id) +); + + +-- JCL_ORG_STAFFPLAN +CREATE TABLE JCL_ORG_STAFFPLAN ( + id int IDENTITY(1,1) NOT NULL, + staffplan_no varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + staffplan_name varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + staffplan_year varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + time_start date NULL, + time_end date NULL, + apply_company int NULL, + description text NULL, + status 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) +); + +-- JCL_ORG_STAFF +CREATE TABLE JCL_ORG_STAFF ( + id int IDENTITY(1,1) NOT NULL, + scheme_id int null, + comp int null, + dept int null, + job int null, + staff_num int null, + control_policy int null, + staff_permanent_num int null, + freeze_num int null, + lack_status int null, + staff_description varchar(100) COLLATE Chinese_PRC_CI_AS NULL, + instruction text null, + 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 IDENTITY(1,1) NOT NULL, + staff_id int null, + business_type int null, + business_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) +); + + + + + + + + + diff --git a/src/com/api/organization/web/CompController.java b/src/com/api/organization/web/CompController.java new file mode 100644 index 00000000..093fa968 --- /dev/null +++ b/src/com/api/organization/web/CompController.java @@ -0,0 +1,13 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/17 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/comp") +public class CompController extends com.engine.organization.web.CompController{ +} diff --git a/src/com/api/organization/web/GradeController.java b/src/com/api/organization/web/GradeController.java new file mode 100644 index 00000000..d116f3e1 --- /dev/null +++ b/src/com/api/organization/web/GradeController.java @@ -0,0 +1,14 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/grade") +public class GradeController extends com.engine.organization.web.GradeController { + +} diff --git a/src/com/api/organization/web/GroupController.java b/src/com/api/organization/web/GroupController.java new file mode 100644 index 00000000..fe147c93 --- /dev/null +++ b/src/com/api/organization/web/GroupController.java @@ -0,0 +1,15 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/group") +public class GroupController extends com.engine.organization.web.GroupController { + +} diff --git a/src/com/api/organization/web/LevelController.java b/src/com/api/organization/web/LevelController.java new file mode 100644 index 00000000..019b2529 --- /dev/null +++ b/src/com/api/organization/web/LevelController.java @@ -0,0 +1,15 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/10 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/level") +public class LevelController extends com.engine.organization.web.LevelController { + +} diff --git a/src/com/api/organization/web/PostController.java b/src/com/api/organization/web/PostController.java new file mode 100644 index 00000000..195a23b8 --- /dev/null +++ b/src/com/api/organization/web/PostController.java @@ -0,0 +1,15 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/post") +public class PostController extends com.engine.organization.web.PostController { + +} diff --git a/src/com/api/organization/web/PostInfoController.java b/src/com/api/organization/web/PostInfoController.java new file mode 100644 index 00000000..701e6646 --- /dev/null +++ b/src/com/api/organization/web/PostInfoController.java @@ -0,0 +1,15 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/postinfo") +public class PostInfoController extends com.engine.organization.web.PostInfoController { + +} diff --git a/src/com/api/organization/web/SchemeController.java b/src/com/api/organization/web/SchemeController.java new file mode 100644 index 00000000..81b153ae --- /dev/null +++ b/src/com/api/organization/web/SchemeController.java @@ -0,0 +1,15 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/10 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/scheme") +public class SchemeController extends com.engine.organization.web.SchemeController { + +} diff --git a/src/com/api/organization/web/SequenceController.java b/src/com/api/organization/web/SequenceController.java new file mode 100644 index 00000000..66fd1118 --- /dev/null +++ b/src/com/api/organization/web/SequenceController.java @@ -0,0 +1,15 @@ +package com.api.organization.web; + +import javax.ws.rs.Path; + +/** + * + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +@Path("/bs/hrmorganization/sequence") +public class SequenceController extends com.engine.organization.web.SequenceController { + +} diff --git a/src/com/engine/organization/annotation/Log.java b/src/com/engine/organization/annotation/Log.java index 35b4810f..124c5ea7 100644 --- a/src/com/engine/organization/annotation/Log.java +++ b/src/com/engine/organization/annotation/Log.java @@ -5,12 +5,11 @@ import com.engine.organization.enums.OperateTypeEnum; import java.lang.annotation.*; /** - * @Author weaver_cl + * @Author dxfeng * @Description: TODO - * @Date 2022/4/27 + * @Date 2022/5/9 * @Version V1.0 **/ - @Target({ElementType.PARAMETER, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) @Documented diff --git a/src/com/engine/organization/annotation/OrganizationTable.java b/src/com/engine/organization/annotation/OrganizationTable.java new file mode 100644 index 00000000..0217da51 --- /dev/null +++ b/src/com/engine/organization/annotation/OrganizationTable.java @@ -0,0 +1,67 @@ +package com.engine.organization.annotation; + + +import com.cloudstore.eccom.pc.table.WeaTableType; + +import java.lang.annotation.*; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface OrganizationTable { + + String pageId() default ""; + + /** + * 数据库字段,以','分割,例如:"id, name, description" + */ + String fields() default ""; + + /** + * 表名 ,例如:"FROM hrsa_tax_agent" + */ + String fromSql() default ""; + + /** + * 条件 + */ + String where() default ""; + + /** + * 分组 + */ + String groupby() default ""; + + + /** + * 排序 + */ + String orderby() default ""; + + /** + * 主键 + */ + String primarykey() default ""; + + /** + * 去重 + */ + boolean distinct() default false; + + /** + * 操作按钮 + */ + OrganizationTableOperate[] operates() default {}; + + /** + * 列表选择框 + */ + WeaTableType tableType() default WeaTableType.NONE; + +} diff --git a/src/com/engine/organization/annotation/OrganizationTableColumn.java b/src/com/engine/organization/annotation/OrganizationTableColumn.java new file mode 100644 index 00000000..7467de68 --- /dev/null +++ b/src/com/engine/organization/annotation/OrganizationTableColumn.java @@ -0,0 +1,32 @@ +package com.engine.organization.annotation; + +import java.lang.annotation.*; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface OrganizationTableColumn { + + String text() default ""; + + int labelId() default -1; + + String width() default ""; + + String column() default ""; + + boolean display() default true; + + String orderkey() default ""; + + String transmethod() default ""; + + // 额外参数 + String otherPara() default ""; +} diff --git a/src/com/engine/organization/annotation/OrganizationTableOperate.java b/src/com/engine/organization/annotation/OrganizationTableOperate.java new file mode 100644 index 00000000..3df682bd --- /dev/null +++ b/src/com/engine/organization/annotation/OrganizationTableOperate.java @@ -0,0 +1,25 @@ +package com.engine.organization.annotation; + +import java.lang.annotation.*; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Target({ElementType.ANNOTATION_TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface OrganizationTableOperate { + + String text() default ""; + + int labelId() default -1; + + String href() default ""; + + String index() default "0"; + + +} diff --git a/src/com/engine/organization/annotation/TableTitle.java b/src/com/engine/organization/annotation/TableTitle.java new file mode 100644 index 00000000..22893a1a --- /dev/null +++ b/src/com/engine/organization/annotation/TableTitle.java @@ -0,0 +1,14 @@ +package com.engine.organization.annotation; + +import java.lang.annotation.*; + + +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface TableTitle { + String title(); + String dataIndex(); + String key(); + boolean display() default true; +} diff --git a/src/com/engine/organization/common/BaseQueryParam.java b/src/com/engine/organization/common/BaseQueryParam.java new file mode 100644 index 00000000..c5defd50 --- /dev/null +++ b/src/com/engine/organization/common/BaseQueryParam.java @@ -0,0 +1,22 @@ +package com.engine.organization.common; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @description: 基础查询参数 + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +public class BaseQueryParam { + //当前页码 + private Integer current = 1; + + //每页数据条数 + private Integer pageSize = 10; +} diff --git a/src/com/engine/organization/component/OrganizationWeaTable.java b/src/com/engine/organization/component/OrganizationWeaTable.java new file mode 100644 index 00000000..8bb0121d --- /dev/null +++ b/src/com/engine/organization/component/OrganizationWeaTable.java @@ -0,0 +1,116 @@ +package com.engine.organization.component; + +import com.cloudstore.eccom.constant.WeaBoolAttr; +import com.cloudstore.eccom.pc.table.*; +import com.engine.organization.annotation.OrganizationTable; +import com.engine.organization.annotation.OrganizationTableColumn; +import com.engine.organization.annotation.OrganizationTableOperate; +import org.apache.commons.lang3.StringUtils; +import weaver.general.PageIdConst; +import weaver.hrm.User; +import weaver.systeminfo.SystemEnv; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class OrganizationWeaTable extends WeaTable { + + public OrganizationWeaTable(User user, Class clazz) { + + boolean isAnno = clazz.isAnnotationPresent(OrganizationTable.class); + if (isAnno) { + OrganizationTable table = (OrganizationTable) clazz.getAnnotation(OrganizationTable.class); + String pageId = table.pageId(); + super.setPageID(pageId); + String pageUid = pageId + "_" + user.getUID(); + super.setPageUID(pageUid); + String pageSize = PageIdConst.getPageSize(pageId, user.getUID()); + super.setPagesize(pageSize); + String backfields = table.fields(); + super.setBackfields(backfields); + String sql = table.fromSql(); + super.setSqlform(sql); + String where = table.where(); + if (StringUtils.isNotBlank(where)) { + super.setSqlwhere(where); + } + String orderby = table.orderby(); + if (StringUtils.isNotBlank(orderby)) { + super.setSqlorderby(orderby); + } + String groupby = table.groupby(); + if (StringUtils.isNotBlank(groupby)) { + super.setSqlgroupby(groupby); + } + boolean distinct = table.distinct(); + super.setSqlisdistinct(String.valueOf(distinct)); + String primarykey = table.primarykey(); + if (StringUtils.isNotBlank(primarykey)) { + super.setSqlprimarykey(primarykey); + } + OrganizationTableOperate[] operates = table.operates(); + if (operates != null && operates.length > 0) { + List operateList = new ArrayList<>(); + Arrays.stream(operates).forEach(o -> { + String text = o.text(); + int labelId = o.labelId(); + String htmlLabelName = SystemEnv.getHtmlLabelName(labelId, user.getLanguage()); + if (StringUtils.isNotBlank(htmlLabelName)) { + text = htmlLabelName; + } + WeaTableOperate weaTableOperate = new WeaTableOperate(text, o.href(), o.index()); + operateList.add(weaTableOperate); + }); + WeaTableOperates weaTableOperates = new WeaTableOperates(); + weaTableOperates.setOperate(operateList); + super.setOperates(weaTableOperates); + } + + WeaTableType weaTableTypeEnum = table.tableType(); + //设置check是否可用 + if (weaTableTypeEnum == WeaTableType.CHECKBOX) { + super.setTableType(weaTableTypeEnum); +// WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom(); +// checkboxpopedom.setShowmethod("true"); +// super.setCheckboxpopedom(checkboxpopedom); + } + + } + + Field[] fields = clazz.getDeclaredFields(); + for (Field f : fields) { + boolean isanno = f.isAnnotationPresent(OrganizationTableColumn.class); + if (isanno) { + OrganizationTableColumn columnAnn = f.getAnnotation(OrganizationTableColumn.class); + String text = columnAnn.text(); + int labelId = columnAnn.labelId(); + String htmlLabelName = SystemEnv.getHtmlLabelName(labelId, user.getLanguage()); + if (StringUtils.isNotBlank(htmlLabelName)) { + text = htmlLabelName; + } + String width = columnAnn.width(); + String column = columnAnn.column(); + String orderkey = columnAnn.orderkey(); + boolean display = columnAnn.display(); + WeaTableColumn weaTableColumn = new WeaTableColumn(width, text, column, orderkey); + String transmethod = columnAnn.transmethod(); + + if (StringUtils.isNotBlank(transmethod)) { + weaTableColumn.setTransmethod(transmethod); + } + String otherPara = columnAnn.otherPara(); + if(StringUtils.isNotBlank(otherPara)) { + weaTableColumn.setOtherpara(otherPara); + } + if (!display) { + weaTableColumn.setDisplay(WeaBoolAttr.FALSE); + } + super.getColumns().add(weaTableColumn); + } + } + + + } +} diff --git a/src/com/engine/organization/entity/QueryParam.java b/src/com/engine/organization/entity/QueryParam.java new file mode 100644 index 00000000..31b6c31d --- /dev/null +++ b/src/com/engine/organization/entity/QueryParam.java @@ -0,0 +1,36 @@ +package com.engine.organization.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import weaver.general.StringUtil; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class QueryParam { + private String ids; + + public Collection getIds() { + if(StringUtil.isEmpty(ids)){ + return new ArrayList<>(); + } + List collect = Arrays.stream(ids.split(",")).map(item -> Long.parseLong(item)).collect(Collectors.toList()); + return collect; + } + +} diff --git a/src/com/engine/organization/entity/TopTab.java b/src/com/engine/organization/entity/TopTab.java new file mode 100644 index 00000000..ae7ffa82 --- /dev/null +++ b/src/com/engine/organization/entity/TopTab.java @@ -0,0 +1,24 @@ +package com.engine.organization.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class TopTab { + private String color; + private String groupId; + private Boolean showcount; + private String title; + private String viewCondition; +} diff --git a/src/com/engine/organization/entity/TreeData.java b/src/com/engine/organization/entity/TreeData.java new file mode 100644 index 00000000..a34c09de --- /dev/null +++ b/src/com/engine/organization/entity/TreeData.java @@ -0,0 +1,24 @@ +package com.engine.organization.entity; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.ArrayList; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class TreeData { + private String title; + private String key; + private ArrayList children; +} diff --git a/src/com/engine/organization/entity/comp/bo/CompBO.java b/src/com/engine/organization/entity/comp/bo/CompBO.java new file mode 100644 index 00000000..02c59c37 --- /dev/null +++ b/src/com/engine/organization/entity/comp/bo/CompBO.java @@ -0,0 +1,44 @@ +package com.engine.organization.entity.comp.bo; + +import com.engine.organization.entity.comp.dto.CompListDTO; +import com.engine.organization.entity.comp.po.CompPO; +import org.apache.commons.collections.CollectionUtils; + +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public class CompBO { + public static List buildCompDTOList(Collection list) { + if (CollectionUtils.isEmpty(list)) { + return Collections.emptyList(); + } + List dtoList = list.stream().map(e -> CompListDTO.builder() + .id(e.getId()) + .compNo(e.getCompNo()) + .compName(e.getCompName()) + .compNameShort(e.getCompNameShort()) + .parentCompany(e.getParentCompany()) + .orgCode(e.getOrgCode()) + .industry(e.getIndustry()) + .compPrincipal(e.getCompPrincipal()) + .description(e.getDescription()) + .forbiddenTag(e.getForbiddenTag()) + .build() + ).collect(Collectors.toList()); + Map> collects = dtoList.stream().filter(item -> null != item.getParentCompany() && 0 != item.getParentCompany()).collect(Collectors.groupingBy(CompListDTO::getParentCompany)); + return dtoList.stream().filter(item -> null == item.getParentCompany() || 0 == item.getParentCompany()).map(e -> { + e.setChildren(collects.get(e.getId())); + return e; + }).collect(Collectors.toList()); + } + +} diff --git a/src/com/engine/organization/entity/comp/dto/CompListDTO.java b/src/com/engine/organization/entity/comp/dto/CompListDTO.java new file mode 100644 index 00000000..b7f8b2ee --- /dev/null +++ b/src/com/engine/organization/entity/comp/dto/CompListDTO.java @@ -0,0 +1,102 @@ +package com.engine.organization.entity.comp.dto; + +import com.cloudstore.eccom.pc.table.WeaTableType; +import com.engine.organization.annotation.OrganizationTable; +import com.engine.organization.annotation.OrganizationTableOperate; +import com.engine.organization.annotation.TableTitle; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; +import java.util.List; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@OrganizationTable(pageId = "2c66b3a4-d4f8-11ec-9774-00ffcbed7508", + tableType = WeaTableType.NONE, + operates = { + @OrganizationTableOperate(index = "0", text = "编辑"), + @OrganizationTableOperate(index = "1", text = "删除"), + @OrganizationTableOperate(index = "2", text = "查看部门") + }) +public class CompListDTO { + /** + * 主键id + */ + @TableTitle(title = "id", dataIndex = "id", key = "id") + private Long id; + + /** + * 编号 + */ + @TableTitle(title = "编号", dataIndex = "compNo", key = "compNo") + private String compNo; + + /** + * 名称 + */ + @TableTitle(title = "名称", dataIndex = "compName", key = "compName") + private String compName; + + /** + * 简称 + */ + @TableTitle(title = "简称", dataIndex = "compNameShort", key = "compNameShort") + private String compNameShort; + + /** + * 上级公司 + */ + @TableTitle(title = "上级公司", dataIndex = "parentCompany", key = "parentCompany") + private Long parentCompany; + + /** + * 组织机构代码 + */ + @TableTitle(title = "组织机构代码", dataIndex = "orgCode", key = "orgCode") + private String orgCode; + + /** + * 行业 + */ + @TableTitle(title = "行业", dataIndex = "industry", key = "industry") + private Integer industry; + + /** + * 负责人 + */ + @TableTitle(title = "负责人", dataIndex = "compPrincipal", key = "compPrincipal") + private Integer compPrincipal; + + /** + * 说明 + */ + @TableTitle(title = "说明", dataIndex = "description", key = "description") + private String description; + + /** + * 禁用标记 + */ + @TableTitle(title = "禁用标记", dataIndex = "forbiddenTag", key = "forbiddenTag") + private String forbiddenTag; + + /** + * 子节点 + */ + private List children; + + private Long creator; + private int deleteType; + private Date createTime; + private Date updateTime; +} diff --git a/src/com/engine/organization/entity/comp/po/CompPO.java b/src/com/engine/organization/entity/comp/po/CompPO.java new file mode 100644 index 00000000..c76234fa --- /dev/null +++ b/src/com/engine/organization/entity/comp/po/CompPO.java @@ -0,0 +1,35 @@ +package com.engine.organization.entity.comp.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class CompPO { + private Long id; + private String compNo; + private String compName; + private String compNameShort; + private Long parentCompany; + private String orgCode; + private Integer industry; + private Integer compPrincipal; + private String description; + private String forbiddenTag; + private Long creator; + private int deleteType; + private Date createTime; + private Date updateTime; +} diff --git a/src/com/engine/organization/entity/post/dto/PostDTO.java b/src/com/engine/organization/entity/post/dto/PostDTO.java new file mode 100644 index 00000000..1285763b --- /dev/null +++ b/src/com/engine/organization/entity/post/dto/PostDTO.java @@ -0,0 +1,30 @@ +package com.engine.organization.entity.post.dto; + +import com.engine.organization.entity.post.po.PostPO; + +import java.util.Date; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostDTO { + public static PostPO convertPO(PostPO postPO, long employeeId) { + if (postPO == null) { + return null; + } + return PostPO.builder() + .id(postPO.getId() == null ? 0 : postPO.getId()) + .postNo(postPO.getPostNo() == null ? null : postPO.getPostNo()) + .postName(postPO.getPostName() == null ? null : postPO.getPostName()) + .description(postPO.getDescription() == null ? null : postPO.getDescription()) + .deleteType(0) + .createTime(new Date()) + .updateTime(new Date()) + .creator(employeeId) + .build(); + } + +} diff --git a/src/com/engine/organization/entity/post/dto/PostInfoDTO.java b/src/com/engine/organization/entity/post/dto/PostInfoDTO.java new file mode 100644 index 00000000..47bcde77 --- /dev/null +++ b/src/com/engine/organization/entity/post/dto/PostInfoDTO.java @@ -0,0 +1,35 @@ +package com.engine.organization.entity.post.dto; + +import com.engine.organization.entity.post.param.PostInfoSearchParam; +import com.engine.organization.entity.post.po.PostInfoPO; + +import java.util.Date; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostInfoDTO { + public static PostInfoPO convertParamToPO(PostInfoSearchParam param, Long employeeId) { + if (param == null) { + return null; + } + return PostInfoPO.builder() + .id(param.getId() == null ? 0 : param.getId()) + .postInfoNo(param.getPostInfoNo() == null ? null : param.getPostInfoNo()) + .postInfoName(param.getPostInfoName() == null ? null : param.getPostInfoName()) + .postInfoAuthority(param.getPostInfoAuthority() == null ? null : param.getPostInfoAuthority()) + .postInfoDuty(param.getPostInfoDuty() == null ? null : param.getPostInfoDuty()) + .postInfoQualification(param.getPostInfoQualification() == null ? null : param.getPostInfoQualification()) + .postId(param.getPostId() == null ? null : param.getPostId()) + .description(param.getDescription() == null ? null : param.getDescription()) + .forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1) + .deleteType(0) + .createTime(new Date()) + .updateTime(new Date()) + .creator(employeeId) + .build(); + } +} diff --git a/src/com/engine/organization/entity/post/param/PostInfoSearchParam.java b/src/com/engine/organization/entity/post/param/PostInfoSearchParam.java new file mode 100644 index 00000000..1a5bca15 --- /dev/null +++ b/src/com/engine/organization/entity/post/param/PostInfoSearchParam.java @@ -0,0 +1,55 @@ +package com.engine.organization.entity.post.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class PostInfoSearchParam { + /** + * 主键 + */ + private Long id; + /** + * 编号 + */ + private String postInfoNo; + /** + * 名称 + */ + private String postInfoName; + /** + * 权限 + */ + private String postInfoAuthority; + /** + * 责任 + */ + private String postInfoDuty; + /** + * 资格 + */ + private String postInfoQualification; + /** + * 职务分类 + */ + private Integer postId; + /** + * 说明 + */ + private String description; + /** + * 禁用标记 + */ + private Boolean forbiddenTag; +} diff --git a/src/com/engine/organization/entity/post/po/PostInfoPO.java b/src/com/engine/organization/entity/post/po/PostInfoPO.java new file mode 100644 index 00000000..baf8c7d8 --- /dev/null +++ b/src/com/engine/organization/entity/post/po/PostInfoPO.java @@ -0,0 +1,64 @@ +package com.engine.organization.entity.post.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class PostInfoPO { + /** + * 主键 + */ + private Long id; + /** + * 编号 + */ + private String postInfoNo; + /** + * 名称 + */ + private String postInfoName; + /** + * 权限 + */ + private String postInfoAuthority; + /** + * 责任 + */ + private String postInfoDuty; + /** + * 资格 + */ + private String postInfoQualification; + /** + * 职务分类 + */ + private Integer postId; + /** + * 说明 + */ + private String description; + + /** + * 禁用标记 + */ + private Integer forbiddenTag; + + private Long creator; + private int deleteType; + private Date createTime; + private Date updateTime; + +} diff --git a/src/com/engine/organization/entity/post/po/PostPO.java b/src/com/engine/organization/entity/post/po/PostPO.java new file mode 100644 index 00000000..91120587 --- /dev/null +++ b/src/com/engine/organization/entity/post/po/PostPO.java @@ -0,0 +1,42 @@ +package com.engine.organization.entity.post.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class PostPO { + /** + * 主键 + */ + private Long id; + /** + * 编号 + */ + private String postNo; + /** + * 名称 + */ + private String postName; + /** + * 说明 + */ + private String description; + private Long creator; + private int deleteType; + private Date createTime; + private Date updateTime; + +} diff --git a/src/com/engine/organization/entity/post/vo/PostInfoTableVO.java b/src/com/engine/organization/entity/post/vo/PostInfoTableVO.java new file mode 100644 index 00000000..3bbc6ef7 --- /dev/null +++ b/src/com/engine/organization/entity/post/vo/PostInfoTableVO.java @@ -0,0 +1,86 @@ +package com.engine.organization.entity.post.vo; + +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; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@OrganizationTable(pageId = "fa30e916-d285-11ec-bc87-00ffcbed7508", + fields = " t.id," + + " t.post_info_no," + + " t.post_info_name," + + " t.post_info_authority," + + " t.post_info_duty," + + " t.post_info_qualification," + + " a.post_name," + + " t.description," + + " t.forbidden_tag", + fromSql = " from jcl_org_post_info t inner join jcl_org_post a on t.post_id = a.id ", + orderby = "id desc", + primarykey = "id", + operates = { + @OrganizationTableOperate(index = "0", text = "编辑"), + @OrganizationTableOperate(index = "1", text = "删除") + } +) +public class PostInfoTableVO { + /** + * 主键 + */ + @OrganizationTableColumn(column = "id", display = false) + private Long id; + /** + * 编号 + */ + @OrganizationTableColumn(text = "编号", width = "20%", column = "post_info_no") + private String postInfoNo; + /** + * 名称 + */ + @OrganizationTableColumn(text = "名称", width = "20%", column = "post_info_name") + private String postInfoName; + /** + * 权限 + */ + @OrganizationTableColumn(text = "权限", width = "20%", column = "post_info_authority") + private String postInfoAuthority; + /** + * 责任 + */ + @OrganizationTableColumn(text = "责任", width = "20%", column = "post_info_duty") + private String postInfoDuty; + /** + * 资格 + */ + @OrganizationTableColumn(text = "资格", width = "20%", column = "post_info_qualification") + private String postInfoQualification; + /** + * 职务分类 + */ + @OrganizationTableColumn(text = "职务分类", width = "20%", column = "post_name") + private Integer postName; + /** + * 说明 + */ + @OrganizationTableColumn(text = "说明", width = "20%", column = "description") + private String description; + + /** + * 禁用标记 + */ + @OrganizationTableColumn(text = "禁用标记", width = "20%", column = "forbidden_tag") + private Integer forbiddenTag; +} diff --git a/src/com/engine/organization/entity/scheme/dto/GradeDTO.java b/src/com/engine/organization/entity/scheme/dto/GradeDTO.java new file mode 100644 index 00000000..f6f0699d --- /dev/null +++ b/src/com/engine/organization/entity/scheme/dto/GradeDTO.java @@ -0,0 +1,88 @@ +package com.engine.organization.entity.scheme.dto; + +import com.engine.organization.entity.scheme.param.GradeSearchParam; +import com.engine.organization.entity.scheme.po.GradePO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/11 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class GradeDTO { + /** + * 主键 + */ + private long id; + /** + * 编号 + */ + private String gradeNo; + /** + * 名称 + */ + private String gradeName; + /** + * 描述说明 + */ + private String description; + /** + * 等级方案 + */ + private long schemeId; + /** + * 职等 + */ + private String levelId; + /** + * 禁用标记 + */ + private int forbiddenTag; + + /** + * + */ + private Long creator; + /** + * + */ + private int deleteType; + /** + * + */ + private Date createTime; + /** + * + */ + private Date updateTime; + + public static GradePO convertParamToPO(GradeSearchParam param, Long employeeId) { + if (param == null) { + return null; + } + return GradePO.builder() + .id(param.getId() == null ? 0 : param.getId()) + .gradeNo(param.getGradeNo() == null ? null : param.getGradeNo()) + .gradeName(param.getGradeName() == null ? null : param.getGradeName()) + .description(param.getDescription() == null ? null : param.getDescription()) + .schemeId(param.getSchemeId() == null ? 0 : param.getSchemeId()) + .levelId(param.getLevelId() == null ? null : param.getLevelId()) + .forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1) + .deleteType(0) + .createTime(new Date()) + .updateTime(new Date()) + .creator(employeeId) + .build(); + } + +} diff --git a/src/com/engine/organization/entity/scheme/dto/LevelDTO.java b/src/com/engine/organization/entity/scheme/dto/LevelDTO.java new file mode 100644 index 00000000..4bf86d20 --- /dev/null +++ b/src/com/engine/organization/entity/scheme/dto/LevelDTO.java @@ -0,0 +1,82 @@ +package com.engine.organization.entity.scheme.dto; + +import com.engine.organization.entity.scheme.param.LevelSearchParam; +import com.engine.organization.entity.scheme.po.LevelPO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class LevelDTO { + /** + * 自增主键 + */ + private long id; + /** + * 编号 + */ + private String levelNo; + /** + * 方案名称 + */ + private String levelName; + /** + * 方案说明 + */ + private String description; + /** + * 等级方案 + */ + private Long schemeId; + /** + * 禁用标记 + */ + private int forbiddenTag; + /** + * + */ + private Long creator; + /** + * + */ + private int deleteType; + /** + * + */ + private Date createTime; + /** + * + */ + private Date updateTime; + + public static LevelPO convertParamToPO(LevelSearchParam param, Long employeeId) { + if (param == null) { + return null; + } + return LevelPO.builder() + .id(param.getId() == null ? 0 : param.getId()) + .levelNo(param.getLevelNo() == null ? null : param.getLevelNo()) + .levelName(param.getLevelName() == null ? null : param.getLevelName()) + .description(param.getDescription() == null ? null : param.getDescription()) + .schemeId(param.getSchemeId() == null ? 0 : param.getSchemeId()) + .forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1) + .deleteType(0) + .createTime(new Date()) + .updateTime(new Date()) + .creator(employeeId) + .build(); + } + +} diff --git a/src/com/engine/organization/entity/scheme/dto/SchemeDTO.java b/src/com/engine/organization/entity/scheme/dto/SchemeDTO.java new file mode 100644 index 00000000..b442cf71 --- /dev/null +++ b/src/com/engine/organization/entity/scheme/dto/SchemeDTO.java @@ -0,0 +1,94 @@ +package com.engine.organization.entity.scheme.dto; + +import com.engine.organization.entity.scheme.param.SchemeSearchParam; +import com.engine.organization.entity.scheme.po.SchemePO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; +import java.util.Map; +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SchemeDTO { + /** + * 自增主键 + */ + private long id; + /** + * 编号 + */ + private String schemeNo; + /** + * 方案名称 + */ + private String schemeName; + /** + * 方案说明 + */ + private String schemeDescription; + /** + * 禁用标记 + */ + private int forbiddenTag; + /** + * + */ + private Long creator; + /** + * + */ + private int deleteType; + /** + * + */ + private Date createTime; + /** + * + */ + private Date updateTime; + + public static SchemePO convertToPO(Map param, Long employeeId) { + if (param == null) { + return null; + } + return SchemePO.builder() + .id(param.get("id") == null ? 0 : Integer.parseInt((String) param.get("id"))) + .schemeNo(param.get("scheme_no") == null ? null : (String) param.get("scheme_no")) + .schemeName(param.get("scheme_name") == null ? null : (String) param.get("scheme_name")) + .schemeDescription(param.get("scheme_description") == null ? null : (String) param.get("scheme_description")) + .forbiddenTag(param.get("forbidden_tag") == null ? 0 : Integer.parseInt((String) param.get("forbidden_tag"))) + .deleteType(0) + .createTime(new Date()) + .updateTime(new Date()) + .creator(employeeId) + .build(); + } + + public static SchemePO convertParamToPO(SchemeSearchParam param, Long employeeId) { + if (param == null) { + return null; + } + return SchemePO.builder() + .id(param.getId() == null ? 0 : param.getId()) + .schemeNo(param.getSchemeNo() == null ? null : param.getSchemeNo()) + .schemeName(param.getSchemeName() == null ? null : param.getSchemeName()) + .schemeDescription(param.getSchemeDescription() == null ? null : param.getSchemeDescription()) + .forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1) + .deleteType(0) + .createTime(new Date()) + .updateTime(new Date()) + .creator(employeeId) + .build(); + } + +} diff --git a/src/com/engine/organization/entity/scheme/param/GradeSearchParam.java b/src/com/engine/organization/entity/scheme/param/GradeSearchParam.java new file mode 100644 index 00000000..81ed4b4c --- /dev/null +++ b/src/com/engine/organization/entity/scheme/param/GradeSearchParam.java @@ -0,0 +1,49 @@ +package com.engine.organization.entity.scheme.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/11 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class GradeSearchParam { + + /** + * 主键 + */ + private Long id; + /** + * 编号 + */ + private String gradeNo; + /** + * 名称 + */ + private String gradeName; + /** + * 描述说明 + */ + private String description; + /** + * 等级方案 + */ + private Long schemeId; + /** + * 职等 + */ + private String levelId; + /** + * 禁用标记 + */ + private Boolean forbiddenTag; + +} diff --git a/src/com/engine/organization/entity/scheme/param/LevelSearchParam.java b/src/com/engine/organization/entity/scheme/param/LevelSearchParam.java new file mode 100644 index 00000000..b4e5bf13 --- /dev/null +++ b/src/com/engine/organization/entity/scheme/param/LevelSearchParam.java @@ -0,0 +1,46 @@ +package com.engine.organization.entity.scheme.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class LevelSearchParam { + + private Long id; + /** + * 编号 + */ + private String levelNo; + + /** + * 名称 + */ + private String levelName; + + /** + * 方案说明 + */ + private String description; + + /** + * 等级方案 + */ + private Long schemeId; + + /** + * 禁用标记 + */ + private Boolean forbiddenTag; + +} diff --git a/src/com/engine/organization/entity/scheme/param/SchemeSearchParam.java b/src/com/engine/organization/entity/scheme/param/SchemeSearchParam.java new file mode 100644 index 00000000..18a3112a --- /dev/null +++ b/src/com/engine/organization/entity/scheme/param/SchemeSearchParam.java @@ -0,0 +1,41 @@ +package com.engine.organization.entity.scheme.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SchemeSearchParam { + + private Long id; + /** + * 编号 + */ + private String schemeNo; + + /** + * 名称 + */ + private String schemeName; + + /** + * 方案说明 + */ + private String schemeDescription; + + /** + * 禁用标记 + */ + private Boolean forbiddenTag; + +} diff --git a/src/com/engine/organization/entity/scheme/po/GradePO.java b/src/com/engine/organization/entity/scheme/po/GradePO.java new file mode 100644 index 00000000..bc16d400 --- /dev/null +++ b/src/com/engine/organization/entity/scheme/po/GradePO.java @@ -0,0 +1,66 @@ +package com.engine.organization.entity.scheme.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class GradePO { + /** + * 主键 + */ + private long id; + /** + * 编号 + */ + private String gradeNo; + /** + * 名称 + */ + private String gradeName; + /** + * 描述说明 + */ + private String description; + /** + * 等级方案 + */ + private Long schemeId; + /** + * 职等 + */ + private String levelId; + /** + * 禁用标记 + */ + private int forbiddenTag; + /** + * + */ + private Long creator; + /** + * + */ + private int deleteType; + /** + * + */ + private Date createTime; + /** + * + */ + private Date updateTime; + +} diff --git a/src/com/engine/organization/entity/scheme/po/LevelPO.java b/src/com/engine/organization/entity/scheme/po/LevelPO.java new file mode 100644 index 00000000..b20d3c5d --- /dev/null +++ b/src/com/engine/organization/entity/scheme/po/LevelPO.java @@ -0,0 +1,63 @@ +package com.engine.organization.entity.scheme.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/09 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class LevelPO { + /** + *自增主键 + */ + private long id; + /** + *编号 + */ + private String levelNo; + /** + *方案名称 + */ + private String levelName; + /** + *方案说明 + */ + private String description; + + /** + * 等级方案标识 + */ + private Long schemeId; + /** + *禁用标记 + */ + private int forbiddenTag; + /** + * + */ + private Long creator; + /** + * + */ + private int deleteType; + /** + * + */ + private Date createTime; + /** + * + */ + private Date updateTime; +} diff --git a/src/com/engine/organization/entity/scheme/po/SchemePO.java b/src/com/engine/organization/entity/scheme/po/SchemePO.java new file mode 100644 index 00000000..9561eeef --- /dev/null +++ b/src/com/engine/organization/entity/scheme/po/SchemePO.java @@ -0,0 +1,52 @@ +package com.engine.organization.entity.scheme.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SchemePO { + /** + *自增主键 + */ + private long id; + /** + *编号 + */ + private String schemeNo; + /** + *方案名称 + */ + private String schemeName; + /** + *方案说明 + */ + private String schemeDescription; + /** + *禁用标记 + */ + private int forbiddenTag; + /** + * + */ + private Long creator; + /** + * + */ + private int deleteType; + /** + * + */ + private Date createTime; + /** + * + */ + private Date updateTime; + +} diff --git a/src/com/engine/organization/entity/scheme/vo/GradeTableVO.java b/src/com/engine/organization/entity/scheme/vo/GradeTableVO.java new file mode 100644 index 00000000..cc11aa94 --- /dev/null +++ b/src/com/engine/organization/entity/scheme/vo/GradeTableVO.java @@ -0,0 +1,78 @@ +package com.engine.organization.entity.scheme.vo; + +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; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@OrganizationTable(pageId = "1afe425c-d0f8-11ec-b80e-00ffcbed7508", + fields = "t.id ," + + " t.grade_no ," + + " t.grade_name ," + + " t.description ," + + " a.scheme_name ," + + " t.level_id ," + + " t.forbidden_tag", + fromSql = "from jcl_org_grade t inner join jcl_org_scheme a on t.scheme_id = a.id ", + orderby = "id desc", + primarykey = "id", + operates = { + @OrganizationTableOperate(index = "0", text = "编辑"), + @OrganizationTableOperate(index = "1", text = "删除") + } +) +public class GradeTableVO { + /** + * 主键 + */ + @OrganizationTableColumn(column = "id", display = false) + private Long id; + /** + * 编号 + */ + @OrganizationTableColumn(text = "编号", width = "20%", column = "grade_no") + private String gradeNo; + /** + * 名称 + */ + @OrganizationTableColumn(text = "名称", width = "20%", column = "grade_name") + private String gradeName; + /** + * 描述说明 + */ + @OrganizationTableColumn(text = "描述说明", width = "20%", column = "description") + private String description; + /** + * 等级方案 + */ + private long schemeId; + /** + * 等级方案 + */ + @OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name") + private String schemeName; + /** + * 职等 + */ + @OrganizationTableColumn(text = "职等", width = "20%", column = "level_id",transmethod = "com.engine.organization.transmethod.LevelTransMethod.getLevelId") + private String levelId; + + /** + * 禁用标记 + */ + @OrganizationTableColumn(text = "禁用标记", width = "20%", column = "forbidden_tag") + private int forbiddenTag; +} diff --git a/src/com/engine/organization/entity/scheme/vo/LevelTableVO.java b/src/com/engine/organization/entity/scheme/vo/LevelTableVO.java new file mode 100644 index 00000000..8b6a841e --- /dev/null +++ b/src/com/engine/organization/entity/scheme/vo/LevelTableVO.java @@ -0,0 +1,76 @@ +package com.engine.organization.entity.scheme.vo; + +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; + + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@OrganizationTable(pageId = "3a0b752e-d028-11ec-91fc-00ffcbed7508", + fields = "t.id," + + "t.level_no," + + "t.level_name," + + "t.description," + + "s.scheme_name," + + "t.scheme_id," + + "t.forbidden_tag," + + "t.creator," + + "t.delete_type," + + "t.create_time," + + "t.update_time", + fromSql = "FROM jcl_org_level t inner join jcl_org_scheme s on t.scheme_id = s.id ", + orderby = "id desc", + primarykey = "id", + operates = { + @OrganizationTableOperate(index = "0", text = "编辑"), + @OrganizationTableOperate(index = "1", text = "删除") + } +) +public class LevelTableVO { + /** + * 主键 + */ + @OrganizationTableColumn(column = "id", display = false) + private Long id; + + /** + * 编号 + */ + @OrganizationTableColumn(text = "编号", width = "20%", column = "level_no") + private String levelNo; + /** + * 名称 + */ + @OrganizationTableColumn(text = "名称", width = "20%", column = "level_name") + private String levelName; + + /** + * 描述说明 + */ + @OrganizationTableColumn(text = "描述说明", width = "20%", column = "description") + private String description; + /** + * 等级方案 + */ + // @OrganizationTableColumn(text = "等级方案", width = "20%", column = "level_scheme") + private String schemeId; + + /** + * 等级方案 + */ + @OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name") + private String schemeName; + + /** + * 禁用标记 + */ + @OrganizationTableColumn(text = "禁用标记", width = "20%", column = "forbidden_tag") + private Integer forbiddenTag; +} diff --git a/src/com/engine/organization/entity/scheme/vo/SchemeTableVO.java b/src/com/engine/organization/entity/scheme/vo/SchemeTableVO.java new file mode 100644 index 00000000..9dd69157 --- /dev/null +++ b/src/com/engine/organization/entity/scheme/vo/SchemeTableVO.java @@ -0,0 +1,64 @@ +package com.engine.organization.entity.scheme.vo; + +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; + + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@OrganizationTable(pageId = "98e9c62f-cd12-11ec-a15f-00ffcbed7508", + fields = "t.id," + + "t.scheme_no," + + "t.scheme_name," + + "t.scheme_description," + + "t.forbidden_tag," + + "t.creator," + + "t.delete_type," + + "t.create_time," + + "t.update_time", + fromSql = "FROM jcl_org_scheme t ", + orderby = "id desc", + primarykey = "id", + operates = { + @OrganizationTableOperate(index = "0", text = "编辑"), + @OrganizationTableOperate(index = "1", text = "删除") + } +) +public class SchemeTableVO { + /** + * 主键 + */ + @OrganizationTableColumn(column = "id", display = false) + private Long id; + + + /** + * 方案编号 + */ + @OrganizationTableColumn(text = "编号", width = "25%", column = "scheme_no") + private String schemeNo; + /** + * 方案名称 + */ + @OrganizationTableColumn(text = "方案名称", width = "25%", column = "scheme_name") + private String schemeName; + + /** + * 方案描述 + */ + @OrganizationTableColumn(text = "方案说明", width = "25%", column = "scheme_description") + private String schemeDescription; + + /** + * 禁用标识 + */ + @OrganizationTableColumn(text = "禁用标记", width = "25%", column = "forbidden_tag") + private Integer forbiddenTag; +} diff --git a/src/com/engine/organization/entity/sequence/dto/SequenceDTO.java b/src/com/engine/organization/entity/sequence/dto/SequenceDTO.java new file mode 100644 index 00000000..1a9cfa77 --- /dev/null +++ b/src/com/engine/organization/entity/sequence/dto/SequenceDTO.java @@ -0,0 +1,74 @@ +package com.engine.organization.entity.sequence.dto; + +import com.engine.organization.entity.sequence.param.SequenceSearchParam; +import com.engine.organization.entity.sequence.po.SequencePO; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/11 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SequenceDTO { + /** + * 自增主键 + */ + private long id; + /** + * 编号 + */ + private String sequenceNo; + /** + * 方案名称 + */ + private String sequenceName; + /** + * 方案说明 + */ + private String description; + /** + * 等级方案 + */ + private Long schemeId; + /** + * 禁用标记 + */ + private int forbiddenTag; + + private Long creator; + + private int deleteType; + + private Date createTime; + + private Date updateTime; + + public static SequencePO convertParamToPO(SequenceSearchParam param, Long employeeId) { + if (param == null) { + return null; + } + return SequencePO.builder() + .id(param.getId() == null ? 0 : param.getId()) + .sequenceNo(param.getSequenceNo() == null ? null : param.getSequenceNo()) + .sequenceName(param.getSequenceName() == null ? null : param.getSequenceName()) + .description(param.getDescription() == null ? null : param.getDescription()) + .schemeId(param.getSchemeId() == null ? 0 : param.getSchemeId()) + .forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 0 : 1) + .deleteType(0) + .createTime(new Date()) + .updateTime(new Date()) + .creator(employeeId) + .build(); + } + +} diff --git a/src/com/engine/organization/entity/sequence/param/SequenceSearchParam.java b/src/com/engine/organization/entity/sequence/param/SequenceSearchParam.java new file mode 100644 index 00000000..d7b29951 --- /dev/null +++ b/src/com/engine/organization/entity/sequence/param/SequenceSearchParam.java @@ -0,0 +1,46 @@ +package com.engine.organization.entity.sequence.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/12 + * @Version V1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SequenceSearchParam { + + private Long id; + /** + * 编号 + */ + private String sequenceNo; + + /** + * 名称 + */ + private String sequenceName; + + /** + * 方案说明 + */ + private String description; + + /** + * 等级方案 + */ + private Long schemeId; + + /** + * 禁用标记 + */ + private Boolean forbiddenTag; + +} diff --git a/src/com/engine/organization/entity/sequence/po/SequencePO.java b/src/com/engine/organization/entity/sequence/po/SequencePO.java new file mode 100644 index 00000000..df6db25a --- /dev/null +++ b/src/com/engine/organization/entity/sequence/po/SequencePO.java @@ -0,0 +1,49 @@ +package com.engine.organization.entity.sequence.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SequencePO { + /** + * 主键 + */ + private Long id; + /** + * 编号 + */ + private String sequenceNo; + /** + * 名称 + */ + private String sequenceName; + /** + * 描述说明 + */ + private String description; + /** + * 等级方案 + */ + private Long schemeId; + /** + * 禁用标记 + */ + private Integer forbiddenTag; + private Long creator; + private int deleteType; + private Date createTime; + private Date updateTime; +} diff --git a/src/com/engine/organization/entity/sequence/vo/SequenceTableVO.java b/src/com/engine/organization/entity/sequence/vo/SequenceTableVO.java new file mode 100644 index 00000000..0bd10ec5 --- /dev/null +++ b/src/com/engine/organization/entity/sequence/vo/SequenceTableVO.java @@ -0,0 +1,76 @@ +package com.engine.organization.entity.sequence.vo; + +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; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +@OrganizationTable(pageId = "3a0b752e-d028-11ec-91fc-00ffcbed7508", + fields = "t.id," + + "t.sequence_no," + + "t.sequence_name," + + "t.description," + + "s.scheme_name," + + "t.forbidden_tag," + + "t.creator," + + "t.delete_type," + + "t.create_time," + + "t.update_time", + fromSql = "FROM jcl_org_sequence t inner join jcl_org_scheme s on t.scheme_id = s.id ", + orderby = "id desc", + primarykey = "id", + operates = { + @OrganizationTableOperate(index = "0", text = "编辑"), + @OrganizationTableOperate(index = "1", text = "删除") + } +) +public class SequenceTableVO { + + /** + * 主键 + */ + @OrganizationTableColumn(column = "id", display = false) + private Long id; + + /** + * 编号 + */ + @OrganizationTableColumn(text = "编号", width = "20%", column = "sequence_no") + private String sequenceNo; + /** + * 名称 + */ + @OrganizationTableColumn(text = "名称", width = "20%", column = "sequence_name") + private String sequenceName; + + /** + * 描述说明 + */ + @OrganizationTableColumn(text = "描述说明", width = "20%", column = "description") + private String description; + + /** + * 等级方案 + */ + @OrganizationTableColumn(text = "等级方案", width = "20%", column = "scheme_name") + private String schemeName; + + /** + * 禁用标记 + */ + @OrganizationTableColumn(text = "禁用标记", width = "20%", column = "forbidden_tag") + private Integer forbiddenTag; +} diff --git a/src/com/engine/organization/mapper/comp/CompMapper.java b/src/com/engine/organization/mapper/comp/CompMapper.java new file mode 100644 index 00000000..e5f2df15 --- /dev/null +++ b/src/com/engine/organization/mapper/comp/CompMapper.java @@ -0,0 +1,22 @@ +package com.engine.organization.mapper.comp; + +import com.engine.organization.common.BaseQueryParam; +import com.engine.organization.entity.comp.po.CompPO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public interface CompMapper { + /** + * 列表查询 + * @param queryParam + * @return + */ + List list(@Param("param") BaseQueryParam queryParam); +} diff --git a/src/com/engine/organization/mapper/comp/CompMapper.xml b/src/com/engine/organization/mapper/comp/CompMapper.xml new file mode 100644 index 00000000..44086a0f --- /dev/null +++ b/src/com/engine/organization/mapper/comp/CompMapper.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + t + . + id + , t.comp_no + , t.comp_name + , t.comp_name_short + , t.parent_company + , t.org_code + , t.industry + , t.comp_principal + , t.description + , t.forbidden_tag + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + \ No newline at end of file diff --git a/src/com/engine/organization/mapper/post/PostInfoMapper.java b/src/com/engine/organization/mapper/post/PostInfoMapper.java new file mode 100644 index 00000000..f2b2d0d2 --- /dev/null +++ b/src/com/engine/organization/mapper/post/PostInfoMapper.java @@ -0,0 +1,74 @@ +package com.engine.organization.mapper.post; + + +import com.engine.organization.entity.post.po.PostInfoPO; +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 + * @Description: TODO + * @Date 2022/5/13 + * @Version V1.0 + **/ +public interface PostInfoMapper { + + /** + * 根据No查询职务信息 + * + * @param postInfoNo + * @return + */ + List listByNo(@Param("postInfoNo") String postInfoNo); + + /** + * 获取职务信息根据ID + * @param id + * @return + */ + PostInfoPO getPostInfoByID(@Param("id") long id); + + /** + * 根据ID查询职务信息列表 + * + * @param ids + * @return + */ + @MapKey("id") + List> listPostInfosByIds(@Param("ids") Collection ids); + + /** + * 插入职务信息 + * @param postInfoPO + * @return + */ + int insertIgnoreNull(PostInfoPO postInfoPO); + + /** + * 修改,修改所有字段 + * + * @param postInfoPO + * @return + */ + int updatePostInfo(PostInfoPO postInfoPO); + + /** + * 更新禁用标记 + * + * @param postInfoPO + * @return + */ + int updateForbiddenTagById(PostInfoPO postInfoPO); + /** + * 批量删除职务信息方案 + * + * @param ids + */ + int deleteByIds(@Param("ids") Collection ids); + + +} diff --git a/src/com/engine/organization/mapper/post/PostInfoMapper.xml b/src/com/engine/organization/mapper/post/PostInfoMapper.xml new file mode 100644 index 00000000..9d4a6011 --- /dev/null +++ b/src/com/engine/organization/mapper/post/PostInfoMapper.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + t + . + id + , t.post_info_no + , t.post_info_name + , t.post_info_authority + , t.post_info_duty + , t.post_info_qualification + , t.post_id + , t.description + , t.forbidden_tag + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + + + + update jcl_org_post_info + + creator=#{creator}, + update_time=#{updateTime}, + post_info_no=#{postInfoNo}, + post_info_name=#{postInfoName}, + post_info_authority=#{postInfoAuthority}, + post_info_duty=#{postInfoDuty}, + post_info_qualification=#{postInfoQualification}, + post_id=#{postId}, + description=#{description}, + + WHERE id = #{id} AND delete_type = 0 + + + + INSERT INTO jcl_org_post_info + + + creator, + + + delete_type, + + + create_time, + + + update_time, + + + post_info_no, + + + post_info_name, + + + post_info_authority, + + + post_info_duty, + + + post_info_qualification, + + + post_id, + + + description, + + forbidden_tag, + + + + #{creator}, + + + #{deleteType}, + + + #{createTime}, + + + #{updateTime}, + + + #{postInfoNo}, + + + #{postInfoName}, + + + #{postInfoAuthority}, + + + #{postInfoDuty}, + + + #{postInfoQualification}, + + + #{postId}, + + + #{description}, + + 0, + + + + + update jcl_org_post_info + + forbidden_tag=#{forbiddenTag}, + + WHERE id = #{id} AND delete_type = 0 + + + + UPDATE jcl_org_post_info + SET delete_type = 1 + WHERE delete_type = 0 + AND id IN + + #{id} + + + + \ No newline at end of file diff --git a/src/com/engine/organization/mapper/post/PostMapper.java b/src/com/engine/organization/mapper/post/PostMapper.java new file mode 100644 index 00000000..0a8e0d82 --- /dev/null +++ b/src/com/engine/organization/mapper/post/PostMapper.java @@ -0,0 +1,77 @@ +package com.engine.organization.mapper.post; + + +import com.engine.organization.entity.TreeData; +import com.engine.organization.entity.post.po.PostPO; +import org.apache.ibatis.annotations.MapKey; +import org.apache.ibatis.annotations.Param; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/13 + * @Version V1.0 + **/ +public interface PostMapper { + + /** + * 根据No查询职务分类 + * + * @param postNo + * @return + */ + List listByNo(@Param("postNo") String postNo); + + /** + * 获取职务分类根据ID + * + * @param id + * @return + */ + PostPO getPostByID(@Param("id") long id); + + /** + * 根据ID查询职务分类列表 + * 浏览按钮赋值、展示用 + * + * @param ids + * @return + */ + @MapKey("id") + List> listPostsByIds(@Param("ids") Collection ids); + + /** + * 获取左侧树 + * @return + */ + ArrayList getTreeData(); + + /** + * 插入职务分类 + * + * @param postPO + * @return + */ + int insertIgnoreNull(PostPO postPO); + + /** + * 修改,修改所有字段 + * + * @param postPO + * @return + */ + int updatePost(PostPO postPO); + + /** + * 批量删除职务分类方案 + * + * @param ids + */ + int deleteByIds(@Param("ids") Collection ids); + +} diff --git a/src/com/engine/organization/mapper/post/PostMapper.xml b/src/com/engine/organization/mapper/post/PostMapper.xml new file mode 100644 index 00000000..8ab5d466 --- /dev/null +++ b/src/com/engine/organization/mapper/post/PostMapper.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + t + . + id + , t.post_no + , t.post_name + , t.description + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + + + + + + + + update jcl_org_post + + creator=#{creator}, + update_time=#{updateTime}, + post_no=#{postNo}, + post_name=#{postName}, + description=#{description}, + + WHERE id = #{id} AND delete_type = 0 + + + + INSERT INTO jcl_org_post + + + creator, + + + delete_type, + + + create_time, + + + update_time, + + + post_no, + + + post_name, + + + description, + + + + + #{creator}, + + + #{deleteType}, + + + #{createTime}, + + + #{updateTime}, + + + #{postNo}, + + + #{postName}, + + + #{description}, + + + + + + + + UPDATE jcl_org_post + SET delete_type = 1 + WHERE delete_type = 0 + AND id IN + + #{id} + + + + \ No newline at end of file diff --git a/src/com/engine/organization/mapper/scheme/GradeMapper.java b/src/com/engine/organization/mapper/scheme/GradeMapper.java new file mode 100644 index 00000000..0f4e9133 --- /dev/null +++ b/src/com/engine/organization/mapper/scheme/GradeMapper.java @@ -0,0 +1,69 @@ +package com.engine.organization.mapper.scheme; + + +import com.engine.organization.entity.scheme.po.GradePO; +import org.apache.ibatis.annotations.Param; + +import java.util.Collection; +import java.util.List; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/11 + * @Version V1.0 + **/ +public interface GradeMapper { + + /** + * 根据No查询登记方案 + * + * @param gradeNo + * @return + */ + List listByNo(@Param("gradeNo") String gradeNo); + + /** + * 获取职级根据ID + * @param id + * @return + */ + GradePO getGradeByID(@Param("id") long id); + + /** + * 插入职级 + * @param gradePO + * @return + */ + int insertIgnoreNull(GradePO gradePO); + + /** + * 修改,修改所有字段 + * + * @param gradePO + * @return + */ + int updateGrade(GradePO gradePO); + + /** + * 更新禁用标记 + * + * @param gradePO + * @return + */ + int updateForbiddenTagById(GradePO gradePO); + + /** + * 批量删除登记方案 + * + * @param ids + */ + int deleteByIds(@Param("ids") Collection ids); + + /** + * 根据禁用标记统计 + * @param tag + * @return + */ + int getCountByTag(@Param("tag") int tag); +} diff --git a/src/com/engine/organization/mapper/scheme/GradeMapper.xml b/src/com/engine/organization/mapper/scheme/GradeMapper.xml new file mode 100644 index 00000000..ccc1b0c6 --- /dev/null +++ b/src/com/engine/organization/mapper/scheme/GradeMapper.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + t + . + id + , t.grade_no + , t.grade_name + , t.description + , t.scheme_id + , t.level_id + , t.forbidden_tag + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + + + update jcl_org_grade + + creator=#{creator}, + update_time=#{updateTime}, + grade_no=#{gradeNo}, + grade_name=#{gradeName}, + description=#{description}, + scheme_id=#{schemeId}, + level_id=#{levelId}, + + WHERE id = #{id} AND delete_type = 0 + + + + INSERT INTO jcl_org_grade + + + creator, + + + delete_type, + + + create_time, + + + update_time, + + + grade_no, + + + grade_name, + + + description, + + + scheme_id, + + level_id, + + forbidden_tag, + + + + #{creator}, + + + #{deleteType}, + + + #{createTime}, + + + #{updateTime}, + + + #{gradeNo}, + + + #{gradeName}, + + + #{description}, + + + #{schemeId}, + + #{levelId}, + + 0, + + + + + update jcl_org_grade + + forbidden_tag=#{forbiddenTag}, + + WHERE id = #{id} AND delete_type = 0 + + + + UPDATE jcl_org_grade + SET delete_type = 1 + WHERE delete_type = 0 + AND id IN + + #{id} + + + + \ No newline at end of file diff --git a/src/com/engine/organization/mapper/scheme/LevelMapper.java b/src/com/engine/organization/mapper/scheme/LevelMapper.java new file mode 100644 index 00000000..81f4dca1 --- /dev/null +++ b/src/com/engine/organization/mapper/scheme/LevelMapper.java @@ -0,0 +1,80 @@ +package com.engine.organization.mapper.scheme; + + +import com.engine.organization.entity.scheme.po.LevelPO; +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 + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +public interface LevelMapper { + + /** + * 根据No查询登记方案 + * + * @param levelNo + * @return + */ + List listByNo(@Param("levelNo") String levelNo); + + /** + * 获取职等根据ID + * @param id + * @return + */ + LevelPO getLevelByID(@Param("id") long id); + + /** + * 根据ID查询登记方案列表 + * + * @param ids + * @return + */ + @MapKey("id") + List> listLevelsByIds(@Param("ids") Collection ids); + + /** + * 插入职等 + * @param levelPO + * @return + */ + int insertIgnoreNull(LevelPO levelPO); + + /** + * 修改,修改所有字段 + * + * @param levelPO + * @return + */ + int updateLevel(LevelPO levelPO); + + /** + * 更新禁用标记 + * + * @param levelPO + * @return + */ + int updateForbiddenTagById(LevelPO levelPO); + + /** + * 批量删除登记方案 + * + * @param ids + */ + int deleteByIds(@Param("ids") Collection ids); + + /** + * 根据禁用标记统计 + * @param tag + * @return + */ + int getCountByTag(@Param("tag") int tag); +} diff --git a/src/com/engine/organization/mapper/scheme/LevelMapper.xml b/src/com/engine/organization/mapper/scheme/LevelMapper.xml new file mode 100644 index 00000000..c34dfe85 --- /dev/null +++ b/src/com/engine/organization/mapper/scheme/LevelMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + t + . + id + , t.level_no + , t.level_name + , t.description + , t.scheme_id + , t.forbidden_tag + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + + + + + update jcl_org_level + + creator=#{creator}, + update_time=#{updateTime}, + level_no=#{levelNo}, + level_name=#{levelName}, + description=#{description}, + scheme_id=#{schemeId}, + + WHERE id = #{id} AND delete_type = 0 + + + + INSERT INTO jcl_org_level + + + creator, + + + delete_type, + + + create_time, + + + update_time, + + + level_no, + + + level_name, + + + description, + + + scheme_id, + + forbidden_tag, + + + + #{creator}, + + + #{deleteType}, + + + #{createTime}, + + + #{updateTime}, + + + #{levelNo}, + + + #{levelName}, + + + #{description}, + + + #{schemeId}, + + 0, + + + + + update jcl_org_level + + forbidden_tag=#{forbiddenTag}, + + WHERE id = #{id} AND delete_type = 0 + + + + UPDATE jcl_org_level + SET delete_type = 1 + WHERE delete_type = 0 + AND id IN + + #{id} + + + + \ No newline at end of file diff --git a/src/com/engine/organization/mapper/scheme/SchemeMapper.java b/src/com/engine/organization/mapper/scheme/SchemeMapper.java new file mode 100644 index 00000000..260f9294 --- /dev/null +++ b/src/com/engine/organization/mapper/scheme/SchemeMapper.java @@ -0,0 +1,76 @@ +package com.engine.organization.mapper.scheme; + + +import com.engine.organization.entity.scheme.po.SchemePO; +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 + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +public interface SchemeMapper { + + + /** + * 根据No查询登记方案 + * + * @param schemeNo + * @return + */ + List listByNo(@Param("schemeNo") String schemeNo); + + /** + * 根据ID查询登记方案 + * + * @param id + * @return + */ + SchemePO getSchemeByID(@Param("id") long id); + + /** + * 根据ID查询登记方案列表 + * + * @param ids + * @return + */ + @MapKey("id") + List> listSchemesByIds(@Param("ids") Collection ids); + + /** + * 新增,忽略null字段 + * + * @param schemePO + * @return + */ + int insertIgnoreNull(SchemePO schemePO); + + /** + * 修改,修改所有字段 + * + * @param schemePO + * @return + */ + int updateScheme(SchemePO schemePO); + + /** + * 更新禁用标记 + * + * @param schemePO + * @return + */ + int updateForbiddenTagById(SchemePO schemePO); + + /** + * 批量删除登记方案 + * + * @param ids + */ + int deleteByIds(@Param("ids") Collection ids); +} diff --git a/src/com/engine/organization/mapper/scheme/SchemeMapper.xml b/src/com/engine/organization/mapper/scheme/SchemeMapper.xml new file mode 100644 index 00000000..aca1edcf --- /dev/null +++ b/src/com/engine/organization/mapper/scheme/SchemeMapper.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + t + . + id + , t.scheme_no + , t.scheme_name + , t.scheme_description + , t.forbidden_tag + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + + + + INSERT INTO jcl_org_scheme + + + creator, + + + delete_type, + + + create_time, + + + update_time, + + + scheme_no, + + + scheme_name, + + + scheme_description, + + forbidden_tag, + + + + #{creator}, + + + #{deleteType}, + + + #{createTime}, + + + #{updateTime}, + + + #{schemeNo}, + + + #{schemeName}, + + + #{schemeDescription}, + + 0, + + + + + update jcl_org_scheme + + creator=#{creator}, + update_time=#{updateTime}, + scheme_no=#{schemeNo}, + scheme_name=#{schemeName}, + scheme_description=#{schemeDescription}, + + WHERE id = #{id} AND delete_type = 0 + + + + update jcl_org_scheme + + forbidden_tag=#{forbiddenTag}, + + WHERE id = #{id} AND delete_type = 0 + + + + UPDATE jcl_org_scheme + SET delete_type = 1 + WHERE delete_type = 0 + AND id IN + + #{id} + + + + \ No newline at end of file diff --git a/src/com/engine/organization/mapper/sequence/SequenceMapper.java b/src/com/engine/organization/mapper/sequence/SequenceMapper.java new file mode 100644 index 00000000..4bcfa336 --- /dev/null +++ b/src/com/engine/organization/mapper/sequence/SequenceMapper.java @@ -0,0 +1,80 @@ +package com.engine.organization.mapper.sequence; + + +import com.engine.organization.entity.sequence.po.SequencePO; +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 + * @Description: TODO + * @Date 2022/5/12 + * @Version V1.0 + **/ +public interface SequenceMapper { + + /** + * 根据No查询岗位 + * + * @param sequenceNo + * @return + */ + List listByNo(@Param("sequenceNo") String sequenceNo); + + /** + * 获取岗位根据ID + * @param id + * @return + */ + SequencePO getSequenceByID(@Param("id") long id); + + /** + * 根据ID查询岗位列表 + * + * @param ids + * @return + */ + @MapKey("id") + List> listSequencesByIds(@Param("ids") Collection ids); + + /** + * 插入岗位 + * @param sequencePO + * @return + */ + int insertIgnoreNull(SequencePO sequencePO); + + /** + * 修改,修改所有字段 + * + * @param sequencePO + * @return + */ + int updateSequence(SequencePO sequencePO); + + /** + * 更新禁用标记 + * + * @param sequencePO + * @return + */ + int updateForbiddenTagById(SequencePO sequencePO); + + /** + * 批量删除岗位方案 + * + * @param ids + */ + int deleteByIds(@Param("ids") Collection ids); + + /** + * 根据禁用标记统计 + * @param tag + * @return + */ + int getCountByTag(@Param("tag") int tag); +} diff --git a/src/com/engine/organization/mapper/sequence/SequenceMapper.xml b/src/com/engine/organization/mapper/sequence/SequenceMapper.xml new file mode 100644 index 00000000..ca6a0d38 --- /dev/null +++ b/src/com/engine/organization/mapper/sequence/SequenceMapper.xml @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + t + . + id + , t.sequence_no + , t.sequence_name + , t.description + , t.scheme_id + , t.forbidden_tag + , t.creator + , t.delete_type + , t.create_time + , t.update_time + + + + + + + + + + update jcl_org_sequence + + creator=#{creator}, + update_time=#{updateTime}, + sequence_no=#{sequenceNo}, + sequence_name=#{sequenceName}, + description=#{description}, + scheme_id=#{schemeId}, + + WHERE id = #{id} AND delete_type = 0 + + + + INSERT INTO jcl_org_sequence + + + creator, + + + delete_type, + + + create_time, + + + update_time, + + + sequence_no, + + + sequence_name, + + + description, + + + scheme_id, + + forbidden_tag, + + + + #{creator}, + + + #{deleteType}, + + + #{createTime}, + + + #{updateTime}, + + + #{sequenceNo}, + + + #{sequenceName}, + + + #{description}, + + + #{schemeId}, + + 0, + + + + + update jcl_org_sequence + + forbidden_tag=#{forbiddenTag}, + + WHERE id = #{id} AND delete_type = 0 + + + + UPDATE jcl_org_sequence + SET delete_type = 1 + WHERE delete_type = 0 + AND id IN + + #{id} + + + + \ No newline at end of file diff --git a/src/com/engine/organization/service/CompService.java b/src/com/engine/organization/service/CompService.java new file mode 100644 index 00000000..73c7d549 --- /dev/null +++ b/src/com/engine/organization/service/CompService.java @@ -0,0 +1,21 @@ +package com.engine.organization.service; + +import com.engine.organization.common.BaseQueryParam; + +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public interface CompService { + + /** + * 列表 + * @param baseQueryParam + * @return + */ + Map listPage(BaseQueryParam baseQueryParam); +} diff --git a/src/com/engine/organization/service/GradeService.java b/src/com/engine/organization/service/GradeService.java new file mode 100644 index 00000000..426a436a --- /dev/null +++ b/src/com/engine/organization/service/GradeService.java @@ -0,0 +1,81 @@ +package com.engine.organization.service; + +import com.engine.organization.entity.scheme.param.GradeSearchParam; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +public interface GradeService { + /** + * 职级列表 + * + * @param params + * @return + */ + Map listPage(Map params); + + /** + * 新增职级 + * @param param + * @return + */ + int saveGrade(GradeSearchParam param); + + /** + * 更新职级信息 + * + * @param param + * @return + */ + int updateGrade(GradeSearchParam param); + + /** + * 更新禁用标记 + * + * @param params + */ + int updateForbiddenTagById(GradeSearchParam params); + + /** + * 根据ID批量删除 + * + * @param ids + */ + int deleteByIds(Collection ids); + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + Map getSearchCondition(Map params); + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + Map getGradeForm(Map params); + + /** + * 获取列表页面按钮信息 + * @return + */ + Map getHasRight(); + + /** + * 获取列表tabs + * @return + */ + Map getTabInfo(); + +} diff --git a/src/com/engine/organization/service/GroupService.java b/src/com/engine/organization/service/GroupService.java new file mode 100644 index 00000000..fb704c21 --- /dev/null +++ b/src/com/engine/organization/service/GroupService.java @@ -0,0 +1,31 @@ +package com.engine.organization.service; + +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public interface GroupService { + /** + * 新增、编辑表单 + * + * @param params + * @return + */ + Map getGroupFormField(Map params); + + /** + * 获取列表页面按钮信息 + * @return + */ + Map getHasRight(); + + /** + * 获取列表tabs + * @return + */ + Map getTabInfo(); +} diff --git a/src/com/engine/organization/service/LevelService.java b/src/com/engine/organization/service/LevelService.java new file mode 100644 index 00000000..9cf15c3e --- /dev/null +++ b/src/com/engine/organization/service/LevelService.java @@ -0,0 +1,81 @@ +package com.engine.organization.service; + +import com.engine.organization.entity.scheme.param.LevelSearchParam; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/10 + * @version: 1.0 + */ +public interface LevelService { + /** + * 职等列表 + * + * @param params + * @return + */ + Map listPage(Map params); + + /** + * 新增职等 + * @param param + * @return + */ + int saveLevel(LevelSearchParam param); + + /** + * 更新职等信息 + * + * @param param + * @return + */ + int updateLevel(LevelSearchParam param); + + /** + * 更新禁用标记 + * + * @param params + */ + int updateForbiddenTagById(LevelSearchParam params); + + /** + * 根据ID批量删除 + * + * @param ids + */ + int deleteByIds(Collection ids); + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + Map getSearchCondition(Map params); + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + Map getLevelForm(Map params); + + /** + * 获取列表页面按钮信息 + * @return + */ + Map getTableBtn(); + + /** + * 获取列表tabs + * @return + */ + Map getTabInfo(); + +} diff --git a/src/com/engine/organization/service/PostInfoService.java b/src/com/engine/organization/service/PostInfoService.java new file mode 100644 index 00000000..edeb6560 --- /dev/null +++ b/src/com/engine/organization/service/PostInfoService.java @@ -0,0 +1,77 @@ +package com.engine.organization.service; + +import com.engine.organization.entity.post.param.PostInfoSearchParam; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public interface PostInfoService { + /** + * 职务信息列表 + * + * @param params + * @return + */ + Map listPage(Map params); + + /** + * 新增职务信息 + * @param param + * @return + */ + int savePostInfo(PostInfoSearchParam param); + + /** + * 更新职务信息信息 + * + * @param param + * @return + */ + int updatePostInfo(PostInfoSearchParam param); + + /** + * 更新禁用标记 + * + * @param params + */ + int updateForbiddenTagById(PostInfoSearchParam params); + + + /** + * 根据ID批量删除 + * + * @param ids + */ + int deleteByIds(Collection ids); + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + Map getSearchCondition(Map params); + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + Map getPostInfoForm(Map params); + + /** + * 获取列表页面按钮信息 + * @return + */ + Map getHasRight(); + + +} diff --git a/src/com/engine/organization/service/PostService.java b/src/com/engine/organization/service/PostService.java new file mode 100644 index 00000000..3aa4194d --- /dev/null +++ b/src/com/engine/organization/service/PostService.java @@ -0,0 +1,55 @@ +package com.engine.organization.service; + +import com.engine.organization.entity.TreeData; +import com.engine.organization.entity.post.po.PostPO; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public interface PostService { + + /** + * 新增职务分类 + * @param postPO + * @return + */ + int savePost(PostPO postPO); + + /** + * 更新职务分类信息 + * + * @param postPO + * @return + */ + int updatePost(PostPO postPO); + + /** + * 根据ID批量删除 + * + * @param ids + */ + int deleteByIds(Collection ids); + + /** + * 获取新增表单 + * + * @param params + * @return + */ + Map getPostForm(Map params); + + + /** + * 获取左侧树 + * @return + */ + TreeData getTreeData(); + + +} diff --git a/src/com/engine/organization/service/SchemeService.java b/src/com/engine/organization/service/SchemeService.java new file mode 100644 index 00000000..c3c28023 --- /dev/null +++ b/src/com/engine/organization/service/SchemeService.java @@ -0,0 +1,77 @@ +package com.engine.organization.service; + +import com.engine.organization.entity.scheme.param.SchemeSearchParam; + +import java.util.Collection; +import java.util.Map; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +public interface SchemeService { + + /** + * 等级方案列表 + * + * @param params + * @return + */ + Map listPage(Map params); + + /** + * 新增等级方案 + * + * @param param + * @return + */ + Map save(SchemeSearchParam param); + + /** + * 更新等级方案信息 + * + * @param param + * @return + */ + Map updateScheme(SchemeSearchParam param); + + /** + * 更新禁用标记 + * + * @param params + */ + void updateForbiddenTagById(SchemeSearchParam params); + + /** + * 根据ID批量删除等级方案信息 + * + * @param ids + */ + void deleteByIds(Collection ids); + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + Map getSearchCondition(Map params); + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + Map getSchemeForm(Map params); + + /** + * 获取列表页面按钮信息 + * @return + */ + Map getTableBtn(); + +} diff --git a/src/com/engine/organization/service/SequenceService.java b/src/com/engine/organization/service/SequenceService.java new file mode 100644 index 00000000..335d97b5 --- /dev/null +++ b/src/com/engine/organization/service/SequenceService.java @@ -0,0 +1,81 @@ +package com.engine.organization.service; + +import com.engine.organization.entity.sequence.param.SequenceSearchParam; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +public interface SequenceService { + /** + * 岗位列表 + * + * @param params + * @return + */ + Map listPage(Map params); + + /** + * 新增岗位 + * @param param + * @return + */ + int saveSequence(SequenceSearchParam param); + + /** + * 更新岗位信息 + * + * @param param + * @return + */ + int updateSequence(SequenceSearchParam param); + + /** + * 更新禁用标记 + * + * @param params + */ + int updateForbiddenTagById(SequenceSearchParam params); + + /** + * 根据ID批量删除 + * + * @param ids + */ + int deleteByIds(Collection ids); + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + Map getSearchCondition(Map params); + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + Map getSequenceForm(Map params); + + /** + * 获取列表页面按钮信息 + * @return + */ + Map getHasRight(); + + /** + * 获取列表tabs + * @return + */ + Map getTabInfo(); + +} diff --git a/src/com/engine/organization/service/impl/CompServiceImpl.java b/src/com/engine/organization/service/impl/CompServiceImpl.java new file mode 100644 index 00000000..dda51dfa --- /dev/null +++ b/src/com/engine/organization/service/impl/CompServiceImpl.java @@ -0,0 +1,65 @@ +package com.engine.organization.service.impl; + + +import com.cloudstore.eccom.pc.table.WeaTableColumn; +import com.cloudstore.eccom.result.WeaResultMsg; +import com.engine.core.impl.Service; +import com.engine.organization.common.BaseQueryParam; +import com.engine.organization.component.OrganizationWeaTable; +import com.engine.organization.entity.comp.bo.CompBO; +import com.engine.organization.entity.comp.dto.CompListDTO; +import com.engine.organization.entity.comp.po.CompPO; +import com.engine.organization.mapper.comp.CompMapper; +import com.engine.organization.service.CompService; +import com.engine.organization.util.db.MapperProxyFactory; +import com.engine.organization.util.page.Column; +import com.engine.organization.util.page.PageInfo; +import com.engine.organization.util.page.PageUtil; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public class CompServiceImpl extends Service implements CompService { + private CompMapper getCompMapper() { + return MapperProxyFactory.getProxy(CompMapper.class); + } + + @Override + public Map listPage(BaseQueryParam queryParam) { + Map datas = new HashMap<>(); + PageUtil.start(queryParam.getCurrent(), queryParam.getPageSize()); + List list = getCompMapper().list(queryParam); + PageInfo pageInfo = new PageInfo<>(list, CompPO.class); + Collection compPOS = pageInfo.getList(); + + List compListDTOS = CompBO.buildCompDTOList(compPOS); + PageInfo pageInfos = new PageInfo<>(compListDTOS, CompListDTO.class); + pageInfos.setTotal(pageInfo.getTotal()); + pageInfos.setPageNum(queryParam.getCurrent()); + pageInfos.setPageSize(queryParam.getPageSize()); + + OrganizationWeaTable table = new OrganizationWeaTable<>(user, CompListDTO.class); + List columns = pageInfos.getColumns(); + List weaTableColumn = columns.stream().map(v -> new WeaTableColumn("100", v.getTitle(), v.getKey())).collect(Collectors.toList()); + + table.setColumns(weaTableColumn); + + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + + + datas.put("pageInfo", pageInfos); + datas.put("dataKey",result.getResultMap()); + return datas; + } +} diff --git a/src/com/engine/organization/service/impl/GradeServiceImpl.java b/src/com/engine/organization/service/impl/GradeServiceImpl.java new file mode 100644 index 00000000..d3ee4021 --- /dev/null +++ b/src/com/engine/organization/service/impl/GradeServiceImpl.java @@ -0,0 +1,202 @@ +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; +import com.engine.core.impl.Service; +import com.engine.organization.component.OrganizationWeaTable; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.TopTab; +import com.engine.organization.entity.scheme.dto.GradeDTO; +import com.engine.organization.entity.scheme.param.GradeSearchParam; +import com.engine.organization.entity.scheme.po.GradePO; +import com.engine.organization.entity.scheme.vo.GradeTableVO; +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.service.GradeService; +import com.engine.organization.util.MenuBtn; +import com.engine.organization.util.OrganizationAssert; +import com.engine.organization.util.OrganizationFormItemUtil; +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.*; + + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +public class GradeServiceImpl extends Service implements GradeService { + + private GradeMapper getGradeMapper() { + return MapperProxyFactory.getProxy(GradeMapper.class); + } + + private LevelMapper getLevelMapper() { + return MapperProxyFactory.getProxy(LevelMapper.class); + } + + private SchemeMapper getSchemeMapper() { + return MapperProxyFactory.getProxy(SchemeMapper.class); + } + + @Override + public Map listPage(Map params) { + OrganizationWeaTable table = new OrganizationWeaTable<>(user, GradeTableVO.class); + String sqlWhere = buildSqlWhere(params); + table.setSqlwhere(sqlWhere); + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + return result.getResultMap(); + } + + + @Override + public int saveGrade(GradeSearchParam param) { + List list = getGradeMapper().listByNo(Util.null2String(param.getGradeNo())); + OrganizationAssert.isEmpty(list, "编号不允许重复"); + GradePO gradePO = GradeDTO.convertParamToPO(param, (long) user.getUID()); + return getGradeMapper().insertIgnoreNull(gradePO); + } + + @Override + public int updateGrade(GradeSearchParam param) { + GradePO gradePO = GradeDTO.convertParamToPO(param, (long) user.getUID()); + return getGradeMapper().updateGrade(gradePO); + } + + @Override + public int updateForbiddenTagById(GradeSearchParam params) { + GradePO gradePO = GradePO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build(); + return getGradeMapper().updateForbiddenTagById(gradePO); + } + + @Override + public int deleteByIds(Collection ids) { + OrganizationAssert.notEmpty(ids, "请选择要删除的数据"); + return getGradeMapper().deleteByIds(ids); + } + + + @Override + public Map getSearchCondition(Map params) { + Map apiDatas = new HashMap<>(); + List addGroups = new ArrayList<>(); + List conditionItems = new ArrayList<>(); + SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "等级方案", "161", "schemeId", "schemeBrowser"); + SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "gradeName"); + conditionItems.add(browserItem); + conditionItems.add(gradeNameCondition); + addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems)); + apiDatas.put("conditions", addGroups); + return apiDatas; + } + + + @Override + public Map getGradeForm(Map params) { + Map apiDatas = new HashMap<>(); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + SearchConditionItem gradeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "gradeName"); + gradeNameCondition.setRules("required|string"); + SearchConditionItem gradeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "gradeNo"); + gradeNoCondition.setRules("required|string"); + SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "描述说明", "description"); + SearchConditionItem schemeBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", "schemeBrowser"); + SearchConditionItem levelBrowserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "职等", "162", "levelId", "LevelBrowser"); + + // 编辑状态下赋值操作 + String id = Util.null2String(params.get("id")); + if (!StringUtil.isEmpty(id)) { + GradePO gradePO = getGradeMapper().getGradeByID(Integer.parseInt(id)); + OrganizationAssert.notNull(gradePO, "选择的数据不存在,或数据已删除"); + + gradeNameCondition.setValue(gradePO.getGradeName()); + gradeNoCondition.setValue(gradePO.getGradeNo()); + descriptionCondition.setValue(gradePO.getDescription()); + schemeBrowserItem.setValue(gradePO.getSchemeId()); + levelBrowserItem.setValue(gradePO.getLevelId()); + + BrowserBean schemeBrowserBean = schemeBrowserItem.getBrowserConditionParam(); + List> schemeMaps = getSchemeMapper().listSchemesByIds(QueryParam.builder().ids(gradePO.getSchemeId().toString()).build().getIds()); + schemeBrowserBean.setReplaceDatas(schemeMaps); + schemeBrowserItem.setBrowserConditionParam(schemeBrowserBean); + + BrowserBean levelBrowserBean = levelBrowserItem.getBrowserConditionParam(); + List> levelMaps = getLevelMapper().listLevelsByIds(QueryParam.builder().ids(gradePO.getLevelId()).build().getIds()); + levelBrowserBean.setReplaceDatas(levelMaps); + levelBrowserItem.setBrowserConditionParam(levelBrowserBean); + + // 编辑状态下,编号只读 + gradeNoCondition.setViewAttr(1); + } + + selectItems.add(gradeNoCondition); + selectItems.add(gradeNameCondition); + selectItems.add(descriptionCondition); + selectItems.add(schemeBrowserItem); + selectItems.add(levelBrowserItem); + addGroups.add(new SearchConditionGroup("基本信息", true, selectItems)); + apiDatas.put("condition", addGroups); + return apiDatas; + } + + @Override + public Map getHasRight() { + return MenuBtn.getCommonBtnDatas(); + } + + @Override + public Map getTabInfo() { + Map apiDatas = new HashMap<>(); + List topTabs = new ArrayList<>(); + topTabs.add(TopTab.builder().color("#000000").groupId("flowAll").showcount(true).title("全部").viewCondition("-1").build()); + topTabs.add(TopTab.builder().color("#ff3232").groupId("enable").showcount(true).title("启用").viewCondition("0").build()); + topTabs.add(TopTab.builder().color("#fea468").groupId("disable").showcount(true).title("禁用").viewCondition("1").build()); + apiDatas.put("topTabs", topTabs); + + HashMap countMap = new HashMap<>(); + countMap.put("flowAll", getGradeMapper().getCountByTag(-1)); + countMap.put("enable", getGradeMapper().getCountByTag(0)); + countMap.put("disable", getGradeMapper().getCountByTag(1)); + + apiDatas.put("topTabCount", countMap); + return apiDatas; + } + + /** + * 查询条件 + * + * @param params + * @return + */ + private String buildSqlWhere(Map params) { + DBType dbType = DBType.get(new RecordSet().getDBType()); + String sqlWhere = " where t.delete_type ='0' "; + String gradeName = (String) params.get("gradeName"); + if (StringUtils.isNotBlank(gradeName)) { + sqlWhere += " AND t.grade_name " + dbType.like(gradeName); + } + String schemeId = (String) params.get("schemeId"); + if (StringUtils.isNotBlank(schemeId)) { + sqlWhere += " AND t.scheme_id = '" + schemeId + "'"; + } + String viewCondition = (String) params.get("viewCondition"); + // -1:全部、0:启用、1:禁用 + if (StringUtils.isNotBlank(viewCondition) && !"-1".equalsIgnoreCase(viewCondition)) { + sqlWhere += " AND t.forbidden_tag = '" + viewCondition + "'"; + } + return sqlWhere; + } +} diff --git a/src/com/engine/organization/service/impl/GroupServiceImpl.java b/src/com/engine/organization/service/impl/GroupServiceImpl.java new file mode 100644 index 00000000..fb431936 --- /dev/null +++ b/src/com/engine/organization/service/impl/GroupServiceImpl.java @@ -0,0 +1,97 @@ +package com.engine.organization.service.impl; + +import com.api.browser.bean.SearchConditionGroup; +import com.api.browser.bean.SearchConditionItem; +import com.engine.core.impl.Service; +import com.engine.organization.entity.TopTab; +import com.engine.organization.service.GroupService; +import com.engine.organization.util.MenuBtn; +import com.engine.organization.util.OrganizationFormItemUtil; +import weaver.conn.RecordSet; +import weaver.general.StringUtil; +import weaver.general.Util; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public class GroupServiceImpl extends Service implements GroupService { + @Override + public Map getGroupFormField(Map params) { + Map apiDatas = new HashMap<>(); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + SearchConditionItem companyNameItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "总部名称", "companyname"); + SearchConditionItem companyDescItem = OrganizationFormItemUtil.inputItem(user, 2, 16, 1, 50, "总部全称", "companydesc"); + companyDescItem.setRules("required|string"); + SearchConditionItem companyWebItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 1, 60, "公司网站", "companyweb"); + + // 赋值 + String id = Util.null2String(params.get("id")); + if (!StringUtil.isEmpty(id)) { + RecordSet rs = new RecordSet(); + + String sql = "select * from HrmCompany where id in(" + id + ")"; + rs.executeQuery(sql); + rs.executeQuery(sql); + int colcount = rs.getColCounts(); + while (rs.next()) { + Map row = new HashMap(); + for (int i = 1; i <= colcount; i++) { + row.put(rs.getColumnName(i).toLowerCase(), Util.null2String(rs.getString(i))); + } + // 赋值 + companyNameItem.setValue(row.get("companyname")); + companyDescItem.setValue(row.get("companydesc")); + companyWebItem.setValue(row.get("companyweb")); + } + } + + + // 设置编辑属性 + if (!StringUtil.isEmpty(Util.null2String(params.get("viewattr")))) { + int viewAttr = Integer.parseInt(params.get("viewattr").toString()); + companyNameItem.setViewAttr(viewAttr); + companyDescItem.setViewAttr(viewAttr); + companyWebItem.setViewAttr(viewAttr); + } + + selectItems.add(companyNameItem); + selectItems.add(companyDescItem); + selectItems.add(companyWebItem); + addGroups.add(new SearchConditionGroup("基本信息", true, selectItems)); + apiDatas.put("condition", addGroups); + return apiDatas; + } + + @Override + public Map getHasRight() { + Map btnDatas = new HashMap<>(); + ArrayList topMenuList = new ArrayList<>(); + ArrayList rightMenuList = new ArrayList<>(); + // 编辑 + topMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName("编辑").type("BTN_EDIT").build()); + btnDatas.put("topMenu", topMenuList); + // 编辑 + rightMenuList.add(MenuBtn.builder().isTop("1").menuFun("doEdit").menuIcon("icon-coms-edit").menuName("编辑").type("BTN_EDIT").build()); + btnDatas.put("rightMenu", rightMenuList); + return btnDatas; + } + + @Override + public Map getTabInfo() { + Map apiDatas = new HashMap<>(); + List topTabs = new ArrayList<>(); + topTabs.add(TopTab.builder().title("总部信息").viewCondition("1").build()); + apiDatas.put("topTabs", topTabs); + + return apiDatas; + } +} diff --git a/src/com/engine/organization/service/impl/LevelServiceImpl.java b/src/com/engine/organization/service/impl/LevelServiceImpl.java new file mode 100644 index 00000000..837b84d6 --- /dev/null +++ b/src/com/engine/organization/service/impl/LevelServiceImpl.java @@ -0,0 +1,189 @@ +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; +import com.engine.core.impl.Service; +import com.engine.organization.component.OrganizationWeaTable; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.TopTab; +import com.engine.organization.entity.scheme.dto.LevelDTO; +import com.engine.organization.entity.scheme.param.LevelSearchParam; +import com.engine.organization.entity.scheme.po.LevelPO; +import com.engine.organization.entity.scheme.vo.LevelTableVO; +import com.engine.organization.mapper.scheme.LevelMapper; +import com.engine.organization.mapper.scheme.SchemeMapper; +import com.engine.organization.service.LevelService; +import com.engine.organization.util.MenuBtn; +import com.engine.organization.util.OrganizationAssert; +import com.engine.organization.util.OrganizationFormItemUtil; +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.*; + + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/10 + * @version: 1.0 + */ +public class LevelServiceImpl extends Service implements LevelService { + + private LevelMapper getLevelMapper() { + return MapperProxyFactory.getProxy(LevelMapper.class); + } + + private SchemeMapper getSchemeMapper() { + return MapperProxyFactory.getProxy(SchemeMapper.class); + } + + @Override + public Map listPage(Map params) { + OrganizationWeaTable table = new OrganizationWeaTable<>(user, LevelTableVO.class); + String sqlWhere = buildSqlWhere(params); + table.setSqlwhere(sqlWhere); + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + return result.getResultMap(); + } + + + @Override + public int saveLevel(LevelSearchParam param) { + List list = getLevelMapper().listByNo(Util.null2String(param.getLevelNo())); + OrganizationAssert.isEmpty(list, "编号不允许重复"); + LevelPO levelPO = LevelDTO.convertParamToPO(param, (long) user.getUID()); + return getLevelMapper().insertIgnoreNull(levelPO); + } + + @Override + public int updateLevel(LevelSearchParam param) { + LevelPO levelPO = LevelDTO.convertParamToPO(param, (long) user.getUID()); + return getLevelMapper().updateLevel(levelPO); + } + + @Override + public int updateForbiddenTagById(LevelSearchParam params) { + LevelPO levelPO = LevelPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build(); + return getLevelMapper().updateForbiddenTagById(levelPO); + } + + @Override + public int deleteByIds(Collection ids) { + OrganizationAssert.notEmpty(ids, "请选择要删除的数据"); + return getLevelMapper().deleteByIds(ids); + } + + + @Override + public Map getSearchCondition(Map params) { + Map apiDatas = new HashMap<>(); + List addGroups = new ArrayList<>(); + List conditionItems = new ArrayList<>(); + SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "等级方案", "161", "schemeId", "schemeBrowser"); + SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "levelName"); + conditionItems.add(browserItem); + conditionItems.add(levelNameCondition); + addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems)); + apiDatas.put("conditions", addGroups); + return apiDatas; + } + + + @Override + public Map getLevelForm(Map params) { + Map apiDatas = new HashMap<>(); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + SearchConditionItem levelNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "levelName"); + levelNameCondition.setRules("required|string"); + SearchConditionItem levelNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "levelNo"); + levelNoCondition.setRules("required|string"); + SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "描述说明", "description"); + SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", "schemeBrowser"); + + // 编辑状态下赋值操作 + String id = Util.null2String(params.get("id")); + if (!StringUtil.isEmpty(id)) { + LevelPO levelPO = getLevelMapper().getLevelByID(Integer.parseInt(id)); + OrganizationAssert.notNull(levelPO, "选择的数据不存在,或数据已删除"); + + levelNameCondition.setValue(levelPO.getLevelName()); + levelNoCondition.setValue(levelPO.getLevelNo()); + descriptionCondition.setValue(levelPO.getDescription()); + browserItem.setValue(levelPO.getSchemeId()); + + BrowserBean browserBean = browserItem.getBrowserConditionParam(); + List> maps = getSchemeMapper().listSchemesByIds(QueryParam.builder().ids(levelPO.getSchemeId().toString()).build().getIds()); + + browserBean.setReplaceDatas(maps); + browserItem.setBrowserConditionParam(browserBean); + // 编辑状态下,编号只读 + levelNoCondition.setViewAttr(1); + } + + selectItems.add(levelNoCondition); + selectItems.add(levelNameCondition); + selectItems.add(descriptionCondition); + selectItems.add(browserItem); + addGroups.add(new SearchConditionGroup("基本信息", true, selectItems)); + apiDatas.put("condition", addGroups); + return apiDatas; + } + + @Override + public Map getTableBtn() { + return MenuBtn.getCommonBtnDatas(); + } + + @Override + public Map getTabInfo() { + Map apiDatas = new HashMap<>(); + List topTabs = new ArrayList<>(); + topTabs.add(TopTab.builder().color("#000000").groupId("flowAll").showcount(true).title("全部").viewCondition("-1").build()); + topTabs.add(TopTab.builder().color("#ff3232").groupId("enable").showcount(true).title("启用").viewCondition("0").build()); + topTabs.add(TopTab.builder().color("#fea468").groupId("disable").showcount(true).title("禁用").viewCondition("1").build()); + apiDatas.put("topTabs", topTabs); + + HashMap countMap = new HashMap<>(); + countMap.put("flowAll", getLevelMapper().getCountByTag(-1)); + countMap.put("enable", getLevelMapper().getCountByTag(0)); + countMap.put("disable", getLevelMapper().getCountByTag(1)); + + apiDatas.put("topTabCount", countMap); + return apiDatas; + } + + /** + * 查询条件 + * + * @param params + * @return + */ + private String buildSqlWhere(Map params) { + DBType dbType = DBType.get(new RecordSet().getDBType()); + String sqlWhere = " where t.delete_type ='0' "; + String levelName = (String) params.get("levelName"); + if (StringUtils.isNotBlank(levelName)) { + sqlWhere += " AND t.level_name " + dbType.like(levelName); + } + String schemeId = (String) params.get("schemeId"); + if (StringUtils.isNotBlank(schemeId)) { + sqlWhere += " AND t.scheme_id = '" + schemeId + "'"; + } + String viewCondition = (String) params.get("viewCondition"); + // -1:全部、0:启用、1:禁用 + if (StringUtils.isNotBlank(viewCondition) && !"-1".equalsIgnoreCase(viewCondition)) { + sqlWhere += " AND t.forbidden_tag = '" + viewCondition + "'"; + } + return sqlWhere; + } +} diff --git a/src/com/engine/organization/service/impl/PostInfoServiceImpl.java b/src/com/engine/organization/service/impl/PostInfoServiceImpl.java new file mode 100644 index 00000000..4e5e4eed --- /dev/null +++ b/src/com/engine/organization/service/impl/PostInfoServiceImpl.java @@ -0,0 +1,183 @@ +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; +import com.engine.core.impl.Service; +import com.engine.organization.component.OrganizationWeaTable; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.post.dto.PostInfoDTO; +import com.engine.organization.entity.post.param.PostInfoSearchParam; +import com.engine.organization.entity.post.po.PostInfoPO; +import com.engine.organization.entity.post.vo.PostInfoTableVO; +import com.engine.organization.mapper.post.PostInfoMapper; +import com.engine.organization.mapper.post.PostMapper; +import com.engine.organization.service.PostInfoService; +import com.engine.organization.util.MenuBtn; +import com.engine.organization.util.OrganizationAssert; +import com.engine.organization.util.OrganizationFormItemUtil; +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.*; + + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostInfoServiceImpl extends Service implements PostInfoService { + + private PostInfoMapper getPostInfoMapper() { + return MapperProxyFactory.getProxy(PostInfoMapper.class); + } + + private PostMapper getPostMapper() { + return MapperProxyFactory.getProxy(PostMapper.class); + } + + @Override + public Map listPage(Map params) { + OrganizationWeaTable table = new OrganizationWeaTable<>(user, PostInfoTableVO.class); + String sqlWhere = buildSqlWhere(params); + table.setSqlwhere(sqlWhere); + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + return result.getResultMap(); + } + + + @Override + public int savePostInfo(PostInfoSearchParam param) { + List list = getPostInfoMapper().listByNo(Util.null2String(param.getPostInfoNo())); + OrganizationAssert.isEmpty(list, "编号不允许重复"); + PostInfoPO postInfoPO = PostInfoDTO.convertParamToPO(param, (long) user.getUID()); + return getPostInfoMapper().insertIgnoreNull(postInfoPO); + } + + @Override + public int updatePostInfo(PostInfoSearchParam param) { + PostInfoPO postInfoPO = PostInfoDTO.convertParamToPO(param, (long) user.getUID()); + return getPostInfoMapper().updatePostInfo(postInfoPO); + } + + @Override + public int updateForbiddenTagById(PostInfoSearchParam params) { + PostInfoPO postInfoPO = PostInfoPO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build(); + return getPostInfoMapper().updateForbiddenTagById(postInfoPO); + } + + + @Override + public int deleteByIds(Collection ids) { + OrganizationAssert.notEmpty(ids, "请选择要删除的数据"); + return getPostInfoMapper().deleteByIds(ids); + } + + + @Override + public Map getSearchCondition(Map params) { + Map apiDatas = new HashMap<>(); + List addGroups = new ArrayList<>(); + List conditionItems = new ArrayList<>(); + SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "职务分类", "161", "postId", "postBrowser"); + SearchConditionItem nameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "postInfoName"); + conditionItems.add(browserItem); + conditionItems.add(nameCondition); + addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems)); + apiDatas.put("conditions", addGroups); + return apiDatas; + } + + + @Override + public Map getPostInfoForm(Map params) { + Map apiDatas = new HashMap<>(); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + // 编号 + SearchConditionItem noItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "postInfoNo"); + noItem.setRules("required|string"); + // 名称 + SearchConditionItem nameItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "postInfoName"); + nameItem.setRules("required|string"); + // 权限 + SearchConditionItem authorityItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 2, 50, "权限", "postInfoAuthority"); + // 责任 + SearchConditionItem dutyItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 2, 50, "责任", "postInfoDuty"); + // 资格 + SearchConditionItem qualificationItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 2, 50, "资格", "postInfoQualification"); + // 职务分类 + SearchConditionItem postIdBrowser = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "职务分类", "161", "postId", "postBrowser"); + postIdBrowser.setRules("required|string"); + // 说明 + SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "描述说明", "description"); + + // 编辑状态下赋值操作 + String id = Util.null2String(params.get("id")); + if (!StringUtil.isEmpty(id)) { + PostInfoPO postInfoPO = getPostInfoMapper().getPostInfoByID(Integer.parseInt(id)); + OrganizationAssert.notNull(postInfoPO, "选择的数据不存在,或数据已删除"); + + noItem.setValue(postInfoPO.getPostInfoNo()); + nameItem.setValue(postInfoPO.getPostInfoName()); + authorityItem.setValue(postInfoPO.getPostInfoAuthority()); + dutyItem.setValue(postInfoPO.getPostInfoDuty()); + qualificationItem.setValue(postInfoPO.getPostInfoQualification()); + descriptionItem.setValue(postInfoPO.getDescription()); + + BrowserBean browserBean = postIdBrowser.getBrowserConditionParam(); + List> maps = getPostMapper().listPostsByIds(QueryParam.builder().ids(postInfoPO.getPostId().toString()).build().getIds()); + + browserBean.setReplaceDatas(maps); + postIdBrowser.setBrowserConditionParam(browserBean); + // 编辑状态下,编号只读 + noItem.setViewAttr(1); + } + + selectItems.add(noItem); + selectItems.add(nameItem); + selectItems.add(authorityItem); + selectItems.add(dutyItem); + selectItems.add(qualificationItem); + selectItems.add(postIdBrowser); + selectItems.add(descriptionItem); + addGroups.add(new SearchConditionGroup("基本信息", true, selectItems)); + apiDatas.put("condition", addGroups); + return apiDatas; + } + + @Override + public Map getHasRight() { + return MenuBtn.getCommonBtnDatas(); + } + + + /** + * 查询条件 + * + * @param params + * @return + */ + private String buildSqlWhere(Map params) { + DBType dbType = DBType.get(new RecordSet().getDBType()); + String sqlWhere = " where t.delete_type ='0' "; + String sequenceName = (String) params.get("postInfoName"); + if (StringUtils.isNotBlank(sequenceName)) { + sqlWhere += " AND t.post_info_name " + dbType.like(sequenceName); + } + String postId = (String) params.get("postId"); + if (StringUtils.isNotBlank(postId) && !"-1".equals(postId)) { + sqlWhere += " AND t.post_id ='" + postId + "'"; + } + return sqlWhere; + } +} diff --git a/src/com/engine/organization/service/impl/PostServiceImpl.java b/src/com/engine/organization/service/impl/PostServiceImpl.java new file mode 100644 index 00000000..ed1fe268 --- /dev/null +++ b/src/com/engine/organization/service/impl/PostServiceImpl.java @@ -0,0 +1,85 @@ +package com.engine.organization.service.impl; + +import com.api.browser.bean.SearchConditionGroup; +import com.api.browser.bean.SearchConditionItem; +import com.engine.core.impl.Service; +import com.engine.organization.entity.TreeData; +import com.engine.organization.entity.post.dto.PostDTO; +import com.engine.organization.entity.post.po.PostPO; +import com.engine.organization.mapper.post.PostMapper; +import com.engine.organization.service.PostService; +import com.engine.organization.util.OrganizationAssert; +import com.engine.organization.util.OrganizationFormItemUtil; +import com.engine.organization.util.db.MapperProxyFactory; +import weaver.general.StringUtil; +import weaver.general.Util; + +import java.util.*; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostServiceImpl extends Service implements PostService { + + private PostMapper getPostMapper() { + return MapperProxyFactory.getProxy(PostMapper.class); + } + + @Override + public int savePost(PostPO postPO) { + List list = getPostMapper().listByNo(Util.null2String(postPO.getPostNo())); + OrganizationAssert.isEmpty(list, "编号不允许重复"); + return getPostMapper().insertIgnoreNull(PostDTO.convertPO(postPO,user.getUID())); + } + + @Override + public int updatePost(PostPO postPO) { + return getPostMapper().updatePost(PostDTO.convertPO(postPO,user.getUID())); + } + + @Override + public int deleteByIds(Collection ids) { + OrganizationAssert.notEmpty(ids, "请选择要删除的数据"); + return getPostMapper().deleteByIds(ids); + } + + @Override + public Map getPostForm(Map params) { + Map apiDatas = new HashMap<>(); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + SearchConditionItem postNameItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "postName"); + postNameItem.setRules("required|string"); + SearchConditionItem postNoItem = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "postNo"); + postNoItem.setRules("required|string"); + SearchConditionItem descriptionItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "描述说明", "description"); + + // 编辑状态下赋值操作 + String id = Util.null2String(params.get("id")); + if (!StringUtil.isEmpty(id)) { + PostPO postPO = getPostMapper().getPostByID(Integer.parseInt(id)); + OrganizationAssert.notNull(postPO, "选择的数据不存在,或数据已删除"); + + postNameItem.setValue(postPO.getPostName()); + postNoItem.setValue(postPO.getPostNo()); + descriptionItem.setValue(postPO.getDescription()); + + } + + selectItems.add(postNoItem); + selectItems.add(postNameItem); + selectItems.add(descriptionItem); + addGroups.add(new SearchConditionGroup("基本信息", true, selectItems)); + apiDatas.put("condition", addGroups); + return apiDatas; + } + + @Override + public TreeData getTreeData() { + ArrayList treeDataList = getPostMapper().getTreeData(); + return TreeData.builder().children(treeDataList).title("全部类型").key("-1").build(); + } +} diff --git a/src/com/engine/organization/service/impl/SchemeServiceImpl.java b/src/com/engine/organization/service/impl/SchemeServiceImpl.java new file mode 100644 index 00000000..3eac99ef --- /dev/null +++ b/src/com/engine/organization/service/impl/SchemeServiceImpl.java @@ -0,0 +1,155 @@ +package com.engine.organization.service.impl; + +import com.api.browser.bean.SearchConditionGroup; +import com.api.browser.bean.SearchConditionItem; +import com.cloudstore.eccom.result.WeaResultMsg; +import com.engine.core.impl.Service; +import com.engine.organization.component.OrganizationWeaTable; +import com.engine.organization.entity.scheme.dto.SchemeDTO; +import com.engine.organization.entity.scheme.param.SchemeSearchParam; +import com.engine.organization.entity.scheme.po.SchemePO; +import com.engine.organization.entity.scheme.vo.SchemeTableVO; +import com.engine.organization.mapper.scheme.SchemeMapper; +import com.engine.organization.service.SchemeService; +import com.engine.organization.util.MenuBtn; +import com.engine.organization.util.OrganizationAssert; +import com.engine.organization.util.OrganizationFormItemUtil; +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.*; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +public class SchemeServiceImpl extends Service implements SchemeService { + + private SchemeMapper getSchemeMapper() { + return MapperProxyFactory.getProxy(SchemeMapper.class); + } + + @Override + public Map listPage(Map params) { + OrganizationWeaTable table = new OrganizationWeaTable<>(user, SchemeTableVO.class); + + String sqlWhere = buildSqlWhere(params); + table.setSqlwhere(sqlWhere); + + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + return result.getResultMap(); + } + + @Override + public Map save(SchemeSearchParam param) { + Map apidatas = new HashMap(16); + List list = getSchemeMapper().listByNo(Util.null2String(param.getSchemeNo())); + OrganizationAssert.isEmpty(list, "编号不允许重复"); + SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID()); + getSchemeMapper().insertIgnoreNull(schemePO); + return apidatas; + } + + @Override + public Map updateScheme(SchemeSearchParam param) { + Map apidatas = new HashMap(); + SchemePO schemePO = SchemeDTO.convertParamToPO(param, (long) user.getUID()); + getSchemeMapper().updateScheme(schemePO); + return apidatas; + } + + @Override + public void updateForbiddenTagById(SchemeSearchParam params) { + SchemePO schemePO = SchemePO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build(); + getSchemeMapper().updateForbiddenTagById(schemePO); + } + + + @Override + public void deleteByIds(Collection ids) { + OrganizationAssert.notEmpty(ids, "请选择要删除的数据"); + getSchemeMapper().deleteByIds(ids); + } + + + @Override + public Map getSearchCondition(Map params) { + Map apiDatas = new HashMap<>(); + List addGroups = new ArrayList<>(); + List conditionItems = new ArrayList<>(); + SearchConditionItem schemeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "方案名称", "schemeName"); + SearchConditionItem schemeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "方案编号", "schemeNo"); + conditionItems.add(schemeNameCondition); + conditionItems.add(schemeNoCondition); + addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems)); + apiDatas.put("conditions", addGroups); + return apiDatas; + } + + + @Override + public Map getSchemeForm(Map params) { + Map apiDatas = new HashMap<>(); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + SearchConditionItem schemeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "方案名称", "schemeName"); + schemeNameCondition.setRules("required|string"); + SearchConditionItem schemeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "方案编号", "schemeNo"); + schemeNoCondition.setRules("required|string"); + SearchConditionItem textareaItem = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "方案说明", "schemeDescription"); + + // 编辑状态下赋值操作 + String id = Util.null2String(params.get("id")); + if (!StringUtil.isEmpty(id)) { + SchemePO schemePO = getSchemeMapper().getSchemeByID(Integer.parseInt(id)); + OrganizationAssert.notNull(schemePO, "选择的数据不存在,或数据已删除"); + schemeNameCondition.setValue(schemePO.getSchemeName()); + schemeNoCondition.setValue(schemePO.getSchemeNo()); + textareaItem.setValue(schemePO.getSchemeDescription()); + + // 编辑状态下,编号只读 + schemeNoCondition.setViewAttr(1); + } + + selectItems.add(schemeNoCondition); + selectItems.add(schemeNameCondition); + selectItems.add(textareaItem); + addGroups.add(new SearchConditionGroup("基本信息", true, selectItems)); + apiDatas.put("condition", addGroups); + return apiDatas; + } + + @Override + public Map getTableBtn() { + return MenuBtn.getCommonBtnDatas(); + } + + /** + * 查询条件 + * + * @param params + * @return + */ + private String buildSqlWhere(Map params) { + DBType dbType = DBType.get(new RecordSet().getDBType()); + String sqlWhere = " where delete_type ='0' "; + String name = (String) params.get("schemeName"); + if (StringUtils.isNotBlank(name)) { + sqlWhere += " AND scheme_name " + dbType.like(name); + } + String no = (String) params.get("schemeNo"); + if (StringUtils.isNotBlank(no)) { + sqlWhere += " AND scheme_no " + dbType.like(no); + } + return sqlWhere; + } + +} diff --git a/src/com/engine/organization/service/impl/SequenceServiceImpl.java b/src/com/engine/organization/service/impl/SequenceServiceImpl.java new file mode 100644 index 00000000..d33aafaa --- /dev/null +++ b/src/com/engine/organization/service/impl/SequenceServiceImpl.java @@ -0,0 +1,189 @@ +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; +import com.engine.core.impl.Service; +import com.engine.organization.component.OrganizationWeaTable; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.TopTab; +import com.engine.organization.entity.sequence.dto.SequenceDTO; +import com.engine.organization.entity.sequence.param.SequenceSearchParam; +import com.engine.organization.entity.sequence.po.SequencePO; +import com.engine.organization.entity.sequence.vo.SequenceTableVO; +import com.engine.organization.mapper.sequence.SequenceMapper; +import com.engine.organization.mapper.scheme.SchemeMapper; +import com.engine.organization.service.SequenceService; +import com.engine.organization.util.MenuBtn; +import com.engine.organization.util.OrganizationAssert; +import com.engine.organization.util.OrganizationFormItemUtil; +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.*; + + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +public class SequenceServiceImpl extends Service implements SequenceService { + + private SequenceMapper getSequenceMapper() { + return MapperProxyFactory.getProxy(SequenceMapper.class); + } + + private SchemeMapper getSchemeMapper() { + return MapperProxyFactory.getProxy(SchemeMapper.class); + } + + @Override + public Map listPage(Map params) { + OrganizationWeaTable table = new OrganizationWeaTable<>(user, SequenceTableVO.class); + String sqlWhere = buildSqlWhere(params); + table.setSqlwhere(sqlWhere); + WeaResultMsg result = new WeaResultMsg(false); + result.putAll(table.makeDataResult()); + result.success(); + return result.getResultMap(); + } + + + @Override + public int saveSequence(SequenceSearchParam param) { + List list = getSequenceMapper().listByNo(Util.null2String(param.getSequenceNo())); + OrganizationAssert.isEmpty(list, "编号不允许重复"); + SequencePO sequencePO = SequenceDTO.convertParamToPO(param, (long) user.getUID()); + return getSequenceMapper().insertIgnoreNull(sequencePO); + } + + @Override + public int updateSequence(SequenceSearchParam param) { + SequencePO sequencePO = SequenceDTO.convertParamToPO(param, (long) user.getUID()); + return getSequenceMapper().updateSequence(sequencePO); + } + + @Override + public int updateForbiddenTagById(SequenceSearchParam params) { + SequencePO sequencePO = SequencePO.builder().id(params.getId()).forbiddenTag(params.getForbiddenTag() ? 0 : 1).build(); + return getSequenceMapper().updateForbiddenTagById(sequencePO); + } + + @Override + public int deleteByIds(Collection ids) { + OrganizationAssert.notEmpty(ids, "请选择要删除的数据"); + return getSequenceMapper().deleteByIds(ids); + } + + + @Override + public Map getSearchCondition(Map params) { + Map apiDatas = new HashMap<>(); + List addGroups = new ArrayList<>(); + List conditionItems = new ArrayList<>(); + SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 16, 2, false, "等级方案", "161", "schemeId", "schemeBrowser"); + SearchConditionItem sequenceNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "名称", "sequenceName"); + conditionItems.add(browserItem); + conditionItems.add(sequenceNameCondition); + addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems)); + apiDatas.put("conditions", addGroups); + return apiDatas; + } + + + @Override + public Map getSequenceForm(Map params) { + Map apiDatas = new HashMap<>(); + List selectItems = new ArrayList<>(); + List addGroups = new ArrayList<>(); + SearchConditionItem sequenceNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "名称", "sequenceName"); + sequenceNameCondition.setRules("required|string"); + SearchConditionItem sequenceNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "编号", "sequenceNo"); + sequenceNoCondition.setRules("required|string"); + SearchConditionItem descriptionCondition = OrganizationFormItemUtil.textareaItem(user, 2, 17, true, 2, 60, "描述说明", "description"); + SearchConditionItem browserItem = OrganizationFormItemUtil.browserItem(user, 2, 17, 3, false, "等级方案", "161", "schemeId", "schemeBrowser"); + + // 编辑状态下赋值操作 + String id = Util.null2String(params.get("id")); + if (!StringUtil.isEmpty(id)) { + SequencePO sequencePO = getSequenceMapper().getSequenceByID(Integer.parseInt(id)); + OrganizationAssert.notNull(sequencePO, "选择的数据不存在,或数据已删除"); + + sequenceNameCondition.setValue(sequencePO.getSequenceName()); + sequenceNoCondition.setValue(sequencePO.getSequenceNo()); + descriptionCondition.setValue(sequencePO.getDescription()); + browserItem.setValue(sequencePO.getSchemeId()); + + BrowserBean browserBean = browserItem.getBrowserConditionParam(); + List> maps = getSchemeMapper().listSchemesByIds(QueryParam.builder().ids(sequencePO.getSchemeId().toString()).build().getIds()); + + browserBean.setReplaceDatas(maps); + browserItem.setBrowserConditionParam(browserBean); + // 编辑状态下,编号只读 + sequenceNoCondition.setViewAttr(1); + } + + selectItems.add(sequenceNoCondition); + selectItems.add(sequenceNameCondition); + selectItems.add(descriptionCondition); + selectItems.add(browserItem); + addGroups.add(new SearchConditionGroup("基本信息", true, selectItems)); + apiDatas.put("condition", addGroups); + return apiDatas; + } + + @Override + public Map getHasRight() { + return MenuBtn.getCommonBtnDatas(); + } + + @Override + public Map getTabInfo() { + Map apiDatas = new HashMap<>(); + List topTabs = new ArrayList<>(); + topTabs.add(TopTab.builder().color("#000000").groupId("flowAll").showcount(true).title("全部").viewCondition("-1").build()); + topTabs.add(TopTab.builder().color("#ff3232").groupId("enable").showcount(true).title("启用").viewCondition("0").build()); + topTabs.add(TopTab.builder().color("#fea468").groupId("disable").showcount(true).title("禁用").viewCondition("1").build()); + apiDatas.put("topTabs", topTabs); + + HashMap countMap = new HashMap<>(); + countMap.put("flowAll", getSequenceMapper().getCountByTag(-1)); + countMap.put("enable", getSequenceMapper().getCountByTag(0)); + countMap.put("disable", getSequenceMapper().getCountByTag(1)); + + apiDatas.put("topTabCount", countMap); + return apiDatas; + } + + /** + * 查询条件 + * + * @param params + * @return + */ + private String buildSqlWhere(Map params) { + DBType dbType = DBType.get(new RecordSet().getDBType()); + String sqlWhere = " where t.delete_type ='0' "; + String sequenceName = (String) params.get("sequenceName"); + if (StringUtils.isNotBlank(sequenceName)) { + sqlWhere += " AND t.sequence_name " + dbType.like(sequenceName); + } + String schemeId = (String) params.get("schemeId"); + if (StringUtils.isNotBlank(schemeId)) { + sqlWhere += " AND t.scheme_id = '" + schemeId + "'"; + } + String viewCondition = (String) params.get("viewCondition"); + // -1:全部、0:启用、1:禁用 + if (StringUtils.isNotBlank(viewCondition) && !"-1".equalsIgnoreCase(viewCondition)) { + sqlWhere += " AND t.forbidden_tag = '" + viewCondition + "'"; + } + return sqlWhere; + } +} diff --git a/src/com/engine/organization/transmethod/LevelTransMethod.java b/src/com/engine/organization/transmethod/LevelTransMethod.java new file mode 100644 index 00000000..652ea2f2 --- /dev/null +++ b/src/com/engine/organization/transmethod/LevelTransMethod.java @@ -0,0 +1,25 @@ +package com.engine.organization.transmethod; + +import com.engine.organization.entity.QueryParam; +import com.engine.organization.mapper.scheme.LevelMapper; +import com.engine.organization.util.db.MapperProxyFactory; + +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +public class LevelTransMethod { + + public static String getLevelId(String levelId) { + LevelMapper levelMapper = MapperProxyFactory.getProxy(LevelMapper.class); + List> maps = levelMapper.listLevelsByIds(QueryParam.builder().ids(levelId).build().getIds()); + String levelName = maps.stream().map(item -> (String) item.get("name")).collect(Collectors.joining(",")); + return levelName; + } +} diff --git a/src/com/engine/organization/util/MenuBtn.java b/src/com/engine/organization/util/MenuBtn.java new file mode 100644 index 00000000..ac273b73 --- /dev/null +++ b/src/com/engine/organization/util/MenuBtn.java @@ -0,0 +1,99 @@ +package com.engine.organization.util; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; + +/** + * @description: MenuBtn工具类 + * @author:dxfeng + * @createTime: 2022/05/09 + * @version: 1.0 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MenuBtn { + private String isBatch; + private String isTop; + private String menuFun; + private String menuIcon; + private String menuName; + private String type; + + /** + * topMenu新增 + * + * @return + */ + public static MenuBtn topMenu_addNew() { + return MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type("BTN_Addnew").build(); + } + + /** + * topMenu批量删除 + * + * @return + */ + public static MenuBtn topMenu_batchDelete() { + return MenuBtn.builder().isBatch("1").isTop("1").menuFun("batchDelete").menuIcon("icon-coms-Batch-delete").menuName("批量删除").type( "BTN_BatchDelete").build(); + } + + /** + * rightMenu新增 + * + * @return + */ + public static MenuBtn rightMenu_addNew() { + return MenuBtn.builder().isBatch("0").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type("BTN_Addnew").build(); + } + + /** + * rightMenu日志 + * + * @return + */ + public static MenuBtn rightMenu_btnLog() { + return MenuBtn.builder().isBatch("0").isTop("0").menuFun("log").menuIcon("icon-coms-Print-log").menuName("日志").type("BTN_log").build(); + } + + /** + * rightMenu显示列定制 + * + * @return + */ + public static MenuBtn rightMenu_btnColumn() { + return MenuBtn.builder().isBatch("0").isTop("0").menuFun("custom").menuIcon("icon-coms-task-list").menuName("显示列定制").type("BTN_COLUMN").build(); + } + + /** + * 获取常用按钮列表 + * @return + */ + public static Map getCommonBtnDatas() { + Map btnDatas = new HashMap<>(); + ArrayList topMenuList = new ArrayList<>(); + ArrayList rightMenuList = new ArrayList<>(); + // 新建 + topMenuList.add(MenuBtn.topMenu_addNew()); + // 批量删除 + topMenuList.add(MenuBtn.topMenu_batchDelete()); + btnDatas.put("topMenu", topMenuList); + // 新建 + rightMenuList.add(MenuBtn.rightMenu_addNew()); + // 日志 + rightMenuList.add(MenuBtn.rightMenu_btnLog()); + // 显示列定制 + rightMenuList.add(MenuBtn.rightMenu_btnColumn()); + btnDatas.put("rightMenu", rightMenuList); + return btnDatas; + } + + +} diff --git a/src/com/engine/organization/util/OrganizationFormItemUtil.java b/src/com/engine/organization/util/OrganizationFormItemUtil.java new file mode 100644 index 00000000..4e468e57 --- /dev/null +++ b/src/com/engine/organization/util/OrganizationFormItemUtil.java @@ -0,0 +1,263 @@ +package com.engine.organization.util; + +import com.api.browser.bean.BrowserBean; +import com.api.browser.bean.SearchConditionItem; +import com.api.browser.bean.SearchConditionOption; +import com.api.browser.util.ConditionFactory; +import com.api.browser.util.ConditionType; +import weaver.hrm.User; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +public class OrganizationFormItemUtil { + + /** + * 下拉框 + * + * @param user + * @param selectOptions + * @param colSpan + * @param fieldcol + * @param labelcol + * @param isQuickSearch + * @param label + * @return + */ + public static SearchConditionItem selectItem(User user, List selectOptions, int colSpan, int fieldcol, + int labelcol, boolean isQuickSearch, String label, String name) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem select = conditionFactory.createCondition(ConditionType.SELECT, 502327, name); + select.setOptions(selectOptions); + select.setColSpan(colSpan); + select.setFieldcol(fieldcol); + select.setLabelcol(labelcol); + select.setIsQuickSearch(isQuickSearch); + select.setLabel(label); + return select; + } + + + /** + * checkbox + * + * @param user + * @param colSpan + * @param fieldcol + * @param viewAttr + * @param isQuickSearch + * @param label + * @param name + * @return + */ + public static SearchConditionItem checkboxItem(User user, int colSpan, int fieldcol, + int viewAttr, boolean isQuickSearch, String label, String name) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem checkbox = conditionFactory.createCondition(ConditionType.CHECKBOX, 502327, name); + checkbox.setColSpan(colSpan); + checkbox.setFieldcol(fieldcol); + checkbox.setViewAttr(viewAttr); + checkbox.setIsQuickSearch(isQuickSearch); + checkbox.setLabel(label); + return checkbox; + } + + + /** + * 输入框数字 + * + * @param user + * @param colSpan + * @param fieldcol + * @param viewAttr + * @param label + * @return + */ + public static SearchConditionItem inputNumberItem(User user, int colSpan, int fieldcol, + int viewAttr, String label, String name) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem inputnumber = conditionFactory.createCondition(ConditionType.INPUTNUMBER, 502327, name); + inputnumber.setColSpan(colSpan); + inputnumber.setFieldcol(fieldcol); + inputnumber.setViewAttr(viewAttr); + inputnumber.setLabel(label); + return inputnumber; + } + + + /** + * 输入框文本 + * + * @param user + * @param colSpan + * @param fieldcol + * @param viewAttr + * @param length + * @param label + * @return + */ + public static SearchConditionItem inputItem(User user, int colSpan, int fieldcol, + int viewAttr, int length, String label, String name) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem input = conditionFactory.createCondition(ConditionType.INPUT, 25034, name); + input.setColSpan(colSpan); + input.setFieldcol(fieldcol); + input.setViewAttr(viewAttr); + input.setLength(length); + input.setLabel(label); + return input; + } + + + /** + * 浏览按钮 + * + * @param user + * @param colSpan + * @param fieldcol + * @param viewAttr + * @param isQuickSearch + * @param label + * @param type + * @param name + * @param fieldDbType 数据展现集成标识 + * @return + */ + public static SearchConditionItem browserItem(User user, int colSpan, int fieldcol, + int viewAttr, boolean isQuickSearch, String label, String type, String name, String fieldDbType) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem browser = conditionFactory.createCondition(ConditionType.BROWSER, 502327, name, type); + browser.setColSpan(colSpan); + browser.setFieldcol(fieldcol); + browser.setViewAttr(viewAttr); + browser.setIsQuickSearch(isQuickSearch); + browser.setLabel(label); + if ("161".equals(type) || "162".equals(type)) { + fieldDbType = "browser." + fieldDbType; + BrowserBean browserBean = new BrowserBean(); + // completeParams + Map completeMap = new HashMap<>(); + completeMap.put("f_weaver_belongto_usertype", 0); + completeMap.put("type", type); + completeMap.put("fielddbtype", fieldDbType); + browserBean.setCompleteParams(completeMap); + // conditionDataParams + Map conditionDataMap = new HashMap<>(); + conditionDataMap.put("f_weaver_belongto_usertype", 0); + conditionDataMap.put("type", fieldDbType); + conditionDataMap.put("fielddbtype", fieldDbType); + browserBean.setConditionDataParams(conditionDataMap); + // dataParams + Map dataMap = new HashMap<>(); + dataMap.put("f_weaver_belongto_usertype", 0); + dataMap.put("type", fieldDbType); + browserBean.setDataParams(dataMap); + // destDataParams + Map destDataMap = new HashMap<>(); + destDataMap.put("f_weaver_belongto_usertype", 0); + destDataMap.put("type", fieldDbType); + browserBean.setDestDataParams(destDataMap); + + browserBean.setLinkUrl(""); + browserBean.setMobileLinkUrl(""); + browserBean.setPageSize(10); + browserBean.setScrollx(true); + browserBean.setTitle(label); + browserBean.setType(type); + + browser.setBrowserConditionParam(browserBean); + if ("162".equals(type)) { + HashMap otherMap = new HashMap<>(); + otherMap.put("isMultCheckbox", "true"); + otherMap.put("icon", "icon-coms-integration"); + browser.setOtherParams(otherMap); + } + } + return browser; + } + + + /** + * 日期区间 + * + * @param user + * @param colSpan + * @param fieldcol + * @param viewAttr + * @param label + * @return + */ + public static SearchConditionItem rangeDateItem(User user, int colSpan, int fieldcol, int viewAttr + , String label, String name1, String name2) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem rangeDate = conditionFactory.createCondition(ConditionType.TIMEPICKER, 502327, new String[]{name1, name2}); + rangeDate.setColSpan(colSpan); + rangeDate.setFieldcol(fieldcol); + rangeDate.setViewAttr(viewAttr); + rangeDate.setLabel(label); + return rangeDate; + } + + + /** + * 多行文本框 + * + * @param user + * @param colSpan + * @param fieldcol + * @param isQuickSearch + * @param viewAttr + * @param length + * @param label + * @param name + * @return + */ + public static SearchConditionItem textareaItem(User user, int colSpan, int fieldcol, boolean isQuickSearch, + int viewAttr, int length, String label, String name) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem textarea = conditionFactory.createCondition(ConditionType.TEXTAREA, 502227, name); + textarea.setColSpan(colSpan); + textarea.setFieldcol(fieldcol); + textarea.setIsQuickSearch(isQuickSearch); + textarea.setViewAttr(viewAttr); + textarea.setLength(length); + textarea.setLabel(label); + + return textarea; + } + + + /** + * 日期 + * + * @param user + * @param colSpan + * @param fieldcol + * @param isQuickSearch + * @param viewAttr + * @param label + * @param name + * @return + */ + public static SearchConditionItem datePickerItem(User user, int colSpan, int fieldcol, boolean isQuickSearch, + int viewAttr, String label, String name) { + ConditionFactory conditionFactory = new ConditionFactory(user); + SearchConditionItem datePicker = conditionFactory.createCondition(ConditionType.DATEPICKER, 502227, name); + datePicker.setColSpan(colSpan); + datePicker.setFieldcol(fieldcol); + datePicker.setIsQuickSearch(isQuickSearch); + datePicker.setViewAttr(viewAttr); + datePicker.setLabel(label); + return datePicker; + } + + +} diff --git a/src/com/engine/organization/util/ResponseResult.java b/src/com/engine/organization/util/ResponseResult.java new file mode 100644 index 00000000..c5fd845e --- /dev/null +++ b/src/com/engine/organization/util/ResponseResult.java @@ -0,0 +1,180 @@ +package com.engine.organization.util; + + +import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson.serializer.SerializerFeature; +import com.engine.common.service.HrmCommonService; +import com.engine.common.service.impl.HrmCommonServiceImpl; +import com.engine.core.exception.ECException; +import com.engine.organization.exception.OrganizationRunTimeException; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import lombok.extern.slf4j.Slf4j; +import weaver.general.BaseBean; +import weaver.hrm.User; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Supplier; + +@Slf4j +public class ResponseResult { + + private static final long serialVersionUID = 1L; + + private User user; + private boolean permission; + + HrmCommonService hrmCommonService = new HrmCommonServiceImpl(); + + public ResponseResult(User user) { + this.user = user; + } + + private void permission() { + if (permission) { + List roleInfo = hrmCommonService.getRoleInfo(user.getUID()); + roleInfo.stream().map(m -> (Map) m).filter(m -> m.get("roleid") != null && m.get("roleid").toString().equals("28")).findFirst().orElseThrow(() -> new OrganizationRunTimeException("无权限")); + } + } + + /** + * 统一返回方法 + */ + public static String run(Function, Map> f, Map m) { + BaseBean b = new BaseBean(); + try { + b.writeLog(getJsonString(m)); + return Ok(f.apply(m)); + } catch (OrganizationRunTimeException e) { + return Error(e.getMessage()); + } catch (ECException e) { + b.writeLog(e); + Throwable cause = e.getCause(); + return Error(cause.getMessage()); + } catch (Exception e) { + b.writeLog(e); + return Error(e.getMessage()); + } + } + + /** + * 成功返回 + */ + private static String Ok(Map map) { + Map apidatas = new HashMap<>(); + apidatas.put("status", true); + apidatas.put("data", map); + return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect); + } + + /** + * 失败返回 + */ + private static String Error(String message) { + Map apidatas = new HashMap<>(); + apidatas.put("status", false); + apidatas.put("errormsg", message); + return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect); + } + + + /** + * 统一返回方法 + */ + public String run(Function f, T m) { + BaseBean b = new BaseBean(); + try { + permission(); + b.writeLog(getJsonString(m)); + return Ok(f.apply(m)); + } catch (OrganizationRunTimeException e) { + return Error(e.getMessage()); + } catch (ECException e) { + b.writeLog(e); + Throwable cause = e.getCause(); + return Error(cause.getMessage()); + } catch (Exception e) { + b.writeLog(e); + return Error(e.getMessage()); + } + } + + /** + * 统一返回方法(有参无返回) + */ + public String run(Consumer f, T t) { + BaseBean b = new BaseBean(); + try { + permission(); + f.accept(t); + return Ok(); + } catch (OrganizationRunTimeException e) { + return Error(e.getMessage()); + } catch (ECException e) { + b.writeLog(e); + Throwable cause = e.getCause(); + return Error(cause.getMessage()); + } catch (Exception e) { + b.writeLog(e); + return Error(e.getMessage()); + } + } + + + /** + * 统一返回方法(无参有返回) + */ + public String run(Supplier f) { + try { + permission(); + return Ok(f.get()); + } catch (OrganizationRunTimeException e) { + return Error(e.getMessage()); + } catch (ECException e) { + BaseBean b = new BaseBean(); + b.writeLog(e); + Throwable cause = e.getCause(); + return Error(cause.getMessage()); + } catch (Exception e) { + BaseBean b = new BaseBean(); + b.writeLog(e); + return Error(e.getMessage()); + } + } + + /** + * 成功返回 + */ + private String Ok(R r) { + Map apidatas = new HashMap<>(); + apidatas.put("status", true); + apidatas.put("data", r); + return getJsonString(apidatas); +// return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect); + } + + private static String getJsonString(Object apidatas) { + ObjectMapper mapper = new ObjectMapper(); + try { + return mapper.writeValueAsString(apidatas); + } catch (JsonProcessingException e) { + e.printStackTrace(); + } + return ""; + } + + + /** + * 成功返回 + */ + private String Ok() { + Map apidatas = new HashMap<>(); + apidatas.put("status", true); + return JSONObject.toJSONString(apidatas, SerializerFeature.DisableCircularReferenceDetect); + } + +} diff --git a/src/com/engine/organization/util/db/DBOperateAdapter.java b/src/com/engine/organization/util/db/DBOperateAdapter.java new file mode 100644 index 00000000..1307a8d2 --- /dev/null +++ b/src/com/engine/organization/util/db/DBOperateAdapter.java @@ -0,0 +1,5 @@ +package com.engine.organization.util.db; + +public interface DBOperateAdapter { + String like(String some); +} diff --git a/src/com/engine/organization/util/db/DBType.java b/src/com/engine/organization/util/db/DBType.java new file mode 100644 index 00000000..ce55459b --- /dev/null +++ b/src/com/engine/organization/util/db/DBType.java @@ -0,0 +1,42 @@ +package com.engine.organization.util.db; + + +import com.engine.organization.exception.OrganizationRunTimeException; + +public enum DBType implements DBOperateAdapter { + MYSQL("mysql") { + @Override + public String like(String some) { + return "like '%" + some + "%'"; + } + }, + SQLSERVER("sqlserver") { + @Override + public String like(String some) { + return "like '%" + some + "%'"; + } + }, + ORACLE("oracle") { + @Override + public String like(String some) { + return "'%'||" + some + "||'%'"; + } + }; + + private String dbtype; + + DBType(String dbtype) { + this.dbtype = dbtype; + } + + public static DBType get(String dbtype) { + for (DBType t : DBType.values()) { + if (t.dbtype.equalsIgnoreCase(dbtype)) { + return t; + } + } + throw new OrganizationRunTimeException("不支持的数据库类型"); + } + + +} diff --git a/src/com/engine/organization/util/page/Column.java b/src/com/engine/organization/util/page/Column.java new file mode 100644 index 00000000..55a9c583 --- /dev/null +++ b/src/com/engine/organization/util/page/Column.java @@ -0,0 +1,23 @@ +package com.engine.organization.util.page; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class Column { + String title; + String dataIndex; + String key; + boolean display; + + public Column(String title, String dataIndex, String key) { + this.title = title; + this.dataIndex = dataIndex; + this.key = key; + } +} diff --git a/src/com/engine/organization/util/page/DataSource.java b/src/com/engine/organization/util/page/DataSource.java new file mode 100644 index 00000000..423ec238 --- /dev/null +++ b/src/com/engine/organization/util/page/DataSource.java @@ -0,0 +1,9 @@ +package com.engine.organization.util.page; + +import lombok.Data; + +@Data +public class DataSource { + String key; + String title; +} diff --git a/src/com/engine/organization/util/page/PageInfo.java b/src/com/engine/organization/util/page/PageInfo.java new file mode 100644 index 00000000..93e1c5b3 --- /dev/null +++ b/src/com/engine/organization/util/page/PageInfo.java @@ -0,0 +1,61 @@ +package com.engine.organization.util.page; + +import com.engine.organization.annotation.TableTitle; +import lombok.Data; +import lombok.ToString; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.List; + +@Data +@ToString +public class PageInfo extends com.github.pagehelper.PageInfo { + Class clazz; + + public void setColumns(List columns) { + this.columns.addAll(columns); + } + + List columns = new ArrayList<>(); + List dataSource = new ArrayList<>(); + + public PageInfo() { + } + + public PageInfo(Class clazz) { + this.clazz = clazz; + this.columns = buildColumns(); + } + + public PageInfo(List list) { + super(list); + } + + public PageInfo(List list, Class clazz) { + super(list); + this.clazz = clazz; + this.columns = buildColumns(); + } + + + public List buildColumns() { + if(clazz==null){ + return this.columns; + } + Field[] fields = clazz.getDeclaredFields(); + for (Field f : fields) { + boolean isanno = f.isAnnotationPresent(TableTitle.class); + if (isanno) { + TableTitle annotation = f.getAnnotation(TableTitle.class); + String title = annotation.title(); + String dataIndex = annotation.dataIndex(); + String key = annotation.key(); + boolean display = annotation.display(); + Column column = Column.builder().title(title).dataIndex(dataIndex).key(key).display(display).build(); + columns.add(column); + } + } + return columns; + } +} diff --git a/src/com/engine/organization/util/page/PageUtil.java b/src/com/engine/organization/util/page/PageUtil.java new file mode 100644 index 00000000..7a858b00 --- /dev/null +++ b/src/com/engine/organization/util/page/PageUtil.java @@ -0,0 +1,45 @@ +package com.engine.organization.util.page; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import org.apache.commons.collections4.CollectionUtils; + +import java.util.Collections; +import java.util.List; + + +public class PageUtil { + + public static void start(Integer pageNum, Integer pageSize) { + pageNum = pageNum == null || pageNum <= 0 ? 1 : pageNum; + pageSize = pageSize == null || pageSize <= 0 ? 10 : pageSize; + PageHelper.startPage(pageNum, pageSize); + } + + + public static Page buildPage(Integer pageNo, Integer pageSize) { + pageNo = pageNo == null || pageNo <= 0 ? 1 : pageNo; + pageSize = pageSize == null || pageSize <= 0 ? 10 : pageSize; + return new Page(pageNo, pageSize, true); + } + + /** + * 分页 + * + * @param pageNo 页码(从1开始) + * @param pageSize 每页条数 + * @param source 待分页的数据 + * @param 范型制定类 + * @return + */ + public static List subList(int pageNo, int pageSize, List source) { + if (CollectionUtils.isEmpty(source)) { + return Collections.emptyList(); + } + int endIndex = pageNo * pageSize; + int startIndex = (pageNo - 1) * pageSize; + startIndex = startIndex < 0 ? 0 : startIndex; + return source.subList(startIndex > source.size() ? source.size() : startIndex, + endIndex > source.size() ? source.size() : endIndex); + } +} diff --git a/src/com/engine/organization/web/CompController.java b/src/com/engine/organization/web/CompController.java new file mode 100644 index 00000000..5635f0cc --- /dev/null +++ b/src/com/engine/organization/web/CompController.java @@ -0,0 +1,48 @@ +package com.engine.organization.web; + +import com.engine.common.util.ServiceUtil; +import com.engine.organization.common.BaseQueryParam; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.CompWrapper; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public class CompController { + public CompWrapper getCompWrapper(User user) { + return ServiceUtil.getService(CompWrapper.class, user); + } + + /** + * 获取list列表 + * + * @param request + * @param response + * @return + */ + @POST + @Path("/listComp") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult listComp(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody BaseQueryParam queryParam) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getCompWrapper(user).listPage(queryParam)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } +} diff --git a/src/com/engine/organization/web/GradeController.java b/src/com/engine/organization/web/GradeController.java new file mode 100644 index 00000000..e4d429e7 --- /dev/null +++ b/src/com/engine/organization/web/GradeController.java @@ -0,0 +1,205 @@ +package com.engine.organization.web; + +import com.engine.common.util.ParamUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.scheme.param.GradeSearchParam; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.GradeWrapper; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +public class GradeController { + public GradeWrapper getGradeWrapper(User user) { + return ServiceUtil.getService(GradeWrapper.class, user); + } + + /** + * 获取list列表 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getGradeTable") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult listGrade(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getGradeWrapper(user).listPage(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 添加职级 + * + * @param request + * @param response + * @return + */ + @POST + @Path("/saveGrade") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult saveGrade(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody GradeSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGradeWrapper(user).saveGrade(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新职级,修改所有字段 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateGrade") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateGrade(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody GradeSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGradeWrapper(user).updateGrade(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新禁用标记 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateForbiddenTagById") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody GradeSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGradeWrapper(user).updateForbiddenTagById(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 根据ID批量删除数据 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/deleteByIds") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGradeWrapper(user).deleteByIds(param.getIds())); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 高级搜索条件 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getSearchCondition") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getGradeWrapper(user).getSearchCondition(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 新增、编辑表单 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getGradeForm") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getGradeForm(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getGradeWrapper(user).getGradeForm(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 列表页顶部按钮 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getHasRight") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGradeWrapper(user).getHasRight()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + @GET + @Path("/getTabInfo") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getTabInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGradeWrapper(user).getTabInfo()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } +} diff --git a/src/com/engine/organization/web/GroupController.java b/src/com/engine/organization/web/GroupController.java new file mode 100644 index 00000000..8a4abdf4 --- /dev/null +++ b/src/com/engine/organization/web/GroupController.java @@ -0,0 +1,80 @@ +package com.engine.organization.web; + +import com.engine.common.util.ParamUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.GroupWrapper; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public class GroupController { + public GroupWrapper getGroupWrapper(User user) { + return ServiceUtil.getService(GroupWrapper.class, user); + } + + /** + * 新增、编辑表单 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getGroupFormField") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getGroupFormField(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getGroupWrapper(user).getGroupFormField(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 列表页顶部按钮 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getHasRight") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGroupWrapper(user).getHasRight()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + @GET + @Path("/getTabInfo") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getTabInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getGroupWrapper(user).getTabInfo()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } +} diff --git a/src/com/engine/organization/web/LevelController.java b/src/com/engine/organization/web/LevelController.java new file mode 100644 index 00000000..48b6aad3 --- /dev/null +++ b/src/com/engine/organization/web/LevelController.java @@ -0,0 +1,205 @@ +package com.engine.organization.web; + +import com.engine.common.util.ParamUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.scheme.param.LevelSearchParam; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.LevelWrapper; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/10 + * @version: 1.0 + */ +public class LevelController { + public LevelWrapper getLevelWrapper(User user) { + return ServiceUtil.getService(LevelWrapper.class, user); + } + + /** + * 获取list列表 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getLevelTable") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult listLevel(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getLevelWrapper(user).listPage(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 添加职等 + * + * @param request + * @param response + * @return + */ + @POST + @Path("/saveLevel") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult saveLevel(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LevelSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getLevelWrapper(user).saveLevel(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新职等,修改所有字段 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateLevel") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateLevel(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LevelSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getLevelWrapper(user).updateLevel(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新禁用标记 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateForbiddenTagById") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody LevelSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getLevelWrapper(user).updateForbiddenTagById(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 根据ID批量删除数据 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/deleteByIds") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getLevelWrapper(user).deleteByIds(param.getIds())); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 高级搜索条件 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getSearchCondition") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getLevelWrapper(user).getSearchCondition(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 新增、编辑表单 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getLevelForm") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getLevelForm(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getLevelWrapper(user).getLevelForm(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 列表页顶部按钮 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getTableBtn") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getTableBtn(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getLevelWrapper(user).getTableBtn()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + @GET + @Path("/getTabInfo") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getTabInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getLevelWrapper(user).getTabInfo()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } +} diff --git a/src/com/engine/organization/web/PostController.java b/src/com/engine/organization/web/PostController.java new file mode 100644 index 00000000..7e13fc8c --- /dev/null +++ b/src/com/engine/organization/web/PostController.java @@ -0,0 +1,135 @@ +package com.engine.organization.web; + +import com.engine.common.util.ParamUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.post.po.PostPO; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.PostWrapper; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostController { + public PostWrapper getPostWrapper(User user) { + return ServiceUtil.getService(PostWrapper.class, user); + } + + + /** + * 添加职务分类 + * + * @param request + * @param response + * @param postPO + * @return + */ + @POST + @Path("/savePost") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult savePost(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PostPO postPO) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostWrapper(user).savePost(postPO)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新职务分类,修改所有字段 + * + * @param request + * @param response + * @param postPO + * @return + */ + @POST + @Path("/updatePost") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updatePost(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PostPO postPO) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostWrapper(user).updatePost(postPO)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 根据ID批量删除数据 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/deleteByIds") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostWrapper(user).deleteByIds(param.getIds())); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 新增、编辑表单 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getPostForm") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getPostForm(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getPostWrapper(user).getPostForm(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 获取左侧树 + * @param request + * @param response + * @return + */ + @GET + @Path("/getTreeData") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getTreeData(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostWrapper(user).getTreeData()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + +} diff --git a/src/com/engine/organization/web/PostInfoController.java b/src/com/engine/organization/web/PostInfoController.java new file mode 100644 index 00000000..8fefbcb6 --- /dev/null +++ b/src/com/engine/organization/web/PostInfoController.java @@ -0,0 +1,194 @@ +package com.engine.organization.web; + +import com.engine.common.util.ParamUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.post.param.PostInfoSearchParam; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.PostInfoWrapper; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostInfoController { + public PostInfoWrapper getPostInfoWrapper(User user) { + return ServiceUtil.getService(PostInfoWrapper.class, user); + } + + /** + * 获取list列表 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getPostInfoTable") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult listPostInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getPostInfoWrapper(user).listPage(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 添加职务信息 + * + * @param request + * @param response + * @return + */ + @POST + @Path("/savePostInfo") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult savePostInfo(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PostInfoSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostInfoWrapper(user).savePostInfo(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新职务信息,修改所有字段 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updatePostInfo") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updatePostInfo(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PostInfoSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostInfoWrapper(user).updatePostInfo(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新禁用标记 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateForbiddenTagById") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody PostInfoSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostInfoWrapper(user).updateForbiddenTagById(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 根据ID批量删除数据 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/deleteByIds") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostInfoWrapper(user).deleteByIds(param.getIds())); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 高级搜索条件 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getSearchCondition") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getPostInfoWrapper(user).getSearchCondition(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 新增、编辑表单 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getPostInfoForm") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getPostInfoForm(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getPostInfoWrapper(user).getPostInfoForm(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 列表页顶部按钮 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getHasRight") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getPostInfoWrapper(user).getHasRight()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + +} diff --git a/src/com/engine/organization/web/SchemeController.java b/src/com/engine/organization/web/SchemeController.java new file mode 100644 index 00000000..e461a51a --- /dev/null +++ b/src/com/engine/organization/web/SchemeController.java @@ -0,0 +1,181 @@ +package com.engine.organization.web; + +import com.engine.common.util.ParamUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.scheme.param.SchemeSearchParam; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.SchemeWrapper; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.Map; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +public class SchemeController { + + public SchemeWrapper getSchemeWrapper(User user) { + return ServiceUtil.getService(SchemeWrapper.class, user); + } + + + /** + * 获取list列表 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getTable") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult listScheme(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getSchemeWrapper(user).listPage(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 添加职等职级信息 + * + * @param request + * @param response + * @return + */ + @POST + @Path("/save") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult saveScheme(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + Map save = getSchemeWrapper(user).save(param); + return ReturnResult.successed(save); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 修改等级方案,修改所有字段 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateScheme") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateScheme(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + Map update = getSchemeWrapper(user).updateScheme(param); + return ReturnResult.successed(update); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 更新禁用标记 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateForbiddenTagById") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SchemeSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + getSchemeWrapper(user).updateForbiddenTagById(param); + return ReturnResult.successed(); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 根据ID批量删除数据 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/deleteByIds") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + getSchemeWrapper(user).deleteByIds(param.getIds()); + return ReturnResult.successed(); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + @GET + @Path("/getSearchCondition") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getSchemeWrapper(user).getSearchCondition(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + @GET + @Path("/getSchemeForm") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getSchemeForm(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getSchemeWrapper(user).getSchemeForm(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + @GET + @Path("/getTableBtn") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getTableBtn(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getSchemeWrapper(user).getTableBtn()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + +} diff --git a/src/com/engine/organization/web/SequenceController.java b/src/com/engine/organization/web/SequenceController.java new file mode 100644 index 00000000..faf2b8b0 --- /dev/null +++ b/src/com/engine/organization/web/SequenceController.java @@ -0,0 +1,205 @@ +package com.engine.organization.web; + +import com.engine.common.util.ParamUtil; +import com.engine.common.util.ServiceUtil; +import com.engine.organization.entity.QueryParam; +import com.engine.organization.entity.sequence.param.SequenceSearchParam; +import com.engine.organization.util.response.ReturnResult; +import com.engine.organization.wrapper.SequenceWrapper; +import io.swagger.v3.oas.annotations.parameters.RequestBody; +import weaver.hrm.HrmUserVarify; +import weaver.hrm.User; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +public class SequenceController { + public SequenceWrapper getSequenceWrapper(User user) { + return ServiceUtil.getService(SequenceWrapper.class, user); + } + + /** + * 获取list列表 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getSequenceTable") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult listSequence(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getSequenceWrapper(user).listPage(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 添加岗位 + * + * @param request + * @param response + * @return + */ + @POST + @Path("/saveSequence") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult saveSequence(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SequenceSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getSequenceWrapper(user).saveSequence(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新岗位,修改所有字段 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateSequence") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateSequence(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SequenceSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getSequenceWrapper(user).updateSequence(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 更新禁用标记 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/updateForbiddenTagById") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult updateForbiddenTagById(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SequenceSearchParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getSequenceWrapper(user).updateForbiddenTagById(param)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 根据ID批量删除数据 + * + * @param request + * @param response + * @param param + * @return + */ + @POST + @Path("/deleteByIds") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult deleteByIds(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody QueryParam param) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getSequenceWrapper(user).deleteByIds(param.getIds())); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 高级搜索条件 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getSearchCondition") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getSearchCondition(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getSequenceWrapper(user).getSearchCondition(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + + /** + * 新增、编辑表单 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getSequenceForm") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getSequenceForm(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + Map map = ParamUtil.request2Map(request); + return ReturnResult.successed(getSequenceWrapper(user).getSequenceForm(map)); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + /** + * 列表页顶部按钮 + * + * @param request + * @param response + * @return + */ + @GET + @Path("/getHasRight") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getHasRight(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getSequenceWrapper(user).getHasRight()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } + + @GET + @Path("/getTabInfo") + @Produces(MediaType.APPLICATION_JSON) + public ReturnResult getTabInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) { + try { + User user = HrmUserVarify.getUser(request, response); + return ReturnResult.successed(getSequenceWrapper(user).getTabInfo()); + } catch (Exception e) { + return ReturnResult.exceptionHandle(e.getMessage()); + } + } +} diff --git a/src/com/engine/organization/wrapper/CompWrapper.java b/src/com/engine/organization/wrapper/CompWrapper.java new file mode 100644 index 00000000..77dda5da --- /dev/null +++ b/src/com/engine/organization/wrapper/CompWrapper.java @@ -0,0 +1,32 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.common.BaseQueryParam; +import com.engine.organization.service.CompService; +import com.engine.organization.service.impl.CompServiceImpl; +import weaver.hrm.User; + +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public class CompWrapper extends Service { + private CompService getCompService(User user) { + return ServiceUtil.getService(CompServiceImpl.class, user); + } + + /** + * 列表 + * + * @param params + * @return + */ + public Map listPage(BaseQueryParam params) { + return getCompService(user).listPage(params); + } +} diff --git a/src/com/engine/organization/wrapper/GradeWrapper.java b/src/com/engine/organization/wrapper/GradeWrapper.java new file mode 100644 index 00000000..0afffe26 --- /dev/null +++ b/src/com/engine/organization/wrapper/GradeWrapper.java @@ -0,0 +1,111 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.entity.scheme.param.GradeSearchParam; +import com.engine.organization.service.GradeService; +import com.engine.organization.service.impl.GradeServiceImpl; +import org.apache.ibatis.annotations.Param; +import weaver.hrm.User; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/11 + * @version: 1.0 + */ +public class GradeWrapper extends Service { + private GradeService getGradeService(User user) { + return ServiceUtil.getService(GradeServiceImpl.class, user); + } + + /** + * 职级列表 + * + * @param params + * @return + */ + public Map listPage(Map params) { + return getGradeService(user).listPage(params); + } + + /** + * 新增职级 + * + * @param param + * @return + */ + public int saveGrade(GradeSearchParam param) { + return getGradeService(user).saveGrade(param); + } + + /** + * 更新职级 + * + * @param param + * @return + */ + public int updateGrade(GradeSearchParam param) { + return getGradeService(user).updateGrade(param); + } + + /** + * 更新禁用标记 + * + * @param params + */ + public int updateForbiddenTagById(GradeSearchParam params) { + return getGradeService(user).updateForbiddenTagById(params); + } + + /** + * 根据ID批量删除 + * + * @param ids + */ + public int deleteByIds(@Param("ids") Collection ids) { + return getGradeService(user).deleteByIds(ids); + } + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + public Map getSearchCondition(Map params) { + return getGradeService(user).getSearchCondition(params); + } + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + public Map getGradeForm(Map params) { + return getGradeService(user).getGradeForm(params); + } + + /** + * 获取列表页面按钮信息 + * + * @return + */ + public Map getHasRight() { + return getGradeService(user).getHasRight(); + } + + /** + * 获取列表tabs + * + * @return + */ + public Map getTabInfo() { + return getGradeService(user).getTabInfo(); + } +} diff --git a/src/com/engine/organization/wrapper/GroupWrapper.java b/src/com/engine/organization/wrapper/GroupWrapper.java new file mode 100644 index 00000000..2c9bd5c0 --- /dev/null +++ b/src/com/engine/organization/wrapper/GroupWrapper.java @@ -0,0 +1,50 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.service.GroupService; +import com.engine.organization.service.impl.GroupServiceImpl; +import weaver.hrm.User; + +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/16 + * @version: 1.0 + */ +public class GroupWrapper extends Service { + private GroupService getGroupService(User user) { + return ServiceUtil.getService(GroupServiceImpl.class, user); + } + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + public Map getGroupFormField(Map params) { + return getGroupService(user).getGroupFormField(params); + } + + /** + * 获取列表页面按钮信息 + * + * @return + */ + public Map getHasRight() { + return getGroupService(user).getHasRight(); + } + + /** + * 获取列表tabs + * + * @return + */ + public Map getTabInfo() { + return getGroupService(user).getTabInfo(); + } +} diff --git a/src/com/engine/organization/wrapper/LevelWrapper.java b/src/com/engine/organization/wrapper/LevelWrapper.java new file mode 100644 index 00000000..bfe46899 --- /dev/null +++ b/src/com/engine/organization/wrapper/LevelWrapper.java @@ -0,0 +1,111 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.entity.scheme.param.LevelSearchParam; +import com.engine.organization.service.LevelService; +import com.engine.organization.service.impl.LevelServiceImpl; +import org.apache.ibatis.annotations.Param; +import weaver.hrm.User; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/10 + * @version: 1.0 + */ +public class LevelWrapper extends Service { + private LevelService getLevelService(User user) { + return ServiceUtil.getService(LevelServiceImpl.class, user); + } + + /** + * 职等列表 + * + * @param params + * @return + */ + public Map listPage(Map params) { + return getLevelService(user).listPage(params); + } + + /** + * 新增职等 + * + * @param param + * @return + */ + public int saveLevel(LevelSearchParam param) { + return getLevelService(user).saveLevel(param); + } + + /** + * 更新职等 + * + * @param param + * @return + */ + public int updateLevel(LevelSearchParam param) { + return getLevelService(user).updateLevel(param); + } + + /** + * 更新禁用标记 + * + * @param params + */ + public int updateForbiddenTagById(LevelSearchParam params) { + return getLevelService(user).updateForbiddenTagById(params); + } + + /** + * 根据ID批量删除 + * + * @param ids + */ + public int deleteByIds(@Param("ids") Collection ids) { + return getLevelService(user).deleteByIds(ids); + } + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + public Map getSearchCondition(Map params) { + return getLevelService(user).getSearchCondition(params); + } + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + public Map getLevelForm(Map params) { + return getLevelService(user).getLevelForm(params); + } + + /** + * 获取列表页面按钮信息 + * + * @return + */ + public Map getTableBtn() { + return getLevelService(user).getTableBtn(); + } + + /** + * 获取列表tabs + * + * @return + */ + public Map getTabInfo() { + return getLevelService(user).getTabInfo(); + } +} diff --git a/src/com/engine/organization/wrapper/PostInfoWrapper.java b/src/com/engine/organization/wrapper/PostInfoWrapper.java new file mode 100644 index 00000000..8a7f4e25 --- /dev/null +++ b/src/com/engine/organization/wrapper/PostInfoWrapper.java @@ -0,0 +1,103 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.entity.post.param.PostInfoSearchParam; +import com.engine.organization.service.PostInfoService; +import com.engine.organization.service.impl.PostInfoServiceImpl; +import org.apache.ibatis.annotations.Param; +import weaver.hrm.User; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostInfoWrapper extends Service { + private PostInfoService getPostInfoService(User user) { + return ServiceUtil.getService(PostInfoServiceImpl.class, user); + } + + /** + * 职务信息列表 + * + * @param params + * @return + */ + public Map listPage(Map params) { + return getPostInfoService(user).listPage(params); + } + + /** + * 新增职务信息 + * + * @param param + * @return + */ + public int savePostInfo(PostInfoSearchParam param) { + return getPostInfoService(user).savePostInfo(param); + } + + /** + * 更新职务信息 + * + * @param param + * @return + */ + public int updatePostInfo(PostInfoSearchParam param) { + return getPostInfoService(user).updatePostInfo(param); + } + + /** + * 更新禁用标记 + * + * @param params + */ + public int updateForbiddenTagById(PostInfoSearchParam params) { + return getPostInfoService(user).updateForbiddenTagById(params); + } + + /** + * 根据ID批量删除 + * + * @param ids + */ + public int deleteByIds(@Param("ids") Collection ids) { + return getPostInfoService(user).deleteByIds(ids); + } + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + public Map getSearchCondition(Map params) { + return getPostInfoService(user).getSearchCondition(params); + } + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + public Map getPostInfoForm(Map params) { + return getPostInfoService(user).getPostInfoForm(params); + } + + /** + * 获取列表页面按钮信息 + * + * @return + */ + public Map getHasRight() { + return getPostInfoService(user).getHasRight(); + } + +} diff --git a/src/com/engine/organization/wrapper/PostWrapper.java b/src/com/engine/organization/wrapper/PostWrapper.java new file mode 100644 index 00000000..b978fb1f --- /dev/null +++ b/src/com/engine/organization/wrapper/PostWrapper.java @@ -0,0 +1,73 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.entity.TreeData; +import com.engine.organization.entity.post.po.PostPO; +import com.engine.organization.service.PostService; +import com.engine.organization.service.impl.PostServiceImpl; +import org.apache.ibatis.annotations.Param; +import weaver.hrm.User; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/13 + * @version: 1.0 + */ +public class PostWrapper extends Service { + private PostService getPostService(User user) { + return ServiceUtil.getService(PostServiceImpl.class, user); + } + + /** + * 新增职务分类 + * + * @param postPO + * @return + */ + public int savePost(PostPO postPO) { + return getPostService(user).savePost(postPO); + } + + /** + * 更新职务分类 + * + * @param postPO + * @return + */ + public int updatePost(PostPO postPO) { + return getPostService(user).updatePost(postPO); + } + + /** + * 根据ID批量删除 + * + * @param ids + */ + public int deleteByIds(@Param("ids") Collection ids) { + return getPostService(user).deleteByIds(ids); + } + + /** + * 获取新增表单 + * + * @param params + * @return + */ + public Map getPostForm(Map params) { + return getPostService(user).getPostForm(params); + } + + /** + * 获取左侧树 + * @return + */ + public TreeData getTreeData() { + return getPostService(user).getTreeData(); + } + +} diff --git a/src/com/engine/organization/wrapper/SchemeWrapper.java b/src/com/engine/organization/wrapper/SchemeWrapper.java new file mode 100644 index 00000000..1e3c0388 --- /dev/null +++ b/src/com/engine/organization/wrapper/SchemeWrapper.java @@ -0,0 +1,101 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.entity.scheme.param.SchemeSearchParam; +import com.engine.organization.service.SchemeService; +import com.engine.organization.service.impl.SchemeServiceImpl; +import org.apache.ibatis.annotations.Param; +import weaver.hrm.User; + +import java.util.Collection; +import java.util.Map; + +/** + * @Author dxfeng + * @Description: TODO + * @Date 2022/5/9 + * @Version V1.0 + **/ +public class SchemeWrapper extends Service { + + private SchemeService getSchemeService(User user) { + return ServiceUtil.getService(SchemeServiceImpl.class, user); + } + + /** + * 等级方案列表 + * + * @param params + * @return + */ + public Map listPage(Map params) { + return getSchemeService(user).listPage(params); + } + + /** + * 新增等级方案 + * + * @param param + * @return + */ + public Map save(SchemeSearchParam param) { + return getSchemeService(user).save(param); + } + + /** + * 更新等级方案信息 + * + * @param param + * @return + */ + public Map updateScheme(SchemeSearchParam param) { + return getSchemeService(user).updateScheme(param); + } + + /** + * 更新禁用标记 + * + * @param params + */ + public void updateForbiddenTagById(SchemeSearchParam params) { + getSchemeService(user).updateForbiddenTagById(params); + } + + /** + * 根据ID批量删除等级方案信息 + * + * @param ids + */ + public void deleteByIds(@Param("ids") Collection ids) { + getSchemeService(user).deleteByIds(ids); + } + + + /** + * 获取搜索条件 + * @param params + * @return + */ + public Map getSearchCondition(Map params) { + return getSchemeService(user).getSearchCondition(params); + } + + + /** + * 获取新增表单 + * @param params + * @return + */ + public Map getSchemeForm(Map params) { + return getSchemeService(user).getSchemeForm(params); + } + + /** + * 获取列表页面按钮信息 + * @return + */ + public Map getTableBtn() { + return getSchemeService(user).getTableBtn(); + } +} diff --git a/src/com/engine/organization/wrapper/SequenceWrapper.java b/src/com/engine/organization/wrapper/SequenceWrapper.java new file mode 100644 index 00000000..26990dc4 --- /dev/null +++ b/src/com/engine/organization/wrapper/SequenceWrapper.java @@ -0,0 +1,111 @@ +package com.engine.organization.wrapper; + +import com.engine.common.util.ServiceUtil; +import com.engine.core.impl.Service; +import com.engine.organization.entity.sequence.param.SequenceSearchParam; +import com.engine.organization.service.SequenceService; +import com.engine.organization.service.impl.SequenceServiceImpl; +import org.apache.ibatis.annotations.Param; +import weaver.hrm.User; + +import java.util.Collection; +import java.util.Map; + +/** + * @description: TODO + * @author:dxfeng + * @createTime: 2022/05/12 + * @version: 1.0 + */ +public class SequenceWrapper extends Service { + private SequenceService getSequenceService(User user) { + return ServiceUtil.getService(SequenceServiceImpl.class, user); + } + + /** + * 岗位列表 + * + * @param params + * @return + */ + public Map listPage(Map params) { + return getSequenceService(user).listPage(params); + } + + /** + * 新增岗位 + * + * @param param + * @return + */ + public int saveSequence(SequenceSearchParam param) { + return getSequenceService(user).saveSequence(param); + } + + /** + * 更新岗位 + * + * @param param + * @return + */ + public int updateSequence(SequenceSearchParam param) { + return getSequenceService(user).updateSequence(param); + } + + /** + * 更新禁用标记 + * + * @param params + */ + public int updateForbiddenTagById(SequenceSearchParam params) { + return getSequenceService(user).updateForbiddenTagById(params); + } + + /** + * 根据ID批量删除 + * + * @param ids + */ + public int deleteByIds(@Param("ids") Collection ids) { + return getSequenceService(user).deleteByIds(ids); + } + + /** + * 获取搜索条件 + * + * @param params + * @return + */ + public Map getSearchCondition(Map params) { + return getSequenceService(user).getSearchCondition(params); + } + + + /** + * 获取新增表单 + * + * @param params + * @return + */ + public Map getSequenceForm(Map params) { + return getSequenceService(user).getSequenceForm(params); + } + + /** + * 获取列表页面按钮信息 + * + * @return + */ + public Map getHasRight() { + return getSequenceService(user).getHasRight(); + } + + /** + * 获取列表tabs + * + * @return + */ + public Map getTabInfo() { + return getSequenceService(user).getTabInfo(); + } +}