Merge remote-tracking branch 'remotes/origin/release/2.9.2.2307.02' into feature/salary_i18

# Conflicts:
#	src/com/engine/salary/biz/SIAccountBiz.java
#	src/com/engine/salary/biz/SICategoryBiz.java
#	src/com/engine/salary/entity/salaryBill/param/SalaryBaseSetSaveParam.java
#	src/com/engine/salary/entity/salaryBill/param/SalaryTemplateSaveParam.java
#	src/com/engine/salary/entity/salaryarchive/bo/SalaryArchiveExcelBO.java
#	src/com/engine/salary/enums/salaryarchive/SalaryArchiveListTypeEnum.java
#	src/com/engine/salary/service/impl/SIAccountServiceImpl.java
#	src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java
#	src/com/engine/salary/service/impl/SalaryArchiveExcelServiceImpl.java
#	src/com/engine/salary/service/impl/SalaryArchiveItemServiceImpl.java
#	src/com/engine/salary/service/impl/SalaryArchiveServiceImpl.java
#	src/com/engine/salary/service/impl/SalarySendServiceImpl.java
#	src/com/engine/salary/service/impl/SalarySobRangeServiceImpl.java
#	src/com/engine/salary/web/SalaryArchiveController.java
#	src/com/engine/salary/wrapper/SalaryArchiveItemWrapper.java
#	src/com/engine/salary/wrapper/SalaryArchiveWrapper.java
This commit is contained in:
sy 2023-07-28 11:13:09 +08:00
commit 438b86e2e1
188 changed files with 6645 additions and 686 deletions

View File

@ -0,0 +1,6 @@
select max(id) FROM hrsa_salary_archive where tax_agent_id = 35 and delete_type = 0 GROUP BY employee_id HAVING COUNT(employee_id)>1;
update hrsa_salary_archive set delete_type =3 where tax_agent_id = 35 and delete_type = 0
and id in (select max(id) FROM hrsa_salary_archive where tax_agent_id = 35 and delete_type = 0 GROUP BY employee_id HAVING COUNT(employee_id)>1);

138
resource/sql/还原.sql Normal file
View File

@ -0,0 +1,138 @@
delete from hrsa_acct_result_temp where 1=1
;
delete from hrsa_add_up_deduction where 1=1
;
delete from hrsa_add_up_situation where 1=1
;
delete from hrsa_attend_quote where 1=1
;
delete from hrsa_attend_quote_data where 1=1
;
delete from hrsa_attend_quote_data_value where 1=1
;
delete from hrsa_attend_quote_field where 1=1
;
delete from hrsa_attend_quote_sync_set where 1=1
;
delete from hrsa_scheme_detail where 1=1
;
delete from hrsa_social_archives where 1=1
;
delete from hrsa_fund_archives where 1=1
;
delete from hrsa_other_archives where 1=1
;
delete from hrsa_bill_batch where 1=1
;
delete from hrsa_bill_detail where 1=1
;
delete from hrsa_bill_detail_temp where 1=1
;
delete from hrsa_bill_inspect where 1=1
;
delete from hrsa_check_result where 1=1
;
delete from hrsa_check_result_record where 1=1
;
delete from hrsa_ck_result_detail_temp where 1=1
;
delete from hrsa_excel_acct_result where 1=1
;
delete from hrsa_other_deduction where 1=1
;
delete from hrsa_salary_acct_emp where 1=1
;
delete from hrsa_salary_acct_record where 1=1
;
delete from hrsa_salary_acct_result where 1=1
;
delete from hrsa_salary_archive where 1=1
;
delete from hrsa_salary_archive_dimission where 1=1
;
delete from hrsa_salary_archive_item where 1=1
;
delete from hrsa_salary_archive_tax_agent where 1=1
;
delete from hrsa_salary_item where 1=1
;
delete from hrsa_salary_send where 1=1
;
delete from hrsa_salary_send_info where 1=1
;
delete from hrsa_salary_sob where 1=1
;
delete from hrsa_salary_sob_adjust_rule where 1=1
;
delete from hrsa_salary_sob_emp_field where 1=1
;
delete from hrsa_salary_sob_item where 1=1
;
delete from hrsa_salary_sob_item_group where 1=1
;
delete from hrsa_salary_sob_range where 1=1
;
delete from hrsa_salary_template where 1=1
;
delete from hrsa_social_security_scheme where 1=1
;
delete from hrsa_sys_tax_rate_base where 1=1
;
delete from hrsa_sys_tax_rate_detail where 1=1
;
delete from hrsa_tax_agent where 1=1
;
delete from hrsa_tax_agent_emp where 1=1
;
delete from hrsa_tax_agent_emp_change where 1=1
;
delete from hrsa_tax_agent_admin where 1=1
;
delete from hrsa_tax_agent_manage_range where 1=1
;
delete from hrsa_tax_agent_sub_admin where 1=1
;
delete from hrsa_tax_agent_sub_admin_emp where 1=1
;
delete from hrsa_tax_declaration where 1=1
;
delete from hrsa_tax_declaration_detail where 1=1
;
delete from hrsa_tax_rate_base where 1=1
;
delete from hrsa_tax_rate_detail where 1=1
;
delete from hrsa_salary_acct_result_report where 1=1
;
delete from hrsa_insurance_base_info where 1=1
;
delete from hrsa_salary_sob_back_item where 1=1
;
delete from hrsa_salary_send_range where 1=1
;
delete from hrsa_salary_send_range_obj where 1=1
;
delete from hrsa_compensation_log where 1=1
;
delete from hrsa_compensation_config where 1=1
;
delete from hrsa_special_add_deduction where 1=1
;

View File

@ -0,0 +1,23 @@
delete from HtmlLabelIndex where id = 541290 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 541290,'非系统人员管理' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 541290 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系统人员管理' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'Non-system personnel management' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系統人員管理' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/

View File

@ -0,0 +1,14 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
call LMConfig_U_ByInfoInsert (2,100118,9);
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,74 @@
ALTER TABLE hrsa_tax_agent_emp ADD employee_type number;
/
ALTER TABLE hrsa_salary_archive ADD employee_type number;
/
ALTER TABLE hrsa_tax_agent_emp_change ADD employee_type number;
/
ALTER TABLE hrsa_salary_acct_emp ADD employee_type number;
/
ALTER TABLE hrsa_salary_send_info ADD employee_type number;
/
CREATE TABLE hrsa_external_employee
(
id NUMBER(38,0) primary key NOT NULL,
username varchar2(200) DEFAULT '',
department_name varchar2(200) DEFAULT '',
department_id NUMBER(38,0) DEFAULT 0,
subcompany_name varchar2(200) DEFAULT '',
subcompany_id NUMBER(38,0) DEFAULT 0,
jobtitle_name varchar2(200) DEFAULT '',
jobtitle_id NUMBER(38,0) DEFAULT 0,
companystartdate varchar2(200) DEFAULT '',
mobile varchar2(20) DEFAULT '',
status varchar2(10) DEFAULT '',
workcode varchar2(200) DEFAULT '',
sex varchar2(10) DEFAULT '',
email varchar2(200) DEFAULT '',
telephone varchar2(200) DEFAULT '',
jobcall varchar2(200) DEFAULT '',
birthday varchar2(200) DEFAULT '',
id_no varchar2(200) DEFAULT '',
bank_card_num varchar2(200) DEFAULT '',
bank_name varchar2(200) DEFAULT '',
delete_type number DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
modifier NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
tenant_key varchar2(200) DEFAULT ''
);
/
CREATE TABLE hrsa_salary_sob_ext_range
(
id NUMBER(38,0) primary key NOT NULL,
salary_sob_id NUMBER(38,0) DEFAULT 0,
target_type NUMBER(38,0) DEFAULT 0,
target_id NUMBER(38,0) DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
delete_type number DEFAULT 0,
tenant_key varchar2(200) DEFAULT ''
);
/
CREATE TABLE hrsa_tax_agent_ext_range
(
id NUMBER(38,0) primary key NOT NULL,
tax_agent_id NUMBER(38,0) DEFAULT 0,
target_type NUMBER(38,0) DEFAULT 0,
target_id NUMBER(38,0) DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
delete_type number DEFAULT 0,
tenant_key varchar2(200) DEFAULT ''
);
/

View File

@ -0,0 +1,24 @@
alter table hrsa_salary_send_info
add bill_read_status NUMBER null;
/
alter table hrsa_salary_send_info
add bill_confirm_status NUMBER null;
/
alter table hrsa_salary_send_info
add send_employee_id NUMBER(38,0) NULL;
/
alter table hrsa_salary_template
add ack_feedback_status NUMBER NULL;
/
alter table hrsa_salary_template
add auto_ack_days NUMBER NULL;
/
alter table hrsa_salary_template
add feedback_url VARCHAR2(500) NULL;
/

View File

@ -0,0 +1,4 @@
alter table hrsa_salary_item
add hide_default NUMBER null;
/

View File

@ -0,0 +1,14 @@
declare
datashowset_id NUMBER;
hrmjobgroups_id NUMBER;
begin
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('salaryExtEmp', '1', '1', '', 'SELECT * FROM hrsa_external_employee where delete_type=0', '', '', '', '', '1','id', '', '', '', '', '', '', 2, '薪酬非系统人员', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '1', 0, 1);
SELECT max(id) INTO datashowset_id FROM DATASHOWSET;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('salaryExtEmp', '0', 0, TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (datashowset_id, '姓名', 'username', '', 1, 1, SYS_GUID(), NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (datashowset_id, '手机号', 'mobile', '', 0, 2, SYS_GUID(), NULL);
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (datashowset_id, '姓名', 'username', '2', '', 1, SYS_GUID(), '');
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (datashowset_id, '手机号', 'mobile', '2', '', 2, SYS_GUID(), '');
end;
/

View File

@ -0,0 +1,23 @@
delete from HtmlLabelIndex where id = 541290 and ( trim(indexdesc) is null ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 541290,'非系统人员管理' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 541290 and ( trim(indexdesc) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系统人员管理' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'Non-system personnel management' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( trim(labelname) is null ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系統人員管理' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1 ;
/

View File

@ -0,0 +1,14 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
call LMConfig_U_ByInfoInsert (2,100118,9);
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,74 @@
ALTER TABLE hrsa_tax_agent_emp ADD employee_type number;
/
ALTER TABLE hrsa_salary_archive ADD employee_type number;
/
ALTER TABLE hrsa_tax_agent_emp_change ADD employee_type number;
/
ALTER TABLE hrsa_salary_acct_emp ADD employee_type number;
/
ALTER TABLE hrsa_salary_send_info ADD employee_type number;
/
CREATE TABLE hrsa_external_employee
(
id NUMBER(38,0) primary key NOT NULL,
username varchar2(200) DEFAULT '',
department_name varchar2(200) DEFAULT '',
department_id NUMBER(38,0) DEFAULT 0,
subcompany_name varchar2(200) DEFAULT '',
subcompany_id NUMBER(38,0) DEFAULT 0,
jobtitle_name varchar2(200) DEFAULT '',
jobtitle_id NUMBER(38,0) DEFAULT 0,
companystartdate varchar2(200) DEFAULT '',
mobile varchar2(20) DEFAULT '',
status varchar2(10) DEFAULT '',
workcode varchar2(200) DEFAULT '',
sex varchar2(10) DEFAULT '',
email varchar2(200) DEFAULT '',
telephone varchar2(200) DEFAULT '',
jobcall varchar2(200) DEFAULT '',
birthday varchar2(200) DEFAULT '',
id_no varchar2(200) DEFAULT '',
bank_card_num varchar2(200) DEFAULT '',
bank_name varchar2(200) DEFAULT '',
delete_type number DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
modifier NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
tenant_key varchar2(200) DEFAULT ''
);
/
CREATE TABLE hrsa_salary_sob_ext_range
(
id NUMBER(38,0) primary key NOT NULL,
salary_sob_id NUMBER(38,0) DEFAULT 0,
target_type NUMBER(38,0) DEFAULT 0,
target_id NUMBER(38,0) DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
delete_type number DEFAULT 0,
tenant_key varchar2(200) DEFAULT ''
);
/
CREATE TABLE hrsa_tax_agent_ext_range
(
id NUMBER(38,0) primary key NOT NULL,
tax_agent_id NUMBER(38,0) DEFAULT 0,
target_type NUMBER(38,0) DEFAULT 0,
target_id NUMBER(38,0) DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
delete_type number DEFAULT 0,
tenant_key varchar2(200) DEFAULT ''
);
/

View File

@ -0,0 +1,24 @@
alter table hrsa_salary_send_info
add bill_read_status NUMBER null;
/
alter table hrsa_salary_send_info
add bill_confirm_status NUMBER null;
/
alter table hrsa_salary_send_info
add send_employee_id NUMBER(38,0) NULL;
/
alter table hrsa_salary_template
add ack_feedback_status NUMBER NULL;
/
alter table hrsa_salary_template
add auto_ack_days NUMBER NULL;
/
alter table hrsa_salary_template
add feedback_url VARCHAR2(500) NULL;
/

View File

@ -0,0 +1,4 @@
alter table hrsa_salary_item
add hide_default NUMBER null;
/

View File

@ -0,0 +1,14 @@
declare
datashowset_id NUMBER;
hrmjobgroups_id NUMBER;
begin
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('salaryExtEmp', '1', '1', '', 'SELECT * FROM hrsa_external_employee where delete_type=0', '', '', '', '', '1','id', '', '', '', '', '', '', 2, '薪酬非系统人员', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '1', 0, 1);
SELECT max(id) INTO datashowset_id FROM DATASHOWSET;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('salaryExtEmp', '0', 0, TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (datashowset_id, '姓名', 'username', '', 1, 1, SYS_GUID(), NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (datashowset_id, '手机号', 'mobile', '', 0, 2, SYS_GUID(), NULL);
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (datashowset_id, '姓名', 'username', '2', '', 1, SYS_GUID(), '');
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (datashowset_id, '手机号', 'mobile', '2', '', 2, SYS_GUID(), '');
end;
/

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 541290 and ( indexdesc is null or indexdesc = '' )
;
insert into HtmlLabelIndex(id,indexdesc) select 541290,'非系统人员管理' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 541290 and ( indexdesc is not null and indexdesc <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系统人员管理' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1
;
delete from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=char_length(labelname) )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'Non-system personnel management' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=char_length(labelname) )) limit 1
;
delete from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( labelname is null or labelname = '' )
;
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系統人員管理' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1
;

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100186
;
Delete from LeftMenuConfig where infoid=100186
;
call LMConfig_U_ByInfoInsert (2,100118,9)
;
call LMInfo_Insert (100186,541290,'','',2,100118,9,18)
;
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186
;

View File

@ -0,0 +1,78 @@
ALTER TABLE hrsa_tax_agent_emp
ADD COLUMN employee_type int(0) NULL ;
ALTER TABLE hrsa_salary_archive
ADD COLUMN employee_type int(0) NULL ;
ALTER TABLE hrsa_tax_agent_emp_change
ADD COLUMN employee_type int(0) NULL ;
ALTER TABLE hrsa_salary_acct_emp
ADD COLUMN employee_type int(0) NULL ;
ALTER TABLE hrsa_salary_send_info ADD COLUMN employee_type int(0) ;
CREATE TABLE hrsa_external_employee
(
id bigint(0) NOT NULL,
username varchar(255) NULL DEFAULT NULL COMMENT '姓名',
department_name varchar(255) NULL DEFAULT NULL COMMENT '部门',
department_id bigint(0) NULL DEFAULT NULL COMMENT '部门ID',
subcompany_name varchar(255) NULL DEFAULT NULL COMMENT '分部',
subcompany_id bigint(0) NULL DEFAULT NULL COMMENT '分部ID',
jobtitle_name varchar(255) NULL DEFAULT NULL COMMENT '岗位',
jobtitle_id bigint(0) NULL DEFAULT NULL COMMENT '岗位ID',
companystartdate varchar(255) NULL DEFAULT NULL COMMENT '入职日期',
mobile varchar(255) NULL DEFAULT NULL COMMENT '手机',
status varchar(255) NULL DEFAULT NULL COMMENT '状态编码',
workcode varchar(255) NULL DEFAULT NULL COMMENT '工号',
sex varchar(255) NULL DEFAULT NULL COMMENT '性别',
email varchar(255) NULL DEFAULT NULL COMMENT '邮件',
telephone varchar(255) NULL DEFAULT NULL COMMENT '电话',
jobcall varchar(255) NULL DEFAULT NULL COMMENT '职称',
birthday varchar(255) NULL DEFAULT NULL COMMENT '出生日期',
id_no varchar(255) NULL DEFAULT NULL COMMENT '身份证号码',
bank_card_num varchar(255) NULL DEFAULT NULL COMMENT '本人开户的银行卡卡号',
bank_name varchar(255) NULL DEFAULT NULL COMMENT '本人开户的银行卡开户支行全称',
delete_type int(0) NULL DEFAULT NULL COMMENT '是否已删除。0未删除、1已删除',
creator bigint(0) NULL DEFAULT NULL COMMENT '创建人',
modifier bigint(0) NULL DEFAULT NULL COMMENT '修改人',
create_time datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
update_time datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
tenant_key varchar(255) NULL DEFAULT NULL COMMENT '租户ID',
PRIMARY KEY (id) USING BTREE
);
CREATE TABLE hrsa_salary_sob_ext_range
(
id bigint(0) NOT NULL COMMENT '主键id',
salary_sob_id bigint(0) NOT NULL DEFAULT 0 COMMENT '账套id',
target_type tinyint(0) NOT NULL DEFAULT 1 COMMENT '对象类型。1外部人员',
target_id bigint(0) NOT NULL DEFAULT 0 COMMENT '对象id',
creator bigint(0) NOT NULL DEFAULT 0 COMMENT '创建人',
create_time datetime(0) NOT NULL COMMENT '创建时间',
update_time datetime(0) NOT NULL COMMENT '更新时间',
delete_type int(0) NOT NULL DEFAULT 0 COMMENT '是否已删除。0未删除、1已删除',
tenant_key varchar(10) NOT NULL DEFAULT '' COMMENT '租户ID',
PRIMARY KEY (id) USING BTREE,
INDEX idx_tenant(tenant_key) USING BTREE,
INDEX idx_tenant_key(tenant_key) USING BTREE
);
CREATE TABLE hrsa_tax_agent_ext_range
(
id bigint(0) NOT NULL COMMENT '主键id',
tax_agent_id bigint(0) NOT NULL DEFAULT 0 COMMENT '个税扣缴义务人的id',
target_type tinyint(0) NOT NULL DEFAULT 1 COMMENT '对象类型。1外部人员',
target_id bigint(0) NOT NULL DEFAULT 0 COMMENT '对象id',
creator bigint(0) NOT NULL DEFAULT 0 COMMENT '创建人',
create_time datetime(0) NOT NULL COMMENT '创建时间',
update_time datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP (0) COMMENT '更新时间',
delete_type int(0) NOT NULL DEFAULT 0 COMMENT '是否已删除。0未删除、1已删除',
tenant_key varchar(10) NOT NULL DEFAULT '' COMMENT '租户ID',
PRIMARY KEY (id) USING BTREE,
INDEX idx_tenant(tenant_key) USING BTREE,
INDEX idx_tenant_key(tenant_key) USING BTREE
);

View File

@ -0,0 +1,9 @@
ALTER TABLE hrsa_salary_send_info
ADD COLUMN bill_read_status int NULL,
ADD COLUMN bill_confirm_status int NULL,
ADD COLUMN send_employee_id BIGINT NULL;
ALTER TABLE hrsa_salary_template
ADD COLUMN ack_feedback_status int NULL,
ADD COLUMN auto_ack_days int NULL,
ADD COLUMN feedback_url varchar(500) NULL;

View File

@ -0,0 +1,2 @@
ALTER TABLE hrsa_salary_item
ADD COLUMN hide_default int NULL;

View File

@ -0,0 +1,17 @@
select @current_date:= date_format( now(),'%Y-%m-%d');
select @current_time:= date_format( now(),'%T');
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA,SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL,BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER,WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME,onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl,isPhyPage, subcompanyid, unconditionalQuery) VALUES ('salaryExtEmp', '1', '1', '', 'SELECT * FROM hrsa_external_employee where delete_type=0', '', '', '', '', '1','id', '', '', '', '', '', '', 2, '薪酬非系统人员', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date,@current_time, NULL, NULL, '', '', '0', uuid(), '', '', '', '', '1', 0, 1);
select @datashowset_id:= max(id)from datashowset;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime)
VALUES ('salaryExtEmp', '0', 0, @current_date, @current_time, NULL, NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width)
VALUES (@datashowset_id, '姓名', 'username', '', 1, 1, uuid(), NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width)
VALUES (@datashowset_id, '手机号', 'mobile', '', 0, 2, uuid(), NULL);
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield)
VALUES (@datashowset_id, '姓名', 'username', '2', '', 1, uuid(), '');
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield)
VALUES (@datashowset_id, '手机号', 'mobile', '2', '', 2, uuid(), '');

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 541290 and ( trim(indexdesc) is null )
/
insert into HtmlLabelIndex(id,indexdesc) select 541290,'非系统人员管理' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 541290 and ( trim(indexdesc) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系统人员管理' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( trim(labelname) is not null )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( trim(labelname) is null or length(labelname)!=lengthb(labelname) )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'Non-system personnel management' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( trim(labelname) is not null and length(labelname)=lengthb(labelname) )) and rownum = 1
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( trim(labelname) is null )
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系統人員管理' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( trim(labelname) is not null )) and rownum = 1
/

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100186
/
Delete from LeftMenuConfig where infoid=100186
/
call LMConfig_U_ByInfoInsert (2,100118,9)
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18)
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186
/

