diff --git a/resource/WEB-INF/prop/hrmSalary.properties b/resource/WEB-INF/prop/hrmSalary.properties index 11d134f08..c62ade2bb 100644 --- a/resource/WEB-INF/prop/hrmSalary.properties +++ b/resource/WEB-INF/prop/hrmSalary.properties @@ -1,5 +1,5 @@ log=false defaultCloseNonStandard149=true AESEncryptScrect=990EB004A1C862721C1513AE90038C9E -version=2.14.2.240530.02 +version=2.14.3.2406.01 openFormulaForcedEditing=false \ No newline at end of file diff --git a/resource/sqlupgrade/DM/sql202406180103.sql b/resource/sqlupgrade/DM/sql202406180103.sql new file mode 100644 index 000000000..0f51111b9 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202406180103.sql @@ -0,0 +1,27 @@ +alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add subcompany_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add department_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add status varchar2(200) NULL; +/ + diff --git a/resource/sqlupgrade/DM/sql202406180403.sql b/resource/sqlupgrade/DM/sql202406180403.sql new file mode 100644 index 000000000..5e12f2f77 --- /dev/null +++ b/resource/sqlupgrade/DM/sql202406180403.sql @@ -0,0 +1,70 @@ +update hrsa_salary_acct_emp a +set +( + department_id , + department_name, + subcompany_id , + subcompany_name, + jobtitle_id , + jobtitle_name , + jobcall_id, + jobcall, + status +) + = +( + select + b.departmentId, + b.departmentName, + b.subcompanyid, + b.subcompanyName, + b.jobtitleId, + b.jobtitleName, + b.jobcallId, + b.jobcall, + b.status from + ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId +) +where a.delete_type=0 and + exists (select 1 from ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId + ); +/ + diff --git a/resource/sqlupgrade/GS/sql202406180103.sql b/resource/sqlupgrade/GS/sql202406180103.sql new file mode 100644 index 000000000..0f51111b9 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202406180103.sql @@ -0,0 +1,27 @@ +alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add subcompany_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add department_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add status varchar2(200) NULL; +/ + diff --git a/resource/sqlupgrade/GS/sql202406180403.sql b/resource/sqlupgrade/GS/sql202406180403.sql new file mode 100644 index 000000000..5e12f2f77 --- /dev/null +++ b/resource/sqlupgrade/GS/sql202406180403.sql @@ -0,0 +1,70 @@ +update hrsa_salary_acct_emp a +set +( + department_id , + department_name, + subcompany_id , + subcompany_name, + jobtitle_id , + jobtitle_name , + jobcall_id, + jobcall, + status +) + = +( + select + b.departmentId, + b.departmentName, + b.subcompanyid, + b.subcompanyName, + b.jobtitleId, + b.jobtitleName, + b.jobcallId, + b.jobcall, + b.status from + ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId +) +where a.delete_type=0 and + exists (select 1 from ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId + ); +/ + diff --git a/resource/sqlupgrade/JC/sql202406180103.sql b/resource/sqlupgrade/JC/sql202406180103.sql new file mode 100644 index 000000000..0f51111b9 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202406180103.sql @@ -0,0 +1,27 @@ +alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add subcompany_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add department_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add status varchar2(200) NULL; +/ + diff --git a/resource/sqlupgrade/JC/sql202406180403.sql b/resource/sqlupgrade/JC/sql202406180403.sql new file mode 100644 index 000000000..5e12f2f77 --- /dev/null +++ b/resource/sqlupgrade/JC/sql202406180403.sql @@ -0,0 +1,70 @@ +update hrsa_salary_acct_emp a +set +( + department_id , + department_name, + subcompany_id , + subcompany_name, + jobtitle_id , + jobtitle_name , + jobcall_id, + jobcall, + status +) + = +( + select + b.departmentId, + b.departmentName, + b.subcompanyid, + b.subcompanyName, + b.jobtitleId, + b.jobtitleName, + b.jobcallId, + b.jobcall, + b.status from + ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId +) +where a.delete_type=0 and + exists (select 1 from ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId + ); +/ + diff --git a/resource/sqlupgrade/Mysql/sql202406180103.sql b/resource/sqlupgrade/Mysql/sql202406180103.sql new file mode 100644 index 000000000..4217d5d31 --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202406180103.sql @@ -0,0 +1,10 @@ +ALTER TABLE hrsa_salary_acct_emp +ADD COLUMN subcompany_name varchar(200) , +ADD COLUMN subcompany_id bigint(0), +ADD COLUMN department_name varchar(200), +ADD COLUMN department_id bigint(0), +ADD COLUMN jobtitle_name varchar(200) , +ADD COLUMN jobtitle_id bigint(0) , +ADD COLUMN jobcall varchar(200), +ADD COLUMN jobcall_id bigint(0), +ADD COLUMN status varchar(200); \ No newline at end of file diff --git a/resource/sqlupgrade/Mysql/sql202406180403.sql b/resource/sqlupgrade/Mysql/sql202406180403.sql new file mode 100644 index 000000000..c81607e2b --- /dev/null +++ b/resource/sqlupgrade/Mysql/sql202406180403.sql @@ -0,0 +1,29 @@ +update hrsa_salary_acct_emp a INNER JOIN ( + select e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) as b +on a.employee_id = b.employeeId + set a.department_id = b.departmentId, + a.department_name = b.departmentName, + a.subcompany_id = b.subcompanyid, + a.subcompany_name = b.subcompanyName, + a.jobtitle_id = b.jobtitleId, + a.jobtitle_name = b.jobtitleName, + a.jobcall_id = b.jobcallId, + a.jobcall = b.jobcall, + a.status = b.status +where a.delete_type=0; \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202406180103.sql b/resource/sqlupgrade/Oracle/sql202406180103.sql new file mode 100644 index 000000000..ee99ea754 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202406180103.sql @@ -0,0 +1,18 @@ +alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL +/ +alter table hrsa_salary_acct_emp add subcompany_id NUMBER null +/ +alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL +/ +alter table hrsa_salary_acct_emp add department_id NUMBER null +/ +alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL +/ +alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL +/ +alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL +/ +alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL +/ +alter table hrsa_salary_acct_emp add status varchar2(200) NULL +/ \ No newline at end of file diff --git a/resource/sqlupgrade/Oracle/sql202406180403.sql b/resource/sqlupgrade/Oracle/sql202406180403.sql new file mode 100644 index 000000000..246694499 --- /dev/null +++ b/resource/sqlupgrade/Oracle/sql202406180403.sql @@ -0,0 +1,69 @@ +update hrsa_salary_acct_emp a +set +( + department_id , + department_name, + subcompany_id , + subcompany_name, + jobtitle_id , + jobtitle_name , + jobcall_id, + jobcall, + status +) + = +( + select + b.departmentId, + b.departmentName, + b.subcompanyid, + b.subcompanyName, + b.jobtitleId, + b.jobtitleName, + b.jobcallId, + b.jobcall, + b.status from + ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId +) +where a.delete_type=0 and + exists (select 1 from ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId + ) +/ \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202406180103.sql b/resource/sqlupgrade/PG/sql202406180103.sql new file mode 100644 index 000000000..59a96d245 --- /dev/null +++ b/resource/sqlupgrade/PG/sql202406180103.sql @@ -0,0 +1,9 @@ +alter table hrsa_salary_acct_emp add subcompany_name varchar(200); +alter table hrsa_salary_acct_emp add subcompany_id bigint; +alter table hrsa_salary_acct_emp add department_name varchar(200); +alter table hrsa_salary_acct_emp add department_id bigint; +alter table hrsa_salary_acct_emp add jobtitle_name varchar(200); +alter table hrsa_salary_acct_emp add jobtitle_id bigint; +alter table hrsa_salary_acct_emp add jobcall varchar(200); +alter table hrsa_salary_acct_emp add jobcall_id bigint; +alter table hrsa_salary_acct_emp add status varchar(200); \ No newline at end of file diff --git a/resource/sqlupgrade/PG/sql202406180403.sql b/resource/sqlupgrade/PG/sql202406180403.sql new file mode 100644 index 000000000..a15174c5f --- /dev/null +++ b/resource/sqlupgrade/PG/sql202406180403.sql @@ -0,0 +1,68 @@ +update hrsa_salary_acct_emp a +set +( + department_id , + department_name, + subcompany_id , + subcompany_name, + jobtitle_id , + jobtitle_name , + jobcall_id, + jobcall, + status +) + = +( + select + b.departmentId, + b.departmentName, + b.subcompanyid, + b.subcompanyName, + b.jobtitleId, + b.jobtitleName, + b.jobcallId, + b.jobcall, + b.status from + ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId +) +where a.delete_type=0 and + exists (select 1 from ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId + ); \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202406180103.sql b/resource/sqlupgrade/SQLServer/sql202406180103.sql new file mode 100644 index 000000000..87973812c --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202406180103.sql @@ -0,0 +1,11 @@ +ALTER TABLE hrsa_salary_acct_emp +ADD subcompany_name varchar(200), +subcompany_id bigint, +department_name varchar(200), +department_id bigint, +jobtitle_name varchar(200), +jobtitle_id bigint, +jobcall varchar(200), +jobcall_id bigint, +status varchar(200) +GO \ No newline at end of file diff --git a/resource/sqlupgrade/SQLServer/sql202406180403.sql b/resource/sqlupgrade/SQLServer/sql202406180403.sql new file mode 100644 index 000000000..02b5785e9 --- /dev/null +++ b/resource/sqlupgrade/SQLServer/sql202406180403.sql @@ -0,0 +1,31 @@ +UPDATE hrsa_salary_acct_emp +set department_id = b.departmentId, + department_name = b.departmentName, + subcompany_id = b.subcompanyid, + subcompany_name = b.subcompanyName, + jobtitle_id = b.jobtitleId, + jobtitle_name = b.jobtitleName, + jobcall_id = b.jobcallId, + jobcall = b.jobcall, + status = b.status +FROM hrsa_salary_acct_emp a INNER JOIN ( + select e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) as b +on a.employee_id = b.employeeId +WHERE a.delete_type=0 +GO \ No newline at end of file diff --git a/resource/sqlupgrade/ST/sql202406180103.sql b/resource/sqlupgrade/ST/sql202406180103.sql new file mode 100644 index 000000000..0f51111b9 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202406180103.sql @@ -0,0 +1,27 @@ +alter table hrsa_salary_acct_emp add subcompany_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add subcompany_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add department_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add department_id NUMBER null; +/ + +alter table hrsa_salary_acct_emp add jobtitle_name varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobtitle_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall varchar2(200) NULL; +/ + +alter table hrsa_salary_acct_emp add jobcall_id NUMBER NULL; +/ + +alter table hrsa_salary_acct_emp add status varchar2(200) NULL; +/ + diff --git a/resource/sqlupgrade/ST/sql202406180403.sql b/resource/sqlupgrade/ST/sql202406180403.sql new file mode 100644 index 000000000..5e12f2f77 --- /dev/null +++ b/resource/sqlupgrade/ST/sql202406180403.sql @@ -0,0 +1,70 @@ +update hrsa_salary_acct_emp a +set +( + department_id , + department_name, + subcompany_id , + subcompany_name, + jobtitle_id , + jobtitle_name , + jobcall_id, + jobcall, + status +) + = +( + select + b.departmentId, + b.departmentName, + b.subcompanyid, + b.subcompanyName, + b.jobtitleId, + b.jobtitleName, + b.jobcallId, + b.jobcall, + b.status from + ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId +) +where a.delete_type=0 and + exists (select 1 from ( + select + e.id as employeeId, + d.departmentname as departmentName, + d.id as departmentId, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + c.jobtitlename as jobtitleName, + c.id as jobtitleId, + e.status as status, + e.jobcall as jobcallId, + job.name as jobcall + from hrmresource e + left join hrmdepartment d on e.departmentid = d.id + left join hrmjobtitles c on e.jobtitle = c.id + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id + left join hrmjobcall job on e.jobcall=job.id + where e.status not in (7) and (e.accounttype is null or e.accounttype = 0) + ) b + where a.employee_id = b.employeeId + ); +/ + diff --git a/resource/wiki/常用查询.md b/resource/wiki/常用查询.md index 594b14bf8..13ba2242f 100644 --- a/resource/wiki/常用查询.md +++ b/resource/wiki/常用查询.md @@ -18,4 +18,4 @@ left join hrmresource e on e.id= result.employee_id left join hrsa_tax_agent t on a.tax_agent_id=t.id where a.delete_type=0 and i.delete_type=0 and t.delete_type=0 and c.delete_type=0 and a.employee_id=人员id and t.name=扣缴义务人名称 - and effective_time <= now() and c.name='基本工资' order by effective_time desc \ No newline at end of file + c.name='基本工资' order by effective_time desc \ No newline at end of file diff --git a/src/com/engine/salary/constant/des.json b/src/com/engine/salary/constant/des.json index 0b35d5f80..f970e4448 100644 --- a/src/com/engine/salary/constant/des.json +++ b/src/com/engine/salary/constant/des.json @@ -980,7 +980,31 @@ "infinite": true } ] - } + }, + { + "name": "DAYSINMONTH", + "chineseName": "返回指定月的天数", + "description": "返回指定月的天数。", + "example": "DAYSINMONTH('2024-01-01')", + "result": "31", + "paramDescs": [ + "*日期*(必选)" + ], + "formatString": "DAYSINMONTH(日期)", + "paramArray": [], + "paramData": [], + "returnType": "number", + "type": "function", + "validForm": "days_in_month", + "paramCount": -1, + "paramStatuses": [ + { + "dataType": "date", + "must": true, + "infinite": true + } + ] + }, ], "dataType": "date", "name": "日期函数", diff --git a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java index f4d5b3643..e7cc9af35 100644 --- a/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java +++ b/src/com/engine/salary/entity/salaryBill/bo/SalaryBillBO.java @@ -261,7 +261,7 @@ public class SalaryBillBO { } Util_Message.store(messageBean); } catch (IOException e) { - e.printStackTrace(); + log.error("消息发送失败",e); } } diff --git a/src/com/engine/salary/entity/salaryBill/param/SalaryPreviewParam.java b/src/com/engine/salary/entity/salaryBill/param/SalaryPreviewParam.java new file mode 100644 index 000000000..8d48e5118 --- /dev/null +++ b/src/com/engine/salary/entity/salaryBill/param/SalaryPreviewParam.java @@ -0,0 +1,32 @@ +package com.engine.salary.entity.salaryBill.param; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 工资单预览参数 + *

