Merge branch 'release/2.9.4.2308.02' into release/230803对接个税

# Conflicts:
#	src/com/engine/salary/mapper/salarysob/SalarySobItemMapper.xml
#	src/com/engine/salary/web/SalarySobController.java
This commit is contained in:
钱涛 2023-08-18 09:36:26 +08:00
commit 988139610b
143 changed files with 4343 additions and 362 deletions

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,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,12 @@
alter table hrsa_salary_sob_item
add rounding_mode NUMBER null;
/
alter table hrsa_salary_sob_item
add pattern NUMBER null;
/
alter table hrsa_salary_sob_item
add value_type NUMBER null;
/

View File

@ -0,0 +1,14 @@
CREATE TABLE hrsa_salary_bill_item_name(
id NUMBER(38,0) PRIMARY KEY NOT NULL,
salary_template_id NUMBER(38,0) NOT NULL,
salary_item_id NUMBER(38,0) NOT NULL,
salary_item_show_name VARCHAR2(255) NOT NULL,
salary_bill_type NUMBER NOT NULL,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
creator NUMBER(38,0) NOT NULL,
delete_type NUMBER NOT NULL,
tenant_key VARCHAR2(255)
);
/

View File

@ -0,0 +1,48 @@
ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_social_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_social_archives drop column employee_id;
/
alter table hrsa_social_archives rename column employee_id2 to employee_id;
/
alter table hrsa_social_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_fund_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_fund_archives drop column employee_id;
/
alter table hrsa_fund_archives rename column employee_id2 to employee_id;
/
alter table hrsa_fund_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_other_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_other_archives drop column employee_id;
/
alter table hrsa_other_archives rename column employee_id2 to employee_id;
/
alter table hrsa_other_archives MODIFY (employee_id not null);
/
ALTER TABLE hrsa_insurance_base_info ADD employee_type number;
/

View File

@ -0,0 +1,9 @@
update hrsa_salary_sob_item a set rounding_mode = (select rounding_mode from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.rounding_mode is null or a.rounding_mode='');
/
update hrsa_salary_sob_item a set pattern = (select pattern from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.pattern is null or a.pattern='');
/
update hrsa_salary_sob_item a set value_type = (select value_type from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.value_type is null or a.value_type='');
/

View File

@ -0,0 +1,48 @@
ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_social_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_social_archives drop column employee_id;
/
alter table hrsa_social_archives rename column employee_id2 to employee_id;
/
alter table hrsa_social_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_fund_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_fund_archives drop column employee_id;
/
alter table hrsa_fund_archives rename column employee_id2 to employee_id;
/
alter table hrsa_fund_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_other_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_other_archives drop column employee_id;
/
alter table hrsa_other_archives rename column employee_id2 to employee_id;
/
alter table hrsa_other_archives MODIFY (employee_id not null);
/
ALTER TABLE hrsa_insurance_base_info ADD employee_type number;
/

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,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,12 @@
alter table hrsa_salary_sob_item
add rounding_mode NUMBER null;
/
alter table hrsa_salary_sob_item
add pattern NUMBER null;
/
alter table hrsa_salary_sob_item
add value_type NUMBER null;
/

View File

@ -0,0 +1,14 @@
CREATE TABLE hrsa_salary_bill_item_name(
id NUMBER(38,0) PRIMARY KEY NOT NULL,
salary_template_id NUMBER(38,0) NOT NULL,
salary_item_id NUMBER(38,0) NOT NULL,
salary_item_show_name VARCHAR2(255) NOT NULL,
salary_bill_type NUMBER NOT NULL,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
creator NUMBER(38,0) NOT NULL,
delete_type NUMBER NOT NULL,
tenant_key VARCHAR2(255)
);
/

View File

@ -0,0 +1,48 @@
ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_social_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_social_archives drop column employee_id;
/
alter table hrsa_social_archives rename column employee_id2 to employee_id;
/
alter table hrsa_social_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_fund_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_fund_archives drop column employee_id;
/
alter table hrsa_fund_archives rename column employee_id2 to employee_id;
/
alter table hrsa_fund_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_other_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_other_archives drop column employee_id;
/
alter table hrsa_other_archives rename column employee_id2 to employee_id;
/
alter table hrsa_other_archives MODIFY (employee_id not null);
/
ALTER TABLE hrsa_insurance_base_info ADD employee_type number;
/

View File

@ -0,0 +1,9 @@
update hrsa_salary_sob_item a set rounding_mode = (select rounding_mode from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.rounding_mode is null or a.rounding_mode='');
/
update hrsa_salary_sob_item a set pattern = (select pattern from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.pattern is null or a.pattern='');
/
update hrsa_salary_sob_item a set value_type = (select value_type from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.value_type is null or a.value_type='');
/

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,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,4 @@
ALTER TABLE hrsa_salary_sob_item
ADD COLUMN rounding_mode int NULL,
ADD COLUMN pattern int NULL,
ADD COLUMN value_type int NULL;

View File

@ -0,0 +1,12 @@
CREATE TABLE hrsa_salary_bill_item_name (
id bigint PRIMARY KEY,
salary_template_id bigint NOT NULL,
salary_item_id bigint NOT NULL,
salary_item_show_name varchar(255)NOT NULL,
salary_bill_type int NOT NULL,
creator bigint NOT NULL,
create_time datetime NOT NULL ,
update_time datetime NOT NULL,
delete_type int NOT NULL,
tenant_key varchar(10) NOT NULL
) ;

View File

@ -0,0 +1,8 @@
ALTER TABLE hrsa_social_archives
MODIFY COLUMN employee_id bigint;
ALTER TABLE hrsa_fund_archives
MODIFY COLUMN employee_id bigint;
ALTER TABLE hrsa_other_archives
MODIFY COLUMN employee_id bigint;
ALTER TABLE hrsa_insurance_base_info ADD employee_type int NULL;

View File

@ -0,0 +1,7 @@
update hrsa_salary_sob_item a set rounding_mode = (select rounding_mode from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.rounding_mode is null or a.rounding_mode='');
update hrsa_salary_sob_item a set pattern = (select pattern from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.pattern is null or a.pattern='');
update hrsa_salary_sob_item a set value_type = (select value_type from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.value_type is null or a.value_type='');

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,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,11 @@
alter table hrsa_salary_sob_item
add rounding_mode NUMBER null
/
alter table hrsa_salary_sob_item
add pattern NUMBER null
/
alter table hrsa_salary_sob_item
add value_type NUMBER null
/

View File

@ -0,0 +1,13 @@
CREATE TABLE hrsa_salary_bill_item_name(
id NUMBER(38,0) PRIMARY KEY NOT NULL,
salary_template_id NUMBER(38,0) NOT NULL,
salary_item_id NUMBER(38,0) NOT NULL,
salary_item_show_name VARCHAR2(255) NOT NULL,
salary_bill_type NUMBER NOT NULL,
create_time DATE DEFAULT sysdate,
update_time DATE DEFAULT sysdate,
creator NUMBER(38,0) NOT NULL,
delete_type NUMBER NOT NULL,
tenant_key VARCHAR2(255)
)
/

View File

@ -0,0 +1,36 @@
ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0)
/
update hrsa_social_archives a SET a.employee_id2=a.employee_id
/
alter table hrsa_social_archives drop column employee_id
/
alter table hrsa_social_archives rename column employee_id2 to employee_id
/
alter table hrsa_social_archives MODIFY (employee_id not null)
/
ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0)
/
update hrsa_fund_archives a SET a.employee_id2=a.employee_id
/
alter table hrsa_fund_archives drop column employee_id
/
alter table hrsa_fund_archives rename column employee_id2 to employee_id
/
alter table hrsa_fund_archives MODIFY (employee_id not null)
/
ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0)
/
update hrsa_other_archives a SET a.employee_id2=a.employee_id
/
alter table hrsa_other_archives drop column employee_id
/
alter table hrsa_other_archives rename column employee_id2 to employee_id
/
alter table hrsa_other_archives MODIFY (employee_id not null)
/
ALTER TABLE hrsa_insurance_base_info ADD employee_type number
/

View File

@ -0,0 +1,10 @@
update hrsa_salary_sob_item a set rounding_mode = (select rounding_mode from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.rounding_mode is null or a.rounding_mode='')
/
update hrsa_salary_sob_item a set pattern = (select pattern from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.pattern is null or a.pattern='')
/
update hrsa_salary_sob_item a set value_type = (select value_type from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.value_type is null or a.value_type='')
/

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,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,4 @@
ALTER TABLE hrsa_salary_sob_item
ADD COLUMN rounding_mode int NULL,
ADD COLUMN pattern int NULL,
ADD COLUMN value_type int NULL;

View File

@ -0,0 +1,12 @@
CREATE TABLE hrsa_salary_bill_item_name (
id bigint PRIMARY KEY,
salary_template_id bigint NOT NULL,
salary_item_id bigint NOT NULL,
salary_item_show_name varchar(255)NOT NULL,
salary_bill_type int NOT NULL,
creator bigint NOT NULL,
create_time TIMESTAMP NOT NULL ,
update_time TIMESTAMP NOT NULL,
delete_type int NOT NULL,
tenant_key varchar(10) NOT NULL
) ;

View File

@ -0,0 +1,8 @@
ALTER TABLE hrsa_social_archives
ALTER employee_id TYPE bigint;
ALTER TABLE hrsa_fund_archives
ALTER employee_id TYPE bigint;
ALTER TABLE hrsa_other_archives
ALTER employee_id TYPE bigint;
ALTER TABLE hrsa_insurance_base_info ADD employee_type int NULL;

View File

@ -0,0 +1,8 @@
update hrsa_salary_sob_item a set rounding_mode = (select rounding_mode from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.rounding_mode is null);
/
update hrsa_salary_sob_item a set pattern = (select pattern from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.pattern is null);
/
update hrsa_salary_sob_item a set value_type = (select value_type from hrsa_salary_item b where b.delete_type=0 and b.id =a.salary_item_id) where a.delete_type=0 and (a.value_type is null);
/

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,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,5 @@
ALTER TABLE hrsa_salary_sob_item
ADD rounding_mode int NULL,
pattern int NULL,
value_type int NULL
GO

View File

@ -0,0 +1,13 @@
CREATE TABLE hrsa_salary_bill_item_name (
id bigint PRIMARY KEY,
salary_template_id bigint NOT NULL,
salary_item_id bigint NOT NULL,
salary_item_show_name varchar(255)NOT NULL,
salary_bill_type int NOT NULL,
creator bigint NOT NULL,
create_time datetime NOT NULL ,
update_time datetime NOT NULL,
delete_type int NOT NULL,
tenant_key varchar(10) NOT NULL
)
GO

View File

@ -0,0 +1,13 @@
ALTER TABLE hrsa_social_archives
ALTER COLUMN employee_id bigint
GO
ALTER TABLE hrsa_fund_archives
ALTER COLUMN employee_id bigint
GO
ALTER TABLE hrsa_other_archives
ALTER COLUMN employee_id bigint
GO
ALTER TABLE hrsa_insurance_base_info ADD employee_type int NULL
GO

View File

@ -0,0 +1,8 @@
update a set a.rounding_mode = b.rounding_mode from hrsa_salary_sob_item a, hrsa_salary_item b where a.salary_item_id=b.id and a.delete_type=0 and (a.rounding_mode is null or a.rounding_mode='')
GO
update a set a.pattern = b.pattern from hrsa_salary_sob_item a, hrsa_salary_item b where a.salary_item_id=b.id and a.delete_type=0 and (a.pattern is null or a.pattern='')
GO
update a set a.value_type = b.value_type from hrsa_salary_sob_item a, hrsa_salary_item b where a.salary_item_id=b.id and a.delete_type=0 and (a.value_type is null or a.value_type='')
GO

View File