View File

@ -0,0 +1,74 @@
ALTER TABLE hrsa_tax_agent_emp ADD employee_type number
/
ALTER TABLE hrsa_salary_archive ADD employee_type number
/
ALTER TABLE hrsa_tax_agent_emp_change ADD employee_type number
/
ALTER TABLE hrsa_salary_acct_emp ADD employee_type number
/
ALTER TABLE hrsa_salary_send_info ADD employee_type number
/
CREATE TABLE hrsa_external_employee
(
id NUMBER(38,0) primary key NOT NULL,
username varchar2(200) DEFAULT '',
department_name varchar2(200) DEFAULT '',
department_id NUMBER(38,0) DEFAULT 0,
subcompany_name varchar2(200) DEFAULT '',
subcompany_id NUMBER(38,0) DEFAULT 0,
jobtitle_name varchar2(200) DEFAULT '',
jobtitle_id NUMBER(38,0) DEFAULT 0,
companystartdate varchar2(200) DEFAULT '',
mobile varchar2(20) DEFAULT '',
status varchar2(10) DEFAULT '',
workcode varchar2(200) DEFAULT '',
sex varchar2(10) DEFAULT '',
email varchar2(200) DEFAULT '',
telephone varchar2(200) DEFAULT '',
jobcall varchar2(200) DEFAULT '',
birthday varchar2(200) DEFAULT '',
id_no varchar2(200) DEFAULT '',
bank_card_num varchar2(200) DEFAULT '',
bank_name varchar2(200) DEFAULT '',
delete_type number DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
modifier NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
tenant_key varchar2(200) DEFAULT ''
)
/
CREATE TABLE hrsa_salary_sob_ext_range
(
id NUMBER(38,0) primary key NOT NULL,
salary_sob_id NUMBER(38,0) DEFAULT 0,
target_type NUMBER(38,0) DEFAULT 0,
target_id NUMBER(38,0) DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
delete_type number DEFAULT 0,
tenant_key varchar2(200) DEFAULT ''
)
/
CREATE TABLE hrsa_tax_agent_ext_range
(
id NUMBER(38,0) primary key NOT NULL,
tax_agent_id NUMBER(38,0) DEFAULT 0,
target_type NUMBER(38,0) DEFAULT 0,
target_id NUMBER(38,0) DEFAULT 0,
creator NUMBER(38,0) DEFAULT 0,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
delete_type number DEFAULT 0,
tenant_key varchar2(200) DEFAULT ''
)
/

View File

@ -0,0 +1,23 @@
alter table hrsa_salary_send_info
add bill_read_status NUMBER null
/
alter table hrsa_salary_send_info
add bill_confirm_status NUMBER null
/
alter table hrsa_salary_send_info
add send_employee_id NUMBER(38,0) NULL
/
alter table hrsa_salary_template
add ack_feedback_status NUMBER NULL
/
alter table hrsa_salary_template
add auto_ack_days NUMBER NULL
/
alter table hrsa_salary_template
add feedback_url VARCHAR2(500) NULL
/

View File

@ -0,0 +1,3 @@
alter table hrsa_salary_item
add hide_default NUMBER null
/

View File

@ -0,0 +1,13 @@
declare
datashowset_id NUMBER;
hrmjobgroups_id NUMBER;
begin
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('salaryExtEmp', '1', '1', '', 'SELECT * FROM hrsa_external_employee where delete_type=0', '', '', '', '', '1','id', '', '', '', '', '', '', 2, '薪酬非系统人员', NULL, '', NULL, NULL, NULL, NULL, '', '', TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL, '', '', '0', SYS_GUID(), '', '', '', '', '1', 0, 1);
SELECT max(id) INTO datashowset_id FROM DATASHOWSET;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('salaryExtEmp', '0', 0, TO_CHAR(SYSDATE,'yyyy-MM-dd'), TO_CHAR(SYSDATE,'HH24:mm:ss'), NULL, NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (datashowset_id, '姓名', 'username', '', 1, 1, SYS_GUID(), NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (datashowset_id, '手机号', 'mobile', '', 0, 2, SYS_GUID(), NULL);
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (datashowset_id, '姓名', 'username', '2', '', 1, SYS_GUID(), '');
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (datashowset_id, '手机号', 'mobile', '2', '', 2, SYS_GUID(), '');
end;
/

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 541290 and ( indexdesc is null or indexdesc = '' ) ;
/
insert into HtmlLabelIndex(id,indexdesc) select 541290,'非系统人员管理' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 541290 and ( indexdesc is not null and indexdesc <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系统人员管理' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( labelname is not null and labelname <> '' )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( labelname is null or labelname = '' or length(labelname)!=octet_length(labelname) ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'Non-system personnel management' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( labelname is not null and labelname <> '' and length(labelname)=octet_length(labelname) )) limit 1 ;
/
delete from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( labelname is null or labelname = '' ) ;
/
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select 541290 as indexid ,'非系統人員管理' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( labelname is not null and labelname <> '' )) limit 1 ;
/

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100186;
/
Delete from LeftMenuConfig where infoid=100186;
/
call LMConfig_U_ByInfoInsert (2,100118,9);
/
call LMInfo_Insert (100186,541290,'','',2,100118,9,18);
/
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186;
/

View File

@ -0,0 +1,74 @@
ALTER TABLE hrsa_tax_agent_emp
ADD COLUMN employee_type int NULL ;
ALTER TABLE hrsa_salary_archive
ADD COLUMN employee_type int NULL ;
ALTER TABLE hrsa_tax_agent_emp_change
ADD COLUMN employee_type int NULL ;
ALTER TABLE hrsa_salary_acct_emp
ADD COLUMN employee_type int NULL ;
ALTER TABLE hrsa_salary_send_info ADD COLUMN employee_type int ;
CREATE TABLE hrsa_external_employee
(
id bigint NOT NULL,
username varchar(255) NULL DEFAULT NULL ,
department_name varchar(255) NULL DEFAULT NULL,
department_id bigint NULL DEFAULT NULL ,
subcompany_name varchar(255) NULL DEFAULT NULL ,
subcompany_id bigint NULL DEFAULT NULL ,
jobtitle_name varchar(255) NULL DEFAULT NULL ,
jobtitle_id bigint NULL DEFAULT NULL ,
companystartdate varchar(255) NULL DEFAULT NULL ,
mobile varchar(255) NULL DEFAULT NULL ,
status varchar(255) NULL DEFAULT NULL ,
workcode varchar(255) NULL DEFAULT NULL ,
sex varchar(255) NULL DEFAULT NULL ,
email varchar(255) NULL DEFAULT NULL ,
telephone varchar(255) NULL DEFAULT NULL ,
jobcall varchar(255) NULL DEFAULT NULL ,
birthday varchar(255) NULL DEFAULT NULL ,
id_no varchar(255) NULL DEFAULT NULL ,
bank_card_num varchar(255) NULL DEFAULT NULL ,
bank_name varchar(255) NULL DEFAULT NULL ,
delete_type int NULL DEFAULT NULL ,
creator bigint NULL DEFAULT NULL ,
modifier bigint NULL DEFAULT NULL ,
create_time timestamp NULL DEFAULT NULL ,
update_time timestamp NULL DEFAULT NULL ,
tenant_key varchar(255) NULL DEFAULT NULL ,
PRIMARY KEY (id)
);
CREATE TABLE hrsa_salary_sob_ext_range
(
id bigint NOT NULL ,
salary_sob_id bigint NOT NULL DEFAULT 0 ,
target_type smallint NOT NULL DEFAULT 1 ,
target_id bigint NOT NULL DEFAULT 0 ,
creator bigint NOT NULL DEFAULT 0 ,
create_time timestamp ,
update_time timestamp,
delete_type int NOT NULL DEFAULT 0 ,
tenant_key varchar(10) NOT NULL DEFAULT '',
PRIMARY KEY (id)
);
CREATE TABLE hrsa_tax_agent_ext_range
(
id bigint NOT NULL ,
tax_agent_id bigint NOT NULL DEFAULT 0 ,
target_type smallint NOT NULL DEFAULT 1 ,
target_id bigint NOT NULL DEFAULT 0 ,
creator bigint NOT NULL DEFAULT 0 ,
create_time timestamp ,
update_time timestamp ,
delete_type int NOT NULL DEFAULT 0 ,
tenant_key varchar(10) NOT NULL DEFAULT '' ,
PRIMARY KEY (id)
);

View File

@ -0,0 +1,9 @@
ALTER TABLE hrsa_salary_send_info
ADD COLUMN bill_read_status int NULL,
ADD COLUMN bill_confirm_status int NULL,
ADD COLUMN send_employee_id BIGINT NULL;
ALTER TABLE hrsa_salary_template
ADD COLUMN ack_feedback_status int NULL,
ADD COLUMN auto_ack_days int NULL,
ADD COLUMN feedback_url varchar(500) NULL;

View File

@ -0,0 +1,2 @@
ALTER TABLE hrsa_salary_item
ADD COLUMN hide_default int NULL;

View File

@ -0,0 +1,17 @@
select @current_date:= date_format( now(),'%Y-%m-%d');
select @current_time:= date_format( now(),'%T');
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA,SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL,BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER,WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME,onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl,isPhyPage, subcompanyid, unconditionalQuery) VALUES ('salaryExtEmp', '1', '1', '', 'SELECT * FROM hrsa_external_employee where delete_type=0', '', '', '', '', '1','id', '', '', '', '', '', '', 2, '薪酬非系统人员', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date,@current_time, NULL, NULL, '', '', '0', uuid(), '', '', '', '', '1', 0, 1);
select @datashowset_id:= max(id)from datashowset;
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime)
VALUES ('salaryExtEmp', '0', 0, @current_date, @current_time, NULL, NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width)
VALUES (@datashowset_id, '姓名', 'username', '', 1, 1, uuid(), NULL);
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width)
VALUES (@datashowset_id, '手机号', 'mobile', '', 0, 2, uuid(), NULL);
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield)
VALUES (@datashowset_id, '姓名', 'username', '2', '', 1, uuid(), '');
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield)
VALUES (@datashowset_id, '手机号', 'mobile', '2', '', 2, uuid(), '');