Copyright: Copyright (c) 2024

+ *

Company: 泛微软件

+ * + * @author qiantao + * @version 1.0 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SalaryPreviewParam { + + /** + * 工资单id + */ + private Long salaryInfoId; + + /** + * 员工id + */ + private Long recipient; + +} diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java index 39499174c..60058a59c 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctEmployeeBO.java @@ -15,6 +15,7 @@ import com.google.common.collect.Sets; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; +import weaver.general.Util; import java.util.*; import java.util.stream.Collectors; @@ -121,9 +122,9 @@ public class SalaryAcctEmployeeBO { } public static List convert2Employee(Collection employee, - SalaryAcctRecordPO salaryAcctRecord, - List salaryArchiveTaxAgentData, - Long employeeId) { + SalaryAcctRecordPO salaryAcctRecord, + List salaryArchiveTaxAgentData, + Long employeeId) { if (CollectionUtils.isEmpty(employee)) { return Collections.emptyList(); } @@ -147,6 +148,15 @@ public class SalaryAcctEmployeeBO { .employeeId(emp.getEmployeeId()) .employeeType(emp.isExtEmp() ? 1 : 0) .taxAgentId(taxAgentId) + .departmentId(emp.getDepartmentId()) + .departmentName(emp.getDepartmentName()) + .jobcall(emp.getJobcall()) + .jobcallId(emp.getJobcallId()) + .jobtitleId(emp.getJobtitleId()) + .jobtitleName(emp.getJobtitleName()) + .subcompanyId(emp.getSubcompanyid()) + .subcompanyName(emp.getSubcompanyName()) + .status(emp.getStatus()) .creator(employeeId) .createTime(now) .updateTime(now) @@ -159,6 +169,24 @@ public class SalaryAcctEmployeeBO { return resultList; } + /** + * 核算人员信息替换实时信息 + * @param simpleEmployee + * @param acctEmployeePO + */ + public static void copyAcctEmp(DataCollectionEmployee simpleEmployee, SalaryAcctEmployeePO acctEmployeePO) { + simpleEmployee.setDepartmentId(acctEmployeePO.getDepartmentId()); + simpleEmployee.setDepartmentName(acctEmployeePO.getDepartmentName()); + simpleEmployee.setSubcompanyid(acctEmployeePO.getSubcompanyId()); + simpleEmployee.setSubcompanyName(acctEmployeePO.getSubcompanyName()); + simpleEmployee.setJobcallId(acctEmployeePO.getJobcallId()); + simpleEmployee.setJobcall(acctEmployeePO.getJobcall()); + simpleEmployee.setJobtitleId(acctEmployeePO.getJobtitleId()); + simpleEmployee.setJobtitleName(acctEmployeePO.getJobtitleName()); + simpleEmployee.setStatusName(UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(acctEmployeePO.getStatus(), "1")))); + simpleEmployee.setStatus(acctEmployeePO.getStatus()); + } + public static List> partitionByEmployeeId(List salaryAcctEmployees) { if (CollectionUtils.isEmpty(salaryAcctEmployees)) { diff --git a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java index 121092602..4989bd7f2 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/SalaryAcctResultBO.java @@ -20,6 +20,7 @@ import com.engine.salary.entity.salarysob.dto.SalarySobItemGroupDTO; import com.engine.salary.entity.salarysob.po.*; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.SalaryValueTypeEnum; +import com.engine.salary.enums.UserStatusEnum; import com.engine.salary.enums.salaryaccounting.LockStatusEnum; import com.engine.salary.enums.salaryitem.SalaryDataTypeEnum; import com.engine.salary.util.SalaryEntityUtil; @@ -31,6 +32,7 @@ import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.beans.BeanUtils; +import weaver.general.Util; import java.lang.reflect.Field; import java.util.*; @@ -251,7 +253,7 @@ public class SalaryAcctResultBO { * @param taxAgents * @param consolidatedTaxSalaryAcctEmpIds * @param customBackCalcParameters - * @param isBackCalc + * @param dynamicEmpInfo * @return */ public static List> buildTableData(List salaryItems, @@ -263,10 +265,11 @@ public class SalaryAcctResultBO { Set consolidatedTaxSalaryAcctEmpIds, Map customParameters, Map customBackCalcParameters, - boolean isBackCalc) { + boolean dynamicEmpInfo) { if (CollectionUtils.isEmpty(salaryAcctEmployees)) { return Collections.emptyList(); } + SalaryI18nUtil.i18nList(salaryAcctEmployees); Map employeeMap = SalaryEntityUtil.convert2Map(simpleEmployees, DataCollectionEmployee::getEmployeeId); Map> acctResultMap = SalaryEntityUtil.group2Map(salaryAccountingResults, SalaryAcctResultPO::getEmployeeId); Map taxAgentNameMap = SalaryEntityUtil.convert2Map(taxAgents, TaxAgentPO::getId, TaxAgentPO::getName); @@ -278,12 +281,35 @@ public class SalaryAcctResultBO { // 薪资项目的字段类型(前端依据这个判断是否需要展示千分位) Map dataTypeMap = SalaryEntityUtil.convert2Map(salaryItems, salaryItemPO -> salaryItemPO.getId() + DATA_TYPE_SUFFIX, SalaryItemPO::getDataType); map.putAll(dataTypeMap); - // TODO ?看一下如果不是回算这会不会有回算的东西? // 人员信息字段的值 Map fieldValueMap = SalaryAcctFormulaBO.convert2FormulaEmployee(employeeMap.get(e.getEmployeeId())); for (SalarySobEmpFieldPO salarySobEmpField : salarySobEmpFields) { - map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); // 员工信息字段的字段类型 + if (dynamicEmpInfo) { + map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); + } else { + if ("departmentName".equals(salarySobEmpField.getFieldCode())) { + map.put("departmentName", e.getDepartmentName()); + } else if ("departmentId".equals(salarySobEmpField.getFieldCode())) { + map.put("departmentId", e.getDepartmentId()); + } else if ("subcompanyName".equals(salarySobEmpField.getFieldCode())) { + map.put("subcompanyName", e.getSubcompanyName()); + } else if ("jobcall".equals(salarySobEmpField.getFieldCode())) { + map.put("jobcall", e.getJobcall()); + } else if ("jobcallId".equals(salarySobEmpField.getFieldCode())) { + map.put("jobcallId", e.getJobcallId()); + } else if ("jobtitleName".equals(salarySobEmpField.getFieldCode())) { + map.put("jobtitleName", e.getJobtitleName()); + } else if ("jobtitleId".equals(salarySobEmpField.getFieldCode())) { + map.put("jobtitleId", e.getJobtitleId()); + } else if ("status".equals(salarySobEmpField.getFieldCode())) { + map.put("status", e.getStatus()); + } else if ("statusName".equals(salarySobEmpField.getFieldCode())) { + map.put("statusName", UserStatusEnum.getDefaultLabelByValue(new Integer(e.getStatus()))); + } else { + map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); + } + } map.put(salarySobEmpField.getFieldCode() + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue()); } // 主键id @@ -328,7 +354,8 @@ public class SalaryAcctResultBO { List taxAgents, Map customParameters, Set consolidatedTaxSalaryAcctEmpIds, - Set includeSalaryItemIds) { + Set includeSalaryItemIds, + boolean dynamicEmpInfo) { if (CollectionUtils.isEmpty(simpleEmployees)) { return Collections.emptyList(); } @@ -344,8 +371,32 @@ public class SalaryAcctResultBO { // 员工信息字段的值 Map fieldValueMap = SalaryAcctFormulaBO.convert2FormulaEmployee(employeeMap.get(salaryAcctEmployee.getEmployeeId())); for (SalarySobEmpFieldPO salarySobEmpField : salarySobEmpFields) { - map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); // 员工信息字段的字段类型 + if (dynamicEmpInfo) { + map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); + } else { + if ("departmentName".equals(salarySobEmpField.getFieldCode())) { + map.put("departmentName", salaryAcctEmployee.getDepartmentName()); + } else if ("departmentId".equals(salarySobEmpField.getFieldCode())) { + map.put("departmentId", salaryAcctEmployee.getDepartmentId()); + } else if ("subcompanyName".equals(salarySobEmpField.getFieldCode())) { + map.put("subcompanyName", salaryAcctEmployee.getSubcompanyName()); + } else if ("jobcall".equals(salarySobEmpField.getFieldCode())) { + map.put("jobcall", salaryAcctEmployee.getJobcall()); + } else if ("jobcallId".equals(salarySobEmpField.getFieldCode())) { + map.put("jobcallId", salaryAcctEmployee.getJobcallId()); + } else if ("jobtitleName".equals(salarySobEmpField.getFieldCode())) { + map.put("jobtitleName", salaryAcctEmployee.getJobtitleName()); + } else if ("jobtitleId".equals(salarySobEmpField.getFieldCode())) { + map.put("jobtitleId", salaryAcctEmployee.getJobtitleId()); + } else if ("status".equals(salarySobEmpField.getFieldCode())) { + map.put("status", salaryAcctEmployee.getStatus()); + } else if ("statusName".equals(salarySobEmpField.getFieldCode())) { + map.put("statusName", UserStatusEnum.getDefaultLabelByValue(new Integer(Util.null2s(salaryAcctEmployee.getStatus(), "1")))); + } else { + map.put(salarySobEmpField.getFieldCode(), fieldValueMap.get(salarySobEmpField.getFieldCode())); + } + } map.put(salarySobEmpField.getFieldCode() + DATA_TYPE_SUFFIX, SalaryDataTypeEnum.STRING.getValue()); } // 系统值 diff --git a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultQueryParam.java b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultQueryParam.java index 8ebe19131..5f5749ac7 100644 --- a/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultQueryParam.java +++ b/src/com/engine/salary/entity/salaryacct/param/SalaryAcctResultQueryParam.java @@ -65,6 +65,11 @@ public class SalaryAcctResultQueryParam extends BaseQueryParam { //薪资项目id private Collection salaryItemIds; + /** + * 是否需要实时人员信息 + */ + private boolean dynamicEmpInfo; + //其他条件 private List otherConditions; diff --git a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java index cc67bfe05..d86941b8b 100644 --- a/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java +++ b/src/com/engine/salary/entity/salaryacct/po/SalaryAcctEmployeePO.java @@ -1,6 +1,7 @@ package com.engine.salary.entity.salaryacct.po; import com.engine.hrmelog.annotation.ElogTransform; +import com.engine.salary.annotation.I18n; import com.engine.salary.annotation.SalaryFormulaVar; import com.engine.salary.enums.datacollection.DataCollectionEmployeeTypeEnum; import lombok.AllArgsConstructor; @@ -112,6 +113,35 @@ public class SalaryAcctEmployeePO { @ElogTransform(name = "锁定状态") private Integer lockStatus; + /** + * 分部 + */ + @I18n + private String subcompanyName; + private Long subcompanyId; + /** + * 部门 + */ + @I18n + private String departmentName; + private Long departmentId; + /** + * 岗位 + */ + @I18n + private String jobtitleName; + private Long jobtitleId; + /** + * 职称 + */ + @I18n + private String jobcall; + private Long jobcallId; + /** + * 状态 + */ + private String status; + //--------条件---------- //主键id集合 diff --git a/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java b/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java index 1048360fa..990ab41e8 100644 --- a/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java +++ b/src/com/engine/salary/entity/salaryitem/bo/SalaryItemBO.java @@ -40,8 +40,6 @@ public class SalaryItemBO { private static final BaseBean baseBean = new BaseBean(); - //强制开启账套的公式配置 - private static final Boolean openFormulaForcedEditing = "true".equals(baseBean.getPropValue("hrmSalary", "openFormulaForcedEditing")); @@ -86,6 +84,10 @@ public class SalaryItemBO { if (CollectionUtils.isEmpty(salaryItems)) { return Collections.emptyList(); } + + //强制开启账套的公式配置 + boolean openFormulaForcedEditing = "true".equals(baseBean.getPropValue("hrmSalary", "openFormulaForcedEditing")); + Map formulaMap = SalaryEntityUtil.convert2Map(expressFormulas, ExpressFormula::getId, ExpressFormula::getFormula); Map sysSalaryItemNameMap = SalaryEntityUtil.convert2Map(sysSalaryItemPOS, SysSalaryItemPO::getId, SysSalaryItemPO::getName); return salaryItems.stream().map(salaryItemPO -> { @@ -134,6 +136,9 @@ public class SalaryItemBO { if (CollectionUtils.isEmpty(salaryItems)) { return Collections.emptyList(); } + //强制开启账套的公式配置 + boolean openFormulaForcedEditing = "true".equals(baseBean.getPropValue("hrmSalary", "openFormulaForcedEditing")); + Map formulaMap = SalaryEntityUtil.convert2Map(expressFormulas, ExpressFormula::getId, ExpressFormula::getFormula); Map sysSalaryItemNameMap = SalaryEntityUtil.convert2Map(sysSalaryItemPOS, SysSalaryItemPO::getId, SysSalaryItemPO::getName); return salaryItems.stream().map(salaryItemPO -> { diff --git a/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java b/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java index a200cea77..5cf5c64b9 100644 --- a/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java +++ b/src/com/engine/salary/entity/salaryitem/param/SalaryItemSaveParam.java @@ -63,7 +63,7 @@ public class SalaryItemSaveParam { private Integer roundingMode; //保留小数位 - @DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 8, message = "小数位最多为8") + @DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 10, message = "小数位最多为10") private Integer pattern; /** diff --git a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemFormDTO.java b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemFormDTO.java index f23df1512..3f797c9bf 100644 --- a/src/com/engine/salary/entity/salarysob/dto/SalarySobItemFormDTO.java +++ b/src/com/engine/salary/entity/salarysob/dto/SalarySobItemFormDTO.java @@ -53,7 +53,7 @@ public class SalarySobItemFormDTO { private Integer roundingMode; //保留小数位") - @DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 8, message = "小数位最多为8") + @DataCheck(require = true, type = ValidTypeEnum.NUMBER, max = 10, message = "小数位最多为10") private Integer pattern; //取值方式") diff --git a/src/com/engine/salary/enums/common/FilterEnum.java b/src/com/engine/salary/enums/common/FilterEnum.java index c3d1ea2a5..ae7de1221 100644 --- a/src/com/engine/salary/enums/common/FilterEnum.java +++ b/src/com/engine/salary/enums/common/FilterEnum.java @@ -90,7 +90,7 @@ public enum FilterEnum implements BaseEnum { return StringUtils::isEmpty; } }, - ISNOTEMPTY("ISNOTEMPTY", "包含", 1) { + ISNOTEMPTY("ISNOTEMPTY", "不为空", 1) { @Override public Predicate filter(List params) { return StringUtils::isNotEmpty; diff --git a/src/com/engine/salary/formlua/constant/FormluaConstant.java b/src/com/engine/salary/formlua/constant/FormluaConstant.java index c3d7f4cb7..c88d7090d 100644 --- a/src/com/engine/salary/formlua/constant/FormluaConstant.java +++ b/src/com/engine/salary/formlua/constant/FormluaConstant.java @@ -985,7 +985,31 @@ public class FormluaConstant { " \"infinite\": true\n" + " }\n" + " ]\n" + - " }\n" + + " },\n" + + " {\n" + + " \"name\": \"DAYSINMONTH\",\n" + + " \"chineseName\": \"返回指定月的天数\",\n" + + " \"description\": \"返回指定月的天数。\",\n" + + " \"example\": \"DAYSINMONTH('2024-01-01')\",\n" + + " \"result\": \"31\",\n" + + " \"paramDescs\": [\n" + + " \"*日期*(必选)\"\n" + + " ],\n" + + " \"formatString\": \"DAYSINMONTH(日期)\",\n" + + " \"paramArray\": [],\n" + + " \"paramData\": [],\n" + + " \"returnType\": \"number\",\n" + + " \"type\": \"function\",\n" + + " \"validForm\": \"days_in_month\",\n" + + " \"paramCount\": -1,\n" + + " \"paramStatuses\": [\n" + + " {\n" + + " \"dataType\": \"date\",\n" + + " \"must\": true,\n" + + " \"infinite\": true\n" + + " }\n" + + " ]\n" + + " },\n" + " ],\n" + " \"dataType\": \"date\",\n" + " \"name\": \"日期函数\",\n" + diff --git a/src/com/engine/salary/formlua/core/QlExpress.java b/src/com/engine/salary/formlua/core/QlExpress.java index 68cd238d9..9660ff1fe 100644 --- a/src/com/engine/salary/formlua/core/QlExpress.java +++ b/src/com/engine/salary/formlua/core/QlExpress.java @@ -189,6 +189,7 @@ public class QlExpress { runner.addFunctionOfServiceMethod("CURRSECOND", dateTimeService, "currSecond", new Class[]{Object[].class}, ""); runner.addFunctionOfServiceMethod("MAXDATE", dateTimeService, "maxDate", new Class[]{Object[].class}, ""); runner.addFunctionOfServiceMethod("MINDATE", dateTimeService, "minDate", new Class[]{Object[].class}, ""); + runner.addFunctionOfServiceMethod("DAYSINMONTH", dateTimeService, "daysInMonth", new Class[]{Object[].class}, ""); // runner.addFunctionOfServiceMethod("DAYOFMONTH", dateTimeService, "dayOfMonth", new Class[]{Object[].class}, ""); //聚合函数 diff --git a/src/com/engine/salary/formlua/func/compare/EqOperator.java b/src/com/engine/salary/formlua/func/compare/EqOperator.java index 24ee31946..679149b83 100644 --- a/src/com/engine/salary/formlua/func/compare/EqOperator.java +++ b/src/com/engine/salary/formlua/func/compare/EqOperator.java @@ -1,6 +1,5 @@ package com.engine.salary.formlua.func.compare; -import com.alibaba.fastjson.JSON; import com.engine.salary.formlua.core.exception.ErrorType; import com.engine.salary.formlua.entity.parameter.DataType; import com.engine.salary.formlua.util.CompareUtil; @@ -37,7 +36,6 @@ public class EqOperator extends OperatorEqualsLessMore { public Object executeInner(Object... list) throws Exception { DataType result=new DataType(); result.setDataType(DataType.BOOL); - logger.info("等于号参数:"+JSON.toJSONString(list)); String oper="="; if(list.length!=2){ throw new RuntimeException("[=]"+ ErrorType.MAX_VAR_COUNT.name()); @@ -75,7 +73,6 @@ public class EqOperator extends OperatorEqualsLessMore { int i=0; for (;i"+secondParam); if((firstParam instanceof String || firstParam instanceof Character) && (secondParam instanceof String || secondParam instanceof Character)){ if(firstParam.toString().length()==1&&secondParam.toString().length()==1){ boolean r=firstParam.toString().equals(secondParam.toString()); diff --git a/src/com/engine/salary/formlua/func/compare/GreaterOperator.java b/src/com/engine/salary/formlua/func/compare/GreaterOperator.java index f33b7dd5a..1540b887c 100644 --- a/src/com/engine/salary/formlua/func/compare/GreaterOperator.java +++ b/src/com/engine/salary/formlua/func/compare/GreaterOperator.java @@ -1,6 +1,5 @@ package com.engine.salary.formlua.func.compare; -import com.alibaba.fastjson.JSON; import com.engine.salary.formlua.entity.parameter.DataType; import com.engine.salary.formlua.util.CompareUtil; import com.engine.salary.formlua.util.DateUtil; @@ -22,7 +21,6 @@ public class GreaterOperator extends OperatorEqualsLessMore { result.setDataType(DataType.BOOL); // IgnoreParamFilter.filterCompareFunc(op1,op2,">"); String datatype = ExcelParamUtil.checkParamType(op1); - logger.info("大于号比较:" + JSON.toJSONString(op1) + "-->" + JSON.toJSONString(op2)); //对option的特殊处理,获取option的字符串后根据逗号分割,然后排序数组,数组长度不一致返回false,一致则循环对比直到同样下标的数据不一致返回false,否则为true try { if (datatype.equals(DataType.OPTION)) { @@ -77,8 +75,6 @@ public class GreaterOperator extends OperatorEqualsLessMore { } result.setContent(dateResult); } else { - logger.info("参数1:" + ExcelParamUtil.convertParamValToNumber(op1) + ""); - logger.info("参数2:" + ExcelParamUtil.convertParamValToNumber(op2) + ""); boolean r; if (ExcelParamUtil.getParamType(op1).toLowerCase().equals("double") || ExcelParamUtil.getParamType(op2).toLowerCase().equals("double")) { r = OperatorEqualsLessMore.executeInner(">", ExcelParamUtil.convertParamValToNumber(op1), ExcelParamUtil.convertParamValToNumber(op2)); diff --git a/src/com/engine/salary/formlua/func/compare/WOperatorDiv.java b/src/com/engine/salary/formlua/func/compare/WOperatorDiv.java index d4d612bf8..8011e3649 100644 --- a/src/com/engine/salary/formlua/func/compare/WOperatorDiv.java +++ b/src/com/engine/salary/formlua/func/compare/WOperatorDiv.java @@ -52,10 +52,9 @@ public class WOperatorDiv extends OperatorMultiDiv { newList[1] = secondParam; try { Object r = super.executeInner(newList); - logger.info("乘法运算:" + r.toString()); result.setContent(new BigDecimal(r + "")); } catch (Exception e) { - logger.info("除法计算异常返回0:" + e.getMessage()); + logger.error("除法计算异常返回0:" + e.getMessage()); result.setContent(0); } return result; diff --git a/src/com/engine/salary/formlua/func/date/DateTimeService.java b/src/com/engine/salary/formlua/func/date/DateTimeService.java index 2b7dca962..7fbf04508 100644 --- a/src/com/engine/salary/formlua/func/date/DateTimeService.java +++ b/src/com/engine/salary/formlua/func/date/DateTimeService.java @@ -89,4 +89,11 @@ import com.engine.salary.formlua.entity.parameter.DataType; */ DataType currSecond(Object... objects); + /** + * 获取月有多少天 + * @param objects + * @return + */ + DataType daysInMonth(Object... objects); + } diff --git a/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java b/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java index 07fa4c8ae..5f2ffedd0 100644 --- a/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java +++ b/src/com/engine/salary/formlua/func/date/DateTimeServiceImpl.java @@ -13,6 +13,7 @@ import org.slf4j.LoggerFactory; import java.math.BigDecimal; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.time.YearMonth; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; @@ -549,7 +550,6 @@ public class DateTimeServiceImpl implements DateTimeService { date = lastday; break; } - logger.info("firstday:" + firstday + " lastday:" + lastday); return new DataType(DataType.STRING, date); } @@ -998,6 +998,37 @@ public class DateTimeServiceImpl implements DateTimeService { int year = cal.get(Calendar.SECOND); return new DataType(DataType.NUMBER, year); } + + @Override + public DataType daysInMonth(Object... objects) { + Class[] typeObjects = new Class[]{DateAndString.class}; + IgnoreParamFilter.commonFilter("YEAR", 1, 1, typeObjects, objects); + Object obj = objects[0]; + Object date = DateUtil.getContent(obj, formatter); + if (ExcelParamUtil.checkIsNull(date, ExcelParamUtil.CHECKLEVEL_STRING)) { + return new DataType(DataType.NUMBER, 0); + } + int year = 0; + try { + year = getDateTimeValue(date, "Y", "YEAR"); + } catch (ParseException e) { + logger.error("err", e); + throw new RuntimeException(e); + } + + IgnoreParamFilter.commonFilter("MONTH", 1, 1, typeObjects, objects); + int month = 0; + try { + month = getDateTimeValue(date, "M", "MONTH") + 1; + } catch (ParseException e) { + logger.error("err", e); + throw new RuntimeException(e); + } + + YearMonth yearMonth = YearMonth.of(year, month); + int daysInMonth = yearMonth.lengthOfMonth(); + return new DataType(DataType.NUMBER, daysInMonth); + } /*******以下为日期函数的一些公共逻辑********/ @@ -1256,7 +1287,7 @@ public class DateTimeServiceImpl implements DateTimeService { r = true; break; } catch (ParseException e) { - logger.info(e.getMessage()); + logger.error(e.getMessage()); r = false; } } diff --git a/src/com/engine/salary/formlua/func/finance/FinanceServiceImpl.java b/src/com/engine/salary/formlua/func/finance/FinanceServiceImpl.java index acda12221..e3b4f1d24 100644 --- a/src/com/engine/salary/formlua/func/finance/FinanceServiceImpl.java +++ b/src/com/engine/salary/formlua/func/finance/FinanceServiceImpl.java @@ -79,7 +79,6 @@ public class FinanceServiceImpl implements FinanceService{ int intLen = integerNum.length(); for (int i = 0; i < intLen; i++) { String n = integerNum.substring(i, i+1); - logger.info("转换中文:"+n); int p = intLen - i - 1; int q = p / 4; int m = p % 4; diff --git a/src/com/engine/salary/formlua/func/logic/IfOperator.java b/src/com/engine/salary/formlua/func/logic/IfOperator.java index 44430d341..b826836fb 100644 --- a/src/com/engine/salary/formlua/func/logic/IfOperator.java +++ b/src/com/engine/salary/formlua/func/logic/IfOperator.java @@ -1,6 +1,5 @@ package com.engine.salary.formlua.func.logic; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.engine.salary.formlua.core.exception.ExcelRunTimeException; import com.engine.salary.formlua.entity.parameter.DataType; @@ -26,7 +25,6 @@ public class IfOperator extends OperatorIf { throw new ExcelRunTimeException("IF函数只允许三个参数"); } Object obj = list.get(0).getObject(parent); - logger.info("IF参数:" + JSON.toJSONString(obj)); boolean isDataTypeBool = false; DataType boolDtaType = null; if (obj != null && obj instanceof DataType) { diff --git a/src/com/engine/salary/formlua/func/logic/LogicServiceImpl.java b/src/com/engine/salary/formlua/func/logic/LogicServiceImpl.java index 395b9acdf..f550fd861 100644 --- a/src/com/engine/salary/formlua/func/logic/LogicServiceImpl.java +++ b/src/com/engine/salary/formlua/func/logic/LogicServiceImpl.java @@ -477,7 +477,6 @@ public class LogicServiceImpl implements LogicService { Object obj = objects[i - 1]; String typeStr = ExcelParamUtil.getParamType(obj); typeStr = ExcelParamUtil.checkParamType(typeStr); - logger.info(typeStr); if (type == null) { type = typeStr; } else { diff --git a/src/com/engine/salary/formlua/func/string/StringFormulaServiceImpl.java b/src/com/engine/salary/formlua/func/string/StringFormulaServiceImpl.java index bf96613c3..f18557327 100644 --- a/src/com/engine/salary/formlua/func/string/StringFormulaServiceImpl.java +++ b/src/com/engine/salary/formlua/func/string/StringFormulaServiceImpl.java @@ -236,7 +236,6 @@ public class StringFormulaServiceImpl implements StringFormulaService { int replaceLength=(repIdx-1)+repLenth; if(replaceLength>sourceStr.length()){ // throw new RunTimeException(errorJson.getString("msg")); - logger.info("REPLACE函数替换位置超过了字符长度"); replaceLength=sourceStr.length(); } String cutStr=sourceStr.substring(repIdx-1,replaceLength); @@ -463,7 +462,6 @@ public class StringFormulaServiceImpl implements StringFormulaService { sex = "男"; } } - logger.info(sex); return new DataType(DataType.STRING,sex); } @@ -471,7 +469,6 @@ public class StringFormulaServiceImpl implements StringFormulaService { public DataType nativePlace(String idCard){ int nativePlaceCode=Integer.parseInt(idCard.substring(0, 6)); String nativePlace= NativePlace.getNativePlace(nativePlaceCode); - logger.info("您所在的地区为:\n" + nativePlace); return new DataType(DataType.STRING,nativePlace); } @@ -489,7 +486,6 @@ public class StringFormulaServiceImpl implements StringFormulaService { if(dataType!=null && dataType.getContent()!=null){ age=dataType.getContent(); } - logger.info("年龄:"+age); } } catch (ParseException e) { logger.error("err",e); @@ -526,7 +522,6 @@ public class StringFormulaServiceImpl implements StringFormulaService { } String birth=year+"-"+month+"-"+day; - logger.info("生日为:"+birth); result=birth; break; @@ -756,12 +751,10 @@ public class StringFormulaServiceImpl implements StringFormulaService { if(fieldType.equalsIgnoreCase("string")){ if(content!=null){ try { - logger.info("isJson函数的JSON字符转换:"+content+""); JSON.parseObject(content+""); resultDataType=new DataType(DataType.BOOL,true); } catch (Exception e) { - logger.info("err",e); - logger.info("不是正常的JSON字符"); + logger.error("err",e); resultDataType=new DataType(DataType.BOOL,false); } }else{ @@ -800,13 +793,11 @@ public class StringFormulaServiceImpl implements StringFormulaService { if(fieldType.equalsIgnoreCase("string")){ if(content!=null){ try { - logger.info("isJson函数的JSON字符转换:"+content+""); JSONObject jsonObject=JSON.parseObject(content+""); Object jsonValue=jsonObject.get(objectKey+""); resultDataType=new DataType(DataType.STRING,jsonValue==null?"":jsonValue.toString()); } catch (Exception e) { logger.info("err",e); - logger.info("不是正常的JSON字符"); resultDataType=new DataType(DataType.STRING,""); } }else{ diff --git a/src/com/engine/salary/formlua/util/DateUtil.java b/src/com/engine/salary/formlua/util/DateUtil.java index 64e97e2bd..5eddb6eb0 100644 --- a/src/com/engine/salary/formlua/util/DateUtil.java +++ b/src/com/engine/salary/formlua/util/DateUtil.java @@ -87,7 +87,6 @@ public class DateUtil { try { format.setLenient(false); format.parse(dateString); - logger.info(dateString); } catch (ParseException e) { // logger.error("err",e); convertSuccess=false; diff --git a/src/com/engine/salary/formlua/util/IgnoreParamFilter.java b/src/com/engine/salary/formlua/util/IgnoreParamFilter.java index 31f670347..b8db227e4 100644 --- a/src/com/engine/salary/formlua/util/IgnoreParamFilter.java +++ b/src/com/engine/salary/formlua/util/IgnoreParamFilter.java @@ -1,6 +1,5 @@ package com.engine.salary.formlua.util; -import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.engine.salary.formlua.core.exception.ErrorType; import com.engine.salary.formlua.entity.parameter.DataType; @@ -39,7 +38,6 @@ public class IgnoreParamFilter { * @return */ public static boolean isEmployee(Object object) { - logger.info("校验人员参数" + JSON.toJSONString(object)); // if (object instanceof DataType) { // DataType dataType = (DataType) object; // if (dataType.getComponentKey() != null && dataType.getComponentKey().equalsIgnoreCase(ComponentType.Employee.toString())) { @@ -227,7 +225,6 @@ public class IgnoreParamFilter { * @throws RuntimeException */ public static void filterAggFunc(String func, Object... objects) throws RuntimeException { - logger.info("聚合参数:" + JSON.toJSONString(objects)); Integer number = getSetFuncNumber(func); Map map = new HashMap<>(); boolean mustNumber = false; diff --git a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml index db4af3bf7..4beb41bfc 100644 --- a/src/com/engine/salary/mapper/datacollection/EmployMapper.xml +++ b/src/com/engine/salary/mapper/datacollection/EmployMapper.xml @@ -99,10 +99,16 @@ c.jobtitlename as jobtitleName, c.id as jobtitleId, e.companystartdate as companystartdate, - e.mobile as mobile + e.mobile as mobile, + sc.SUBCOMPANYNAME as subcompanyName, + sc.id as subcompanyid, + job.id as jobcallId, + job.name as jobcall from hrmresource e + left join HrmSubCompany sc on e.SUBCOMPANYID1=sc.id left join hrmdepartment d on e.departmentid = d.id left join hrmjobtitles c on e.jobtitle = c.id + left join hrmjobcall job on e.jobcall=job.id WHERE e.status not in (7) and (e.accounttype is null or e.accounttype = 0) AND ( 1=2 @@ -139,14 +145,6 @@ #{status} - - - - - - - - ) ) @@ -187,14 +185,6 @@ #{status} - - - - - - - - ) ) diff --git a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml index cc1dc0e33..fd451cda5 100644 --- a/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml +++ b/src/com/engine/salary/mapper/salaryacct/SalaryAcctEmployeeMapper.xml @@ -16,6 +16,15 @@ + + + + + + + + + @@ -54,7 +72,16 @@ INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status, + subcompany_name, + subcompany_id, + department_name, + department_id, + jobtitle_name, + jobtitle_id, + jobcall, + jobcall_id, + status) VALUES ( @@ -69,15 +96,32 @@ #{emp.deleteType}, #{emp.tenantKey}, #{emp.employeeType}, - #{emp.lockStatus} + #{emp.lockStatus}, + #{emp.subcompanyName}, + #{emp.subcompanyId}, + #{emp.departmentName}, + #{emp.departmentId}, + #{emp.jobtitleName}, + #{emp.jobtitleId}, + #{emp.jobcall}, + #{emp.jobcallId}, + #{emp.status} ) INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) - + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status, + subcompany_name, + subcompany_id, + department_name, + department_id, + jobtitle_name, + jobtitle_id, + jobcall, + jobcall_id, + status) select #{emp.salaryAcctRecordId,jdbcType=DOUBLE}, @@ -92,6 +136,15 @@ #{emp.tenantKey,jdbcType=VARCHAR}, #{emp.employeeType,jdbcType=INTEGER}, #{emp.lockStatus,jdbcType=INTEGER} + #{emp.subcompanyName,jdbcType=VARCHAR}, + #{emp.subcompanyId,jdbcType=DOUBLE}, + #{emp.departmentName,jdbcType=VARCHAR}, + #{emp.departmentId,jdbcType=DOUBLE}, + #{emp.jobtitleName,jdbcType=VARCHAR}, + #{emp.jobtitleId,jdbcType=DOUBLE}, + #{emp.jobcall,jdbcType=VARCHAR}, + #{emp.jobcallId,jdbcType=DOUBLE}, + #{emp.status,jdbcType=VARCHAR} from dual @@ -99,7 +152,16 @@ INSERT INTO hrsa_salary_acct_emp( salary_acct_record_id, salary_sob_id, employee_id, tax_agent_id, salary_month, - creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status) + creator, create_time, update_time, delete_type, tenant_key,employee_type,lock_status, + subcompany_name, + subcompany_id, + department_name, + department_id, + jobtitle_name, + jobtitle_id, + jobcall, + jobcall_id, + status) VALUES ( #{emp.salaryAcctRecordId}, @@ -113,7 +175,16 @@ #{emp.deleteType}, #{emp.tenantKey}, #{emp.employeeType}, - #{emp.lockStatus} + #{emp.lockStatus}, + #{emp.subcompanyName}, + #{emp.subcompanyId}, + #{emp.departmentName}, + #{emp.departmentId}, + #{emp.jobtitleName}, + #{emp.jobtitleId}, + #{emp.jobcall}, + #{emp.jobcallId}, + #{emp.status} ) @@ -1150,6 +1221,15 @@ + + + + + + + + + @@ -1169,6 +1249,15 @@ , t.tenant_key , t.employee_type , t.lock_status + , t.subcompany_name + , t.subcompany_id + , t.department_name + , t.department_id + , t.jobtitle_name + , t.jobtitle_id + , t.jobcall + , t.jobcall_id + , t.status @@ -1274,7 +1363,7 @@ UPDATE hrsa_salary_acct_emp SET lock_status = #{lockStatus} WHERE delete_type = 0 - AND salary_acct_record_id =#{recordId} + AND salary_acct_record_id = #{recordId} diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java index 2dec937ca..2a05a0c72 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.java @@ -116,6 +116,14 @@ public interface InsuranceAccountDetailMapper { */ List querySupplementListByBillMonth(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization); + /** + * 查询补差数据 + * @param billMonth 账单月份 + * @param paymentOrganization 个税扣缴义务人 + * @return + */ + List queryBalanceListByBillMonth(@Param("billMonth") String billMonth, @Param("paymentOrganization") Long paymentOrganization); + /** * 查询正常缴纳数据 * @param billMonth 账单月份 diff --git a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml index 55b55947e..977fb9edd 100644 --- a/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml +++ b/src/com/engine/salary/mapper/siaccount/InsuranceAccountDetailMapper.xml @@ -497,6 +497,7 @@ + +