@ -0,0 +1,48 @@
ALTER Table hrsa_social_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_social_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_social_archives drop column employee_id;
/
alter table hrsa_social_archives rename column employee_id2 to employee_id;
/
alter table hrsa_social_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_fund_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_fund_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_fund_archives drop column employee_id;
/
alter table hrsa_fund_archives rename column employee_id2 to employee_id;
/
alter table hrsa_fund_archives MODIFY (employee_id not null);
/
ALTER Table hrsa_other_archives Add employee_id2 NUMBER(38,0);
/
update hrsa_other_archives a SET a.employee_id2=a.employee_id;
/
alter table hrsa_other_archives drop column employee_id;
/
alter table hrsa_other_archives rename column employee_id2 to employee_id;
/
alter table hrsa_other_archives MODIFY (employee_id not null);
/
ALTER TABLE hrsa_insurance_base_info ADD employee_type number;
/

View File

@ -77,7 +77,7 @@ public class InitSalaryAction implements Action {
List errorNotice = (List) map.get("errorNotice"); List errorNotice = (List) map.get("errorNotice");
if (CollectionUtils.isNotEmpty(errorNotice)) { if (CollectionUtils.isNotEmpty(errorNotice)) {
log.error("薪存在异常 requestId:{} ,参数:{}, map:{}", requestInfo.getRequestid(), build, map); log.error("薪存在异常 requestId:{} ,参数:{}, map:{}", requestInfo.getRequestid(), build, map);
List<Map<String, String>> excelComments = (List<Map<String, String>>) map.get("errorNotice"); List<Map<String, String>> excelComments = (List<Map<String, String>>) map.get("errorNotice");
StringBuilder message = new StringBuilder(""); StringBuilder message = new StringBuilder("");
for (Map<String, String> comments : excelComments) { for (Map<String, String> comments : excelComments) {
@ -87,7 +87,7 @@ public class InitSalaryAction implements Action {
return FAILURE_AND_CONTINUE; return FAILURE_AND_CONTINUE;
} }
} catch (Exception e) { } catch (Exception e) {
log.error("薪异常", e); log.error("薪异常", e);
requestInfo.getRequestManager().setMessage(e.getMessage()); requestInfo.getRequestManager().setMessage(e.getMessage());
return FAILURE_AND_CONTINUE; return FAILURE_AND_CONTINUE;
} }

View File

@ -662,11 +662,10 @@ public class SIArchivesBiz {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(542533, "其他福利最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(542533, "其他福利最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd"));
} }
// List<InsuranceArchivesOtherSchemePO> oldOtherInfoList = otherSchemeMapper.getOtherByEmployeeId(Collections.singletonList(param.getEmployeeId())); List<Long> otherIds = new ArrayList();
List<InsuranceArchivesOtherSchemePO> oldOtherInfoList = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() otherIds.add(param.getId());
.employeeId(param.getEmployeeId()) List<InsuranceArchivesOtherSchemePO> oldOtherInfoList = otherSchemeMapper.getOtherById(otherIds);
.paymentOrganization(param.getPaymentOrganization())
.build());
if (oldOtherInfoList.size() == 1) { if (oldOtherInfoList.size() == 1) {
InsuranceArchivesOtherSchemePO oldOtherInfo = oldOtherInfoList.get(0); InsuranceArchivesOtherSchemePO oldOtherInfo = oldOtherInfoList.get(0);
InsuranceArchivesOtherSchemePO updateOtherInfo = InsuranceArchivesOtherSchemePO updateOtherInfo =
@ -694,7 +693,48 @@ public class SIArchivesBiz {
otherSchemeMapper.updateById(updateOtherInfo); otherSchemeMapper.updateById(updateOtherInfo);
sqlSession.commit(); sqlSession.commit();
} else { } else {
throw new SalaryRunTimeException("该员工已关联的其他福利档案不存在或存在多条,请处理后再重复当前操作!"); otherSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesOtherSchemePO.builder()
.employeeId(param.getEmployeeId())
.paymentOrganization(param.getPaymentOrganization())
.build());
//新建社保档案并关联主表
InsuranceArchivesOtherSchemePO insertOtherInfo = InsuranceArchivesOtherSchemePO.builder()
.otherSchemeId(param.getOtherSchemeId())
.otherStartTime(StringUtils.isNotBlank(param.getOtherStartTime()) ? param.getOtherStartTime() : null)
.underTake(param.getUnderTake())
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.welfareType(paramReq.getWelfareType().getValue())
.otherEndTime(StringUtils.isNotBlank(param.getOtherEndTime()) ? param.getOtherEndTime() : null)
.employeeId(param.getEmployeeId())
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.createTime(new Date())
.updateTime(new Date())
.nonPayment(param.getNonPayment())
.creator(employeeId)
.paymentOrganization(param.getPaymentOrganization())
.otherPaymentBaseString(paramReq.getPaymentForm())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertOtherInfo.getOtherSchemeId(),insertOtherInfo.getOtherPaymentBaseString())) {
throw new SalaryRunTimeException("其他福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
}
encryptUtil.encrypt(insertOtherInfo, InsuranceArchivesOtherSchemePO.class);
otherSchemeMapper.insert(insertOtherInfo);
sqlSession.commit();
InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId());
if(baseInfoPO != null) {
List<InsuranceArchivesOtherSchemePO> otherInfos = otherSchemeMapper.getOtherByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder()
.employeeId(param.getEmployeeId())
.paymentOrganization(param.getPaymentOrganization())
.build());
baseInfoPO.setOtherArchivesId(otherInfos.get(0).getId());
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
} else {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!"));
}
} }
} finally { } finally {
@ -720,11 +760,10 @@ public class SIArchivesBiz {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(542531, "公积金最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd")); throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(542531, "公积金最后缴纳时间格式错误,正确格式为YYYY-MM或者yyyy-MM-dd"));
} }
// List<InsuranceArchivesFundSchemePO> oldFundInfoList = fundSchemeMapper.getFundByEmployeeId(Collections.singletonList(param.getEmployeeId())); List<Long> fundIds = new ArrayList();
List<InsuranceArchivesFundSchemePO> oldFundInfoList = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() fundIds.add(param.getId());
.employeeId(param.getEmployeeId()) List<InsuranceArchivesFundSchemePO> oldFundInfoList = fundSchemeMapper.getFundById(fundIds);
.paymentOrganization(param.getPaymentOrganization())
.build());
if (oldFundInfoList.size() == 1) { if (oldFundInfoList.size() == 1) {
InsuranceArchivesFundSchemePO oldFundInfo = oldFundInfoList.get(0); InsuranceArchivesFundSchemePO oldFundInfo = oldFundInfoList.get(0);
InsuranceArchivesFundSchemePO updateFundInfo = InsuranceArchivesFundSchemePO.builder() InsuranceArchivesFundSchemePO updateFundInfo = InsuranceArchivesFundSchemePO.builder()
@ -754,7 +793,49 @@ public class SIArchivesBiz {
sqlSession.commit(); sqlSession.commit();
} else { } else {
throw new SalaryRunTimeException("该员工已关联的公积金档案不存在或存在多条,请处理后再重复当前操作!"); fundSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesFundSchemePO.builder()
.employeeId(param.getEmployeeId())
.paymentOrganization(param.getPaymentOrganization())
.build());
//新建社保档案并关联主表
InsuranceArchivesFundSchemePO insertFundInfo = InsuranceArchivesFundSchemePO.builder()
.fundSchemeId(param.getFundSchemeId())
.fundAccount(param.getFundAccount())
.fundEndTime(StringUtils.isNotBlank(param.getFundEndTime()) ? param.getFundEndTime() : null)
.fundStartTime(StringUtils.isNotBlank(param.getFundStartTime()) ? param.getFundStartTime() : null)
.fundPaymentBaseString(paramReq.getPaymentForm())
.supplementFundAccount(param.getSupplementFundAccount())
.creator(employeeId)
.nonPayment(param.getNonPayment())
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.underTake(param.getUnderTake())
.paymentOrganization(param.getPaymentOrganization())
.createTime(new Date())
.updateTime(new Date())
.welfareType(paramReq.getWelfareType().getValue())
.employeeId(param.getEmployeeId())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertFundInfo.getFundSchemeId(),insertFundInfo.getFundPaymentBaseString())) {
throw new SalaryRunTimeException("公积金福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
}
encryptUtil.encrypt(insertFundInfo, InsuranceArchivesFundSchemePO.class);
fundSchemeMapper.insert(insertFundInfo);
sqlSession.commit();
InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId());
if(baseInfoPO != null) {
List<InsuranceArchivesFundSchemePO> fundInfos = fundSchemeMapper.getFundByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder()
.employeeId(param.getEmployeeId())
.paymentOrganization(param.getPaymentOrganization())
.build());
baseInfoPO.setFundArchivesId(fundInfos.get(0).getId());
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
} else {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!"));
}
} }
} finally { } finally {
@ -787,11 +868,9 @@ public class SIArchivesBiz {
// socialSchemeMapper.batchDeleteByEmployeeIds(Collections.singletonList(param.getEmployeeId())); // socialSchemeMapper.batchDeleteByEmployeeIds(Collections.singletonList(param.getEmployeeId()));
//查询已有数据 //查询已有数据
// List<InsuranceArchivesSocialSchemePO> oldSocialInfoList = socialSchemeMapper.getSocialByEmployeeId(Collections.singletonList(param.getEmployeeId())); List<Long> socialIds = new ArrayList();
List<InsuranceArchivesSocialSchemePO> oldSocialInfoList = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder() socialIds.add(param.getId());
.employeeId(param.getEmployeeId()) List<InsuranceArchivesSocialSchemePO> oldSocialInfoList = socialSchemeMapper.getSocialById(socialIds);
.paymentOrganization(param.getPaymentOrganization())
.build());
//组装新数据 //组装新数据
if (oldSocialInfoList.size() == 1) { if (oldSocialInfoList.size() == 1) {
InsuranceArchivesSocialSchemePO oldSocialInfo = oldSocialInfoList.get(0); InsuranceArchivesSocialSchemePO oldSocialInfo = oldSocialInfoList.get(0);
@ -823,7 +902,49 @@ public class SIArchivesBiz {
sqlSession.commit(); sqlSession.commit();
} else { } else {
throw new SalaryRunTimeException("该员工已关联的社保档案不存在或存在多条,请处理后再重复当前操作!"); socialSchemeMapper.deleteByEmployeeIdAndPayOrg(InsuranceArchivesSocialSchemePO.builder()
.employeeId(param.getEmployeeId())
.paymentOrganization(param.getPaymentOrganization())
.build());
//新建社保档案并关联主表
InsuranceArchivesSocialSchemePO insertSocialInfo =
InsuranceArchivesSocialSchemePO.builder()
.welfareType(paramReq.getWelfareType().getValue())
.deleteType(DeleteTypeEnum.NOT_DELETED.getValue())
.socialPaymentBaseString(paramReq.getPaymentForm())
.socialSchemeId(param.getSocialSchemeId())
.socialEndTime(StringUtils.isNotBlank(param.getSocialEndTime()) ? param.getSocialEndTime() : null)
.socialStartTime(StringUtils.isNotBlank(param.getSocialStartTime()) ? param.getSocialStartTime() : null)
.creator(employeeId)
.nonPayment(param.getNonPayment())
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.employeeId(param.getEmployeeId())
.createTime(new Date())
.updateTime(new Date())
.underTake(param.getUnderTake())
.socialAccount(param.getSchemeAccount())
.paymentOrganization(param.getPaymentOrganization())
.build();
//校验福利基数是否符合上下限要求
if (!checkWelBaseLimit(insertSocialInfo.getSocialSchemeId(),insertSocialInfo.getSocialPaymentBaseString())) {
throw new SalaryRunTimeException("社保福利明细中的基数更新内容不符合相关基数上下限要求,请检查后重试!");
}
encryptUtil.encrypt(insertSocialInfo, InsuranceArchivesSocialSchemePO.class);
socialSchemeMapper.insert(insertSocialInfo);
sqlSession.commit();
InsuranceArchivesBaseInfoPO baseInfoPO = getInsuranceBaseInfoMapper().getOneByEmployeeIdAndPayOrg(param.getPaymentOrganization(), param.getEmployeeId());
if(baseInfoPO != null) {
List<InsuranceArchivesSocialSchemePO> socialInfos = socialSchemeMapper.getSocialByEmployeeIdAndPayOrg(InsuranceArchivesEmployeePO.builder()
.employeeId(param.getEmployeeId())
.paymentOrganization(param.getPaymentOrganization())
.build());
baseInfoPO.setSocialArchivesId(socialInfos.get(0).getId());
getInsuranceBaseInfoMapper().updateById(baseInfoPO);
} else {
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(0, "档案不存在!"));
}
} }
} finally { } finally {
@ -959,6 +1080,8 @@ public class SIArchivesBiz {
request.setTaxAgentId(param.getTaxAgentId()); request.setTaxAgentId(param.getTaxAgentId());
request.setExtWelArchiveList(param.isExtWelArchiveList());
apidatas = listPageEmployeePOS(request, operateId); apidatas = listPageEmployeePOS(request, operateId);
return apidatas; return apidatas;
@ -994,7 +1117,11 @@ public class SIArchivesBiz {
Collection<Long> taxAgentIds = param.getTaxAgentIds(); Collection<Long> taxAgentIds = param.getTaxAgentIds();
log.info("从数据库获取档案列表数据开始"); log.info("从数据库获取档案列表数据开始");
sw.start("获取福利档案列表数据"); sw.start("获取福利档案列表数据");
page = socialSchemeMapper.queryEmployeeList(param); if (param.isExtWelArchiveList()) {
page = socialSchemeMapper.queryExtEmployeeList(param);
} else {
page = socialSchemeMapper.queryEmployeeList(param);
}
sw.stop(); sw.stop();
log.info("从数据库获取档案列表数据完成!"); log.info("从数据库获取档案列表数据完成!");
page = page.stream().filter(f -> page = page.stream().filter(f ->
@ -1010,7 +1137,11 @@ public class SIArchivesBiz {
} else { } else {
log.info("从数据库获取档案列表数据开始"); log.info("从数据库获取档案列表数据开始");
sw.start("获取档案列表数据"); sw.start("获取档案列表数据");
page = socialSchemeMapper.queryEmployeeList(param); if (param.isExtWelArchiveList()) {
page = socialSchemeMapper.queryExtEmployeeList(param);
} else {
page = socialSchemeMapper.queryEmployeeList(param);
}
sw.stop(); sw.stop();
log.info("从数据库获取档案列表数据完成!"); log.info("从数据库获取档案列表数据完成!");
pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(), pageInfo = SalaryPageUtil.buildPage(param.getCurrent(), param.getPageSize(),
@ -1072,13 +1203,14 @@ public class SIArchivesBiz {
nameColumn.setFixed("left"); nameColumn.setFixed("left");
list.add(nameColumn); list.add(nameColumn);
list.add(new WeaTableColumn("150px", "个税扣缴义务人", "paymentOrganizationName")); list.add(new WeaTableColumn("150px", "个税扣缴义务人", "paymentOrganizationName"));
list.add(new WeaTableColumn("150px", "分部", "subcompanyName"));
list.add(new WeaTableColumn("150px", "部门", "departmentName")); list.add(new WeaTableColumn("150px", "部门", "departmentName"));
list.add(new WeaTableColumn("150px", "手机号", "mobile")); list.add(new WeaTableColumn("150px", "手机号", "mobile"));
list.add(new WeaTableColumn("150px", "员工状态", "status")); list.add(new WeaTableColumn("150px", "员工状态", "status"));
list.add(new WeaTableColumn("150px", "工号", "jobNum")); list.add(new WeaTableColumn("150px", "工号", "jobNum"));
list.add(new WeaTableColumn("150px", "入职日期", "companystartdate")); list.add(new WeaTableColumn("150px", "入职日期", "companystartdate"));
list.add(new WeaTableColumn("150px", "合同到期日期", "dismissdate")); // list.add(new WeaTableColumn("150px", "合同到期日期", "dismissdate"));
list.add(new WeaTableColumn("150px", "社保方案名称", "socialName")); list.add(new WeaTableColumn("150px", "社保方案名称", "socialName"));
titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k))); titleMap.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> list.add(new WeaTableColumn("150px", v, k)));
@ -1265,6 +1397,7 @@ public class SIArchivesBiz {
map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : ""); map.put("paymentOrganizationName", longTaxAgentPOMap.get(item.getPaymentOrganization()) != null ? longTaxAgentPOMap.get(item.getPaymentOrganization()).getName() : "");
map.put("employeeId", item.getEmployeeId()); map.put("employeeId", item.getEmployeeId());
map.put("departmentName", item.getDepartmentName()); map.put("departmentName", item.getDepartmentName());
map.put("subcompanyName", item.getSubcompanyName());
map.put("departmentId", item.getDepartmentId()); map.put("departmentId", item.getDepartmentId());
map.put("jobNum", item.getJobNum()); map.put("jobNum", item.getJobNum());
map.put("companystartdate", item.getCompanystartdate()); map.put("companystartdate", item.getCompanystartdate());

View File

@ -10,11 +10,11 @@ import java.util.List;
public class SalarySobItemHideBiz { public class SalarySobItemHideBiz {
public List<Long> listSome(SalarySobItemHidePO salarySobPO) { public List<Long> listHideItemIds(SalarySobItemHidePO salarySobPO) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession(); SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try { try {
SalarySobItemHideMapper mapper = sqlSession.getMapper(SalarySobItemHideMapper.class); SalarySobItemHideMapper mapper = sqlSession.getMapper(SalarySobItemHideMapper.class);
return mapper.getById(salarySobPO); return mapper.listHideItemIds(salarySobPO);
} finally { } finally {
sqlSession.close(); sqlSession.close();
} }
@ -53,4 +53,14 @@ public class SalarySobItemHideBiz {
sqlSession.close(); sqlSession.close();
} }
} }
public List<SalarySobItemHidePO> listSome(SalarySobItemHidePO po) {
SqlSession sqlSession = MyBatisFactory.sqlSessionFactory.openSession();
try {
SalarySobItemHideMapper mapper = sqlSession.getMapper(SalarySobItemHideMapper.class);
return mapper.listSome(po);
} finally {
sqlSession.close();
}
}
} }

View File

@ -0,0 +1,22 @@
package com.engine.salary.entity.extemp.param;
import com.engine.salary.util.valid.DataCheck;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author: sy
* @Description: 非系统人员导入参数
* @Date: 2023/7/26
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExtEmpImportParam {
//上传文件id
@DataCheck(require = true,message = "imageId为空")
String imageId;
}

View File

@ -25,4 +25,9 @@ public class DeptInfo {
* 名称 * 名称
*/ */
private String name; private String name;
/**
* 所属分部id
*/
private Long subcompanyid1;
} }

View File

@ -0,0 +1,30 @@
package com.engine.salary.entity.salaryBill.bo;
import com.engine.salary.entity.salaryBill.dto.SalaryBillItemNameDTO;
import com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO;
import org.apache.commons.collections4.CollectionUtils;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author Harryxzy
* @ClassName SalaryBillItemNameBO
* @date 2023/07/19 9:19
* @description 工资单薪资项目展示名称
*/
public class SalaryBillItemNameBO {
public static List<SalaryBillItemNameDTO> convert2ListDTO(List<SalaryBillItemNamePO> SalaryBillItemNamePOList){
if (CollectionUtils.isEmpty(SalaryBillItemNamePOList)) {
return Collections.emptyList();
}
return SalaryBillItemNamePOList.stream()
.map(po -> SalaryBillItemNameDTO.builder()
.salaryItemId(po.getSalaryItemId())
.salaryItemShowName(po.getSalaryItemShowName())
.build())
.collect(Collectors.toList());
}
}

View File

@ -120,6 +120,8 @@ public class SalaryTemplateBO {
.id(String.valueOf(i.getSalaryItemId())) .id(String.valueOf(i.getSalaryItemId()))
.salaryItemId(String.valueOf(i.getSalaryItemId())) .salaryItemId(String.valueOf(i.getSalaryItemId()))
.name(i.getName()) .name(i.getName())
.salaryItemShowName(i.getName())
.originName(i.getName())
.sortedIndex(i.getSortedIndex()) .sortedIndex(i.getSortedIndex())
.build()); .build());
}); });