View File

@ -0,0 +1,16 @@
delete from HtmlLabelIndex where id = 541290 and ( indexdesc is null or indexdesc = '' )
GO
insert into HtmlLabelIndex(id,indexdesc) select top 1 541290,'非系统人员管理' from HtmlLabelIndex where not exists (select id from HtmlLabelIndex where id = 541290 and ( indexdesc is not null and indexdesc <> '' ))
GO
delete from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 541290 as indexid ,'非系统人员管理' as content,7 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=7 and ( labelname is not null and labelname <> '' ))
GO
delete from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( labelname is null or labelname = '' or labelname like '%[吖-座]%' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 541290 as indexid ,'Non-system personnel management' as content,8 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=8 and ( labelname is not null and labelname <> '' and labelname not like '%[吖-座]%' ))
GO
delete from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( labelname is null or labelname = '' )
GO
insert into HtmlLabelInfo(indexid,labelname,languageid) select * from (select top 1 541290 as indexid ,'非系統人員管理' as content,9 as languageid from HtmlLabelInfo) t where not exists (select indexid,languageid from HtmlLabelInfo where indexid = 541290 and languageid=9 and ( labelname is not null and labelname <> '' ))
GO

View File

@ -0,0 +1,10 @@
Delete from LeftMenuInfo where id=100186
GO
Delete from LeftMenuConfig where infoid=100186
GO
EXECUTE LMConfig_U_ByInfoInsert 2,100118,9
GO
EXECUTE LMInfo_Insert 100186,541290,'','',2,100118,9,18
GO
update LeftMenuInfo set mobxrouteurl = '',iconClassName = '',fullrouteurl='/spa/hrmSalary/static/index.html#/main/hrmSalary/externalPersonManage' where id = 100186
GO

View File

@ -0,0 +1,79 @@
ALTER TABLE hrsa_tax_agent_emp ADD employee_type int NULL
GO
ALTER TABLE hrsa_salary_archive ADD employee_type int NULL
GO
ALTER TABLE hrsa_tax_agent_emp_change ADD employee_type int NULL
GO
ALTER TABLE hrsa_salary_acct_emp ADD employee_type int NULL
GO
ALTER TABLE hrsa_salary_send_info ADD employee_type int NULL
GO
CREATE TABLE hrsa_external_employee
(
id bigint NOT NULL,
username varchar(255) ,
department_name varchar(255) ,
department_id bigint ,
subcompany_name varchar(255) ,
subcompany_id bigint ,
jobtitle_name varchar(255) ,
jobtitle_id bigint ,
companystartdate varchar(255) ,
mobile varchar(255) ,
status varchar(255) ,
workcode varchar(255) ,
sex varchar(255) ,
email varchar(255) ,
telephone varchar(255) ,
jobcall varchar(255) ,
birthday varchar(255) ,
id_no varchar(255) ,
bank_card_num varchar(255) ,
bank_name varchar(255) ,
delete_type int ,
creator bigint ,
modifier bigint ,
create_time datetime ,
update_time datetime ,
tenant_key varchar(255) ,
PRIMARY KEY (id)
)
GO
CREATE TABLE hrsa_salary_sob_ext_range
(
id bigint NOT NULL ,
salary_sob_id bigint ,
target_type tinyint ,
target_id bigint ,
creator bigint ,
create_time datetime ,
update_time datetime ,
delete_type int ,
tenant_key varchar(10) ,
PRIMARY KEY (id)
)
GO
CREATE TABLE hrsa_tax_agent_ext_range
(
id bigint NOT NULL ,
tax_agent_id bigint ,
target_type tinyint ,
target_id bigint ,
creator bigint ,
create_time datetime,
update_time datetime,
delete_type int ,
tenant_key varchar(10) ,
PRIMARY KEY (id)
)
GO

View File

@ -0,0 +1,11 @@
ALTER TABLE hrsa_salary_send_info
ADD bill_read_status int NULL,
bill_confirm_status int NULL,
send_employee_id BIGINT NULL
GO
ALTER TABLE hrsa_salary_template
ADD ack_feedback_status int NULL,
auto_ack_days int NULL,
feedback_url varchar(500) NULL
GO

View File

@ -0,0 +1,3 @@
ALTER TABLE hrsa_salary_item
ADD hide_default int NULL
GO

View File

@ -0,0 +1,17 @@
declare @datashowset_id int
declare @current_date varchar(100)
declare @current_time varchar(100)
set @current_date = (select CONVERT(varchar(100), GETDATE(), 23))
set @current_time = (select CONVERT(varchar(100), GETDATE(), 24))
INSERT INTO datashowset(SHOWNAME, SHOWCLASS, DATAFROM, DATASOURCEID, SQLTEXT, WSURL, WSOPERATION, XMLTEXT, INPARA, SHOWTYPE, KEYFIELD, PARENTFIELD, SHOWFIELD, DETAILPAGEURL, TYPENAME, SELECTTYPE, SHOWPAGEURL, BROWSERFROM, NAME, CUSTOMID, CUSTOMHREF, SQLTEXT1, SQLTEXT2, NAMEHEADER, DESCRIPTIONHEADER, WSWORKNAME, SEARCHBYID, CREATEDATE, CREATETIME, MODIFYDATE, MODIFYTIME, SEARCHBYNAME, onlylowestnode, characterset, uuid, isSupportPaging, ESBID, ESBSHOWID, mobiledetailpageurl, isPhyPage, subcompanyid, unconditionalQuery) VALUES ('salaryExtEmp', '1', '1', '', 'SELECT * FROM hrsa_external_employee where delete_type=0', '', '', '', '', '1', 'id', '', '', '', '', '', '', 2, '非系统人员', NULL, '', NULL, NULL, NULL, NULL, '', '', @current_date, @current_time, NULL, NULL, '', '', '0',newid(), '', '', '', '', '1', 0, 1)
set @datashowset_id = (select max(id) from datashowset)
INSERT INTO datashowcacheset(showname, subcompanyid, isopencache, Createdate, createtime, Updatedate, Updatetime) VALUES ('salaryExtEmp', '0', 0, @current_date, @current_time, NULL, NULL)
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (@datashowset_id, '姓名', 'username', '', 1, 1, newid(), NULL)
INSERT INTO datashowparam(MAINID, FIELDNAME, SEARCHNAME, TRANSQL, ISSHOWNAME, dsporder, uuid, width) VALUES (@datashowset_id, '手机号', 'mobile', '', 0, 2, newid(), NULL)
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (@datashowset_id, '姓名', 'username', '2', '', 1, newid(), '')
INSERT INTO datasearchparam(MAINID, FIELDNAME, SEARCHNAME, FIELDTYPE, WOKFLOWFIELDNAME, dsporder, uuid, isshowfield) VALUES (@datashowset_id, '手机号', 'mobile', '2', '', 2, newid(), '')
GO

View File

@ -0,0 +1,8 @@
package com.api.salary.web;
import javax.ws.rs.Path;
@Path("/bs/hrmsalary/extEmp")
public class ExtEmpController extends com.engine.salary.web.ExtEmpController{
}

View File

@ -0,0 +1,64 @@
package com.engine.salary.action;
import com.engine.common.util.ServiceUtil;
import com.engine.salary.service.SalaryAcctRecordService;
import com.engine.salary.service.impl.SalaryAcctRecordServiceImpl;
import com.engine.salary.util.SalaryI18nUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import weaver.general.Util;
import weaver.hrm.User;
import weaver.interfaces.workflow.action.Action;
import weaver.soa.workflow.request.Property;
import weaver.soa.workflow.request.RequestInfo;
import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @Author: sy
* @Description: 通过薪资核算id归档台账记录
* @Date: 2023/7/18
**/
@Slf4j
public class SalaryAcctFileByIdAction implements Action {
private SalaryAcctRecordService getSalaryAcctRecordService(User user) {
return ServiceUtil.getService(SalaryAcctRecordServiceImpl.class, user);
}
private String acctRecordId;
public String getAcctRecordId() {
return acctRecordId;
}
public void setAcctRecordId(String acctRecordId) {
this.acctRecordId = acctRecordId;
}
@Override
public String execute(RequestInfo requestInfo) {
User user = requestInfo.getRequestManager().getUser();
Property[] properties = requestInfo.getMainTableInfo().getProperty();
Map<String, String> fieldMap = Arrays.stream(properties).collect(Collectors.toMap(Property::getName,
property -> Util.null2String(property.getValue())));
Long salaryAcctId = StringUtils.isNotBlank(fieldMap.get(acctRecordId)) ? Long.parseLong(fieldMap.get(acctRecordId)) : 0L;
if (!salaryAcctId.equals(0L)) {
try {
getSalaryAcctRecordService(user).file(salaryAcctId);
} catch (Exception e) {
log.error("薪资核算归档异常", e);
requestInfo.getRequestManager().setMessage(e.getMessage());
return FAILURE_AND_CONTINUE;
}
} else {
requestInfo.getRequestManager().setMessage(SalaryI18nUtil.getI18nLabel(542300, "薪资核算记录不存在或已被删除"));
return FAILURE_AND_CONTINUE;
}
return SUCCESS;
}
}

View File

@ -80,24 +80,6 @@ public class EmployBiz extends BaseBean {
}
}
public List<DataCollectionEmployee> getAdminEmployeeByIds(List<Long> list) {
if (CollectionUtils.isEmpty(list)) {
return new ArrayList<>();
}
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
EmployMapper mapper = sqlSession.getMapper(EmployMapper.class);
List<DataCollectionEmployee> employeeList = Lists.newArrayList();
List<List<Long>> partition = Lists.partition(list, 1000);
for (List<Long> longs : partition) {
employeeList.addAll(mapper.getAdminEmployeeByIds(longs));
}
return employeeList;
} finally {
sqlSession.close();
}
}
/**
* 岗位信息

View File

@ -9,7 +9,6 @@ import com.engine.salary.cache.SalaryCacheKey;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.salary.encrypt.AESEncryptUtil;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.progress.ProgressDTO;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
import com.engine.salary.entity.siaccount.dto.SIAccountUtilDTO;
@ -22,7 +21,6 @@ import com.engine.salary.entity.taxagent.po.TaxAgentPO;
import com.engine.salary.enums.siaccount.*;
import com.engine.salary.enums.sicategory.*;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.datacollection.EmployMapper;
import com.engine.salary.mapper.siaccount.*;
import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper;
import com.engine.salary.mapper.sicategory.ICategoryMapper;
@ -59,6 +57,7 @@ import org.springframework.beans.BeanUtils;
import weaver.hrm.User;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -120,6 +119,11 @@ public class SIAccountBiz extends Service {
return (ProgressService) ServiceUtil.getService(ProgressServiceImpl.class, user);
}
private SalaryEmployeeService getSalaryEmployeeService(User user) {
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
private SIAccountDetailTempMapper getSIAccountDetailTempMapper() {
return MapperProxyFactory.getProxy(SIAccountDetailTempMapper.class);
}
@ -128,10 +132,6 @@ public class SIAccountBiz extends Service {
return MapperProxyFactory.getProxy(InsuranceSchemeDetailMapper.class);
}
private EmployMapper getEmployMapper() {
return MapperProxyFactory.getProxy(EmployMapper.class);
}
private ICategoryMapper getICategoryMapper() {
return MapperProxyFactory.getProxy(ICategoryMapper.class);
}
@ -1154,7 +1154,6 @@ public class SIAccountBiz extends Service {
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, param.getPaymentOrganization());
encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class, user);
DataCollectionEmployee simpleEmployee = getEmployMapper().getEmployeeById(employeeId);
insuranceAccountBatchPO.setAccountant(currentUserName);
insuranceAccountBatchPO.setUpdateTime(new Date());
insuranceAccountBatchPO.setSocialPay(socialSum.toPlainString());
@ -1197,6 +1196,14 @@ public class SIAccountBiz extends Service {
InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), param.getPaymentOrganization());
encryptUtil.decrypt(insuranceAccountBatchPO, InsuranceAccountBatchPO.class, user);
SalaryAssert.notNull(insuranceAccountBatchPO, SalaryI18nUtil.getI18nLabel(user.getLanguage(),389204, "参数错误"));
// if (insuranceAccountBatchPO.getBillStatus().equals(BillStatusEnum.ARCHIVED.getValue())) {
// int num = checkIfBusinessaccounting(insuranceAccountBatchPO);
// //表示已经被核算过不能重新核算
// if (num > 0) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "已被薪酬核算给核算过,无法删除!"));
// }
// }
// if(param.getPaymentOrganization()==null){
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),542563,"个税扣缴义务人为空"));
// }
@ -2359,11 +2366,19 @@ public class SIAccountBiz extends Service {
*/
public int checkIfBusinessaccounting(InsuranceAccountBatchPO param) {
List<SIAccountUtilDTO> list = getSIAccountUtilMapper().checkIfBusinessaccounting(param.getId());
return (int) list.stream().filter(e -> e.getBillmonth().equals(e.getTaxcycle().substring(0, 7))).count();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
return (int) list.stream().filter( f -> {
String billMonthBySob = sdf.format(convertSalaryMonthToBillMonth(f.getSalaryMonth(), f.getSocialSecurityCycleType()));
return f.getBillmonth().equals(billMonthBySob.substring(0, 7));
}).count();
}
public Date convertSalaryMonthToBillMonth(Date salaryMonth, Integer socialSecurityCycleType) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(salaryMonth);
calendar.add(Calendar.MONTH, socialSecurityCycleType - 3);
return calendar.getTime();
}
/**
* 更新薪资台账
*

View File

@ -163,7 +163,7 @@ public class SICategoryBiz extends Service {
throw new SalaryRunTimeException("isUse is required");
}
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = new SISchemeBiz().queryListByInsuranceIdIsPayment(id, IsPaymentEnum.YES.getValue());
if(CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS)) {
if(CollectionUtils.isNotEmpty(insuranceSchemeDetailPOS) && isUse == 0) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 543888, "该福利开启缴费,不可删除(或停用)"));
}
ICategoryPO iCategoryPO = getByID(id);

View File

@ -20,5 +20,10 @@ public class SalaryItemConstant {
*/
public static final String RESULT_IMPORT_FIELD_SIGN="_salaryAcctResultImportFieldSign";
/**
* 薪资核算导出缓存表头字段key
*/
public static final String RESULT_EXPORT_FIELD_SIGN="_salaryAcctResultExportFieldSign";
}

View File

@ -103,5 +103,8 @@ public class DataCollectionEmployee {
//是否是系统管理员
private Boolean isAdmin;
//是否外部人员
private boolean extEmp;
}