View File

@ -0,0 +1,30 @@
package com.engine.salary.entity.salaryBill.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Harryxzy
* @ClassName SalaryBillItemNameDTO
* @date 2023/07/19 9:21
* @description 工资单薪资项目展示名称
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryBillItemNameDTO {
/**
* 薪资项目id
*/
private Long salaryItemId;
/**
* 工资单展示名称
*/
private String salaryItemShowName;
}

View File

@ -6,6 +6,7 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author Harryxzy * @author Harryxzy
@ -26,4 +27,7 @@ public class SalaryTemplateReplenishFormDTO {
// 薪资项目设置") // 薪资项目设置")
private List<SalaryTemplateSalaryItemSetListDTO> replenishSalaryTemplateSalaryItemSet; private List<SalaryTemplateSalaryItemSetListDTO> replenishSalaryTemplateSalaryItemSet;
// 工资单项目名称设置
private Map<Long, SalaryBillItemNameDTO> salaryBillItemNameSet;
} }

View File

@ -26,9 +26,15 @@ public class SalaryTemplateSalaryItemListDTO {
// 薪资项目值") // 薪资项目值")
private String salaryItemValue; private String salaryItemValue;
// 薪资项目名称") // 模板展示名称 salaryItemShowName+originName
private String name; private String name;
// 薪资项目修改后展示名称
private String salaryItemShowName;
// 薪资项目名称原始值
private String originName;
// 顺序") // 顺序")
private Integer sortedIndex; private Integer sortedIndex;
} }

View File

@ -29,4 +29,10 @@ public class SalaryTemplateShowFormDTO {
// 薪资项目设置") // 薪资项目设置")
private List<SalaryTemplateSalaryItemSetListDTO> salaryTemplateSalaryItemSet; private List<SalaryTemplateSalaryItemSetListDTO> salaryTemplateSalaryItemSet;
// 补发工资薪资项目设置")
private List<SalaryTemplateSalaryItemSetListDTO> replenishSalaryTemplateSalaryItemSet;
// 工资单项目名称设置
private Map<Long, SalaryBillItemNameDTO> salaryBillItemNameSet;
} }

View File

@ -0,0 +1,46 @@
package com.engine.salary.entity.salaryBill.param;
import lombok.*;
import java.util.List;
/**
* @author Harryxzy
* @ClassName SalaryBillItemNameSaveParam
* @date 2023/07/19 10:20
* @description 设置工资单项目展示名参数
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryBillItemNameSaveParam {
/**
* 工资单模板id
*/
private Long salaryTemplateId;
/**
* 工资单类型0正常工资单1补发工资单
*/
private Integer salaryBillType;
private List<itemShowNameSetting> itemShowNameSetting;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class itemShowNameSetting {
/**
* 薪资项目id
*/
private Long salaryItemId;
/**
* 工资单展示名称
*/
private String salaryItemShowName;
}
}

View File

@ -23,4 +23,9 @@ public class SalaryBillSalaryGroupQueryParam extends BaseQueryParam {
* 前端已有的分组id * 前端已有的分组id
*/ */
private List<String> existSalaryGroupIds; private List<String> existSalaryGroupIds;
/**
* 工资单模板id
*/
private Long salaryTemplateId;
} }

View File

@ -19,4 +19,6 @@ public class SalaryBillSalaryItemQueryParam extends BaseQueryParam {
private Boolean isReplenish; private Boolean isReplenish;
private List<String> existSalaryItemIds; private List<String> existSalaryItemIds;
private Long salaryTemplateId;
} }

View File

@ -104,6 +104,8 @@ public class SalaryTemplateSaveParam {
*/ */
private String feedbackUrl; private String feedbackUrl;
List<SalaryBillItemNameSaveParam> salaryBillItemNameSetting;
public static void checkParam(SalaryTemplateSaveParam saveParam) { public static void checkParam(SalaryTemplateSaveParam saveParam) {
if (saveParam.getSalarySobId() == null) { if (saveParam.getSalarySobId() == null) {
throw new SalaryRunTimeException("薪资账套表的主键id必传;"); throw new SalaryRunTimeException("薪资账套表的主键id必传;");

View File

@ -0,0 +1,71 @@
package com.engine.salary.entity.salaryBill.po;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Collection;
import java.util.Date;
/**
* @author Harryxzy
* @ClassName SalaryBillItemName
* @date 2023/07/18 15:55
* @description 工资单薪资项目展示名称
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryBillItemNamePO {
private Long id;
/**
* 薪资项目id
*/
private Long salaryItemId;
/**
* 薪资项目展示名称
*/
private String salaryItemShowName;
/**
* 工资单模板id
*/
private Long salaryTemplateId;
/**
* 工资单类型0正常工资单1补发工资单
*/
private Integer salaryBillType;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 创建人
*/
private Long creator;
/**
* 是否已删除0未删除1已删除
*/
private Integer deleteType;
/**
* 租户ID
*/
private String tenantKey;
//主键id集合
private Collection<Long> ids;
}

View File

@ -4,11 +4,13 @@ import com.engine.salary.entity.datacollection.DataCollectionEmployee;
import com.engine.salary.entity.salaryformula.dto.SalaryFormulaEmployeeDTO; import com.engine.salary.entity.salaryformula.dto.SalaryFormulaEmployeeDTO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO; import com.engine.salary.entity.salarysob.po.SalarySobBackItemPO;
import com.engine.salary.entity.salarysob.po.SalarySobItemPO;
import com.engine.salary.enums.SalaryRoundingModeEnum; import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum; import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.engine.salary.util.JsonUtil; import com.engine.salary.util.JsonUtil;
import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.SalaryI18nUtil;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
@ -32,9 +34,13 @@ public class SalaryAcctFormulaBO {
* @param salaryItem * @param salaryItem
* @param salarySobBackItems 薪资账套回算项目List * @param salarySobBackItems 薪资账套回算项目List
* @param salarySobBackItemMap 薪资账套回算项目Map * @param salarySobBackItemMap 薪资账套回算项目Map
* @param salaryItemIdKeySalarySobItemPOMap 薪资账套下薪资项目Map
* @return * @return
*/ */
public static String roundResultValue(String value, SalaryItemPO salaryItem, List<SalarySobBackItemPO> salarySobBackItems, Map<Long, SalarySobBackItemPO> salarySobBackItemMap) { public static String roundResultValue(String value, SalaryItemPO salaryItem,
List<SalarySobBackItemPO> salarySobBackItems,
Map<Long, SalarySobBackItemPO> salarySobBackItemMap,
Map<Long, SalarySobItemPO> salaryItemIdKeySalarySobItemPOMap) {
// 值为空不需要四舍五入 // 值为空不需要四舍五入
if (StringUtils.isEmpty(value) || salaryItem == null) { if (StringUtils.isEmpty(value) || salaryItem == null) {
return StringUtils.EMPTY; return StringUtils.EMPTY;
@ -44,10 +50,13 @@ public class SalaryAcctFormulaBO {
if (dataTypeEnum == SalaryDataTypeEnum.STRING) { if (dataTypeEnum == SalaryDataTypeEnum.STRING) {
return value; return value;
} }
Integer salaryItemRoundingMode = salaryItem.getRoundingMode(); // 获取薪资账套副本中的舍入规则和保留位数拿不到再去薪资项目中取
Integer salaryItemPattern = salaryItem.getPattern(); Integer salaryItemRoundingMode = Optional.ofNullable(salaryItemIdKeySalarySobItemPOMap.get(salaryItem.getId())).map(SalarySobItemPO::getRoundingMode)
// 薪资项目是回算项目 .orElse(salaryItem.getRoundingMode());
if(salarySobBackItems != null && salarySobBackItems.size() > 0 && salarySobBackItemMap.containsKey(salaryItem.getId())){ Integer salaryItemPattern = Optional.ofNullable(salaryItemIdKeySalarySobItemPOMap.get(salaryItem.getId())).map(SalarySobItemPO::getPattern)
.orElse(salaryItem.getPattern());
if(CollectionUtils.isNotEmpty(salarySobBackItems) && salarySobBackItemMap.containsKey(salaryItem.getId())){
// 薪资项目是回算项目
salaryItemRoundingMode = salarySobBackItemMap.get(salaryItem.getId()).getRoundingMode(); salaryItemRoundingMode = salarySobBackItemMap.get(salaryItem.getId()).getRoundingMode();
salaryItemPattern = salarySobBackItemMap.get(salaryItem.getId()).getPattern(); salaryItemPattern = salarySobBackItemMap.get(salaryItem.getId()).getPattern();
} }

View File

@ -66,6 +66,6 @@ public class SalaryAccEmployeeListDTO {
private String hireDate; private String hireDate;
//离职日期 //离职日期
@TableTitle(title = "离职日期", dataIndex = "dismissDate", key = "dismissDate") // @TableTitle(title = "离职日期", dataIndex = "dismissDate", key = "dismissDate")
private String dismissDate; private String dismissDate;
} }

View File

@ -82,7 +82,7 @@ public class SalaryArchiveBO {
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "起始发薪日期"), "payStartDate")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "起始发薪日期"), "payStartDate"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "最后发薪日期"), "payEndDate")); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "最后发薪日期"), "payEndDate"));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "入职日期"), "companystartdate").setDisplay(WeaBoolAttr.FALSE)); columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "入职日期"), "companystartdate").setDisplay(WeaBoolAttr.FALSE));
columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "离职日期"), "dismissdate").setDisplay(WeaBoolAttr.FALSE)); // columns.add(new WeaTableColumn("100px", SalaryI18nUtil.getI18nLabel(86187, "离职日期"), "dismissdate").setDisplay(WeaBoolAttr.FALSE));
for (SalaryItemPO salaryItem : salaryItems) { for (SalaryItemPO salaryItem : salaryItems) {
columns.add(new WeaTableColumn("100px", salaryItem.getName(), salaryItem.getId() + SalaryItemConstant.DYNAMIC_SUFFIX)); columns.add(new WeaTableColumn("100px", salaryItem.getName(), salaryItem.getId() + SalaryItemConstant.DYNAMIC_SUFFIX));
} }

View File

@ -3,9 +3,11 @@ package com.engine.salary.entity.salaryformula.bo;
import com.engine.salary.entity.salaryformula.ExpressFormula; import com.engine.salary.entity.salaryformula.ExpressFormula;
import com.engine.salary.entity.salaryformula.dto.ExpressFormulaDTO; import com.engine.salary.entity.salaryformula.dto.ExpressFormulaDTO;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -18,24 +20,36 @@ import java.util.stream.Collectors;
**/ **/
public class SalaryFormulaBO { public class SalaryFormulaBO {
public static List<ExpressFormulaDTO> convert2DTO(List<ExpressFormula> expressFormulas) { public static List<ExpressFormulaDTO> convert2DTO(List<ExpressFormula> expressFormulas, Map<Long, String> returnTypeMap) {
if (CollectionUtils.isEmpty(expressFormulas)) { if (CollectionUtils.isEmpty(expressFormulas)) {
return Collections.emptyList(); return Collections.emptyList();
} }
return expressFormulas.stream() return expressFormulas.stream()
.map(e -> ExpressFormulaDTO.builder() .map(e -> {
.id(e.getId()) String referenceType = returnTypeMap.getOrDefault(e.getId(), "");
.name(e.getName()) ExpressFormulaDTO build = ExpressFormulaDTO.builder()
.formula(e.getFormula()) .id(e.getId())
.description(e.getDescription()) .name(e.getName())
.extendParam(e.getExtendParam()) .formula(e.getFormula())
.module(e.getModule()) .description(e.getDescription())
.parameters(e.getParameters()) .extendParam(e.getExtendParam())
.referenceType(e.getReferenceType()) .module(e.getModule())
.returnType(e.getReturnType()) .parameters(e.getParameters())
.useFor(e.getUseFor()) .referenceType(e.getReferenceType())
.validateType(e.getValidateType()) .returnType(e.getReturnType())
.build()) .useFor(e.getUseFor())
.validateType(e.getValidateType())
.build();
if (StringUtils.isNotBlank(referenceType) && !StringUtils.equals(e.getReferenceType(), referenceType)) {
// 更换了取值方式返回空对象进行前端处理
build.setExtendParam("");
build.setFormula("");
build.setParameters(Collections.emptyList());
build.setReferenceType(referenceType);
return build;
}
return build;
})
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
} }

View File

@ -0,0 +1,26 @@
package com.engine.salary.entity.salaryformula.param;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author Harryxzy
* @ClassName SalaryFormulaDetailQueryParam
* @date 2023/07/25 10:17
* @description
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SalaryFormulaDetailQueryParam {
// 公式id
private Long formulaId;
// 取值类型 sql/formula
private String returnType;
}

View File

@ -147,18 +147,23 @@ public class SalaryItemBO {
.useInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary()) .useInEmployeeSalary(salaryItemPO.getUseInEmployeeSalary())
.useDefault(salaryItemPO.getUseDefault()) .useDefault(salaryItemPO.getUseDefault())
.hideDefault(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault()) .hideDefault(salaryItemPO.getHideDefault() == null ? 0 : salaryItemPO.getHideDefault())
.roundingMode(Optional.ofNullable(salaryRoundingModeEnum) .roundingMode(salaryItemPO.getRoundingMode())
.roundingModeShowValue(Optional.ofNullable(salaryRoundingModeEnum)
.map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel())) .map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel()))
.orElse(StringUtils.EMPTY)) .orElse(StringUtils.EMPTY))
.pattern(salaryItemPO.getPattern()) .pattern(salaryItemPO.getPattern())
.valueType(Optional.ofNullable(salaryValueTypeEnum) .valueType(salaryItemPO.getValueType())
.valueTypeShowValue(Optional.ofNullable(salaryValueTypeEnum)
.map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel())) .map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel()))
.orElse(StringUtils.EMPTY)) .orElse(StringUtils.EMPTY))
.dataType(Optional.ofNullable(salaryDataTypeEnum) .dataType(salaryItemPO.getDataType())
.dataTypeShowValue(Optional.ofNullable(salaryDataTypeEnum)
.map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel())) .map(e -> SalaryI18nUtil.getI18nLabel(e.getLabelId(), e.getDefaultLabel()))
.orElse(StringUtils.EMPTY)) .orElse(StringUtils.EMPTY))
.formulaId(salaryItemPO.getFormulaId()) .formulaId(salaryItemPO.getFormulaId())
.formulaContent(formulaMap.getOrDefault(salaryItemPO.getFormulaId(),"")) .formulaContent(formulaMap.getOrDefault(salaryItemPO.getFormulaId(),""))
.originFormulaContent(salaryValueTypeEnum.getValue() == SalaryValueTypeEnum.FORMULA.getValue() ? formulaMap.getOrDefault(salaryItemPO.getFormulaId(),"") : "")
.originSqlContent(salaryValueTypeEnum.getValue() == SalaryValueTypeEnum.SQL.getValue() ? formulaMap.getOrDefault(salaryItemPO.getFormulaId(),"") : "")
.taxDeclarationColumn(buildTaxDeclarationColumn(salaryItemPO.getCode())) .taxDeclarationColumn(buildTaxDeclarationColumn(salaryItemPO.getCode()))
.canDelete(true) .canDelete(true)
.canEdit(openFormulaForcedEditing ||Objects.equals(salaryItemPO.getCanEdit(), NumberUtils.INTEGER_ONE)) .canEdit(openFormulaForcedEditing ||Objects.equals(salaryItemPO.getCanEdit(), NumberUtils.INTEGER_ONE))