View File

@ -0,0 +1,27 @@
package com.engine.salary.entity.extemp.param;
import com.engine.salary.common.BaseQueryParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 数据采集-累计专项附加扣除查询参数
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExtEmpQueryParam extends BaseQueryParam {
//姓名
private String username;
}

View File

@ -0,0 +1,101 @@
package com.engine.salary.entity.extemp.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 数据采集-累计专项附加扣除查询参数
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExtEmpSaveParam {
private Long id;
/**
* 姓名
*/
private String username;
/**
* 部门
*/
private String departmentName;
/**
* 部门ID
*/
private Long departmentId;
/**
* 分部
*/
private String subcompanyName;
/**
* 分部ID
*/
private Long subcompanyId;
/**
* 岗位
*/
private String jobtitleName;
/**
* 岗位ID
*/
private Long jobtitleId;
/**
* 入职日期
*/
private String companystartdate;
/**
* 手机
*/
private String mobile;
/**
* 状态编码
*/
private String status;
/**
* 工号
*/
private String workcode;
/**
* 性别
*/
private String sex;
/**
* 邮件
*/
private String email;
/**
* 电话
*/
private String telephone;
/**
* 职称
*/
private String jobcall;
/**
* 出生日期
*/
private String birthday;
/**
* 身份证号码
*/
private String idNo;
/**
* 本人开户的银行卡卡号
*/
private String bankCardNum;
/**
* 本人开户的银行卡开户支行全称
*/
private String bankName;
}

View File

@ -0,0 +1,136 @@
package com.engine.salary.entity.extemp.po;
import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* 外部人员
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//hrsa_external_employee
public class ExtEmpPO {
private Long id;
/**
* 姓名
*/
@TableTitle(title = "姓名", dataIndex = "username", key = "username")
private String username;
/**
* 部门
*/
@TableTitle(title = "部门", dataIndex = "departmentName", key = "departmentName")
private String departmentName;
/**
* 部门ID
*/
private Long departmentId;
/**
* 分部
*/
@TableTitle(title = "分部", dataIndex = "subcompanyName", key = "subcompanyName")
private String subcompanyName;
/**
* 分部ID
*/
private Long subcompanyId;
/**
* 岗位
*/
// @TableTitle(title = "岗位", dataIndex = "jobtitleName", key = "jobtitleName")
private String jobtitleName;
/**
* 岗位ID
*/
private Long jobtitleId;
/**
* 入职日期
*/
@TableTitle(title = "入职日期", dataIndex = "companystartdate", key = "companystartdate")
private String companystartdate;
/**
* 手机
*/
private String mobile;
/**
* 状态编码
*/
private String status;
/**
* 工号
*/
@TableTitle(title = "工号", dataIndex = "workcode", key = "workcode")
private String workcode;
/**
* 性别
*/
private String sex;
/**
* 邮件
*/
private String email;
/**
* 电话
*/
private String telephone;
/**
* 职称
*/
private String jobcall;
/**
* 出生日期
*/
private String birthday;
/**
* 身份证号码
*/
private String idNo;
/**
* 本人开户的银行卡卡号
*/
private String bankCardNum;
/**
* 本人开户的银行卡开户支行全称
*/
private String bankName;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
/**
* 创建人
*/
private Long creator;
/**
* 修改人
*/
private Long modifier;
/**
* 创建时间
*/
private Date createTime;
/**
* 修改时间
*/
private Date updateTime;
/**
* 租户ID
*/
private String tenantKey;
private Collection<Long> ids;
private String departmentOrgName;
private String subcompanyOrgName;
}

View File

@ -78,6 +78,9 @@ public class SalaryTemplateBO {
.autoSendStatus(saveParam.getAutoSendStatus()?1:0)
.autoSendDayOfMonth(saveParam.getAutoSendDayOfMonth())
.autoSendTimeOfDay(saveParam.getAutoSendTimeOfDay())
.ackFeedbackStatus(saveParam.getAckFeedbackStatus()?1:0)
.autoAckDays(saveParam.getAutoAckDays())
.feedbackUrl(saveParam.getFeedbackUrl())
.createTime(new Date())
.updateTime(new Date())
.creator(employeeId)

View File

@ -29,10 +29,7 @@ public class SalaryBaseSetFormDTO {
// 水印设置
private Object watermarkSetting;
// 签名确认
private Boolean ackStatus;
// 员工反馈
private Boolean feedbackStatus;
// 工资单反馈设置
private SalaryBillAckFeedbackDTO ackFeedbackSetting;
}

View File

@ -0,0 +1,35 @@
package com.engine.salary.entity.salaryBill.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Harryxzy
* @ClassName SalaryBillAckFeedbackDTO
* @date 2023/07/12 13:46
* @description 工资单确认和反馈DTO
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryBillAckFeedbackDTO {
/**
* 工资单确认反馈是否开启01
*/
private String ackStatus;
/**
* 反馈地址
*/
private String feedBackUrl;
/**
* 超时自动确认天数
*/
private Integer autoAckDays;
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.salaryBill.dto;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -14,16 +15,22 @@ import lombok.NoArgsConstructor;
@Builder
@NoArgsConstructor
@AllArgsConstructor
////"工资单发放详情列表")
//"工资单发放详情列表")
public class SalarySendDetailListDTO {
// 主键id")
// 主键id
// @JsonSerialize(using = ToStringSerializer.class)
private Long id;
// @JsonIgnore
private Long employeeId;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
/**
* 用于发送工资单邮件
*/

View File

@ -1,6 +1,7 @@
package com.engine.salary.entity.salaryBill.dto;
import com.engine.salary.annotation.TableTitle;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
@ -48,6 +49,12 @@ public class SalarySendInfoListDTO {
@TableTitle(title = "发送状态", dataIndex = "sendStatus", key = "sendStatus")
private String sendStatus;
@TableTitle(title = "查看状态", dataIndex = "billReadStatus", key = "billReadStatus")
private String billReadStatus;
@TableTitle(title = "确认状态", dataIndex = "billConfirmStatus", key = "billConfirmStatus")
private String billConfirmStatus;
private String email;
private Long salaryAcctRecordId;
/**
@ -55,5 +62,18 @@ public class SalarySendInfoListDTO {
*/
private Integer salaryAcctType;
/**
* 该模板是否开启了工资单反馈确认
*/
private boolean needAck;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
}

View File

@ -141,5 +141,10 @@ public class SalarySendListDTO {
*/
// private Integer haveBackCalc;
/**
* 工资单确认反馈状态
*/
private Integer ackFeedbackStatus;
}

View File

@ -66,4 +66,20 @@ public class SalaryTemplateBaseSetDTO {
// 发送时间
private String autoSendTimeOfDay;
/**
* 工资单确认反馈状态
*/
private Boolean ackFeedbackStatus;
/**
* 自动确认超时天数
*/
private Integer autoAckDays;
/**
* 反馈流程地址
*
*/
private String feedbackUrl;
}

View File

@ -54,4 +54,5 @@ public class SalaryTemplateShowSetDTO {
// 薪资项为0时不显示")
private Boolean salaryItemZeroStatus;
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.salaryBill.param;
import com.engine.salary.entity.salaryBill.dto.SalaryBillAckFeedbackDTO;
import com.engine.salary.enums.salarybill.SalaryTemplateWatermarkTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.util.SalaryI18nUtil;
@ -7,6 +8,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;
import weaver.hrm.User;
import java.util.Map;
@ -33,11 +35,8 @@ public class SalaryBaseSetSaveParam {
// 自定义设置内容")
private Map<String, Object> wmSetting;
// 是否启用确认")
private Boolean ackStatus;
// 是否启用反馈")
private Boolean feedbackStatus;
// 工资单确认反馈设置
private SalaryBillAckFeedbackDTO ackFeedbackSetting;
public static void checkParam(SalaryBaseSetSaveParam saveParam, User user) {
if (Objects.isNull(saveParam.getWatermarkStatus())) {
@ -52,14 +51,10 @@ public class SalaryBaseSetSaveParam {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 544206, "自定义水印的设置内容必传"));
}
}
if (Objects.isNull(saveParam.getAckFeedbackSetting()) || StringUtils.isBlank(saveParam.getAckFeedbackSetting().getAckStatus())) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(220418, "工资单确认反馈信息必传"));
}
// if (Objects.isNull(saveParam.getAckStatus())) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 544207, "是否启用确认必传"));
// }
//
// if (Objects.isNull(saveParam.getFeedbackStatus())) {
// throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(), 544208, "是否启用反馈必传"));
// }
}
}

View File