View File

@ -75,6 +75,11 @@ public class SalaryItemFormDTO {
//公式内容") //公式内容")
private String formulaContent; private String formulaContent;
// 用于前端展示 公式原始内容
private String originFormulaContent;
// 用于前端展示 原始sql
private String originSqlContent;
//备注") //备注")
private String description; private String description;

View File

@ -55,9 +55,12 @@ public class SalaryItemSobListDTO {
private Integer hideDefault; private Integer hideDefault;
//进位规则 //进位规则
@SalaryTableColumn(text = "进位规则", width = "10%", column = "roundingMode",transmethod = "com.engine.salary.transmethod.TransMethod.roundingMode") @SalaryTableColumn(text = "进位规则", width = "10%", column = "roundingModeShowValue",transmethod = "com.engine.salary.transmethod.TransMethod.roundingMode")
@TableTitle(title = "进位规则",dataIndex = "roundingMode",key = "roundingMode") @TableTitle(title = "进位规则",dataIndex = "roundingModeShowValue",key = "roundingModeShowValue")
private String roundingMode; private String roundingModeShowValue;
private Integer roundingMode;
//保留小数位 //保留小数位
@SalaryTableColumn(text = "保留小数位", width = "10%", column = "pattern") @SalaryTableColumn(text = "保留小数位", width = "10%", column = "pattern")
@ -65,15 +68,19 @@ public class SalaryItemSobListDTO {
private Integer pattern; private Integer pattern;
//取值方式 //取值方式
@SalaryTableColumn(text = "取值方式", width = "10%", column = "valueType",transmethod = "com.engine.salary.transmethod.TransMethod.datasource") @SalaryTableColumn(text = "取值方式", width = "10%", column = "valueTypeShowValue",transmethod = "com.engine.salary.transmethod.TransMethod.datasource")
@TableTitle(title = "取值方式",dataIndex = "valueType",key = "valueType") @TableTitle(title = "取值方式",dataIndex = "valueTypeShowValue",key = "valueTypeShowValue")
private String valueType; private String valueTypeShowValue;
private Integer valueType;
/** /**
* @see SalaryDataTypeEnum * @see SalaryDataTypeEnum
*/ */
@SalaryTableColumn(text = "字段类型", width = "10%", column = "dataType",transmethod = "com.engine.salary.transmethod.TransMethod.dataType") @SalaryTableColumn(text = "字段类型", width = "10%", column = "dataTypeShowValue",transmethod = "com.engine.salary.transmethod.TransMethod.dataType")
@TableTitle(title = "字段类型",dataIndex = "dataType",key = "dataType") @TableTitle(title = "字段类型",dataIndex = "dataTypeShowValue",key = "dataTypeShowValue")
private String dataTypeShowValue;
private String dataType; private String dataType;
//公式id //公式id
@ -86,6 +93,11 @@ public class SalaryItemSobListDTO {
@TableTitle(title = "个税申报表对应字段",dataIndex = "taxDeclarationColumn",key = "taxDeclarationColumn") @TableTitle(title = "个税申报表对应字段",dataIndex = "taxDeclarationColumn",key = "taxDeclarationColumn")
private String taxDeclarationColumn; private String taxDeclarationColumn;
// 用于前端展示 公式原始内容
private String originFormulaContent;
// 用于前端展示 原始sql
private String originSqlContent;
//备注 //备注
@SalaryTableColumn(text = "备注", width = "10%", column = "description") @SalaryTableColumn(text = "备注", width = "10%", column = "description")
@TableTitle(title = "备注",dataIndex = "description",key = "description") @TableTitle(title = "备注",dataIndex = "description",key = "description")

View File

@ -7,6 +7,7 @@ import com.engine.salary.entity.salaryitem.bo.SalaryItemBO;
import com.engine.salary.entity.salaryitem.po.SalaryItemPO; import com.engine.salary.entity.salaryitem.po.SalaryItemPO;
import com.engine.salary.entity.salarysob.dto.*; import com.engine.salary.entity.salarysob.dto.*;
import com.engine.salary.entity.salarysob.po.*; import com.engine.salary.entity.salarysob.po.*;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.enums.salarysob.IncomeCategoryEnum;
import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.SalaryI18nUtil;
@ -120,17 +121,22 @@ public class SalarySobItemAggregateBO {
SalarySobItemPO salarySobItemPO = v.get(i); SalarySobItemPO salarySobItemPO = v.get(i);
SalaryItemPO salaryItemPO = salaryItemMap.get(salarySobItemPO.getSalaryItemId()); SalaryItemPO salaryItemPO = salaryItemMap.get(salarySobItemPO.getSalaryItemId());
if (salaryItemPO != null) { if (salaryItemPO != null) {
Integer valueType = Optional.ofNullable(salarySobItemPO.getValueType()).orElse(salaryItemPO.getValueType());
items.add(SalarySobItemDTO.builder() items.add(SalarySobItemDTO.builder()
.id(salarySobItemPO.getId()) .id(salarySobItemPO.getId())
.salarySobId(salarySob.getId()) .salarySobId(salarySob.getId())
.salaryItemGroupId(k) .salaryItemGroupId(k)
.salaryItemId(salaryItemPO.getId()) .salaryItemId(salaryItemPO.getId())
.dateType(salaryItemPO.getDataType()) .dataType(salaryItemPO.getDataType())
.valueType(salaryItemPO.getValueType()) .valueType(valueType)
.roundingMode(Optional.ofNullable(salarySobItemPO.getRoundingMode()).orElse(salaryItemPO.getRoundingMode()))
.pattern(Optional.ofNullable(salarySobItemPO.getPattern()).orElse(salaryItemPO.getPattern()))
.name(salaryItemPO.getName()) .name(salaryItemPO.getName())
.itemHide(salarySobItemPO.getItemHide()) .itemHide(salarySobItemPO.getItemHide())
.formulaId(salarySobItemPO.getFormulaId()) .formulaId(salarySobItemPO.getFormulaId())
.formulaContent(formulaMap.getOrDefault(salarySobItemPO.getFormulaId(), "")) .formulaContent(formulaMap.getOrDefault(salarySobItemPO.getFormulaId(), ""))
.originFormulaContent(valueType == SalaryValueTypeEnum.FORMULA.getValue() ? formulaMap.getOrDefault(salarySobItemPO.getFormulaId(), "") : "")
.originSqlContent(valueType == SalaryValueTypeEnum.SQL.getValue() ? formulaMap.getOrDefault(salarySobItemPO.getFormulaId(), "") : "")
.taxDeclarationColumn(SalaryItemBO.buildTaxDeclarationColumn(salaryItemPO.getCode())) .taxDeclarationColumn(SalaryItemBO.buildTaxDeclarationColumn(salaryItemPO.getCode()))
.sortedIndex(salarySobItemPO.getSortedIndex()) .sortedIndex(salarySobItemPO.getSortedIndex())
.canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1)) .canEdit(openFormulaForcedEditing || Objects.equals(salaryItemPO.getCanEdit(), 1))
@ -172,7 +178,7 @@ public class SalarySobItemAggregateBO {
.salarySobId(salarySob.getId()) .salarySobId(salarySob.getId())
.salaryItemId(salaryItem.getId()) .salaryItemId(salaryItem.getId())
.salaryItemGroupId(0L) .salaryItemGroupId(0L)
.dateType(salaryItem.getDataType()) .dataType(salaryItem.getDataType())
.name(salaryItem.getName()) .name(salaryItem.getName())
.formulaId(salarySobBackItem.getFormulaId()) .formulaId(salarySobBackItem.getFormulaId())
.formulaContent(formulaMap.getOrDefault(salarySobBackItem.getFormulaId(), "输入")) .formulaContent(formulaMap.getOrDefault(salarySobBackItem.getFormulaId(), "输入"))

View File

@ -63,7 +63,7 @@ public class SalarySobItemDTO {
//取值方式 @see SalaryValueTypeEnum //取值方式 @see SalaryValueTypeEnum
private Integer valueType; private Integer valueType;
private String dateType; private String dataType;
//数据来源展示名称 //数据来源展示名称
private String dataSource; private String dataSource;
@ -77,6 +77,12 @@ public class SalarySobItemDTO {
//公式内容 //公式内容
private String formulaContent; private String formulaContent;
// 用于前端展示 公式原始内容
private String originFormulaContent;
// 用于前端展示 原始sql
private String originSqlContent;
//个税申报表对应字段 //个税申报表对应字段
private String taxDeclarationColumn; private String taxDeclarationColumn;
@ -93,4 +99,14 @@ public class SalarySobItemDTO {
//该分类是否隐藏0不隐藏1隐藏 //该分类是否隐藏0不隐藏1隐藏
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
private Long itemHide; private Long itemHide;
/**
* 进位规则
*/
private Integer roundingMode;
/**
* 保留小数位数
*/
private Integer pattern;
} }

View File

@ -0,0 +1,86 @@
package com.engine.salary.entity.salarysob.dto;
import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum;
import com.engine.salary.util.valid.DataCheck;
import com.engine.salary.util.valid.RuntimeTypeEnum;
import com.engine.salary.util.valid.ValidTypeEnum;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* 薪资账套-薪资项目表单
* <p>Copyright: Copyright (c) 2022</p>
* <p>Company: 泛微软件</p>
*
* @author xzy
* @version 1.0
**/
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class SalarySobItemFormDTO {
//主键id")
@JsonSerialize(using = ToStringSerializer.class)
@DataCheck(require = true, runtime = {RuntimeTypeEnum.UPDATE}, message = "id不允许为空")
private Long id;
//名称")
private String name;
//核算时隐藏")
@DataCheck(require = true, runtime = {RuntimeTypeEnum.UPDATE}, message = "核算时隐藏不允许为空")
private Integer itemHide;
//字段类型
/**
* @see SalaryDataTypeEnum
*/
private String dataType;
//舍入规则")
/**
* @see SalaryRoundingModeEnum
*/
@DataCheck(require = true, runtime = {RuntimeTypeEnum.UPDATE}, message = "舍入规则不允许为空")
private Integer roundingMode;
//保留小数位")
@DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 6, message = "小数位最多为6")
private Integer pattern;
//取值方式")
/**
* @see SalaryValueTypeEnum
*/
@DataCheck(require = true, runtime = {RuntimeTypeEnum.UPDATE}, message = "取值方式不允许为空")
private Integer valueType;
//公式")
private Long formulaId;
//公式内容")
private String formulaContent;
// 用于前端展示 公式原始内容
private String originFormulaContent;
// 用于前端展示 原始sql
private String originSqlContent;
//备注")
private String description;
//是否可以编辑")
private Integer canEdit;
// 薪资档案引用0薪资档案未引用1薪资档案引用
private Integer useInEmployeeSalary;
}

View File

@ -77,6 +77,22 @@ public class SalarySobItemSaveParam {
private Long itemHide; private Long itemHide;
private Boolean canDelete; private Boolean canDelete;
/**
* 进位规则
*/
private Integer roundingMode;
/**
* 保留小数位数
*/
private Integer pattern;
/**
* 取值方式
*/
private Integer valueType;
} }
@Data @Data

View File

@ -1,5 +1,7 @@
package com.engine.salary.entity.salarysob.po; package com.engine.salary.entity.salarysob.po;
import com.engine.salary.enums.SalaryRoundingModeEnum;
import com.engine.salary.enums.SalaryValueTypeEnum;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@ -100,6 +102,26 @@ public class SalarySobItemPO {
*/ */
private Date updateTime; private Date updateTime;
/**
* 进位规则
*
* @see SalaryRoundingModeEnum
*/
private Integer roundingMode;
/**
* 保留的小数位数
*/
private Integer pattern;
/**
* 取值方式
*
* @see SalaryValueTypeEnum
*/
private Integer valueType;
//该分类是否隐藏0不隐藏1隐藏 //该分类是否隐藏0不隐藏1隐藏
private Long itemHide; private Long itemHide;

View File

@ -129,7 +129,7 @@ public class InsuranceComparisonResultBO {
*/ */
public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS, Map<Long, String> schemeIdNameMap) { public static List<Map<String, Object>> buildComparisonTableData(List<AccountExportPO> accountExportPOS, List<ExcelAccountExportPO> excelAccountExportPOS, Map<Long, String> schemeIdNameMap) {
Map<String, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getWorkcode); Map<Long, List<ExcelAccountExportPO>> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getEmployeeId);
// Map<String, List<AccountExportPO>> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode); // Map<String, List<AccountExportPO>> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode);
List<TaxAgentPO> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll(); List<TaxAgentPO> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
@ -172,7 +172,7 @@ public class InsuranceComparisonResultBO {
map.put("otherSchemeName", schemeIdNameMap.get(accountExportPO.getOtherSchemeId())); map.put("otherSchemeName", schemeIdNameMap.get(accountExportPO.getOtherSchemeId()));
//线下值 //线下值
List<ExcelAccountExportPO> excelResultValueList = excelResultMap.get(accountExportPO.getWorkcode()); List<ExcelAccountExportPO> excelResultValueList = excelResultMap.get(accountExportPO.getEmployeeId());
ExcelAccountExportPO excelAccountExportPO = new ExcelAccountExportPO(); ExcelAccountExportPO excelAccountExportPO = new ExcelAccountExportPO();
if (excelResultValueList != null && excelResultValueList.size() == 1) { if (excelResultValueList != null && excelResultValueList.size() == 1) {
excelAccountExportPO = excelResultValueList.get(0); excelAccountExportPO = excelResultValueList.get(0);

View File

@ -81,6 +81,7 @@ public class InsuranceArchivesBaseInfoBO {
.creator(currentEmployeeId) .creator(currentEmployeeId)
.deleteType(NumberUtils.INTEGER_ZERO) .deleteType(NumberUtils.INTEGER_ZERO)
.tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY) .tenantKey(SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY)
.employeeType(change.getEmployeeType())
.build()); .build());
} }
// 如果是删除 说明如果有档案并且是在缴纳中才处理没档案不用管 // 如果是删除 说明如果有档案并且是在缴纳中才处理没档案不用管

View File

@ -115,4 +115,9 @@ public class InsuranceArchivesListParam extends BaseQueryParam {
* 人事状态 * 人事状态
*/ */
private List<String> personnelStatuses; private List<String> personnelStatuses;
/**
* 是否是外部系统档案
*/
private boolean extWelArchiveList;
} }

View File

@ -1,5 +1,6 @@
package com.engine.salary.entity.siarchives.po; package com.engine.salary.entity.siarchives.po;
import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
@ -79,6 +80,13 @@ public class InsuranceArchivesBaseInfoPO {
*/ */
private String runStatus; private String runStatus;
/**
* 人员类型,0或null组织架构,1非系统人员
*
* @see DataCollectionEmployeeTypeEnum
*/
private Integer employeeType;
//---------条件------- //---------条件-------
private Collection<Long> ids; private Collection<Long> ids;
private Collection<Long> employeeIds; private Collection<Long> employeeIds;

View File

@ -35,6 +35,10 @@ public class InsuranceArchivesEmployeePO {
private String telephone; private String telephone;
private String departmentName; private String departmentName;
/**
* 分部
*/
private String subcompanyName;
private BigDecimal position; private BigDecimal position;

View File

@ -54,6 +54,7 @@ public enum SalaryValueTypeEnum implements BaseEnum<Integer> {
return null; return null;
} }
public static String getDefaultLabelByValue(Integer value) { public static String getDefaultLabelByValue(Integer value) {
if (value == null) { if (value == null) {
return ""; return "";

View File

@ -87,4 +87,19 @@ public interface EmployMapper {
List<HrmInfoDTO> listHrmInfoByIdAndName(@Param("param") HrmQueryParam param); List<HrmInfoDTO> listHrmInfoByIdAndName(@Param("param") HrmQueryParam param);
/**
* 根据部门名称查询部门
*/
List<DeptInfo> getDeptInfosByName(String name);
/**
* 根据分部名称查询分部
*/
List<SubCompanyInfo> getSubCompanyInfosByName(String name);
/**
* 根据部门id查询部门
*/
DeptInfo getDeptInfoById(Long id);
} }

View File

@ -233,8 +233,10 @@
e.mobile as mobile, e.mobile as mobile,
e.subcompanyid1 as subcompanyid, e.subcompanyid1 as subcompanyid,
e.departmentid as departmentId, e.departmentid as departmentId,
d.DEPARTMENTNAME as departmentName,
e.jobtitle as jobtitleId e.jobtitle as jobtitleId
from hrmresource e from hrmresource e
left join hrmdepartment d on e.departmentid = d.id
where e.status not in (7) where e.status not in (7)
and (e.accounttype is null or e.accounttype = 0) and (e.accounttype is null or e.accounttype = 0)
</select> </select>
@ -348,4 +350,26 @@
</if> </if>
</select> </select>
<select id="getDeptInfosByName" resultType="com.engine.salary.entity.hrm.DeptInfo">
select d.departmentname as name,
d.id as id,
d.subcompanyid1 as subcompanyid1
from hrmdepartment d
where d.departmentname = #{name}
</select>
<select id="getSubCompanyInfosByName" resultType="com.engine.salary.entity.hrm.SubCompanyInfo">
select d.subcompanyname as name,
d.id as id
from hrmsubcompany d
where d.subcompanyname = #{name}
</select>
<select id="getDeptInfoById" resultType="com.engine.salary.entity.hrm.DeptInfo">
select d.departmentname as name,
d.id as id,
d.subcompanyid1 as subcompanyid1
from hrmdepartment d
where d.id = #{id}
</select>
</mapper> </mapper>

View File

@ -0,0 +1,102 @@
package com.engine.salary.mapper.salarybill;
import com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO;
import org.apache.ibatis.annotations.Param;
import java.util.Collection;
import java.util.List;
/**
* @author Harryxzy
* @ClassName SalaryBillItemNameMapper
* @date 2023/07/18 15:58
* @description 工资单薪资项目展示名
*/
public interface SalaryBillItemNameMapper {
/**
* 查询所有记录
*
* @return 返回集合没有返回空List
*/
List<SalaryBillItemNamePO> listAll();
/**
* 条件查询
*
* @return 返回集合没有返回空List
*/
List<SalaryBillItemNamePO> listSome(SalaryBillItemNamePO salaryBillItemNamePO);
/**
* 根据主键查询
*
* @param id 主键
* @return 返回记录没有返回null
*/
SalaryBillItemNamePO getById(Long id);
/**
* 新增忽略null字段
*
* @param salaryBillItemNamePO 新增的记录
* @return 返回影响行数
*/
int insertIgnoreNull(SalaryBillItemNamePO salaryBillItemNamePO);
/**
* 修改修改所有字段
*
* @param salaryBillItemNamePO 修改的记录
* @return 返回影响行数
*/
int update(SalaryBillItemNamePO salaryBillItemNamePO);
/**
* 修改忽略null字段
*
* @param salaryBillItemNamePO 修改的记录
* @return 返回影响行数
*/
int updateIgnoreNull(SalaryBillItemNamePO salaryBillItemNamePO);
/**
* 删除记录
*
* @param id 待删除的记录id
* @return 返回影响行数
*/
int delete(Long id);
/**
* 批量更新
* @param salaryBillItemNamePO
*/
void batchUpdate(@Param("collection") List<SalaryBillItemNamePO> salaryBillItemNamePO);
/**
* 批量插入
* @param salaryBillItemNamePO
*/
void batchInsert(@Param("collection") List<SalaryBillItemNamePO> salaryBillItemNamePO);
/**
* 根据薪资项目模板id模板类型批量删除
* @param salaryItemIds
* @param salaryTemplateId
* @param salaryBillType
*/
void deleteByItemIdsAndTemplateId(@Param("salaryItemIds") List<Long> salaryItemIds, @Param("salaryTemplateId") Long salaryTemplateId, @Param("salaryBillType") Integer salaryBillType);
/**
* 根据idList删除
* @param ids
*/
void deleteByIds(@Param("collection") List<Long> ids);
/**
* 根据模板id删除
* @param ids
*/
void deleteByTemplateIds(@Param("collection") Collection<Long> ids);
}

View File

@ -0,0 +1,344 @@
<?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.salarybill.SalaryBillItemNameMapper">
<resultMap id="BaseResultMap" type="com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO">
<result column="id" property="id" />
<result column="salary_item_id" property="salaryItemId" />
<result column="salary_item_show_name" property="salaryItemShowName" />
<result column="salary_template_id" property="salaryTemplateId" />
<result column="delete_type" property="deleteType" />
<result column="creator" property="creator" />
<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.salary_item_id
, t.salary_item_show_name
, t.salary_template_id
, t.salary_bill_type
, t.delete_type
, t.creator
, t.create_time
, t.update_time
, t.tenant_key
</sql>
<!-- 查询全部 -->
<select id="listAll" resultMap="BaseResultMap">
SELECT
<include refid="baseColumns" />
FROM hrsa_salary_bill_item_name t
WHERE delete_type = 0
</select>
<!-- 根据主键获取单条记录 -->
<select id="getById" resultMap="BaseResultMap" parameterType="Long">
SELECT
<include refid="baseColumns" />
FROM hrsa_salary_bill_item_name t
WHERE id = #{id} AND delete_type = 0
</select>
<!-- 条件查询 -->
<select id="listSome" resultMap="BaseResultMap" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO">
SELECT
<include refid="baseColumns" />
FROM hrsa_salary_bill_item_name t
WHERE delete_type = 0
<if test="id != null">
AND id = #{id}
</if>
<if test="salaryItemId != null">
AND salary_item_id = #{salaryItemId}
</if>
<if test="salaryItemShowName != null">
AND salary_item_show_name = #{salaryItemShowName}
</if>
<if test="salaryTemplateId != null">
AND salary_template_id = #{salaryTemplateId}
</if>
<if test="salaryBillType != null">
AND salary_bill_type = #{salaryBillType}
</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>
<!-- 插入不为NULL的字段 -->
<insert id="insertIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO">
INSERT INTO hrsa_salary_bill_item_name
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="salaryItemId != null">
salary_item_id,
</if>
<if test="salaryItemShowName != null">
salary_item_show_name,
</if>
<if test="salaryTemplateId != null">
salary_template_id,
</if>
<if test="salaryBillType != null">
salary_bill_type,
</if>
<if test="creator != null">
creator,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deleteType != null">
delete_type,
</if>
<if test="tenantKey != null">
tenant_key,
</if>
</trim>
<trim prefix="VALUES (" suffix=")" suffixOverrides=",">
<if test="id != null" >
#{id},
</if>
<if test="salaryItemId != null" >
#{salaryItemId},
</if>
<if test="salaryItemShowName != null" >
#{salaryItemShowName},
</if>
<if test="salaryTemplateId != null" >
#{salaryTemplateId},
</if>
<if test="salaryBillType != null" >
#{salaryBillType},
</if>
<if test="creator != null">
#{creator},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="deleteType != null">
#{deleteType},
</if>
<if test="tenantKey != null">
#{tenantKey},
</if>
</trim>
</insert>
<insert id="batchInsert">
INSERT INTO hrsa_salary_bill_item_name (
id,
salary_template_id,
salary_item_id,
salary_item_show_name,
salary_bill_type,
creator,
create_time,
update_time,
delete_type,
tenant_key
)
VALUES
<foreach collection="collection" item="item" separator=",">
(
#{item.id},
#{item.salaryTemplateId},
#{item.salaryItemId},
#{item.salaryItemShowName},
#{item.salaryBillType},
#{item.creator},
#{item.createTime},
#{item.updateTime},
#{item.deleteType},
#{item.tenantKey}
)
</foreach>
</insert>
<insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_salary_bill_item_name (
id,
salary_template_id,
salary_item_id,
salary_item_show_name,
salary_bill_type,
creator,
create_time,
update_time,
delete_type,
tenant_key
)
<foreach collection="collection" item="item" separator="union all">
select
#{item.id,jdbcType=DOUBLE},
#{item.salaryTemplateId,jdbcType=DOUBLE},
#{item.salaryItemId,jdbcType=DOUBLE},
#{item.salaryItemShowName,jdbcType=VARCHAR},
#{item.salaryBillType,jdbcType=INTEGER},
#{item.creator,jdbcType=DOUBLE},
#{item.createTime,jdbcType=DATE},
#{item.updateTime,jdbcType=DATE},
#{item.deleteType,jdbcType=INTEGER},
#{item.tenantKey,jdbcType=VARCHAR}
from dual
</foreach>
</insert>
<insert id="batchInsert" databaseId="sqlserver">
<foreach collection="collection" item="item" separator=";">
INSERT INTO hrsa_salary_bill_item_name (
id,
salary_template_id,
salary_item_id,
salary_item_show_name,
salary_bill_type,
creator,
create_time,
update_time,
delete_type,
tenant_key
)
VALUES
(
#{item.id},
#{item.salaryTemplateId},
#{item.salaryItemId},
#{item.salaryItemShowName},
#{item.salaryBillType},
#{item.creator},
#{item.createTime},
#{item.updateTime},
#{item.deleteType},
#{item.tenantKey}
)
</foreach>
</insert>
<!-- 更新,更新全部字段 -->
<update id="update" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO">
UPDATE hrsa_salary_bill_item_name
<set>
salary_item_id=#{salaryItemId},
salary_item_show_name=#{salaryItemShowName},
salary_template_id=#{salaryTemplateId},
salary_bill_type=#{salaryBillType},
creator=#{creator},
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.salaryBill.po.SalaryBillItemNamePO">
UPDATE hrsa_salary_bill_item_name
<set>
<if test="salaryItemId != null" >
salary_item_id=#{salaryItemId},
</if>
<if test="salaryItemShowName != null" >
salary_item_show_name=#{salaryItemShowName},
</if>
<if test="salaryTemplateId != null" >
salary_template_id=#{salaryTemplateId},
</if>
<if test="salaryBillType != null" >
salary_bill_type=#{salaryBillType},
</if>
<if test="creator != null" >
creator=#{creator},
</if>
<if test="create_time != 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>
<update id="batchUpdate">
UPDATE hrsa_salary_bill_item_name
<trim prefix="set" suffixOverrides=",">
<trim prefix="salary_item_show_name = case" suffix="end,">
<foreach collection="collection" item="item" index="index">
WHEN id = #{item.id} THEN #{item.salaryItemShowName}
</foreach>
</trim>
<trim prefix="update_time = case" suffix="end,">
<foreach collection="collection" item="item" index="index">
WHEN id = #{item.id} THEN #{item.updateTime}
</foreach>
</trim>
</trim>
WHERE delete_type = 0
AND id IN
<foreach collection="collection" item="item" open="(" close=")" separator=",">
#{item.id}
</foreach>
</update>
<!-- 根据主键删除记录 -->
<delete id="delete" parameterType="com.engine.salary.entity.salaryBill.po.SalaryBillItemNamePO">
UPDATE hrsa_salary_bill_item_name
SET delete_type=1
WHERE id = #{id} AND delete_type = 0
</delete>
<delete id="deleteByItemIdsAndTemplateId">
UPDATE hrsa_salary_bill_item_name
SET delete_type=1
WHERE delete_type = 0
AND salary_template_id = #{salaryTemplateId}
AND salary_bill_type = #{salaryBillType}
AND salary_item_id IN
<foreach collection="salaryItemIds" item="itemId" open="(" close=")" separator=",">
#{itemId}
</foreach>
</delete>
<delete id="deleteByIds">
UPDATE hrsa_salary_bill_item_name
SET delete_type=1
WHERE delete_type = 0
AND id IN
<foreach collection="collection" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</delete>
<delete id="deleteByTemplateIds">
UPDATE hrsa_salary_bill_item_name
SET delete_type=1
WHERE delete_type = 0
AND salary_template_id IN
<foreach collection="collection" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -73,7 +73,8 @@
create_time, create_time,
update_time, update_time,
tenant_key, tenant_key,
salary_acct_type salary_acct_type,
employee_type
) )
VALUES VALUES
<foreach collection="collection" item="item" separator=","> <foreach collection="collection" item="item" separator=",">
@ -89,7 +90,8 @@
#{item.createTime}, #{item.createTime},
#{item.updateTime}, #{item.updateTime},
#{item.tenantKey}, #{item.tenantKey},
#{item.salaryAcctType} #{item.salaryAcctType},
#{item.employeeType}
) )
</foreach> </foreach>
</insert> </insert>
@ -106,7 +108,8 @@
create_time, create_time,
update_time, update_time,
tenant_key, tenant_key,
salary_acct_type salary_acct_type,
employee_type
) )
<foreach collection="collection" item="item" separator="union all"> <foreach collection="collection" item="item" separator="union all">
@ -122,7 +125,8 @@
#{item.createTime,jdbcType=DATE}, #{item.createTime,jdbcType=DATE},
#{item.updateTime,jdbcType=DATE}, #{item.updateTime,jdbcType=DATE},
#{item.tenantKey,jdbcType=VARCHAR}, #{item.tenantKey,jdbcType=VARCHAR},
#{item.salaryAcctType,jdbcType=INTEGER} #{item.salaryAcctType,jdbcType=INTEGER},
#{item.employeeType,jdbcType=INTEGER}
from dual from dual
</foreach> </foreach>
</insert> </insert>
@ -140,7 +144,8 @@
create_time, create_time,
update_time, update_time,
tenant_key, tenant_key,
salary_acct_type salary_acct_type,
employee_type
) )
VALUES VALUES
( (
@ -155,7 +160,8 @@
#{item.createTime}, #{item.createTime},
#{item.updateTime}, #{item.updateTime},
#{item.tenantKey}, #{item.tenantKey},
#{item.salaryAcctType} #{item.salaryAcctType},
#{item.employeeType}
) )
</foreach> </foreach>
</insert> </insert>
@ -737,7 +743,7 @@
<!-- 更新不为NULL的字段 --> <!-- 更新不为NULL的字段 -->
<update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryitem.po.SalaryItemPO"> <update id="updateIgnoreNull" parameterType="com.engine.salary.entity.salaryBill.po.SalarySendInfoPO">
UPDATE hrsa_salary_send_info UPDATE hrsa_salary_send_info
<set> <set>
<if test="salarySendId != null"> <if test="salarySendId != null">

View File

@ -13,7 +13,7 @@ public interface SalarySobItemHideMapper {
* @param salarySobPO * @param salarySobPO
* @return * @return
*/ */
List<Long> getById(SalarySobItemHidePO salarySobPO); List<Long> listHideItemIds(SalarySobItemHidePO salarySobPO);
/*** /***
* @description 删除薪资账套的薪资项目隐藏信息 * @description 删除薪资账套的薪资项目隐藏信息
@ -28,4 +28,5 @@ public interface SalarySobItemHideMapper {
void updateByItemId(SalarySobItemHidePO salarySobGroupItemHidePO); void updateByItemId(SalarySobItemHidePO salarySobGroupItemHidePO);
List<SalarySobItemHidePO> listSome(@Param("param") SalarySobItemHidePO po);
} }

View File

@ -12,7 +12,7 @@
<!-- 根据账套id获取关闭显示开关的itemID --> <!-- 根据账套id获取关闭显示开关的itemID -->
<select id="getById" resultType="java.lang.Long"> <select id="listHideItemIds" resultType="java.lang.Long">
SELECT salary_item_id FROM hrsa_salary_item_hide SELECT salary_item_id FROM hrsa_salary_item_hide
where delete_type=0 where delete_type=0
and salary_sob_id=#{salarySobId} and salary_sob_id=#{salarySobId}
@ -20,6 +20,35 @@
<if test="isGroup!=null"> <if test="isGroup!=null">
and is_group=#{isGroup} and is_group=#{isGroup}
</if> </if>
<if test="salaryItemId!=null">
and salary_item_id=#{salaryItemId}
</if>
</select>
<select id="listSome" resultType="com.engine.salary.entity.salarysob.po.SalarySobItemHidePO">
SELECT
id
, salary_sob_id
, salary_item_id
, is_group
, item_hide
FROM hrsa_salary_item_hide
where delete_type=0
<if test="param.id!=null">
and id=#{param.id}
</if>
<if test="param.salarySobId!=null">
and salary_sob_id=#{param.salarySobId}
</if>
<if test="param.itemHide!=null">
and item_hide=#{param.itemHide}
</if>
<if test="param.isGroup!=null">
and is_group=#{param.isGroup}
</if>
<if test="param.salaryItemId!=null">
and salary_item_id=#{param.salaryItemId}
</if>
</select> </select>

View File

@ -36,6 +36,9 @@
, t.update_time , t.update_time
,t.can_delete ,t.can_delete
,t.salary_item_code ,t.salary_item_code
, t.rounding_mode
, t.pattern
, t.value_type
</sql> </sql>
<!-- 查询全部 --> <!-- 查询全部 -->
@ -161,6 +164,9 @@
, t.sorted_index , t.sorted_index
, t.tenant_key , t.tenant_key
, t.update_time , t.update_time
, t.rounding_mode
, t.pattern
, t.value_type
,t.can_delete ,t.can_delete
,t.salary_item_code ,t.salary_item_code
,h.item_hide ,h.item_hide
@ -276,6 +282,9 @@
tenant_key=#{tenantKey}, tenant_key=#{tenantKey},
update_time=#{updateTime}, update_time=#{updateTime},
can_delete=#{canDelete}, can_delete=#{canDelete},
rounding_mode=#{roundingMode},
pattern=#{pattern},
value_type=#{valueType},
</set> </set>
WHERE id = #{id} AND delete_type = 0 WHERE id = #{id} AND delete_type = 0
</update> </update>
@ -321,6 +330,15 @@
<if test="canDelete != null"> <if test="canDelete != null">
can_delete=#{canDelete}, can_delete=#{canDelete},
</if> </if>
<if test="roundingMode != null">
rounding_mode=#{roundingMode},
</if>
<if test="pattern != null">
pattern=#{pattern},
</if>
<if test="valueType != null">
value_type=#{valueType},
</if>
</set> </set>
WHERE id = #{id} AND delete_type = 0 WHERE id = #{id} AND delete_type = 0
</update> </update>
@ -367,7 +385,7 @@
<insert id="batchInsert"> <insert id="batchInsert">
INSERT INTO hrsa_salary_sob_item(salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id, INSERT INTO hrsa_salary_sob_item(salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id,
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,salary_item_code) sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type,salary_item_code)
VALUES VALUES
<foreach collection="collection" item="item" separator=","> <foreach collection="collection" item="item" separator=",">
( (
@ -383,13 +401,16 @@
#{item.deleteType}, #{item.deleteType},
#{item.tenantKey}, #{item.tenantKey},
#{item.canDelete}, #{item.canDelete},
#{item.roundingMode},
#{item.pattern},
#{item.valueType},
#{item.salaryItemCode} #{item.salaryItemCode}
) )
</foreach> </foreach>
</insert> </insert>
<insert id="batchInsert" databaseId="oracle"> <insert id="batchInsert" databaseId="oracle">
INSERT INTO hrsa_salary_sob_item( salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id, INSERT INTO hrsa_salary_sob_item( salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id,
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,salary_item_code) sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type,salary_item_code)
<foreach collection="collection" item="item" separator="union all"> <foreach collection="collection" item="item" separator="union all">
select select
@ -405,6 +426,9 @@
#{item.deleteType,jdbcType=INTEGER}, #{item.deleteType,jdbcType=INTEGER},
#{item.tenantKey,jdbcType=VARCHAR}, #{item.tenantKey,jdbcType=VARCHAR},
#{item.canDelete,jdbcType=INTEGER}, #{item.canDelete,jdbcType=INTEGER},
#{item.roundingMode,jdbcType=INTEGER},
#{item.pattern,jdbcType=INTEGER},
#{item.valueType,jdbcType=INTEGER},
#{item.salaryItemCode,jdbcType=INTEGER} #{item.salaryItemCode,jdbcType=INTEGER}
from dual from dual
</foreach> </foreach>
@ -412,7 +436,7 @@
<insert id="batchInsert" databaseId="sqlserver"> <insert id="batchInsert" databaseId="sqlserver">
<foreach collection="collection" item="item" separator=";"> <foreach collection="collection" item="item" separator=";">
INSERT INTO hrsa_salary_sob_item( salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id, INSERT INTO hrsa_salary_sob_item( salary_sob_id, salary_item_id, salary_sob_item_group_id, formula_id,
sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,salary_item_code) sorted_index, description, create_time, update_time, creator, delete_type, tenant_key,can_delete,rounding_mode,pattern,value_type,salary_item_code)
VALUES VALUES
( (
#{item.salarySobId}, #{item.salarySobId},
@ -427,6 +451,9 @@
#{item.deleteType}, #{item.deleteType},
#{item.tenantKey}, #{item.tenantKey},
#{item.canDelete}, #{item.canDelete},
#{item.roundingMode},
#{item.pattern},
#{item.valueType},
#{item.salaryItemCode} #{item.salaryItemCode}
) )
</foreach> </foreach>

View File

@ -85,4 +85,10 @@ public interface FundSchemeMapper {
* @param fundArchiveDelIds * @param fundArchiveDelIds
*/ */
void deleteByIds(@Param("ids")List<Long> fundArchiveDelIds); void deleteByIds(@Param("ids")List<Long> fundArchiveDelIds);
/**
* 新增
* @param insuranceArchivesFundSchemePO
*/
void insert(InsuranceArchivesFundSchemePO insuranceArchivesFundSchemePO);
} }

View File

@ -327,4 +327,45 @@
</foreach> </foreach>
</if> </if>
</update> </update>
<insert id="insert" parameterType="com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO">
INSERT INTO hrsa_fund_archives(
fund_scheme_id,
fund_account,
fund_end_time,
fund_start_time,
fund_payment_base_string,
supplement_fund_account,
create_time,
creator,
non_payment,
delete_type,
tenant_key,
under_take,
payment_organization,
update_time,
welfare_type,
employee_id)
VALUES
(
#{fundSchemeId},
#{fundAccount},
#{fundEndTime},
#{fundStartTime},
#{fundPaymentBaseString},
#{supplementFundAccount},
#{createTime},
#{creator},
#{nonPayment},
#{deleteType},
#{tenantKey},
#{underTake},
#{paymentOrganization},
#{updateTime},
#{welfareType},
#{employeeId}
)
</insert>
</mapper> </mapper>

View File

@ -113,4 +113,11 @@ public interface InsuranceBaseInfoMapper {
* @param archiveDelIds * @param archiveDelIds
*/ */
void deleteByIds(@Param("ids")List<Long> archiveDelIds); void deleteByIds(@Param("ids")List<Long> archiveDelIds);
/**
* 根据id更新
*
* @param po
*/
void updateById(InsuranceArchivesBaseInfoPO po);
} }

View File

@ -15,6 +15,7 @@
<result column="delete_type" property="deleteType"/> <result column="delete_type" property="deleteType"/>
<result column="tenant_key" property="tenantKey"/> <result column="tenant_key" property="tenantKey"/>
<result column="run_status" property="runStatus"/> <result column="run_status" property="runStatus"/>
<result column="employee_type" property="employeeType"/>
</resultMap> </resultMap>
<!-- 表字段 --> <!-- 表字段 -->
@ -31,6 +32,7 @@
, t.creator , t.creator
, t.delete_type , t.delete_type
, t.tenant_key , t.tenant_key
, t.employee_type
</sql> </sql>
<!-- 查询全部 --> <!-- 查询全部 -->
@ -100,7 +102,7 @@
<insert id="batchSave"> <insert id="batchSave">
INSERT INTO hrsa_insurance_base_info INSERT INTO hrsa_insurance_base_info
(id,employee_id,payment_organization,social_archives_id,fund_archives_id,other_archives_id,tenant_key,creator,delete_type,create_time,update_time,run_status) (id,employee_id,payment_organization,social_archives_id,fund_archives_id,other_archives_id,tenant_key,creator,delete_type,create_time,update_time,run_status, employee_type)
VALUES VALUES
<foreach collection="infos" item="item" separator=","> <foreach collection="infos" item="item" separator=",">
( (
@ -115,13 +117,14 @@
#{item.deleteType}, #{item.deleteType},
#{item.createTime}, #{item.createTime},
#{item.updateTime}, #{item.updateTime},
#{item.runStatus} #{item.runStatus},
#{item.employeeType}
) )
</foreach> </foreach>
</insert> </insert>
<insert id="batchSave" databaseId="oracle"> <insert id="batchSave" databaseId="oracle">
INSERT INTO hrsa_insurance_base_info INSERT INTO hrsa_insurance_base_info
(id,employee_id,payment_organization,social_archives_id,fund_archives_id,other_archives_id,tenant_key,creator,delete_type,create_time,update_time,run_status) (id,employee_id,payment_organization,social_archives_id,fund_archives_id,other_archives_id,tenant_key,creator,delete_type,create_time,update_time,run_status, employee_type)
<foreach collection="infos" item="item" separator="union all"> <foreach collection="infos" item="item" separator="union all">
select select
#{item.id,jdbcType=DOUBLE}, #{item.id,jdbcType=DOUBLE},
@ -135,14 +138,15 @@
#{item.deleteType}, #{item.deleteType},
#{item.createTime}, #{item.createTime},
#{item.updateTime}, #{item.updateTime},
#{item.runStatus,jdbcType=VARCHAR} #{item.runStatus,jdbcType=VARCHAR},
#{item.employeeType}
from dual from dual
</foreach> </foreach>
</insert> </insert>
<insert id="batchSave" databaseId="sqlserver"> <insert id="batchSave" databaseId="sqlserver">
<foreach collection="infos" item="item" separator=";"> <foreach collection="infos" item="item" separator=";">
INSERT INTO hrsa_insurance_base_info INSERT INTO hrsa_insurance_base_info
(id,employee_id,payment_organization,social_archives_id,fund_archives_id,other_archives_id,tenant_key,creator,delete_type,create_time,update_time,run_status) (id,employee_id,payment_organization,social_archives_id,fund_archives_id,other_archives_id,tenant_key,creator,delete_type,create_time,update_time,run_status, employee_type)
VALUES VALUES
( (
#{item.id}, #{item.id},
@ -156,7 +160,8 @@
#{item.deleteType}, #{item.deleteType},
#{item.createTime}, #{item.createTime},
#{item.updateTime}, #{item.updateTime},
#{item.runStatus} #{item.runStatus},
#{item.employeeType}
) )
</foreach> </foreach>
</insert> </insert>
@ -318,4 +323,23 @@
</foreach> </foreach>
</update> </update>
<update id="updateById" parameterType="com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO">
UPDATE hrsa_insurance_base_info
<set>
<if test="null != employeeId and '' != employeeId">employee_id = #{employeeId},</if>
<if test="null != paymentOrganization and '' != paymentOrganization">payment_organization = #{paymentOrganization},</if>
<if test="null != socialArchivesId and '' != socialArchivesId">social_archives_id = #{socialArchivesId},</if>
<if test="null != fundArchivesId and '' != fundArchivesId">fund_archives_id = #{fundArchivesId},</if>
<if test="null != otherArchivesId and '' != otherArchivesId">other_archives_id = #{otherArchivesId},</if>
<if test="null != runStatus and '' != runStatus">run_status = #{runStatus},</if>
<if test="null != createTime">create_time = #{createTime},</if>
<if test="null != updateTime">update_time = #{updateTime},</if>
<if test="null != creator and '' != creator">creator = #{creator},</if>
<if test="null != deleteType and '' != deleteType">delete_type = #{deleteType},</if>
<if test="null != tenantKey and '' != tenantKey">tenant_key = #{tenantKey},</if>
</set>
WHERE id = #{id}
</update>
</mapper> </mapper>