@ -89,6 +89,22 @@ public class SalaryTemplateSaveParam {
// 补发薪资项目设置
private List<SalaryTemplateSalaryItemSetListDTO> replenishSalaryItemSetting;
/**
* 工资单确认反馈状态
*/
private Boolean ackFeedbackStatus;
/**
* 自动确认超时天数
*/
private Integer autoAckDays;
/**
* 反馈流程地址
*
*/
private String feedbackUrl;
public static void checkParam(SalaryTemplateSaveParam saveParam, User user) {
if (saveParam.getSalarySobId() == null) {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(user.getLanguage(),544117,"薪资账套表的主键id必传;"));

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.salaryBill.po;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -42,6 +43,13 @@ public class SalarySendInfoPO {
*/
private Long employeeId;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
/**
* 人员信息表的主键id
*/
@ -52,6 +60,21 @@ public class SalarySendInfoPO {
*/
private Integer sendStatus;
/**
* 查看状态0未查看1已查看
*/
private Integer billReadStatus;
/**
* 确认状态 0未确认1已确认
*/
private Integer billConfirmStatus;
/**
* 操作发送工资单人员id
*/
private Long sendEmployeeId;
/**
* 发送时间
*/

View File

@ -170,5 +170,23 @@ public class SalaryTemplatePO {
*/
private String tenantKey;
/**
* 工资单确认反馈状态
*/
private Integer ackFeedbackStatus;
/**
* 自动确认超时天数
*/
private Integer autoAckDays;
/**
* 反馈流程地址
*
*/
private String feedbackUrl;
private Collection<Long> salarySobIds;
}

View File

@ -125,6 +125,45 @@ public class SalaryAcctEmployeeBO {
return resultList;
}
public static List<SalaryAcctEmployeePO> convert2Employee(Collection<DataCollectionEmployee> employee,
SalaryAcctRecordPO salaryAcctRecord,
List<SalaryArchiveDataDTO> salaryArchiveTaxAgentData,
Long employeeId) {
if (CollectionUtils.isEmpty(employee)) {
return Collections.emptyList();
}
List<SalaryAcctEmployeePO> resultList = Lists.newArrayList();
Map<Long, Set<List<SalaryArchiveTaxAgentDataDTO>>> empIdKeyTaxAgentMap = SalaryEntityUtil.group2Map(salaryArchiveTaxAgentData, SalaryArchiveDataDTO::getEmployeeId, SalaryArchiveDataDTO::getTaxAgents);
Date now = new Date();
for (DataCollectionEmployee emp : employee) {
Set<Long> taxAgentIds = Sets.newHashSet();
Set<List<SalaryArchiveTaxAgentDataDTO>> taxAgentSet = empIdKeyTaxAgentMap.getOrDefault(emp.getEmployeeId(), Collections.emptySet());
for (List<SalaryArchiveTaxAgentDataDTO> taxAgents : taxAgentSet) {
taxAgentIds.addAll(SalaryEntityUtil.properties(taxAgents, SalaryArchiveTaxAgentDataDTO::getTaxAgentId));
}
if (CollectionUtils.isEmpty(taxAgentIds)) {
taxAgentIds.add(0L);
}
for (Long taxAgentId : taxAgentIds) {
SalaryAcctEmployeePO salaryAcctEmployee = SalaryAcctEmployeePO.builder()
.salaryAcctRecordId(salaryAcctRecord.getId())
.salarySobId(salaryAcctRecord.getSalarySobId())
.salaryMonth(salaryAcctRecord.getSalaryMonth())
.employeeId(emp.getEmployeeId())
.employeeType(emp.isExtEmp() ? 1 : 0)
.taxAgentId(taxAgentId)
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(0)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build();
resultList.add(salaryAcctEmployee);
}
}
return resultList;
}
public static List<List<SalaryAcctEmployeePO>> partitionByEmployeeId(List<SalaryAcctEmployeePO> salaryAcctEmployees) {
if (CollectionUtils.isEmpty(salaryAcctEmployees)) {

View File

@ -60,4 +60,7 @@ public class SalaryAcctResultQueryParam extends BaseQueryParam {
private Collection<Long> ids;
private String workcode;
//薪资项目id
private Collection<Long> salaryItemIds;
}

View File

@ -1,6 +1,7 @@
package com.engine.salary.entity.salaryacct.po;
import com.engine.salary.annotation.SalaryFormulaVar;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -49,6 +50,13 @@ public class SalaryAcctEmployeePO {
@SalaryFormulaVar(defaultLabel = "人员id", labelId = 86321, dataType = "number")
private Long employeeId;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
/**
* 个税扣缴义务人id
*/

View File

@ -184,12 +184,12 @@ public class SalaryArchiveBO {
Date end = localDateRange.getEndDate();
List<SalaryArchiveDataDTO> list = new ArrayList<>();
allEmployeeIds.forEach(e->{
allEmployeeIds.forEach(e -> {
// 同一个人的档案数据
List<SalaryArchivePO> salaryArchives = salaryArchiveList.stream().filter(f->f.getEmployeeId().equals(e)).collect(Collectors.toList());
List<SalaryArchivePO> salaryArchives = salaryArchiveList.stream().filter(f -> f.getEmployeeId().equals(e)).collect(Collectors.toList());
List<Long> salaryArchiveIds = salaryArchives.stream().map(SalaryArchivePO::getId).collect(Collectors.toList());
// 同一个人的薪资项目调整历史数据
List<SalaryArchiveItemPO> salaryArchiveItems = salaryArchiveItemDataList.stream().filter(d->salaryArchiveIds.contains(d.getSalaryArchiveId())).collect(Collectors.toList());
List<SalaryArchiveItemPO> salaryArchiveItems = salaryArchiveItemDataList.stream().filter(d -> salaryArchiveIds.contains(d.getSalaryArchiveId())).collect(Collectors.toList());
List<Long> salaryArchiveItemIds = salaryArchiveItems.stream().map(SalaryArchiveItemPO::getSalaryItemId).distinct().collect(Collectors.toList());
SalaryArchiveDataDTO salaryArchiveData = new SalaryArchiveDataDTO();
@ -206,7 +206,7 @@ public class SalaryArchiveBO {
taxAgent.setTaxAgentId(salaryArchive.getTaxAgentId());
// taxAgent.setIncomeCategory(salaryArchive.getIncomeCategory());
// taxAgent.setSalarySobIds(salaryArchiveSobList.stream().filter(sob->sob.getSalaryArchiveId().equals(salaryArchive.getId())).map(SalaryArchiveSobPO::getSalarySobId).distinct().collect(Collectors.toList()));
taxAgent.setEffectiveDateRange(LocalDateRange.builder().fromDate((fromDate.before(start)?start:fromDate)).endDate(endDate == null || endDate.after(end)?end:endDate).build());
taxAgent.setEffectiveDateRange(LocalDateRange.builder().fromDate((fromDate.before(start) ? start : fromDate)).endDate(endDate == null || endDate.after(end) ? end : endDate).build());
// 薪资项目数据按个税扣缴义务人切割
if (!isOnlyTaxAgent) {
// 开始日期
@ -225,11 +225,11 @@ public class SalaryArchiveBO {
if (fromDateItem.after(endTempItem) || endTempItem.before(startItem)) {
continue;
}
if ( endTempItem.equals(startItem) && flag) {
if (endTempItem.equals(startItem) && flag) {
continue;
}
SalaryArchiveItemDataDTO salaryArchiveItemData = new SalaryArchiveItemDataDTO();
salaryArchiveItemData.setEffectiveDateRange(LocalDateRange.builder().fromDate((fromDateItem.before(startItem)?startItem:fromDateItem)).endDate(endTempItem).build());
salaryArchiveItemData.setEffectiveDateRange(LocalDateRange.builder().fromDate((fromDateItem.before(startItem) ? startItem : fromDateItem)).endDate(endTempItem).build());
salaryArchiveItemData.setSalaryItemId(salaryArchiveItem.getSalaryItemId());
salaryArchiveItemData.setValue(salaryArchiveItem.getItemValue());
salaryItemValues.add(salaryArchiveItemData);
@ -326,6 +326,7 @@ public class SalaryArchiveBO {
.id(IdGenerator.generate())
.employeeId(change.getEmployeeId())
.taxAgentId(change.getTaxAgentId())
.employeeType(change.getEmployeeType())
.runStatus(SalaryArchiveStatusEnum.PENDING.getValue())
// .incomeCategory(IncomeCategoryEnum.WAGES_AND_SALARIES.getValue())
// .modifier(0L)
@ -387,4 +388,9 @@ public class SalaryArchiveBO {
*/
private List<Long> changeIds;
}
public static boolean isNotExtEmp(SalaryArchivePO po) {
return po.getEmployeeType() == null || po.getEmployeeType() == 1;
}
}

View File

@ -1,6 +1,5 @@
package com.engine.salary.entity.salaryarchive.bo;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.constant.SalaryArchiveConstant;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
@ -18,10 +17,6 @@ import com.engine.salary.entity.taxagent.param.TaxAgentRangeSaveParam;
import com.engine.salary.enums.UserStatusEnum;
import com.engine.salary.enums.salaryarchive.*;
import com.engine.salary.enums.salarysob.TargetTypeEnum;
import com.engine.salary.service.SalaryEmployeeService;
import com.engine.salary.service.TaxAgentManageRangeService;
import com.engine.salary.service.impl.SalaryEmployeeServiceImpl;
import com.engine.salary.service.impl.TaxAgentManageRangeServiceImpl;
import com.engine.salary.util.SalaryDateUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.excel.ExcelComment;
@ -33,6 +28,7 @@ import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import weaver.hrm.User;
import weaver.hrm.User;
import java.time.LocalDate;
import java.util.*;
@ -47,15 +43,6 @@ import java.util.stream.Collectors;
*/
public class SalaryArchiveExcelBO extends Service {
private SalaryEmployeeService getSalaryEmployeeService() {
return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user);
}
public TaxAgentManageRangeService getTaxAgentManageRangeService() {
return ServiceUtil.getService(TaxAgentManageRangeServiceImpl.class, user);
}
public static String userNameI18n;
public static String departmentI18n;
public static String jobNumI18n;
@ -353,11 +340,9 @@ public class SalaryArchiveExcelBO extends Service {
* @param excelComments
* @param errorCount
* @param importHandleParam
* @param confValue 人员匹配规则
* @return
*/
public static boolean singleRowCheck(List<String> allTodoSalaryArchives, Map<String, Object> map, List<String> headers, int effectiveTimeIndex, List<Map<String, String>> excelComments,
int errorCount, SalaryArchiveImportHandleParam importHandleParam, String confValue, User user) {
public static boolean singleRowCheck(List<String> allTodoSalaryArchives, Map<String, Object> map, List<String> headers, int effectiveTimeIndex, List<Map<String, String>> excelComments, int errorCount, SalaryArchiveImportHandleParam importHandleParam, User user) {
//是否是流程
boolean process = importHandleParam.isProcess();
@ -369,27 +354,27 @@ public class SalaryArchiveExcelBO extends Service {
String userName = Optional.ofNullable(map.get(userNameI18n)).orElse("").toString();
String deparmentName = Optional.ofNullable(map.get(departmentI18n)).orElse("").toString();
String mobileName = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(user.getLanguage(),125238, "手机号"))).orElse("").toString();
String jobNum = Optional.ofNullable(map.get(jobNumI18n)).orElse("").toString();
String hrmStatus = Optional.ofNullable(map.get(hrStatusI18n)).orElse("").toString();
String workCode = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(user.getLanguage(),1933,"工号"))).orElse("").toString();
// Optional<HrmStatus> optionalStatus = importHandleParam.getHrmStatusList().stream().filter(s -> s.getName().equals(hrmStatus)).findFirst();
// String codeId = optionalStatus.map(status -> status.getCodeId() + "").orElse("");
String workcode = Optional.ofNullable(map.get(SalaryI18nUtil.getI18nLabel(user.getLanguage(),1933,"工号"))).orElse("").toString();
String validType = importHandleParam.getEmpValidType();
List<DataCollectionEmployee> emps = new ArrayList<>();
// "0"代表姓名+部门+手机号的匹配原则1代表工号为唯一匹配原则
if("0".equals(confValue)){
//外部人员
if(importHandleParam.isExtEmp()){
emps = importHandleParam.getEmployees().stream().filter(e ->
(StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
&& (StringUtils.isBlank(mobileName) || Objects.equals(e.getMobile(), mobileName))
// && (StringUtils.isBlank(jobNum) || Objects.equals(e.getWorkcode(), jobNum))
)
// && (StringUtils.isBlank(hrmStatus) || Objects.equals(e.getPersonnelStatus(), codeId))
// .map(DataCollectionEmployee::getEmployeeId)
.collect(Collectors.toList());
}else if("1".equals(confValue)){
emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(workCode) || Objects.equals(e.getWorkcode(), workCode)))
.collect(Collectors.toList());
(StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
&& (StringUtils.isBlank(mobileName) || Objects.equals(e.getMobile(), mobileName))).collect(Collectors.toList());
}else {
if ("0".equals(validType)) {
//0代表姓名+部门+手机号的匹配原则1代表工号为唯一匹配原则
emps = importHandleParam.getEmployees().stream().filter(e ->
(StringUtils.isBlank(userName) || Objects.equals(e.getUsername(), userName))
&& (StringUtils.isBlank(deparmentName) || Objects.equals(e.getDepartmentName(), deparmentName))
&& (StringUtils.isBlank(mobileName) || Objects.equals(e.getMobile(), mobileName))).collect(Collectors.toList());
} else if ("1".equals(validType)) {
emps = importHandleParam.getEmployees().stream().filter(e -> (StringUtils.isBlank(workcode) || Objects.equals(e.getWorkcode(), workcode)))
.collect(Collectors.toList());
}
}
List<Long> employeeSameIds = new ArrayList<>();
@ -411,7 +396,7 @@ public class SalaryArchiveExcelBO extends Service {
if (employeeId == null) {
Map<String, String> errorMessageMap = Maps.newHashMap();
errorMessageMap.put("message", rowindex + SalaryI18nUtil.getI18nLabel(user.getLanguage(),542649, "人员存在重复数据,请确定姓名、部门、手机号或工号唯一"));
errorMessageMap.put("message", rowindex + SalaryI18nUtil.getI18nLabel(user.getLanguage(),0, "查找人员失败,请确定姓名、部门、手机号正确且唯一"));
excelComments.add(errorMessageMap);
isError = true;
return isError;
@ -529,7 +514,7 @@ public class SalaryArchiveExcelBO extends Service {
// 必填判空
boolean isEmpty = StringUtils.isEmpty(cellVal) &&
((userNameI18n.equals(key.toString()) && !process && "0".equals(confValue)) || taxAgentI18n.equals(key.toString()) || incomeCategoryI18n.equals(key.toString()) || salarySobI18n.equals(key.toString())
((userNameI18n.equals(key.toString()) && !process) || taxAgentI18n.equals(key.toString()) || incomeCategoryI18n.equals(key.toString()) || salarySobI18n.equals(key.toString())
// 定薪列表初始化导入必填: 起始发薪日期生效日期
|| ((payStartDateI18n.equals(key.toString()) || effectiveTimeI18n.equals(key.toString())) && importHandleParam.isInit())
// 定薪列表调薪必填: 调整原因生效日期

View File

@ -36,6 +36,8 @@ public class SalaryArchiveListDTO {
@TableTitle(title = "人员信息表的主键id", dataIndex = "employeeId", key = "employeeId")
private Long employeeId;
private Integer employeeType;
/**
* 姓名
*/

View File

@ -62,6 +62,11 @@ public class SalaryArchiveImportHandleParam {
*/
boolean isProcess;
/**
* 是否是外部人员
*/
boolean isExtEmp;
/**
* 说明
*/
@ -72,6 +77,11 @@ public class SalaryArchiveImportHandleParam {
Long currentEmployeeId;
String tenantKey;
/**
* 人员验证方式
*/
String empValidType;
// 待定薪列表
boolean isPendingList;
// 定薪列表
@ -86,10 +96,6 @@ public class SalaryArchiveImportHandleParam {
*/
List<DataCollectionEmployee> employees;
/**
* 租户下的人员状态
*/
// List<HrmStatus> hrmStatusList;
/**
* 获取所有个税扣缴义务人

View File

@ -83,4 +83,9 @@ public class SalaryArchiveQueryParam extends BaseQueryParam {
private SalaryArchiveListTypeEnum listType;
private String workcode;
/**
* 是否是外部系统档案
*/
private boolean extSalaryArchiveList;
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.salaryarchive.po;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import com.engine.salary.enums.salaryarchive.SalaryArchiveStatusEnum;
import com.engine.salary.enums.salaryarchive.SalaryArchiveAddTypeEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
@ -57,6 +58,14 @@ public class SalaryArchivePO {
*/
private String runStatus;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
/**
* 定薪类型
*
@ -102,6 +111,7 @@ public class SalaryArchivePO {
private Long taxAgentId;
//---------条件-------
private Collection<Long> ids;
private Collection<Long> employeeIds;

View File

@ -100,6 +100,7 @@ public class SalaryItemBO {
.systemName(sysSalaryItemNameMap.getOrDefault(salaryItemPO.getSysSalaryItemId(), StringUtils.EMPTY))
.useInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary())
.useDefault(salaryItemPO.getUseDefault())
.hideDefault(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault())
.roundingMode(Optional.ofNullable(salaryRoundingModeEnum)
.map(e -> SalaryI18nUtil.getI18nLabel(user.getLanguage(),e.getLabelId(), e.getDefaultLabel()))
.orElse(StringUtils.EMPTY))
@ -146,6 +147,7 @@ public class SalaryItemBO {
.systemName(sysSalaryItemNameMap.getOrDefault(salaryItemPO.getSysSalaryItemId(), StringUtils.EMPTY))
.useInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary())
.useDefault(salaryItemPO.getUseDefault())
.hideDefault(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault())
.roundingMode(Optional.ofNullable(salaryRoundingModeEnum)
.map(e -> SalaryI18nUtil.getI18nLabel(user.getLanguage(), e.getLabelId(), e.getDefaultLabel()))
.orElse(StringUtils.EMPTY))
@ -182,6 +184,7 @@ public class SalaryItemBO {
.setName(salaryItemPO.getName())
.setSystemType(salaryItemPO.getSystemType())
.setUseDefault(salaryItemPO.getUseDefault())
.setHideDefault(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault())
.setUseInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary())
.setRoundingMode(salaryItemPO.getRoundingMode())
.setPattern(salaryItemPO.getPattern())
@ -257,6 +260,7 @@ public class SalaryItemBO {
.sysSalaryItemId(NumberUtils.LONG_ZERO)
.useDefault(saveParam.getUseDefault())
.useInEmployeeSalary(saveParam.getUseInEmployeeSalary())
.hideDefault(saveParam.getHideDefault())
.roundingMode(saveParam.getRoundingMode() == null ? SalaryRoundingModeEnum.ROUNDING.getValue() : saveParam.getRoundingMode())
.pattern(Optional.ofNullable(saveParam.getPattern()).orElse(2))
.valueType(saveParam.getValueType())

View File

@ -94,6 +94,7 @@ public class SysSalaryItemBO {
.setCanEdit(sysSalaryItemPO.getCanEdit())
.setSystemType(sysSalaryItemPO.getSystemType())
.setUseDefault(sysSalaryItemPO.getUseDefault())
.setHideDefault(0)
.setUseInEmployeeSalary(sysSalaryItemPO.getUseInEmployeeSalary())
.setRoundingMode(sysSalaryItemPO.getRoundingMode())
.setPattern(sysSalaryItemPO.getPattern())

View File

@ -40,6 +40,11 @@ public class SalaryFieldListDTO {
@TableTitle(title = "默认使用",dataIndex = "useDefault",key = "useDefault")
private Integer useDefault;
//核算时隐藏
@SalaryTableColumn(text = "核算时隐藏", width = "10%", column = "hideDefault")
@TableTitle(title = "核算时隐藏",dataIndex = "hideDefault",key = "hideDefault")
private Integer hideDefault;
//进位规则
@SalaryTableColumn(text = "进位规则", width = "10%", column = "roundingMode",transmethod = "com.engine.salary.transmethod.TransMethod.roundingMode")
@TableTitle(title = "进位规则",dataIndex = "roundingMode",key = "roundingMode")

View File

@ -42,6 +42,9 @@ public class SalaryItemFormDTO {
//默认使用")
private Integer useDefault;
//核算时隐藏")
private Integer hideDefault;
//薪资档案引用")
private Integer useInEmployeeSalary;

View File

@ -51,6 +51,11 @@ public class SalaryItemListDTO {
@TableTitle(title = "默认使用",dataIndex = "useDefault",key = "useDefault")
private Integer useDefault;
//核算时隐藏
@SalaryTableColumn(text = "核算时隐藏", width = "10%", column = "hideDefault")
@TableTitle(title = "核算时隐藏",dataIndex = "hideDefault",key = "hideDefault")
private Integer hideDefault;
//进位规则
@SalaryTableColumn(text = "进位规则", width = "10%", column = "roundingMode",transmethod = "com.engine.salary.transmethod.TransMethod.roundingMode")
@TableTitle(title = "进位规则",dataIndex = "roundingMode",key = "roundingMode")

View File

@ -49,6 +49,11 @@ public class SalaryItemSobListDTO {
@TableTitle(title = "默认使用",dataIndex = "useDefault",key = "useDefault")
private Integer useDefault;
//核算时默认隐藏
@SalaryTableColumn(text = "核算时隐藏", width = "10%", column = "hideDefault")
@TableTitle(title = "核算时隐藏",dataIndex = "hideDefault",key = "hideDefault")
private Integer hideDefault;
//进位规则
@SalaryTableColumn(text = "进位规则", width = "10%", column = "roundingMode",transmethod = "com.engine.salary.transmethod.TransMethod.roundingMode")
@TableTitle(title = "进位规则",dataIndex = "roundingMode",key = "roundingMode")

View File

@ -49,6 +49,10 @@ public class SalaryItemSaveParam {
//薪资档案引用
private Integer useInEmployeeSalary;
//核算时默认隐藏
@DataCheck(require = true, message = "核算时隐藏不允许为空")
private Integer hideDefault;
/**
* 舍入规则

View File

@ -64,6 +64,11 @@ public class SalaryItemPO {
*/
private Integer useInEmployeeSalary;
/**
* 核算时隐藏
*/
private Integer hideDefault;
/**
* 进位规则
*

View File

@ -12,10 +12,7 @@ import lombok.Data;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.math.NumberUtils;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
@ -70,6 +67,8 @@ public class SalarySobItemBO {
List<SalaryItemPO> defaultSalaryItemPOS,
Long employeeId, String tenantKey) {
Date now = new Date();
// 需要保存的隐藏项目
List<SalarySobItemHidePO> needInsertItemHides = new ArrayList<>();
// 处理薪资账套默认的薪资项目分类
Map<Long, Long> salarySobItemGroupIdMap = Maps.newHashMapWithExpectedSize(salarySobDefaultItemGroupPOS.size());
List<SalarySobItemGroupPO> salarySobItemGroups = Lists.newArrayListWithExpectedSize(salarySobDefaultItemGroupPOS.size());
@ -88,8 +87,23 @@ public class SalarySobItemBO {
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
salarySobItemGroupIdMap.put(salarySobDefaultItemGroupPO.getId(), salarySobItemGroupId);
// 保存薪资项目分类隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salarySobItemGroupId)
.isGroup(1)
.itemHide(0L)
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
List<SalarySobItemPO> salarySobItems = Lists.newArrayListWithExpectedSize(defaultSalaryItemPOS.size());
// 处理薪资账套默认的系统薪资项目
Set<Long> sysSalaryItemIds = SalaryEntityUtil.properties(salarySobDefaultItemPOS, SalarySobDefaultItemPO::getSysSalaryItemId);
@ -113,6 +127,20 @@ public class SalarySobItemBO {
.tenantKey(tenantKey)
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
// 保存薪资项目隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salaryItemPO.getId())
.isGroup(0)
.itemHide(Long.valueOf(salaryItemPO.getHideDefault()== null ? 0 : salaryItemPO.getHideDefault()))
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
// 处理薪资账套默认的自定义薪资项目开启了"默认使用"
for (int i = 0; i < defaultSalaryItemPOS.size(); i++) {
@ -139,6 +167,19 @@ public class SalarySobItemBO {
.tenantKey(tenantKey)
.deleteType(NumberUtils.INTEGER_ZERO)
.build());
// 保存薪资项目隐藏信息
needInsertItemHides.add(SalarySobItemHidePO.builder()
.id(IdGenerator.generate())
.salarySobId(salarySobId)
.salaryItemId(salaryItemPO.getId())
.isGroup(0)
.itemHide(Long.valueOf(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault()))
.creator(employeeId)
.createTime(now)
.updateTime(now)
.deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.build());
}
// 薪资账套默认的回算薪资项目
@ -165,7 +206,8 @@ public class SalarySobItemBO {
salarySobBackItems.add(salarySobBackItemPO);
}
return new Result().setNeedInsertSalarySobItems(salarySobItems).setNeedInsertSalarySobItemGroups(salarySobItemGroups).setNeedInsertSalarySobBackItems(salarySobBackItems);
return new Result().setNeedInsertSalarySobItems(salarySobItems).setNeedInsertSalarySobItemGroups(salarySobItemGroups)
.setNeedInsertSalarySobBackItems(salarySobBackItems).setNeedInsertItemHides(needInsertItemHides);
}
@Data
@ -186,5 +228,10 @@ public class SalarySobItemBO {
* 需要保存的回算薪资项目
*/
List<SalarySobBackItemPO> needInsertSalarySobBackItems;
/**
* 需要保存的薪资项目隐藏信息
*/
List<SalarySobItemHidePO> needInsertItemHides;
}
}

View File

@ -0,0 +1,42 @@
package com.engine.salary.entity.salarysob.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* 外部人员管理范围保存参数
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalarySobRangeExtSaveParam {
//薪资账套的id
@DataCheck(require = true, message = "薪资账套的ID不允许为空")
private Long salarySobId;
/**
* 对象id
*/
private List<Long> targetIds;
/**
* 对象类型1外部人员
*/
private Long targetType;
}

View File

@ -0,0 +1,65 @@
package com.engine.salary.entity;
import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* 个税扣缴义务人的管理范围表
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalarySobExtRangePO {
/**
* 主键id
*/
private Long id;
/**
* 账套id
*/
private Long salarySobId;
/**
* 对象id
*/
private Long targetId;
/**
* 对象类型1外部人员
*/
private Integer targetType;
/**
* 租户ID
*/
private String tenantKey;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private Long creator;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
//主键id集合
private Collection<Long> ids;
@TableTitle(title = "名称", dataIndex = "targetName", key = "targetName")
private String targetName;
}

View File

@ -6,6 +6,8 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
@Data
@Builder
@NoArgsConstructor
@ -23,4 +25,12 @@ public class SIAccountUtilDTO {
* 税款所属期
*/
private String taxcycle;
/**
* 薪资所属月
*/
private Date salaryMonth;
/**
* 社保福利所属期1:上上月2:上月3:本月4:下月
*/
private Integer socialSecurityCycleType;
}

View File

@ -0,0 +1,36 @@
package com.engine.salary.entity.taxagent.param;
import lombok.Data;
import java.util.List;
/**
* 外部人员管理范围保存参数
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
public class TaxAgentManageRangeExtSaveParam {
/**
* 对象id
*/
private List<Long> targetIds;
/**
* 对象类型1外部人员
*/
private Long targetType;
/**
* 个税扣缴义务人的id
*/
private Long taxAgentId;
//是否同步/异步执行生成档案
private boolean sync;
}

View File

@ -0,0 +1,29 @@
package com.engine.salary.entity.taxagent.param;
import com.engine.salary.common.BaseQueryParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 个税扣缴义务人人员范围查询参数
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
//个税扣缴义务人人员范围查询参数
public class TaxAgentRangeExtQueryParam extends BaseQueryParam {
//个税扣缴义务人id
private Long taxAgentId;
//对象")
private String targetName;
}

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.taxagent.po;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import com.engine.salary.enums.taxagent.TaxAgentEmpChangeModuleEnum;
import com.engine.salary.enums.taxagent.TaxAgentEmpChangeTypeEnum;
import lombok.AllArgsConstructor;
@ -59,6 +60,13 @@ public class TaxAgentEmpChangePO {
*/
private Integer moduleType;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
/**
* 租户key
*/

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.taxagent.po;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@ -68,6 +69,13 @@ public class TaxAgentEmpPO {
*/
private Date updateTime;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
private Collection<Long> taxAgentIds;
private Collection<Long> ids;
}

View File

@ -0,0 +1,69 @@
package com.engine.salary.entity.taxagent.po;
import com.engine.salary.annotation.TableTitle;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* 个税扣缴义务人的管理范围表
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TaxAgentExtRangePO {
/**
* 主键id
*/
private Long id;
/**
* 对象id
*/
private Long targetId;
/**
* 对象类型1外部人员
*/
private Integer targetType;
/**
* 个税扣缴义务人的id
*/
private Long taxAgentId;
/**
* 租户ID
*/
private String tenantKey;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private Long creator;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
//主键id集合
private Collection<Long> ids;
/**
* 名字
*/
@TableTitle(title = "姓名",key = "targetName",dataIndex = "targetName")
private String targetName;
}

View File

@ -0,0 +1,53 @@
package com.engine.salary.enums.datacollection;
import com.engine.salary.enums.BaseEnum;
import java.util.Arrays;
import java.util.Optional;
/**
* 人员类型
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public enum DataCollectionEmployeeTypeEnum implements BaseEnum<Integer> {
ORGANIZATION(0, "组织架构", 109125),
EXT_EMPLOYEE(1, "非系统人员", 119127),
;
private int value;
private String defaultLabel;
private int labelId;
DataCollectionEmployeeTypeEnum(int value, String defaultLabel, int labelId) {
this.value = value;
this.defaultLabel = defaultLabel;
this.labelId = labelId;
}
@Override
public Integer getValue() {
return value;
}
@Override
public Integer getLabelId() {
return labelId;
}
@Override
public String getDefaultLabel() {
return defaultLabel;
}
public static String getNameByValue(String value) {
Optional<DataCollectionEmployeeTypeEnum> optional = Arrays.stream(DataCollectionEmployeeTypeEnum.values()).filter(r -> r.getValue().toString().equals(value)).findFirst();
return optional.isPresent() ? optional.get().name() : "";
}
}

View File

@ -0,0 +1,54 @@
package com.engine.salary.enums.datacollection;
import com.engine.salary.enums.BaseEnum;
import java.util.Arrays;
import java.util.Optional;
/**
* 人员使用枚举
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author qiantao
* @version 1.0
**/
public enum UseEmployeeTypeEnum implements BaseEnum<Integer> {
ORG(0, "组织架构", 109125),
EXT(1, "非系统人员", 119127),
ALL(2, "所有人员", 119127),
;
private int value;
private String defaultLabel;
private int labelId;
UseEmployeeTypeEnum(int value, String defaultLabel, int labelId) {
this.value = value;
this.defaultLabel = defaultLabel;
this.labelId = labelId;
}
@Override
public Integer getValue() {
return value;
}
@Override
public Integer getLabelId() {
return labelId;
}
@Override
public String getDefaultLabel() {
return defaultLabel;
}
public static String getNameByValue(String value) {
Optional<UseEmployeeTypeEnum> optional = Arrays.stream(UseEmployeeTypeEnum.values()).filter(r -> r.getValue().toString().equals(value)).findFirst();
return optional.isPresent() ? optional.get().name() : "";
}
}

View File

@ -16,7 +16,8 @@ public enum SalaryArchiveListTypeEnum {
PENDING("PENDING", SalaryI18nUtil.getI18nLabel(542689, "待定薪"), 542689),
FIXED("FIXED", SalaryI18nUtil.getI18nLabel(542690, "发薪"), 542690),
SUSPEND("SUSPEND", SalaryI18nUtil.getI18nLabel(542691, "待停薪"), 542691),
STOP("STOP", SalaryI18nUtil.getI18nLabel(542692, "停薪"), 542692);
STOP("STOP", SalaryI18nUtil.getI18nLabel(542692, "停薪"), 542692),
EXT("EXT", "非系统人员", 542679);
private String value;

View File

@ -0,0 +1,71 @@
package com.engine.salary.enums.salarybill;
import com.engine.salary.enums.BaseEnum;
import java.util.Arrays;
/**
* @ClassName BillConfimStatusEnum
* @author Harryxzy
* @date 2023/7/10 17:03
* @description 工资单确认
*/
public enum BillConfimStatusEnum implements BaseEnum<Integer> {
UNCONFIRMED(0, "未确认", 93286),
CONFIRMED(1, "已确认", 93212),
FEEDBACK(2, "已反馈", 0);
private final int value;
private final String defaultLabel;
private final int labelId;
BillConfimStatusEnum(int value, String defaultLabel, int labelId) {
this.value = value;
this.defaultLabel = defaultLabel;
this.labelId = labelId;
}
@Override
public Integer getValue() {
return value;
}
@Override
public String getDefaultLabel() {
return defaultLabel;
}
@Override
public Integer getLabelId() {
return labelId;
}
public static String getDefaultLabelByValue(Integer value) {
if (value == null) {
return "";
}
BillConfimStatusEnum[] enumAry = BillConfimStatusEnum.values();
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
if (enumAry[i].getValue().equals(value)) {
return enumAry[i].getDefaultLabel();
}
}
return "";
}
public static String getNameByValue(Integer value) {
if (value == null) {
return "";
}
BillConfimStatusEnum[] enumAry = BillConfimStatusEnum.values();
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
if (enumAry[i].getValue().equals(value)) {
return enumAry[i].name();
}
}
return "";
}
}

View File

@ -0,0 +1,70 @@
package com.engine.salary.enums.salarybill;
import com.engine.salary.enums.BaseEnum;
import java.util.Arrays;
/**
* @ClassName BillReadStatusEnum
* @author Harryxzy
* @date 2023/7/10 17:13
* @description 工资单查看
*/
public enum BillReadStatusEnum implements BaseEnum<Integer> {
UNREAD(0, "未查看", 93286),
READED(1, "已查看", 93212);
private int value;
private String defaultLabel;
private int labelId;
BillReadStatusEnum(int value, String defaultLabel, int labelId) {
this.value = value;
this.defaultLabel = defaultLabel;
this.labelId = labelId;
}
@Override
public Integer getValue() {
return value;
}
@Override
public String getDefaultLabel() {
return defaultLabel;
}
@Override
public Integer getLabelId() {
return labelId;
}
public static String getDefaultLabelByValue(Integer value) {
if (value == null) {
return "";
}
BillReadStatusEnum[] enumAry = BillReadStatusEnum.values();
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
return enumAry[i].getDefaultLabel();
}
}
return "";
}
public static String getNameByValue(Integer value) {
if (value == null) {
return "";
}
BillReadStatusEnum[] enumAry = BillReadStatusEnum.values();
for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
return enumAry[i].name();
}
}
return "";
}
}

View File

@ -536,32 +536,60 @@
SELECT
<include refid="salaryItemAdjustRecordColumn"/>
FROM hrsa_salary_archive_item t1
LEFT JOIN hrmresource e ON e.id = t1.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmresource o ON o.id = t1.operator
LEFT JOIN hrsa_salary_item t2 ON t2.id = t1.salary_item_id
WHERE
t1.delete_type = 0
AND e.status != '7' and (e.accounttype is null or e.accounttype = 0)
<if test="salaryItemIds != null and salaryItemIds.size()>0">
AND t1.salary_item_id IN
<foreach collection="salaryItemIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<!-- 关键字(姓名、部门、薪资项目名称 -->
<if test="param.keyword != null and param.keyword != ''">
AND
(
e.lastname like CONCAT('%',#{param.keyword},'%')
OR d.departmentname like CONCAT('%',#{param.keyword},'%')
OR t2.name like CONCAT('%',#{param.keyword},'%')
)
</if>
<if test="param.adjustItem != null and param.adjustItem != ''">
AND t2.name like CONCAT('%',#{param.adjustItem},'%')
</if>
<include refid="paramSql"/>
<if test="param.ids != null and param.ids.size()>0">
AND t1.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<!--员工id,用于查询个人调薪记录-->
<if test="param.employeeId != null">
AND t1.employee_id = #{param.employeeId}
</if>
<!-- 薪资档案id -->
<if test="param.salaryArchiveId != null">
AND t1.salary_archive_id = #{param.salaryArchiveId}
</if>
<!-- 部门 -->
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND d.id IN
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<!-- 调整原因 -->
<if test="param.adjustReason != null and param.adjustReason != ''">
AND t1.adjust_reason = #{param.adjustReason}
</if>
<!-- 生效日期 -->
<if test="param.effectiveTime != null and param.effectiveTime.size() == 2">
AND (t1.effective_time BETWEEN #{param.effectiveTime[0]} AND #{param.effectiveTime[1]})
</if>
<!-- 操作日期 -->
<if test="param.operateTime != null and param.operateTime.size() == 2">
AND (t1.operate_time BETWEEN CONCAT(#{param.operateTime[0]},' 00:00:00') AND
CONCAT(#{param.operateTime[1]},' 23:59:59'))
</if>
<!-- 操作人 -->
<if test="param.operatorIds != null and param.operatorIds.size()>0">
AND t1.operator IN
<foreach collection="param.operatorIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
ORDER BY t1.effective_time DESC,t1.id DESC
</select>
<select id="salaryItemAdjustRecordList"
@ -570,9 +598,6 @@
t1.id,
t1.employee_id,
e.lastname as username,
e.status AS employeeStatus,
d.departmentname AS departmentName,
t1.effective_time,
t1.adjust_reason,
t2.name AS adjust_item,
@ -584,28 +609,16 @@
t1.salary_item_id
FROM hrsa_salary_archive_item t1
LEFT JOIN hrmresource e ON e.id = t1.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmresource o ON o.id = t1.operator
LEFT JOIN hrsa_salary_item t2 ON t2.id = t1.salary_item_id
WHERE
t1.delete_type = 0
AND e.status != '7' and (e.accounttype is null or e.accounttype = 0)
<if test="salaryItemIds != null and salaryItemIds.size()>0">
AND t1.salary_item_id IN
<foreach collection="salaryItemIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.keyword != null and param.keyword != ''">
AND
(
e.lastname like '%'||#{param.keyword}||'%'
OR d.departmentname like '%'||#{param.keyword}||'%'
OR t2.name like '%'||#{param.keyword}||'%'
)
</if>
<if test="param.adjustItem != null and param.adjustItem != ''">
AND t2.name like '%'||#{param.adjustItem}||'%'
</if>
@ -625,28 +638,6 @@
AND t1.salary_archive_id = #{param.salaryArchiveId}
</if>
<if test="param.username != null and param.username != ''">
AND e.lastname like '%'||#{param.username}||'%'
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND e.jobtitle IN
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.userstatus != null and param.userstatus != ''">
AND e.status = #{param.userstatus}
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND d.id IN
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.adjustReason != null and param.adjustReason != ''">
AND t1.adjust_reason = #{param.adjustReason}
</if>
@ -679,9 +670,6 @@
t1.id,
t1.employee_id,
e.lastname as username,
e.status AS employeeStatus,
d.departmentname AS departmentName,
t1.effective_time,
t1.adjust_reason,
t2.name AS adjust_item,
@ -693,13 +681,10 @@
t1.salary_item_id
FROM hrsa_salary_archive_item t1
LEFT JOIN hrmresource e ON e.id = t1.employee_id
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmresource o ON o.id = t1.operator
LEFT JOIN hrsa_salary_item t2 ON t2.id = t1.salary_item_id
WHERE
t1.delete_type = 0
AND e.status != '7' and (e.accounttype is null or e.accounttype = 0)
<if test="salaryItemIds != null and salaryItemIds.size()>0">
AND t1.salary_item_id IN
<foreach collection="salaryItemIds" open="(" item="id" separator="," close=")">
@ -707,14 +692,6 @@
</foreach>
</if>
<if test="param.keyword != null and param.keyword != ''">
AND
(
e.lastname like '%'+#{param.keyword}+'%'
OR d.departmentname like '%'+#{param.keyword}+'%'
OR t2.name like '%'+#{param.keyword}+'%'
)
</if>
<if test="param.adjustItem != null and param.adjustItem != ''">
AND t2.name like '%'+#{param.adjustItem}+'%'
</if>
@ -734,20 +711,6 @@
AND t1.salary_archive_id = #{param.salaryArchiveId}
</if>
<if test="param.username != null and param.username != ''">
AND e.lastname like '%'+#{param.username}+'%'
</if>
<if test="param.positionIds != null and param.positionIds.size()>0">
AND e.jobtitle IN
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<if test="param.userstatus != null and param.userstatus != ''">
AND e.status = #{param.userstatus}
</if>
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND d.id IN
@ -775,19 +738,12 @@
</foreach>
</if>
<if test="param.description != null and param.description != ''">
AND t1.description like '%'+#{param.description}+'%'
</if>
ORDER BY t1.effective_time DESC,t1.id DESC
</select>
<sql id="salaryItemAdjustRecordColumn">
t1.id,
t1.employee_id,
e.lastname as username,
e.status AS employeeStatus,
d.departmentname AS departmentName,
t1.effective_time,
t1.adjust_reason,
t2.name AS adjust_item,

View File

@ -51,6 +51,13 @@ public interface SalaryArchiveMapper {
*/
List<SalaryArchiveListDTO> list(@Param("param") SalaryArchiveQueryParam param);
/**
* 外部人员
* @param queryParam
* @return
*/
List<SalaryArchiveListDTO> listExtSalaryArchive(@Param("param")SalaryArchiveQueryParam queryParam);
/**
* 批量插入

View File

@ -13,6 +13,7 @@
<result column="pay_start_date" property="payStartDate"/>
<result column="pay_end_date" property="payEndDate"/>
<result column="run_status" property="runStatus"/>
<result column="employee_type" property="employeeType"/>
</resultMap>
<!-- 表字段 -->
@ -30,6 +31,7 @@
, t.pay_start_date
, t.pay_end_date
, t.run_status
, t.employee_type
</sql>
<!-- 查询全部 -->
@ -53,6 +55,7 @@
pay_start_date=#{payStartDate},
pay_end_date=#{payEndDate},
run_status=#{runStatus},
employee_type=#{employeeType},
</set>
WHERE id = #{id}
</update>
@ -88,6 +91,7 @@
, t.pay_start_date
, t.pay_end_date
, t.run_status
, t.employee_type
, e.mobile
, e.workcode
, e.lastname as username
@ -110,6 +114,7 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
WHERE t.delete_type = 0
and t.employee_type is null
and e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
<if test="param.ids != null and param.ids.size()>0">
@ -194,6 +199,7 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
WHERE t.delete_type = 0
and t.employee_type is null
and e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
<if test="param.ids != null and param.ids.size()>0">
@ -275,6 +281,7 @@
LEFT JOIN hrmdepartment d ON d.id = e.departmentid
LEFT JOIN hrmsubcompany c ON c.id = e.subcompanyid1
WHERE t.delete_type = 0
and t.employee_type is null
and e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
<if test="param.ids != null and param.ids.size()>0">
@ -345,6 +352,95 @@
</if>
</select>
<!-- 薪资档案列表 -->
<select id="listExtSalaryArchive" resultType="com.engine.salary.entity.salaryarchive.dto.SalaryArchiveListDTO">
SELECT
t
.
id
, t.employee_id
, t.create_time
, t.update_time
, t.creator
, t.delete_type
, t.tenant_key
, t.tax_agent_id
, t.pay_start_date
, t.pay_end_date
, t.run_status
, t.employee_type
, e.mobile
, e.workcode
, e.username
, e.status AS employeeStatus
, e.companystartdate as companystartdate
, e.status AS employeeStatus
, e.department_name as departmentName
, e.subcompany_name AS subcompanyName
FROM
hrsa_salary_archive t
LEFT JOIN hrsa_external_employee e ON e.id = t.employee_id
WHERE t.delete_type = 0
and t.employee_type is not null
<if test="param.ids != null and param.ids.size()>0">
AND t.id IN
<foreach collection="param.ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<!-- 个税扣缴义务人 -->
<if test="param.taxAgentId != null">
AND t.tax_agent_id = #{param.taxAgentId}
</if>
<!-- 姓名 -->
<if test="param.username != null and param.username != ''">
AND e.username like CONCAT('%',#{param.username},'%')
</if>
<!-- 分部 -->
<if test="param.subcompanyIds != null and param.subcompanyIds.size()>0">
AND e.subcompany_id IN
<foreach collection="param.subcompanyIds" open="(" item="subcompanyId" separator="," close=")">
#{subcompanyId}
</foreach>
</if>
<!-- 部门 -->
<if test="param.departmentIds != null and param.departmentIds.size()>0">
AND e.department_id IN
<foreach collection="param.departmentIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<!-- 岗位 -->
<if test="param.positionIds != null and param.positionIds.size()>0">
AND e.jobtitle_id IN
<foreach collection="param.positionIds" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<!-- 状态 -->
<if test="param.userstatus != null and param.userstatus != ''">
AND e.status = #{param.userstatus}
</if>
<!-- 入职日期 -->
<if test="param.hiredate != null and param.hiredate.size() == 2">
AND (e.companystartdate BETWEEN #{param.hiredate[0]} AND #{param.hiredate[1]})
</if>
<!-- 人事状态 -->
<if test="param.personnelStatuss != null and param.personnelStatuss.size()>0">
AND e.status IN
<foreach collection="param.personnelStatuss" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
<!-- 档案状态 -->
<!-- <if test="param.runStatusList != null and param.runStatusList.size()>0">-->
<!-- AND t.run_status IN-->
<!-- <foreach collection="param.runStatusList" open="(" item="runStatus" separator="," close=")">-->
<!-- #{runStatus}-->
<!-- </foreach>-->
<!-- </if>-->
</select>
<insert id="batchInsert">
INSERT INTO hrsa_salary_archive (
id,
@ -356,7 +452,8 @@
tax_agent_id,
pay_start_date,
pay_end_date,
run_status
run_status,
employee_type
)
VALUES
<foreach collection="collection" item="item" separator=",">
@ -370,7 +467,8 @@
#{item.taxAgentId},
#{item.payStartDate},
#{item.payEndDate},
#{item.runStatus}
#{item.runStatus},
#{item.employeeType}
)
</foreach>
</insert>
@ -385,7 +483,8 @@
tax_agent_id,
pay_start_date,
pay_end_date,
run_status
run_status,
employee_type
)
<foreach collection="collection" item="item" separator="union all">
@ -399,7 +498,8 @@
#{item.taxAgentId,jdbcType=DOUBLE},
#{item.payStartDate,jdbcType=DATE},
#{item.payEndDate,jdbcType=DATE},
#{item.runStatus,jdbcType=VARCHAR}
#{item.runStatus,jdbcType=VARCHAR},
#{item.employeeType,jdbcType=INTEGER}
from dual
</foreach>
</insert>
@ -415,7 +515,8 @@
tax_agent_id,
pay_start_date,
pay_end_date,
run_status
run_status,
employee_type
)
VALUES
(
@ -428,7 +529,8 @@
#{item.taxAgentId},
#{item.payStartDate},
#{item.payEndDate},
#{item.runStatus}
#{item.runStatus},
#{item.employeeType}
)
</foreach>
</insert>

View File

@ -14,20 +14,34 @@ import java.util.List;
public interface EmployMapper {
/**
* 获取所有员工
* 只查人力资源表
* @return
*/
List<DataCollectionEmployee> listAll();
/**
* 获取所有员工关联部门
*
* @return
*/
List<DataCollectionEmployee> listEmployee();
/**
* 单表查询
* @param ids
* @return
*/
List<DataCollectionEmployee> getEmployeeByIds(@Param("collection") List<Long> ids);
/**
* 多表联查
* @param ids
* @return
*/
List<DataCollectionEmployee> getEmployeeByIdsAll(@Param("collection") List<Long> ids);
List<DataCollectionEmployee> getAdminEmployeeByIds(@Param("collection") List<Long> list);
List<DataCollectionEmployee> getEmployeeIdsByUserName(@Param("userName") String userName);
/**
* 根据薪资账套的人员范围转换而成的查询参数查询人员
@ -37,24 +51,40 @@ public interface EmployMapper {
*/
List<DataCollectionEmployee> listByParams(@Param("params") Collection<SalarySobRangeEmpQueryParam> queryParams);
/**
* 多表详细信息
* @param employeeId
* @return
*/
DataCollectionEmployee getEmployeeById(Long employeeId);
List<DataCollectionEmployee> listAllFields();
/**
* 报表专用
* @return
*/
List<DataCollectionEmployee> listAllForReport();
/**
* 所以岗位
* @param ids
* @return
*/
List<PositionInfo> listPositionInfo(@Param("collection") List<Long> ids);
/**
* 所以部门
* @param departmentIds
* @return
*/
List<DeptInfo> getDeptInfoList(@Param("departmentIds") List<Long> departmentIds);
/**
* 所以分部
* @param subDepartmentIds
* @return
*/
List<SubCompanyInfo> getSubCompanyInfoList(@Param("subDepartmentIds") List<Long> subDepartmentIds);
List<DataCollectionEmployee> listAll();
List<HrmInfoDTO> listHrmInfoByIdAndName(@Param("param") HrmQueryParam param);
}

View File

@ -85,19 +85,6 @@
</if>
</select>
<select id="getAdminEmployeeByIds" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.lastname as username
from hrmresourcemanager e
where e.status not in (7)
<if test="collection != null and collection.size()>0">
AND e.id IN
<foreach collection="collection" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="listByParams" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.lastname as username,
@ -215,15 +202,6 @@
</if>
</sql>
<select id="getEmployeeIdsByUserName" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select
a.LASTNAME as username
from hrmresource a
where
e.status not in (7)
and (e.accounttype is null or e.accounttype = 0)
<include refid="paramSql"/>
</select>
<select id="listAllFields" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,

View File

@ -0,0 +1,89 @@
package com.engine.salary.mapper.extemp;
import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.extemp.po.ExtEmpPO;
import com.engine.salary.entity.salarysob.param.SalarySobRangeEmpQueryParam;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
public interface ExternalEmployeeMapper {
/**
* 查询所有记录
*
* @return 返回集合没有返回空List
*/
List<ExtEmpPO> listAll();
/**
* 根据主键查询
*
* @param id 主键
* @return 返回记录没有返回null
*/
ExtEmpPO getById(Long id);
List<ExtEmpPO> listSome(ExtEmpPO po);
/**
* 新增忽略null字段
*
* @param externalEmployee 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(ExtEmpPO externalEmployee);
/**
* 修改修改所有字段
*
* @param externalEmployee 修改的记录
* @return 返回影响行数
*/
int update(ExtEmpPO externalEmployee);
/**
* 修改忽略null字段
*
* @param externalEmployee 修改的记录
* @return 返回影响行数
*/
int updateIgnoreNull(ExtEmpPO externalEmployee);
/**
* 删除记录
*
* @return 返回影响行数
*/
int delete(Long id);
/**
* 根据薪资账套的人员范围转换而成的查询参数查询人员
*
* @param queryParams 薪资账套的人员范围转换而成的查询参数
* @return
*/
Collection<DataCollectionEmployee> listByParams( @Param("params") List<SalarySobRangeEmpQueryParam> queryParams);
/**
* 获取所有员工关联部门
*
* @return
*/
List<DataCollectionEmployee> listEmployee();
/**
* 多表联查
* @param ids
* @return
*/
List<DataCollectionEmployee> getEmployeeByIdsAll(@Param("collection")List<Long> ids);
/**
* 报表专用
* @return
*/
Collection<DataCollectionEmployee> listAllForReport();
}

View File

@ -0,0 +1,588 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.engine.salary.mapper.extemp.ExternalEmployeeMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.extemp.po.ExtEmpPO">
<result column="id" property="id"/>
<result column="username" property="username"/>
<result column="department_name" property="departmentName"/>
<result column="department_id" property="departmentId"/>
<result column="subcompany_name" property="subcompanyName"/>
<result column="subcompany_id" property="subcompanyId"/>
<result column="jobtitle_name" property="jobtitleName"/>
<result column="jobtitle_id" property="jobtitleId"/>
<result column="companystartdate" property="companystartdate"/>
<result column="mobile" property="mobile"/>
<result column="status" property="status"/>
<result column="workcode" property="workcode"/>
<result column="sex" property="sex"/>
<result column="email" property="email"/>
<result column="telephone" property="telephone"/>
<result column="jobcall" property="jobcall"/>
<result column="birthday" property="birthday"/>
<result column="id_no" property="idNo"/>
<result column="bank_card_num" property="bankCardNum"/>
<result column="bank_name" property="bankName"/>
<result column="delete_type" property="deleteType"/>
<result column="creator" property="creator"/>
<result column="modifier" property="modifier"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="tenant_key" property="tenantKey"/>
</resultMap>
<!-- 表字段 -->
<sql id="baseColumns">
t
.
id
, t.username
, t.department_name
, t.department_id
, t.subcompany_name
, t.subcompany_id
, t.jobtitle_name
, t.jobtitle_id
, t.companystartdate
, t.mobile
, t.status
, t.workcode
, t.sex
, t.email
, t.telephone
, t.jobcall
, t.birthday
, t.id_no
, t.bank_card_num
, t.bank_name
, t.delete_type
, t.creator
, t.modifier
, t.create_time
, t.update_time
, t.tenant_key
</sql>
<!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns"/>
FROM hrsa_external_employee t
WHERE delete_type = 0
</select>
<!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns"/>
FROM hrsa_external_employee t
WHERE id = #{id} AND delete_type = 0
</select>
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.extemp.po.ExtEmpPO">
SELECT
<include refid="baseColumns"/>
FROM hrsa_external_employee t
WHERE delete_type = 0
<if test="id != null">
AND id = #{id}
</if>
<if test="username != null and username!=''">
AND username = #{username}
</if>
<if test="departmentName != null">
AND department_name = #{departmentName}
</if>
<if test="departmentId != null">
AND department_id = #{departmentId}
</if>
<if test="subcompanyName != null">
AND subcompany_name = #{subcompanyName}
</if>
<if test="subcompanyId != null">
AND subcompany_id = #{subcompanyId}
</if>
<if test="jobtitleName != null">
AND jobtitle_name = #{jobtitleName}
</if>
<if test="jobtitleId != null">
AND jobtitle_id = #{jobtitleId}
</if>
<if test="companystartdate != null">
AND companystartdate = #{companystartdate}
</if>
<if test="mobile != null">
AND mobile = #{mobile}
</if>
<if test="status != null">
AND status = #{status}
</if>
<if test="workcode != null">
AND workcode = #{workcode}
</if>
<if test="sex != null">
AND sex = #{sex}
</if>
<if test="email != null">
AND email = #{email}
</if>
<if test="telephone != null">
AND telephone = #{telephone}
</if>
<if test="jobcall != null">
AND jobcall = #{jobcall}
</if>
<if test="birthday != null">
AND birthday = #{birthday}
</if>
<if test="idNo != null">
AND id_no = #{idNo}
</if>
<if test="bankCardNum != null">
AND bank_card_num = #{bankCardNum}
</if>
<if test="bankName != null">
AND bank_name = #{bankName}
</if>
<if test="deleteType != null">
AND delete_type = #{deleteType}
</if>
<if test="creator != null">
AND creator = #{creator}
</if>
<if test="modifier != null">
AND modifier = #{modifier}
</if>
<if test="createTime != null">
AND create_time = #{createTime}
</if>
<if test="updateTime != null">
AND update_time = #{updateTime}
</if>
<if test="tenantKey != null">
AND tenant_key = #{tenantKey}
</if>
<if test="ids != null and ids.size()>0">
AND id IN
<foreach collection="ids" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
ORDER BY id DESC
</select>
<select id="listByParams" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.username as username,
e.status as status,
e.workcode as workcode,
d.departmentname as departmentName,
d.id as departmentId,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile
from hrsa_external_employee e
left join hrmdepartment d on e.department_id = d.id
left join hrmjobtitles c on e.jobtitle_id = c.id
WHERE 1=1
<if test="params != null and params.size() > 0">
AND ( 1=2
<foreach collection="params" item="param">
OR
(
<if test="param.targetType == 'EMPLOYEE'">
e.id IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">
#{targetId}
</foreach>
</if>
<if test="param.targetType == 'DEPT'">
d.id IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">
#{targetId}
</foreach>
</if>
<if test="param.targetType == 'POSITION'">
c.id IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">
#{targetId}
</foreach>
</if>
<if test="param.targetType == 'SUBCOMPANY'">
e.subcompany_id IN
<foreach collection="param.targetIds" open="(" item="targetId" separator="," close=")">
#{targetId}
</foreach>
</if>
<if test="param.employeeStatus != null and param.employeeStatus.size() > 0">
AND e.status IN
<foreach collection="param.employeeStatus" open="(" item="status" separator="," close=")">
#{status}
</foreach>
</if>
<!-- &#45;&#45; 在职-->
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'normal'">-->
<!-- AND em.status in (0,1,2,3)-->
<!-- </if>-->
<!-- &#45;&#45; 离职-->
<!-- <if test="param.employeeStatus != null and param.employeeStatus == 'unavailable'">-->
<!-- AND em.status in (4,5,6)-->
<!-- </if>-->
)
</foreach>
)
</if>
</select>
<select id="listEmployee" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.ID as employeeId,
e.USERNAME as username,
d.DEPARTMENTNAME as departmentName,
e.status,
e.mobile,
e.workcode
from hrsa_external_employee e
left join hrmdepartment d on e.department_id = d.id
</select>
<select id="getEmployeeByIdsAll"
resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.username as username,
d.departmentname as departmentName,
d.id as departmentId,
sc.SUBCOMPANYNAME as subcompanyName,
c.jobtitlename as jobtitleName,
c.id as jobtitleId,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.status as status,
e.workcode as workcode,
e.sex as sex,
e.email as email,
e.telephone as telephone,
e.jobcall as jobcall,
e.birthday as birthday,
c.id as jobtitleId
from hrsa_external_employee e
left join hrmdepartment d on e.department_id = d.id
left join hrmjobtitles c on e.jobtitle_id = c.id
left join HrmSubCompany sc on e.SUBCOMPANY_ID=sc.id
where 1 = 1
<if test="collection != null and collection.size()>0">
AND e.id IN
<foreach collection="collection" open="(" item="id" separator="," close=")">
#{id}
</foreach>
</if>
</select>
<select id="listAllForReport" resultType="com.engine.salary.entity.datacollection.DataCollectionEmployee">
select e.id as employeeId,
e.username as username,
e.status as status,
e.workcode as workcode,
e.companystartdate as companystartdate,
e.mobile as mobile,
e.department_id as departmentId,
e.subcompany_id as subcompanyid,
e.jobtitle_id as jobtitleId,
d.departmentname as departmentName,
d.id as departmentId
from hrsa_external_employee e
left join hrmdepartment d on e.department_id = d.id
</select>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.extemp.po.ExtEmpPO">
INSERT INTO hrsa_external_employee
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="username != null">
username,
</if>
<if test="departmentName != null">
department_name,
</if>
<if test="departmentId != null">
department_id,
</if>
<if test="subcompanyName != null">
subcompany_name,
</if>
<if test="subcompanyId != null">
subcompany_id,
</if>
<if test="jobtitleName != null">
jobtitle_name,
</if>
<if test="jobtitleId != null">
jobtitle_id,
</if>
<if test="companystartdate != null">
companystartdate,
</if>
<if test="mobile != null">
mobile,
</if>
<if test="status != null">
status,
</if>
<if test="workcode != null">
workcode,
</if>
<if test="sex != null">
sex,
</if>
<if test="email != null">
email,
</if>
<if test="telephone != null">
telephone,
</if>
<if test="jobcall != null">
jobcall,
</if>
<if test="birthday != null">
birthday,
</if>
<if test="idNo != null">
id_no,
</if>
<if test="bankCardNum != null">
bank_card_num,
</if>
<if test="bankName != null">
bank_name,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="creator != null">
creator,
</if>
<if test="modifier != null">
modifier,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id},
</if>
<if test="username != null">
#{username},
</if>
<if test="departmentName != null">
#{departmentName},
</if>
<if test="departmentId != null">
#{departmentId},
</if>
<if test="subcompanyName != null">
#{subcompanyName},
</if>
<if test="subcompanyId != null">
#{subcompanyId},
</if>
<if test="jobtitleName != null">
#{jobtitleName},
</if>
<if test="jobtitleId != null">
#{jobtitleId},
</if>
<if test="companystartdate != null">
#{companystartdate},
</if>
<if test="mobile != null">
#{mobile},
</if>
<if test="status != null">
#{status},
</if>
<if test="workcode != null">
#{workcode},
</if>
<if test="sex != null">
#{sex},
</if>
<if test="email != null">
#{email},
</if>
<if test="telephone != null">
#{telephone},
</if>
<if test="jobcall != null">
#{jobcall},
</if>
<if test="birthday != null">
#{birthday},
</if>
<if test="idNo != null">
#{idNo},
</if>
<if test="bankCardNum != null">
#{bankCardNum},
</if>
<if test="bankName != null">
#{bankName},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="modifier != null">
#{modifier},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
</trim>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.extemp.po.ExtEmpPO">
UPDATE hrsa_external_employee
<set>
username=#{username},
department_name=#{departmentName},
department_id=#{departmentId},
subcompany_name=#{subcompanyName},
subcompany_id=#{subcompanyId},
jobtitle_name=#{jobtitleName},
jobtitle_id=#{jobtitleId},
companystartdate=#{companystartdate},
mobile=#{mobile},
status=#{status},
workcode=#{workcode},
sex=#{sex},
email=#{email},
telephone=#{telephone},
jobcall=#{jobcall},
birthday=#{birthday},
id_no=#{idNo},
bank_card_num=#{bankCardNum},
bank_name=#{bankName},
delete_type=#{deleteType},
creator=#{creator},
modifier=#{modifier},
create_time=#{createTime},
update_time=#{updateTime},
tenant_key=#{tenantKey},
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 更新不为NULL的字段 -->
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.extemp.po.ExtEmpPO">
UPDATE hrsa_external_employee
<set>
<if test="username != null">
username=#{username},
</if>
<if test="departmentName != null">
department_name=#{departmentName},
</if>
<if test="departmentId != null">
department_id=#{departmentId},
</if>
<if test="subcompanyName != null">
subcompany_name=#{subcompanyName},
</if>
<if test="subcompanyId != null">
subcompany_id=#{subcompanyId},
</if>
<if test="jobtitleName != null">
jobtitle_name=#{jobtitleName},
</if>
<if test="jobtitleId != null">
jobtitle_id=#{jobtitleId},
</if>
<if test="companystartdate != null">
companystartdate=#{companystartdate},
</if>
<if test="mobile != null">
mobile=#{mobile},
</if>
<if test="status != null">
status=#{status},
</if>
<if test="workcode != null">
workcode=#{workcode},
</if>
<if test="sex != null">
sex=#{sex},
</if>
<if test="email != null">
email=#{email},
</if>
<if test="telephone != null">
telephone=#{telephone},
</if>
<if test="jobcall != null">
jobcall=#{jobcall},
</if>
<if test="birthday != null">
birthday=#{birthday},
</if>
<if test="idNo != null">
id_no=#{idNo},
</if>
<if test="bankCardNum != null">
bank_card_num=#{bankCardNum},
</if>
<if test="bankName != null">
bank_name=#{bankName},
</if>
<if test="deleteType != null">
delete_type=#{deleteType},
</if>
<if test="creator != null">
creator=#{creator},
</if>
<if test="modifier != null">
modifier=#{modifier},
</if>
<if test="createTime != null">
create_time=#{createTime},
</if>
<if test="updateTime != null">
update_time=#{updateTime},
</if>
<if test="tenantKey != null">
tenant_key=#{tenantKey},
</if>
</set>
WHERE id = #{id} AND delete_type = 0
</update>
<!-- 根据主键删除记录 -->
<delete id="delete">
UPDATE hrsa_external_employee
SET delete_type=1
WHERE id = #{id}
AND delete_type = 0
</delete>
</mapper>

View File

@ -14,6 +14,7 @@
<result column="creator" property="creator"/>
<result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/>
<result column="employee_type" property="employeeType"/>
</resultMap>
<resultMap id="SalaryAccEmployeeCountMap"
@ -36,7 +37,8 @@
t.create_time,
t.update_time,
t.delete_type,
t.tenant_key
t.tenant_key,
t.employee_type
</sql>
<sql id="emp1Column">
@ -44,13 +46,13 @@
.
id
, emp1.salary_acct_record_id, emp1.salary_sob_id, emp1.employee_id, emp1.tax_agent_id, emp1.salary_month,
emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key
emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key,emp1.employee_type
</sql>
<insert id="batchInsert">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key)
creator, create_time, update_time, delete_type, tenant_key,employee_type)
VALUES
<foreach collection="collection" item="emp" separator=",">
(
@ -63,14 +65,15 @@
#{emp.createTime},
#{emp.updateTime},
#{emp.deleteType},
#{emp.tenantKey}
#{emp.tenantKey},
#{emp.employeeType}
)
</foreach>
</insert>
<insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key)
creator, create_time, update_time, delete_type, tenant_key,employee_type)
<foreach collection="collection" item="emp" separator="union all">
select
@ -83,7 +86,8 @@
#{emp.createTime,jdbcType=DATE},
#{emp.updateTime,jdbcType=DATE},
#{emp.deleteType,jdbcType=INTEGER},
#{emp.tenantKey,jdbcType=VARCHAR}
#{emp.tenantKey,jdbcType=VARCHAR},
#{emp.employeeType,jdbcType=INTEGER}
from dual
</foreach>
</insert>
@ -91,7 +95,7 @@
<foreach collection="collection" item="emp" separator=";">
INSERT INTO hrsa_salary_acct_emp(
salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key)
creator, create_time, update_time, delete_type, tenant_key,employee_type)
VALUES
(
#{emp.salaryAcctRecordId},
@ -103,7 +107,8 @@
#{emp.createTime},
#{emp.updateTime},
#{emp.deleteType},
#{emp.tenantKey}
#{emp.tenantKey},
#{emp.employeeType}
)
</foreach>
</insert>
@ -151,13 +156,13 @@
SELECT DISTINCT
emp1.id, emp1.salary_acct_record_id, emp1.salary_sob_id, emp1.employee_id, emp1.tax_agent_id, emp1.salary_month,
emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key
emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key,emp1.employee_type
FROM (
SELECT
id, salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key
creator, create_time, update_time, delete_type, tenant_key,employee_type
FROM hrsa_salary_acct_emp
WHERE
@ -232,13 +237,13 @@
SELECT DISTINCT
emp1.id, emp1.salary_acct_record_id, emp1.salary_sob_id, emp1.employee_id, emp1.tax_agent_id, emp1.salary_month,
emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key
emp1.creator, emp1.create_time, emp1.update_time, emp1.delete_type, emp1.tenant_key,emp1.employee_type
FROM (
SELECT
id, salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month,
creator, create_time, update_time, delete_type, tenant_key
creator, create_time, update_time, delete_type, tenant_key,employee_type
FROM hrsa_salary_acct_emp
WHERE
@ -944,6 +949,7 @@
, t.update_time
, t.delete_type
, t.tenant_key
, t.employee_type
</sql>

View File

@ -101,4 +101,17 @@ public interface SalarySendInfoMapper {
void deleteBySalaryAcctRecordIds(@Param("salaryAcctRecordId") Collection<Long> ids);
List<SalarySendInfoPO> getNeedSendInfoList(@Param("salarySendIds") List<Long> salarySendIds);
/**
* 自动确认工资单
* @param needAutoIds
*/
void autoConfirmSalaryBill(@Param("ids") List<Long> needAutoIds);
/**
* 根据薪资账套id获取已发送确认状态为未确认的工资单
* @param salarySobIds
* @return
*/
List<SalarySendInfoPO> listUnConfirmedSendInfo(@Param("salarySobIds") List<Long> salarySobIds);
}

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