View File

@ -77,4 +77,10 @@ public interface OtherSchemeMapper {
* @param otherArchiveDelIds * @param otherArchiveDelIds
*/ */
void deleteByIds(@Param("ids") List<Long> otherArchiveDelIds); void deleteByIds(@Param("ids") List<Long> otherArchiveDelIds);
/**
* 新增
* @param insuranceArchivesOtherSchemePO
*/
void insert(InsuranceArchivesOtherSchemePO insuranceArchivesOtherSchemePO);
} }

View File

@ -305,4 +305,39 @@
</foreach> </foreach>
</if> </if>
</update> </update>
<insert id="insert" parameterType="com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO">
INSERT INTO hrsa_other_archives(
other_scheme_id,
other_start_time,
under_take,
tenant_key,
welfare_type,
other_end_time,
employee_id,
delete_type,
update_time,
create_time,
non_payment,
creator,
payment_organization,
other_payment_base_string)
VALUES
(
#{otherSchemeId},
#{otherStartTime},
#{underTake},
#{tenantKey},
#{welfareType},
#{otherEndTime},
#{employeeId},
#{deleteType},
#{updateTime},
#{createTime},
#{nonPayment},
#{creator},
#{paymentOrganization},
#{otherPaymentBaseString}
)
</insert>
</mapper> </mapper>

View File

@ -77,6 +77,8 @@ public interface SocialSchemeMapper {
List<InsuranceArchivesEmployeePO> queryEmployeeList(@Param("param") InsuranceArchivesListParam param); List<InsuranceArchivesEmployeePO> queryEmployeeList(@Param("param") InsuranceArchivesListParam param);
List<InsuranceArchivesEmployeePO> queryExtEmployeeList(@Param("param") InsuranceArchivesListParam param);
/** /**
* 根据社保缴纳组织id获取 * 根据社保缴纳组织id获取
* @param paymentOrganization * @param paymentOrganization
@ -113,4 +115,10 @@ public interface SocialSchemeMapper {
* @param socialArchiveDelIds * @param socialArchiveDelIds
*/ */
void deleteByIds(@Param("ids")List<Long> socialArchiveDelIds); void deleteByIds(@Param("ids")List<Long> socialArchiveDelIds);
/**
* 新增
* @param insuranceArchivesSocialSchemePO
*/
void insert(InsuranceArchivesSocialSchemePO insuranceArchivesSocialSchemePO);
} }

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